vendor: 20,760 bytes, lines 1-3
1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u;`captureStackTrace`in Error,(u=globalThis).__zod_globalConfig??(u.__zod_globalConfig={});var d=globalThis.__zod_globalConfig;function f(e){return e&&Object.assign(d,e),d}f({jitless:!0});var p=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=te(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ne(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=N,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,M)}catch(e){M(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),m=o(((e,t)=>{t.exports=p()})),h=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),g=o(((e,t)=>{t.exports=h()})),_=o((e=>{var t=m();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),v=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=o((e=>{var t=g(),n=m(),r=v();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),ee=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ne(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function P(e){return{current:e}}function F(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function I(e,t){oe++,ae[oe]=e.current,e.current=t}var se=P(null),ce=P(null),le=P(null),ue=P(null);function de(e,t){switch(I(le,t),I(ce,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}F(se),I(se,e)}function fe(){F(se),F(ce),F(le)}function pe(e){e.memoizedState!==null&&I(ue,e);var t=se.current,n=ef(t,e.type);t!==n&&(I(ce,e),I(se,n))}function me(e){ce.current===e&&(F(se),F(ce)),ue.current===e&&(F(ue),up._currentValue=ie)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(` 2 at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return` 3`+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}
vendor: 20,324 bytes, lines 3-8
3else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(` 4`),l=s.split(` 5`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=` 6`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return` 7Error generating stack: `+e.message+` 8`+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function L(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function R(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function z(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=N.p;return e===0?(e=window.event,e===void 0?32:Ep(e.type)):e}function rt(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,ot=`__reactProps$`+it,st=`__reactContainer$`+it,ct=`__reactEvents$`+it,lt=`__reactListeners$`+it,ut=`__reactHandles$`+it,dt=`__reactResources$`+it,ft=`__reactMarker$`+it;function pt(e){delete e[at],delete e[ot],delete e[ct],delete e[lt],delete e[ut]}function mt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cf(e);e!==null;){if(n=e[at])return n;e=Cf(e)}return t}e=n,n=e.parentNode}return null}function ht(e){if(e=e[at]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function _t(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function vt(e){e[ft]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=RegExp(`^[: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]*$`),wt={},Tt={};function Et(e){return Se.call(Tt,e)?!0:Se.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Ot(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function kt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Ft(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+At(s):e.removeAttribute(`name`)}function zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+At(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Kt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Kt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Yt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Xt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=ht(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ot]||null;if(!a)throw Error(i(90));Rt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(ku(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ot]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,"passive",{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return pn=i.slice(e,1<r?1-r:void 0)}function hn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gn(){return!0}function _n(){return!1}function vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?gn:_n,this.isPropagationStopped=_n,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=f({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=f({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(f({},En,{dataTransfer:0})),kn=vn(f({},xn,{relatedTarget:0})),An=vn(f({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(f({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(f({},yn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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:`F
85`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(f({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(f({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(f({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(f({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(f({},En,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Un=vn(f({},yn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=cn&&`CompositionEvent`in window,Kn=null;cn&&`documentMode`in document&&(Kn=document.documentMode);var qn=cn&&`TextEvent`in window&&!Kn,Jn=cn&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,Xn=!1;function Zn(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $n=!1;function er(e,t){switch(e){case`compositionend`:return Qn(t);case`keypress`:return t.which===32?(Xn=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&Xn?null:e;default:return null}}function tr(e,t){if($n)return e===`compositionend`||!Gn&&Zn(e,t)?(e=mn(),pn=fn=dn=null,$n=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Jn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Ld(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){kd(e,0)}function cr(e){if(Pt(gt(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(cn){var dr;if(cn){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,en(e)),on(sr,t)}}function gr(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function _r(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function vr(e,t){if(e===`click`)return cr(t)}function yr(e,t){if(e===`input`||e===`change`)return cr(t)}function br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var xr=typeof Object.is==`function`?Object.is:br;function Sr(e,t){if(xr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!xr(e[i],t[i]))return!1}return!0}function Cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var n=Cr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Cr(n)}}function Tr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Er(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;
vendor: 144,501 bytes, lines 8-9
8t=Ft(e.document)}return t}function Dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Or=cn&&`documentMode`in document&&11>=document.documentMode,kr=null,Ar=null,jr=null,Mr=!1;function Nr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mr||kr==null||kr!==Ft(r)||(r=kr,`selectionStart`in r&&Dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),jr&&Sr(jr,r)||(jr=r,r=Ld(Ar,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Fr={animationend:Pr(`Animation`,`AnimationEnd`),animationiteration:Pr(`Animation`,`AnimationIteration`),animationstart:Pr(`Animation`,`AnimationStart`),transitionrun:Pr(`Transition`,`TransitionRun`),transitionstart:Pr(`Transition`,`TransitionStart`),transitioncancel:Pr(`Transition`,`TransitionCancel`),transitionend:Pr(`Transition`,`TransitionEnd`)},Ir={},Lr={};cn&&(Lr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Fr.animationend.animation,delete Fr.animationiteration.animation,delete Fr.animationstart.animation),`TransitionEvent`in window||delete Fr.transitionend.transition);function Rr(e){if(Ir[e])return Ir[e];if(!Fr[e])return e;var t=Fr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lr)return Ir[e]=t[n];return e}var zr=Rr(`animationend`),Br=Rr(`animationiteration`),Vr=Rr(`animationstart`),Hr=Rr(`transitionrun`),Ur=Rr(`transitionstart`),Wr=Rr(`transitioncancel`),Gr=Rr(`transitionend`),Kr=new Map,qr=`abort auxClick beforeToggle 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(` `);qr.push(`scrollEnd`);function Jr(e,t){Kr.set(e,t),xt(t,[e])}var Yr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Xr=[],Zr=0,Qr=0;function $r(){for(var e=Zr,t=Qr=Zr=0;t<e;){var n=Xr[t];Xr[t++]=null;var r=Xr[t];Xr[t++]=null;var i=Xr[t];Xr[t++]=null;var a=Xr[t];if(Xr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ri(n,i,a)}}function ei(e,t,n,r){Xr[Zr++]=e,Xr[Zr++]=t,Xr[Zr++]=n,Xr[Zr++]=r,Qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ti(e,t,n,r){return ei(e,t,n,r),ii(e)}function ni(e,t){return ei(e,null,null,t),ii(e)}function ri(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ii(e){if(50<bu)throw bu=0,xu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ai={};function oi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function si(e,t,n,r){return new oi(e,t,n,r)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function li(e,t){var n=e.alternate;return n===null?(n=si(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ui(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function di(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ci(e)&&(s=1);else if(typeof e==`string`)s=tp(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=si(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return fi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=si(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=si(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=si(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function pi(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function mi(e){var t=si(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var vi=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,Ei=``;function Di(e,t){vi[yi++]=xi,vi[yi++]=bi,bi=e,xi=t}function Oi(e,t,n){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,wi=e;var r=Ti;e=Ei;var i=32-ze(r)-1;r&=~(1<<i),n+=1;var a=32-ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-ze(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===bi;)bi=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ei=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,Pi=!1,Fi=null,Ii=!1,Li=Error(i(519));function Ri(e){throw Wi(_i(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Li}function zi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[ot]=r,n){case`dialog`:Ad(`cancel`,t),Ad(`close`,t);break;case`iframe`:case`object`:case`embed`:Ad(`load`,t);break;case`video`:case`audio`:for(n=0;n<Dd.length;n++)Ad(Dd[n],t);break;case`source`:Ad(`error`,t);break;case`img`:case`image`:case`link`:Ad(`error`,t),Ad(`load`,t);break;case`details`:Ad(`toggle`,t);break;case`input`:Ad(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Ad(`invalid`,t);break;case`textarea`:Ad(`invalid`,t),Ut(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ud(t.textContent,n)?(r.popover!=null&&(Ad(`beforetoggle`,t),Ad(`toggle`,t)),r.onScroll!=null&&Ad(`scroll`,t),r.onScrollEnd!=null&&Ad(`scrollend`,t),r.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||Ri(e,!0)}function Bi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:Mi=Mi.return}}function Vi(e){if(e!==Mi)return!1;if(!Pi)return Bi(e),Pi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||tf(e.type,e.memoizedProps)),n=!n),n&&Ni&&Ri(e),Bi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=Sf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=Sf(e)}else t===27?(t=Ni,uf(e.type)?(e=xf,xf=null,Ni=e):Ni=t):Ni=Mi?bf(e.stateNode.nextSibling):null;return!0}function Hi(){Ni=Mi=null,Pi=!1}function Ui(){var e=Fi;return e!==null&&(ou===null?ou=e:ou.push.apply(ou,e),Fi=null),e}function Wi(e){Fi===null?Fi=[e]:Fi.push(e)}var Gi=P(null),Ki=null,qi=null;function Ji(e,t,n){I(Gi,t._currentValue),t._currentValue=n}function Yi(e){e._currentValue=Gi.current,F(Gi)}function Xi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Zi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Xi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Xi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Qi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;xr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}a=a.return}e!==null&&Zi(t,e,n,r),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!xr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){Ki=e,qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return ra(Ki,e)}function na(e,t){return Ki===null&&ea(e),ra(e,t)}function ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qi===null){if(e===null)throw Error(i(308));qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qi=qi.next=t;return n}var ia=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},aa=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new ia,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&aa(oa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=xd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var _a=M.S;M.S=function(e,t){lu=De(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=P(null);function ya(){var e=va.current;return e===null?Wl.pooledCache:e}function ba(e,t){t===null?I(va,va.current):I(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:sa._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then(Qt,Qt);else{if(e=Wl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function La(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=li(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=pi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Oa(i)===t.type)?(t=a(t,n.props),Fa(t,n),t.return=e,t):(t=di(n.type,n.key,n.props,null,e.mode,r),Fa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=hi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=di(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case _:return t=hi(t,e.mode,n),t.return=e,t;case O:return t=Oa(t),f(e,t,n)}if(re(t)||j(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===C)return f(e,na(e,t),n);Ia(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case O:return n=Oa(n),p(e,t,n,r)}if(re(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Pa(n),r);if(n.$$typeof===C)return p(e,t,na(e,n),r);Ia(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case _:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Oa(r),m(e,t,n,r,i)}if(re(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Pa(r),i);if(r.$$typeof===C)return m(e,t,n,na(t,r),i);Ia(t,r)}return null}function g(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Pi&&Di(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Pi&&Di(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Pi&&Di(i,h),l}function v(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Pi&&Di(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Pi&&Di(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Pi&&Di(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=di(o.type,o.key,o.props,null,e.mode,c),Fa(c,o),c.return=e,e=c)}return s(e);case _:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=hi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Oa(o),b(e,r,o,c)}if(re(o))return g(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),v(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Pa(o),c);if(o.$$typeof===C)return b(e,r,na(e,o),c);Ia(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ul&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ii(e),ri(e,null,n),t}return ei(e,r,t,n),ii(e)}function Ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}function Ka(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Kl&p)===p:(r&p)===p){p!==0&&p===fa&&(qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ba=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),eu|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=P(null),$a=P(0);function eo(e,t){e=Ql,I($a,e),I(Qa,t),Ql=e|t.baseLanes}function to(){I($a,Ql),I(Qa,Qa.current)}function no(){Ql=$a.current,F(Qa),F($a)}var ro=P(null),io=null;function ao(e){var t=e.alternate;I(uo,uo.current&1),I(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){I(uo,uo.current),I(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(I(uo,uo.current),I(ro,e),io===null&&(io=e)):co(e)}function co(){I(uo,uo.current),I(ro,ro.current)}function lo(e){F(ro),io===e&&(io=null),F(uo)}var uo=P(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_f(n)||vf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var po=0,mo=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return po=a,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Hs:Us,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){M.H=Vs;var t=ho!==null&&ho.next!==null;if(po=0,go=ho=mo=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||ac||(e=e.dependencies,e!==null&&$i(e)&&(ac=!0))}function Oo(e,t,n,r){mo=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Ws,o=t(n,r)}while(vo);return o}function ko(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(mo.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}po=0,go=ho=mo=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?mo.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=mo.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?mo.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw mo.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?mo.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Da(So,e,t),t=mo,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Hs:Us),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return ta(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=mo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=mo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),mo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ee;return t.index++,n}function B(e,t){return typeof t==`function`?t(e):t}function zo(e){return Bo(Po(),ho,e)}function Bo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(po&f)===f:(Kl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===fa&&(d=!0);else if((po&p)===p){u=u.next,p===fa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,mo.lanes|=p,eu|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,mo.lanes|=f,eu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!xr(o,e.memoizedState)&&(ac=!0,d&&(n=pa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Vo(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);xr(o,t.memoizedState)||(ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ho(e,t,n){var r=mo,a=Po(),o=Pi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!xr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,ac=!0),a=a.queue,ps(Go.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,a,n,t),null),Wl===null)throw Error(i(349));o||po&127||Uo(r,t,n)}return n}function Uo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mo.updateQueue,t===null?(t=Fo(),mo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wo(e,t,n,r){t.value=n,t.getSnapshot=r,Ko(t)&&qo(e)}function Go(e,t,n){return n(function(){Ko(t)&&qo(e)})}function Ko(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xr(e,n)}catch{return!0}}function qo(e){var t=ni(e,2);t!==null&&wu(t,e,2)}function Jo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:B,lastRenderedState:e},t}function Yo(e,t,n,r){return e.baseState=n,Bo(e,ho,typeof r==`function`?r:B)}function Xo(e,t,n,r,a){if(Rs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Zo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),Qo(e,t,s)}catch(n){es(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),Qo(e,t,a)}catch(n){es(e,t,n)}}function Qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){$o(e,t,n)},function(n){return es(e,t,n)}):$o(e,t,n)}function $o(e,t,n){t.status=`fulfilled`,t.value=n,ts(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Zo(e,n)))}function es(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ts(t),t=t.next;while(t!==r)}e.action=null}function ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ns(e,t){return t}function rs(e,t){if(Pi){var n=Wl.formState;if(n!==null){a:{var r=mo;if(Pi){if(Ni){b:{for(var i=Ni,a=Ii;i.nodeType!==8;){if(!a){i=null;break b}if(i=bf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ni=bf(i.nextSibling),r=i.data===`F!`;break a}}Ri(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:t},n.queue=r,n=Fs.bind(null,mo,r),r.dispatch=n,r=Jo(!1),a=Ls.bind(null,mo,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Xo.bind(null,mo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function is(e){return as(Po(),ho,e)}function as(e,t,n){if(t=Bo(e,t,ns)[0],e=zo(B)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Sa?wa:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(mo.flags|=2048,cs(9,{destroy:void 0},os.bind(null,i,n),null)),[r,a,e]}function os(e,t){e.action=t}function ss(e){var t=Po(),n=ho;if(n!==null)return as(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function cs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=mo.updateQueue,t===null&&(t=Fo(),mo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ls(){return Po().memoizedState}function us(e,t,n,r){var i=No();mo.flags|=e,i.memoizedState=cs(1|t,{destroy:void 0},n,r===void 0?null:r)}function ds(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=cs(t,a,n,r):(mo.flags|=e,i.memoizedState=cs(1|t,a,n,r))}function fs(e,t){us(8390656,8,e,t)}function ps(e,t){ds(2048,8,e,t)}function ms(e){mo.flags|=4;var t=mo.updateQueue;if(t===null)t=Fo(),mo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=Po().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(Ul&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return ds(4,2,e,t)}function _s(e,t){return ds(4,4,e,t)}function vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ys(e,t,n){n=n==null?null:n.concat([e]),ds(4,4,vs.bind(null,t,e),n)}function bs(){}function xs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function Cs(e,t,n){return n===void 0||po&1073741824&&!(Kl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Cu(),mo.lanes|=e,eu|=e,n)}function ws(e,t,n,r){return xr(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(Kl&261930)?(ac=!0,e.memoizedState=n):(e=Cu(),mo.lanes|=e,eu|=e,t):(e=Cs(e,n,r),xr(e,t)||(ac=!0),e)}function Ts(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,Ls(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,ga(c,r),Su(e)):Is(e,t,r,Su(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},Su())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Os(e).queue;Ts(e,a,t,ie,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:B,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:B,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},Su())}function As(){return ta(up)}function js(){return Po().memoizedState}function Ms(){return Po().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Su();e=Ua(n);var r=Wa(t,e,n);r!==null&&(wu(r,t,n),Ga(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=Su();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=ti(e,t,n,r),n!==null&&(wu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,Su())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,xr(s,o))return ei(e,t,i,0),Wl===null&&$r(),!1}catch{}if(n=ti(e,t,i,r),n!==null)return wu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:xd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(i(479))}else t=ti(e,n,r,2),t!==null&&wu(t,e,2)}function Rs(e){var t=e.alternate;return e===mo||t!==null&&t===mo}function zs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var Vs={readContext:ta,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Vs.useEffectEvent=wo;var Hs={readContext:ta,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ps.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Fs.bind(null,mo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(No(),e,t)},useTransition:function(){var e=Jo(!1);return e=Ts.bind(null,mo,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=mo,a=No();if(Pi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Wl===null)throw Error(i(349));Kl&127||Uo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Go.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Wl.identifierPrefix;if(Pi){var n=Ei,r=Ti;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:As,useFormState:rs,useActionState:rs,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ls.bind(null,mo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ns.bind(null,mo)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Ul&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Us={readContext:ta,use:Lo,useCallback:xs,useContext:ta,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:zo,useRef:ls,useState:function(){return zo(B)},useDebugValue:bs,useDeferredValue:function(e,t){return ws(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=zo(B)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Ho,useId:js,useHostTransitionStatus:As,useFormState:is,useActionState:is,useOptimistic:function(e,t){return Yo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ms};Us.useEffectEvent=hs;var Ws={readContext:ta,use:Lo,useCallback:xs,useContext:ta,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:Vo,useRef:ls,useState:function(){return Vo(B)},useDebugValue:bs,useDeferredValue:function(e,t){var n=Po();return ho===null?Cs(n,e,t):ws(n,ho.memoizedState,e,t)},useTransition:function(){var e=Vo(B)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Ho,useId:js,useHostTransitionStatus:As,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Yo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ms};Ws.useEffectEvent=hs;function Gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var V={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Su(),i=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(wu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Su(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(wu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Su(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(wu(t,e,n),Ga(t,e,n))}};function Ks(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Sr(n,r)||!Sr(i,a):!0}function qs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&V.enqueueReplaceState(t,t.state,null)}function Js(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ys(e){Yr(e)}function Xs(e){console.error(e)}function Zs(e){Yr(e)}function Qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function $s(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ec(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){Qs(e,t)},n}function tc(e){return e=Ua(e),e.tag=3,e}function nc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){$s(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){$s(t,n,r),typeof i!=`function`&&(fu===null?fu=new Set([this]):fu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function rc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Qi(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Iu():n.alternate===null&&$l===0&&($l=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),td(e,r,a)),!1;case 22:return n.flags|=65536,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),td(e,r,a)),!1}throw Error(i(435,n.tag))}return td(e,r,a),Iu(),!1}if(Pi)return t=ro.current,t===null?(r!==Li&&(t=Error(i(423),{cause:r}),Wi(_i(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=_i(r,n),a=ec(e.stateNode,r,a),Ka(e,a),$l!==4&&($l=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Li&&(e=Error(i(422),{cause:r}),Wi(_i(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=_i(o,n),au===null?au=[o]:au.push(o),$l!==4&&($l=2),t===null)return!0;r=_i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ec(n.stateNode,r,e),Ka(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(fu===null||!fu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=tc(a),nc(a,e,n,r),Ka(n,a),!1}n=n.return}while(n!==null);return!1}var ic=Error(i(461)),ac=!1;function oc(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function sc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ea(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!ac?(jo(e,t,i),jc(e,t,i)):(Pi&&s&&ki(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=li(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref){if(ac=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(ac=!0);else return t.lanes=e.lanes,jc(e,t,i)}}return _c(e,t,n,r,i)}function uc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&Qi(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return Ra(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Pi){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(oo(t),(e=Ni)?(e=gf(e,Ii),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),a){if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(ac||Qi(e,t,n,!1),a=(n&e.childLanes)!==0,ac||a){if(r=Wl,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ni(e,s),wu(r,e,s),ic;Iu(),t=mc(e,t,n)}else e=o.treeContext,Ni=bf(s.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=pc(t,r),t.flags|=4096;return t}return e=li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _c(e,t,n,r,i){return ea(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!ac?(jo(e,t,i),jc(e,t,i)):(Pi&&r&&ki(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return ea(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!ac?(jo(e,t,a),jc(e,t,a)):(Pi&&r&&ki(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(ea(t),t.stateNode===null){var a=ai,o=n.contextType;typeof o==`object`&&o&&(a=ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=V,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?ta(o):ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Gs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&V.enqueueReplaceState(a,a.state,null),Ya(t,r,a,i),Ja(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Js(n,s);a.props=c;var l=a.context,u=n.contextType;o=ai,typeof u==`object`&&u&&(o=ta(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&qs(t,a,r,o),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Gs(t,n,d,r),l=t.memoizedState),(c=Ba||Ks(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ha(e,t),o=t.memoizedProps,u=Js(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ai,typeof l==`object`&&l&&(c=ta(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&qs(t,a,r,c),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof s==`function`&&(Gs(t,n,s,r),p=t.memoizedState),(u=Ba||Ks(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,gc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ra(t,e.child,null,i),t.child=Ra(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Hi(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:xa()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ru),e}function wc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(uo.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Pi){if(a?ao(t):co(t),(e=Ni)?(e=gf(e,Ii),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return vf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=fi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(ao(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),vf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Wi({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(ac||Qi(e,t,n,!1),s=(n&e.childLanes)!==0,ac||s){if(s=Wl,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ni(e,r),wu(s,e,r),ic;_f(c)||Iu(),t=Dc(e,t,n)}else _f(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ni=bf(c.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=li(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=li(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=xa():(l=sa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=li(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=si(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Ra(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xi(e.return,t,n)}function kc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,I(uo,o),oc(e,t,r,n),r=Pi?xi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),eu|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Qi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&$i(e)))}function Nc(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Ji(t,sa,e.memoizedState.cache),Hi();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),I(uo,uo.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:Ji(t,sa,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)ac=!0;else{if(!Mc(e,n)&&!(t.flags&128))return ac=!1,Nc(e,t,n);ac=!!(e.flags&131072)}}else ac=!1,Pi&&t.flags&1048576&&Oi(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)ci(e)?(r=Js(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=sc(null,t,e,r,n);break a}if(a===D){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Js(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ji(t,sa,r),r!==o.cache&&Zi(t,[sa],n,!0),Ja(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=bc(e,t,r,n);break a}if(r!==a){a=_i(Error(i(424)),t),Wi(a),t=bc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ni=bf(e.firstChild),Mi=t,Pi=!0,Fi=null,Ii=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Hi(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=Vf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Pi||(n=t.type,e=t.pendingProps,r=Qd(le.current).createElement(n),r[at]=t,r[ot]=e,Kd(r,n,e),vt(r),t.stateNode=r):t.memoizedState=Vf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&Pi&&(r=t.stateNode=wf(t.type,t.pendingProps,le.current),Mi=t,Ii=!0,a=Ni,uf(t.type)?(xf=a,Ni=bf(r.firstChild)):Ni=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pi&&((a=r=Ni)&&(r=mf(r,t.type,t.pendingProps,Ii),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=bf(r.firstChild),Ii=!1,a=!0)),a||Ri(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,tf(a,o)?r=null:s!==null&&tf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),up._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&Pi&&((e=n=Ni)&&(n=hf(n,t.pendingProps,Ii),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Ri(t)),null;case 13:return wc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ji(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ea(t),a=ta(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return ea(t),r=ta(sa),e===null?(a=ya(),a===null&&(a=Wl,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Va(t),Ji(t,sa,a)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ji(t,sa,r),r!==a.cache&&Zi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ji(t,sa,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Nu())e.flags|=8192;else throw ka=Ta,Ca}}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!np(t)){if(Nu())e.flags|=8192;else throw ka=Ta,Ca}}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:R(),e.lanes|=t,iu|=t)}function zc(e,t){if(!Pi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Vc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bc(t),null;case 1:return Bc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Yi(sa),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ui())),Bc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(Bc(t),Ic(t,a,null,r,n)):(Bc(t),Lc(t,o))):o?o===e.memoizedState?(Bc(t),t.flags&=-16777217):(Fc(t),Bc(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),Bc(t),Ic(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}e=se.current,Vi(t)?zi(t,e):(e=wf(a,r,n),t.stateNode=e,Fc(t))}return Bc(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}if(o=se.current,Vi(t))zi(t,o);else{var s=Qd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[at]=t,o[ot]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return Bc(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Vi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Ri(t,!0)}else e=Qd(e).createTextNode(r),e[at]=t,t.stateNode=e}return Bc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Vi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[at]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),e=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(i(558))}return Bc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Vi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[at]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),a=!1}else a=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),Bc(t),null);case 4:return fe(),e===null&&Nd(t.stateNode.containerInfo),Bc(t),null;case 10:return Yi(t.type),Bc(t),null;case 19:if(F(uo),r=t.memoizedState,r===null)return Bc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)zc(r,!1);else{if($l!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ui(n,e),n=n.sibling;return I(uo,uo.current&1|2),Pi&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>uu&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Pi)return Bc(t),null}else 2*De()-r.renderingStartTime>uu&&n!==536870912&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Bc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=uo.current,I(uo,a?n&1|2:n&1),Pi&&Di(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Bc(t),t.subtreeFlags&6&&(t.flags|=8192)):Bc(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&F(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),Bc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Hc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(uo),null;case 4:return fe(),null;case 10:return Yi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&F(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function Uc(e,t){switch(Ai(t),t.tag){case 3:Yi(sa),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:F(uo);break;case 10:Yi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&F(va);break;case 24:Yi(sa)}}function Wc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ed(t,t.return,e)}}function Gc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ed(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ed(t,t.return,e)}}function Kc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){ed(e,e.return,t)}}}function qc(e,t,n){n.props=Js(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ed(e,t,n)}}function Jc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ed(e,t,n)}}function Yc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ed(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ed(e,t,n)}else n.current=null}}function Xc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ed(e,e.return,t)}}function Zc(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[ot]=t}catch(t){ed(e,e.return,t)}}function Qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function $c(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qt));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[at]=e,t[ot]=n}catch(t){ed(e,e.return,t)}}var rl=!1,il=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,sl=null;function cl(e,t){if(e=e.containerInfo,Xd=yp,e=Er(e),Dr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},yp=!1,sl=t;sl!==null;)if(t=sl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,sl=e;else for(;sl!==null;){switch(t=sl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Js(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){ed(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:pf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,sl=e;break}sl=t.return}}function ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&Wc(5,n);break;case 1:if(wl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ed(n,n.return,e)}else{var i=Js(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ed(n,n.return,e)}}}r&64&&Kc(n),r&512&&Jc(n,n.return);break;case 3:if(wl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Za(e,t)}catch(e){ed(n,n.return,e)}}break;case 27:t===null&&r&4&&nl(n);case 26:case 5:wl(e,n),t===null&&r&4&&Xc(n),r&512&&Jc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&hl(e,n);break;case 13:wl(e,n),r&4&&gl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=id.bind(null,n),yf(e,n))));break;case 22:if(r=n.memoizedState!==null||rl,!r){t=t!==null&&t.memoizedState!==null||il,i=rl;var a=il;rl=r,(il=t)&&!a?El(e,n,!!(n.subtreeFlags&8772)):wl(e,n),rl=i,il=a}break;case 30:break;default:wl(e,n)}}function ul(e){var t=e.alternate;t!==null&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dl=null,fl=!1;function pl(e,t,n){for(n=n.child;n!==null;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:il||Yc(n,t),pl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:il||Yc(n,t);var r=dl,i=fl;uf(n.type)&&(dl=n.stateNode,fl=!1),pl(e,t,n),Tf(n.stateNode),dl=r,fl=i;break;case 5:il||Yc(n,t);case 6:if(r=dl,i=fl,dl=null,pl(e,t,n),dl=r,fl=i,dl!==null){if(fl)try{(dl.nodeType===9?dl.body:dl.nodeName===`HTML`?dl.ownerDocument.body:dl).removeChild(n.stateNode)}catch(e){ed(n,t,e)}else try{dl.removeChild(n.stateNode)}catch(e){ed(n,t,e)}}break;case 18:dl!==null&&(fl?(e=dl,df(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gp(e)):df(dl,n.stateNode));break;case 4:r=dl,i=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=i;break;case 0:case 11:case 14:case 15:Gc(2,n,t),il||Gc(4,n,t),pl(e,t,n);break;case 1:il||(Yc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&qc(n,t,r)),pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:il=(r=il)||n.memoizedState!==null,pl(e,t,n),il=r;break;default:pl(e,t,n)}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gp(e)}catch(e){ed(t,t.return,e)}}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gp(e)}catch(e){ed(t,t.return,e)}}function _l(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(i(435,e.tag))}}function vl(e,t){var n=_l(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ad.bind(null,e,t);t.then(r,r)}})}function yl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(uf(c.type)){dl=c.stateNode,fl=!1;break a}break;case 5:dl=c.stateNode,fl=!1;break a;case 3:case 4:dl=c.stateNode.containerInfo,fl=!0;break a}c=c.return}if(dl===null)throw Error(i(160));ml(o,s,a),dl=null,fl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xl(t,e),t=t.sibling}var bl=null;function xl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yl(t,e),Sl(e),r&4&&(Gc(3,e,e.return),Wc(3,e),Gc(5,e,e.return));break;case 1:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&64&&rl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=bl;if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ft]||o[at]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Kd(o,r,n),o[at]=e,vt(o),r=o;break a;case`link`:var s=$f(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Kd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=$f(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Kd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[at]=e,vt(o),r=o}e.stateNode=r}else ep(a,e.type,e.stateNode)}else e.stateNode=Jf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Zc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?ep(a,e.type,e.stateNode):Jf(a,r,e.memoizedProps))}break;case 27:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),n!==null&&r&4&&Zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){ed(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Zc(e,a,n===null?a:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(yl(t,e),Sl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){ed(e,e.return,t)}}break;case 3:if(Qf=null,a=bl,bl=Of(t.containerInfo),yl(t,e),bl=a,Sl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gp(t.containerInfo)}catch(t){ed(e,e.return,t)}al&&(al=!1,Cl(e));break;case 4:r=bl,bl=Of(e.stateNode.containerInfo),yl(t,e),Sl(e),bl=r;break;case 12:yl(t,e),Sl(e);break;case 31:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 13:yl(t,e),Sl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(cu=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=rl,d=il;if(rl=u||a,il=d||l,yl(t,e),il=d,rl=u,Sl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||rl||il||Tl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){ed(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){ed(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ff(m,!0):ff(l.stateNode,!1)}catch(e){ed(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,vl(e,n))));break;case 19:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 30:break;case 21:break;default:yl(t,e),Sl(e)}}function Sl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;tl(e,$c(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),tl(e,$c(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;el(e,$c(e),s);break;default:throw Error(i(161))}}catch(t){ed(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ll(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gc(4,t,t.return),Tl(t);break;case 1:Yc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&qc(t,t.return,n),Tl(t);break;case 27:Tf(t.stateNode);case 26:case 5:Yc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:El(i,a,n),Wc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ed(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Xa(c[i],s)}catch(e){ed(r,r.return,e)}}n&&o&64&&Kc(a),Jc(a,a.return);break;case 27:nl(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&Xc(a),Jc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&hl(i,a);break;case 13:El(i,a,n),n&&o&4&&gl(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Jc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&la(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&Wc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e)));break;case 12:if(i&2048){kl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){ed(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:jl(a,o,s,c,i),Wc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&rp(n,bl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=bl;bl=Of(e.stateNode.containerInfo),Pl(e,t,n),bl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Gc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;sl!==null;){var n=sl;switch(n.tag){case 0:case 11:case 15:Gc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,sl=r;else a:for(n=e;sl!==null;){r=sl;var i=r.sibling,a=r.return;if(ul(r),r===n){sl=null;break a}if(i!==null){i.return=a,sl=i;break a}sl=a}}}var Vl={getCacheForType:function(e){var t=ta(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ta(sa).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,Ul=0,Wl=null,Gl=null,Kl=0,ql=0,Jl=null,Yl=!1,Xl=!1,Zl=!1,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=null,ou=null,su=!1,cu=0,lu=0,uu=1/0,du=null,fu=null,pu=0,mu=null,hu=null,gu=0,_u=0,vu=null,yu=null,bu=0,xu=null;function Su(){return Ul&2&&Kl!==0?Kl&-Kl:M.T===null?nt():xd()}function Cu(){if(ru===0){if(!(Kl&536870912)||Pi){var e=We;We<<=1,!(We&3932160)&&(We=262144),ru=e}else ru=536870912}return e=ro.current,e!==null&&(e.flags|=32),ru}function wu(e,t,n){(e===Wl&&(ql===2||ql===9)||e.cancelPendingCommit!==null)&&(ju(e,0),Ou(e,Kl,ru,!1)),z(e,n),(!(Ul&2)||e!==Wl)&&(e===Wl&&(!(Ul&2)&&(tu|=n),$l===4&&Ou(e,Kl,ru,!1)),pd(e))}function Tu(e,t,n){if(Ul&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Je(e,t),a=r?zu(e,t):Lu(e,t,!0),o=r;do{if(a===0){Xl&&!r&&Ou(e,t,0,!1);break}if(n=e.current.alternate,o&&!Du(n)){a=Lu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=au;var l=c.current.memoizedState.isDehydrated;if(l&&(ju(c,s).flags|=256),s=Lu(c,s,!1),s!==2){if(Zl&&!l){c.errorRecoveryDisabledLanes|=o,tu|=o,a=4;break a}o=ou,ou=a,o!==null&&(ou===null?ou=o:ou.push.apply(ou,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ju(e,0),Ou(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ou(r,t,ru,!Yl);break a;case 2:ou=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=cu+300-De(),10<a)){if(Ou(r,t,ru,!Yl),qe(r,0,!0)!==0)break a;gu=t,r.timeoutHandle=af(Eu.bind(null,r,n,ou,du,su,t,ru,tu,iu,Yl,o,`Throttled`,-0,0),a);break a}Eu(r,n,ou,du,su,t,ru,tu,iu,Yl,o,null,-0,0)}break}while(1);pd(e)}function Eu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Fl(t,a,d);var m=(a&62914560)===a?cu-De():(a&4194048)===a?lu-De():0;if(m=ap(d,m),m!==null){gu=a,e.cancelPendingCommit=m(Ku.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Ou(e,a,o,!l);return}}Ku(e,t,a,n,r,i,o,s,c)}function Du(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!xr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ou(e,t,n,r){t&=~nu,t&=~tu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function ku(){return Ul&6?!0:(md(0,!1),!1)}function Au(){if(Gl!==null){if(ql===0)var e=Gl.return;else e=Gl,qi=Ki=null,Mo(e),Ma=null,Na=0,e=Gl;for(;e!==null;)Uc(e.alternate,e),e=e.return;Gl=null}}function ju(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,of(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),gu=0,Au(),Wl=e,Gl=n=li(e.current,null),Kl=t,ql=0,Jl=null,Yl=!1,Xl=Je(e,t),Zl=!1,iu=ru=nu=tu=eu=$l=0,ou=au=null,su=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ze(r),a=1<<i;t|=e[i],r&=~a}return Ql=t,$r(),n}function Mu(e,t){mo=null,M.H=Vs,t===Sa||t===wa?(t=Aa(),ql=3):t===Ca?(t=Aa(),ql=4):ql=t===ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Jl=t,Gl===null&&($l=1,Qs(e,_i(t,e.current)))}function Nu(){var e=ro.current;return e===null?!0:(Kl&4194048)===Kl?io===null:(Kl&62914560)===Kl||Kl&536870912?e===io:!1}function Pu(){var e=M.H;return M.H=Vs,e===null?Vs:e}function Fu(){var e=M.A;return M.A=Vl,e}function Iu(){$l=4,Yl||(Kl&4194048)!==Kl&&ro.current!==null||(Xl=!0),!(eu&134217727)&&!(tu&134217727)||Wl===null||Ou(Wl,Kl,ru,!1)}function Lu(e,t,n){var r=Ul;Ul|=2;var i=Pu(),a=Fu();(Wl!==e||Kl!==t)&&(du=null,ju(e,t)),t=!1;var o=$l;a:do try{if(ql!==0&&Gl!==null){var s=Gl,c=Jl;switch(ql){case 8:Au(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=ql;if(ql=0,Jl=null,Uu(e,s,c,l),n&&Xl){o=0;break a}break;default:l=ql,ql=0,Jl=null,Uu(e,s,c,l)}}Ru(),o=$l;break}catch(t){Mu(e,t)}while(1);return t&&e.shellSuspendCounter++,qi=Ki=null,Ul=r,M.H=i,M.A=a,Gl===null&&(Wl=null,Kl=0,$r()),o}function Ru(){for(;Gl!==null;)Vu(Gl)}function zu(e,t){var n=Ul;Ul|=2;var r=Pu(),a=Fu();Wl!==e||Kl!==t?(du=null,uu=De()+500,ju(e,t)):Xl=Je(e,t);a:do try{if(ql!==0&&Gl!==null){t=Gl;var o=Jl;b:switch(ql){case 1:ql=0,Jl=null,Uu(e,t,o,1);break;case 2:case 9:if(Ea(o)){ql=0,Jl=null,Hu(t);break}t=function(){ql!==2&&ql!==9||Wl!==e||(ql=7),pd(e)},o.then(t,t);break a;case 3:ql=7;break a;case 4:ql=5;break a;case 7:Ea(o)?(ql=0,Jl=null,Hu(t)):(ql=0,Jl=null,Uu(e,t,o,7));break;case 5:var s=null;switch(Gl.tag){case 26:s=Gl.memoizedState;case 5:case 27:var c=Gl;if(s?np(s):c.stateNode.complete){ql=0,Jl=null;var l=c.sibling;if(l!==null)Gl=l;else{var u=c.return;u===null?Gl=null:(Gl=u,Wu(u))}break b}}ql=0,Jl=null,Uu(e,t,o,5);break;case 6:ql=0,Jl=null,Uu(e,t,o,6);break;case 8:Au(),$l=6;break a;default:throw Error(i(462))}}Bu();break}catch(t){Mu(e,t)}while(1);return qi=Ki=null,M.H=r,M.A=a,Ul=n,Gl===null?(Wl=null,Kl=0,$r(),$l):0}function Bu(){for(;Gl!==null&&!Te();)Vu(Gl)}function Vu(e){var t=Pc(e.alternate,e,Ql);e.memoizedProps=e.pendingProps,t===null?Wu(e):Gl=t}function Hu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,Kl);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,Kl);break;case 5:Mo(t);default:Uc(n,t),t=Gl=ui(t,Ql),t=Pc(n,t,Ql)}e.memoizedProps=e.pendingProps,t===null?Wu(e):Gl=t}function Uu(e,t,n,r){qi=Ki=null,Mo(t),Ma=null,Na=0;var i=t.return;try{if(rc(e,i,t,n,Kl)){$l=1,Qs(e,_i(n,e.current)),Gl=null;return}}catch(t){if(i!==null)throw Gl=i,t;$l=1,Qs(e,_i(n,e.current)),Gl=null;return}t.flags&32768?(Pi||r===1?e=!0:Xl||Kl&536870912?e=!1:(Yl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Gu(t,e)):Wu(t)}function Wu(e){var t=e;do{if(t.flags&32768){Gu(t,Yl);return}e=t.return;var n=Vc(t.alternate,t,Ql);if(n!==null){Gl=n;return}if(t=t.sibling,t!==null){Gl=t;return}Gl=t=e}while(t!==null);$l===0&&($l=5)}function Gu(e,t){do{var n=Hc(e.alternate,e);if(n!==null){n.flags&=32767,Gl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Gl=e;return}Gl=e=n}while(e!==null);$l=6,Gl=null}function Ku(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Zu();while(pu!==0);if(Ul&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Qr,Xe(e,n,o,s,c,l),e===Wl&&(Gl=Wl=null,Kl=0),hu=t,mu=e,gu=n,_u=o,vu=a,yu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,od(je,function(){return Qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=Ul,Ul|=4;try{cl(e,t,n)}finally{Ul=s,N.p=a,M.T=r}}pu=1,qu(),Ju(),Yu()}}function qu(){if(pu===1){pu=0;var e=mu,t=hu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Ul;Ul|=4;try{xl(t,e);var a=Zd,o=Er(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Tr(s.ownerDocument.documentElement,s)){if(c!==null&&Dr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=wr(s,h),v=wr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yp=!!Xd,Zd=Xd=null}finally{Ul=i,N.p=r,M.T=n}}e.current=t,pu=2}}function Ju(){if(pu===2){pu=0;var e=mu,t=hu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Ul;Ul|=4;try{ll(e,t.alternate,t)}finally{Ul=i,N.p=r,M.T=n}}pu=3}}function Yu(){if(pu===4||pu===3){pu=0,Ee();var e=mu,t=hu,n=gu,r=yu;t.subtreeFlags&10256||t.flags&10256?pu=5:(pu=0,hu=mu=null,Xu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(fu=null),tt(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}gu&3&&Zu(),pd(e),i=e.pendingLanes,n&261930&&i&42?e===xu?bu++:(bu=0,xu=e):bu=0,md(0,!1)}}function Xu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Zu(){return qu(),Ju(),Yu(),Qu()}function Qu(){if(pu!==5)return!1;var e=mu,t=_u;_u=0;var n=tt(gu),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=vu,vu=null;var o=mu,s=gu;if(pu=0,hu=mu=null,gu=0,Ul&6)throw Error(i(331));var c=Ul;if(Ul|=4,Rl(o.current),Al(o,o.current,s,n),Ul=c,md(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{N.p=a,M.T=r,Xu(e,t)}}function $u(e,t,n){t=_i(n,t),t=ec(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(z(e,2),pd(e))}function ed(e,t,n){if(e.tag===3)$u(e,e,n);else for(;t!==null;){if(t.tag===3){$u(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(fu===null||!fu.has(r))){e=_i(n,e),n=tc(2),r=Wa(t,n,2),r!==null&&(nc(n,r,t,e),z(r,2),pd(r));break}}t=t.return}}function td(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Zl=!0,i.add(n),e=nd.bind(null,e,t,n),t.then(e,e))}function nd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Wl===e&&(Kl&n)===n&&($l===4||$l===3&&(Kl&62914560)===Kl&&300>De()-cu?!(Ul&2)&&ju(e,0):nu|=n,iu===Kl&&(iu=0)),pd(e)}function rd(e,t){t===0&&(t=R()),e=ni(e,t),e!==null&&(z(e,t),pd(e))}function id(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rd(e,n)}function ad(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),rd(e,n)}function od(e,t){return Ce(e,t)}var sd=null,cd=null,ld=!1,ud=!1,dd=!1,fd=0;function pd(e){e!==cd&&e.next===null&&(cd===null?sd=cd=e:cd=cd.next=e),ud=!0,ld||(ld=!0,bd())}function md(e,t){if(!dd&&ud){dd=!0;do for(var n=!1,r=sd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,yd(r,a))}else a=Kl,a=qe(r,r===Wl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,yd(r,a))}r=r.next}while(n);dd=!1}}function hd(){gd()}function gd(){ud=ld=!1;var e=0;fd!==0&&rf()&&(e=fd);for(var t=De(),n=null,r=sd;r!==null;){var i=r.next,a=_d(r,t);a===0?(r.next=null,n===null?sd=i:n.next=i,i===null&&(cd=n)):(n=r,(e!==0||a&3)&&(ud=!0)),r=i}pu!==0&&pu!==5||md(e,!1),fd!==0&&(fd=0)}function _d(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=L(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Wl,n=Kl,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(ql===2||ql===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),tt(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=vd.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function vd(e,t){if(pu!==0&&pu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zu()&&e.callbackNode!==n)return null;var r=Kl;return r=qe(e,e===Wl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Tu(e,r,t),_d(e,De()),e.callbackNode!=null&&e.callbackNode===n?vd.bind(null,e):null)}function yd(e,t){if(Zu())return null;Tu(e,t,!0)}function bd(){cf(function(){Ul&6?Ce(ke,hd):gd()})}function xd(){if(fd===0){var e=fa;e===0&&(e=Ue,Ue<<=1,!(Ue&261888)&&(Ue=256)),fd=e}return fd}function Sd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+e)}function Cd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function wd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Sd((i[ot]||null).action),o=r.submitter;o&&(t=(t=o[ot]||null)?Sd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(fd!==0){var e=o?Cd(i,o):new FormData(i);Ds(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Cd(i,o):new FormData(i),Ds(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Td=0;Td<qr.length;Td++){var Ed=qr[Td];Jr(Ed.toLowerCase(),`on`+(Ed[0].toUpperCase()+Ed.slice(1)))}Jr(zr,`onAnimationEnd`),Jr(Br,`onAnimationIteration`),Jr(Vr,`onAnimationStart`),Jr(`dblclick`,`onDoubleClick`),Jr(`focusin`,`onFocus`),Jr(`focusout`,`onBlur`),Jr(Hr,`onTransitionRun`),Jr(Ur,`onTransitionStart`),Jr(Wr,`onTransitionCancel`),Jr(Gr,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),xt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),xt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Dd=`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(` `),Od=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Dd));function kd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Yr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Yr(e)}i.currentTarget=null,a=c}}}}function Ad(e,t){var n=t[ct];n===void 0&&(n=t[ct]=new Set);var r=e+`__bubble`;n.has(r)||(Pd(t,e,2,!1),n.add(r))}function jd(e,t,n){var r=0;t&&(r|=4),Pd(n,e,r,t)}var Md=`_reactListening`+Math.random().toString(36).slice(2);function Nd(e){if(!e[Md]){e[Md]=!0,yt.forEach(function(t){t!==`selectionchange`&&(Od.has(t)||jd(t,!1,e),jd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Md]||(t[Md]=!0,jd(`selectionchange`,!1,t))}}function Pd(e,t,n,r){switch(Ep(t)){case 2:var i=bp;break;case 8:i=xp;break;default:i=Sp}n=i.bind(null,t,n,e),i=void 0,!ln||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Fd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=mt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}on(function(){var r=a,i=en(n),s=[];a:{var c=Kr.get(e);if(c!==void 0){var l=bn,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case zr:case Br:case Vr:l=An;break;case Gr:l=Vn;break;case`scroll`:case`scrollend`:l=Sn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=sn(m,p),g!=null&&d.push(Id(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==$t&&(u=n.relatedTarget||n.fromElement)&&(mt(u)||u[st]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?mt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:gt(l),h=u==null?c:gt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,mt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Rd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&zd(s,c,l,d,!1),u!==null&&f!==null&&zd(s,f,u,d,!0)}}a:{if(c=r?gt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c)){if(ur)v=yr;else{v=_r;var y=gr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Jt(r.elementType)&&(v=lr):v=vr;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?gt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(kr=y,Ar=r,jr=null);break;case`focusout`:jr=Ar=kr=null;break;case`mousedown`:Mr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Mr=!1,Nr(s,n,i);break;case`selectionchange`:if(Or)break;case`keydown`:case`keyup`:Nr(s,n,i)}var b;if(Gn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else $n?Zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&($n||x!==`onCompositionStart`?x===`onCompositionEnd`&&$n&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,$n=!0)),y=Ld(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Qn(n),b!==null&&(x.data=b)))),(b=qn?er(e,n):tr(e,n))&&(x=Ld(r,`onBeforeInput`),0<x.length&&(y=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),wd(s,e,r,n,i)}kd(s,t)})}function Id(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ld(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=sn(e,n),i!=null&&r.unshift(Id(e,i,a)),i=sn(e,t),i!=null&&r.push(Id(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Rd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=sn(n,a),l!=null&&o.unshift(Id(n,l,c))):i||(l=sn(n,a),l!=null&&o.push(Id(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Bd=/\r\n?/g,Vd=/\u0000|\uFFFD/g;function Hd(e){return(typeof e==`string`?e:``+e).replace(Bd,` 9`).replace(Vd,``)}function Ud(e,t){return t=Hd(t),Hd(e)===t}function Wd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Ot(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Wd(e,t,`name`,a.name,a,null),Wd(e,t,`formEncType`,a.formEncType,a,null),Wd(e,t,`formMethod`,a.formMethod,a,null),Wd(e,t,`formTarget`,a.formTarget,a,null)):(Wd(e,t,`encType`,a.encType,a,null),Wd(e,t,`method`,a.method,a,null),Wd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`onScroll`:r!=null&&Ad(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ad(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Zt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Ad(`beforetoggle`,e),Ad(`toggle`,e),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Yt.get(n)||n,Dt(e,n,r))}}function Gd(e,t,n,r,a,o){switch(n){case`style`:qt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&Ad(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ad(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ot]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Dt(e,n,r)}}}function Kd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Ad(`error`,e),Ad(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Wd(e,t,o,s,n,null)}}a&&Wd(e,t,`srcSet`,n.srcSet,n,null),r&&Wd(e,t,`src`,n.src,n,null);return;case`input`:Ad(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Wd(e,t,r,d,n,null)}}zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Ad(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Wd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(e,!!r,t,!1);return;case`textarea`:for(s in Ad(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Wd(e,t,s,c,n,null)}Ut(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Wd(e,t,l,r,n,null)}return;case`dialog`:Ad(`beforetoggle`,e),Ad(`toggle`,e),Ad(`cancel`,e),Ad(`close`,e);break;case`iframe`:case`object`:Ad(`load`,e);break;case`video`:case`audio`:for(r=0;r<Dd.length;r++)Ad(Dd[r],e);break;case`image`:Ad(`error`,e),Ad(`load`,e);break;case`details`:Ad(`toggle`,e);break;case`embed`:case`source`:case`link`:Ad(`error`,e),Ad(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Wd(e,t,u,r,n,null)}return;default:if(Jt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Gd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Wd(e,t,c,r,n,null))}function qd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Wd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Wd(e,t,p,m,r,f)}}Rt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Wd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Wd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Wd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Wd(e,t,s,a,r,o)}Ht(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Wd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Wd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Wd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Wd(e,t,u,p,r,m)}return;default:if(Jt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Gd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Gd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Wd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Wd(e,t,f,p,r,m)}function Jd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Yd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Jd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Xd=null,Zd=null;function Qd(e){return e.nodeType===9?e:e.ownerDocument}function $d(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function ef(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function tf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nf=null;function rf(){var e=window.event;return e&&e.type===`popstate`?e!==nf&&(nf=e,!0):(nf=null,!1)}var af=typeof setTimeout==`function`?setTimeout:void 0,of=typeof clearTimeout==`function`?clearTimeout:void 0,sf=typeof Promise==`function`?Promise:void 0,cf=typeof queueMicrotask==`function`?queueMicrotask:sf===void 0?af:function(e){return sf.resolve(null).then(e).catch(lf)};function lf(e){setTimeout(function(){throw e})}function uf(e){return e===`head`}function df(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tf(e.ownerDocument.body)}n=i}while(n);Gp(t)}function ff(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:pf(n),pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function mf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[ft])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=bf(e.nextSibling),e===null)break}return null}function hf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=bf(e.nextSibling),e===null))return null;return e}function gf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=bf(e.nextSibling),e===null))return null;return e}function _f(e){return e.data===`$?`||e.data===`$~`}function vf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function yf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function bf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var xf=null;function Sf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return bf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Cf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function wf(e,t,n){switch(t=Qd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Tf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pt(e)}var Ef=new Map,Df=new Set;function Of(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kf=N.d;N.d={f:Af,r:jf,D:Pf,C:Ff,L:If,m:Lf,X:zf,S:Rf,M:Bf};function Af(){var e=kf.f(),t=ku();return e||t}function jf(e){var t=ht(e);t!==null&&t.tag===5&&t.type===`form`?ks(t):kf.r(e)}var Mf=typeof document>`u`?null:document;function Nf(e,t,n){var r=Mf;if(r&&typeof t==`string`&&t){var i=Lt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Df.has(i)||(Df.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Pf(e){kf.D(e),Nf(`dns-prefetch`,e,null)}function Ff(e,t){kf.C(e,t),Nf(`preconnect`,e,t)}function If(e,t,n){kf.L(e,t,n);var r=Mf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(e)+`"]`;var a=i;switch(t){case`style`:a=Hf(e);break;case`script`:a=Kf(e)}Ef.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Ef.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Uf(a))||t===`script`&&r.querySelector(qf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Lf(e,t){kf.m(e,t);var n=Mf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Lt(r)+`"][href="`+Lt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Kf(e)}if(!Ef.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Ef.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(qf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),vt(r),n.head.appendChild(r)}}}function Rf(e,t,n){kf.S(e,t,n);var r=Mf;if(r&&e){var i=_t(r).hoistableStyles,a=Hf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Uf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Ef.get(a))&&Xf(e,n);var c=o=r.createElement(`link`);vt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Yf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zf(e,t){kf.X(e,t);var n=Mf;if(n&&e){var r=_t(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=f({src:e,async:!0},t),(t=Ef.get(i))&&Zf(e,t),a=n.createElement(`script`),vt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t){kf.M(e,t);var n=Mf;if(n&&e){var r=_t(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Ef.get(i))&&Zf(e,t),a=n.createElement(`script`),vt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t,n,r){var a=(a=le.current)?Of(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Hf(n.href),n=_t(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Hf(n.href);var o=_t(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Uf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Ef.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ef.set(e,n),o||Gf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Kf(n),n=_t(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Hf(e){return`href="`+Lt(e)+`"`}function Uf(e){return`link[rel="stylesheet"][`+e+`]`}function Wf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Gf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),vt(t),e.head.appendChild(t))}function Kf(e){return`[src="`+Lt(e)+`"]`}function qf(e){return`script[async]`+e}function Jf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,vt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),vt(r),Kd(r,`style`,a),Yf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Hf(n.href);var o=e.querySelector(Uf(a));if(o)return t.state.loading|=4,t.instance=o,vt(o),o;r=Wf(n),(a=Ef.get(a))&&Xf(r,a),o=(e.ownerDocument||e).createElement(`link`),vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,Yf(o,n.precedence,e),t.instance=o;case`script`:return o=Kf(n.src),(a=e.querySelector(qf(o)))?(t.instance=a,vt(a),a):(r=n,(a=Ef.get(o))&&(r=f({},n),Zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),vt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Yf(r,n.precedence,e));return t.instance}function Yf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Qf=null;function $f(e,t,n){if(Qf===null){var r=new Map,i=Qf=new Map;i.set(n,r)}else i=Qf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ft]||a[at]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function ep(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function tp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function np(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function rp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Hf(r.href),a=t.querySelector(Uf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,vt(a);return}a=t.ownerDocument||t,r=Wf(r),(i=Ef.get(i))&&Xf(r,i),a=a.createElement(`link`),vt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Yd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:C,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=si(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function pp(e){return e?(e=ai,e):ai}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(wu(n,e,t),Ga(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=ni(e,67108864);t!==null&&wu(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=Su();t=et(t);var n=ni(e,t);n!==null&&wu(n,e,t),gp(e,t)}}var yp=!0;function bp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,Sp(e,t,n,r)}finally{N.p=a,M.T=i}}function xp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,Sp(e,t,n,r)}finally{N.p=a,M.T=i}}function Sp(e,t,n,r){if(yp){var i=Cp(r);if(i===null)Fd(e,t,r,wp,n),Fp(e,r);else if(Lp(i,e,t,n,r))r.stopPropagation();else if(Fp(e,r),t&4&&-1<Pp.indexOf(e)){for(;i!==null;){var a=ht(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ke(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ze(o);s.entanglements[1]|=c,o&=~c}pd(a),!(Ul&6)&&(uu=De()+500,md(0,!1))}}break;case 31:case 13:s=ni(a,2),s!==null&&wu(s,a,2),ku(),gp(a,2)}if(a=Cp(r),a===null&&Fd(e,t,r,wp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Fd(e,t,r,null,n)}}function Cp(e){return e=en(e),Tp(e)}var wp=null;function Tp(e){if(wp=null,e=mt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wp=e,null}function Ep(e){switch(e){case`beforetoggle`: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`toggle`: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 2;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`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var Dp=!1,Op=null,kp=null,Ap=null,jp=new Map,Mp=new Map,Np=[],Pp=`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`.split(` `);function Fp(e,t){switch(e){case`focusin`:case`focusout`:Op=null;break;case`dragenter`:case`dragleave`:kp=null;break;case`mouseover`:case`mouseout`:Ap=null;break;case`pointerover`:case`pointerout`:jp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mp.delete(t.pointerId)}}function Ip(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ht(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lp(e,t,n,r,i){switch(t){case`focusin`:return Op=Ip(Op,e,t,n,r,i),!0;case`dragenter`:return kp=Ip(kp,e,t,n,r,i),!0;case`mouseover`:return Ap=Ip(Ap,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jp.set(a,Ip(jp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mp.set(a,Ip(Mp.get(a)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=mt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,rt(e.priority,function(){vp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,rt(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$t=r,n.target.dispatchEvent(r),$t=null}else return t=ht(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){zp(e)&&n.delete(t)}function Vp(){Dp=!1,Op!==null&&zp(Op)&&(Op=null),kp!==null&&zp(kp)&&(kp=null),Ap!==null&&zp(Ap)&&(Ap=null),jp.forEach(Bp),Mp.forEach(Bp)}function Hp(e,n){e.blockedOn===n&&(e.blockedOn=null,Dp||(Dp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vp)))}var Up=null;function Wp(e){Up!==e&&(Up=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Up===e&&(Up=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Tp(r||n)===null)continue;break}var a=ht(n);a!==null&&(e.splice(t,3),t-=3,Ds(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gp(e){function t(t){return Hp(t,e)}Op!==null&&Hp(Op,e),kp!==null&&Hp(kp,e),Ap!==null&&Hp(Ap,e),jp.forEach(t),Mp.forEach(t);for(var n=0;n<Np.length;n++){var r=Np[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Np.length&&(n=Np[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&Np.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ot]||null;if(typeof a==`function`)o||Wp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ot]||null)s=o.formAction;else if(Tp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wp(n)}}}function Kp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function qp(e){this._internalRoot=e}Jp.prototype.render=qp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mp(n,Su(),e,t,null,null)},Jp.prototype.unmount=qp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),ku(),t[st]=null}};function Jp(e){this._internalRoot=e}Jp.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Np.length&&t!==0&&t<Np[n].priority;n++);Np.splice(n,0,e),n===0&&Rp(e)}};var Yp=n.version;if(Yp!==`19.2.8`)throw Error(i(527,Yp,`19.2.8`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Xp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.8`};
9if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zp.isDisabled&&Zp.supportsFiber)try{Ie=Zp.inject(Xp),Le=Zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ys,s=Xs,c=Zs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fp(e,1,!1,null,null,n,r,null,o,s,c,Kp),e[st]=t.current,Nd(e),new qp(t)}})),b=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=y()})),x=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},S=new class extends x{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},C={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},w=new class{#e=C;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function T(e){setTimeout(e,0)}var E=typeof window>`u`||`Deno`in globalThis;function D(){}function O(e,t){return typeof e==`function`?e(t):e}function k(e){return typeof e==`number`&&e>=0&&e!==1/0}function ee(e,t){return Math.max(e+(t||0)-Date.now(),0)}function A(e,t){return typeof e==`function`?e(t):e}function j(e,t){return typeof e==`function`?e(t):e}function te(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==re(o,t.options))return!1}else if(!N(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ne(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(M(t.options.mutationKey)!==M(a))return!1}else if(!N(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function re(e,t){return(t?.queryKeyHashFn||M)(e)}function M(e){return JSON.stringify(e,(e,t)=>F(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function N(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!N(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!N(e[r],t[r]))return!1;return!0}return!1}var ie=Object.prototype.hasOwnProperty;function ae(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=P(e)&&P(t);if(!r&&!(F(e)&&F(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ie.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ae(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function oe(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function P(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function F(e){if(!I(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!I(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function I(e){return Object.prototype.toString.call(e)===`[object Object]`}function se(e){return new Promise(t=>{w.setTimeout(t,e)})}function ce(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ae(e,t)}function le(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ue(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var de=Symbol();function fe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===de?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function pe(e,t){return typeof e==`function`?e(...t):!!e}function me(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var he=(()=>{let e=()=>E;return{isServer(){return e()},setIsServer(t){e=t}}})();function ge(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var _e=T;function ve(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=_e,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>
9{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var ye=ve(),be=new class extends x{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function xe(e){return Math.min(1e3*2**e,3e4)}function Se(e){return(e??`online`)!==`online`||be.isOnline()}var Ce=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function we(e){let t=!1,n=0,r,i=ge(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Ce(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>S.isFocused()&&(e.networkMode===`always`||be.isOnline())&&e.canRun(),u=()=>Se(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(he.isServer()?0:3),o=e.retryDelay??xe,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),se(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Te=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),k(this.gcTime)&&(this.#e=w.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(he.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(w.clearTimeout(this.#e),this.#e=void 0)}};function Ee(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{me(e,()=>t.signal,()=>n=!0)},u=fe(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?ue:le;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Oe:De,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:De(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function De(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Oe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ke=class extends Te{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Me(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Me(this.options);e.data!==void 0&&(this.setState(je(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ce(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(D).catch(D):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>j(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===de||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
9Count>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>A(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!ee(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=fe(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Ee(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=we({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Ce&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ce){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ae(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...je(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),ye.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ae(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Se(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function je(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Me(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdate
vendor: 4,619 bytes, line 9
9Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ne=class extends x{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=ge(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Fe(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ie(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ie(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof j(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!oe(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Le(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||j(this.options.enabled,this.#t)!==j(t.enabled,this.#t)||A(this.options.staleTime,this.#t)!==A(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||j(this.options.enabled,this.#t)!==j(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return ze(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(D)),t}#g(){this.#b();let e=A(this.options.staleTime,this.#t);if(he.isServer()||this.#r.isStale||!k(e))return;let t=ee(this.#r.dataUpdatedAt,e)+1;this.#d=w.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(he.isServer()||j(this.options.enabled,this.#t)===!1||!k(this.#p)||this.#p===0)&&(this.#f=w.setInterval(()=>{(this.options.refetchIntervalInBackground||S.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(w.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(w.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Fe(e,t),o=i&&Le(e,n,t,r);(a||o)&&(l={...l,...Ae(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=ce(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=ce(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdate
9Count:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Re(e,t),refetch:this.refetch,promise:this.#o,isEnabled:j(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=ge();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a()}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!oe(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){ye.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Pe(e,t){return j(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||j(t.retryOnMount,e)!==!1)}function Fe(e,t){return Pe(e,t)||e.state.data!==void 0&&Ie(e,t,t.refetchOnMount)}function Ie(e,t,n){if(j(t.enabled,e)!==!1&&A(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Re(e,t)}return!1}function Le(e,t,n,r){return(e!==t||j(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Re(e,n)}function Re(e,t){return j(t.enabled,e)!==!1&&e.isStaleByTime(A(t.staleTime,e))}function ze(e,t){return!oe(e.getCurrentResult(),t)}var Be=class extends Te{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ve(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=we({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
9sed:!1,status:`error`}}};this.state=t(this.state),ye.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ve(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var He=class extends x{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Be({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ue(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ue(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ue(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Ue(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>
9t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){ye.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ne(t,e))}findAll(e={}){return this.getAll().filter(t=>ne(e,t))}notify(e){ye.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ye.batch(()=>Promise.all(e.map(e=>e.continue().catch(D))))}};function Ue(e){return e.options.scope?.id}var We=class extends x{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),oe(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&M(t.mutationKey)!==M(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Ve();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){ye.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Ge=class extends x{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??re(r,t),a=this.get(i);return a||(a=new ke({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){ye.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>te(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>te(e,t)):t}notify(e){ye.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ye.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ye.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ke=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ge,this.#t=e.mutationCache||new He,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=S.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=be.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(A(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=O(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}
9setQueriesData(e,t,n){return ye.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;ye.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return ye.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=ye.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(D).catch(D)}invalidateQueries(e,t={}){return ye.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=ye.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(D)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(D)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(A(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(D).catch(D)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(D).catch(D)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return be.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(M(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{N(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(M(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{N(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=re(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===de&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},qe=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Je=o(((e,t)=>{t.exports=qe()})),L=l(m(),1),R=Je(),Ye=L.createContext(void 0),z=e=>{let t=L.useContext(Ye);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Xe=({client:e,children:t})=>(L.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,R.jsx)(Ye.Provider,{value:e,children:t})),Ze=L.createContext(!1),Qe=()=>L.useContext(Ze);Ze.Provider;function $e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var et=L.createContext($e()),tt=()=>
9L.useContext(et),nt=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?pe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},rt=e=>{L.useEffect(()=>{e.clearReset()},[e])},it=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||pe(n,[e.error,r])),at=(e,t)=>t.state.data===void 0,ot=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},st=(e,t)=>e.isLoading&&e.isFetching&&!t,ct=(e,t)=>e?.suspense&&t.isPending,lt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ut(e,t,n){let r=Qe(),i=tt(),a=z(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,ot(o),nt(o,i,s),rt(i);let l=!a.getQueryCache().get(o.queryHash),[u]=L.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(L.useSyncExternalStore(L.useCallback(e=>{let t=f?u.subscribe(ye.batchCalls(e)):D;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),L.useEffect(()=>{u.setOptions(o)},[o,u]),ct(o,d))throw lt(o,u,i);if(it({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!he.isServer()&&st(d,r)&&(l?lt(o,u,i):s?.promise)?.catch(D).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function dt(e,t){return ut(e,Ne,t)}function ft(e,t){return ut({...e,enabled:!0,suspense:!0,throwOnError:at,placeholderData:void 0},Ne,t)}function pt(e){return e}function mt(e,t){let n=z(t),[r]=L.useState(()=>new We(n,e));L.useEffect(()=>{r.setOptions(e)},[r,e]);let i=L.useSyncExternalStore(L.useCallback(e=>r.subscribe(ye.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=L.useCallback((e,t)=>{r.mutate(e,t).catch(D)},[r]);if(i.error&&pe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var ht=L.useLayoutEffect;function gt(e,t,n){L.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function _t(e){let t=L.useRef(null);return L.useImperativeHandle(e,()=>t.current,[]),t}function vt(e){return e[e.length-1]}function yt(e){return typeof e==`function`}function bt(e,t){return yt(e)?e(t):e}var xt=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable;function Ct(e){for(let t in e)if(xt.call(e,t))return!0;return!1}var wt=()=>Object.create(null),Tt=(e,t)=>Et(e,t,wt);function Et(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=At(e)&&At(i);if(!a&&!(Ot(e)&&Ot(i)))return i;let o=a?e:Dt(e);if(!o)return i;let s=a?i:Dt(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:xt.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=Et(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function Dt(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!St.call(e,r))return!1;t.push(r)}return t}function Ot(e){if(!kt(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!kt(n)||!n.hasOwnProperty(`isPrototypeOf`))}function kt(e){return Object.prototype.toString.call(e)===`[object Object]`}function At(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jt(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!jt(e[r],t[r],n))return!1;return!0}if(Ot(e)&&Ot(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!jt(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!jt(e[o],t[o],n)))return!1;return i===a}return!1}var Mt=/[\x00-\x1f\x7f"<>`{}]/g;function Nt(e){return e.replace(Mt,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Pt(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Nt(t)}var Ft=[`http:`,`https:`,`mailto:`,`tel:`];function It(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Lt(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=Pt(e.slice(n,i.index))+i[0],n=t.lastIndex;
9r+=Pt(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function Rt(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function zt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Bt(){throw Error(`Invariant failed`)}function Vt(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var Ht=4,Ut=5;function Wt(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function Gt(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=Wt(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function Kt(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=Gt(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=Jt(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c),m=t?p?t:t.toLowerCase():void 0,h=c?p?c:c.toLowerCase():void 0,g=f===1?i.dynamic:f===3?i.optional:i.wildcard,_=f!==2&&!d&&g?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===m&&e.suffix===h);if(_)n=_;else{let e=Yt(f,r,p,m,h);n=e,e.parent=i,e.depth=a;let t;t=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],t.push(e),t.length===2&&o?.push(t)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=Jt(r);e.kind=Ut,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=Jt(r);e.kind=Ht,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)Kt(e,t,r,c,i,a,o,s)}function qt(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Jt(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Yt(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Xt(e,t){let n=Jt(`/`),r=new Uint16Array(6),i=[];for(let t of e)Kt(!1,r,t,1,n,0,i);for(let e of i)e.sort(qt);t.masksTree=n,t.flatCache=Vt(1e3)}function Zt(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=nn(e,t.masksTree);return t.flatCache.set(e,r),r}function Qt(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Jt(`/`),Kt(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),nn(r,o,n)}function $t(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=nn(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=an(a.route)),t.matchCache.set(r,a),a}function en(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function tn(e,t=!1,n){let r=Jt(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;Kt(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&Bt(),o[e.id]=e,c!==0&&e.path){let t=en(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(qt);return{processedTree:{segmentTree:r,singleCache:Vt(1e3),matchCache:Vt(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function nn(e,t,n=!1){let r=e.split(`/`),i=sn(e,r,t,n);if(!i)return null;let[a]=rn(e,r,i);return{route:i.node.route,rawParams:a}}function rn(e,t,n){let r=on(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===Ht)break;
9if(u.kind===Ut){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function an(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function on(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function sn(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!vt(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!dn(l,n))continue;if(i.parse){if(!un(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Ht&&dn(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===Ht||i.kind===2)&&dn(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(un(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&ln(f,o))return n;dn(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(_||!(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)))){if(a){if(_)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+cn(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+cn(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+cn(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+cn(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function cn(e,t){return 2**(e-t-1)}function ln(e,t){return e===2**(t-1)-1}function un(e,t,n){let r,i;try{[r,i]=rn(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function dn(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ht)>(e.node.kind===Ht)||t.node.kind===Ht==(e.node.kind===Ht)&&t.node.depth>e.node.depth)))}function fn(e){return pn(e.filter(e=>e!==void 0).join(`/`))}function pn(e){return e.replace(/\/{2,}/g,`/`)}function mn(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function hn(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function gn(e){return hn(mn(e))}function _n(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}
9function vn(e,t,n){return _n(e,n)===_n(t,n)}function yn({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t===`.`,a=t.startsWith(`/`),o;if(r){o=a?t:i?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(i)s=e.split(`/`);else if(a)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&vt(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.length>1?s.pop():s=[``]:r===`.`||s.push(r)}}s.length>1&&(vt(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=pn(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function bn(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function xn(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Cn(e,n)).join(`/`):Cn(r,n):r}function Sn({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=Gt(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=xn(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=xn(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=xn(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Cn(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function wn(e){return e?.isNotFound===!0}function Tn(){try{return sessionStorage}catch{return}}var En=`tsr-scroll-restoration-v1_3`,Dn=Tn();function On(){try{return JSON.parse(Dn?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function kn(){try{Dn?.setItem(En,JSON.stringify(An))}catch{}}var An=On(),jn=`data-scroll-restoration-id`,Mn=e=>e.state.__TSR_key||e.href;function Nn(e){let t=e.getAttribute(jn);if(t)return`[${jn}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Pn=!1,Fn=`window`;function In(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ln(e){let t=new Set;for(let n of e){if(n===Fn)continue;let e=In(n);e&&t.add(e)}return t}function Rn(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Mn,a=new Set,o=e=>{let t=An[e]||={};for(let e of a)e===document?t[Fn]={scrollX,scrollY}:e.isConnected&&(t[Nn(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Pn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Pn||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),kn()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=An[d];if(e){let t=An[u];for(let n in e){if(n===Fn){if(s)continue}else{let e=In(n);if(!e||s&&o&&(l??=Ln(o),l.has(e)))continue}t||=An[u]={},t[n]??=e[n]}}}Pn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Ln(o));let t=e&&i&&c,s=r.restoring?An[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Fn){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=In(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Pn=!1}}))}function zn(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}
9function Bn(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Vn(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Bn(r):Array.isArray(t)?t.push(Bn(r)):n[e]=[t,Bn(r)]}return n}var Hn=/^(?:\s|["[{\d-]|fa|nu|tr)/,Un=Gn(JSON.parse),Wn=Kn(JSON.stringify,JSON.parse);function Gn(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Vn(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Kn(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!Hn.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=zn(e,r);return t?`?${t}`:``}}var qn=`__root__`;function Jn(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Yn(e){return e instanceof Response&&!!e.options}function Xn(e){return{input:({url:t})=>{for(let n of e)t=Qn(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=$n(e[n],t);return t}}}function Zn(e){let t=gn(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=fn([`/`,t,e.pathname]),e)}}function Qn(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function $n(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function er(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{zt(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var tr=`__TSR_index`,nr=`popstate`,rr=`beforeunload`;function ir(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=cr(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[tr];i=ar(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[tr];i=ar(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[tr]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function ar(e,t){t||={};let n=lr();return{...t,key:n,__TSR_key:n,[tr]:e}}function or(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>cr(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=lr();t.history.replaceState({[tr]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)}
9,v=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=cr(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[tr]-l.state[tr],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=ir({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(rr,x,{capture:!0}),t.removeEventListener(nr,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(rr,x,{capture:!0}),t.addEventListener(nr,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function sr(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function cr(e,t){let n=sr(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=lr();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[tr]:0,key:a,__TSR_key:a}}}function lr(){return(Math.random()+1).toString(36).substring(7)}function ur(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function dr(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function fr({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function pr(e,t,n,r){for(let i of t){if(r?.()===!1)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r?.()===!1)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var mr=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=bn(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:or()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=Vt(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=er(this.latestLocation,e),Rn(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=gn(a);t&&t!==`/`&&e.push(Zn({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Xn(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=tn(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&Xt(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>
9{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:Lt(e).path,external:!1,searchStr:o,search:Tt(t?.search,i),hash:Lt(r.slice(1)).path,state:Et(t?.state,a)}}let o=new URL(i,this.origin),s=Qn(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:Lt(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:Tt(t?.search,c),hash:Lt(s.hash.slice(1)).path,state:Et(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>yn({base:e,to:t.includes(`//`)?pn(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=$t(hn(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=t.to?`${t.to}`:void 0,o=r[2],s=Object.assign(Object.create(null),r[3]),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=br(t.params,s),d=this.routesByPath[hn(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let[e,t,n]=this.getMatchedRoutes(l);f=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&Ct(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:Lt(Sn({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,_r(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=vr(m,t,f,e._includeValidateSearch),m=Tt(o,m);let h=this.options.stringifySearch(m),g=t.hash===!0?n.hash:t.hash?bt(t.hash,n.hash):void 0,_=g?`#${g}`:``,v=t.state===!0?n.state:t.state?bt(t.state,n.state):{};v=Et(n.state,v);let y=`${p}${h}${_}`,b,x,S=!1;if(this.rewrite){let e=new URL(y,this.origin),t=$n(this.rewrite,e);b=e.href.replace(e.origin,``),t.origin===this.origin?x=t.pathname+t.search+t.hash:(x=t.href,S=!0)}else b=Rt(y),x=b;return{publicHref:x,href:b,pathname:p,search:m,searchStr:h,state:v,hash:g??``,external:S,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=Zt(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=br(s,n);r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=hn(this.latestLocation.href)===hn(n.href)&&jt(fr(n.state),fr(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,_redirects:a,href:o,...s}={})=>
9{if(o){let t=this.history.location.state.__TSR_index,n=cr(o,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);s.to=Qn(this.rewrite,r).pathname,s.search=this.options.parseSearch(n.search),s.hash=n.hash.slice(1)}let c=this.buildLocation({...s,_includeValidateSearch:!0});a&&(c._redirects=a),this._pendingLocation=c;let l=this.commitLocation({...c,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),l},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(It(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await fi(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(dr(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&ur(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=(e.options._builtLocation??this.buildLocation(e.options)).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&It(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=wr,this.preloadRoute=e=>pi(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Qt(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!jt(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?jt(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams}
9,this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Wn,parseSearch:e.parseSearch??Un,protocolAllowlist:e.protocolAllowlist??Ft}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=an(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:hn(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?yr(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=_r(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof hr||(r=new hr(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let{interpolatedPath:g,usedParams:_}=Sn({path:i.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),v=i.id+g+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(_,d);let x;if(!b)try{xr(i,d)}catch(e){if(x=wn(e)||Yn(e)?e:new gr(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:Tt(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=ur(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:g,updatedAt:Date.now(),search:y?Tt(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?Et(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?Tt(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=vt(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=vt(a),c={...e.search};for(let e of a)try{Object.assign(c,_r(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=Object.assign(Object.create(null),o);for(let t of a)try{xr(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}},hr=class extends Error{},gr=class extends Error{};function _r(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new hr(`Async validation not supported`);if(n.issues)throw new hr(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function vr(e,t,n,r){let i=[];for(let e of n){let t=e.options;`search`in t?t.search?.middlewares&&i.push(...t.search.middlewares):(t.preSearchFilters||t.postSearchFilters)&&i.push(({search:e,next:n})=>{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;n&&i.push(({search:e,next:t,meta:i})=>{let a=t(e);if(r)try{let e=_r(n,a);if(i&&e)for(let t in e)t in a||(i.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=bt(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function yr(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return qn}
9function br(e,t){return e===!1||e===null?Object.create(null):(e??!0)===!0?t:Object.assign(t,bt(e,t))}function xr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Sr(e,t){return e.options[t]?.preload?.()}function Cr(e,t){let n=Sr(e,`component`),r=Sr(e,`pendingComponent`),i=t&&r?r.then(t):r;return t&&!r&&t(),n&&i?Promise.all([n,i]).then(()=>{}):n??i}function wr(e,t,n){let r=()=>t===!1?void 0:t?Sr(e,t):Cr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Tr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var Er=0,Dr=1,Or=2,kr=3,Ar=4;function jr(e){return typeof e[0]==`number`}function Mr(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).finally(()=>t.removeEventListener(`abort`,i))})}function Nr(e,t){return e.routesById[t.routeId]}function Pr(e,t,n){return Yn(e)?[kr,e]:wn(e)?(e.routeId||=n,[Or,e]):(t&&typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),t?[Dr,e]:[Er,e])}function Fr(e,t){let n=Pr(t,!0,e.id);if(n[0]!==Dr)return n;try{e.options.onError?.(n[1])}catch(t){n=Pr(t,!0,e.id)}return n}function Ir(e,t,n){return n[0].signal.aborted||!n[2]()?(n[0].abort(),[Ar]):Fr(e,t)}function Lr(e,t){return n=>e.navigate({...n,_fromLocation:t})}async function Rr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[4];for(let t=n[7]??0;t<r;t++){let r=s[t],i=Nr(e,r);r.abortController=n[0];let u=s[t-1]?.context??e.options.context??{},d={params:r.params,location:o,navigate:Lr(e,o),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:i.id},f=u;try{let e=r._ctx;!e&&i.options.context&&(e=r._ctx=i.options.context({...d,deps:r.loaderDeps,context:u})||{}),f={...u,...e},r.context=f}catch(a){return Br(e,r),[t,Ir(i,a,n)]}if(c.aborted||!n[2]())return n[0].abort(),[t,[Ar]];let p=r.paramsError??r.searchError;if(p!==void 0)return Br(e,r),[t,Ir(i,p,n)];let m=i.options.beforeLoad;if(!m)continue;let h={...d,search:r.search,context:f,...e.options.additionalContext},g=r.status;g===`success`&&t>=a&&(r.status=`pending`),n[8]?.();try{Ur(e,r,`beforeLoad`,n[0]);let a=await Mr(m(h),c);if(!n[2]())return n[0].abort(),[t,[Ar]];let o=Pr(a,!1,i.id);if(o[0]!==Er)return Br(e,r),[t,o];r.context={...f,...a}}catch(a){return Br(e,r),[t,Ir(i,a,n)]}finally{g===`success`&&r.status===`pending`&&(r.status=`success`),Ur(e,r,!1,n[0])}}i()}function zr(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Br(e,t){let n=t._flight;t._flight=void 0,zr(e,t,n)?.abort()}function Vr(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=zr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Hr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Ur(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Wr(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:Lr(e,s),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Gr(e,t,n,r,i,a,o,s){let c=s.signal;if(c.aborted)return[Ar];if(!i)return[Er,void 0];let l=n._flight;Ur(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Wr(e,t,n,r,s,a,o))).then(e=>Pr(e,!1,r.id),e=>Pr(e,!0,r.id)).then(t=>(t[0]!==Er&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Dr&&l[2]?Fr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],await Mr(l[0],c)}catch(t){if(t!==c)throw t;return Br(e,n),[Ar]}finally{Ur(e,n,!1,s)}}function Kr(e,t,n){t[0]===Er?(e.loaderData=t[1],e.error=void 0,e.status=`success`,e.invali
9d=!1,e.updatedAt=Date.now(),e.preload=n):t[0]!==kr&&(e.status=`success`,e.error=void 0,e.invalid=!0)}function qr(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Br(e,r)}function Jr(e,t){return t[0]===Dr||t[0]===Or?{...e,status:t[0]===Dr?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Yr(e,t,n,r,i,a,o){let s=t[1][n],c=Nr(e,s),l=!!a[4],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Wr(e,t,s,c,a[0],i,l))),a[2]()||(a[0].abort(),p=[Ar])),!p){if(s.status!==`success`)f=!0;else{let t=a[4]||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[6]||s.cause===`enter`||a[3].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(t){s.invalid=!0,Br(e,s),p=Ir(c,t,a)}let m=c.options.loader,h=typeof m==`function`?m:m?.handler,g=(!l||c.options.preload!==!1)&&m?e._flights?.get(s.id):void 0;g===s._flight||p?g=void 0:g&&!f&&!l&&d===void 0?f=!0:f||(g=void 0);let _=!!(m&&f&&s.status===`success`&&!l&&!a[5]&&((typeof m==`function`?void 0:m?.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),v=f&&(!l||c.options.preload!==!1),y=v&&!_&&(s.status!==`success`||!!m),b=c.lazyFn&&c._lazy!==!0?a[8]:void 0;if(v&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),g&&g[2]++,y){let t=s._flight;s._flight=g,zr(e,s,t)?.abort(),s.status===`success`&&n>=o&&(s.status=`pending`),a[8]?.()}v||(s.isFetching=!1);let x=(p?Promise.resolve(p):y?Gr(e,t,s,c,h,i,l,a[0]):Promise.resolve([Er,s.loaderData])).then(t=>(y&&(Kr(s,t,l),t[0]===Er&&(m&&!a[0].signal.aborted&&qr(e,s,u),s.status=`pending`)),t)),S=Mr(Promise.resolve().then(()=>wr(c,void 0,b)),a[0].signal).then(()=>void 0,e=>[n,Ir(c,e,a)]).then(e=>x.then(t=>(y&&!e&&t[0]===Er&&s.status===`pending`&&a[2]()&&(s.status=`success`,a[8]?.()),e)));if(r.push([n,x,S]),!_)return x.then(e=>Jr(s,e));let C={...s,status:`pending`,preload:!1,_flight:g};s.invalid=!1,s.isFetching=`loader`;let w=Gr(e,t,C,c,h,i,!1,a[0]).then(e=>(s.isFetching=!1,Kr(C,e,!1),e));return(t[2]??=[]).push([n,w,S,C]),w.then(e=>Jr(C,e))}async function Xr(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Nr(e,t[n]),a=wr(i,!1);if(a)try{await Mr(a,r)}catch(e){if(e===r)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Zr(e,t){t[2]&&=(Vr(e,t[2].map(e=>e[3])),void 0)}async function Qr(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=kr)throw[a,t];!i&&t[0]!==Er&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===kr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}async function $r(e,t,n,r,i,a,o){let s=t[1],c=await a,l=!1,u=s.findIndex(e=>e._notFound),d=t=>t[1][0]===Or?Xr(e,s,t,r.signal):t[0],f=u<0?s.length:u;if((c?.[1][0]??0)>=kr)f=0;else if(c){f=c[2]??=await d(c);for(let e of n){if(e[0]>=f)break;let t=await e[1];if(t[0]!==Er&&t[0]<kr&&!(`loaderData`in s[e[0]])){c=[e[0],t],f=c[2]=await d(c);break}}}for(let e of n){if(e[0]>=f)break;let t=await e[2];if(t){c=t;break}}if((c?.[1][0]??0)>=kr){let n=c[1];if(n[0]!==kr||n[1].options.reloadDocument||i<20)return Zr(e,t),n;l=!0,c=[0,[Dr,Error(`Too many redirects`)]]}let p=c?c[2]??await d(c):u;if(p>=0){let i=c?.[1],a=i?.[0],u=s[p],d=i?.[1],f=()=>{i&&(u._notFound=void 0,a===Dr?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};f();let m=Nr(e,u);try{await Mr(i?Promise.resolve().then(()=>wr(m,a===Dr?`errorComponent`:`notFoundComponent`)):Promise.all([wr(m),wr(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal)return Zr(e,t),[Ar]}i?l&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Zr(e,t),Vr(e,s),f()):(u.status=`success`,o?.())}return t}async function ei(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Nr(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await Mr(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function ti(e,t,n,r){let i=[t,n],a=e.stores.matches.get(),o=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&o>=0){let t=await Xr(e,i[1],void 0,r[0].signal,o);t!==o&&(n[o]._notFound=void 0,n[t]._notFound=!0),o=t}let s=o<0?n.length:o+1,c=0;for(;c<s&&c!==o;){let e=n[c],t=r[3][c],i=a[c];if(t?.id!==e.id||t.status!==`success`||t._notFound||e.preload||i?.id!==e.id||i.status!==`success`||i._notFound)break;c++}let l=[],u=r[7]??0,d=u?Promise.resolve(i[1][u-1]):void 0,f=()=>{for(let t=u;t<s&&!r[0].signal.aborted;t++)d=Yr(e,i,t,l,d,r,c)},p=await Rr(e,i,r,s,f,c);if(p&&(r[5]=!0,s=p[0],p[1][0]===Or?(p[2]=await Xr(e,i[1],p,r[0].signal),s=Math.min(s,p[2]+1)):p[
91][0]>=kr&&(s=0),f()),r[2]()&&!r[4]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let m;try{let t=$r(e,i,l,r[0],r[1],Qr(l,p,i[2]),r[8]);i[2]?.length&&(i[3]=Qr(i[2],void 0,void 0,t.then(e=>jr(e)?0:Tr(e[1]).length,()=>0))),m=await t}catch(t){throw Zr(e,i),t}return jr(m)?m:ei(e,m,r[0].signal,r[7]===m[1].length?r[7]:0)}function ni(e,t){if(e._tx!==t)return;let n=e._pending,r=!1,i=n?.[0][3][n[1]]?.id;n?.[0]!==t&&(n&&t[3][n[1]]?.id===i?(n[0]=t,r=!0):(clearTimeout(n?.[3]),e._pending=n=void 0));let a=t[3],o=e.stores.matches.get(),s=-1,c,l,u,d=!1;for(let t=0;t<a.length;t++){let n=a[t],r=n.status===`success`;if(d=o[t]?.id===n.id&&o[t]?.status===`pending`,r&&!d)continue;let i=Nr(e,n);if(c=r&&d||n.invalid?0:i.options.pendingMs??e.options.defaultPendingMs,u=i.options.pendingComponent??e.options.defaultPendingComponent,!u||typeof c!=`number`||c===1/0)return;s=t,l=i.options.pendingMinMs??e.options.defaultPendingMinMs??0;break}if(s<0)return;let f=a[s].id;if((!n||n[1]!==s||i!==f)&&(clearTimeout(n?.[3]),e._pending=n=[t,s,d?Date.now()+l:t[4]+c,void 0,d?Promise.resolve(!0):void 0,u]),n[4]&&!r&&n[5]===u)return;if(n[5]=u,!n[4]){clearTimeout(n[3]);let r=n[2]-Date.now();if(r>0){n[3]=setTimeout(()=>ni(e,t),r);return}n[2]=0}let p=a.map(e=>({...e,_flight:void 0}));p[s].status=`pending`;let m=e.startTransition(()=>e.stores.setMatches(p),p).then(t=>(t&&e._pending===n&&n[4]===m&&!n[2]&&(n[2]=Date.now()+l),t));n[4]=m}function ri(e,t){let n=e._pending;n?.[0]===t&&(clearTimeout(n[3]),e._pending=void 0)}function ii(e,t){e._committed=t,e.stores.setMatches(t)}function ai(e,t){Vr(e,t[1]),Zr(e,t)}function oi(e,t,n,r){let i=e._committed,a=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=Tr(n).length,s=new Map,c=Date.now();for(let t of[...i,...a.values()]){if(t.status!==`success`||n.some((e,n)=>e.id===t.id&&(n<o||e.status===`success`)))continue;let r=Nr(e,t);!r.options.loader||c-t.updatedAt>=(t.preload?r.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:r.options.gcTime??e.options.defaultGcTime??3e5)||s.set(t.id,a.get(t.id)===t?t:{...t,_flight:void 0,isFetching:!1,context:{}})}t[3]=[],e._cache=s,ii(e,n),Vr(e,[...a.values(),...i],[...n,...s.values()]),pr(e,i,n,()=>e._tx===t)}async function si(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;n=e._tx}}async function ci(e,t,n){await e.navigate({...n.options,replace:!0,ignoreBlocker:!0,_redirects:t[1]+1})}function li(e,t){ri(e,t),t[0].abort(),Vr(e,t[3]),t[3]=[],e._tx===t&&(e.batch(()=>{e.stores.status.set(`idle`),e.stores.setMatches(e._committed)}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0))}async function ui(e,t,n,r,i){let a=n.map(e=>({...e}));Hr(a);for(let t of r)Br(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await $r(e,o,r,t[0],t[1],i)}catch(t){throw Vr(e,a),t}if(jr(s)){Vr(e,a),s[0]===kr&&e._tx===t&&e._committed===n&&await ci(e,t,s[1]);return}let c=await ei(e,s,t[0].signal);if(e._tx!==t||e._committed!==n){Vr(e,c[1]);return}for(let t of c[1]){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Br(e,n))}ii(e,c[1]),Vr(e,n,c[1])}async function di(e,t,n,r,i,a){let o=[t[0],t[1],()=>e._tx===t&&!!t[3].length,e._committed,void 0,i,n,a,r],s=await ti(e,t[2],t[3],o);if(jr(s)){s[0]===kr&&e._tx===t?(ri(e,t),Vr(e,t[3]),t[3]=[],e._tx===t&&await ci(e,t,s[1])):li(e,t);return}let c=e._pending;if(c?.[0]===t&&(clearTimeout(c[3]),c[4])){let n=t[0].signal,r=!1;try{r=await Mr(c[4],n)}catch(e){if(e!==n)throw e}if(r&&e._pending===c&&c[0]===t){let e=c[2]-Date.now();if(e>0){try{await Mr(new Promise(t=>{c[3]=setTimeout(t,e)}),n)}catch{}clearTimeout(c[3])}}}if(e._tx!==t){ri(e,t),ai(e,s);return}let l=t[2],u=dr(l,e.stores.resolvedLocation.get()),d=s[2];await e.startViewTransition(async()=>{if(e._tx!==t){ai(e,s);return}let n=await e.startTransition(()=>{ri(e,t),oi(e,t,s[1],a),e._tx===t&&(e.emit({type:`onLoad`,...u}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...u}))},s[1]);if(e._tx!==t){Zr(e,s);return}d?.length&&ui(e,t,s[1],d,s[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(l),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...u}),n&&e._tx===t&&e.emit({type:`onRendered`,...u})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function fi(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),u.signal.aborted){await si(e,n);return}let f=dr(a,r);if(e.emit({type:`onBeforeNavigate`,...f}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...f}),u.signal.aborted){await si(e,n);return}let p=i.href===a.href,m,h=u;try{m=e.matchRoutes(a,{_controller:u}),Hr(m)}catch(t){if(u.abort(),!Yn(t)){await si(e),e._commitPromise?.resolve(),e._commitPromise=void 0;return}await e.navigate({...t.options,replace:!0,ignoreBlocker:!0}),await si(e,n);return}let g=l?c[1](m):void 0;if(g?h=l:l?.abort(),u.signal.aborted){Vr(e,m),await si(e,n);return}e._preflight=void 0;let _=[h,s,a,m,Date.now(),Promise.resolve().then(()=>di(e,_,p,()=>ni(e,_),t?.sync,g)).catch(()=>{e._tx===_&&li(e,_)})];if(e._tx=_,n){for(let t of e.stores.matches.get()){if(e._tx!==_)break;t.isFetching&&Ur(e,t,!1)}n[0].abort(),Vr(e,n[3],_[3],!0)}if(e._tx!==_){Vr(e,_[3]),_[3]=[],await si(e,_);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),!r&&!m.some(e=>e._notFound)&&ni(e,_);try{await _[5]}finally{await si(e,_)}}async function pi(e,t,n=0){if(n>20)return;let r=t._builtLocation??e.buildLocation(t),i=e._committed,a=new AbortController,o;try{o=e.matchRoutes(r,{_controller:a}),Hr(o)}catch(e){a.abort(),wn(e)||console.error(e);return}(e._preloads??=new Map).set(a,o);let s;try{let t;try{t=await ti(e,r,o,[a,n,()=>!0,i,!0])}finally{s=e._preloads.delete(a),Vr(e,o),a.abort()}if(!jr(t))return t[1];if(s&&t[0]===kr&&!t[1].options.reloadDocument)return pi(e,{...t[1].options,_fromLocation:r},n+1)}catch(e){wn(e)||console.error(e)}}var mi=`Error preloading route! âï¸`,hi=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=qn:this.parentRoute||Bt();let r=n?qn:t?.path;r&&r!==`/`&&(r=mn(r));let i=t?.id||r,a=n?qn:fn([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=fn([`/`,a]));let o=a===`__root__`?`/`:fn([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=hn(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Jn({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},gi=class extends hi{constructor(e){super(e)}};function _i(e){return(0,R.jsx)(vi,{...e})}var vi=class extends L.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?L.createElement(this.props.errorComponent??yi,{error:e,reset:this.reset}):this.props.children}};function yi({error:e}){let[t,n]=L.useState(!1);return(0,R.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,R.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,R.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,R.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,R.jsx)(`div`,{children:(0,R.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`}
9,children:e.message?(0,R.jsx)(`code`,{children:e.message}):null})}):null]})}function bi({children:e,fallback:t=null}){return(0,R.jsx)(L.Fragment,{children:xi()?e:t})}function xi(){return L.useSyncExternalStore(Si,()=>!0,()=>!1)}function Si(){return()=>{}}var Ci=L.createContext(null);function wi(e){return L.useContext(Ci)}var Ti=L.createContext(void 0),Ei=L.createContext(void 0),Di=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(Di||{});function Oi({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function ki(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Ai=[],ji=0,{link:Mi,unlink:Ni,propagate:Pi,checkDirty:Fi,shallowPropagate:Ii}=Oi({update(e){return e._update()},notify(e){Ai[Ri++]=e,e.flags&=~Di.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Di.Mutable|Di.Dirty,Hi(e))}}),Li=0,Ri=0,zi,Bi=0;function Vi(e){try{++Bi,e()}finally{--Bi||Ui()}}function Hi(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Ni(n,e)}function Ui(){if(!(Bi>0)){for(;Li<Ri;){let e=Ai[Li];Ai[Li++]=void 0,e.notify()}Li=0,Ri=0}}function Wi(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Di.None:Di.Mutable,get(){return zi!==void 0&&Mi(i,zi,ji),i._snapshot},subscribe(e){let t=ki(e),n={current:!1},r=Gi(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=zi,o=t?.compare??Object.is;if(n)zi=i,++ji,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=Di.Mutable|Di.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{zi=a,n&&(i.flags&=~Di.RecursedCheck),Hi(i)}}};return n?(i.flags=Di.Mutable|Di.Dirty,i.get=function(){let e=i.flags;if(e&Di.Dirty||e&Di.Pending&&Fi(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Ii(e)}}else e&Di.Pending&&(i.flags=e&~Di.Pending);return zi!==void 0&&Mi(i,zi,ji),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Pi(e),Ii(e),Ui())}},i}function Gi(e){let t=()=>{let t=zi;zi=n,++ji,n.depsTail=void 0,n.flags=Di.Watching|Di.RecursedCheck;try{return e()}finally{zi=t,n.flags&=~Di.RecursedCheck,Hi(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Di.Watching|Di.RecursedCheck,notify(){let e=this.flags;e&Di.Dirty||e&Di.Pending&&Fi(this.deps,this)?t():this.flags=Di.Watching},stop(){this.flags=Di.None,this.depsTail=void 0,Hi(this)}};return t(),n}var Ki=o((e=>{var t=m();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),qi=o(((e,t)=>{t.exports=Ki()})),Ji=o((e=>{var t=m(),n=qi();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Yi=o(((e,t)=>{t.exports=Ji()})),Xi=Yi();function Zi(e,t){return e===t}function Qi(e,t,n=Zi){let r=(0,L.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,L.useCallback)(()=>e?.get(),[e]);return(0,Xi.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var $i={};function ea(e,t){let n=L.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=Et(n.current,i):i}}function ta(e){let t=wi(),n=L.useContext(e.from?Ei:Ti),r=e.from??n,i=t.stores.getMatchStore(r),a=ea(e,t),o=Qi(i,e=>e?a(e):$i);if(o!==$i)return o;(e.shouldThrow??!0)&&Bt()}function na(e){return ta({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ra(e){let{select:t,...n}=e;return ta({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function ia(e){return ta({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function aa(e){return ta({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function oa(e){let t=wi();return L.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function sa(e){return ta({...e,select:t=>e.select?e.select(t.context):t.context})}function ca(e){let t=L.useRef(e);return jt(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function la(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function ua(e,t,n){if(e?.external)return It(e.href,n)?void 0:e.href;if(!xa(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),It(t,n)?void 0:t}catch{}}function da(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!vn(e.pathname,t.pathname,r))return!1}else{let n=_n(e.pathname,r),i=_n(t.pathname,r);
9if(!(n.startsWith(i)&&(n.length===i.length||n[i.length]===`/`)))return!1}return(n?.includeSearch??!0)&&!jt(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function fa(e,t){let n=wi(),r=_t(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:C,onMouseEnter:w,onMouseLeave:T,onTouchStart:E,ignoreBlocker:D,params:O,search:k,hash:ee,state:A,mask:j,reloadDocument:te,unsafeRelative:ne,from:re,_fromLocation:M,...N}=e,ie=xi(),ae=ca(e.search),oe=ca(e.params),P=ca(o),F=L.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,ae,oe,e.state,e.mask,e.unsafeRelative]),I=L.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...F}),r=ba(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,v),i=ua(r,s,n.protocolAllowlist);return[r?.href,i,da(e,t,P,n.basepath,ie,i!==void 0)]},[P,v,ie,F,n,s]),[se,ce,le]=Qi(n.stores.location,I,la),ue=le?bt(i,{})??ma:pa,de=le?pa:bt(a,{})??pa,fe=[b,ue.className,de.className].filter(Boolean).join(` `),pe=(y||ue.style||de.style)&&{...y,...ue.style,...de.style},me=L.useRef(!1),he=e.reloadDocument||ce||v?!1:c??n.options.defaultPreload,ge=l??n.options.defaultPreloadDelay??0,_e=L.useCallback(()=>{n.preloadRoute(F).catch(e=>{console.warn(e),console.warn(mi)})},[n,F]),ve=L.useCallback(e=>{if(!e){va(r);return}if(!(e.isIntersecting??he===`intent`)){e.isIntersecting===!1&&va(r);return}if(!ge){_e();return}_a.has(r)||_a.set(r,setTimeout(()=>{_a.delete(r),_e()},ge))},[_e,r,he,ge]);gt(r,ve,he!==`viewport`),L.useEffect(()=>{me.current||he===`render`&&(_e(),me.current=!0)},[_e,he]);let ye=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!v&&!Ca(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...F,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:D}))};if(ce)return{...N,ref:r,href:ce,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...C&&{onFocus:C},...w&&{onMouseEnter:w},...T&&{onMouseLeave:T},...E&&{onTouchStart:E}};let be=()=>{he===`intent`&&_e()},xe=()=>{he===`intent`&&va(r)};return{...N,...ue,...de,href:se,ref:r,onClick:ya([x,ye]),onBlur:ya([S,xe]),onFocus:ya([C,ve]),onMouseEnter:ya([w,ve]),onMouseLeave:ya([T,xe]),onTouchStart:ya([E,be]),disabled:!!v,target:_,...pe&&{style:pe},...fe&&{className:fe},...v&&ha,...le&&ga}}var pa={},ma={className:`active`},ha={role:`link`,"aria-disabled":!0},ga={"data-status":`active`,"aria-current":`page`},_a=new WeakMap,va=e=>{clearTimeout(_a.get(e)),_a.delete(e)},ya=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function ba(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function xa(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Sa=L.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=fa(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return L.createElement(`a`,t,o)}return L.createElement(n,a,o)});function Ca(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var wa=class extends hi{constructor(e){super(e),this.useMatch=e=>ta({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>sa({...e,from:this.id}),this.useSearch=e=>aa({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>ia({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ra({...e,from:this.id}),this.useLoaderData=e=>na({...e,from:this.id}),this.useNavigate=()=>oa({from:this.fullPath}),this.Link=L.forwardRef((e,t)=>(0,R.jsx)(Sa,{ref:t,from:this.fullPath,...e}))}};function Ta(e){return new wa(e)}function Ea(){return e=>Oa(e)}var Da=class extends gi{constructor(e){super(e),this.useMatch=e=>ta({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>sa({...e,from:this.id}),this.useSearch=e=>aa({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>ia({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ra({...e,from:this.id}),this.useLoaderData=e=>na({...e,from:this.id}),this.useNavigate=()=>oa({from:this.fullPath}),this.Link=L.forwardRef((e,t)=>
9(0,R.jsx)(Sa,{ref:t,from:this.fullPath,...e}))}};function Oa(e){return new Da(e)}function ka(e){let t=wi(),n=`not-found-${Qi(t.stores.location,e=>e.pathname)}-${Qi(t.stores.status,e=>e)}`;return(0,R.jsx)(_i,{getResetKey:()=>n,onCatch:(t,n)=>{if(wn(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(wn(t))return e.fallback?.(t);throw t},children:e.children})}function Aa(){return(0,R.jsx)(`p`,{children:`Not Found`})}function ja(e){return(0,R.jsx)(R.Fragment,{children:e.children})}function Ma(e,t,n){return t.options.notFoundComponent?(0,R.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,R.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,R.jsx)(Aa,{})}function Na(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,R.jsx)(n,{}):null}var Pa=(e,t)=>e[0]===t[0]&&e[1]===t[1],Fa=L.memo(function({routeId:e}){let t=wi();return(0,R.jsx)(Ia,{router:t,match:Qi(t.stores.getMatchStore(e),e=>e)})});function Ia({router:e,match:t}){let n=e.routesById[t.routeId],r=Na(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)?L.Suspense:ja,l=i?_i:ja,u=o?ka:ja;return(0,R.jsxs)(n.isRoot?n.options.shellComponent??ja:ja,{children:[(0,R.jsx)(Ti.Provider,{value:t.routeId,children:(0,R.jsx)(c,{fallback:r,children:(0,R.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(wn(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,R.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return L.createElement(o,e)},children:s?(0,R.jsx)(bi,{fallback:r,children:(0,R.jsx)(La,{match:t})}):(0,R.jsx)(La,{match:t})})})})}),null]})}var La=L.memo(function({match:e}){let t=wi(),n=e.routeId,r=t.routesById[n],i=L.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=L.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,R.jsx)(e,{},i):(0,R.jsx)(Ra,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t._tx)throw t._tx[5];return Na(t,r)}if(e.status===`notFound`)return Ma(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Ra=L.memo(function(){let e=wi(),t=L.useContext(Ti),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Qi(a,e=>[!!e._notFound,e.error],Pa),i=Qi(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Ma(e,e.routesById[t],r);if(!i)return null;let a=(0,R.jsx)(Fa,{routeId:i});return t===`__root__`?(0,R.jsx)(L.Suspense,{fallback:Na(e),children:a}):a});function za(e,t){let n=e[1];e.length=0,n?.(t)}function Ba({t:e}){let t=wi(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise((a,o)=>{za(n,!1),n.push(i,a),e(t),L.startTransition(()=>{try{r()}catch(e){n[1]===a&&(n.length=0),o(e)}})}),ht(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(hn(r.publicHref)!==hn(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...dr(a,a)})}):t._tx||t.load().catch(console.error),e},[t,t.history]),null}function Va(){let e=wi(),t=e.routesById[qn],n=Na(e,t),r=e.ssr?ja:L.Suspense,i=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Ba,{t:L.useState()[1]}),(0,R.jsx)(r,{fallback:n,children:(0,R.jsx)(Ha,{})})]});return e.options.InnerWrap?(0,R.jsx)(e.options.InnerWrap,{children:i}):i}function Ha(){let e=wi(),t=e._rendered,n=Qi(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;ht(()=>{t[0]===n&&za(t,!0)},[t,n]);let a=i?(0,R.jsx)(Fa,{routeId:i}):null;return(0,R.jsx)(Ti.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,R.jsx)(_i,{getResetKey:()=>r,onCatch:void 0,children:a})})}var Ua=e=>({createMutableStore:Wi,createReadonlyStore:Wi,batch:Vi}),Wa=e=>new Ga(e),Ga=class extends mr{constructor(e){super(e,Ua)}};function Ka({router:e,children:t,...n}
9){Ct(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,R.jsx)(Ci.Provider,{value:e,children:t});return e.options.Wrap?(0,R.jsx)(e.options.Wrap,{children:r}):r}function qa({router:e,...t}){return(0,R.jsx)(Ka,{router:e,...t,children:(0,R.jsx)(Va,{})})}function Ja(e,t){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if(`shouldBlockFn`in e)return e;if(typeof e==`function`){let n=!!(t??!0);return{shouldBlockFn:async()=>n?await e():!1,enableBeforeUnload:n,withResolver:!1}}let n=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>n&&r!==void 0?await r():n,enableBeforeUnload:n,withResolver:r===void 0}}function Ya(e,t){let{shouldBlockFn:n,enableBeforeUnload:r=!0,disabled:i=!1,withResolver:a=!1}=Ja(e,t),o=wi(),{history:s}=o,[c,l]=L.useState({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return L.useEffect(()=>i?void 0:s.block({blockerFn:async e=>{function t(e){let t=o.parseLocation(e),[,n,r]=o.getMatchedRoutes(t.pathname);return r===void 0?{routeId:`__notFound__`,fullPath:t.pathname,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}:{routeId:r.id,fullPath:r.fullPath,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}}let r=t(e.currentLocation),i=t(e.nextLocation);if(r.routeId===`__notFound__`&&i.routeId!==`__notFound__`)return!1;let s=await n({action:e.action,current:r,next:i});if(!a)return s;if(!s)return!1;let c=await new Promise(t=>{l({status:`blocked`,current:r,next:i,action:e.action,proceed:()=>t(!1),reset:()=>t(!0)})});return l({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),c},enableBeforeUnload:r}),[n,r,i,a,s,o]),c}function Xa(e){let t=wi({warn:e?.router===void 0}),n=e?.router||t;return Qi(n.stores.__store,ea(e,n))}function Za({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Qa(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var $a=[],eo=0,{link:to,unlink:no,propagate:ro,checkDirty:io,shallowPropagate:ao}=Za({update(e){return e._update()},notify(e){$a[so++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,uo(e))}}),oo=0,so=0,co,lo=0;function uo(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=no(n,e)}function fo(){if(!(lo>0)){for(;oo<so;){let e=$a[oo];$a[oo++]=void 0,e.notify()}oo=0,so=0}}function po(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return co!==void 0&&to(i,co,eo),i._snapshot},subscribe(e){let t=Qa(e),n={current:!1},r=mo(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=co,o=t?.compare??Object.is;if(n)co=i,++eo,i.depsTail=void 0;else if(e===void 0)return!1;
9n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{co=a,n&&(i.flags&=-5),uo(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&io(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&ao(e)}}else e&32&&(i.flags=e&-33);return co!==void 0&&to(i,co,eo),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ro(e),ao(e),fo())}},i}function mo(e){let t=()=>{let t=co;co=n,++eo,n.depsTail=void 0,n.flags=6;try{return e()}finally{co=t,n.flags&=-5,uo(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&io(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,uo(this)}};return t(),n}var ho=class{constructor(e,t){this.atom=po(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(Qa(e))}},go=l(b()),_o=`calendhub.session`,vo=`calendhub.refresh_token`,yo=typeof window<`u`;function bo(){if(!yo)return!1;try{return window.localStorage.getItem(_o)===`1`}catch{return!1}}function xo(e){if(yo)try{e?window.localStorage.setItem(_o,`1`):window.localStorage.removeItem(_o)}catch{}}function So(){if(yo)try{window.localStorage.removeItem(vo)}catch{}}So();var Co=new ho({accessToken:null,expiresAt:null,status:bo()?`unknown`:`anonymous`,endedReason:null});function wo(e){xo(!0),Co.setState(()=>({accessToken:e.access_token,expiresAt:e.expires_at,status:`authenticated`,endedReason:null}))}function To(e=`logout`){xo(!1),Co.setState(()=>({accessToken:null,expiresAt:null,status:`anonymous`,endedReason:e}))}function Eo(){Co.setState(e=>e.endedReason===null?e:{...e,endedReason:null})}function Do(){return Co.state}yo&&window.addEventListener(`storage`,e=>{if(e.key===_o){if(e.newValue===null){Co.setState(e=>({...e,accessToken:null,expiresAt:null,status:`anonymous`}));return}Co.setState(e=>({...e,status:e.status===`anonymous`?`unknown`:e.status}))}});var Oo=class extends Error{status;code;fields;requestId;constructor(e,t,n=null){super(t.message),this.name=`ApiError`,this.status=e,this.code=t.code,this.fields=t.fields??{},this.requestId=n}get isAuthError(){return this.status===401}get isValidationError(){return this.status===422}};function ko(e){return e instanceof Oo}var Ao=[`LINK_LIMIT_REACHED`,`CONNECTION_LIMIT_REACHED`];function jo(e){return ko(e)&&e.status===409&&Ao.includes(e.code)}async function Mo(e){let t=e.headers.get(`X-Request-ID`),n={code:`INTERNAL`,message:`Something went wrong.`};try{let t=await e.json();typeof t==`object`&&t&&`error`in t&&typeof t.error==`object`&&t.error!==null&&(n=t.error)}catch{}return new Oo(e.status,n,t)}var No=`https://api.calendhub.com`;async function Po(e,t,n,r){let i={Accept:r};t.body!==void 0&&(i[`Content-Type`]=`application/json`),n!==null&&(i.Authorization=`Bearer ${n}`);try{return await fetch(`${t.baseUrl??No}${e}`,{method:t.method??`GET`,headers:i,body:t.body===void 0?void 0:JSON.stringify(t.body),signal:t.signal,...t.credentials===void 0?{}:{credentials:t.credentials}})}catch(e){throw e instanceof DOMException&&e.name===`AbortError`?e:new Oo(0,{code:`NETWORK`,message:`Could not reach the server. Check your connection.`})}}var Fo=null;function Io(){return Fo??=Lo().finally(()=>{Fo=null}),Fo}async function Lo(){if(Do().status===`anonymous`)return null;let e;try{e=await Po(`/api/v1/auth/refresh`,{method:`POST`,auth:!1,baseUrl:No,credentials:`include`},null,`application/json`)}catch{return null}if(!e.ok)return To((await Mo(e)).code===`TOKEN_REUSED`?`reused`:`expired`),null;let t=await e.json();return wo(t.tokens),t.tokens.access_token}async function Ro(e,t,n){let r=t.auth??!0,i=r?Do().accessToken:null,a=!1;r&&i===null&&Do().status!==`anonymous`&&(i=await Io(),a=!0);let o=await Po(e,t,i,n);if(r&&!a&&o.status===401){let r=await Io();r!==null&&(o=await Po(e,t,r,n))}return o}async function B(e,t={}){let n=await Ro(e,t,`application/json`);if(!n.ok)throw await Mo(n);if(n.status!==204)return await n.json()}async function zo(e,t={}){let n=await Ro(e,{method:`GET`,signal:t.signal,baseUrl:t.baseUrl},`text/event-stream`);if(!n.ok)throw await Mo(n);return n}function Bo(){return new Ke({defaultOptions:{queries:{retry:(e,t)=>ko(t)&&t.status>=400&&t.status<500?!1:e<2,staleTime:3e4,refetchOnWindowFocus:!1},mutations:{retry:!1}}})}function Vo(e,t){return e===t}function Ho(e,t=e=>e,n){let r=n?.compare??Vo,i=(0,L.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,L.useCallback)(()=>e.get(),[e]);return(0,Xi.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function Uo(e=e=>e){return Ho(Co,e)}function Wo(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Wo(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Go(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Wo(e))&&(r&&(r+=` `),r+=t);return r}var Ko=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,qo=Go,Jo=(e,t)=>n=>{if(t?.variants==null)return qo(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ko(t)||Ko(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>
9{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return qo(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Yo=Object.defineProperty,Xo=(e,t)=>Yo(e,`name`,{value:t,configurable:!0});function Zo(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Xo(Zo,`setRef`);function Qo(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zo(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Zo(e[t],null)}}}}Xo(Qo,`composeRefs`);function $o(...e){return L.useCallback(Qo(...e),e)}Xo($o,`useComposedRefs`);var es=Object.defineProperty,ts=(e,t)=>es(e,`name`,{value:t,configurable:!0});function ns(e){let t=L.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];ds(r)&&typeof hs==`function`&&(r=hs(r._payload)),L.Children.forEach(r,e=>{if(ls(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ds(n)&&typeof hs==`function`&&(n=hs(n._payload)),a=os(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=L.cloneElement(a,void 0,s):!o&&L.Children.count(r)===1&&L.isValidElement(r)&&(a=r);let c=a?cs(a):void 0,l=$o(n,c);if(!a){if(r||r===0)throw Error(o?ms(e):ps(e));return r}let u=ss(i,a.props??{});return a.type!==L.Fragment&&(u.ref=n?l:c),L.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}ts(ns,`createSlot`);var rs=ns(`Slot`),is=Symbol.for(`radix.slottable`);function as(e){let t=ts(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=is,t}ts(as,`createSlottable`);var os=ts((e,t)=>{if(`child`in e.props){let t=e.props.child;return L.isValidElement(t)?L.cloneElement(t,void 0,e.props.children(t.props.children)):null}return L.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function ss(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}ts(ss,`mergeProps`);function cs(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ts(cs,`getElementRef`);function ls(e){return L.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===is}ts(ls,`isSlottable`);var us=Symbol.for(`react.lazy`);function ds(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===us&&`_payload`in e&&fs(e._payload)}ts(ds,`isLazyComponent`);function fs(e){return typeof e==`object`&&!!e&&`then`in e}ts(fs,`isPromiseLike`);var ps=ts(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),ms=ts(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),hs=L.use,gs=l(v(),1),_s=Object.defineProperty,vs=(e,t)=>_s(e,`name`,{value:t,configurable:!0}),ys=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=ns(`Primitive.${t}`),r=L.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,R.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bs(e,t){e&&gs.flushSync(()=>e.dispatchEvent(t))}vs(bs,`dispatchDiscreteCustomEvent`);var xs=Object.defineProperty,Ss=(e,t)=>xs(e,`name`,{value:t,configurable:!0}),Cs=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),ws=L.forwardRef(Ss(function(e,t){return(0,R.jsx)(ys.span,{...e,ref:t,style:{...Cs,...e.style}})},`VisuallyHidden`)),Ts=Object.defineProperty,Es=(e,t)=>Ts(e,`name`,{value:t,configurable:!0});function Ds(e,t){let n=L.createContext(t);n.displayName=e+`Context`;let r=Es(e=>{let{children:t,...r}=e,i=L.useMemo(()=>r,Object.values(r));return(0,R.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=L.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Es(i,`useContext`),[r,i]}Es(Ds,`createContext`);function Os(e,t=[]){let n=[];function r(t,r){let i=L.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Es(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=L.useMemo(()=>o,Object.values(o));return(0,R.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}
9=s,l=o?.[e]?.[a]||i,u=L.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Es(s,`useContext`),[o,s]}Es(r,`createContext`);let i=Es(()=>{let t=n.map(e=>L.createContext(e));return Es(function(n){let r=n?.[e]||t;return L.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,ks(i,...t)]}Es(Os,`createContextScope`);function ks(...e){let t=e[0];if(e.length===1)return t;let n=Es(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Es(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return L.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Es(ks,`composeContextScopes`);var As=Object.defineProperty,js=(e,t)=>As(e,`name`,{value:t,configurable:!0});function Ms(e){let t=e+`CollectionProvider`,[n,r]=Os(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=js(e=>{let{scope:t,children:n}=e,r=L.useRef(null),a=L.useRef(new Map).current;return(0,R.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=ns(s),l=L.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=$o(t,a(s,n).collectionRef);return(0,R.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=ns(u),p=L.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=L.useRef(null),s=$o(t,o),c=a(u,n);return L.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,R.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return L.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return js(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}js(Ms,`createCollection`);var Ns=new WeakMap,Ps=class e extends Map{static{js(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Ns.set(this,!0)}set(e,t){return Ns.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=Ls(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Fs(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Fs(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Fs(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Fs(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Is(e,t);return n===-1?void 0:e[n]}js(Fs,`at`);function Is(e,t){let n=e.length,r=Ls(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}js(Is,`toSafeIndex`);function Ls(e){return e!==e||e===0?0:Math.trunc(e)}js(Ls,`toSafeInteger`);function Rs(e){let t=e+`CollectionProvider`,[n,r]=Os(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Ps,setItemMap:js(()=>void 0,`setItemMap`)}),o=js(({state:e,...t})=>e?(0,R.jsx)(c,{...t,state:e}):(0,R.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=js(e=>{let t=h();return(0,R.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=js(e=>{let{scope:t,children:n,state:r}=e,a=L.useRef(null),[o,s]=L.useState(null),c=$o(a,s),[l,u]=r;return L.useEffect(()=>{if(!o)return;let e=Hs(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,R.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=ns(l),d=L.forwardRef((e,t)=>
9{let{scope:n,children:r}=e,i=$o(t,a(l,n).collectionRef);return(0,R.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=ns(f),m=L.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=L.useRef(null),[s,c]=L.useState(null),l=$o(t,o,c),{setItemMap:u}=a(f,n),d=L.useRef(i);zs(d.current,i)||(d.current=i);let m=d.current;return L.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Vs):(t.set(s,{...e,element:s}),t.toSorted(Vs)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Ps(e)))}},[s,m,u]),(0,R.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return L.useState(new Ps)}js(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return js(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}js(Rs,`createCollection`);function zs(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}js(zs,`shallowEqual`);function Bs(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}js(Bs,`isElementPreceding`);function Vs(e,t){return!e[1].element||!t[1].element?0:Bs(e[1].element,t[1].element)?-1:1}js(Vs,`sortByDocumentPosition`);function Hs(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}js(Hs,`getChildListObserver`);var Us=Object.defineProperty,Ws=(e,t)=>Us(e,`name`,{value:t,configurable:!0}),Gs=!!(typeof window<`u`&&window.document&&window.document.createElement);function V(e,t,{checkForDefaultPrevented:n=!0}={}){return Ws(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Ws(V,`composeEventHandlers`);function Ks(e){if(!Gs)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Ws(Ks,`getOwnerWindow`);function qs(e){if(!Gs)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Ws(qs,`getOwnerDocument`);function Js(e,t=!1){let{activeElement:n}=qs(e);if(!n?.nodeName)return null;if(Ys(n)&&n.contentDocument)return Js(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=qs(n).getElementById(e);if(t)return t}}return n}Ws(Js,`getActiveElement`);function Ys(e){return e.tagName===`IFRAME`}Ws(Ys,`isFrame`);var Xs=globalThis?.document?L.useLayoutEffect:()=>{},Zs=Object.defineProperty,Qs=(e,t)=>Zs(e,`name`,{value:t,configurable:!0}),$s=L.useEffectEvent,ec=L.useInsertionEffect;function tc(e){if(typeof $s==`function`)return $s(e);let t=L.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ec==`function`?ec(()=>{t.current=e}):Xs(()=>{t.current=e}),L.useMemo(()=>((...e)=>t.current?.(...e)),[])}Qs(tc,`useEffectEvent`);var nc=Object.defineProperty,rc=(e,t)=>nc(e,`name`,{value:t,configurable:!0}),ic=L.useInsertionEffect||Xs;function ac({prop:e,defaultProp:t,onChange:n=rc(()=>{},`onChange`),caller:r}){let[i,a,o]=oc({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,L.useCallback(t=>{if(s){let n=sc(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}rc(ac,`useControllableState`);function oc({defaultProp:e,onChange:t}){let[n,r]=L.useState(e),i=L.useRef(n),a=L.useRef(t);return ic(()=>{a.current=t},[t]),L.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}rc(oc,`useUncontrolledState`);function sc(e){return typeof e==`function`}rc(sc,`isFunction`);var cc=Symbol(`RADIX:SYNC_STATE`);function lc(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=tc(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=L.useReducer((t,n)=>{if(n.type===cc)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=L.useRef(p);L.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=L.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return L.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:cc,state:i})},[i,d.state,c]),[h,f]}rc(lc,`useControllableStateReducer`);var uc=Object.defineProperty,dc=(e,t)=>uc(e,`name`,{value:t,configurable:!0});function fc(e,t){return L.useReducer((e,n)=>t[e][n]??e,e)}dc(fc,`useStateMachine`);var pc=dc(e=>{let{present:t,children:n}=e,r=mc(t),i=typeof n==`function`?n({present:r.isPresent}):L.Children.only(n),a=gc(r.ref,vc(i));return typeof n==`function`||r.isPresent?L.cloneElement(i,{ref:a}):null},`Presence`);function mc(e){let[t,n]=L.useState(),r=L.useRef(null),i=L.useRef(e),a=L.useRef(`none`),o=L.useRef(void 0),[s,c]=fc(e?`mounted`:`unmounted`,{mou
9nted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return L.useEffect(()=>{s===`mounted`?(a.current=o.current??_c(r.current),o.current=void 0):a.current=`none`},[s]),Xs(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=_c(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Xs(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=dc(a=>{let o=_c(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=dc(e=>{e.target===t&&(a.current=_c(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:L.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=_c(t)}else r.current=null;n(e)},[])}}dc(mc,`usePresence`);function hc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}dc(hc,`setRef`);function gc(...e){let t=L.useRef(e);return t.current=e,L.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=hc(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():hc(n[e],null)}}},[])}dc(gc,`useStableComposedRefs`);function _c(e){return e?.animationName||`none`}dc(_c,`getAnimationName`);function vc(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}dc(vc,`getElementRef`);var yc=Object.defineProperty,bc=(e,t)=>yc(e,`name`,{value:t,configurable:!0}),xc=L.useId||(()=>void 0),Sc=0;function Cc(e){let[t,n]=L.useState(xc());return Xs(()=>{e||n(e=>e??String(Sc++))},[e]),e||(t?`radix-${t}`:``)}bc(Cc,`useId`);var wc=Object.defineProperty,Tc=(e,t)=>wc(e,`name`,{value:t,configurable:!0}),Ec=`Collapsible`,[Dc,Oc]=Os(Ec),[kc,Ac]=Dc(Ec),jc=L.forwardRef(Tc(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=ac({prop:r,defaultProp:i??!1,onChange:o,caller:Ec});return(0,R.jsx)(kc,{scope:n,disabled:a,contentId:Cc(),open:c,onOpenToggle:L.useCallback(()=>l(e=>!e),[l]),children:(0,R.jsx)(ys.div,{"data-state":Lc(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),Mc=`CollapsibleTrigger`,Nc=L.forwardRef(Tc(function(e,t){let{__scopeCollapsible:n,...r}=e,i=Ac(Mc,n);return(0,R.jsx)(ys.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":Lc(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:V(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),Pc=`CollapsibleContent`,Fc=L.forwardRef(Tc(function(e,t){let{forceMount:n,...r}=e,i=Ac(Pc,e.__scopeCollapsible);return(0,R.jsx)(pc,{present:n||i.open,children:({present:e})=>(0,R.jsx)(Ic,{...r,ref:t,present:e})})},`CollapsibleContent`)),Ic=L.forwardRef(Tc(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Ac(Pc,n),[s,c]=L.useState(r),l=L.useRef(null),u=$o(t,l),d=L.useRef(0),f=d.current,p=L.useRef(0),m=p.current,h=o.open||s,g=L.useRef(h),_=L.useRef(void 0);return L.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Xs(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,R.jsx)(ys.div,{"data-state":Lc(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})},`CollapsibleContentImpl`));function Lc(e){return e?`open`:`closed`}Tc(Lc,`getState`);var Rc=jc,zc=Object.defineProperty,Bc=(e,t)=>zc(e,`name`,{value:t,configurable:!0}),Vc=L.createContext(void 0);function Hc(e){let t=L.useContext(Vc);return e||t||`ltr`}Bc(Hc,`useDirection`);var Uc=Object.defineProperty,Wc=(e,t)=>Uc(e,`name`,{value:t,configurable:!0});function Gc(e){let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>((...e)=>t.current?.(...e)),[])}
9Wc(Gc,`useCallbackRef`);var Kc=Object.defineProperty,qc=(e,t)=>Kc(e,`name`,{value:t,configurable:!0}),Jc=`dismissableLayer.update`,Yc=`dismissableLayer.pointerDownOutside`,Xc=`dismissableLayer.focusOutside`,Zc,Qc=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),$c=L.forwardRef(qc(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=L.useContext(Qc),[d,f]=L.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=L.useState({}),h=$o(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=L.useRef(!1),C=nl(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:L.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=rl(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Gc(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return L.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),L.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zc=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),il(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Zc))}},[d,p,n,u]),L.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),il())},[d,u]),L.useEffect(()=>{let e=qc(()=>m({}),`handleUpdate`);return document.addEventListener(Jc,e),()=>document.removeEventListener(Jc,e)},[]),(0,R.jsx)(ys.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:V(e.onFocusCapture,w.onFocusCapture),onBlurCapture:V(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function el(){let e=L.useContext(Qc),[t,n]=L.useState(null);return L.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}qc(el,`useDismissableLayerSurface`);var tl=qc(()=>!0,`IS_TRUE`);function nl(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=tl}=t,s=Gc(e),c=L.useRef(!1),l=L.useRef(!1),u=L.useRef(new Map),d=L.useRef(()=>{});return L.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}qc(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}qc(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}qc(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}qc(p,`handleInteractionBubble`);let m=qc(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||al(Yc,s,p,{discrete:!0})};if(qc(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:qc(()=>c.current=!0,`onPointerDownCapture`)}}qc(nl,`usePointerDownOutside`);function rl(e,t=globalThis?.document){let n=Gc(e),r=L.useRef(!1);return L.useEffect(()=>{let e=qc(e=>{e.target&&!r.current&&al(Xc,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:qc(()=>r.current=!0,`onFocusCapture`),onBlurCapture:qc(()=>r.current=!1,`onBlurCapture`)}}qc(rl,`useFocusOutside`);function il(){let e=new CustomEvent(Jc);document.dispatchEvent(e)}qc(il,`dispatchUpdate`);function al(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?bs(i,a):i.dispatchEvent(a)}qc(al,`handleAndDispatchCustomEvent`);var ol=Object.defineProperty,sl=(e,t)=>ol(e,`name`,{value:t,configurable:!0}),cl=`focusScope.autoFocusOnMount`,ll=`focusScope.autoFocusOnUnmount`,ul={bubbles:!1,cancelable:!0},dl=L.forwardRef(sl(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=L.useState(null),l=Gc(i),u=Gc(a),d=L.useRef(null),f=$o(t,c),p=L.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;L.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:vl(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||vl(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&vl(s)};sl(e,`handleFocusIn`),sl(t,`handleFocusOut`),sl(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),L.useEffect(()=>{if(s){yl.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(cl,ul);s.addEventListener(cl,l),s.dispatchEvent(t),t.defaultPrevented||(fl(Sl(ml(s)),{select:!0}),document.activeElement===e&&vl(s))}return()=>{s.removeEventListener(cl,l),setTimeout(()=>{let t=new CustomEvent(ll,ul);s.addEventListener(ll,u),s.dispatchEvent(t),t.defaultPrevented||vl(e??document.body,{select:!0}),s.removeEventListener(ll,u),yl.remove(p)}
9,0)}}},[s,l,u,p]);let m=L.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=pl(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&vl(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&vl(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,R.jsx)(ys.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function fl(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(vl(r,{select:t}),document.activeElement!==n)return}sl(fl,`focusFirst`);function pl(e){let t=ml(e);return[hl(t,e),hl(t.reverse(),e)]}sl(pl,`getTabbableEdges`);function ml(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:sl(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}sl(ml,`getTabbableCandidates`);function hl(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):gl(r,{upTo:t})))return r}sl(hl,`findVisible`);function gl(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}sl(gl,`isHidden`);function _l(e){return e instanceof HTMLInputElement&&`select`in e}sl(_l,`isSelectableInput`);function vl(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_l(e)&&t&&e.select()}}sl(vl,`focus`);var yl=bl();function bl(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=xl(e,t),e.unshift(t)},remove(t){e=xl(e,t),e[0]?.resume()}}}sl(bl,`createFocusScopesStack`);function xl(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}sl(xl,`arrayRemove`);function Sl(e){return e.filter(e=>e.tagName!==`A`)}sl(Sl,`removeLinks`);var Cl=Object.defineProperty,wl=L.forwardRef(((e,t)=>Cl(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=L.useState(!1);Xs(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?gs.createPortal((0,R.jsx)(ys.div,{...r,ref:t}),o):null},`Portal`)),Tl=Object.defineProperty,El=(e,t)=>Tl(e,`name`,{value:t,configurable:!0}),Dl=0,Ol=null;function kl(e){return Al(),e.children}El(kl,`FocusGuards`);function Al(){L.useEffect(()=>{Ol||={start:jl(),end:jl()};let{start:e,end:t}=Ol;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Dl++,()=>{Dl===1&&(Ol?.start.remove(),Ol?.end.remove(),Ol=null),Dl=Math.max(0,Dl-1)}},[])}El(Al,`useFocusGuards`);function jl(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}El(jl,`createFocusGuard`);var Ml=function(){return Ml=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ml.apply(this,arguments)};function Nl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Pl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Fl=`right-scroll-bar-position`,Il=`width-before-scroll-bar`,Ll=`with-scroll-bars-hidden`,Rl=`--removed-body-scroll-bar-size`;function zl(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Bl(e,t){var n=(0,L.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Vl=typeof window<`u`?L.useLayoutEffect:L.useEffect,Hl=new WeakMap;function Ul(e,t){var n=Bl(t||null,function(t){return e.forEach(function(e){return zl(e,t)})});return Vl(function(){var t=Hl.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||zl(e,null)}
vendor: 8,097 bytes, lines 9-49
9),i.forEach(function(e){r.has(e)||zl(e,a)})}Hl.set(n,e)},[e]),n}function Wl(e){return e}function Gl(e,t){t===void 0&&(t=Wl);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Kl(e){e===void 0&&(e={});var t=Gl(null);return t.options=Ml({async:!0,ssr:!1},e),t}var ql=function(e){var t=e.sideCar,n=Nl(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return L.createElement(r,Ml({},n))};ql.isSideCarExport=!0;function Jl(e,t){return e.useMedium(t),ql}var Yl=Kl(),Xl=function(){},Zl=L.forwardRef(function(e,t){var n=L.useRef(null),r=L.useState({onScrollCapture:Xl,onWheelCapture:Xl,onTouchMoveCapture:Xl}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Nl(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Ul([n,t]),C=Ml(Ml({},b),i);return L.createElement(L.Fragment,null,u&&L.createElement(x,{sideCar:Yl,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?L.cloneElement(L.Children.only(s),Ml(Ml({},C),{ref:S})):L.createElement(v,Ml({},C,{className:c,ref:S}),s))});Zl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zl.classNames={fullWidth:Il,zeroRight:Fl};var Ql,$l=function(){if(Ql)return Ql;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function eu(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=$l();return t&&e.setAttribute(`nonce`,t),e}function tu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nu(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ru=function(){var e=0,t=null;return{add:function(n){e==0&&(t=eu())&&(tu(t,n),nu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iu=function(){var e=ru();return function(t,n){L.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},au=function(){var e=iu();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ou={left:0,top:0,right:0,gap:0},su=function(e){return parseInt(e||``,10)||0},cu=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[su(n),su(r),su(i)]},lu=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ou;var t=cu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},uu=au(),du=`data-scroll-locked`,fu=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` 10 .${Ll} { 11 overflow: hidden ${r}; 12 padding-right: ${s}px ${r}; 13 } 14 body[${du}] { 15 overflow: hidden ${r}; 16 overscroll-behavior: contain; 17 ${[t&&`position: relative ${r};`,n===`margin`&&` 18 padding-left: ${i}px; 19 padding-top: ${a}px; 20 padding-right: ${o}px; 21 margin-left:0; 22 margin-top:0; 23 margin-right: ${s}px ${r}; 24 `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} 25 } 26 27 .${Fl} { 28 right: ${s}px ${r}; 29 } 30 31 .${Il} { 32 margin-right: ${s}px ${r}; 33 } 34 35 .${Fl} .${Fl} { 36 right: 0 ${r}; 37 } 38 39 .${Il} .${Il} { 40 margin-right: 0 ${r}; 41 } 42 43 body[${du}] { 44 ${Rl}: ${s}px; 45 } 46`},pu=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},mu=function(){L.useEffect(function(){return document.body.setAttribute(du,(pu()+1).toString()),function(){var e=pu()-1;e<=0?document.body.removeAttribute(du):document.body.setAttribute(du,e.toString())}},[])},hu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;mu();var a=L.useMemo(function(){return lu(i)},[i]);return L.createElement(uu,{styles:fu(a,!t,i,n?``:`!important`)})},gu=!1;if(typeof window<`u`)try{var _u=Object.defineProperty({},"passive",{get:function(){return gu=!0,!0}});window.addEventListener(`test`,_u,_u),window.removeEventListener(`test`,_u,_u)}catch{gu=!1}var vu=gu?{passive:!1}:!1,yu=function(e){return e.tagName===`TEXTAREA`},bu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!yu(e)&&n[t]===`visible`)},xu=function(e){return bu(e,`overflowY`)},Su=function(e){return bu(e,`overflowX`)},Cu=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Eu(e,r)){var i=Du(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wu=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Tu=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Eu=function(e,t){return e===`v`?xu(t):Su(t)},Du=function(e,t){return e===`v`?wu(t):Tu(t)},Ou=function(e,t){return e===`h`&&t===`rtl`?-1:1},ku=function(e,t,n,r,i){var a=Ou(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Du(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Eu(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Au=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ju=function(e){return[e.deltaX,e.deltaY]},Mu=function(e){return e&&`current`in e?e.current:e},Nu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pu=function(e){return` 47 .block-interactivity-${e} {pointer-events: none;} 48 .allow-interactivity-${e} {pointer-events: all;} 49`},Fu=0,Iu=[];function Lu(e){var t=L.useRef([]),n=L.useRef([0,0]),r=L.useRef(),i=L.useState(Fu++)[0],a=L.useState(au)[0],o=L.useRef(e);L.useEffect(function(){o.current=e},[e]),L.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Pl([e.lockRef.current],(e.shards||[]).map(Mu),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=L.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Au(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Cu(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Cu(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ku(h,t,e,h===`h`?s:c,!0)},[]),c=L.useCallback(function(e){var n=e;if(!(!Iu.length||Iu[Iu.length-1]!==a)){var r=`deltaY`in n?ju(n):Au(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Nu(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}
49if(!i){var c=(o.current.shards||[]).map(Mu).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=L.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ru(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=L.useCallback(function(e){n.current=Au(e),r.current=void 0},[]),d=L.useCallback(function(t){l(t.type,ju(t),t.target,s(t,e.lockRef.current))},[]),f=L.useCallback(function(t){l(t.type,Au(t),t.target,s(t,e.lockRef.current))},[]);L.useEffect(function(){return Iu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,vu),document.addEventListener(`touchmove`,c,vu),document.addEventListener(`touchstart`,u,vu),function(){Iu=Iu.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,vu),document.removeEventListener(`touchmove`,c,vu),document.removeEventListener(`touchstart`,u,vu)}},[]);var p=e.removeScrollBar,m=e.inert;return L.createElement(L.Fragment,null,m?L.createElement(a,{styles:Pu(i)}):null,p?L.createElement(hu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ru(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var zu=Jl(Yl,Lu),Bu=L.forwardRef(function(e,t){return L.createElement(Zl,Ml({},e,{ref:t,sideCar:zu}))});Bu.classNames=Zl.classNames;var Vu=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Hu=new WeakMap,Uu=new WeakMap,Wu={},Gu=0,Ku=function(e){return e&&(e.host||Ku(e.parentNode))},qu=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ku(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ju=function(e,t,n,r){var i=qu(t,Array.isArray(e)?e:[e]);Wu[n]||(Wu[n]=new WeakMap);var a=Wu[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Hu.get(e)||0)+1,l=(a.get(e)||0)+1;Hu.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Uu.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Gu++,function(){o.forEach(function(e){var t=Hu.get(e)-1,i=a.get(e)-1;Hu.set(e,t),a.set(e,i),t||(Uu.has(e)||e.removeAttribute(r),Uu.delete(e)),i||e.removeAttribute(n)}),Gu--,Gu||(Hu=new WeakMap,Hu=new WeakMap,Uu=new WeakMap,Wu={})}},Yu=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vu(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ju(r,i,n,`aria-hidden`)):function(){return null}},Xu=Object.defineProperty,Zu=(e,t)=>Xu(e,`name`,{value:t,configurable:!0}),Qu=`Dialog`,[$u,ed]=Os(Qu),[td,nd]=$u(Qu),rd=Zu(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=L.useRef(null),c=L.useRef(null),[l,u]=ac({prop:r,defaultProp:i??!1,onChange:a,caller:Qu}),[d,f]=L.useState(0),[p,m]=L.useState(0);return(0,R.jsx)(td,{scope:t,triggerRef:s,contentRef:c,contentId:Cc(),titleId:Cc(),descriptionId:Cc(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:L.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),id=`DialogPortal`,[ad,od]=$u(id,{forceMount:void 0}),sd=Zu(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=nd(id,t);return(0,R.jsx)(ad,{scope:t,forceMount:n,children:L.Children.map(r,e=>(0,R.jsx)(pc,{present:n||a.open,children:(0,R.jsx)(wl,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),cd=`DialogOverlay`,ld=L.forwardRef(Zu(function(e,t){let n=od(cd,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nd(cd,e.__scopeDialog);return a.modal?(0,R.jsx)(pc,{present:r||a.open,children:(0,R.jsx)(dd,{...i,ref:t})}):null},`DialogOverlay`)),ud=ns(`DialogOverlay.RemoveScroll`),dd=L.forwardRef(Zu(function(e,t){let{__scopeDialog:n,...r}=e,i=nd(cd,n),a=$o(t,el());return(0,R.jsx)(Bu,{as:ud,allowPinchZoom:!0,shards:[i.contentRef],children:(0,R.jsx)(ys.div,{"data-state":Cd(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),fd=`DialogContent`,pd=L.forwardRef(Zu(function(e,t){let n=od(fd,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nd(fd,e.__scopeDialog);return(0,R.jsx)(pc,{present:r||a.open,children:a.modal?(0,R.jsx)(md,{...i,ref:t}):(0,R.jsx)(hd,{...i,ref:t})})},`DialogContent`)),md=L.forwardRef(Zu(function(e,t){let n=nd(fd,e.__scopeDialog),r=L.useRef(null),i=$o(t,n.contentRef,r);return L.useEffect(()=>{let e=r.current;if(e)return Yu(e)},[]),(0,R.jsx)(gd,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:V(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:V(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),hd=L.forwardRef(Zu(function(e,t){let n=nd(fd,e.__scopeDialog),r=L.useRef(!1),i=L.useRef(!1);return(0,R.jsx)(gd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),gd=L.forwardRef(Zu(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=nd(fd,n);return Al(),(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(dl,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,R.jsx)($c,{role:`dialog`,id:s.
49contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Cd(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),_d=`DialogTitle`,vd=L.forwardRef(Zu(function(e,t){let{__scopeDialog:n,...r}=e,i=nd(_d,n),{setTitleCount:a}=i;return Xs(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,R.jsx)(ys.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),yd=`DialogDescription`,bd=L.forwardRef(Zu(function(e,t){let{__scopeDialog:n,...r}=e,i=nd(yd,n),{setDescriptionCount:a}=i;return Xs(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,R.jsx)(ys.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),xd=`DialogClose`,Sd=L.forwardRef(Zu(function(e,t){let{__scopeDialog:n,...r}=e,i=nd(xd,n);return(0,R.jsx)(ys.button,{type:`button`,...r,ref:t,onClick:V(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Cd(e){return e?`open`:`closed`}Zu(Cd,`getState`);var wd=Object.defineProperty,Td=(e,t)=>wd(e,`name`,{value:t,configurable:!0}),Ed=`Avatar`,[Dd,Od]=Os(Ed),kd=[0,()=>void 0],[Ad,jd]=Dd(Ed),Md=L.forwardRef(Td(function(e,t){let{__scopeAvatar:n,...r}=e,[i,a]=L.useState(`idle`),[o,s]=zd();return(0,R.jsx)(Ad,{scope:n,imageLoadingStatus:i,setImageLoadingStatus:a,imageCount:o,setImageCount:s,children:(0,R.jsx)(ys.span,{...r,ref:t})})},`Avatar`)),Nd=`AvatarImage`,Pd=L.forwardRef(Td(function(e,t){let{__scopeAvatar:n,src:r,onLoadingStatusChange:i,...a}=e,o=jd(Nd,n);o.setImageCount;let s=Ld(r,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:o.imageLoadingStatus,setLoadingStatus:o.setImageLoadingStatus}),c=Gc(e=>{i?.(e)}),l=L.useRef(s);return Xs(()=>{let e=l.current;l.current=s,s!==e&&c(s)},[s,c]),s===`loaded`?(0,R.jsx)(ys.img,{...a,ref:t,src:r}):null},`AvatarImage`)),Fd=`AvatarFallback`,Id=L.forwardRef(Td(function(e,t){let{__scopeAvatar:n,delayMs:r,...i}=e,a=jd(Fd,n),[o,s]=L.useState(r===void 0);return L.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,R.jsx)(ys.span,{...i,ref:t}):null},`AvatarFallback`));function Ld(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:i}){return Xs(()=>{if(!e){n(`error`);return}let t=new window.Image,a=Td(e=>{let t=e.currentTarget;n(Rd(t))},`handleLoad`),o=Td(()=>n(`error`),`handleError`);return t.addEventListener(`load`,a),t.addEventListener(`error`,o),r&&(t.referrerPolicy=r),t.crossOrigin=i??null,t.src=e,n(Rd(t)),()=>{t.removeEventListener(`load`,a),t.removeEventListener(`error`,o),n(`idle`)}},[e,i,r,n]),t}Td(Ld,`useImageLoadingStatus`);function Rd(e){return e.complete?e.naturalWidth>0?`loaded`:`error`:`loading`}Td(Rd,`getImageLoadingStatus`);function zd(){return kd}Td(zd,`useImageCount`);function Bd(e){}Td(Bd,`useUpdateImageCount`);var Vd=Object.defineProperty,Hd=(e,t)=>Vd(e,`name`,{value:t,configurable:!0});function Ud(e){let[t,n]=L.useState(void 0);return Xs(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Hd(Ud,`useSize`);var Wd=Object.defineProperty,Gd=(e,t)=>Wd(e,`name`,{value:t,configurable:!0}),Kd=`Checkbox`,[qd,Jd]=Os(Kd),[Yd,Xd]=qd(Kd);function Zd(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=ac({prop:n,defaultProp:i??!1,onChange:c,caller:Kd}),[m,h]=L.useState(null),[g,_]=L.useState(null),v=L.useRef(!1),[y,b]=L.useReducer(e=>e+1,0),x=!m||!!o||!!m.closest(`form`),S={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:b,required:l,defaultChecked:!sf(i)&&i,isFormControl:x,bubbleInput:g,setBubbleInput:_};return(0,R.jsx)(Yd,{scope:t,...S,children:of(d)?d(S):r})}
49Gd(Zd,`CheckboxProvider`);var Qd=`CheckboxTrigger`,$d=L.forwardRef(Gd(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:m,bubbleInput:h}=Xd(Qd,e),g=$o(i,u),_=L.useRef(c);return L.useEffect(()=>{let e=a?.form;if(e){let t=Gd(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,R.jsx)(ys.button,{type:`button`,role:`checkbox`,"aria-checked":sf(c)?`mixed`:c,"aria-required":l,"data-state":cf(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:g,onKeyDown:V(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:V(n,e=>{p(),d(e=>sf(e)?!0:!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`CheckboxTrigger`)),ef=L.forwardRef(Gd(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,R.jsx)(Zd,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($d,{...d,ref:t,__scopeCheckbox:n}),e&&(0,R.jsx)(af,{__scopeCheckbox:n})]})})},`Checkbox`)),tf=`CheckboxIndicator`,nf=L.forwardRef(Gd(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Xd(tf,n);return(0,R.jsx)(pc,{present:r||sf(a.checked)||a.checked===!0,children:(0,R.jsx)(ys.span,{"data-state":cf(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),rf=`CheckboxBubbleInput`,af=L.forwardRef(Gd(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=Xd(rf,e),g=$o(r,h),_=Ud(i),v=L.useRef(!1),y=L.useRef(s),b=L.useRef(o);L.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==b.current;b.current=o;let i=y.current!==s;y.current=s;let c=!(r&&a.current);if(i&&n){v.current=!r;let t=new Event(`click`,{bubbles:c});e.indeterminate=sf(s),n.call(e,!sf(s)&&s),e.dispatchEvent(t),v.current=!1}},[m,s,a,o]);let x=L.useRef(!sf(s)&&s);return(0,R.jsx)(ys.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??x.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:V(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function of(e){return typeof e==`function`}Gd(of,`isFunction`);function sf(e){return e===`indeterminate`}Gd(sf,`isIndeterminate`);function cf(e){return sf(e)?`indeterminate`:e?`checked`:`unchecked`}Gd(cf,`getState`);var lf=[`top`,`right`,`bottom`,`left`],uf=Math.min,df=Math.max,ff=Math.round,pf=Math.floor,mf=e=>({x:e,y:e}),hf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function gf(e,t,n){return df(e,uf(t,n))}function _f(e,t){return typeof e==`function`?e(t):e}function vf(e){return e.split(`-`)[0]}function yf(e){return e.split(`-`)[1]}function bf(e){return e===`x`?`y`:`x`}function xf(e){return e===`y`?`height`:`width`}function Sf(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Cf(e){return bf(Sf(e))}function wf(e,t,n){n===void 0&&(n=!1);let r=yf(e),i=Cf(e),a=xf(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Nf(o)),[o,Nf(o)]}function Tf(e){let t=Nf(e);return[Ef(e),t,Ef(t)]}function Ef(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Df=[`left`,`right`],Of=[`right`,`left`],kf=[`top`,`bottom`],Af=[`bottom`,`top`];function jf(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Of:Df:t?Df:Of;case`left`:case`right`:return t?kf:Af;default:return[]}}function Mf(e,t,n,r){let i=yf(e),a=jf(vf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ef)))),a}function Nf(e){let t=vf(e);return hf[t]+e.slice(t.length)}function Pf(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ff(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Pf(e)}function If(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Lf(e,t,n){let{reference:r,floating:i}=e,a=Sf(t),o=Cf(t),s=xf(o),c=vf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=yf(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Rf(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=_f(t,e),p=Ff(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=If(await i.getClippingRect
vendor: 4,617 bytes, line 49
49({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=If(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var zf=50,Bf=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Rf},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Lf(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<zf&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Lf(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Vf=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=_f(e,t)||{};if(l==null)return{};let d=Ff(u),f={x:n,y:r},p=Cf(i),m=xf(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=uf(d[_],T),D=uf(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,ee=gf(E,k,O),A=!c.arrow&&yf(i)!=null&&k!==ee&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,j=A?k<E?k-E:k-O:0;return{[p]:f[p]+j,data:{[p]:ee,centerOffset:k-ee-j,...A&&{alignmentOffset:j}},reset:A}}}),Hf=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=_f(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=vf(r),_=Sf(o),v=vf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Nf(o)]:Tf(o)),x=p!==`none`;!d&&x&&b.push(...Mf(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=wf(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Sf(t)||T.every(e=>Sf(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Sf(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Uf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wf(e){return lf.some(t=>e[t]>=0)}var Gf=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=_f(e,t);switch(i){case`referenceHidden`:{let e=Uf(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Wf(e)}}}case`escaped`:{let e=Uf(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Wf(e)}}}default:return{}}}}},Kf=new Set([`left`,`top`]);async function qf(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=vf(n),s=yf(n),c=Sf(n)===`y`,l=Kf.has(o)?-1:1,u=a&&c?-1:1,d=_f(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}
49:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Jf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await qf(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Yf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=_f(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Sf(i),p=bf(f),m=u[p],h=u[f],g=(e,t)=>gf(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Xf=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=_f(e,t),u={x:n,y:r},d=Sf(i),f=bf(d),p=u[f],m=u[d],h=_f(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Kf.has(vf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Zf=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=_f(e,t),c=await i.detectOverflow(t,s),l=vf(n),u=yf(n),d=Sf(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=uf(p-c[m],g),y=uf(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*df(c.left,c.right):S=p-2*df(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Qf(){return typeof window<`u`}function $f(e){return np(e)?(e.nodeName||``).toLowerCase():`#document`}function ep(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tp(e){return((np(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function np(e){return Qf()?e instanceof Node||e instanceof ep(e).Node:!1}function rp(e){return Qf()?e instanceof Element||e instanceof ep(e).Element:!1}function ip(e){return Qf()?e instanceof HTMLElement||e instanceof ep(e).HTMLElement:!1}function ap(e){return!Qf()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ep(e).ShadowRoot}function op(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=_p(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function sp(e){return/^(table|td|th)$/.test($f(e))}function cp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var lp=/transform|translate|scale|rotate|perspective|filter/,up=/paint|layout|strict|content/,dp=e=>!!e&&e!==`none`,fp;function pp(e){let t=rp(e)?_p(e):e;return dp(t.transform)||dp(t.translate)||dp(t.scale)||dp(t.rotate)||dp(t.perspective)||!hp()&&(dp(t.backdropFilter)||dp(t.filter))||lp.test(t.willChange||``)||up.test(t.contain||``)}function mp(e){let t=yp(e);for(;ip(t)&&!gp(t);){if(pp(t))return t;if(cp(t))return null;t=yp(t)}return null}function hp(){return fp??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),fp}function gp(e){return/^(html|body|#document)$/.test($f(e))}function _p(e){return ep(e).getComputedStyle(e)}function vp(e){return rp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yp(e){if($f(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ap(e)&&e.host||tp(e);return ap(t)?t.host:t}function bp(e){let t=yp(e);return gp(t)?(e.ownerDocument||e).body:ip(t)&&op(t)?t:bp(t)}function xp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=bp(e),i=r===e.ownerDocument?.body,a=ep(r);if(i){let e=Sp(a);
vendor: 4,240 bytes, line 49
49return t.concat(a,a.visualViewport||[],op(r)?r:[],e&&n?xp(e):[])}return t.concat(r,xp(r,[],n))}function Sp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cp(e){let t=_p(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ip(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ff(n)!==a||ff(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function wp(e){return rp(e)?e:e.contextElement}function Tp(e){let t=wp(e);if(!ip(t))return mf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Cp(t),o=(a?ff(n.width):n.width)/r,s=(a?ff(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ep=mf(0);function Dp(e){let t=ep(e);return!hp()||!t.visualViewport?Ep:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Op(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ep(e)}function kp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=wp(e),o=mf(1);t&&(r?rp(r)&&(o=Tp(r)):o=Tp(e));let s=Op(a,n,r)?Dp(a):mf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ep(a),t=rp(r)?ep(r):r,n=e,i=Sp(n);for(;i&&t!==n;){let e=Tp(i),t=i.getBoundingClientRect(),r=_p(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ep(i),i=Sp(n)}}return If({width:u,height:d,x:c,y:l})}function Ap(e,t){let n=vp(e).scrollLeft;return t?t.left+n:kp(tp(e)).left+n}function jp(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ap(e,n),y:n.top+t.scrollTop}}function Mp(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=tp(r),s=t?cp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=mf(1),u=mf(0),d=ip(r);if((d||!a)&&(($f(r)!==`body`||op(o))&&(c=vp(r)),d)){let e=kp(r);l=Tp(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?jp(o,c):mf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Np(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Pp(e){let t=vp(e),n=e.ownerDocument.body,r=df(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=df(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ap(e),o=-t.scrollTop;return _p(n).direction===`rtl`&&(a+=df(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Fp=25;function Ip(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ep(e),a=tp(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!hp()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ap(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Fp&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Lp(e,t){let n=kp(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Tp(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Rp(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ip(e,n,t);else if(t===`document`)r=Pp(tp(e));else if(rp(t))r=Lp(t,n);else{let n=Dp(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return If(r)}function zp(e,t){let n=t.get(e);if(n)return n;let r=xp(e,[],!1).filter(e=>rp(e)&&$f(e)!==`body`),i=null,a=_p(e).position===`fixed`,o=a?yp(e):e;for(;rp(o)&&!gp(o);){let e=_p(o),t=pp(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=yp(o)}return t.set(e,r),r}function Bp(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?cp(t)?[]:zp(t,this._c):[].concat(n),r],o=Rp(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Rp(t,a[e],i);s=df(n.top,s),c=uf(n.right,c),l=uf(n.bottom,l),u=df(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Vp(e){let{width:t,height:n}=Cp(e);return{width:t,height:n}}function Hp(e,t,n){let r=ip(t),i=tp(t),a=n===`fixed`,o=kp(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=mf(0);
vendor: 4,221 bytes, line 49
49if((r||!a)&&(($f(t)!==`body`||op(i))&&(s=vp(t)),r)){let e=kp(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ap(i));let l=i&&!r&&!a?jp(i,s):mf(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Up(e){return _p(e).position===`static`}function Wp(e,t){if(!ip(e)||_p(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return tp(e)===n&&(n=n.ownerDocument.body),n}function Gp(e,t){let n=ep(e);if(cp(e))return n;if(!ip(e)){let t=yp(e);for(;t&&!gp(t);){if(rp(t)&&!Up(t))return t;t=yp(t)}return n}let r=Wp(e,t);for(;r&&sp(r)&&Up(r);)r=Wp(r,t);return r&&gp(r)&&Up(r)&&!pp(r)?n:r||mp(e)||n}var Kp=async function(e){let t=this.getOffsetParent||Gp,n=this.getDimensions,r=await n(e.floating);return{reference:Hp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qp(e){return _p(e).direction===`rtl`}var Jp={convertOffsetParentRelativeRectToViewportRelativeRect:Mp,getDocumentElement:tp,getClippingRect:Bp,getOffsetParent:Gp,getElementRects:Kp,getClientRects:Np,getDimensions:Vp,getScale:Tp,isElement:rp,isRTL:qp};function Yp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xp(e,t,n){let r=null,i,a=tp(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=pf(d),h=pf(a.clientWidth-(u+f)),g=pf(a.clientHeight-(d+p)),_=pf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:df(0,uf(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Yp(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ep(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Zp(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=wp(e),u=i||a?[...l?xp(l):[],...t?xp(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Xp(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?kp(e):null;c&&g();function g(){let t=kp(e);h&&!Yp(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Qp=Jf,$p=Yf,em=Hf,tm=Zf,nm=Gf,rm=Vf,im=Xf,am=(e,t,n)=>{let r=new Map,i=n??{},a={...Jp,...i.platform,_c:r};return Bf(e,t,{...i,platform:a})},om=typeof document<`u`?L.useLayoutEffect:function(){};function sm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!sm(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function cm(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lm(e,t){let n=cm(e);return Math.round(t*n)/n}function um(e){let t=L.useRef(e);return om(()=>{t.current=e}),t}function dm(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=L.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=L.useState(r);sm(f,r)||p(r);let[m,h]=L.useState(null),[g,_]=L.useState(null),v=L.useCallback(e=>
49{e!==S.current&&(S.current=e,h(e))},[]),y=L.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=L.useRef(null),C=L.useRef(null),w=L.useRef(u),T=c!=null,E=um(c),D=um(i),O=um(l),k=L.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),am(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};ee.current&&!sm(w.current,t)&&(w.current=t,gs.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);om(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ee=L.useRef(!1);om(()=>(ee.current=!0,()=>{ee.current=!1}),[]),om(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let A=L.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),j=L.useMemo(()=>({reference:b,floating:x}),[b,x]),te=L.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=lm(j.floating,u.x),r=lm(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...cm(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return L.useMemo(()=>({...u,update:k,refs:A,elements:j,floatingStyles:te}),[u,k,A,j,te])}var fm=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:rm({element:r.current,padding:i}).fn(n):r?rm({element:r,padding:i}).fn(n):{}}}},pm=(e,t)=>{let n=Qp(e);return{name:n.name,fn:n.fn,options:[e,t]}},mm=(e,t)=>{let n=$p(e);return{name:n.name,fn:n.fn,options:[e,t]}},hm=(e,t)=>({fn:im(e).fn,options:[e,t]}),gm=(e,t)=>{let n=em(e);return{name:n.name,fn:n.fn,options:[e,t]}},_m=(e,t)=>{let n=tm(e);return{name:n.name,fn:n.fn,options:[e,t]}},vm=(e,t)=>{let n=nm(e);return{name:n.name,fn:n.fn,options:[e,t]}},ym=(e,t)=>{let n=fm(e);return{name:n.name,fn:n.fn,options:[e,t]}},bm=Object.defineProperty,xm=L.forwardRef(((e,t)=>bm(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,R.jsx)(ys.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,R.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),Sm=Object.defineProperty,Cm=(e,t)=>Sm(e,`name`,{value:t,configurable:!0}),wm=`Popper`,[Tm,Em]=Os(wm),[Dm,Om]=Tm(wm),km=Cm(e=>{let{__scopePopper:t,children:n}=e,[r,i]=L.useState(null),[a,o]=L.useState(void 0);return(0,R.jsx)(Dm,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Am=`PopperAnchor`,jm=L.forwardRef(Cm(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Om(Am,n),o=L.useRef(null),s=a.onAnchorChange,c=$o(t,L.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=L.useRef(null);L.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Bm(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,R.jsx)(ys.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),Mm=`PopperContent`,[eee,Nm]=Tm(Mm),Pm=L.forwardRef(Cm(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Om(Mm,n),[_,v]=L.useState(null),y=$o(t,v),[b,x]=L.useState(null),S=Ud(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Rm),altBoundary:O},{refs:ee,floatingStyles:A,placement:j,isPositioned:te,middlewareData:ne}=dm({strategy:`fixed`,placement:T,whileElementsMounted:Cm((...e)=>Zp(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[pm({mainAxis:i+w,alignmentAxis:o}),c&&mm({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?hm():void 0,...k}),c&&gm({...k}),_m({...k,apply:Cm(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}
49),b&&ym({element:b,padding:s}),zm({arrowWidth:C,arrowHeight:w}),f&&vm({strategy:`referenceHidden`,...k,boundary:O?k.boundary:void 0})]}),re=g.setPlacementState;Xs(()=>(re(j),()=>{re(void 0)}),[j,re]);let[M,N]=Bm(j),ie=Gc(m);Xs(()=>{te&&ie?.()},[te,ie]);let ae=ne.arrow?.x,oe=ne.arrow?.y,P=ne.arrow?.centerOffset!==0,[F,I]=L.useState();return Xs(()=>{_&&I(window.getComputedStyle(_).zIndex)},[_]),(0,R.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...A,transform:te?A.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:F,"--radix-popper-transform-origin":[ne.transformOrigin?.x,ne.transformOrigin?.y].join(` `),...ne.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,R.jsx)(eee,{scope:n,placedSide:M,placedAlign:N,onArrowChange:x,arrowX:ae,arrowY:oe,shouldHideArrow:P,children:(0,R.jsx)(ys.div,{"data-side":M,"data-align":N,...h,ref:y,style:{...h.style,animation:te?h.style?.animation:`none`}})})})},`PopperContent`)),Fm=`PopperArrow`,Im={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Lm=L.forwardRef(Cm(function(e,t){let{__scopePopper:n,...r}=e,i=Nm(Fm,n),a=Im[i.placedSide];return(0,R.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,R.jsx)(xm,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function Rm(e){return e!==null}Cm(Rm,`isNotNull`);var zm=Cm(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Bm(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Bm(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Cm(Bm,`getSideAndAlignFromPlacement`);var Vm=km,Hm=jm,Um=Pm,Wm=Lm,Gm=Object.defineProperty,Km=(e,t)=>Gm(e,`name`,{value:t,configurable:!0}),qm=!1;function Jm(){let[e,t]=L.useState(qm);return L.useEffect(()=>{qm||(qm=!0,t(!0))},[]),e}Km(Jm,`useIsHydrated`);var Ym=L.useSyncExternalStore;function Xm(){return()=>{}}Km(Xm,`subscribe`);function Zm(){return Ym(Xm,()=>!0,()=>!1)}Km(Zm,`useIsHydratedModern`);var Qm=typeof Ym==`function`?Zm:Jm,$m=Object.defineProperty,eh=(e,t)=>$m(e,`name`,{value:t,configurable:!0}),th=`rovingFocusGroup.onEntryFocus`,nh={bubbles:!1,cancelable:!0},rh=`RovingFocusGroup`,[ih,ah,oh]=Ms(rh),[sh,ch]=Os(rh,[oh]),[lh,uh]=sh(rh),dh=L.forwardRef(eh(function(e,t){return(0,R.jsx)(ih.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(ih.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(fh,{...e,ref:t})})})},`RovingFocusGroup`)),fh=L.forwardRef(eh(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=L.useRef(null),p=$o(t,f),m=Hc(a),[h,g]=ac({prop:o,defaultProp:s??null,onChange:c,caller:rh}),[_,v]=L.useState(!1),y=Gc(l),b=ah(n),x=L.useRef(!1),[S,C]=L.useState(0);return L.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(th,y),()=>e.removeEventListener(th,y)},[y]),(0,R.jsx)(lh,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:L.useCallback(e=>g(e),[g]),onItemShiftTab:L.useCallback(()=>v(!0),[]),onFocusableItemAdd:L.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:L.useCallback(()=>C(e=>e-1),[]),children:(0,R.jsx)(ys.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:V(e.onMouseDown,()=>{x.current=!0}),onFocus:V(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(th,nh);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>
49e.focusable);vh([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:V(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),ph=`RovingFocusGroupItem`,mh=L.forwardRef(eh(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Cc(),l=a||c,u=uh(ph,n),d=u.currentTabStopId===l,f=ah(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Qm();return Xs(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),L.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,R.jsx)(ih.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,R.jsx)(ys.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:V(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:V(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:V(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=_h(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?yh(n,r+1):n.slice(r+1)}setTimeout(()=>vh(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),hh={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function gh(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}eh(gh,`getDirectionAwareKey`);function _h(e,t,n){let r=gh(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return hh[r]}eh(_h,`getFocusIntent`);function vh(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}eh(vh,`focusFirst`);function yh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}eh(yh,`wrapArray`);var bh=dh,xh=mh,Sh=Object.defineProperty,Ch=(e,t)=>Sh(e,`name`,{value:t,configurable:!0}),wh=[`Enter`,` `],Th=[`ArrowDown`,`PageUp`,`Home`],Eh=[`ArrowUp`,`PageDown`,`End`],Dh=[...Th,...Eh],Oh={ltr:[...wh,`ArrowRight`],rtl:[...wh,`ArrowLeft`]},kh={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Ah=`Menu`,[jh,Mh,Nh]=Ms(Ah),[Ph,Fh]=Os(Ah,[Nh,Em,ch]),Ih=Em(),Lh=ch(),[Rh,zh]=Ph(Ah),[Bh,Vh]=Ph(Ah),Hh=Ch(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Ih(t),[c,l]=L.useState(null),u=L.useRef(!1),d=Gc(a),f=Hc(i);return L.useEffect(()=>{let e=Ch(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Ch(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),L.useEffect(()=>{if(!n)return;let e=Ch(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,R.jsx)(Vm,{...s,children:(0,R.jsx)(Rh,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,R.jsx)(Bh,{scope:t,onClose:L.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),Uh=L.forwardRef(Ch(function(e,t){let{__scopeMenu:n,...r}=e,i=Ih(n);return(0,R.jsx)(Hm,{...i,...r,ref:t})},`MenuAnchor`)),Wh=`MenuPortal`,[Gh,Kh]=Ph(Wh,{forceMount:void 0}),qh=Ch(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=zh(Wh,t);return(0,R.jsx)(Gh,{scope:t,forceMount:n,children:(0,R.jsx)(pc,{present:n||a.open,children:(0,R.jsx)(wl,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Jh=`MenuContent`,[Yh,Xh]=Ph(Jh),Zh=L.forwardRef(Ch(function(e,t){let n=Kh(Jh,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=zh(Jh,e.__scopeMenu),o=Vh(Jh,e.__scopeMenu);return(0,R.jsx)(jh.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(pc,{present:r||a.open,children:(0,R.jsx)(jh.Slot,{scope:e.__scopeMenu,children:o.modal?(0,R.jsx)(Qh,{...i,ref:t}):(0,R.jsx)($h,{...i,ref:t})})})})},`MenuContent`)),Qh=L.forwardRef(Ch(function(e,t){let n=zh(Jh,e.__scopeMenu),r=L.useRef(null),i=$o(t,r);return L.useEffect(()=>{let e=r.current;if(e)return Yu(e)},[]),(0,R.jsx)(tg,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:V(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),$h=L.forwardRef(Ch(function(e,t){let n=zh(Jh,e.__scopeMenu);return(0,R.jsx)(tg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),eg=ns(`MenuContent.ScrollLock`),tg=L.forwardRef(Ch(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=zh(Jh,n),_=Vh(Jh,n),v=Ih(n),y=Lh(n),b=Mh(n),[x,S]=L.useState(null),C=L.useRef(null),w=$o(t,C,g.onContentChange),T=L.useRef(0),E=L.useRef(``),D=L.useRef(0),O=L.useRef(null),k=L.useRef(`right`),ee=L.useRef(0),A=m?Bu:L.Fragment,j=m?{as:eg,allowPinchZoom:!0}:void 0,te=Ch(e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=jg(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;Ch((function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>
49o.focus())},`handleTypeaheadSearch`);L.useEffect(()=>()=>window.clearTimeout(T.current),[]),Al();let ne=L.useCallback(e=>k.current===O.current?.side&&Ng(e,O.current?.area),[]);return(0,R.jsx)(Yh,{scope:n,searchRef:E,onItemEnter:L.useCallback(e=>{ne(e)&&e.preventDefault()},[ne]),onItemLeave:L.useCallback(e=>{ne(e)||(C.current?.focus(),S(null))},[ne]),onTriggerLeave:L.useCallback(e=>{ne(e)&&e.preventDefault()},[ne]),pointerGraceTimerRef:D,onPointerGraceIntentChange:L.useCallback(e=>{O.current=e},[]),children:(0,R.jsx)(A,{...j,children:(0,R.jsx)(dl,{asChild:!0,trapped:i,onMountAutoFocus:V(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,R.jsx)($c,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,R.jsx)(bh,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:V(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,R.jsx)(Um,{role:`menu`,"aria-orientation":`vertical`,"data-state":Eg(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:V(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&te(e.key));let i=C.current;if(e.target!==i||!Dh.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Eh.includes(e.key)&&a.reverse(),kg(a)}),onBlur:V(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:V(e.onPointerMove,Pg(e=>{let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;k.current=t,ee.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),ng=L.forwardRef(Ch(function(e,t){let{__scopeMenu:n,...r}=e;return(0,R.jsx)(ys.div,{role:`group`,...r,ref:t})},`MenuGroup`)),rg=L.forwardRef(Ch(function(e,t){let{__scopeMenu:n,...r}=e;return(0,R.jsx)(ys.div,{...r,ref:t})},`MenuLabel`)),ig=`MenuItem`,ag=`menu.itemSelect`,og=L.forwardRef(Ch(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=L.useRef(null),o=Vh(ig,e.__scopeMenu),s=Xh(ig,e.__scopeMenu),c=$o(t,a),l=L.useRef(!1),u=Ch(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(ag,{bubbles:!0,cancelable:!0});e.addEventListener(ag,e=>r?.(e),{once:!0}),bs(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,R.jsx)(sg,{...i,ref:c,disabled:n,onClick:V(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:V(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:V(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&wh.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),sg=L.forwardRef(Ch(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Xh(ig,n),s=Lh(n),c=L.useRef(null),l=$o(t,c),[u,d]=L.useState(!1),[f,p]=L.useState(``);return L.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,R.jsx)(jh.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,R.jsx)(xh,{asChild:!0,...s,focusable:!r,children:(0,R.jsx)(ys.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:V(e.onPointerMove,Pg(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:V(e.onPointerLeave,Pg(e=>o.onItemLeave(e))),onFocus:V(e.onFocus,()=>d(!0)),onBlur:V(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[cg,lg]=Ph(`MenuRadioGroup`,{value:void 0,onValueChange:Ch(()=>{},`onValueChange`)}),ug=L.forwardRef(Ch(function(e,t){let{value:n,onValueChange:r,...i}=e,a=Gc(r);return(0,R.jsx)(cg,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,R.jsx)(ng,{...i,ref:t})})},`MenuRadioGroup`)),dg=`MenuRadioItem`,fg=L.forwardRef(Ch(function(e,t){let{value:n,...r}=e,i=lg(dg,e.__scopeMenu),a=n===i.value;return(0,R.jsx)(mg,{scope:e.__scopeMenu,checked:a,children:(0,R.jsx)(og,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Og(a),onSelect:V(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),pg=`MenuItemIndicator`,[mg,hg]=Ph(pg,{checked:!1}
49),gg=L.forwardRef(Ch(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=hg(pg,n);return(0,R.jsx)(pc,{present:r||Dg(a.checked)||a.checked===!0,children:(0,R.jsx)(ys.span,{...i,ref:t,"data-state":Og(a.checked)})})},`MenuItemIndicator`)),_g=L.forwardRef(Ch(function(e,t){let{__scopeMenu:n,...r}=e;return(0,R.jsx)(ys.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),vg=`MenuSub`,[yg,bg]=Ph(vg),xg=Ch(e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=zh(vg,t),o=Ih(t),[s,c]=L.useState(null),[l,u]=L.useState(null),d=Gc(i);return L.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,R.jsx)(Vm,{...o,children:(0,R.jsx)(Rh,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,R.jsx)(yg,{scope:t,contentId:Cc(),triggerId:Cc(),trigger:s,onTriggerChange:c,children:n})})})},`MenuSub`),Sg=`MenuSubTrigger`,Cg=L.forwardRef(Ch(function(e,t){let n=zh(Sg,e.__scopeMenu),r=Vh(Sg,e.__scopeMenu),i=bg(Sg,e.__scopeMenu),a=Xh(Sg,e.__scopeMenu),o=L.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=L.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);L.useEffect(()=>u,[u]),L.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=$o(t,i.onTriggerChange);return(0,R.jsx)(Uh,{asChild:!0,...l,children:(0,R.jsx)(sg,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Eg(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:V(e.onPointerMove,Pg(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:V(e.onPointerLeave,Pg(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:V(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||(a.searchRef.current===``||t.key!==` `)&&Oh[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})},`MenuSubTrigger`)),wg=`MenuSubContent`,Tg=L.forwardRef(Ch(function(e,t){let n=Kh(Jh,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=zh(Jh,e.__scopeMenu),s=Vh(Jh,e.__scopeMenu),c=bg(wg,e.__scopeMenu),l=L.useRef(null),u=$o(t,l);return(0,R.jsx)(jh.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(pc,{present:r||o.open,children:(0,R.jsx)(jh.Slot,{scope:e.__scopeMenu,children:(0,R.jsx)(tg,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:V(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:V(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:V(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=kh[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})},`MenuSubContent`));function Eg(e){return e?`open`:`closed`}Ch(Eg,`getOpenState`);function Dg(e){return e===`indeterminate`}Ch(Dg,`isIndeterminate`);function Og(e){return Dg(e)?`indeterminate`:e?`checked`:`unchecked`}Ch(Og,`getCheckedState`);function kg(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Ch(kg,`focusFirst`);function Ag(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Ch(Ag,`wrapArray`);function jg(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Ag(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Ch(jg,`getNextMatch`);function Mg(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Ch(Mg,`isPointInPolygon`);function Ng(e,t){return t?Mg({x:e.clientX,y:e.clientY},t):!1}Ch(Ng,`isPointerInGraceArea`);function Pg(e){return t=>t.pointerType===`mouse`?e(t):void 0}Ch(Pg,`whenMouse`);var Fg=Hh,Ig=Uh,Lg=qh,Rg=Zh,zg=ng,Bg=rg,Vg=og,Hg=ug,Ug=fg,Wg=gg,Gg=_g,Kg=xg,qg=Cg,Jg=Tg,Yg=Object.defineProperty,Xg=(e,t)=>
49Yg(e,`name`,{value:t,configurable:!0}),Zg=`DropdownMenu`,[Qg,tee]=Os(Zg,[Fh]),$g=Fh(),[e_,t_]=Qg(Zg),n_=Xg(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$g(t),l=L.useRef(null),[u,d]=ac({prop:i,defaultProp:a??!1,onChange:o,caller:Zg});return(0,R.jsx)(e_,{scope:t,triggerId:Cc(),triggerRef:l,contentId:Cc(),open:u,onOpenChange:d,onOpenToggle:L.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,R.jsx)(Fg,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),r_=`DropdownMenuTrigger`,i_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=t_(r_,n),o=$g(n),s=$o(t,a.triggerRef);return(0,R.jsx)(Ig,{asChild:!0,...o,children:(0,R.jsx)(ys.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:V(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:V(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),a_=Xg(e=>{let{__scopeDropdownMenu:t,...n}=e,r=$g(t);return(0,R.jsx)(Lg,{...r,...n})},`DropdownMenuPortal`),o_=`DropdownMenuContent`,s_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=t_(o_,n),a=$g(n),o=L.useRef(!1);return(0,R.jsx)(Rg,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:V(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:V(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),c_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(zg,{...i,...r,ref:t})},`DropdownMenuGroup`)),l_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(Bg,{...i,...r,ref:t})},`DropdownMenuLabel`)),u_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(Vg,{...i,...r,ref:t})},`DropdownMenuItem`)),d_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(Hg,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),f_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(Ug,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),p_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(Wg,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),m_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(Gg,{...i,...r,ref:t})},`DropdownMenuSeparator`)),h_=Xg(e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=$g(t),[s,c]=ac({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,R.jsx)(Kg,{...o,open:s,onOpenChange:c,children:n})},`DropdownMenuSub`),g_=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(qg,{...i,...r,ref:t})},`DropdownMenuSubTrigger`)),__=L.forwardRef(Xg(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=$g(n);return(0,R.jsx)(Jg,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuSubContent`)),v_=n_,y_=i_,b_=a_,x_=s_,S_=c_,C_=l_,w_=u_,T_=d_,E_=f_,D_=p_,O_=m_,k_=h_,A_=g_,j_=__,M_=Object.defineProperty,N_=L.forwardRef(((e,t)=>M_(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,R.jsx)(ys.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),P_=Object.defineProperty,F_=(e,t)=>P_(e,`name`,{value:t,configurable:!0}),I_=`Popover`,[L_,nee]=Os(I_,[Em]),R_=Em(),[z_,B_]=L_(I_),V_=F_(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=R_(t),c=L.useRef(null),[l,u]=L.useState(!1),[d,f]=ac({prop:r,defaultProp:i??!1,onChange:a,caller:I_});return(0,R.jsx)(Vm,{...s,children:(0,R.jsx)(z_,{scope:t,contentId:Cc(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:L.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:L.useCallback(()=>u(!0),[]),onCustomAnchorRemove:L.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),H_=`PopoverTrigger`,U_=L.forwardRef(F_(function(e,t){let{__scopePopover:n,...r}=e,i=B_(H_,n),a=R_(n),o=$o(t,i.triggerRef),s=(0,R.jsx)(ys.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":X_(i.open
49),...r,ref:o,onClick:V(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,R.jsx)(Hm,{asChild:!0,...a,children:s})},`PopoverTrigger`)),W_=`PopoverPortal`,[G_,K_]=L_(W_,{forceMount:void 0}),ree=F_(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=B_(W_,t);return(0,R.jsx)(G_,{scope:t,forceMount:n,children:(0,R.jsx)(pc,{present:n||a.open,children:(0,R.jsx)(wl,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),q_=`PopoverContent`,iee=L.forwardRef(F_(function(e,t){let n=K_(q_,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=B_(q_,e.__scopePopover);return(0,R.jsx)(pc,{present:r||a.open,children:a.modal?(0,R.jsx)(oee,{...i,ref:t}):(0,R.jsx)(J_,{...i,ref:t})})},`PopoverContent`)),aee=ns(`PopoverContent.RemoveScroll`),oee=L.forwardRef(F_(function(e,t){let n=B_(q_,e.__scopePopover),r=L.useRef(null),i=$o(t,r),a=L.useRef(!1);return L.useEffect(()=>{let e=r.current;if(e)return Yu(e)},[]),(0,R.jsx)(Bu,{as:aee,allowPinchZoom:!0,children:(0,R.jsx)(Y_,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:V(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:V(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),J_=L.forwardRef(F_(function(e,t){let n=B_(q_,e.__scopePopover),r=L.useRef(!1),i=L.useRef(!1);return(0,R.jsx)(Y_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Y_=L.forwardRef(F_(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=B_(q_,n),p=R_(n);return Al(),(0,R.jsx)(dl,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,R.jsx)($c,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,R.jsx)(Um,{"data-state":X_(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function X_(e){return e?`open`:`closed`}F_(X_,`getState`);var Z_=V_,Q_=U_,$_=ree,ev=iee,tv=Object.defineProperty,nv=(e,t)=>tv(e,`name`,{value:t,configurable:!0}),rv=`horizontal`,iv=[`horizontal`,`vertical`],av=L.forwardRef(nv(function(e,t){let{decorative:n,orientation:r=rv,...i}=e,a=ov(r)?r:rv,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,R.jsx)(ys.div,{"data-orientation":a,...o,...i,ref:t})},`Separator`));function ov(e){return iv.includes(e)}nv(ov,`isValidOrientation`);var sv=av,cv=Object.defineProperty,lv=(e,t)=>cv(e,`name`,{value:t,configurable:!0}),uv=`Toggle`,dv=L.forwardRef(lv(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=ac({prop:n,onChange:i,defaultProp:r??!1,caller:uv});return(0,R.jsx)(ys.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:V(e.onClick,()=>{e.disabled||s(!o)})})},`Toggle`)),fv=Object.defineProperty,pv=(e,t)=>fv(e,`name`,{value:t,configurable:!0}),mv=`ToggleGroup`,[hv,see]=Os(mv,[ch]),gv=ch(),_v=L.forwardRef(pv(function(e,t){let{type:n,...r}=e;if(n===`single`)return(0,R.jsx)(bv,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,R.jsx)(xv,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${mv}\``)},`ToggleGroup`)),[vv,yv]=hv(mv),bv=L.forwardRef(pv(function(e,t){let{value:n,defaultValue:r,onValueChange:i=pv(()=>{},`onValueChange`),...a}=e,[o,s]=ac({prop:n,defaultProp:r??``,onChange:i,caller:mv});return(0,R.jsx)(vv,{scope:e.__scopeToggleGroup,type:`single`,value:L.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:L.useCallback(()=>s(``),[s]),children:(0,R.jsx)(wv,{...a,ref:t})})},`ToggleGroupImplSingle`)),xv=L.forwardRef(pv(function(e,t){let{value:n,defaultValue:r,onValueChange:i=pv(()=>{},`onValueChange`),...a}=e,[o,s]=ac({prop:n,defaultProp:r??[],onChange:i,caller:mv}),c=L.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=L.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,R.jsx)(vv,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,R.jsx)(wv,{...a,ref:t})})},`ToggleGroupImplMultiple`)),[Sv,Cv]=hv(mv),wv=L.forwardRef(pv(function(e,t){let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=gv(n),u=Hc(o),d={dir:u,...c};return(0,R.jsx)(Sv,{scope:n,rovingFocus:i,disabled:r,children:i?(0,R.jsx)(bh,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,R.jsx)(ys.div,{...d,ref:t})}):(0,R.jsx)(ys.div,{...d,ref:t})})},`ToggleGroupImpl`)),Tv=`ToggleGroupItem`,Ev=L.forwardRef(pv(function(e,t){let n=yv(Tv,e.__scopeToggleGroup),r=Cv(Tv,e.__scopeToggleGroup),i=gv(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=L.useRef(null);return r.rovingFocus?(0,R.jsx)(xh,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,R.jsx)(Dv,{...s,ref:t})}):(0,R.jsx)(Dv,{...s,ref:t})},`ToggleGroupItem`)),Dv=L.forwardRef(pv(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=yv(Tv,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===`single`?o:void 0;
49return(0,R.jsx)(dv,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),Ov=Object.defineProperty,kv=(e,t)=>Ov(e,`name`,{value:t,configurable:!0}),[Av,cee]=Os(`Tooltip`,[Em]),jv=Em(),Mv=`TooltipProvider`,Nv=700,Pv=`tooltip.open`,[Fv,Iv]=Av(Mv),Lv=kv(e=>{let{__scopeTooltip:t,delayDuration:n=Nv,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=L.useRef(!0),s=L.useRef(!1),c=L.useRef(0);return L.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,R.jsx)(Fv,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:L.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:L.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:L.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),Rv=`Tooltip`,[zv,Bv]=Av(Rv),Vv=kv(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Iv(Rv,e.__scopeTooltip),l=jv(t),[u,d]=L.useState(null),[f,p]=L.useState(void 0),m=Cc(),h=L.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=L.useRef(!1),[y,b]=ac({prop:r,defaultProp:i??!1,onChange:kv(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Pv))):c.onClose(),a?.(e)},`onChange`),caller:Rv}),x=L.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=L.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=L.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=L.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);L.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let T=f??m;return(0,R.jsx)(Vm,{...l,children:(0,R.jsx)(zv,{scope:t,contentId:T,setContentId:p,open:y,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:L.useCallback(()=>{c.isOpenDelayedRef.current?w():S()},[c.isOpenDelayedRef,w,S]),onTriggerLeave:L.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:n})})},`Tooltip`),Hv=`TooltipTrigger`,Uv=L.forwardRef(kv(function(e,t){let{__scopeTooltip:n,...r}=e,i=Bv(Hv,n),a=Iv(Hv,n),o=jv(n),s=$o(t,L.useRef(null),i.onTriggerChange),c=L.useRef(!1),l=L.useRef(!1),u=L.useCallback(()=>c.current=!1,[]);return L.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,R.jsx)(Hm,{asChild:!0,...o,children:(0,R.jsx)(ys.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:V(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:V(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:V(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:V(e.onBlur,i.onClose),onClick:V(e.onClick,i.onClose)})})},`TooltipTrigger`)),Wv=`TooltipPortal`,[Gv,Kv]=Av(Wv,{forceMount:void 0}),qv=kv(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Bv(Wv,t);return(0,R.jsx)(Gv,{scope:t,forceMount:n,children:(0,R.jsx)(pc,{present:n||a.open,children:(0,R.jsx)(wl,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),Jv=`TooltipContent`,Yv=L.forwardRef(kv(function(e,t){let n=Kv(Jv,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Bv(Jv,e.__scopeTooltip);return(0,R.jsx)(pc,{present:r||o.open,children:o.disableHoverableContent?(0,R.jsx)(Qv,{side:i,...a,ref:t}):(0,R.jsx)(Xv,{side:i,...a,ref:t})})},`TooltipContent`)),Xv=L.forwardRef(kv(function(e,t){let n=Bv(Jv,e.__scopeTooltip),r=Iv(Jv,e.__scopeTooltip),i=L.useRef(null),a=$o(t,i),[o,s]=L.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=L.useCallback(()=>{s(null),d(!1)},[d]),p=L.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=ty(r,ey(r,n.getBoundingClientRect())),a=ny(t.getBoundingClientRect()),o=iy([...i,...a]);s(o),d(!0)},[d]);return L.useEffect(()=>()=>f(),[f]),L.useEffect(()=>{if(c&&u){let e=kv(e=>p(e,u),`handleTriggerLeave`),t=kv(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),L.useEffect(()=>{if(o){let e=kv(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!ry(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,R.jsx)(Qv,{...e,ref:a})},`TooltipContentHoverable`)),Zv=as(`TooltipContent`),Qv=L.forwardRef(kv(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=Bv(Jv,n),u=jv(n),{onClose:d}=l;L.useEffect(()=>(document.addEventListener(Pv,d),()=>document.removeEventListener(Pv,d)),[d]),L.useEffect(()=>{if(l.trigger){let e=kv(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return Xs(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,R.jsx)($c,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,R.jsxs)(Um,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,R.jsx)(Zv,{children:r}),i?(0,R.jsx)(ws,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),$v=L.forwardRef(kv(function(e,t){let{__scopeTooltip:n,...r}=e,i=jv(n);return(0,R.jsx)(Wm,{...i,...r,ref:t})},`TooltipArrow`));function ey(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}kv(ey,`getExitSideFromRect`);function ty(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}kv(ty,`getPaddedExitPoints`);function ny(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}kv(ny,`getPointsFromRect`);function ry(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}kv(ry,`isPointInPolygon`);function iy(e){let t=e.slice();return t.sort((e,t)=>
49e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),ay(t)}kv(iy,`getHull`);function ay(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}kv(ay,`getHullPresorted`);var oy=Lv,sy=Vv,cy=Uv,ly=qv,uy=Yv,dy=$v,fy=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},py=(e,t)=>({classGroupId:e,validator:t}),my=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hy=`-`,gy=[],_y=`arbitrary..`,vy=e=>{let t=xy(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return by(e);let n=e.split(hy);return yy(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fy(i,t):t:i||gy}return n[e]||gy}}},yy=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yy(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hy):e.slice(t).join(hy),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},by=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_y+r:void 0})(),xy=e=>{let{theme:t,classGroups:n}=e;return Sy(n,t)},Sy=(e,t)=>{let n=my();for(let r in e){let i=e[r];Cy(i,n,r,t)}return n},Cy=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wy(i,t,n,r)}},wy=(e,t,n,r)=>{if(typeof e==`string`){Ty(e,t,n);return}if(typeof e==`function`){Ey(e,t,n,r);return}Dy(e,t,n,r)},Ty=(e,t,n)=>{let r=e===``?t:Oy(t,e);r.classGroupId=n},Ey=(e,t,n,r)=>{if(ky(e)){Cy(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(py(n,e))},Dy=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Cy(o,Oy(t,a),n,r)}},Oy=(e,t)=>{let n=e,r=t.split(hy),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=my(),n.nextPart.set(t,i)),n=i}return n},ky=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ay=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jy=`!`,My=`:`,Ny=[],Py=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fy=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===My){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jy)?(c=s.slice(0,-1),l=!0):s.startsWith(jy)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Py(t,l,c,u)};if(t){let e=t+My,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Py(Ny,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r}
vendor: 11,991 bytes, line 49
49,Iy=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ly=e=>({cache:Ay(e.cacheSize),parseClassName:Fy(e),sortModifiers:Iy(e),postfixLookupClassGroupIds:Ry(e),...vy(e)}),Ry=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zy=/\s+/,By=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zy),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jy:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vy=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Hy(n))&&(i&&(i+=` `),i+=r);return i},Hy=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Hy(e[r]))&&(n&&(n+=` `),n+=t);return n},Uy=(e,...t)=>{let n,r,i,a,o=o=>(n=Ly(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=By(e,n);return i(e,a),a};return a=o,(...e)=>a(Vy(...e))},Wy=[],Gy=e=>{let t=t=>t[e]||Wy;return t.isThemeGetter=!0,t},Ky=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jy=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$y=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,eb=e=>Jy.test(e),tb=e=>!!e&&!Number.isNaN(Number(e)),nb=e=>!!e&&Number.isInteger(Number(e)),rb=e=>e.endsWith(`%`)&&tb(e.slice(0,-1)),ib=e=>Yy.test(e),ab=()=>!0,ob=e=>Xy.test(e)&&!Zy.test(e),sb=()=>!1,cb=e=>Qy.test(e),lb=e=>$y.test(e),ub=e=>!H(e)&&!U(e),db=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),fb=e=>Db(e,jb,sb),H=e=>Ky.test(e),pb=e=>Db(e,Mb,ob),mb=e=>Db(e,Nb,tb),hb=e=>Db(e,Fb,ab),gb=e=>Db(e,Pb,sb),_b=e=>Db(e,kb,sb),vb=e=>Db(e,Ab,lb),yb=e=>Db(e,Ib,cb),U=e=>qy.test(e),bb=e=>Ob(e,Mb),xb=e=>Ob(e,Pb),Sb=e=>Ob(e,kb),Cb=e=>Ob(e,jb),wb=e=>Ob(e,Ab),Tb=e=>Ob(e,Ib,!0),Eb=e=>Ob(e,Fb,!0),Db=(e,t,n)=>{let r=Ky.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ob=(e,t,n=!1)=>{let r=qy.exec(e);return r?r[1]?t(r[1]):n:!1},kb=e=>e===`position`||e===`percentage`,Ab=e=>e===`image`||e===`url`,jb=e=>e===`length`||e===`size`||e===`bg-size`,Mb=e=>e===`length`,Nb=e=>e===`number`,Pb=e=>e===`family-name`,Fb=e=>e===`number`||e===`weight`,Ib=e=>e===`shadow`,Lb=Uy(()=>{let e=Gy(`color`),t=Gy(`font`),n=Gy(`text`),r=Gy(`font-weight`),i=Gy(`tracking`),a=Gy(`leading`),o=Gy(`breakpoint`),s=Gy(`container`),c=Gy(`spacing`),l=Gy(`radius`),u=Gy(`shadow`),d=Gy(`inset-shadow`),f=Gy(`text-shadow`),p=Gy(`drop-shadow`),m=Gy(`blur`),h=Gy(`perspective`),g=Gy(`aspect`),_=Gy(`ease`),v=Gy(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),U,H],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[U,H,c],T=()=>[eb,`full`,`auto`,...w()],E=()=>[nb,`none`,`subgrid`,U,H],D=()=>[`auto`,{span:[`full`,nb,U,H]},nb,U,H],O=()=>[nb,`auto`,U,H],k=()=>[`auto`,`min`,`max`,`fr`,U,H],ee=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],te=()=>[eb,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[eb,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[eb,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,U,H],N=()=>[...b(),Sb,_b,{position:[U,H]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,Cb,fb,{size:[U,H]}],oe=()=>[rb,bb,pb],P=()=>[``,`none`,`full`,l,U,H],F=()=>[``,tb,bb,pb],I=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[tb,rb,Sb,_b],le=()=>[``,`none`,m,U,H],ue=()=>[`none`,tb,U,H],de=()=>[`none`,tb,U,H],fe=()=>[tb,U,H],pe=()=>[eb,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ib],breakpoint:[ib],color:[ab],container:[ib],"drop-shadow":[ib],ease:[`in`,`out`,`in-out`],font:[ub],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ib],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ib],shadow:[ib],spacing:[`px`,tb],text:[ib],"text-shadow":[ib],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,eb,H,U,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,U,H]}],"container-named":[db],columns:[{columns:[tb,H,U,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[nb,`auto`,U,H]}],basis:[{basis:[eb,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[tb,eb,`auto`,`initial`,`none`,H]}],grow:[{grow:[``,tb,U,H]}],shrink:[{shrink:[``,tb,U,H]}],order:[{order:[nb,`first`,`last`,`none`,U,H]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ee(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...ee()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:te()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...te()]}],"min-w":[{"min-w":[s,`screen`,`none`,...te()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...te()]}],h:[{h:[`screen`,`lh`,...te()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...te()]}],"max-h":[{"max-h":[`screen`,`lh`,...te()]}],"font-size":[{text:[`base`,n,bb,pb]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Eb,hb]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,rb,H]}],"font-family":[{font:[xb,gb,t]}],"font-features":[{"font-features":[H]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,U,H]}],"line-clamp":[{"line-clamp":[tb,`none`,U,mb]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,U,H]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,U,H]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...I(),`wavy`]}],"text-decoration-thickness":[{decoration:[tb,`from-font`,`auto`,U,pb]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[tb,`auto`,U,H]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[nb,U,H]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,U,H]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,U,H]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nb,U,H],radial:[``,U,H],conic:[nb,U,H]},wb,vb]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:oe()}
49],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":F()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...I(),`hidden`,`none`]}],"divide-style":[{divide:[...I(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}
vendor: 6,198 bytes, line 49
49],"divide-color":[{divide:M()}],"outline-style":[{outline:[...I(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[tb,U,H]}],"outline-w":[{outline:[``,tb,bb,pb]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,Tb,yb]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,Tb,yb]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[tb,pb]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,Tb,yb]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[tb,U,H]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[tb]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[U,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[tb]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,U,H]}],filter:[{filter:[``,`none`,U,H]}],blur:[{blur:le()}],brightness:[{brightness:[tb,U,H]}],contrast:[{contrast:[tb,U,H]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Tb,yb]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,tb,U,H]}],"hue-rotate":[{"hue-rotate":[tb,U,H]}],invert:[{invert:[``,tb,U,H]}],saturate:[{saturate:[tb,U,H]}],sepia:[{sepia:[``,tb,U,H]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,U,H]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[tb,U,H]}],"backdrop-contrast":[{"backdrop-contrast":[tb,U,H]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,tb,U,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tb,U,H]}],"backdrop-invert":[{"backdrop-invert":[``,tb,U,H]}],"backdrop-opacity":[{"backdrop-opacity":[tb,U,H]}],"backdrop-saturate":[{"backdrop-saturate":[tb,U,H]}],"backdrop-sepia":[{"backdrop-sepia":[``,tb,U,H]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,U,H]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[tb,`initial`,U,H]}],ease:[{ease:[`linear`,`initial`,_,U,H]}],delay:[{delay:[tb,U,H]}],animate:[{animate:[`none`,v,U,H]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,U,H]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[U,H,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[nb,U,H]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom
49-in`,`zoom-out`,U,H]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}
49],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,U,H]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[tb,bb,pb,mb]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function W(...e){return Lb(Go(e))}var Rb=Jo(`inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function G({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,type:i,...a}){let o=r?rs:`button`;return(0,R.jsx)(o,{"data-slot":`button`,"data-variant":t,"data-size":n,type:r?i:i??`button`,className:W(Rb({variant:t,size:n,className:e})),...a}
49)}function zb({title:e=`Page not found`,action:t}){return(0,R.jsxs)(`main`,{className:`bg-background text-foreground flex min-h-dvh flex-col items-center justify-center gap-4 px-6`,children:[(0,R.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:e}),t]})}function Bb({error:e,reset:t}){let n=z(),r=e instanceof Error?e.message:String(e);return(0,R.jsxs)(`div`,{"data-kit":`route-error`,role:`alert`,className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 py-12 text-center`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`This page could not be loaded`}),(0,R.jsx)(`p`,{className:`max-w-md text-sm text-muted-foreground`,children:r}),(0,R.jsx)(G,{type:`button`,variant:`outline`,"data-kit":`route-error-retry`,onClick:()=>{n.resetQueries(),t()},children:`Try again`})]})}function Vb(){return(0,R.jsx)(`div`,{"data-kit":`route-pending`,"aria-live":`polite`,className:`flex min-h-0 flex-1 items-center justify-center py-12 text-sm text-muted-foreground`,children:`Loadingâ¦`})}var Hb=Ea()({component:Ub});function Ub(){return(0,R.jsx)(Ra,{})}var Wb=Ta({getParentRoute:()=>Hb,path:`/`,beforeLoad:()=>{throw Jn({to:Do().status===`anonymous`?`/login`:`/dashboard`})}}),Gb=e=>typeof e==`string`,Kb=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},qb=e=>e==null?``:String(e),Jb=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Yb=/###/g,Xb=e=>e&&e.includes(`###`)?e.replace(Yb,`.`):e,Zb=e=>!e||Gb(e),Qb=(e,t,n)=>{let r=Gb(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Zb(e))return{};let t=Xb(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Zb(e)?{}:{obj:e,k:Xb(r[i])}},$b=(e,t,n)=>{let{obj:r,k:i}=Qb(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Qb(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Qb(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},ex=(e,t,n,r)=>{let{obj:i,k:a}=Qb(e,t,Object);i[a]=i[a]||[],i[a].push(n)},tx=(e,t)=>{let{obj:n,k:r}=Qb(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},nx=(e,t,n)=>{let r=tx(e,n);return r===void 0?tx(t,n):r},rx=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?Gb(e[r])||e[r]instanceof String||Gb(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):rx(e[r],t[r],n):e[r]=t[r]);return e},ix=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),ax={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},ox=e=>Gb(e)?e.replace(/[&<>"'\/]/g,e=>ax[e]):e,sx=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},cx=[` `,`,`,`?`,`!`,`;`],lx=new sx(20),ux=(e,t,n)=>{t||=``,n||=``;let r=cx.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=lx.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},dx=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},fx=e=>e?.replace(/_/g,`-`),px={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},mx=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||px,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>Gb(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),Gb(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},hx=class{constructor(){this.observers={}}
vendor: 12,279 bytes, line 49
49on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},gx=class extends hx{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Gb(n)&&i?o.push(...n.split(i)):o.push(n)));let s=tx(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Gb(n)?s:dx(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),$b(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Gb(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=tx(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?rx(s,n,i):s={...s,...n},$b(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},_x={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},vx=Symbol(`i18next/PATH_KEY`);function yx(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===vx?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function bx(e,t){let{[vx]:n}=e(yx()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var xx=e=>!Gb(e)&&typeof e!=`boolean`&&typeof e!=`number`,Sx=class e extends hx{constructor(e,t={}){super(),Jb([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=mx.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=xx(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!ux(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Gb(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Gb(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=bx(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?bx(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!Gb(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=xx(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(Gb(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:xx(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&Gb(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Gb(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Gb(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Gb(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=_x.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Gb(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?bx(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Gb(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Gb(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}
49getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Gb(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Cx=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mx.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=fx(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=fx(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Gb(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Gb(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||Gb(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=Gb(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Gb(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):Gb(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},wx={zero:0,one:1,two:2,few:3,many:4,other:5},Tx={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Ex=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=mx.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=fx(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl pol
49yfill!`),Tx;if(!e.match(/-|_/))return Tx;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>wx[e]-wx[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Dx=(e,t,n,r=`.`,i=!0)=>{let a=nx(e,t,n);return!a&&i&&Gb(n)&&(a=dx(e,n,r),a===void 0&&(a=dx(t,n,r))),a},Ox=e=>e.replace(/\$/g,`$$$$`),kx=class{constructor(e={}){this.logger=mx.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?ox:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?ix(i):a||`{{`,this.suffix=o?ix(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?ix(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?ix(l):``,this.nestingPrefix=d?ix(d):f||ix(`$t(`),this.nestingSuffix=p?ix(p):m||ix(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Dx(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Dx(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false â if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0){if(typeof l==`function`){let t=l(e,i,r);a=Gb(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!Gb(a)&&!this.useRawValueToEscape&&(a=qb(a));let s=t.safeValue(a);if(e=e.replace(i[0],Ox(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${ix(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Gb(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;
vendor: 15,370 bytes, line 49
49let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Gb(i))return i;Gb(i)||(i=qb(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Ax=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},jx=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(fx(r),i),t[o]=s),s(n)}},Mx=e=>(t,n,r)=>e(fx(n),r)(t),Nx=class{constructor(e={}){this.logger=mx.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?jx:Mx;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=jx(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Ax(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Px=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Fx=class extends hx{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=mx.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{ex(n.loaded,[i],a),Px(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Gb(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Gb(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Ix=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Gb(e[1])&&(t.defaultValue=e[1]),Gb(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Lx=e=>(Gb(e.ns)&&(e.ns=[e.ns]),Gb(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Gb(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Rx=()=>{},zx=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Bx=class e extends hx{constructor(e={},t){if(super(),this.options=Lx(e),this.services={},this.logger=mx,this.modules={external:[]},zx(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Gb(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Ix();this.options={...n,...this.options,...Lx(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?mx.init(r(this.modules.logger),this.options):mx.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Nx;let t=new Cx(this.options);this.store=new gx(this.options.resources,this.options);let n=this.services;n.logger=mx,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Ex(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new kx(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Fx(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Sx(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Rx,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Kb(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Rx){let n=t,r=Gb(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Kb();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Rx,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&_x.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Kb();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Gb(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Gb(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=bx(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=bx(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=bx(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return Gb(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;
49if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Kb();return this.options.ns?(Gb(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Kb();Gb(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Cx(Ix());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Rx){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new gx(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Ix().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new kx(n)}return a.translator=new Sx(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Bx.createInstance,Bx.dir,Bx.init,Bx.loadResources,Bx.reloadResources,Bx.use,Bx.changeLanguage,Bx.getFixedT,Bx.t,Bx.exists,Bx.setDefaultNamespace,Bx.hasLoadedNamespace,Bx.loadNamespaces,Bx.loadLanguages;var Vx={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},Hx=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function Ux(e){let t={type:`tag`,name:``,voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(Vx[n[1]]||e.charAt(e.length-2)===`/`)&&(t.voidElement=!0),t.name.startsWith(`!--`))){let t=e.indexOf(`-->`);return{type:`comment`,comment:t===-1?``:e.slice(4,t)}}let r=new RegExp(Hx),i=null;for(;i=r.exec(e),i!==null;)if(i[0].trim()){if(i[1]){let e=i[1].trim(),n=[e,null],a=e.indexOf(`=`);a>-1&&(n=[e.slice(0,a),e.slice(a+1)]),t.attrs[n[0]]=n[1],r.lastIndex--}else i[2]&&(t.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1))}return t}var Wx=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Gx=/<\/?([^\s]+?)[/\s>]/,Kx=/^\s*$/,qx=/^(script|style)$/i,Jx=`\0`,Yx=Object.create(null);function Xx(e){e.forEach(function(e){if(e.type===`text`){e.content=e.content.split(Jx).join(`<`);return}if(e.type===`comment`){e.comment=e.comment.split(Jx).join(`<`);return}for(let t in e.attrs){let n=e.attrs[t];typeof n==`string`&&n.indexOf(Jx)>-1&&(e.attrs[t]=n.split(Jx).join(`<`))}e.children.length&&Xx(e.children)})}function Zx(e,t){let n=t&&t.components||Yx,r=t&&t.allowedTags,i=!1;if(r){let t=typeof r==`function`?r:function(e){return r.indexOf(e)>-1},n=``,a=0;Wx.lastIndex=0;let o;for(;o=Wx.exec(e);){let r=o[0];n+=e.slice(a,o.index);let s=r.match(Gx);r.startsWith(`<!--`)||s&&t(s[1])?(n+=r,a=o.index+r.length):(i=!0,n+=Jx,a=o.index+1,Wx.lastIndex=a)}e=n+e.slice(a)}let a=[],o=[],s,c=-1,l=!1,u=0,d;if(e.indexOf(`<`)!==0){let t=e.indexOf(`<`);a.push({type:`text`,content:t===-1?e:e.substring(0,t)})}let f=[],p;for(;p=Wx.exec(e);)f.push(p);return f.forEach(function(e,t){let n=e[0];if(!n||n.startsWith(`<!--`))return;let r=0,i=0,a=-1,o=null;for(let e=0;e<n.length;e++){let t=n.charAt(e);o?t===o&&(o=null):t===`"`||t===`'`?o=t:t===`<`?(r++,r===2&&(a=e)):t===`>`&&i++}let s=a>-1&&/[a-zA-Z0-9\-!/]/.test(n.charAt(a+1));if(r>i&&s){let e=n.substring(0,a),r=n.substring(e.length);f[t][0]=r,f[t].index+=e.length}}),f.forEach(function(t,r){let i=t[0];if(!i)return;let p=t.index;if(p<u)return;if(l){if(i!==`</`+s.name+`>`)return;l=!1}let m=i.charAt(1)!==`/`,h=i.startsWith(`<!--`),g=p+i.length,_=e.charAt(g),v=f[r+1],y;if(_===`<`&&v){let t=e.substring(g,v.index);y=t.split(`<`).length>t.split(`>`).length}let b;if(h){let t=Ux(i);if(c<0)return a.push(t),a;b=o[c],b.children.push(t);let n=e.slice(g,v?v.index:void 0);return n.length>0&&b.children.push({type:`text`,content:n}),a}if(m){c++,s=Ux(i),s.type===`tag`&&n[s.name]&&(s.type=`component`,l=!0);let t=!1;if(!l&&!s.voidElement&&qx.test(s.name)){t=!0,d||=e.toLowerCase();let n=d.indexOf(`</`+s.name.toLowerCase()+`>`,g),r=n===-1?e.length:n,i=e.slice(g,r);i&&s.children.push({type:`text`,content:i}),u=r}!s.voidElement&&!l&&!t&&_&&_!==`<`&&s.children.push({type:`text`,content:e.slice(g,v?v.index:void 0)}),c===0&&a.push(s),b=o[c-1],b&&b.children.push(s),o[c]=s}if((!m||s.voidElement)&&(c>-1&&(s.voidElement||s.name===i.slice(2,-1))&&(c--,s=c===-1?a:o[c]),!l&&(_!==`<`||y)&&_)){b=c===-1?a:o[c].children;let t=v?v.index:-1,n=e.slice(g,t===-1?void 0:t);Kx.test(n)&&(n=` `),(t>-1&&c+b.length>=0||n!==` `)&&b.push({type:`text`,content:n})}}),i&&Xx(a),a}function Qx(e){let t=[];for(let n in e)e[n]===null?t.push(n):t.push(n+`="`+String(e[n]).replace(/"/g,`"`)+`"`);return t.length?` `+t.join(` `):``}function $x(e,t){switch(t.type){case`text`:return e+t.content;case`tag`:{let n=t.voidElement&&t.name.toLowerCase()!==`!doctype`?`/>`:`>`;return e+=`<`+t.name+(t.attrs?Qx(t.attrs):``)+n,t.voidElement?e:e+t.children.reduce($x,``)+`</`+t.
49name+`>`}case`comment`:return e+=`<!--`+t.comment+`-->`,e}}function eS(e){return e.reduce(function(e,t){return e+$x(``,t)},``)}var tS={parse:Zx,stringify:eS},nS=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);lS(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},rS={},iS=(e,t,n,r)=>{lS(n)&&rS[n]||(lS(n)&&(rS[n]=new Date),nS(e,t,n,r))},aS=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},oS=(e,t,n)=>{e.loadNamespaces(t,aS(e,n))},sS=(e,t,n,r)=>{if(lS(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return oS(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,aS(e,r))},cS=(e,t,n={})=>!t.languages||!t.languages.length?(iS(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),lS=e=>typeof e==`string`,uS=e=>typeof e==`object`&&!!e,dS=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,fS={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`â¦`,"…":`â¦`,"/":`/`,"/":`/`},pS=e=>fS[e],mS=e=>e.replace(dS,pS),hS={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:mS,transDefaultProps:void 0},gS=(e={})=>{hS={...hS,...e}},_S=()=>hS,vS,yS=e=>{vS=e},bS=()=>vS,xS=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},SS=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?wS(t):t},CS=e=>Array.isArray(e)&&e.every(L.isValidElement),wS=e=>Array.isArray(e)?e:[e],TS=(e,t)=>{let n={...t};return n.props={...t.props,...e.props},n},ES=e=>{let t={};if(!e)return t;let n=e=>{wS(e).forEach(e=>{lS(e)||(xS(e)?n(SS(e)):uS(e)&&!(0,L.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t},DS=(e,t,n,r)=>{if(!e)return``;let i=``,a=wS(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return a.forEach((e,a)=>{if(lS(e)){i+=`${e}`;return}if((0,L.isValidElement)(e)){let{props:s,type:c}=e,l=Object.keys(s).length,u=o.indexOf(c)>-1,d=s.children;if(!d&&u&&!l){i+=`<${c}/>`;return}if(!d&&(!u||l)||s.i18nIsDynamicList){i+=`<${a}></${a}>`;return}if(u&&l<=1){let e=lS(d)?d:DS(d,t,n,r);i+=`<${c}>${e}</${c}>`;return}let f=DS(d,t,n,r);i+=`<${a}>${f}</${a}>`;return}if(e===null){nS(n,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:r});return}if(uS(e)){let{format:t,...a}=e,o=Object.keys(a);if(o.length===1){let e=t?`${o[0]}, ${t}`:o[0];i+=`{{${e}}}`;return}nS(n,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:r,child:e});return}nS(n,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:r,child:e})}),i},OS=(e,t,n,r,i,a,o)=>{if(n===``)return[];let s=i.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(s.map(e=>`<${e}`).join(`|`)).test(n);if(!e&&!t&&!c&&!o)return[n];let l=t??{},u=e=>{wS(e).forEach(e=>{lS(e)||(xS(e)?u(SS(e)):uS(e)&&!(0,L.isValidElement)(e)&&Object.assign(l,e))})};u(e);let d=Object.keys(l),f=tS.parse(`<0>${n}</0>`,{allowedTags:e=>/^\d+$/.test(e)||s.indexOf(e)>-1||d.indexOf(e)>-1}),p={...l,...a},m=(e,t,n)=>{let r=SS(e),i=g(r,t.children,n);return CS(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},h=(e,t,n,r,i)=>{e.dummy?(e.children=t,n.push((0,L.cloneElement)(e,{key:r},i?void 0:t))):n.push(...L.Children.map([e],e=>{if(e.type===L.Fragment||e.props?.i18nIsDynamicList!==void 0){let n={key:r};
49return e&&e.props&&Object.keys(e.props).forEach(t=>{t!==`children`&&t!==`i18nIsDynamicList`&&(n[t]=e.props[t])}),(0,L.createElement)(e.type,n,i?null:t)}let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t!==`ref`&&t!==`children`&&(n[t]=e.props[t])}),(0,L.cloneElement)(e,n,i?null:t)}))},g=(e,n,a)=>{let l=wS(e),u=wS(n),d={};return u.reduce((e,n,u)=>{let f=n.children?.[0]?.content&&r.services.interpolator.interpolate(n.children[0].content,p,r.language);if(n.type===`tag`){let _=l[parseInt(n.name,10)];!_&&t&&(_=t[n.name]),a.length===1&&!_&&(_=a[0][n.name]),_||={};let v={...n.attrs};o&&Object.keys(v).forEach(e=>{let t=v[e];lS(t)&&(v[e]=mS(t))});let y=Object.keys(v).length===0?_:TS({props:v},_),b=(0,L.isValidElement)(y),x=b&&xS(n,!0)&&!n.voidElement,S=c&&uS(y)&&y.dummy&&!b,C=uS(t)&&Object.hasOwnProperty.call(t,n.name);if(lS(y)){let t=r.services.interpolator.interpolate(y,p,r.language);e.push(t)}else if(xS(y)||x){let t=m(y,n,a);h(y,t,e,u)}else if(S){let t=g(l,n.children,a);h(y,t,e,u)}else if(Number.isNaN(parseFloat(n.name))){if
49(C){let t=m(y,n,a);h(y,t,e,u,n.voidElement)}else if(i.transSupportBasicHtmlNodes&&s.indexOf(n.name)>-1){if(n.voidElement)e.push((0,L.createElement)(n.name,{key:`${n.name}-${u}`}));else{let t=d[n.name]||0;d[n.name]=t+1;let r,i=0;for(let e=0;e<l.length;e+=1){let a=l[e];if((0,L.isValidElement)(a)&&a.type===n.name){if(i===t){r=a;break}i+=1}}let o=r?wS(SS(r)):l,s=g(o,n.children,a);e.push((0,L.createElement)(n.name,{key:`${n.name}-${u}`},s))}}else if(n.voidElement)e.push(`<${n.name} />`);else{let t=g(l,n.children,a);e.push(`<${n.name}>${t}</${n.name}>`)}}else if(uS(y)&&!b){let t=n.children[0]?f:null;t&&e.push(t)}else h(y,f,e,u,n.children.length!==1||!f)}else if(n.type===`text`){let t=i.transWrapTextNodes,a=typeof i.unescape==`function`?i.unescape:_S().unescape,s=o?a(r.services.interpolator.interpolate(n.content,p,r.language)):r.services.interpolator.interpolate(n.content,p,r.language);t?e.push((0,L.createElement)(t,{key:`${n.name}-${u}`},s)):e.push(s)}return e},[])};return SS(g([{dummy:!0,children:e||[]}],f,wS(e||[]))[0])},kS=(e,t,n)=>{let r=e.key||t,i=(0,L.cloneElement)(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function a(){return(0,L.createElement)(L.Fragment,null,i)}return(0,L.createElement)(a,{key:r})},AS=(e,t)=>e.map((e,n)=>kS(e,n,t)),jS=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:kS(e[r],r,t)})}),n},MS=(e,t,n,r)=>e?Array.isArray(e)?AS(e,t):uS(e)?jS(e,t):(iS(n,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:r}),null):null,NS=e=>!uS(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function PS({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a={},values:o,defaults:s,components:c,ns:l,i18n:u,t:d,shouldUnescape:f,...p}){let m=u||bS();if(!m)return iS(m,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`,{i18nKey:r}),e;let h=d||m.t.bind(m)||(e=>e),g={..._S(),...m.options?.react},_=l||h.ns||m.options?.defaultNS;_=lS(_)?[_]:_||[`translation`];let{transDefaultProps:v}=g,y=v?.tOptions?{...v.tOptions,...a}:a,b=f??v?.shouldUnescape,x=v?.values?{...v.values,...o}:o,S=v?.components?{...v.components,...c}:c,C=DS(e,g,m,r),w=s||y?.defaultValue||C||g.transEmptyNodeValue||(typeof r==`function`?bx(r):r),{hashTransKey:T}=g,E=r||(T?T(C||w):C||w);o=m.options?.interpolation?.defaultVariables?x&&Object.keys(x).length>0?{...x,...m.options.interpolation.defaultVariables}:{...m.options.interpolation.defaultVariables}:x;let D=ES(e);D&&typeof D.count==`number`&&t===void 0&&(t=D.count);let O=o||t!==void 0&&!m.options?.interpolation?.alwaysFormat||!e?y.interpolation:{interpolation:{...y.interpolation,prefix:`#$?`,suffix:`?$#`}},k={...y,context:i||y.context,count:t,...o,...O,defaultValue:w,ns:_},ee=E?h(E,k):w;ee===E&&w&&(ee=w);let A=MS(S,ee,m,r),j=A||e,te=null;NS(A)&&(te=A,j=e);let ne=OS(j,te,ee,m,g,k,b),re=n??g.defaultTransParent;return re?(0,L.createElement)(re,p,ne):ne}var FS={type:`3rdParty`,init(e){gS(e.options.react),yS(e)}},IS=(0,L.createContext)(),LS=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};function RS({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a={},values:o,defaults:s,components:c,ns:l,i18n:u,t:d,shouldUnescape:f,...p}){let{i18n:m,defaultNS:h}=(0,L.useContext)(IS)||{},g=u||m||bS(),_=d||g?.t.bind(g);return PS({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a,values:o,defaults:s,components:c,ns:l||_?.ns||h||g?.options?.defaultNS,i18n:g,t:d,shouldUnescape:f,...p})}var zS=qi(),BS={t:(e,t)=>{if(lS(t))return t;if(uS(t)&&lS(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},VS=()=>()=>{},K=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,L.useContext)(IS)||{},a=n||r||bS();a&&!a.reportNamespaces&&(a.reportNamespaces=new LS),a||iS(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,L.useMemo)(()=>({..._S(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=lS(l)?[l]:l||[`translation`],d=(0,L.useMemo)(()=>u,u);
49a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,L.useRef)(0),p=(0,L.useCallback)(e=>{if(!a)return VS;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,L.useRef)(),h=(0,L.useCallback)(()=>{if(!a)return BS;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>cS(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,L.useState)(0),{t:v,ready:y}=(0,zS.useSyncExternalStore)(p,h,h);(0,L.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?sS(a,t.lng,d,e):oS(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,L.useRef)(null),S=(0,L.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,L.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(iS(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y){let e=!1;try{e=!1}catch{}throw e&&iS(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?sS(a,t.lng,d,n):oS(a,d,n)})}return w},HS=`/api/v1/auth`;async function US(e){let t=await B(`${HS}/register`,{method:`POST`,body:e,auth:!1,credentials:`include`});return wo(t.tokens),t}async function WS(e){let t=await B(`${HS}/login`,{method:`POST`,body:e,auth:!1,credentials:`include`});return wo(t.tokens),t}function GS(e){return B(`${HS}/me`,{signal:e})}function KS(e){return B(`${HS}/me`,{method:`PATCH`,body:e})}async function qS(e){await B(`${HS}/me/password`,{method:`POST`,body:e})}async function JS(e){await B(`${HS}/password/forgot`,{method:`POST`,body:e,auth:!1})}async function YS(e){await B(`${HS}/password/reset`,{method:`POST`,body:e,auth:!1}),To(`logout`)}async function XS(){try{await B(`${HS}/logout`,{method:`POST`,auth:!1,credentials:`include`})}finally{To(`logout`)}}async function ZS(){try{await B(`${HS}/logout-all`,{method:`POST`,credentials:`include`})}finally{To(`logout`)}}var QS={all:[`auth`],me:()=>[...QS.all,`me`],workspace:()=>[...QS.all,`workspace`],members:()=>[...QS.all,`workspace`,`members`],invites:()=>[...QS.all,`workspace`,`invites`],memberships:()=>[...QS.all,`memberships`],invite:e=>[...QS.all,`invite`,e]};function $S(){return pt({queryKey:QS.me(),queryFn:({signal:e})=>GS(e),enabled:Do().status!==`anonymous`,staleTime:3e5})}function lee(){let e=z();return mt({mutationFn:e=>WS(e),onSuccess:t=>{e.setQueryData(QS.me(),t.user)}})}function uee(){let e=z();return mt({mutationFn:e=>US(e),onSuccess:t=>{e.setQueryData(QS.me(),t.user)}})}function dee(){let e=z();return mt({mutationFn:()=>XS(),onSettled:()=>e.clear()})}function fee(){let e=z();return mt({mutationFn:()=>ZS(),onSettled:()=>e.clear()})}function pee(){return mt({mutationFn:e=>JS(e)})}function mee(){let e=z();return mt({mutationFn:e=>YS(e),onSuccess:()=>e.clear()})}function hee(){let e=z();return mt({mutationFn:e=>KS(e),onSuccess:t=>{e.setQueryData(QS.me(),t)}})}function gee(){return mt({mutationFn:({currentPassword:e,newPassword:t})=>qS({current_password:e,new_password:t})})}function eC(){return dt($S())}var tC=`/api/v1/auth`;function _ee(e){return B(`${tC}/workspace`,{signal:e})}function vee(e){return B(`${tC}/workspace`,{method:`PATCH`,body:e})}function nC(){return pt({queryKey:QS.workspace(),queryFn:({signal:e})=>_ee(e),enabled:Do().status!==`anonymous`,staleTime:3e5})}function yee(){let e=z();return mt({mutationFn:e=>vee(e),onSuccess:t=>{e.setQueryData(QS.workspace(),t)}})}function rC(){return dt(nC())}var bee=`/api/v1/auth`;function xee(e){return B(`${bee}/support`,{method:`POST`,body:e})}function See(){return mt({mutationFn:e=>xee(e)})}var iC=`/api/v1/auth`;function Cee(e){return B(`${iC}/workspace/members`,{signal:e})}function wee(e){return B(`${iC}/workspace/members/${encodeURIComponent(e)}`,{method:`DELETE`})}function Tee(e){return B(`${iC}/workspace/invites`,{signal:e})}function Eee(e){return B(`${iC}/workspace/invites`,{method:`POST`,body:e})}function Dee(e){return B(`${iC}/workspace/invites/${encodeURIComponent(e)}`,{method:`DELETE`})}function Oee(e,t){return B(`${iC}/invites/lookup`,{method:`POST`,body:{token:e},signal:t})}function kee(e){return B(`${iC}/invites/accept`,{method:`POST`,body:{token:e}})}function Aee(e){return B(`${iC}/memberships`,{signal:e})}function jee(e){return B(`${iC}/memberships/${encodeURIComponent(e)}`,{method:`DELETE`})}function Mee(){return pt({queryKey:QS.members(),queryFn:({signal:e})=>Cee(e),enabled:Do().status!==`anonymous`})}function Nee(){return pt({queryKey:QS.invites(),queryFn:({signal:e})=>Tee(e),enabled:Do().status!==`anonymous`})}function Pee(){return pt({queryKey:QS.memberships(),queryFn:({signal:e})=>Aee(e),enabled:Do().status!==`anonymous`})}function aC(){return dt(Mee())}function oC(){return dt(Nee())}function sC(){return dt(Pee())}function cC(e){return dt({queryKey:QS.invite(e??``),queryFn:({signal:t})=>Oee(e,t),enabled:e!==null,retry:!1,staleTime:1/0})}function lC(){let e=z();return mt({mutationFn:e=>Eee(e),onSuccess:()=>e.invalidateQueries({queryKey:QS.invites()})})}function uC(){let e=z();return mt({mutationFn:e=>Dee(e),onSuccess:()=>e.invalidateQueries({queryKey:QS.invites()})})}function dC(){let e=z();return mt({mutationFn:e=>wee(e),onSuccess:()=>e.invalidateQueries({queryKey:QS.members()})})}function fC(){let e=z();return mt({mutationFn:e=>jee(e),onSuccess:()=>e.invalidateQueries({queryKey:QS.memberships()})})}function pC(){let e=z();return mt({mutationFn:e=>kee(e),onSuccess:()=>e.invalidateQueries({queryKey:QS.memberships()})})}var mC={key:`validation.required`},hC={key:`validation.invalidEmail`},gC={key:`validation.passwordMismatch`};function _C(e){return{key:`validation.atLeast`,params:{n:e}}}function vC(e){return{key:`validation.atMost`,params:{n:e}}}var yC=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,bC=[`email`,`password`],xC=[`first_name`,`last_name`,`email`,`password`,`confirm_password`];function SC(e){return e.trim().toLowerCase()}function CC(e,t){let n={};for(let r of e){let e=t(r);e!==void 0&&(n[r]=e)}return n}function wC(e,t){let n=e.trim();if(n===``)return mC;if(n.length>t)return vC(t)}function TC(e){let t=SC(e);if(t===``)return mC;if(t.length>255)return vC(255);if(!yC.test(t))return hC}function EC(e,t){switch(e){case`email`:return TC(t.email);case`password`:return t.password===``?mC:void 0;default:return}}function DC(e){return CC(bC,t=>EC(t,e))}function OC(e,t){switch(e){case`first_name`:return wC(t.first_name,255);case`last_name`:return wC(t.last_name,255);case`email`:return TC(t.email);case`password`:return t.password===``?mC:t.password.length<10?_C(10):t.password.length>128?vC(128):void 0;case`confirm_password`:return t.confirm_password===``?mC:t.confirm_password===t.password?void 0:gC;default:return}}function kC(e){return CC(xC,t=>OC(t,e))}function AC(e){return{email:SC(e.email),password:e.password}}function jC(e){return{email:SC(e.email),password:e.password,first_name:e.first_name.trim(),last_name:e.last_name.trim()}}function MC({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card`,className:W(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),...t})}function NC({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-header`,className:W(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),...t})}function PC({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-title`,className:W(`leading-none font-semibold`,e),...t})}function FC({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-description`,className:W(`text-sm text-muted-foreground`,e),...t})}function IC({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-action`,className:W(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...t})}function LC({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-content`,className:W(`px-6`,e),...t})}function RC({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-footer`,className:W(`flex items-center px-6 [.border-t]:pt-6`,e),...t})}function zC({children:e}){return(0,R.jsx)(`main`,{className:`bg-background text-foreground flex min-h-dvh items-center justify-center px-6 py-12`,children:e})}function BC({title:e,description:t,children:n,footer:r}){return(0,R.jsx)(zC,{children:(0,R.jsxs)(MC,{className:`w-full max-w-sm`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{className:`text-xl`,children:e}),(0,R.jsx)(FC,{children:t})]}),(0,R.jsxs)(LC,{className:`flex flex-col gap-6`,children:[n,r?(0,R.jsx)(`p`,{className:`text-muted-foreground text-center text-sm`,children:r}):null]})]})})}function VC({className:e,type:t,...n}){return(0,R.jsx)(`input`,{type:t,"data-slot":`input`,className:W(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}function HC({className:e,...t}){return(0,R.jsx)(N_,{"data-slot":`label`,className:W(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function q({name:e,label:t,error:n,hint:r,...i}){let a=(0,L.useId)(),o=`${a}-error`,s=`${a}-hint`,c=[r===void 0?void 0:s,n===void 0?void 0:o].filter(e=>e!==void 0).join(` `)||void 0;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(HC,{htmlFor:a,children:t}),(0,R.jsx)(VC,{id:a,name:e,"aria-invalid":n!==void 0,"aria-describedby":c,...i}),r===void 0?null:(0,R.jsx)(`p`,{id:s,className:`text-muted-foreground text-xs`,children:r}),n===void 0?null:(0,R.jsx)(`p`,{id:o,className:`text-destructive text-sm`,children:n})]})}function UC({reason:e}){let{t}=K();if(e===null||e===`logout`)return null;let n={reused:t(`auth.session.reused`),expired:t(`auth.session.expired`)};return(0,R.jsx)(`div`,{role:`status`,className:`border-destructive/40 bg-destructive/10 text-destructive rounded-md border px-3 py-2 text-sm`,children:n[e]})}function WC({onSubmit:e,pending:t=!1,error:n=null,fieldErrors:r={}
49,sessionEndedReason:i=null,footer:a}){let{t:o}=K(),[s,c]=(0,L.useState)({}),[l,u]=(0,L.useState)({});function d(e){let t=new FormData(e);return{email:String(t.get(`email`)??``),password:String(t.get(`password`)??``)}}function f(e,t){let n=EC(e,d(t));c(t=>({...t,[e]:n}))}function p(e){return t=>{let n=t.currentTarget.form;n!==null&&f(e,n)}}function m(e){return t=>{if(u(t=>t[e]===!0?t:{...t,[e]:!0}),s[e]===void 0)return;let n=t.currentTarget.form;n!==null&&f(e,n)}}function h(e){let t=s[e];return t===void 0?l[e]===!0?void 0:r[e]:o(t.key,t.params)}function g(t){t.preventDefault();let n=t.currentTarget,r=d(n),i=DC(r);c(i);let a=bC.find(e=>i[e]!==void 0);if(a!==void 0){let e=n.elements.namedItem(a);e instanceof HTMLInputElement&&e.focus();return}u({}),e(AC(r))}return(0,R.jsxs)(BC,{title:o(`auth.login.title`),description:o(`auth.login.description`),footer:a,children:[(0,R.jsx)(UC,{reason:i}),(0,R.jsxs)(`form`,{onSubmit:g,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,R.jsx)(q,{name:`email`,label:o(`auth.login.email`),type:`email`,autoComplete:`email`,required:!0,error:h(`email`),onBlur:p(`email`),onChange:m(`email`)}),(0,R.jsx)(q,{name:`password`,label:o(`auth.login.password`),type:`password`,autoComplete:`current-password`,required:!0,error:h(`password`),onBlur:p(`password`),onChange:m(`password`)}),n===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:n}),(0,R.jsx)(G,{type:`submit`,disabled:t,children:o(t?`auth.login.submitting`:`auth.login.submit`)})]})]})}var GC=/^([A-Z][A-Z0-9_]*)(?::(.*))?$/;function KC(e,t){if(t===void 0)return e;let n=GC.exec(e);return n===null?e:t(`errors.${n[1]}`,{defaultValue:e,param:n[2]??``})}function qC(e,t,n){return n===void 0||!/^[A-Z][A-Z0-9_]*$/.test(e)?t:n(`errors.${e}`,{defaultValue:t})}var JC={firstname:`first_name`,lastname:`last_name`,refreshtoken:`refresh_token`,currentpassword:`current_password`,newpassword:`new_password`,durationminutes:`duration_minutes`};function YC(e,t){if(!ko(e)||!e.isValidationError)return{};let n={};for(let[r,i]of Object.entries(e.fields))r!==`_`&&(n[JC[r]??r]=KC(i,t));return n}function XC(e,t){if(e==null)return null;if(ko(e)){if(!e.isValidationError)return qC(e.code,e.message,t);let n=e.fields._;return n===void 0?Object.keys(e.fields).length===0?qC(e.code,e.message,t):null:KC(n,t)}return t===void 0?`Something went wrong. Please try again.`:t(`errors.UNEXPECTED`,{defaultValue:`Something went wrong. Please try again.`})}function ZC(e){return!ko(e)||!e.isValidationError||e.code!==`FORM_CONFIG_INVALID`?{}:e.fields}function QC(e,t){return t.size===0?e:Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e)))}function $C({onSuccess:e,footer:t}){let{t:n}=K(),r=lee(),i=Uo(e=>e.endedReason);function a(t){Eo(),r.mutate(t,{onSuccess:e})}return(0,R.jsx)(WC,{onSubmit:a,pending:r.isPending,error:XC(r.error,n),fieldErrors:YC(r.error,n),sessionEndedReason:i,footer:t})}var ew=`https://calendhub.com/terms-of-service`,tw=`https://calendhub.com/privacy-policy`;function nw({href:e,children:t}){return(0,R.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary underline`,children:t})}function rw({onSubmit:e,pending:t=!1,error:n=null,fieldErrors:r={},footer:i}){let{t:a}=K(),[o,s]=(0,L.useState)({}),[c,l]=(0,L.useState)({});function u(e){let t=new FormData(e);return{first_name:String(t.get(`first_name`)??``),last_name:String(t.get(`last_name`)??``),email:String(t.get(`email`)??``),password:String(t.get(`password`)??``),confirm_password:String(t.get(`confirm_password`)??``)}}function d(e,t){let n=u(t);s(t=>{let r={...t};return r[e]=OC(e,n),e===`password`&&t.confirm_password!==void 0&&(r.confirm_password=OC(`confirm_password`,n)),r})}function f(e){return t=>{let n=t.currentTarget.form;n!==null&&d(e,n)}}function p(e){return t=>{if(l(t=>t[e]===!0?t:{...t,[e]:!0}),o[e]===void 0)return;let n=t.currentTarget.form;n!==null&&d(e,n)}}function m(e){let t=o[e];return t===void 0?c[e]===!0?void 0:r[e]:a(t.key,t.params)}function h(t){t.preventDefault();let n=t.currentTarget,r=u(n),i=kC(r);s(i);let a=xC.find(e=>i[e]!==void 0);if(a!==void 0){let e=n.elements.namedItem(a);e instanceof HTMLInputElement&&e.focus();return}l({}),e(jC(r))}return(0,R.jsx)(BC,{title:a(`auth.register.title`),description:a(`auth.register.description`),footer:i,children:(0,R.jsxs)(`form`,{onSubmit:h,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,R.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,R.jsx)(q,{name:`first_name`,label:a(`auth.register.firstName`),autoComplete:`given-name`,maxLength:255,required:!0,error:m(`first_name`),onBlur:f(`first_name`),onChange:p(`first_name`)}),(0,R.jsx)(q,{name:`last_name`,label:a(`auth.register.lastName`),autoComplete:`family-name`,maxLength:255,required:!0,error:m(`last_name`),onBlur:f(`last_name`),onChange:p(`last_name`)})]}),(0,R.jsx)(q,{name:`email`,label:a(`auth.register.email`),type:`email`,autoComplete:`email`,maxLength:255,required:!0,error:m(`email`),onBlur:f(`email`),onChange:p(`email`)}),(0,R.jsx)(q,{name:`password`,label:a(`auth.register.password`),type:`password`,autoComplete:`new-password`,minLength:10,maxLength:128,hint:a(`validation.atLeast`,{n:10}),required:!0,error:m(`password`),onBlur:f(`password`),onChange:p(`password`)}),(0,R.jsx)(q,{name:`confirm_password`,label:a(`auth.register.confirmPassword`),type:`password`,autoComplete:`new-password`,maxLength:128,required:!0,error:m(`confirm_password`),onBlur:f(`confirm_password`),onChange:p(`confirm_password`)}),n===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:n}),(0,R.jsx)(G,{type:`submit`,disabled:t,children:a(t?`auth.register.submitting`:`auth.register.submit`)}),(0,R.jsx)(`p`,{"data-kit":`register-form-legal`,className:`text-muted-foreground text-xs`,children:(0,R.jsx)(RS,{t:a,i18nKey:`auth.register.legal`,components:{terms:(0,R.jsx)(nw,{href:ew}),privacy:(0,R.jsx)(nw,{href:tw})}})})]})})}function iw({onSuccess:e,footer:t}){let{t:n}=K(),r=uee();function i(t){r.mutate(t,{onSuccess:e})}return(0,R.jsx)(rw,{onSubmit:i,pending:r.isPending,error:XC(r.error,n),fieldErrors:YC(r.error,n),footer:t})}function aw({onSubmit:e,pending:t=!1,sent:n=!1,error:r=null,fieldErrors:i={},footer:a}){let{t:o}
49=K(),[s,c]=(0,L.useState)(``),[l,u]=(0,L.useState)(void 0),[d,f]=(0,L.useState)(!1);function p(e){return EC(`email`,{email:e,password:``})}function m(t){t.preventDefault();let n=p(s);if(u(n),n!==void 0){let e=t.currentTarget.elements.namedItem(`email`);e instanceof HTMLInputElement&&e.focus();return}f(!1),e({email:SC(s)})}let h=l===void 0?d?void 0:i.email:o(l.key,l.params);return(0,R.jsx)(BC,{title:o(`auth.forgot.title`),description:o(`auth.forgot.description`),footer:a,children:n?(0,R.jsx)(`p`,{role:`status`,className:`text-sm`,children:o(`auth.forgot.sent`)}):(0,R.jsxs)(`form`,{onSubmit:m,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,R.jsx)(q,{name:`email`,label:o(`auth.forgot.email`),type:`email`,autoComplete:`email`,required:!0,value:s,error:h,onBlur:()=>u(p(s)),onChange:e=>{c(e.target.value),f(!0),l!==void 0&&u(p(e.target.value))}}),r===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:r}),(0,R.jsx)(G,{type:`submit`,disabled:t,children:o(t?`auth.forgot.submitting`:`auth.forgot.submit`)})]})})}function ow({footer:e}){let{t}=K(),n=pee();function r(e){n.mutate(e)}return(0,R.jsx)(aw,{onSubmit:r,pending:n.isPending,sent:n.isSuccess,error:XC(n.error,t),fieldErrors:YC(n.error,t),footer:e})}function sw({onSubmit:e,missingToken:t=!1,pending:n=!1,done:r=!1,error:i=null,showRequestNew:a=!1,fieldErrors:o={},signInLink:s,requestNewLink:c}){let{t:l}
49=K(),[u,d]=(0,L.useState)(``),[f,p]=(0,L.useState)(``),[m,h]=(0,L.useState)({}),[g,_]=(0,L.useState)(!1);function v(e,t){return{first_name:``,last_name:``,email:``,password:e,confirm_password:t}}function y(e,t,n){return OC(e,v(t,n))}function b(t){t.preventDefault();let n=t.currentTarget,r={},i=y(`password`,u,f),a=y(`confirm_password`,u,f);i!==void 0&&(r.password=i),a!==void 0&&(r.confirm_password=a),h(r);let o=i===void 0?a===void 0?void 0:`confirm_password`:`password`;if(o!==void 0){let e=n.elements.namedItem(o);e instanceof HTMLInputElement&&e.focus();return}_(!1),e({newPassword:u})}function x(e){let t=m[e];return t===void 0?void 0:l(t.key,t.params)}let S=x(`password`)??(g?void 0:o.new_password);function C(e,t,n){h(r=>{let i={...r};for(let r of n){let n=y(r,e,t);n===void 0?delete i[r]:i[r]=n}return i})}return(0,R.jsx)(BC,{title:l(`auth.reset.title`),description:l(`auth.reset.description`),children:t?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:l(`auth.reset.missingToken`)}),(0,R.jsx)(`p`,{className:`text-sm`,children:c})]}):r?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{role:`status`,className:`text-sm`,children:l(`auth.reset.done`)}),(0,R.jsx)(`p`,{className:`text-sm`,children:s})]}):(0,R.jsxs)(`form`,{onSubmit:b,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,R.jsx)(q,{name:`password`,label:l(`auth.reset.password`),type:`password`,autoComplete:`new-password`,required:!0,value:u,error:S,onBlur:()=>C(u,f,[`password`]),onChange:e=>{let t=e.target.value;d(t),_(!0);let n=[];m.password!==void 0&&n.push(`password`),m.confirm_password!==void 0&&n.push(`confirm_password`),n.length>0&&C(t,f,n)}}),(0,R.jsx)(q,{name:`confirm_password`,label:l(`auth.reset.confirmPassword`),type:`password`,autoComplete:`new-password`,required:!0,value:f,error:x(`confirm_password`),onBlur:()=>C(u,f,[`confirm_password`]),onChange:e=>{let t=e.target.value;p(t),m.confirm_password!==void 0&&C(u,t,[`confirm_password`])}}),i===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:i}),a?(0,R.jsx)(`p`,{className:`text-sm`,children:c}):null,(0,R.jsx)(G,{type:`submit`,disabled:n,children:l(n?`auth.reset.submitting`:`auth.reset.submit`)})]})})}function cw({token:e,signInLink:t,requestNewLink:n}){let{t:r}=K(),i=mee(),a=i.error,o=ko(a)&&(a.code===`RESET_TOKEN_INVALID`||`token`in a.fields);function s(t){e!==null&&i.mutate({token:e,new_password:t.newPassword})}return(0,R.jsx)(sw,{onSubmit:s,missingToken:e===null,pending:i.isPending,done:i.isSuccess,error:o?r(`errors.RESET_TOKEN_INVALID`):XC(a,r),showRequestNew:o,fieldErrors:YC(a,r),signInLink:t,requestNewLink:n})}function lw(e){return typeof e!=`string`||e.length===0||!e.startsWith(`/`)||e.startsWith(`//`)||e.startsWith(`/\\`)?null:e}function uw(e){let t=lw(e.redirect);return{redirect:t===null?void 0:t}}var dw=Ta({getParentRoute:()=>Hb,path:`/login`,validateSearch:uw,component:fw});function fw(){let{t:e}=K(),t=wi(),{redirect:n}=dw.useSearch();return(0,R.jsx)($C,{onSuccess:()=>{let e=lw(n);if(e===null){t.navigate({to:`/dashboard`});return}t.history.push(e)},footer:(0,R.jsxs)(R.Fragment,{children:[e(`auth.login.noAccount`),` `,(0,R.jsx)(Sa,{to:`/register`,search:{redirect:n},className:`text-primary underline`,children:e(`auth.login.createOne`)}),(0,R.jsx)(`span`,{className:`mt-2 block`,children:(0,R.jsx)(Sa,{to:`/forgot-password`,className:`text-primary underline`,children:e(`auth.login.forgotPassword`)})})]})})}var pw=Ta({getParentRoute:()=>Hb,path:`/register`,validateSearch:uw,component:mw});function mw(){let{t:e}=K(),t=wi(),{redirect:n}=pw.useSearch();return(0,R.jsx)(iw,{onSuccess:()=>{let e=lw(n);if(e===null){t.navigate({to:`/dashboard`});return}t.history.push(e)},footer:(0,R.jsxs)(R.Fragment,{children:[e(`auth.register.haveAccount`),` `,(0,R.jsx)(Sa,{to:`/login`,search:{redirect:n},className:`text-primary underline`,children:e(`auth.register.signIn`)})]})})}var hw=Ta({getParentRoute:()=>Hb,path:`/forgot-password`,component:gw});function gw(){let{t:e}=K();return(0,R.jsx)(ow,{footer:(0,R.jsx)(Sa,{to:`/login`,className:`text-primary underline`,children:e(`auth.forgot.backToSignIn`)})})}function _w(e){let t=e.token;return{token:typeof t==`string`&&t.length>0&&t.length<=256?t:void 0}}var vw=Ta({getParentRoute:()=>Hb,path:`/reset-password`,validateSearch:_w,component:yw});function yw(){let{t:e}=K(),t=oa(),{token:n}
49=vw.useSearch(),[r]=(0,L.useState)(n??null);return(0,L.useEffect)(()=>{n!==void 0&&t({to:`/reset-password`,search:{},replace:!0})},[n,t]),(0,R.jsx)(cw,{token:r,signInLink:(0,R.jsx)(Sa,{to:`/login`,className:`text-primary underline`,children:e(`auth.reset.signIn`)}),requestNewLink:(0,R.jsx)(Sa,{to:`/forgot-password`,className:`text-primary underline`,children:e(`auth.reset.requestNew`)})})}var bw=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),xw=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Sw=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Cw=e=>{let t=Sw(e);return t.charAt(0).toUpperCase()+t.slice(1)},ww={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Tw=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ew=(0,L.createContext)({}),Dw=()=>(0,L.useContext)(Ew),Ow=(0,L.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Dw()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,L.createElement)(`svg`,{ref:c,...ww,width:t??l??ww.width,height:t??l??ww.height,stroke:e??f,strokeWidth:m,className:bw(`lucide`,p,i),...!a&&!Tw(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,L.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),J=(e,t)=>{let n=(0,L.forwardRef)(({className:n,...r},i)=>(0,L.createElement)(Ow,{ref:i,iconNode:t,className:bw(`lucide-${xw(Cw(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Cw(e),n},kw=J(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),Aw=J(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),jw=J(`badge-check`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Mw=J(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Nw=J(`bookmark-plus`,[[`path`,{d:`M12 7v6`,key:`lw1j43`}],[`path`,{d:`M15 10H9`,key:`o6yqo3`}],[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]),Pw=J(`briefcase`,[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]),Fw=J(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),Iw=J(`cake`,[[`path`,{d:`M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8`,key:`1w3rig`}],[`path`,{d:`M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1`,key:`n2jgmb`}],[`path`,{d:`M2 21h20`,key:`1nyx9w`}],[`path`,{d:`M7 8v3`,key:`1qtyvj`}],[`path`,{d:`M12 8v3`,key:`hwp4zt`}],[`path`,{d:`M17 8v3`,key:`1i6e5u`}],[`path`,{d:`M7 4h.01`,key:`1bh4kh`}],[`path`,{d:`M12 4h.01`,key:`1ujb9j`}],[`path`,{d:`M17 4h.01`,key:`1upcoc`}]]),Lw=J(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),Rw=J(`calendar-days`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]),zw=J(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}
49]]),Bw=J(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Vw=J(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Hw=J(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Uw=J(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ww=J(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Gw=J(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),Kw=J(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),qw=J(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Jw=J(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Yw=J(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Xw=J(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Zw=J(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Qw=J(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),$w=J(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),eT=J(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),tT=J(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),nT=J(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),rT=J(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),iT=J(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),aT=J(`headphones`,[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`,key:`1xhozi`}]]),oT=J(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),sT=J(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),cT=J(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),lT=J(`layout-template`,[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]),uT=J(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),dT=J(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),fT=J(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),pT=J(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),mT=J(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}
49]]),hT=J(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),gT=J(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),_T=J(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),vT=J(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),yT=J(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),bT=J(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),xT=J(`plane-takeoff`,[[`path`,{d:`M2 22h20`,key:`272qi7`}],[`path`,{d:`M6.36 17.4 4 17l-2-4 1.1-.55a2 2 0 0 1 1.8 0l.17.1a2 2 0 0 0 1.8 0L8 12 5 6l.9-.45a2 2 0 0 1 2.09.2l4.02 3a2 2 0 0 0 2.1.2l4.19-2.06a2.41 2.41 0 0 1 1.73-.17L21 7a1.4 1.4 0 0 1 .87 1.99l-.38.76c-.23.46-.6.84-1.07 1.08L7.58 17.2a2 2 0 0 1-1.22.18Z`,key:`fkigj9`}]]),ST=J(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),CT=J(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),wT=J(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),TT=J(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),ET=J(`repeat`,[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]),DT=J(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),OT=J(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),kT=J(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),AT=J(`sun-moon`,[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715`,key:`xlf6rm`}],[`path`,{d:`M16 12a4 4 0 0 0-4-4`,key:`6vsxu`}],[`path`,{d:`m19 5-1.256 1.256`,key:`1yg6a6`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}]]),jT=J(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}
49]]),MT=J(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),NT=J(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),PT=J(`text-cursor-input`,[[`path`,{d:`M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6`,key:`1528k5`}],[`path`,{d:`M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7`,key:`13ksps`}],[`path`,{d:`M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1`,key:`1n9rhb`}],[`path`,{d:`M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1`,key:`1mj8rg`}],[`path`,{d:`M9 6v12`,key:`velyjx`}]]),FT=J(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),IT=J(`trending-down`,[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]),LT=J(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),RT=J(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),zT=J(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),BT=J(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),VT=J(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),HT=J(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),UT=`calendhub.theme`,WT=[`light`,`dark`,`system`];function GT(e){return typeof e==`string`&&WT.includes(e)}function KT(e,t){return e===`system`?t?`dark`:`light`:e}function qT(e,t){t.classList.toggle(`dark`,e===`dark`)}function JT(e){if(e===null)return`system`;try{let t=e.getItem(UT);return GT(t)?t:`system`}catch{return`system`}}function YT(e,t){if(e!==null)try{e.setItem(UT,t)}catch{}}var XT=typeof window<`u`,ZT=XT?window.localStorage:null,QT=XT&&typeof window.matchMedia==`function`?window.matchMedia(`(prefers-color-scheme: dark)`):null;function $T(){return QT?.matches??!1}var eE=JT(ZT),tE=new ho({preference:eE,resolved:KT(eE,$T())});function nE(){XT&&qT(tE.state.resolved,document.documentElement)}function rE(e){YT(ZT,e),tE.setState(()=>({preference:e,resolved:KT(e,$T())})),nE()}nE(),QT?.addEventListener(`change`,e=>{tE.state.preference===`system`&&(tE.setState(t=>({...t,resolved:KT(`system`,e.matches)})),nE())}),XT&&window.addEventListener(`storage`,e=>{if(e.key!==`calendhub.theme`)return;let t=GT(e.newValue)?e.newValue:`system`;tE.setState(()=>({preference:t,resolved:KT(t,$T())})),nE()});function iE(){return Ho(tE,e=>e.preference)}var aE=`/api/v1/auth`;function oE(e){return B(`${aE}/me/preferences`,{signal:e})}function sE(e){return B(`${aE}/me/preferences`,{method:`PATCH`,body:e})}var cE={all:[`preferences`],me:()=>[...cE.all,`me`]};function lE(){return pt({queryKey:cE.me(),queryFn:({signal:e})=>oE(e),enabled:Do().status!==`anonymous`,staleTime:3e5})}function uE(){let e=z();return mt({mutationFn:e=>sE(e),onMutate:async t=>{await e.cancelQueries({queryKey:cE.me()});let n=e.getQueryData(cE.me());return n!==void 0&&e.setQueryData(cE.me(),{...n,...t}),{previous:n}},onError:(t,n,r)=>{r?.previous!==void 0&&e.setQueryData(cE.me(),r.previous)},onSuccess:t=>{e.setQueryData(cE.me(),t)}})}var dE=[`timeGridWeek`,`timeGridDay`,`dayGridMonth`,`listWeek`,`listSchedule`],fE=[{key:`timeGridWeek`,labelKey:`calendar.toolbar.week`,shortcut:`w`},{key:`timeGridDay`,labelKey:`calendar.toolbar.day`,shortcut:`d`},{key:`dayGridMonth`,labelKey:`calendar.toolbar.month`,shortcut:`m`},{key:`listWeek`,labelKey:`calendar.toolbar.list`,shortcut:`l`},{key:`listSchedule`,labelKey:`calendar.toolbar.schedule`,shortcut:`a`}];function pE(e){let t=[`chub-event`];switch(mE(e)&&t.push(`chub-event--oof`),e.eventType){case`focus_time`:t.push(`chub-event--focus`);break;case`birthday`:t.push(`chub-event--birthday`);break;case`working_location`:t.push(`chub-event--working-location`);break;case`from_gmail`:t.push(`chub-event--from-gmail`)}return t}function mE(e){return e.eventType===`out_of_office`||e.busy===`oof`}function hE(e){if(e.eventType!==`working_location`)return{label:``,labelKey:``};let t=e.statusProperties?.workingLocation;if(!t)return{label:``,labelKey:``};if(t.label)return{label:t.label,labelKey:``};switch(t.type){case`home_office`:return{label:``,labelKey:`calendar.workingLocation.home`};case`office_location`:return{label:``,labelKey:`calendar.workingLocation.office`};default:return{label:``,labelKey:``}}}var gE=[`default`,`out_of_office`,`focus_time`,`working_location`],_E={default:`calendar.eventType.default`,out_of_office:`calendar.eventType.out_of_office`,focus_time:`calendar.eventType.focu
49s_time`,working_location:`calendar.eventType.working_location`,birthday:`calendar.eventType.birthday`,from_gmail:`calendar.eventType.from_gmail`},vE=[`default`,`out_of_office`,`focus_time`,`working_location`,`birthday`,`from_gmail`];function yE(e,t){return e!==`out_of_office`&&e!==`focus_time`||t!==`google`}function bE(e,t=``){let n=yE(e,t);switch(e){case`out_of_office`:return{allDayAllowed:n,busy:`oof`,visibility:`default`,maxAllDayDays:0,showDecline:!0,showChatStatus:!1,showWorkingLocation:!1};case`focus_time`:return{allDayAllowed:n,busy:`busy`,visibility:`default`,maxAllDayDays:0,showDecline:!0,showChatStatus:!0,showWorkingLocation:!1};case`working_location`:return{allDayAllowed:n,busy:`free`,visibility:`public`,maxAllDayDays:1,showDecline:!1,showChatStatus:!1,showWorkingLocation:!0};default:return{allDayAllowed:n,busy:`busy`,visibility:`default`,maxAllDayDays:0,showDecline:!1,showChatStatus:!1,showWorkingLocation:!1}}}function xE(e){switch(e.eventType){case`birthday`:return`calendar.readOnly.birthday`;case`from_gmail`:return`calendar.readOnly.fromGmail`}return e.expanded===!0&&e.status===`cancelled`?`calendar.readOnly.occurrence`:e.organizer&&!e.organizer.self?`calendar.readOnly.attendee`:(e.connections??[]).find(e=>e.provider!==`google`)?`calendar.readOnly.foreignProvider`:`calendar.readOnly.default`}var SE=[`en`,`es`,`de`,`fr`,`pt-BR`,`it`,`sq`];function CE(e){return SE.includes(e)}var wE={en:`English`,es:`Español`,de:`Deutsch`,fr:`Français`,"pt-BR":`Português (Brasil)`,it:`Italiano`,sq:`Shqip`};function TE(e){if(!e)return null;let t=e.toLowerCase();for(let e of SE)if(e.toLowerCase()===t)return e;switch(e.split(`-`)[0].toLowerCase()){case`en`:return`en`;case`es`:return`es`;case`de`:return`de`;case`fr`:return`fr`;case`it`:return`it`;case`sq`:return`sq`;case`pt`:return`pt-BR`;default:return null}}function EE(){if(typeof navigator>`u`)return`en`;if(navigator.languages&&navigator.languages.length>0)for(let e of navigator.languages){let t=TE(e);if(t)return t}return TE(navigator.language)||`en`}var DE={common:{save:`Save changes`,saving:`Savingâ¦`,saved:`Saved`,comingSoon:`Coming soon`,colour:{label:`Colour`,presets:`{{label}} presets`,picker:`{{label}} picker`,swatch:{default:`Default`,red:`Red`,orange:`Orange`,amber:`Amber`,green:`Green`,emerald:`Emerald`,teal:`Teal`,cyan:`Cyan`,blue:`Blue`,indigo:`Indigo`,violet:`Violet`,pink:`Pink`,slate:`Slate`}},pagination:{pageOf:`Page {{page}} of {{pageCount}}`,previous:`Previous`,next:`Next`}},errors:{UNEXPECTED:`Something went wrong. Please try again.`,NETWORK:`Could not reach the server. Check your connection.`,REQUIRED:`This field is required.`,INVALID_EMAIL:`Must be a valid email address.`,MIN_LENGTH:`Must be at least {{param}} characters.`,MAX_LENGTH:`Must be at most {{param}} characters.`,EXACT_LENGTH:`Must be exactly {{param}} characters.`,INVALID_HEX_COLOR:`Must be a hex colour such as #3b82f6.`,INVALID_VALUE:`Invalid value.`,BODY_MALFORMED:`Request body is malformed.`,WRONG_TYPE:`This field has the wrong type.`,IMAGE_TOO_LARGE:`Image is too large. Use a smaller picture.`,IMAGE_UNSUPPORTED_TYPE:`Image must be a PNG or JPEG.`,IMAGE_INVALID:`Image could not be read.`,EMAIL_TAKEN:`That email is already registered.`,TOKEN_REUSED:`This session was ended for security reasons. Please sign in again.`,RESET_TOKEN_INVALID:`This reset link is invalid or has expired. Request a new one.`,INVALID_URL:`Must be a valid http(s) URL.`,INVALID_DATE:`Must be a date as YYYY-MM-DD.`,DATE_IN_FUTURE:`Must not be in the future.`,WORKSPACE_UNNAMED:`Name your company before inviting people.`,ALREADY_MEMBER:`Already a member of this company.`,EMAIL_CAP_REACHED:`Too many emails today. Try again tomorrow.`,INVITE_INVALID:`This invite link is invalid or has expired. Ask for a new one.`,INVITE_NOT_FOUND:`Invite not found.`,MEMBER_NOT_FOUND:`Member not found.`,MEMBERSHIP_NOT_FOUND:`You are not a member of that company.`,OWNER_CANNOT_LEAVE:`The owner cannot leave or be removed.`,WORKFLOW_EXISTS:`A workflow for these two calendars already exists.`,WORKFLOW_LIMIT_REACHED:`Your plan allows no more workflows.`,WORKFLOW_SAME_CALENDAR:`Choose two different calendars.`,WORKFLOW_NOT_FOUND:`No such workflow.`,WORKFLOW_CHECK_FAILED:`Could not reach your calendars. Try again.`,CO_HOSTS_NOT_IN_PLAN:`Your plan does not include this many co-hosts.`,MEMBERS_UNAVAILABLE:`Your company's members could not be checked. Try again.`,CALENDAR_NOT_FOUND:`Calendar not found.`,EVENT_READ_ONLY:`This event is synced from a connected calendar. Edit it there instead.`,EVENT_TYPE_IMMUTABLE:`An event's type cannot be changed after it is created.`,OCCURRENCE_NOT_EDITABLE:`Occurrences of a repeating event cannot be edited yet.`,PUSH_CONFLICT:`The connected calendar changed this event first. Reload and try again.`,PUSH_FAILED:`Saved here, but the connected calendar could not be reached.`,PUSH_NO_BASELINE:`This event is still syncing. Try again in a moment.`,CONNECTION_NOT_FOUND:`No such connected calendar.`,CONNECTION_REVOKED:`That calendar connection needs to be reconnected.`,PROVIDER_NOT_WRITABLE:`Events cannot be created in that calendar yet.`,HANDLE_TAKEN:`That handle is already in use.`,HANDLE_REQUIRED:`Claim your booking page handle first.`,HANDLE_NOT_FOUND:`Handle not found.`,SLUG_TAKEN:`You already have a link
49with that URL.`,LINK_NOT_FOUND:`Link not found.`,LINK_OFFLINE:`This link is not taking bookings.`,INPUT_NOT_FOUND:`Input not found.`,BOOKING_NOT_FOUND:`Booking not found.`,SLOT_TAKEN:`The slot has been booked by another guest.`,SLOT_NOT_AVAILABLE:`The requested slot is not available.`,RATE_LIMITED:`Too many requests.`,TOKEN_USED:`Cancel token has already been used.`,CONNECTION_LIMIT_REACHED:`You have reached the connected calendar account limit for your plan.`,LINK_LIMIT_REACHED:`You have reached the booking link limit for your plan.`,INPUT_LIMIT:`You can save up to {{param}} inputs.`},nav:{dashboard:`Dashboard`,calendar:`Calendar`,booking:`Booking`,team:`Team`,services:`Services`,products:`Products`,pages:`Pages`,forms:`Forms`,inputs:`Inputs`,integrations:`Integrations`,workflows:`Workflows`,settings:`Settings`,support:`Support`,feedback:`Feedback`,account:`Account`,preferences:`Preferences`,groups:{scheduling:`Scheduling`,catalog:`Catalog`,build:`Build`,automate:`Automate`},notificationsComingSoon:`Notifications â coming soon`,premium:`Premium`},accountMenu:{openMenu:`Open user menu`,account:`Account`,preferences:`Preferences`,theme:`Theme`,light:`Light`,dark:`Dark`,system:`System`,upgrade:`Upgrade`,logOut:`Log out`},auth:{login:{title:`Sign in`,description:`Welcome back to CalendHub.`,email:`Email`,password:`Password`,submit:`Sign in`,submitting:`Signing inâ¦`,noAccount:`No account?`,createOne:`Create one`,forgotPassword:`Forgot password?`},register:{title:`Create an account`,description:`Start scheduling in a couple of minutes.`,firstName:`First name`,lastName:`Last name`,email:`Email`,password:`Password`,confirmPassword:`Confirm password`,submit:`Create account`,submitting:`Creating accountâ¦`,haveAccount:`Already have an account?`,signIn:`Sign in`,legal:`By creating an account, you agree to the <terms>Terms of Service</terms> and the <privacy>Privacy Policy</privacy>.`},forgot:{title:`Reset your password`,description:`Enter your account email and we will send you a link to choose a new password.`,email:`Email`,submit:`Send reset link`,submitting:`Sendingâ¦`,sent:`If an account exists for that email, we have sent a link to reset your password. The link works for 1 hour.`,backToSignIn:`Back to sign in`},reset:{title:`Choose a new password`,description:`Resetting your password signs you out on every device.`,password:`New password`,confirmPassword:`Confirm new password`,submit:`Set new password`,submitting:`Savingâ¦`,missingToken:`This reset link is incomplete. Request a new one.`,requestNew:`Request a new link`,done:`Your password was changed. Sign in with your new password.`,signIn:`Sign in`},session:{expired:`Your session expired. Please sign in again.`,reused:`Your sessions were ended for security reasons. Please sign in again.`}},account:{title:`Account`,description:`Your profile, and how you appear to the people who book with you.`,firstName:`First name`,lastName:`Last name`,phone:`Phone`,phoneHint:`Used to prefill the number on phone-call booking links.`,email:`Email`,emailHint:`Your email is how you sign in and cannot be changed here.`,password:{current:`Current password`,new:`New password`,confirm:`Confirm new password`,submit:`Change password`,submitting:`Changingâ¦`,changed:`Password changed. Other devices were signed out.`}},address:{line1:`Address line 1`,line2:`Address line 2`,city:`City`,region:`Region`,postalCode:`Postal code`,country:`Country`,selectCountry:`Select country`,pinned:`Pinned at {{latitude}}, {{longitude}}`,clearPin:`Clear`},location:{label:`Location`,type:{unspecified:`Not specified`,inPerson:`In person`,video:`Video call`,phone:`Phone call`},prefilled:{preferences:`Prefilled from your preferences`,workspace:`Prefilled from your workspace`},phone:{label:`Phone number`,hint:`The number the invitee calls at the booked time.`,prefilledFromAccount:`Prefilled from your account.`},video:{label:`Meeting provider`,unspecified:`Not specified`,notConnected:`not connected`,notAvailableYet:`not available yet`,account:`Host account`,accountUnspecified:`Not chosen`,accountHint:`The {{provider}} account that creates the meeting.`,revoked:`reconnect needed`,url:`Meeting link`,urlHint:`Everyone who books gets this
49same link.`}},preferences:{title:`Preferences`,description:`How CalendHub looks and reads for you.`,deviceOnly:`Applies right away, on this device only.`,sections:{appearance:`Appearance`,region:`Region & time`,calendar:`Calendar`,notifications:`Notifications`,defaultLocation:`Default location`},region:{language:{label:`Language`,system:`Match my device`,machineDraft:`{{name}} (beta)`},weekStart:{label:`Week starts on`,monday:`Monday`,sunday:`Sunday`},timeFormat:{label:`Time format`,system:`Match my device`,h12:`12-hour (1:30 PM)`,h24:`24-hour (13:30)`},dateFormat:{label:`Date format`,system:`Match my device`,dmy:`31/12/2026`,mdy:`12/31/2026`,ymd:`2026-12-31`},timezone:{label:`Your timezone`}},theme:{label:`Theme`,hint:`System follows your operating system setting.`,light:`Light`,dark:`Dark`,system:`System`},defaultView:{label:`Default calendar view`,hint:`Which view the calendar opens on, on this device.`,month:`Month`,week:`Week`,day:`Day`,list:`List`,schedule:`Schedule`},defaultLocation:{description:`Used to fill in new services and products. Changing it does not change anything you have already saved.`},notifications:{title:`Email notifications`,description:`CalendHub emails you when something happens on your booking links.`,bookingCreated:`Email me when a booking is made`,bookingCancelled:`Email me when a booking is cancelled`}},dashboard:{greeting:{morning:`Good morning`,afternoon:`Good afternoon`,evening:`Good evening`},welcomeAnonymous:`{{greeting}}`,welcome:`{{greeting}}, {{name}}`,dateLine_one:`{{date}} · {{count}} event on your calendar today`,dateLine_other:`{{date}} · {{count}} events on your calendar today`,periodLabel:`Period`,session:{signOutEverywhere:`Sign out everywhere`,signingOut:`Signing outâ¦`,hint:`Signs you out on every device, including this one.`},setup:{calendar:`Connect a calendar`,workingHours:`Set your working hours`,handle:`Claim your booking handle`,link:`Create a booking link`,firstBooking:`Receive your first booking`},upcoming:{inviteeFallback:`Invitee`,allDay:`{{date}}, all day`},stats:{trend:{up:`Up {{delta}}% vs previous {{days}} days`,down:`Down {{delta}}% vs previous {{days}} days`,flat:`Flat vs previous {{days}} days`,none:`No previous period to compare`},bookings:{label:`Bookings`,noBookings:`No bookings in this period`,leadTime:`Booked {{days}} days ahead on average`},hoursBooked:{label:`Hours booked`,noWorkingHours:`Set your working hours to see utilisation`,utilisation:`{{percent}}% of your available hours`},cancellationRate:{label:`Cancellation rate`,context:`{{cancelled}} of {{total}} cancelled`},upcoming:{label:`Upcoming`,none:`Nothing scheduled in the next 7 days`,next:`Next: {{when}} · {{title}} with {{name}}`,context:`Confirmed, next 7 days`},revenue:{label:`Revenue`,context:`Confirmed bookings by meeting date`,also:`Also {{list}}`,none:`No revenue in this period`,hint:`Link a service to a booking link to track revenue`},comingSoon:{pageViews:`Booking page views`,conversionRate:`Conversion rate`,noShows:`No-shows`,notTracked:`Not tracked yet`}}},setupChecklist:{title:`Get set up`,progress:`{{done}} of {{total}} complete`},upcomingBookings:{title:`Upcoming bookings`,description:`Next 5 confirmed`,empty:`No upcoming bookings`,status:{confirmed:`Confirmed`,pending:`Pending`,cancelled:`Cancelled`}},bookingsChart:{title:`Bookings over time`,rangeLabel:`Chart range`,empty:`No bookings in this period`,series:{confirmed:`Confirmed`,cancelled:`Cancelled`}},calendar:{loadError:{offline:`You're offline. Reconnect to the internet, then try again.`,unreachable:`Couldn't reach CalendHub. It may be briefly unavailable â try again in a moment.`,retry:`Try again`},eventType:{default:`Event`,out_of_office:`Out of office`,focus_time:`Focus time`,working_location:`Working location`,birthday:`Birthday`,from_gmail:`From Gmail`},workingLocation:{home:`Home`,office:`Office`,custom:`Custom`,somewhereElse:`Somewhere else`},readOnly:{birthday:`Birthdays come from Google Contacts. Edit the contact to change it.`,fromGmail:`Gmail created this event. Edit it in Gmail or Google Calendar.`,occurrence:`This occurrence was deleted from the repeating event.`,attendee:`You are an attendee on this event, not its organiser. Only the organiser can change it.`,foreignProvider:`CalendHub cannot write to this calendar yet. Edit the event where it lives.`,default:`This event cannot be edited from CalendHub.`},validation:{titleTooLong:`Title must be 255 characters or less`,endBeforeStartDate:`End date must be on or after start date`,endBeforeStartTime:`End time must be after start time`,notesTooLong:`Notes must be 40000 characters or less`,locationTooLong:`Location must be 255 characters or less`,workingLocationSpan:`A working-location day cannot span more than one day`},recurrence:{none:`Does not repeat`,daily:`Daily`,weekly:`Weekly`,weeklyOn:`Weekly on {{weekday}}`,monthly:`Monthly`,monthlyOnDay:`Monthly on day {{day}}`,annually:`Annually`,annuallyOn:`Annually on {{day}} {{month}}`,custom:`Custom`,customEllipsis:`Customâ¦`},recurrenceSummary:{repeats:`Repeats`,daily:`Repeats daily`,weekly:`Repeats weekly`,weeklyOn:`Repeats weekly on {{weekday}}`,monthly:`Repeats monthly`,monthlyOnDay:`Repeats monthly on day {{day}}`,annually:`Repeats annually`,annuallyOn:`Repeats annually on {{day}} {{month}}`,until:`{{summary}}, until {{date}}`,everyDay:`Daily`,everyNDays:`Every {{n}} days`,everyWeekOn:`Weekly on {{days}}`,everyNWeeksOn:`Every {{n}} weeks on {{days}}`,everyMonthOnDay:`Monthly on day {{day}}`,everyNMonthsOnDay:`Every {{n}} months on day {{day}}`,everyMonthOnWeekday:`Monthly on the {{ordinal}} {{weekday}}`,everyNMonthsOnWeekday:`Every {{n}} months on the {{ordinal}} {{weekday}}`,everyYearOn:`Annually on {{day}} {{month}}`,everyNYearsOn:`Every {{n}} years on {{day}} {{month}}`,everyYearOnWeekday:`Annually on the {{ordinal}} {{weekday}} of {{month}}`,everyNYearsOnWeekday:`Every {{n}} years on the {{ordinal}} {{weekday}} of {{month}}`,nTimes:`{{summary}}, {{count}} times`,ordinal:{first:`first`,second:`second`,third:`third`,fourth:`fourth`,fifth:`fifth`,last:`last`}},longDate:`{{weekday}} {{day}} {{month}} {{year}}`,when:{allDayOne:`{{date}} (all day)`,allDayRange:`{{from}} â {{to}} (all day)`,timedOpen:`{{date}}, {{from}}`,timedSameDay:`{{date}}, {{from}} â {{to}}`,timedCrossDay:`{{fromDate}}, {{from}} â {{toDate}}, {{to}}`},toolbar:{week:`Week`,day:`Day`,month:`Month`,list:`List`,schedule:`Schedule`,previous:`Previous`,today:`Today`,next:`Next`,pagePrefix:`Calendar: `,view:`View`,newEvent:`New event`},viewMenu:{trigger:`View: {{view}}`,ariaLabel:`View and display options`,showWeekends:`Show weekends`,dimPast:`Dim past events`},grid:{loadingTitle:`Loadingâ¦`,loadingEvents:`Loading events`,loading:`Loading`,noEvents:`No events in this range.`,currentTime:`Current time`},emptyNotice:{emptyNotice:`No calendars connected yet. Events you create here stay in CalendHub.`},filters:{calendars:`Calendars`,eventTypes:`Event types`,trigger:`Filters`,active:`Active filters`,hiding:`Hiding: {{label}}`,stopHiding:`Stop hiding {{label}}`,clear:`Clear filters`},dialog:{detailsTitle:`Event details`,createTitle:`New event`,editTitle:`Edit event`,discardTitle:`Discard unsaved changes?`,discardDescription:`This event has changes that have not been saved. Closing will lose them.`,keepEditing:`Keep editing`,discardConfirm:`Discard changes`,deleteTitle:`Delete this event?`,deleteDescription:`This deletes the event permanently. There is no undo.`,deleteConfirm:`Delete permanently`},form:{outsideWorkingHours:`Outside your working hours`,title:`Title`,titlePlaceholder:`Event title`,location:`Location`,locationPlaceholder:`Location`,notes:`Notes`,notesPlaceholder:`Add notes...`,formatting:`Formatting`,bold:`Bold`,italic:`Italic`,underline:`Underline`,strikethrough:`Strikethrough`,bulletList:`Bulleted list`,numberList:`Numbered list`,delete:`Delete`,close:`Close`,cancel:`Cancel`,save:`Save`,saving:`Saving...`,providerNote:`Changes go to {{provider}} when you save.`},status:{autoDecline:`Conflicting invitations`,declineNone:`Do nothing`,declineNew:`Decline new conflicting invitations`,declineAll:`Decline all conflicting invitations`,autoDeclineHint:`Google enforces this on your Google calendar. CalendHub only records it.`,declineMessage:`Decline message`,declineMessagePlaceholder:`I'm out of office`,chatStatus:`Chat status`,doNotDisturb:`Do not disturb`,available:`Available`,workingFrom:`Working from`,label:`Label`,labelPlaceholder:`Building 4`},timeFields:{allDay:`All day`,noAllDayOnGoogle:`{{type}} events cannot be all-day on Google.`,startDate:`Start date`,startTime:`Start time`,endD
49ate:`End date`,endTime:`End time`,timezoneHint:`Times in {{timezone}}`},typeSelect:{label:`Type`,immutableHint:`An event's type cannot be changed after it is created.`,workspaceHint:`Google only allows these on Workspace accounts, on the primary calendar.`},recurrenceField:{label:`Repeats`,customRuleHint:`Custom rule: {{rrule}}`,lockedHint:`A repeat rule cannot be changed after the event is created.`,createWarning:`The repeat rule is fixed after creation â changing it means a new series.`,endsOn:`Ends on`,endsOnHint:`Leave empty to repeat forever.`,editCustom:`Edit`},recurrenceDialog:{title:`Custom recurrence`,repeatEvery:`Repeat every`,unit:`Unit`,unitDay:`day`,unitWeek:`week`,unitMonth:`month`,unitYear:`year`,repeatOn:`Repeat on`,onDayOfMonth:`On day {{day}}`,onNthWeekday:`On the {{ordinal}} {{weekday}}`,onLastWeekday:`On the last {{weekday}}`,ends:`Ends`,endsNever:`Never`,endsOn:`On`,endsAfter:`After`,endDate:`End date`,occurrences:`Occurrences`,pickADay:`Pick at least one day`,cancel:`Cancel`,done:`Done`},scopeDialog:{editTitle:`Save which events?`,deleteTitle:`Delete which events?`,description:`This event repeats. Choose what your change applies to.`,legend:`Apply to`,thisEvent:`This event`,thisAndFollowing:`This and following events`,allEvents:`All events`,cancel:`Cancel`,confirmSave:`Save`,confirmDelete:`Delete`},summary:{calendhubOnly:`CalendHub only`,untitled:`Untitled event`,when:`When`,timezone:`Timezone`,repeats:`Repeats`,calendar:`Calendar`,type:`Type`,location:`Location`,workingLocation:`Working location`,notes:`Notes`},peek:{ariaLabel:`Event preview`,edit:`Edit event`,delete:`Delete event`,details:`Open event details`},pushState:{label:`Connected calendar status`,localAhead:`Not on your connected calendar yet. Still trying.`,remoteAhead:`Your connected calendar has a newer version.`,conflict:`Your connected calendar changed this first. Its version is shown.`,rejected:`Your connected calendar won't accept this. Edit it and save again.`,unrepresentable:`This event can't appear on your connected calendar.`,unknown:`This event may not have reached all of your connected calendars.`},contextMenu:{ariaLabel:`Event actions`,delete:`Delete`,inheritedColor:`This event uses the colour of its calendar. Picking a colour overrides it for this event only.`},guests:{title:`Guests`,optional:`Optional`,explainer:`Guests come from the provider. CalendHub cannot invite or reply.`,response:{needs_action:`No reply yet`,accepted:`Accepted`,declined:`Declined`,tentative:`Maybe`}},quickCreate:{ariaLabel:`Quick create event`,titleLabel:`Event title`,titlePlaceholder:`Add title`,moreOptions:`More options`,save:`Save`,saving:`Savingâ¦`}},publicBooking:{location:{inPersonAt:`In person at {{value}}`,videoOn:`{{value}} video call`},hostTimezone:`Host timezone: {{timezone}}`,hostTimezoneLabel:`{{name}}'s timezone`,selectTime:`Select a time`,allDay:`All day`,selectDay:`Select a day`,noTimes:`No times on this day`,yourDetails:`Your details`,slotTaken:`That time was just booked. Pick another.`,submitting:`Booking...`,submit:`Confirm booking`,fields:{name:`Your name`,email:`Email address`,selectPlaceholder:`Selectâ¦`},withHosts:`With {{names}}`,confirmation:{withHosts:`Also with {{names}}`,joinLabel:`How to join`,joinAction:`Join the meeting`,callAction:`Call {{phone}}`,title:`Booking confirmed`,subtitle:`You're all set with {{name}}`,when:`When`,allDay:`All day ({{timezone}})`,responses:`Your responses`,cancel:`Cancel booking`,cancelling:`Cancelling...`},manage:{title:`Cannot manage booking`,invalid:`The booking link is invalid.`,expired:`The booking link has expired.`,used:`This booking has already been cancelled.`,cancelledTitle:`Booking cancelled`,cancelledSubtitle:`Your booking with {{name}} has been cancelled.`,cancelFailed:`The booking could not be cancelled. Please try again.`},offline:{paused:{headline:`{{name}} is taking a break`,description:`They have paused their booking calendar. Please check back later or reach out directly.`},archived:{headline:`{{name}}'s booking page is not available`,description:`This booking page is no longer active. Please contact them directly if you need to schedule time.`},unavailable:{headline:`{{name}}
49 is currently unavailable`,description:`They are currently not available for new bookings. Please try again later.`},fallback:{headline:`{{name}} is not available`,description:`Please check back later or reach out directly.`}},errors:{linkLoadFailed:`Failed to load booking link`,linkNotFound:`Link not found`,invalidForm:`Invalid form configuration`,bookingLoadFailed:`Failed to load booking`,pageLoadFailed:`Failed to load booking page`,slotGone:`That slot just went. Pick another time.`,submitFailed:`The booking could not be completed. Please try again.`,LINK_OFFLINE:`This booking page is no longer taking bookings.`,RATE_LIMITED:`Too many requests. Please wait a moment and try again.`,INTERNAL:`Something went wrong on our side. Please try again.`,INVALID_START:`That time could not be read. Pick a time again.`,INVALID_TIMEZONE:`We could not use your timezone. Choose another timezone and try again.`}},bookingForm:{CONFIG_MALFORMED:`The form configuration is malformed`,CONFIG_UNSUPPORTED_VERSION:`Unsupported form version`,CONFIG_NO_FIELDS:`The form must have at least one field`,CONFIG_TOO_MANY_FIELDS:`The form has too many fields`,CONFIG_INVALID_NAME:`Invalid field name`,CONFIG_DUPLICATE_NAME:`Duplicate field name`,CONFIG_UNKNOWN_TYPE:`Unknown field type`,CONFIG_UNKNOWN_EDITABLE:`Unknown editable value`,CONFIG_LABEL_REQUIRED:`Field label is required`,CONFIG_LABEL_TOO_LONG:`Field label is too long`,CONFIG_PLACEHOLDER_TOO_LONG:`Placeholder is too long`,CONFIG_HELP_TEXT_TOO_LONG:`Help text is too long`,CONFIG_OPTIONS_MISSING:`This field type requires options`,CONFIG_OPTIONS_NOT_ALLOWED:`This field type does not support options`,CONFIG_TOO_MANY_OPTIONS:`Too many options for this field`,CONFIG_OPTION_LABEL_REQUIRED:`Option label is required`,CONFIG_OPTION_VALUE_REQUIRED:`Option value is required`,CONFIG_DUPLICATE_OPTION_VALUE:`Duplicate option value`,CONFIG_LENGTH_NOT_ALLOWED:`This field type does not support length bounds`,CONFIG_LENGTH_OUT_OF_RANGE:`Length bound is out of range`,CONFIG_LENGTH_RANGE_INVALID:`Minimum length cannot exceed maximum length`,CONFIG_SYSTEM_FIELD_NOT_REQUIRED:`System fields must be required`,CONFIG_SYSTEM_FIELD_HIDDEN:`System fields cannot be hidden`,CONFIG_SYSTEM_HIDDEN_NOT_HIDDEN:`This field must be hidden`,ANSWER_REQUIRED:`This field is required`,ANSWER_WRONG_TYPE:`The answer has the wrong type`,ANSWER_NOT_A_NUMBER:`The answer must be a number`,ANSWER_INVALID_EMAIL:`The answer must be a valid email address`,ANSWER_INVALID_URL:`The answer must be a valid URL`,ANSWER_INVALID_PHONE:`The answer must be a valid phone number`,ANSWER_TOO_SHORT:`The answer is too short`,ANSWER_TOO_LONG:`The answer is too long`,ANSWER_UNKNOWN_OPTION:`The selected option is not valid`,ANSWER_UNKNOWN_FIELD:`Unknown field`},period:{last7Days:`Last 7 days`,last30Days:`Last 30 days`,last3Months:`Last 3 months`},validation:{required:`This field is required.`,invalidEmail:`Must be a valid email address.`,passwordMismatch:`Passwords do not match.`,atLeast:`Must be at least {{n}} characters.`,atMost:`Must be at most {{n}} characters.`},integrations:{title:`Integrations`,description:`Connect a calendar so CalendHub can keep it in sync.`,reconnectNeeded:`Reconnect needed`,disconnect:{title:`Disconnect {{email}}?`,description:`CalendHub will stop syncing {{provider}} for this account. Events that came only from this connection are removed from your CalendHub calendar; events also linked to another connected account are kept. Nothing changes in {{provider}} itself.`,confirm:`Disconnect`},limit:{title:`Connected calendar account limit reached`,description_one:`Your plan allows {{count}} connected calendar account. Disconnect an account to connect a different one, or upgrade to connect more.`,description_other:`Your plan allows {{count}} connected calendar accounts. Disconnect an account to connect a different one, or upgrade to connect more.`},providerCard:{limitReached:`Your plan's account limit is reached.`,notAvailable:`Not available`,notConfigured:`This provider is not configured on the server yet.`,connect:`Connect`,consent:`You'll be asked to grant calendar access. Leaving any permission unchecked stops syncing from working.`,empty:`No accounts connected yet.`},connectionRow:{private:`Private`,reconnect:`Reconnect`,edit:`Edit`,disconnect:`Disconnect`,firstSync:`Importing your events. This can take a minute â they appear in your calendar when it finishes.`},connectionDialog:{title:`Edit connection`,cancel:`Cancel`,save:`Save`,colour:`Calendar colour`,hideDetails:`Hide event details from other people`},connectionStatusList:{title:`Connected calendars`,empty:`No calendar connected`},connectionSelect:{label:`Calendar`,calendhubOnly:`CalendHub only`,optionWithReason:`{{label}} ({{reason}})`,hint:`Choosing a connected account also creates this event there.`,reconnectFirst:`Reconnect this account first.`,notWritable:`Cannot receive events yet.`},syncStatus:{idle:`Not synced yet`,syncing:`Syncingâ¦`,synced:`Synced`,partial:`Partly synced`,failed:`Sync failed`}
49,oauthCallback:{pending:`Finishing the connectionâ¦`,connected:`Connected. Taking you backâ¦`,backToIntegrations:`Back to integrations`},oauthError:{connectionLimitReached:`Your plan's limit on connected calendar accounts is reached, so this account was not connected. Disconnect an account or upgrade your plan to add another.`,accessDenied:`You cancelled the permission request, so nothing was connected.`,missingScopes:`Calendar access was not granted. Try again and leave every permission checked â skipping one stops syncing from working.`,invalidState:`The connection request expired or was already used. Start again from the integrations page.`,tokenRevoked:`That account's access was revoked by the provider. Connect it again to restore syncing.`,notConfigured:`This provider is not set up on the server yet, so it cannot be connected.`,invalidProvider:`That provider is not supported.`,invalidRequest:`The provider sent back a request we could not read. Please try again.`,notFound:`That connection no longer exists.`,providerError:`The provider refused the connection. Please try again.`,unknown:`Something went wrong while connecting. Please try again.`}},inputs:{title:`Inputs`,description:`Fields you can add to any form.`,newInput:`New input`,editInput:`Edit input`,empty:`No inputs yet`,createFirst:`Create your first input`,searchLabel:`Search inputs`,searchPlaceholder:`Search by label, name or type`,noMatch:`No inputs match "{{query}}"`,noMatchHint:`Try a different word from the label, the name or the type.`,loading:`Loading...`,loadFailed:`This input could not be loaded.`,card:{required:`Required`,hidden:`Hidden`,edit:`Edit input`,delete:`Delete input`,deleteTitle:`Delete input?`,deleteDescription:`This removes it from your library. Forms that already use a copy of it are not affected.`},form:{preview:`Preview`,save:`Save`,saving:`Saving...`,cancel:`Cancel`,delete:`Delete`},preview:{required:`Required`,hidden:`Hidden on the form`},editor:{label:`Label`,name:`Field Name`,nameHint:`Lowercase letters, numbers, hyphens`,type:`Field Type`,typeRetired:`{{type}} (no longer offered)`,placeholder:`Placeholder`,helpText:`Help Text`,required:`Required`,hidden:`Hidden`,minLength:`Minimum Length`,maxLength:`Maximum Length`,options:`Options`,option:`Option {{index}}`,removeOption:`Remove`,addOption:`Add Option`},builder:{addField:`Add field`,addFieldOfType:`+ {{type}}`,expand:`Expand {{field}}`,collapse:`Collapse {{field}}`,moveUp:`Move {{field}} up`,moveDown:`Move {{field}} down`,delete:`Delete {{field}}`,required:`Required`,hidden:`Hidden`,locked:`Locked`,system:`System`,systemTitle:`The booking flow needs this field`,lockedTitle:`This field cannot be edited`,library:`Add from Inputs`,counter:`{{count}} of {{max}} fields`,counterFull:`This form is full. Delete a field to add another.`},fieldType:{name:`name`,text:`text`,textarea:`textarea`,number:`number`,email:`email`,phone:`phone`,url:`url`,select:`select`,multiselect:`multiselect`,checkbox:`checkbox`,radio:`radio`},picker:{title:`Add from Inputs`,description:`Pick a saved input to copy onto this form. The copy is independent â editing it here never changes the saved one.`,done:`Done`,limit:`This form already has all {{max}} fields it can hold. Delete one to add another.`,loading:`Loading your inputsâ¦`,empty:{title:`No saved inputs yet`,description:`Inputs are fields you save once and reuse on any booking form â a company name, a phone number, the question you always ask. Save one from a field on this form, or create one on the Inputs page.`,manage:`Manage inputs`},add:`Add {{label}}`,added:`Added as {{names}}`}},catalog:{currency:{label:`Currency`,common:`Common`,all:`All currencies`},money:{price:`Price`,amount:`Amount`,amountPlaceholder:`25.00`,wholeNumbersOnly:`Whole numbers only`,decimalPlaces:`Up to {{places}} decimal places`},category:{label:`Category`,placeholder:`e.g. Hair`},card:{archived:`Archived`,edit:`Edit`,archive:`Archive`,unarchive:`Unarchive`,delete:`Delete`,cancel:`Cancel`,deleteDescription:`This cannot be undone.`,deleteServiceTitle:`Delete this service?`,deleteProductTitle:`Delete this product?`,deleteServiceConfirm:`Delete service`,deleteProductConfirm:`Delete product`},form:{description:`Description`,descriptionPlaceholder:`What the customer gets.`,photo:`Photo`,photoHint:`PNG, JPEG or WebP. Resized to 3 megapixels at most before it is saved.`,save:`Save`,saving:`Saving...`,cancel:`Cancel`,delete:`Delete`,deletePermanently:`Delete permanently`},service:{title:`Title`,titlePlaceholder:`e.g. Haircut`,duration:`Duration (minutes)`,durationHint:`Leave empty for no fixed duration`,deleteWarning:`This deletes the service permanently and cannot be undone. Archive it instead if you only want it off the list.`},product:{name:`Name`,namePlaceholder:`e.g. Shampoo 250ml`,stock:`Stock`,stockHint:`How many you have. Leave empty for none.`,deleteWarning:`This deletes the product permanently and cannot be undone. Archive it instead if you only want it off the list.`},heading:{description:`The services you offer and the products you sell.`},errors:{REQUIRED:`This field is required.`,TOO_LONG:`This field is too long.`,WRONG_TYPE:`This field has the wrong type.`,CURRENCY_UNKNOWN:`Pick a currency from the list.`,AMOUNT_NEGATIVE:`Amount must be at least 0.`,AMOUNT_TOO_LARGE:`Amount is too large.`,DURATION_OUT_OF_RANGE:`Duration must be 5 to 1440 minutes.`,DURATION_NOT_MULTIPLE_OF_5:`Duration must be a multiple of 5.`,LOCATION_TYPE_UNKNOWN:`Pick a location type from the list.`,ADDRESS_NOT_ALLOWED:`Address and coordinates are only for in-person services.`,COUNTRY_UNKNOWN:`Pick a country from the list.`,COORDINATES_INCOMPLETE:`Enter both latitude and longitude, or leave both empty.`,LATITUDE_OUT_OF_RANGE:`Latitude must be between â90 and 90.`,LONGITUDE_OUT_OF_RANGE:`Longitude must be between â180 and 180.`,STOCK_NEGATIVE:`Stock must be at least 0.`,STOCK_TOO_LARGE:`Stock is too large.`,IMAGE_TOO_LARGE:`Photo must be 1 MB and 3 megapixels or smaller.`,IMAGE_UNSUPPORTED_TYPE:`Photo must be a PNG or JPEG.`,IMAGE_INVALID:`Photo could not be read.`},draft:{number:`Enter a number`,amount:`Enter an amount like 25.00`,minutes:`Enter whole minutes`,wholeNumber:`Enter a whole number`},services:{emptyTitle:`No services yet`,emptyBody:`Add the things you offer, with a price and an optional duration.`,create:`Create service`,searchLabel:`Search services`,searchPlaceholder:`Search by title or category`,archivedEmpty:`No active services â tick "Show archived" to see the {{archivedCount}} archived.`,searchEmptyTitle:`No services match "{{query}}
49"`,searchEmptyBody:`Try a different word from the title or the category.`,duration:`{{minutes}} min`},products:{emptyTitle:`No products yet`,emptyBody:`Add the things you sell, with a price and how many you have.`,create:`Create product`,searchLabel:`Search products`,searchPlaceholder:`Search by title or category`,archivedEmpty:`No active products â tick "Show archived" to see the {{archivedCount}} archived.`,searchEmptyTitle:`No products match "{{query}}"`,searchEmptyBody:`Try a different word from the name or the category.`,stock:`Stock: {{stock}}`},list:{showArchived:`Show archived`},editor:{loading:`Loadingâ¦`,serviceLoadFailed:`This service could not be loaded.`,productLoadFailed:`This product could not be loaded.`}},booking:{timezoneHint:`Differs from your preference, {{timezone}}`,allDay:`All day`,links:{limit:{title:`Booking link limit reached`,description_one:`Your plan allows {{count}} booking link. Delete a link to create a new one, or upgrade to create more.`,description_other:`Your plan allows {{
49count}} booking links. Delete a link to create a new one, or upgrade to create more.`},claimTitle:`Claim your booking page`,claimDescription:`Claim your booking page handle to create links`,emptyTitle:`No booking links yet`,emptyDescription:`Create your first booking link to get started`,create:`Create link`,searchLabel:`Search links`,searchPlaceholder:`Search by title or URL`,noMatchTitle:`No links match "{{query}}"`,noMatchDescription:`Try a different word from the title or the URL.`},editor:{loadFailed:`This link could not be loaded.`,loading:`Loadingâ¦`},linkForm:{title:`Title`,titlePlaceholder:`e.g., 30-minute consultation`,slug:`Booking URL`,slugPlaceholder:`unique-slug`,slugEdited:`Manually edited`,preview:`Preview:`,duration:`Duration`,selectDuration:`Select duration`,bufferBefore:`Buffer before`,bufferAfter:`Buffer after`,selectBuffer:`Select buffer`,bufferNone:`None`,bufferMinutes:`{{minutes}} minutes`,allDayHint:`Guests book a whole day of your calendar. Buffers do not apply.`,allDayNoVideo:`not for all-day links`,service:`Service`,serviceHint:`Sets the price recorded on each booking.`,calendarHint:`Bookings made through this link are also added to this calendar.`,coHosts:`Co-hosts`,coHostsHint:`Each co-host's working hours and calendars limit the times offered. Up to {{max}} co-hosts.`,coHostsNone:`Invite people to your company on the Team page to add co-hosts.`,coHostsAllDay:`An all-day link cannot have co-hosts.`,coHostsLocked:`Co-hosts are a Pro feature.`,formerMember:`Former member`,noService:`No service`,deletedService:`Deleted service`,activeServices:`Active services`,archivedServices:`Archived services`,description:`Description`,descriptionPlaceholder:`Tell invitees what to expect...`,formFields:`Form fields`,deleteWarning:`This deletes the link permanently. The public URL stops working immediately and cannot be restored. Bookings already made are kept.`,deletePermanently:`Delete permanently`,cancel:`Cancel`,saving:`Saving...`,save:`Save`,delete:`Delete`},linkCard:{status:{active:`Active`,paused:`Paused`,archived:`Archived`},copy:`Copy`,open:`Open`,edit:`Edit`,pause:`Pause`,resume:`Resume`,delete:`Delete`,deleteTitle:`Delete this link?`,deleteDescription:`The public URL stops working immediately and this cannot be undone. Bookings already made are kept.`,deleteConfirm:`Delete link`,deleteCancel:`Cancel`},linkStats:{title:`Booking links`,description:`Bookings in the selected period`,empty:`No booking links yet`,columns:{link:`Link`,duration:`Duration`,status:`Status`,bookings:`Bookings`},status:{active:`Active`,paused:`Paused`,archived:`Archived`},copyLink:`Copy link`,copyLinkFor:`Copy link for {{title}}`},settings:{save:`Save Changes`,saving:`Savingâ¦`,saveFailed:`Failed to save settings. Please check your input and try again.`,handleTaken:`Handle is already in use`,invalidValue:`Invalid value`,displayNameHint:`Differs from your workspace name ({{name}}).`,pageErrors:{PAGE_INVALID_COLOR:`Must be a valid hex color`,PAGE_INVALID_RADIUS:`Invalid radius value`,PAGE_INVALID_FONT:`Invalid font value`}},profileFields:{title:`Booking Page`,displayName:`Display Name`,tagline:`Tagline`,taglineHint:`Shown under your name on your booking page, e.g. "Fractional CTO, Tirane".`},themeFields:{title:`Branding`,brandColor:`Brand Colour`,brandColorDark:`Brand Colour (Dark)`,radius:`Corner Radius`,font:`Font`,hideBranding:`Hide CalendHub branding`,hideBrandingLocked:`Your plan does not include hiding CalendHub branding.`,radiusLabels:{none:`None`,sm:`Small`,md:`Medium`,lg:`Large`,full:`Full`},fontLabels:{inter:`Inter`,system:`System`,serif:`Serif`,mono:`Monospace`}},brandingFields:{title:`Logo and banner`,logo:`Page logo`,logoHint:`PNG, JPEG or WebP. Shown left of your name.`,banner:`Banner`,bannerHint:`PNG, JPEG or WebP. Shown across the top of your page, resized to 3 megapixels at most.`,locked:`Your plan does not include a logo and banner on your booking page.`},slugField:{label:`Booking URL`,state:{checking:`Checkingâ¦`,available:`Available`,taken:`You already have a link with that URL.`,tooShort:`Enter a URL for this link.`,tooLong:`Must be 64 characters or fewer.`,invali
49d:`Lowercase letters, numbers and hyphens only.`}},handleField:{label:`Booking page handle`,placeholder:`Your unique handle`,urlPreview:`URL preview:`,state:{checking:`Checkingâ¦`,available:`Available`,taken:`That handle is already in use.`,reserved:`Reserved.`,invalid:`Lowercase letters, numbers and hyphens only.`}},pagePreview:{title:`Preview`,placeholder:`Your booking links appear here`},answers:{status:{confirmed:`Confirmed`,pending:`Pending`,cancelled:`Cancelled`}},availability:{showOnCalendar:`Show working hours on my calendar`,save:`Save`,saving:`Saving...`,addWindow:`Add a window`,addWindowFor:`Add a {{day}} window`,removeWindow:`Remove`,removeWindowFor:`Remove {{day}} window {{n}}`,windowStart:`{{day}} start {{n}}`,windowEnd:`{{day}} end {{n}}`,weekday:{monday:`Monday`,tuesday:`Tuesday`,wednesday:`Wednesday`,thursday:`Thursday`,friday:`Friday`,saturday:`Saturday`,sunday:`Sunday`},errors:{timezoneRequired:`This field is required.`,timezoneInvalid:`Not a valid timezone.`,unknownDay:`Unknown day: {{day}}.`,tooManyWindows:`At most {{max}} windows per day.`,badTime:`Must be a time such as 09:00.`,endBeforeStart:`End must be after start.`,overlap:`Windows on the same day cannot overlap.`}},sectionsEditor:{title:`Sections`,add:`Add section`,moveUp:`Move {{section}} up`,moveDown:`Move {{section}} down`,remove:`Remove {{section}}`,sectionTypes:{"host-header":`Host header`,"event-list":`Event list`,about:`About`},showAvatar:`Show avatar`,showTagline:`Show tagline`,layout:`Layout`,layoutCards:`Cards`,layoutList:`List`,aboutText:`About text`,aboutRemaining:`{{count}} characters remaining`}},billing:{loadFailed:`Could not load your plan. Refresh the page to try again.`,unavailable:`Billing is not available in this environment.`,checkoutFailed:`Upgrading is unavailable right now. Try again in a moment.`,legal:`By upgrading to Pro, you agree to the <terms>Terms of Service</terms> and the <refund>Refund and Cancellation Policy</refund>.`,plan:{current:`Current plan`,scheduledChange:{cancel:`Cancels on {{date}}`,pause:`Pauses on {{date}}`,resume:`Resumes on {{date}}`},trial:{name:`Pro trial`,description:`Your trial ends on {{date}}.`,daysLeft:`{{days}} days left`,dayLeft:`1 day left`,endsToday:`Ends today`},free:{name:`Free plan`,description:`Scheduling for one person, at no cost.`,limits:{connections:`1 connected calendar account`,links:`1 booking link`},excludes:{branding:`CalendHub branding stays on your booking page`}},pro:{name:`Pro`,description:`Everything CalendHub does, without the limits.`,includes:{connections:`Unlimited connected calendar accounts`,links:`Unlimited booking links`,branding:`Your branding on your booking page`}}},notice:{upgrade:`Upgrade to Pro`,dismiss:`Dismiss`,trialEnding:{title:`Your Pro trial ends soon`,description:`{{remaining}}. After that your account moves to the Free plan, which has lower limits on connected calendar accounts and booking links.`},trialEnded:{title:`Your Pro trial has ended`,description:`You are on the Free plan now, which allows {{connections}} and {{links}}. Anything you already set up keeps working. To go past these limits, upgrade to Pro.`}},limits:{connections_one:`up to {{count}} connected calendar account`,connections_other:`up to {{count}} connected calendar accounts`,connectionsUnlimited:`unlimited connected calendar accounts`,links_one:`up to {{count}} booking link`,links_other:`up to {{count}} booking links`,linksUnlimited:`unlimited booking links`},pastDue:{warning:`Your last payment failed. Update your payment method to keep Pro.`},actions:{upgradeMonthly:`Upgrade â {{price}} / month`,upgradeYearly:`Upgrade â {{price}} / year`,manageBilling:`Manage billing`,updatePayment:`Update payment`,retry:`Try again`}},support:{dialog:{title:`Support and feedback`,description:`We reply by email within 2 business days.`,kind:{label:`What is this about?`,support:`I need help`,feedback:`I have feedback`},message:`Message`,messageHint:`Up to 5,000 characters.`,context:`We include your account, plan, current page and app version, so we can help faster.`,send:`Send`,sending:`Sendingâ¦`,cancel:`Cancel`,done:`Done`,sent:`Thanks. Your message was sent. We reply by email within 2 business days.`,errors:{limit:`You have sent the most messages allowed today. Email [email protected] directly.`,sendFailed:`Your message could not be sent. Email [email protected] directly.`}}},team:{title:`Team`,description:`Invite people to your company, and see the companies you joined.`,cancel:`Cancel`,company:{title:`Your company`,unnamed:`Name your company in Settings to invite people.`,openSettings:`Open Settings`},invite:{email:`Email`,hint:`The link works once and expires after 7 days.`,
49submit:`Send invite`,submitting:`Sendingâ¦`,sent:`Invite sent to {{email}}.`,errors:{limit:`You have sent the most invites allowed today. Try again tomorrow.`,sendFailed:`The invite could not be sent. Try again.`}},members:{title:`Members`,owner:`Owner`,member:`Member`,joined:`Joined {{date}}`,remove:`Remove`,removeTitle:`Remove {{name}}?`,removeDescription:`They leave your company at once. You can invite them again later.`,pendingTitle:`Pending invites`,pendingNone:`No pending invites.`,expires:`Expires {{date}}`,revoke:`Revoke`},memberships:{title:`Companies you joined`,none:`You have not joined another company.`,ownedBy:`Owner: {{name}}`,leave:`Leave`,leaveTitle:`Leave {{name}}?`,leaveDescription:`You need a new invite to join again.`},coHosting:{title:`Links you co-host`,none:`You do not co-host any booking links.`,ownedBy:`Owner: {{name}}`,remove:`Remove me`,removeTitle:`Stop co-hosting {{title}}?`,removeDescription:`Its booking page stops checking your calendar. Bookings already made stay on your calendar.`},accept:{loading:`Loading the inviteâ¦`,title:`Join {{name}}`,invitedBy:`{{name}} invited you to join this company on CalendHub.`,invited:`You were invited to join this company on CalendHub.`,signedInAs:`You will join as {{email}}.`,expires:`The invite expires {{date}}.`,coHostNotice:`Joining lets the company owner add you as a co-host on their booking links. Those links then offer only times when you are free. Your events stay private.`,join:`Join`,joining:`Joiningâ¦`,notNow:`Not now`,invalid:`This invite link is invalid or has expired. Ask for a new one.`,alreadyMember:`You are already in this company.`,toTeam:`Go to Team`}},workflows:{title:`Workflows`,description:`When an event makes you busy on one calendar, CalendHub blocks the same time on another as âBusyâ. Only the time is copied.`,plan:{proTitle:`Workflows are a Pro feature`,proDescription:`Upgrade to Pro to block busy time across your calendars.`,limitTitle:`You have reached your planâs limit`,limitDescription:`Your plan allows {{count}} workflows. Delete one to add another.`},connect:{title:`Connect two calendars first`,description:`A workflow copies busy time from one connected calendar to another.`,link:`Go to Integrations`},empty:`No workflows yet.`,disconnected:`A disconnected calendar`,delete:{title:`Delete this workflow?`,description:`Its busy blocks are removed from {{target}}.`,confirm:`Delete`,cancel:`Cancel`},card:{title:`{{source}} â {{target}}`,on:`On`,off:`Off`,blocks:`Busy blocks: {{count}}`,pausedPlan:`Paused: your plan does not include workflows.`,pausedConnection:`Paused: reconnect both calendars to turn it back on.`,error:`Some busy blocks could not be written yet. CalendHub keeps trying.`,turnOn:`Turn on`,turnOff:`Turn off`,delete:`Delete`},builder:{when:`When an event makes me busy on`,then:`Block the time on`,choose:`Choose a calendar`,submit:`Create workflow`,sameCalendar:`Choose two different calendars.`}}},OE=`modulepreload`,kE=function(e){return`/`+e},AE={},jE=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=kE(t,n),t=s(t),t in AE)return;AE[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:OE,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function ME(e){switch(e){case`en`:return DE;case`es`:return(await jE(async()=>{let{es:e}=await import(`./es-Dj3NUXSm.js`);return{es:e}},[])).es;case`de`:return(await jE(async()=>{let{de:e}=await import(`./de-DW14UYRE.js`);return{de:e}},[])).de;case`fr`:return(await jE(async()=>{let{fr:e}=await import(`./fr-B53X95hv.js`);return{fr:e}},[])).fr;case`pt-BR`:return(await jE(async()=>{let{ptBR:e}=await import(`./pt-BR-CbjfAoHS.js`);return{ptBR:e}},[])).ptBR;case`it`:return(await jE(async()=>{let{it:e}=await import(`./it-Bu5eXyyf.js`);return{it:e}},[])).it;case`sq`:return(await jE(async()=>{let{sq:e}=await import(`./sq-C5thGO85.js`);return{sq:e}},[])).sq;default:return e}}var NE=Bx.createInstance();async function PE(e=EE()){await NE.init({resources:{en:{translation:DE}},lng:`en`,fallbackLng:`en`,defaultNS:`translation`,interpolation:{escapeValue:!1},react:{useSuspense:!1}}),await FE(e)}async function FE(e){let t=await ME(e);NE.hasResourceBundle(e,`translation`)||NE.addResourceBundle(e,`translation`,t,!0,!0),await NE.changeLanguage(e),typeof document<`u`&&(document.documentElement.lang=e)}var IE=null;function LE(e){IE=e}function RE(){return IE}function zE(){return RE()??new Intl.DateTimeFormat().resolvedOptions().locale}function BE(e){return e===0||e===7?`sunday`:`monday`}function VE(e){try{let t=new Intl.Locale(e??zE()).getWeekInfo?.();return t===void 0?`monday`:BE(t.firstDay)}catch{return`monday`}}function HE(e){return e===`sunday`?0:1}function UE(e){try{return new Intl.DateTimeFormat(e??zE(),{hour:`numeric`}).resolvedOptions().hour12??!1}catch{return!1}}function WE(e,t){return e===`12h`||e!==`24h`&&UE(t)}function GE(e,t,n){let r=n?.locale??zE(),i=n?.timeZone;if(t===`system`)return new Intl.DateTimeFormat(r,{timeZone:i}).format(e);let a=new Intl.DateTimeFormat(`en-CA`,{timeZone:i,year:`numeric`,month:`2-digit`,day:`2-digit`}).formatToParts(e),o=a.find(e=>e.type===`year`)?.value??``,s=a.find(e=>e.type===`month`)?.value??``,c=a.find(e=>e.type===`day`)?.value??``;return t===`ymd`?`${o}-${s}-${c}`:t===`dmy`?`${c}/${s}/${o}`:t===`mdy`?`${s}/${c}/${o}`:new Intl.DateTimeFormat(r,{timeZone:i}).format(e)}var KE=[`none`,`daily`,`weekly`,`monthly`,`yearly`],qE=Object.freeze({preset:`none`,until:``,rrule:``}),JE=[`SU`,`MO`,`TU`,`WE`,`TH`,`FR`,`SA`],YE=[`MO`,`TU`,`WE`,`TH`,`FR`,`SA`,`SU`];function XE(e,t){return new Intl.DateTimeFormat(zE(),{weekday:t}).format(e)}function ZE(e,t){return new Intl.DateTimeFormat(zE(),{month:t}).format(e)}var QE=/^\d{4}-\d{2}-\d{2}$/;function $E(e){if(!QE.test(e))return`MO`;let[t,n,r]=e.split(`-`).map(Number);return JE[new Date(t,n-1,r).getDay()]}function eD(e){if(!QE.test(e))return{nth:1,last:!1};let[t,n,r]=e.split(`-`).map(Number),i=Math.ceil(r/7),a=new Date(t,n,0).getDate();return{nth:i,last:r+7>a}}function tD(e){return{freq:`weekly`,interval:1,weekdays:[$E(e)],monthlyMode:`day`,ends:`never`,until:``,count:0}}function nD(e){return(e??``).slice(0,10)}function rD(e){return String(e).padStart(2,`0`)}function iD(e,t){let n=e.replace(/-/g,``);if(t)return n;let[r,i,a]=e.split(`-`).map(Number);return new Date(r,i-1,a,23,59,59).toISOString().replace(/[-:]/g,``).replace(/\.\d{3}Z$/,`Z`)}function aD(e){let t=e.trim();if(/^\d{8}$/.test(t))return`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}`;let n=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z?)$/.exec(t);if(!n)return``;let[,r,i,a,o,s,c,l]=n;if(l!==`Z`)return`${r}-${i}-${a}`;let u=new Date(Date.UTC(+r,i-1,+a,+o,+s,+c));return`${u.getFullYear()}-${rD(u.getMonth()+1)}-${rD(u.getDate())}`}
49function oD(e,t,n){let r=[];r.push(`FREQ=${{daily:`DAILY`,weekly:`WEEKLY`,monthly:`MONTHLY`,yearly:`YEARLY`}[e.freq]}`),e.interval>1&&r.push(`INTERVAL=${e.interval}`);let i=QE.test(t),[,a,o]=t.split(`-`).map(Number);if(e.freq===`weekly`&&i&&e.weekdays.length>0){let t=[...e.weekdays].sort((e,t)=>YE.indexOf(e)-YE.indexOf(t));r.push(`BYDAY=${t.join(`,`)}`)}if(e.freq===`yearly`&&i&&r.push(`BYMONTH=${a}`),e.freq===`monthly`||e.freq===`yearly`){if(e.monthlyMode===`day`)i&&r.push(`BYMONTHDAY=${o}`);else if(e.monthlyMode===`weekday`){if(i){let e=$E(t),{nth:n}=eD(t);r.push(`BYDAY=${n}${e}`)}}else if(e.monthlyMode===`lastWeekday`&&i){let e=$E(t);r.push(`BYDAY=-1${e}`)}}return e.ends===`after`&&e.count>0?r.push(`COUNT=${e.count}`):e.ends===`on`&&e.until!==``&&r.push(`UNTIL=${iD(e.until,n)}`),r.join(`;`)}function sD(e,t,n){let r=e.split(`;`).map(e=>e.trim()).filter(e=>e!==``),i={};for(let e of r){let[t,n]=e.split(`=`);if(!t||!n)return null;i[t.toUpperCase()]=n}let a=i.FREQ;if(!a)return null;let o={DAILY:`daily`,WEEKLY:`weekly`,MONTHLY:`monthly`,YEARLY:`yearly`}[a];if(!o)return null;let s=1;if(i.INTERVAL){let e=parseInt(i.INTERVAL,10);if(isNaN(e)||e<1||e>99)return null;s=e}if(i.COUNT&&i.UNTIL)return null;let c=`never`,l=0,u=``;if(i.COUNT){let e=parseInt(i.COUNT,10);if(isNaN(e)||e<1||e>999)return null;c=`after`,l=e}else if(i.UNTIL){let e=aD(i.UNTIL);if(!e||!QE.test(e))return null;c=`on`,u=e}let[,d,f]=t.split(`-`).map(Number);if(o===`daily`)return i.BYDAY||i.BYMONTHDAY||i.BYMONTH?null:{freq:o,interval:s,weekdays:[],monthlyMode:`day`,ends:c,until:u,count:l};if(o===`weekly`){let e=[];
49if(i.BYDAY){let t=i.BYDAY.split(`,`).map(e=>e.trim());for(let n of t){if(!/^[A-Z]{2}$/.test(n)||!YE.includes(n))return null;e.push(n)}}else e=[$E(t)];return i.BYMONTHDAY||i.BYMONTH?null:{freq:o,interval:s,weekdays:e,monthlyMode:`day`,ends:c,until:u,count:l}}let p=`day`;if(o===`monthly`){let e=i.BYMONTHDAY,n=i.BYDAY;if(i.BYMONTH||e&&n)return null;if(!e&&!n)p=`day`;else if(e){let t=parseInt(e,10);if(isNaN(t)||t!==f)return null;p=`day`}else if(n){let e=$E(t),{nth:r,last:i}=eD(t);if(n===`-1${e}`&&i)p=`lastWeekday`;else if(n===`${r}${e}`)p=`weekday`;else return null}return{freq:o,interval:s,weekdays:[],monthlyMode:p,ends:c,until:u,count:l}}if(o===`yearly`){let e=i.BYMONTH;if(e){let t=parseInt(e,10);if(isNaN(t)||t!==d)return null}let n=i.BYMONTHDAY,r=i.BYDAY;if(n&&r)return null;if(!n&&!r)p=`day`;else if(n){let e=parseInt(n,10);if(isNaN(e)||e!==f)return null;p=`day`}else if(r){let e=$E(t),{nth:n,last:i}=eD(t);if(r===`-1${e}`&&i)p=`lastWeekday`;else if(r===`${n}${e}`)p=`weekday`;else return null}return{freq:o,interval:s,weekdays:[],monthlyMode:p,ends:c,until:u,count:l}}return null}function cD(e,t,n,r){let i=QE.test(t),[a,o,s]=t.split(`-`).map(Number),c;switch(e){case`daily`:c=`FREQ=DAILY`;break;case`weekly`:c=i?`FREQ=WEEKLY;BYDAY=${JE[new Date(a,o-1,s).getDay()]}`:`FREQ=WEEKLY`;break;case`monthly`:c=i?`FREQ=MONTHLY;BYMONTHDAY=${s}`:`FREQ=MONTHLY`;break;case`yearly`:c=`FREQ=YEARLY`;break;default:return``}return n?`${c};UNTIL=${iD(n,r)}`:c}function lD(e,t,n){return!e||e.preset===`none`?``:e.preset===`custom`?e.custom?oD(e.custom,nD(t),n):e.rrule:cD(e.preset,nD(t),e.until,n)}function uD(e,t,n){let r=lD(e,t,n);return r===``?null:{rrule:r,rdates:[],exdates:[]}}function dD(e,t,n){let r=(e??``).trim();if(r===``)return{preset:`none`,until:``,rrule:``};let i=r.split(`;`).map(e=>e.trim()).filter(e=>e!==``),a=e=>e.toUpperCase().startsWith(`UNTIL=`),o=i.find(a),s=o?aD(o.slice(6)):``,c=i.filter(e=>!a(e)).join(`;`).toUpperCase();for(let e of KE)if(e!==`none`&&cD(e,t,``,n)===c)return{preset:e,until:s,rrule:``};let l=sD(r,t,n);
49return l?{preset:`custom`,until:``,rrule:``,custom:l}:{preset:`custom`,until:s,rrule:r}}function fD(e,t,n){return t===`none`?{preset:`none`,until:``,rrule:``}:t===`custom`?{preset:`custom`,until:``,rrule:``,custom:e.custom??tD(n)}:{preset:t,until:e.until,rrule:``}}function pD(e,t,n){let r=QE.test(t),[i,a,o]=t.split(`-`).map(Number),s=r?new Date(i,a-1,o):new Date,c=r?XE(s,`long`):``,l=r?ZE(s,`long`):``,u=``;if(e.freq===`daily`)u=e.interval===1?n(`calendar.recurrenceSummary.everyDay`):n(`calendar.recurrenceSummary.everyNDays`,{n:e.interval});else if(e.freq===`weekly`){let t=[...e.weekdays].sort((e,t)=>YE.indexOf(e)-YE.indexOf(t)).map(e=>{let t=JE.indexOf(e);return XE(new Date(2026,7,17+(t===0?6:t-1)),`long`)}).join(`, `);u=e.interval===1?n(`calendar.recurrenceSummary.everyWeekOn`,{days:t}):n(`calendar.recurrenceSummary.everyNWeeksOn`,{n:e.interval,days:t})}else if(e.freq===`monthly`){if(e.monthlyMode===`day`)u=e.interval===1?n(`calendar.recurrenceSummary.everyMonthOnDay`,{day:o}):n(`calendar.recurrenceSummary.everyNMonthsOnDay`,{n:e.interval,day:o});else if(e.monthlyMode===`weekday`){let{nth:r}=eD(t),i=n(`calendar.recurrenceSummary.ordinal.${[`first`,`second`,`third`,`fourth`,`fifth`][r-1]}`);u=e.interval===1?n(`calendar.recurrenceSummary.everyMonthOnWeekday`,{ordinal:i,weekday:c}):n(`calendar.recurrenceSummary.everyNMonthsOnWeekday`,{n:e.interval,ordinal:i,weekday:c})}
49else if(e.monthlyMode===`lastWeekday`){let t=n(`calendar.recurrenceSummary.ordinal.last`);u=e.interval===1?n(`calendar.recurrenceSummary.everyMonthOnWeekday`,{ordinal:t,weekday:c}):n(`calendar.recurrenceSummary.everyNMonthsOnWeekday`,{n:e.interval,ordinal:t,weekday:c})}}else if(e.freq===`yearly`){if(e.monthlyMode===`day`)u=e.interval===1?n(`calendar.recurrenceSummary.everyYearOn`,{day:o,month:l}):n(`calendar.recurrenceSummary.everyNYearsOn`,{n:e.interval,day:o,month:l});else if(e.monthlyMode===`weekday`){let{nth:r}=eD(t),i=n(`calendar.recurrenceSummary.ordinal.${[`first`,`second`,`third`,`fourth`,`fifth`][r-1]}`);u=e.interval===1?n(`calendar.recurrenceSummary.everyYearOnWeekday`,{ordinal:i,weekday:c,month:l}):n(`calendar.recurrenceSummary.everyNYearsOnWeekday`,{n:e.interval,ordinal:i,weekday:c,month:l})}else if(e.monthlyMode===`lastWeekday`){let t=n(`calendar.recurrenceSummary.ordinal.last`);u=e.interval===1?n(`calendar.recurrenceSummary.everyYearOnWeekday`,{ordinal:t,weekday:c,month:l}):n(`calendar.recurrenceSummary.everyNYearsOnWeekday`,{n:e.interval,ordinal:t,weekday:c,month:l})}}if(e.ends===`on`&&e.until!==``){let t=mD(e.until,n);return n(`calendar.recurrenceSummary.until`,{summary:u,date:t})}return e.ends===`after`&&e.count>0?n(`calendar.recurrenceSummary.nTimes`,{summary:u,count:e.count}):u}function mD(e,t){if(!QE.test(e))return``;let[n,r,i]=e.split(`-`).map(Number),a=new Date(n,r-1,i);return t(`calendar.longDate`,{weekday:XE(a,`long`),day:i,month:ZE(a,`long`),year:n})}function hD(e){let t=QE.test(e),[n,r,i]=e.split(`-`).map(Number),a=t?new Date(n,r-1,i):new Date,o=t?XE(a,`long`):``,s=t?ZE(a,`long`):``;return[{value:`none`,labelKey:`calendar.recurrence.none`,params:{}},{value:`daily`,labelKey:`calendar.recurrence.daily`,params:{}},{value:`weekly`,labelKey:t?`calendar.recurrence.weeklyOn`:`calendar.recurrence.weekly`,params:t?{weekday:o}:{}},{value:`monthly`,labelKey:t?`calendar.recurrence.monthlyOnDay`:`calendar.recurrence.monthly`,params:t?{day:i}:{}},{value:`yearly`,labelKey:t?`calendar.recurrence.annuallyOn`:`calendar.recurrence.annually`,params:t?{day:i,month:s}:{}},{value:`custom`,labelKey:`calendar.recurrence.customEllipsis`,params:{}}]}function gD(e,t){let n=QE.test(t),[r,i,a]=t.split(`-`).map(Number),o=n?new Date(r,i-1,a):new Date,s=n?XE(o,`long`):``,c=n?ZE(o,`long`):``;switch(e){case`daily`:return{summaryKey:`calendar.recurrenceSummary.daily`,params:{}};case`weekly`:return{summaryKey:n?`calendar.recurrenceSummary.weeklyOn`:`calendar.recurrenceSummary.weekly`,params:n?{weekday:s}:{}};case`monthly`:return{summaryKey:n?`calendar.recurrenceSummary.monthlyOnDay`:`calendar.recurrenceSummary.monthly`,params:n?{day:a}:{}};case`yearly`:return{summaryKey:n?`calendar.recurrenceSummary.annuallyOn`:`calendar.recurrenceSummary.annually`,params:n?{day:a,month:c}:{}};default:return{summaryKey:``,params:{}}}}function _D(e,t){let n=e.recurrence?.rrule??``;if(n===``)return e.expanded||e.recurrence!==null?t(`calendar.recurrenceSummary.repeats`):``;let r=e.start.date!==``,i=r?e.start.date:nD(e.start.wall),{preset:a,custom:o}=dD(n,i,r);if(a===`none`)return t(`calendar.recurrenceSummary.repeats`);if(a===`custom`&&o)return pD(o,i,t);if(a===`custom`)return t(`calendar.recurrenceSummary.repeats`);let{summaryKey:s,params:c}=gD(a,i);return s===``?t(`calendar.recurrenceSummary.repeats`):t(s,c)}function vD(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())).toISOString()}function yD(e){let t=new Date(e);return`${t.getUTCFullYear()}-${String(t.getUTCMonth()+1).padStart(2,`0`)}-${String(t.getUTCDate()).padStart(2,`0`)}`}function bD(e){let t=new Date(e);return yD(new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-1)).toISOString())}function xD(e){let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}T${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function SD(e){let[t,n,r]=e.split(`-`).map(Number);return AD(new Date(t,n-1,r+1))}function CD(e){let[t,n,r]=e.split(`-`).map(Number);return AD(new Date(t,n-1,r-1))}function wD(e,t,n){return t?{date:AD(e),wall:``,timezone:``}:{date:``,wall:`${e.getFullYear()}
49-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}T${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}:${String(e.getSeconds()).padStart(2,`0`)}`,timezone:n}}function TD(e,t){let n=bE(t);return{auto_decline_mode:n.showDecline?e.autoDecline||`decline_none`:``,decline_message:n.showDecline?e.declineMessage??``:``,chat_status:n.showChatStatus&&e.chatStatus||``,working_location:n.showWorkingLocation?{type:e.workLocationType||`home_office`,label:e.workLocationLabel??``}:null}}function ED(e,t){let n=e.eventType??`default`,r=bE(n),i;return i=e.allDay?{title:e.title.trim(),all_day:!0,start:{date:e.start,wall:``,timezone:``},end:{date:SD(e.end),wall:``,timezone:``},description:e.notes,location:e.location,color:e.color,categories:[],busy:r.busy,visibility:r.visibility,recurrence:uD(e.recurrence,e.start,!0)}:{title:e.title.trim(),all_day:!1,start:{date:``,wall:e.start+`:00`,timezone:t},end:{date:``,wall:e.end+`:00`,timezone:t},description:e.notes,location:e.location,color:e.color,categories:[],busy:r.busy,visibility:r.visibility,recurrence:uD(e.recurrence,e.start,!1)},e.connectionId&&(i.connection_id=e.connectionId),n!=="default"&&(i.event_type=n,i.status_properties=TD(e,n)),i}
49function DD(e,t,n){let r=ED(e,n),i={title:r.title,color:r.color,location:r.location};return(e.start!==t.start||e.end!==t.end||e.allDay!==t.allDay)&&(i.start=r.start,i.end=r.end,i.all_day=r.all_day),(e.notes.text!==t.notes.text||e.notes.html!==t.notes.html)&&(i.description=r.description),i}function OD(e){let t=e.extendedProps;return e.allDay?{title:e.title,allDay:!0,start:t.start.date,end:CD(t.end.date),notes:t.description,color:t.color,location:t.location,editable:e.editable,eventType:t.eventType??`default`,autoDecline:t.statusProperties?.autoDeclineMode??``,declineMessage:t.statusProperties?.declineMessage??``,chatStatus:t.statusProperties?.chatStatus??``,workLocationType:t.statusProperties?.workingLocation?.type??``,workLocationLabel:t.statusProperties?.workingLocation?.label??``,recurrence:dD(t.recurrence?.rrule,t.start.date,!0),connectionId:t.connections?.[0]?.connectionId??``}:{title:e.title,allDay:!1,start:t.start.wall.slice(0,16),end:t.end.wall.slice(0,16),notes:t.description,color:t.color,location:t.location,editable:e.editable,eventType:t.eventType??`default`,autoDecline:t.statusProperties?.autoDeclineMode??``,declineMessage:t.statusProperties?.declineMessage??``,chatStatus:t.statusProperties?.chatStatus??``,workLocationType:t.statusProperties?.workingLocation?.type??``,workLocationLabel:t.statusProperties?.workingLocation?.label??``,recurrence:dD(t.recurrence?.rrule,nD(t.start.wall),!1),connectionId:t.connections?.[0]?.connectionId??``}}function kD(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function AD(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function jD(e){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)}function MD(e,t,n){let[r,i,a]=e.split(`-`).map(Number);if(t===`dayGridMonth`)return AD(new Date(r,i-1+n,1));let o=t===`timeGridDay`?1:t===`listSchedule`?30:7;return AD(new Date(r,i-1,a+n*o))}function ND(e){return{title:``,allDay:!1,start:`${e}T09:00`,end:`${e}T10:00`,notes:{text:``,html:``},color:``,location:``,eventType:`default`,connectionId:``,recurrence:qE}}function PD(e,t,n=AD(new Date)){let r=e.start.split(`T`)[0]||n;return t?{...e,allDay:!0,start:r,end:e.end.split(`T`)[0]||n}:{...e,allDay:!1,start:`${r}T09:00`,end:`${r}T10:00`}}function FD(e,t,n=``){let r=bE(t,n),i={...e,eventType:t};return!r.allDayAllowed&&i.allDay&&(i=PD(i,!1)),r.showDecline||(i={...i,autoDecline:``,declineMessage:``}),r.showChatStatus||(i={...i,chatStatus:``}),r.showWorkingLocation?i.workLocationType||(i={...i,workLocationType:`home_office`}):i={...i,workLocationType:``,workLocationLabel:``},i}function ID(e,t,n){let r={...e,connectionId:t};return!bE(r.eventType??`default`,n).allDayAllowed&&r.allDay?PD(r,!1):r}function LD(e){let t={};if(e.title.length>255&&(t.title=`calendar.validation.titleTooLong`),e.allDay){let n=new Date(e.start+`T00:00:00Z`);new Date(e.end+`T00:00:00Z`)<n&&(t.end=`calendar.validation.endBeforeStartDate`)}else{let n=new Date(e.start);new Date(e.end)<=n&&(t.end=`calendar.validation.endBeforeStartTime`)}return(e.notes.text.length>4e4||e.notes.html.length>4e4)&&(t.notes=`calendar.validation.notesTooLong`),e.location.length>255&&(t.location=`calendar.validation.locationTooLong`),e.allDay&&e.eventType===`working_location`&&e.end!==e.start&&(t.end=`calendar.validation.workingLocationSpan`),t}function RD(e,t){return e.map(e=>{let n=t[e.connectionId];return{connectionId:e.connectionId,provider:e.provider,color:n?.color??``,accountEmail:n?.account_email??``}})}function zD(e,t){if((t.hiddenEventTypes??[]).includes(e.eventType))return!1;let n=t.hiddenConnectionIds??[];if(n.length===0)return!0;let r=e.connections??[];return r.length===0?!n.includes(``):r.some(e=>!n.includes(e.connectionId))}function BD(e,t){let n=(t.hiddenEventTypes??[]).length===0,r=(t.hiddenConnectionIds??[]).length===0;return n&&r?e:e.filter(e=>zD(e.extendedProps,t))}function VD(e,t,n){let r=e??[];return n?r.includes(t)?[...r]:[...r,t]:r.filter(e=>e!==t)}var HD=`connection:`,UD=`type:`;function WD(e,t){let n=(e.hiddenConnectionIds??[]).map(e=>({id:`${HD}${e}`,label:e===``?`CalendHub`:t[e]??e,labelKey:``})),r=(e.hiddenEventTypes??[]).map(e=>
49({id:`${UD}${e}`,label:``,labelKey:_E[e]}));return[...n,...r]}var GD=[`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`,`sunday`],KD={monday:`booking.availability.weekday.monday`,tuesday:`booking.availability.weekday.tuesday`,wednesday:`booking.availability.weekday.wednesday`,thursday:`booking.availability.weekday.thursday`,friday:`booking.availability.weekday.friday`,saturday:`booking.availability.weekday.saturday`,sunday:`booking.availability.weekday.sunday`};function qD(e){return{timezone:e,show_on_calendar:!0,windows:{monday:[{start:`09:00`,end:`17:00`}],tuesday:[{start:`09:00`,end:`17:00`}],wednesday:[{start:`09:00`,end:`17:00`}],thursday:[{start:`09:00`,end:`17:00`}],friday:[{start:`09:00`,end:`17:00`}],saturday:[],sunday:[]}}}function JD(e){return{timezone:e.timezone,show_on_calendar:e.show_on_calendar,windows:e.windows}}function YD(e){let t={};e.timezone===``?t.timezone={key:`booking.availability.errors.timezoneRequired`}:QD(e.timezone)||(t.timezone={key:`booking.availability.errors.timezoneInvalid`});let n=new Set(GD);for(let[r,i]of Object.entries(e.windows)){if(!n.has(r)){t.windows={key:`booking.availability.errors.unknownDay`,params:{day:r}};continue}i.length>4&&(t[`windows.${r}`]={key:`booking.availability.errors.tooManyWindows`,params:{max:4}});let e=!1;for(let n=0;n<i.length;n++){let a=i[n];XD(a.start)||(t[`windows.${r}.${n}.start`]={key:`booking.availability.errors.badTime`},e=!0),XD(a.end)||(t[`windows.${r}.${n}.end`]={key:`booking.availability.errors.badTime`},e=!0),XD(a.start)&&XD(a.end)&&a.end<=a.start&&(t[`windows.${r}.${n}.end`]={key:`booking.availability.errors.endBeforeStart`},e=!0)}!e&&ZD(i)&&(t[`windows.${r}`]={key:`booking.availability.errors.overlap`})}return t}function XD(e){if(e.length!==5||e[2]!==`:`)return!1;for(let t of[0,1,3,4]){let n=e[t];if(n<`0`||n>`9`)return!1}let t=parseInt(e[0],10)*10+parseInt(e[1],10),n=parseInt(e[3],10)*10+parseInt(e[4],10);return t<=23&&n<=59}function ZD(e){let t=[...e].sort((e,t)=>e.start.localeCompare(t.start));for(let e=1;e<t.length;e++)if(t[e].start<t[e-1].end)return!0;return!1}function QD(e){try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}),!0}catch{return!1}}function $D(e){if(!e||!e.configured||!e.show_on_calendar||Object.values(e.windows).every(e=>e.length===0))return;let t={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6},n=[];for(let r of GD){let i=e.windows[r];for(let e of i)n.push({daysOfWeek:[t[r]],startTime:e.start,endTime:e.end})}return n.length>0?n:void 0}function eO(e,t){try{let n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,weekday:`long`,hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}).formatToParts(e),r=``,i=0,a=0;for(let e of n)e.type===`weekday`?r=e.value:e.type===`hour`?i=parseInt(e.value,10):e.type===`minute`&&(a=parseInt(e.value,10));let o=r.toLowerCase();return GD.includes(o)?{weekday:o,minutes:i*60+a}:null}catch{return null}}function tO(e,t){if(!t||!t.configured||e.allDay)return!1;let n=new Date(e.start),r=new Date(e.end);if(isNaN(n.getTime())||isNaN(r.getTime())||r<=n)return!1;let i=eO(n,t.timezone),a=eO(r,t.timezone);if(!i||!a)return!1;if(i.weekday!==a.weekday)return!0;let o=t.windows[i.weekday];for(let e of o){let t=nO(e.start),n=nO(e.end);if(t<=i.minutes&&a.minutes<=n)return!1}return!0}function nO(e){let[t,n]=e.split(`:`).map(e=>parseInt(e,10));return t*60+n}function rO(){if(typeof Intl.supportedValuesOf!=`function`)try{return[new Intl.DateTimeFormat().resolvedOptions().timeZone]}catch{return[`UTC`]}try{let e=Intl.supportedValuesOf(`timeZone`),t=new Intl.DateTimeFormat().resolvedOptions().timeZone;return[t,...e.filter(e=>e!==t)]}catch{try{return[new Intl.DateTimeFormat().resolvedOptions().timeZone]}catch{return[`UTC`]}}}function iO(e,t){if(e.timezone!==t.timezone||e.show_on_calendar!==t.show_on_calendar)return!1;for(let n of GD){let r=e.windows[n]??[],i=t.windows[n]??[];if(r.length!==i.length)return!1;for(let e=0;e<r.length;e++)if(r[e].start!==i[e].start||r[e].end!==i[e].end)return!1}return!0}function aO(e,t=new Date){let n=``;try{n=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`shortOffset`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``}catch{return``}return n===`GMT+0`||n===`GMT-0`?`GMT`:n}
49function oO(e,t=new Date){let n=aO(e,t);return n===``?e:`${e} (${n})`}function sO(e){return e??``}function cO(e,t){let n=e??qE,r=t??qE;return n.preset===r.preset&&n.until===r.until&&n.rrule===r.rrule&&JSON.stringify(n.custom??null)===JSON.stringify(r.custom??null)}function lO(e,t){return!(e.title===t.title&&e.allDay===t.allDay&&e.start===t.start&&e.end===t.end&&e.notes.text===t.notes.text&&e.notes.html===t.notes.html&&e.color===t.color&&e.location===t.location&&e.editable===t.editable&&sO(e.connectionId)===sO(t.connectionId)&&(e.eventType??`default`)===(t.eventType??`default`)&&sO(e.autoDecline)===sO(t.autoDecline)&&sO(e.declineMessage)===sO(t.declineMessage)&&sO(e.chatStatus)===sO(t.chatStatus)&&sO(e.workLocationType)===sO(t.workLocationType)&&sO(e.workLocationLabel)===sO(t.workLocationLabel)&&cO(e.recurrence,t.recurrence))}var uO=`#3b6ea5`;function dO(e){let t=/^#([0-9a-f]{6})$/i.exec(e.trim());if(t===null)return-1;let n=[0,2,4].map(e=>parseInt(t[1].slice(e,e+2),16)/255).map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4);return .2126*n[0]+.7152*n[1]+.0722*n[2]}function fO(e){let t=dO(e);return t<0?`#ffffff`:t>.1916?`#111111`:`#ffffff`}function pO(e,t,n=uO){let r=e||t||n;return{background:r,foreground:fO(r)}}function mO(e){let t=e.text===``?e.html:e.text;return t===``||!/<[a-z!/][^>]*>/i.test(t)?t:hO(t)}
49function hO(e){return e.replace(/<br\s*\/?>/gi,` 50`).replace(/<\/(p|div|li|tr|h[1-6])>/gi,` 51`).replace(/<[^>]*>/g,``).replace(/ /gi,` `).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`).replace(/&/g,`&`).replace(/\r\n/g,` 52`).replace(/\n{3,}/g,` 53 54`).trim()}var gO=/^\d{4}-\d{2}-\d{2}$/;function _O(e,t){if(!gO.test(e))return``;let[n,r,i]=e.split(`-`).map(Number),a=new Date(n,r-1,i);return t(`calendar.longDate`,{weekday:XE(a,`long`),day:i,month:ZE(a,`long`),year:n})}function vO(e,t){if(e.allDay){let n=_O(e.start,t);if(n===``)return``;let r=_O(e.end,t);return r===``||r===n?t(`calendar.when.allDayOne`,{date:n}):t(`calendar.when.allDayRange`,{from:n,to:r})}let n=_O(e.start.slice(0,10),t);if(n===``)return``;let r=e.start.slice(11,16),i=_O(e.end.slice(0,10),t),a=e.end.slice(11,16);return i===``?t(`calendar.when.timedOpen`,{date:n,from:r}):i===n?t(`calendar.when.timedSameDay`,{date:n,from:r,to:a}):t(`calendar.when.timedCrossDay`,{fromDate:n,from:r,toDate:i,to:a})}function yO(e,t,n){if(!e||e.preset===`none`)return``;let r=nD(t);if(e.preset===`custom`&&e.custom)return pD(e.custom,r,n);let i=e.preset===`custom`?n(`calendar.recurrenceSummary.repeats`):(()=>{let{summaryKey:t,params:i}=gD(e.preset,r);return t===``?n(`calendar.recurrenceSummary.repeats`):n(t,i)})(),a=_O(e.until,n);return a===``?i:n(`calendar.recurrenceSummary.until`,{summary:i,date:a})}function bO(e,t,n,r,i,a){return{left:Math.max(8,Math.min(e,i-n-8)),top:Math.max(8,Math.min(t,a-r-8))}}var xO={showWeekends:!0,dimPast:!1},SO=[`in_sync`,`local_ahead`,`remote_ahead`,`conflict`,`unrepresentable`,`rejected`,`none`];function CO(e){return typeof e==`string`&&SO.includes(e)}function wO(e){if(typeof e!=`object`||!e)return null;let t=e.push;if(typeof t!=`object`||!t)return null;let{state:n,error_code:r,message:i}=t;return CO(n)?{state:n,errorCode:typeof r==`string`?r:``,message:typeof i==`string`?i:``}:null}function TO(e){let t=e?.code;return t===`PUSH_FAILED`?{state:`local_ahead`,errorCode:`PUSH_FAILED`,message:``}:t===`PUSH_CONFLICT`?{state:`conflict`,errorCode:`PUSH_CONFLICT`,message:``}:null}function EO(e){return e===null?null:DO[e.state]===``?e.errorCode===``?null:`unknown`:e.state}var DO={in_sync:``,none:``,local_ahead:`calendar.pushState.localAhead`,remote_ahead:`calendar.pushState.remoteAhead`,conflict:`calendar.pushState.conflict`,rejected:`calendar.pushState.rejected`,unrepresentable:`calendar.pushState.unrepresentable`,unknown:`calendar.pushState.unknown`},OO={in_sync:!1,none:!1,local_ahead:!1,remote_ahead:!1,conflict:!0,rejected:!0,unrepresentable:!0,unknown:!0};function kO(){let e=dt(lE()),t=e.data,n=t?.timezone||``,r=t?.week_start||`monday`,i=HE(r),a=t?.time_format||`system`;return{preferredTimezone:n,weekStart:r,weekStartDay:i,timeFormat:a,hour12:WE(a),dateFormat:t?.date_format||`system`,isLoading:e.isLoading}}function AO(){return dt(lE())}var jO=`calendhub.calendar.view.v1`;function MO(){let e=`timeGridWeek`,t=null;try{if(typeof localStorage>`u`)return e;t=localStorage.getItem(jO)}catch{return e}return t===null?e:dE.includes(t)?t:e}function NO(e){try{if(typeof localStorage>`u`)return;localStorage.setItem(jO,e)}catch{}}var PO=new ho(MO());function FO(e){NO(e),PO.setState(()=>e)}function IO(){return Ho(PO,e=>e)}var LO=[`image/png`,`image/jpeg`,`image/webp`],RO=.82,zO=class extends Error{code;constructor(e,t){super(t),this.code=e,this.name=`AvatarError`}};function BO(e){switch(e){case`UNSUPPORTED_TYPE`:return`Choose a PNG, JPEG or WebP image.`;case`SOURCE_TOO_LARGE`:return`That file is too large. Choose one under 10 MB.`;case`TOO_LARGE`:return`That image is too large even after resizing.`;case`DECODE_FAILED`:return`That image could not be read.`}}function VO(e){if(e===void 0||e.trim()===``)return`?`;let t=e.trim().split(/\s+/);return((t[0]?.[0]??``)+(t.length>1?t[t.length-1]?.[0]??``:``)).toUpperCase()}function HO(e,t){let n=Math.min(e,t);return{sx:(e-n)/2,sy:(t-n)/2,size:n}}function UO(e){let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(t+1),r=n.endsWith(`==`)?2:+!!n.endsWith(`=`);return Math.floor(n.length*3/4)-r}var WO={loadImage:e=>createImageBitmap(e),createCanvas:()=>document.createElement(`canvas`)};async function GO(e,t=WO){if(!LO.includes(e.type))throw new zO(`UNSUPPORTED_TYPE`,BO(`UNSUPPORTED_TYPE`));if(e.size>
5410485760)throw new zO(`SOURCE_TOO_LARGE`,BO(`SOURCE_TOO_LARGE`));let n;try{n=await t.loadImage(e)}catch{throw new zO(`DECODE_FAILED`,BO(`DECODE_FAILED`))}let r=t.createCanvas();r.width=256,r.height=256;let i=r.getContext(`2d`);if(i===null)throw new zO(`DECODE_FAILED`,BO(`DECODE_FAILED`));let{sx:a,sy:o,size:s}=HO(n.width,n.height);i.drawImage(n,a,o,s,s,0,0,256,256);let c=r.toDataURL(`image/jpeg`,RO);if(UO(c)>262144)throw new zO(`TOO_LARGE`,BO(`TOO_LARGE`));return c}function KO(e,t,n){let r=Math.min(1,n/Math.max(e,t,1));return{width:Math.max(1,Math.round(e*r)),height:Math.max(1,Math.round(t*r))}}async function qO(e,t=WO){if(!LO.includes(e.type))throw new zO(`UNSUPPORTED_TYPE`,BO(`UNSUPPORTED_TYPE`));if(e.size>10485760)throw new zO(`SOURCE_TOO_LARGE`,BO(`SOURCE_TOO_LARGE`));let n;try{n=await t.loadImage(e)}catch{throw new zO(`DECODE_FAILED`,BO(`DECODE_FAILED`))}let{width:r,height:i}=KO(n.width,n.height,512),a=t.createCanvas();a.width=r,a.height=i;let o=a.getContext(`2d`);if(o===null)throw new zO(`DECODE_FAILED`,BO(`DECODE_FAILED`));if(o.drawImage(n,0,0,r,i),e.type===`image/png`){let e=a.toDataURL(`image/png`);if(UO(e)<=262144)return e}let s=a.toDataURL(`image/jpeg`,RO);if(UO(s)>262144)throw new zO(`TOO_LARGE`,BO(`TOO_LARGE`));return s}var JO=3e6,YO=[.82,.7,.55];function XO(e,t,n){let r=e*t;if(r<=n)return{width:e,height:t};let i=Math.sqrt(n/r);return{width:Math.max(1,Math.floor(e*i)),height:Math.max(1,Math.floor(t*i))}}async function ZO(e,t=WO){if(!LO.includes(e.type))throw new zO(`UNSUPPORTED_TYPE`,BO(`UNSUPPORTED_TYPE`));if(e.size>10485760)throw new zO(`SOURCE_TOO_LARGE`,BO(`SOURCE_TOO_LARGE`));let n;try{n=await t.loadImage(e)}catch{throw new zO(`DECODE_FAILED`,BO(`DECODE_FAILED`))}let{width:r,height:i}=XO(n.width,n.height,JO),a=t.createCanvas();a.width=r,a.height=i;let o=a.getContext(`2d`);if(o===null)throw new zO(`DECODE_FAILED`,BO(`DECODE_FAILED`));o.drawImage(n,0,0,r,i);for(let e of YO){let t=a.toDataURL(`image/jpeg`,e);if(UO(t)<=1048576)return t}throw new zO(`TOO_LARGE`,BO(`TOO_LARGE`))}function QO({value:e,fallback:t,label:n=`Profile picture`,hint:r=`PNG, JPEG or WebP. Resized to 256x256 before it is saved.`,error:i,disabled:a,shape:o=`circle`,onFileSelected:s,onRemove:c}){let l=(0,L.useId)(),u=(0,L.useId)(),d=(0,L.useRef)(null);return(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(HC,{htmlFor:l,children:n}),(0,R.jsx)(`input`,{id:l,ref:d,type:`file`,accept:LO.join(`,`),onChange:e=>{let t=e.currentTarget.files?.[0];t&&s(t),e.currentTarget.value=``},disabled:a,"aria-invalid":i?`true`:`false`,"aria-describedby":i?u:void 0,className:`hidden`}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[e===null?(0,R.jsx)(`span`,{className:`bg-muted text-muted-foreground flex size-16 items-center justify-center text-lg ${o===`square`?`rounded-md`:`rounded-full`}`,children:t}):(0,R.jsx)(`img`,{src:e,alt:`${n} preview`,className:o===`square`?`size-16 rounded-md bg-muted object-contain`:`size-16 rounded-full object-cover`}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:()=>d.current?.click(),disabled:a,children:`Upload`}),(0,R.jsx)(G,{type:`button`,variant:`outline`,disabled:a||e===null,onClick:c,children:`Remove`})]})]}),r&&(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r}),i&&(0,R.jsx)(`p`,{id:u,className:`text-destructive text-sm`,children:i})]})}function $O({name:e,label:t,options:n,groups:r,error:i,hint:a,swatch:o,className:s,...c}){let l=(0,L.useId)(),u=`${l}-error`,d=`${l}-hint`,f=[a===void 0?void 0:d,i===void 0?void 0:u].filter(e=>e!==void 0).join(` `)||void 0;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(HC,{htmlFor:l,children:t}),(0,R.jsxs)(`div`,{className:`relative`,children:[o!==void 0&&(0,R.jsx)(`span`,{"aria-hidden":`true`,"data-kit":`select-field-swatch`,className:`pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 rounded-sm border border-black/10`,style:{backgroundColor:o}}),(0,R.jsxs)(`select`,{id:l,name:e,"data-slot":`select`,"aria-invalid":i!==void 0,"aria-describedby":f,className:W(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,o===void 0?void 0:`pl-9`,s),...c,children:[n.map(e=>(0,R.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value)),(r??[]).map(e=>(0,R.jsx)(`optgroup`,{label:e.label,children:e.options.map(e=>(0,R.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))},e.label))]})]}),a===void 0?null:(0,R.jsx)(`p`,{id:d,className:`text-muted-foreground text-xs`,children:a}),i===void 0?null:(0,R.jsx)(`p`,{id:u,className:`text-destructive text-sm`,children:i})]})}var ek={REQUIRED:`catalog.errors.REQUIRED`,TOO_LONG:`catalog.errors.TOO_LONG`,WRONG_TYPE:`catalog.errors.WRONG_TYPE`,CURRENCY_UNKNOWN:`catalog.errors.CURRENCY_UNKNOWN`,AMOUNT_NEGATIVE:`catalog.errors.AMOUNT_NEGATIVE`,AMOUNT_TOO_LARGE:`catalog.errors.AMOUNT_TOO_LARGE`,DURATION_OUT_OF_RANGE:`catalog.errors.DURATION_OUT_OF_RANGE`,DURATION_NOT_MULTIPLE_OF_5:`catalog.errors.DURATION_NOT_MULTIPLE_OF_5`,LOCATION_TYPE_UNKNOWN:`catalog.errors.LOCATION_TYPE_UNKNOWN`,ADDRESS_NOT_ALLOWED:`catalog.errors.ADDRESS_NOT_ALLOWED`,COUNTRY_UNKNOWN:`catalog.errors.COUNTRY_UNKNOWN`,COORDINATES_INCOMPLETE:`catalog.errors.COORDINATES_INCOMPLETE`,LATITUDE_OUT_OF_RANGE:`catalog.errors.LATITUDE_OUT_OF_RANGE`,LONGITUDE_OUT_OF_RANGE:`catalog.errors.LONGITUDE_OUT_OF_RANGE`,STOCK_NEGATIVE:`catalog.errors.STOCK_NEGATIVE`,STOCK_TOO_LARGE:`catalog.errors.STOCK_TOO_LARGE`,IMAGE_TOO_LARGE:`catalog.errors.IMAGE_TOO_LARGE`,IMAGE_
54UNSUPPORTED_TYPE:`catalog.errors.IMAGE_UNSUPPORTED_TYPE`,IMAGE_INVALID:`catalog.errors.IMAGE_INVALID`};function tk(e){return ek[e]??e}var nk=1440,rk=1e9,ik=[{code:`AED`,name:`UAE dirham`,exponent:2},{code:`AFN`,name:`Afghani`,exponent:2},{code:`ALL`,name:`Albanian lek`,exponent:2},{code:`AMD`,name:`Armenian dram`,exponent:2},{code:`AOA`,name:`Kwanza`,exponent:2},{code:`ARS`,name:`Argentine peso`,exponent:2},{code:`AUD`,name:`Australian dollar`,exponent:2},{code:`AWG`,name:`Aruban florin`,exponent:2},{code:`AZN`,name:`Azerbaijan manat`,exponent:2},{code:`BAM`,name:`Convertible mark`,exponent:2},{code:`BBD`,name:`Barbados dollar`,exponent:2},{code:`BDT`,name:`Taka`,exponent:2},{code:`BGN`,name:`Bulgarian lev`,exponent:2},{code:`BHD`,name:`Bahraini dinar`,exponent:3},{code:`BIF`,name:`Burundi franc`,exponent:0},{code:`BMD`,name:`Bermudian dollar`,exponent:2},{code:`BND`,name:`Brunei dollar`,exponent:2},{code:`BOB`,name:`Boliviano`,exponent:2},{code:`BRL`,name:`Brazilian real`,exponent:2},{code:`BSD`,name:`Bahamian dollar`,exponent:2},{code:`BTN`,name:`Ngultrum`,exponent:2},{code:`BWP`,name:`Pula`,exponent:2},{code:`BYN`,name:`Belarusian ruble`,exponent:2},{code:`BZD`,name:`Belize dollar`,exponent:2},{code:`CAD`,name:`Canadian dollar`,exponent:2},{code:`CDF`,name:`Congolese franc`,exponent:2},{code:`CHF`,name:`Swiss franc`,exponent:2},{code:`CLP`,name:`Chilean peso`,exponent:0},{code:`CNY`,name:`Yuan renminbi`,exponent:2},{code:`COP`,name:`Colombian peso`,exponent:2},{code:`CRC`,name:`Costa Rican colon`,exponent:2},{code:`CUP`,name:`Cuban peso`,exponent:2},{code:`CVE`,name:`Cabo Verde escudo`,exponent:2},{code:`CZK`,name:`Czech koruna`,exponent:2},{code:`DJF`,name:`Djibouti franc`,exponent:0},{code:`DKK`,name:`Danish krone`,exponent:2},{code:`DOP`,name:`Dominican peso`,exponent:2},{code:`DZD`,name:`Algerian dinar`,exponent:2},{code:`EGP`,name:`Egyptian pound`,exponent:2},{code:`ERN`,name:`Nakfa`,exponent:2},{code:`ETB`,name:`Ethiopian birr`,exponent:2},{code:`EUR`,name:`Euro`,exponent:2},{code:`FJD`,name:`Fiji dollar`,exponent:2},{code:`FKP`,name:`Falkland Islands pound`,exponent:2},{code:`GBP`,name:`Pound sterling`,exponent:2},{code:`GEL`,name:`Lari`,exponent:2},{code:`GHS`,name:`Ghana cedi`,exponent:2},{code:`GIP`,name:`Gibraltar pound`,exponent:2},{code:`GMD`,name:`Dalasi`,exponent:2},{code:`GNF`,name:`Guinean franc`,exponent:0},{code:`GTQ`,name:`Quetzal`,exponent:2},{code:`GYD`,name:`Guyana dollar`,exponent:2},{code:`HKD`,name:`Hong Kong dollar`,exponent:2},{code:`HNL`,name:`Lempira`,exponent:2},{code:`HTG`,name:`Gourde`,exponent:2},{code:`HUF`,name:`Forint`,exponent:2},{code:`IDR`,name:`Rupiah`,exponent:2},{code:`ILS`,name:`New Israeli sheqel`,exponent:2},{code:`INR`,name:`Indian rupee`,exponent:2},{code:`IQD`,name:`Iraqi dinar`,exponent:3},{code:`IRR`,name:`Iranian rial`,exponent:2},{code:`ISK`,name:`Iceland krona`,exponent:0},{code:`JMD`,name:`Jamaican dollar`,exponent:2},{code:`JOD`,name:`Jordanian dinar`,exponent:3},{code:`JPY`,name:`Yen`,exponent:0},{code:`KES`,name:`Kenyan shilling`,exponent:2},{code:`KGS`,name:`Som`,exponent:2},{code:`KHR`,name:`Riel`,exponent:2},{code:`KMF`,name:`Comorian franc`,exponent:0},{code:`KPW`,name:`North Korean won`,exponent:2},{code:`KRW`,name:`Won`,exponent:0},{code:`KWD`,name:`Kuwaiti dinar`,exponent:3},{code:`KYD`,name:`Cayman Islands dollar`,exponent:2},{code:`KZT`,name:`Tenge`,exponent:2},{code:`LAK`,name:`Lao kip`,exponent:2},{code:`LBP`,name:`Lebanese pound`,exponent:2},{code:`LKR`,name:`Sri Lanka rupee`,exponent:2},{code:`LRD`,name:`Liberian dollar`,exponent:2},{code:`LSL`,name:`Loti`,exponent:2},{code:`LYD`,name:`Libyan dinar`,exponent:3},{code:`MAD`,name:`Moroccan dirham`,exponent:2},{code:`MDL`,name:`Moldovan leu`,exponent:2},{code:`MGA`,name:`Malagasy ariary`,exponent:2},{code:`MKD`,name:`Denar`,exponent:2},{code:`MMK`,name:`Kyat`,exponent:2},{code:`MNT`,name:`Tugrik`,exponent:2},{code:`MOP`,name:`Pataca`,exponent:2},{code:`MRU`,name:`Ouguiya`,exponent:2},{code:`MUR`,name:`Mauritius rupee`,exponent:2},{code:`MVR`,name:`Rufiyaa`,exponent:2},{code:`MWK`,name:`Malawi kwacha`,exponent:2},{code:`MXN`,name:`Mexican peso`,exponent:2},{code:`MYR`,name:`Malaysian ringgit`,exponent:2},{code:`MZN`,name:`Mozambique metical`,exponent:2},{code:`NAD`,name:`Namibia dollar`,exponent:2},{code:`NGN`,name:`Naira`,exponent:2},{code:`NIO`,name:`Cordoba oro`,exponent:2},{code:`NOK`,name:`Norwegian krone`,exponent:2},{code:`NPR`,name:`Nepalese rupee`,exponent:2},{code:`NZD`,name:`New Zealand dollar`,exponent:2}
54,{code:`OMR`,name:`Rial Omani`,exponent:3},{code:`PAB`,name:`Balboa`,exponent:2},{code:`PEN`,name:`Sol`,exponent:2},{code:`PGK`,name:`Kina`,exponent:2},{code:`PHP`,name:`Philippine peso`,exponent:2},{code:`PKR`,name:`Pakistan rupee`,exponent:2},{code:`PLN`,name:`Zloty`,exponent:2},{code:`PYG`,name:`Guarani`,exponent:0},{code:`QAR`,name:`Qatari rial`,exponent:2},{code:`RON`,name:`Romanian leu`,exponent:2},{code:`RSD`,name:`Serbian dinar`,exponent:2},{code:`RUB`,name:`Russian ruble`,exponent:2},{code:`RWF`,name:`Rwanda franc`,exponent:0},{code:`SAR`,name:`Saudi riyal`,exponent:2},{code:`SBD`,name:`Solomon Islands dollar`,exponent:2},{code:`SCR`,name:`Seychelles rupee`,exponent:2},{code:`SDG`,name:`Sudanese pound`,exponent:2},{code:`SEK`,name:`Swedish krona`,exponent:2},{code:`SGD`,name:`Singapore dollar`,exponent:2},{code:`SHP`,name:`Saint Helena pound`,exponent:2},{code:`SLE`,name:`Leone`,exponent:2},{code:`SOS`,name:`Somali shilling`,exponent:2},{code:`SRD`,name:`Surinam dollar`,exponent:2},{code:`SSP`,name:`South Sudanese pound`,exponent:2},{code:`STN`,name:`Dobra`,exponent:2},{code:`SVC`,name:`El Salvador colon`,exponent:2},{code:`SYP`,name:`Syrian pound`,exponent:2},{code:`SZL`,name:`Lilangeni`,exponent:2},{code:`THB`,name:`Baht`,exponent:2},{code:`TJS`,name:`Somoni`,exponent:2},{code:`TMT`,name:`Turkmenistan new manat`,exponent:2},{code:`TND`,name:`Tunisian dinar`,exponent:3},{code:`TOP`,name:`Pa'anga`,exponent:2},{code:`TRY`,name:`Turkish lira`,exponent:2},{code:`TTD`,name:`Trinidad and Tobago dollar`,exponent:2},{code:`TWD`,name:`New Taiwan dollar`,exponent:2},{code:`TZS`,name:`Tanzanian shilling`,exponent:2},{code:`UAH`,name:`Hryvnia`,exponent:2},{code:`UGX`,name:`Uganda shilling`,exponent:0},{code:`USD`,name:`US dollar`,exponent:2},{code:`UYU`,name:`Peso Uruguayo`,exponent:2},{code:`UZS`,name:`Uzbekistan sum`,exponent:2},{code:`VED`,name:`Bolivar Soberano (digital)`,exponent:2},{code:`VES`,name:`Bolivar Soberano`,exponent:2},{code:`VND`,name:`Dong`,exponent:0},{code:`VUV`,name:`Vatu`,exponent:0},{code:`WST`,name:`Tala`,exponent:2},{code:`XAF`,name:`CFA franc BEAC`,exponent:0},{code:`XCD`,name:`East Caribbean dollar`,exponent:2},{code:`XCG`,name:`Caribbean guilder`,exponent:2},{code:`XOF`,name:`CFA franc BCEAO`,exponent:0},{code:`XPF`,name:`CFP franc`,exponent:0},{code:`YER`,name:`Yemeni rial`,exponent:2},{code:`ZAR`,name:`Rand`,exponent:2},{code:`ZMW`,name:`Zambian kwacha`,exponent:2},{code:`ZWG`,name:`Zimbabwe gold`,exponent:2}],ak=[`USD`,`EUR`,`GBP`,`ALL`,`CHF`,`CAD`,`AUD`,`JPY`],ok=new Map(ik.map(e=>[e.code,e]));function sk(e){return ok.get(e)}function ck(e){return ok.get(e)?.exponent??2}var lk=`AD.AE.AF.AG.AI.AL.AM.AO.AQ.AR.AS.AT.AU.AW.AX.AZ.BA.BB.BD.BE.BF.BG.BH.BI.BJ.BL.BM.BN.BO.BQ.BR.BS.BT.BV.BW.BY.BZ.CA.CC.CD.CF.CG.CH.CI.CK.CL.CM.CN.CO.CR.CU.CV.CW.CX.CY.CZ.DE.DJ.DK.DM.DO.DZ.EC.EE.EG.EH.ER.ES.ET.FI.FJ.FK.FM.FO.FR.GA.GB.GD.GE.GF.GG.GH.GI.GL.GM.GN.GP.GQ.GR.GS.GT.GU.GW.GY.HK.HM.HN.HR.HT.HU.ID.IE.IL.IM.IN.IO.IQ.IR.IS.IT.JE.JM.JO.JP.KE.KG.KH.KI.KM.KN.KP.KR.KW.KY.KZ.LA.LB.LC.LI.LK.LR.LS.LT.LU.LV.LY.MA.MC.MD.ME.MF.MG.MH.MK.ML.MM.MN.MO.MP.MQ.MR.MS.MT.MU.MV.MW.MX.MY.MZ.NA.NC.NE.NF.NG.NI.NL.NO.NP.NR.NU.NZ.OM.PA.PE.PF.PG.PH.PK.PL.PM.PN.PR.PS.PT.PW.PY.QA.RE.RO.RS.RU.RW.SA.SB.SC.SD.SE.SG.SH.SI.SJ.SK.SL.SM.SN.SO.SR.SS.ST.SV.SX.SY.SZ.TC.TD.TF.TG.TH.TJ.TK.TL.TM.TN.TO.TR.TT.TV.TW.TZ.UA.UG.UM.US.UY.UZ.VA.VC.VE.VG.VI.VN.VU.WF.WS.YE.YT.ZA.ZM.ZW`.split(`.`),uk=new Set(lk);function dk(e){return uk.has(e)}function fk(e=`en`){let t=new Intl.DisplayNames([e],{type:`region`});return lk.map(e=>({value:e,label:t.of(e)??e})).sort((t,n)=>t.label.localeCompare(n.label,e))}function pk(e,t){let n=ck(t),r=/^(\d+)(?:\.(\d+))?$/.exec(e.trim());if(r===null)return{ok:!1};let i=r[1],a=r[2]??``;if(a.length>n)return{ok:!1};let o=(i+a.padEnd(n,`0`)).replace(/^0+(?=\d)/,``);if(o.length>12)return{ok:!1};let s=Number(o);return s>999999999999?{ok:!1}:{ok:!0,amountMinor:s}}function mk(e,t){let n=ck(t),r=e<0?`-`:``,i=String(Math.trunc(Math.abs(e)));if(n===0)return`${r}${i}`;let a=i.padStart(n+1,`0`),o=a.length-n;return`${r}${a.slice(0,o)}.${a.slice(o)}`}function hk(e,t=`en`){let n=ck(e.currency),r=mk(e.amount_minor,e.currency);try{return new Intl.NumberFormat(t,{style:`currency`,currency:e.currency,minimumFractionDigits:n,maximumFractionDigits:n}).format(r)}catch{return`${e.currency} ${r}`}}var gk=`title`,_k=`name`,vk=`description`,yk=`category`,bk=`price`,xk=`price.amount_minor`,Sk=`price.currency`,Ck=`duration_minutes`,wk=`stock`,Tk=`location.type`,Ek=`location.address`,Dk=`location.address.`,Ok=`location.coordinates`,kk=`location.coordinates.latitude`,Ak=`location.coordinates.longitude`;function jk(e){return Array.from(e).length}function Mk(e){return(e??``).trim()}function Nk(e){return e===`in_person`||e===`video`||e===`phone`}function Pk(e){if(e==null)return null;let t=null;e.address!==null&&e.address!==void 0&&(t={line1:Mk(e.address.line1),line2:Mk(e.address.line2),city:Mk(e.address.city),region:Mk(e.address.region),postal_code:Mk(e.address.postal_code),country:Mk(e.address.country)});let n=null,r=e.coordinates;if(r!=null){let e=r.latitude??null,t=r.longitude??null;n=e===null&&t===null?null:{latitude:e,longitude:t}}return{type:e.type,address:t,coordinates:n}}function Fk(e){let t=Pk(e.location);return{title:Mk(e.title),description:Mk(e.description),price:e.price??null,duration_minutes:e.duration_minutes??null,category:Mk(e.category),location:t}}function Ik(e){let t=Fk(e),n=[];t.title===``?n.push({path:gk,code:`REQUIRED`}):jk(t.title)>255&&n.push({path:gk,code:`TOO_LONG`}),jk(t.description)>5e3&&n.push({path:vk,code:`TOO_LONG`}),jk(t.category)>100&&n.push({path:yk,code:`TOO_LONG`}),n.push(...Lk(t.price));let r=t.duration_minutes;return r!==null&&(r<5||r>1440?n.push({path:Ck,code:`DURATION_OUT_OF_RANGE`}):r%5!=0&&n.push({path:Ck,code:`DURATION_NOT_MULTIPLE_OF_5`})),n.push(...Rk(t.location)),n}function Lk(e){if(e==null)return[{path:bk,code:`REQUIRED`}];let t=[];return sk(e.currency)===void 0&&t.push({path:Sk,code:`CURRENCY_UNKNOWN`}),e.amount_minor<0?t.push({path:xk,code:`AMOUNT_NEGATIVE`}):e.amount_minor>999999999999&&t.push({path:xk,code:`AMOUNT_TOO_LARGE`}),t}function Rk(e){if(e===null)return[];if(!Nk(e.type))return[{path:Tk,code:`LOCATION_TYPE_UNKNOWN`}];if(e.type!==`in_person`){let t=[];
54return e.address!==null&&t.push({path:Ek,code:`ADDRESS_NOT_ALLOWED`}),e.coordinates!==null&&t.push({path:Ok,code:`ADDRESS_NOT_ALLOWED`}),t}let t=[];if(e.address===null)t.push({path:Ek,code:`REQUIRED`});else{let n=e.address,r=[{suffix:`line1`,value:n.line1,required:!0},{suffix:`line2`,value:n.line2,required:!1},{suffix:`city`,value:n.city,required:!0},{suffix:`region`,value:n.region,required:!1},{suffix:`postal_code`,value:n.postal_code,required:!1},{suffix:`country`,value:n.country,required:!0}];for(let e of r){let n=Dk+e.suffix;e.required&&e.value===``?t.push({path:n,code:`REQUIRED`}):jk(e.value)>255?t.push({path:n,code:`TOO_LONG`}):e.suffix===`country`&&e.value!==``&&!dk(e.value)&&t.push({path:n,code:`COUNTRY_UNKNOWN`})}}let n=e.coordinates;return n!==null&&(n.latitude===null||n.longitude===null?t.push({path:Ok,code:`COORDINATES_INCOMPLETE`}):((n.latitude<-90||n.latitude>90)&&t.push({path:kk,code:`LATITUDE_OUT_OF_RANGE`}),(n.longitude<-180||n.longitude>180)&&t.push({path:Ak,code:`LONGITUDE_OUT_OF_RANGE`}))),t}function zk(e){return{name:Mk(e.name),description:Mk(e.description),price:e.price??null,stock:e.stock??0,category:Mk(e.category),location:Pk(e.location)}}function Bk(e){let t=zk(e),n=[];return t.name===``?n.push({path:_k,code:`REQUIRED`}):jk(t.name)>255&&n.push({path:_k,code:`TOO_LONG`}),jk(t.description)>5e3&&n.push({path:vk,code:`TOO_LONG`}),jk(t.category)>100&&n.push({path:yk,code:`TOO_LONG`}),n.push(...Lk(t.price)),t.stock<0?n.push({path:wk,code:`STOCK_NEGATIVE`}):t.stock>1e9&&n.push({path:wk,code:`STOCK_TOO_LARGE`}),n.push(...Rk(t.location)),n}var Vk={provider:``,connection_id:``,url:``};function Hk(e){return e===null?{...Vk}:{provider:e.provider,connection_id:e.connection_id??``,url:e.url}}function Uk(e){if(e.provider===``)return null;let t=e.provider!==`custom`;return{provider:e.provider,connection_id:t&&e.connection_id||null,url:t?``:e.url.trim()}}var Wk={line1:``,line2:``,city:``,region:``,postal_code:``,latitude:``,longitude:``,country:``};({...Wk});function Gk(e=`USD`){return{title:``,description:``,amount:``,currency:e,duration_minutes:``,category:``,location_type:``,address:{...Wk}}}function Kk(e=`USD`){return{name:``,description:``,amount:``,currency:e,stock:``,category:``,location_type:``,address:{...Wk}}}function qk(e){let t=e?.address??null,n=e?.coordinates??null;return{line1:t?.line1??``,line2:t?.line2??``,city:t?.city??``,region:t?.region??``,postal_code:t?.postal_code??``,latitude:n?.latitude===null||n?.latitude===void 0?``:String(n.latitude),longitude:n?.longitude===null||n?.longitude===void 0?``:String(n.longitude),country:t?.country??``}}function Jk(e){return{location_type:e?.type??``,address:qk(e)}}function Yk(e){return{title:e.title,description:e.description,amount:mk(e.price.amount_minor,e.price.currency),currency:e.price.currency,duration_minutes:e.duration_minutes===null?``:String(e.duration_minutes),category:e.category,location_type:e.location?.type??``,address:qk(e.location)}}function Xk(e){return{name:e.name,description:e.description,amount:mk(e.price.amount_minor,e.price.currency),currency:e.price.currency,stock:String(e.stock),category:e.category,location_type:e.location?.type??``,address:qk(e.location)}}var Zk=/^-?\d+(?:\.\d+)?$/,Qk=/^\d+$/;function $k(e,t){let n={},r=null,i=null,a=e.address.latitude.trim(),o=e.address.longitude.trim();a!==``&&(Zk.test(a)?r=Number(a):n[`${t}.coordinates.latitude`]=`catalog.draft.number`),o!==``&&(Zk.test(o)?i=Number(o):n[`${t}.coordinates.longitude`]=`catalog.draft.number`);let s=r===null&&i===null?null:{latitude:r,longitude:i},c=e.location_type===`in_person`;return{errors:n,location:e.location_type===``?null:{type:e.location_type,address:c?{line1:e.address.line1,line2:e.address.line2,city:e.address.city,region:e.address.region,postal_code:e.address.postal_code,country:e.address.country}:null,coordinates:c?s:null}}}function eA(e){let t={},n=pk(e.amount,e.currency);n.ok||(t[`price.amount_minor`]=`catalog.draft.amount`);let r=null,i=e.duration_minutes.trim();i!==``&&(Qk.test(i)?r=Number(i):t.duration_minutes=`catalog.draft.minutes`);let a=$k(e,`location`);return Object.assign(t,a.errors),Object.keys(t).length>0?{ok:!1,errors:t}
54:{ok:!0,input:{title:e.title,description:e.description,price:{amount_minor:n.ok?n.amountMinor:0,currency:e.currency},duration_minutes:r,category:e.category,location:a.location}}}function tA(e){let t={},n=pk(e.amount,e.currency);n.ok||(t[`price.amount_minor`]=`catalog.draft.amount`);let r=0,i=e.stock.trim();i!==``&&(Qk.test(i)?r=Number(i):t.stock=`catalog.draft.wholeNumber`);let a=$k(e,`location`);return Object.assign(t,a.errors),Object.keys(t).length>0?{ok:!1,errors:t}:{ok:!0,input:{name:e.name,description:e.description,price:{amount_minor:n.ok?n.amountMinor:0,currency:e.currency},stock:r,category:e.category,location:a.location}}}function nA(e,t=20){return Math.max(1,Math.ceil(e/t))}function rA(e,t,n=20){let r=nA(e.length,n),i=(Math.min(Math.max(1,Math.floor(t)),r)-1)*n;return e.slice(i,i+n)}function iA(e,t){let n=Math.max(1,Math.floor(t)),r=Math.min(Math.max(1,Math.floor(e)),n),i=Math.max(1,Math.min(r-1,n-3+1)),a=Math.min(n,Math.max(r+1,3)),o=new Set([1,n]);for(let e=i;e<=a;e+=1)o.add(e);let s=[...o].filter(e=>e>=1&&e<=n).sort((e,t)=>e-t),c=[];for(let e=0;e<s.length;e+=1){if(e>0){let t=s[e]-s[e-1];t===2?c.push(s[e]-1):t>2&&c.push(`gap`)}c.push(s[e])}return c}function aA(e,t){let n=t.trim().toLowerCase();return n===``||e.some(e=>e.toLowerCase().includes(n))}function oA(e,t,n){return e.filter(e=>aA([e.title,e.category],t)&&(n||e.archived_at===null))}function sA(e,t,n){return e.filter(e=>aA([e.name,e.category],t)&&(n||e.archived_at===null))}var cA=[{value:``,labelKey:`location.type.unspecified`},{value:`in_person`,labelKey:`location.type.inPerson`},{value:`video`,labelKey:`location.type.video`},{value:`phone`,labelKey:`location.type.phone`}];function lA(e){if(e===null)return;if(e.type===`in_person`){let t=e.address;if(t===null)return{kind:`key`,key:`location.type.inPerson`};let n=t.city.trim();if(n!==``)return{kind:`text`,text:n};let r=t.line1.trim();return r===``?{kind:`key`,key:`location.type.inPerson`}:{kind:`text`,text:r}}let t=cA.find(t=>t.value===e.type);return t===void 0?void 0:{kind:`key`,key:t.labelKey}}function uA(e,t){let n=t===``?``:`${t}.`,r={};for(let[t,i]of Object.entries(e))t===`${n}address`?r.line1=i:t.startsWith(`${n}address.`)?r[t.slice(`${n}address.`.length)]=i:t===`${n}coordinates`?r.coordinates=i:t.startsWith(`${n}coordinates.`)&&(r[t.slice(`${n}coordinates.`.length)]=i);return r}function dA(e){return uA(e,`location`)}var fA=[`google_meet`,`teams`,`zoom`,`custom`],pA={google_meet:`Google Meet`,teams:`Microsoft Teams`,zoom:`Zoom`,custom:`Custom link`};function mA(e){return e!==`custom`}function hA(e){switch(e){case`google_meet`:return`google`;case`teams`:return`microsoft`;case`zoom`:return`zoom`;default:return null}}function gA(e){switch(e){case`google`:return`google_meet`;case`microsoft`:return`teams`;case`zoom`:return`zoom`;default:return null}}function _A(e,t,n){return e==null?t==null?{location_type:``,address:{...Wk},source:null}:{...Jk({type:`in_person`,address:t,coordinates:n??null}),source:`workspace`}:{...Jk(e),source:`preferences`}}var vA=[`google_meet`,`zoom`];function yA(e){let t=e.filter(e=>!e.revoked);return fA.map(e=>{let n=hA(e);if(n===null)return{value:e,label:pA[e],available:!0,reasonKey:``};if(!vA.includes(e))return{value:e,label:pA[e],available:!1,reasonKey:`location.video.notAvailableYet`};let r=t.some(e=>e.provider===n);return{value:e,label:pA[e],available:r,reasonKey:r?``:`location.video.notConnected`}})}function bA(e,t){if(t===``)return[];let n=hA(t);return n===null?[]:e.filter(e=>e.provider===n).slice().sort((e,t)=>e.account_email.localeCompare(t.account_email)).map(e=>({id:e.id,label:e.account_email,revoked:e.revoked}))}function xA({value:e,onChange:t,errors:n,disabled:r}){let{t:i}=K(),a=(0,L.useMemo)(()=>fk(),[]),o=n=>t({...e,...n}),s=e.latitude.trim()!==``&&e.longitude.trim()!==``,c=n.coordinates??n.latitude??n.longitude;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-kit":`address-fields`,children:[(0,R.jsx)(q,{name:`line1`,label:i(`address.line1`),value:e.line1,onChange:e=>o({line1:e.target.value}),error:n.line1,disabled:r}),(0,R.jsx)(q,{name:`line2`,label:i(`address.line2`),value:e.line2,onChange:e=>o({line2:e.target.value}),error:n.line2,disabled:r}),(0,R.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,R.jsx)(q,{name:`city`,label:i(`address.city`),value:e.city,onChange:e=>o({city:e.target.value}),error:n.city,disabled:r}),(0,R.jsx)(q,{name:`region`,label:i(`address.region`),value:e.region,onChange:e=>o({region:e.target.value}),error:n.region,disabled:r})]}),(0,R.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,R.jsx)(q,{name:`postal_code`,label:i(`address.postalCode`),value:e.postal_code,onChange:e=>o({postal_code:e.target.value}),error:n.postal_code,disabled:r}),(0,R.jsx)($O,{name:`country`,label:i(`address.country`),options:[{value:``,label:i(`address.selectCountry`)},...a],value:e.country,onChange:e=>o({country:e.currentTarget.value}),error:n.country,disabled:r,"data-kit":`address-fields-country`})]}),s?(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-4 roun
54ded-md border border-border px-3 py-2`,"data-kit":`address-pin`,children:[(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`address.pinned`,{latitude:e.latitude,longitude:e.longitude})}),(0,R.jsx)(`button`,{type:`button`,className:`text-sm underline underline-offset-4 disabled:opacity-50`,onClick:()=>t({...e,latitude:``,longitude:``}),disabled:r,children:i(`address.clearPin`)})]}):null,c===void 0?null:(0,R.jsx)(`p`,{className:`text-destructive text-sm`,"data-kit":`address-pin-error`,children:c})]})}var SA=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(`textarea`,{className:W(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:n,...t}));SA.displayName=`Textarea`;function CA({name:e,label:t,error:n,hint:r,...i}){let a=(0,L.useId)(),o=`${a}-error`,s=`${a}-hint`,c=[r===void 0?void 0:s,n===void 0?void 0:o].filter(e=>e!==void 0).join(` `)||void 0;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(HC,{htmlFor:a,children:t}),(0,R.jsx)(SA,{id:a,name:e,"aria-invalid":n!==void 0,"aria-describedby":c,...i}),r===void 0?null:(0,R.jsx)(`p`,{id:s,className:`text-muted-foreground text-xs`,children:r}),n===void 0?null:(0,R.jsx)(`p`,{id:o,className:`text-destructive text-sm`,children:n})]})}function wA({name:e,onNameChange:t,description:n,onDescriptionChange:r,website:i,onWebsiteChange:a,contactEmail:o,onContactEmailChange:s,phone:c,onPhoneChange:l,address:u,onAddressChange:d,addressErrors:f,dateFounded:p,onDateFoundedChange:m,registrationNumber:h,onRegistrationNumberChange:g,logo:_,logoFallback:v,logoError:y,onLogoFileSelected:b,onLogoRemove:x,fieldErrors:S,formError:C,saving:w,saved:T,onSubmit:E}){return(0,R.jsx)(MC,{className:`w-full max-w-2xl`,"data-kit":`workspace-form`,children:(0,R.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),E()},className:`space-y-6 p-6`,children:[(0,R.jsx)(QO,{label:`Logo`,shape:`square`,value:_,fallback:v,hint:`PNG, JPEG or WebP. Scaled to fit 512Ã512 before it is saved.`,error:y,onFileSelected:b,onRemove:x,disabled:w}),(0,R.jsx)(q,{name:`name`,label:`Workspace name`,value:e,onChange:e=>t(e.target.value),error:S?.name,disabled:w}),(0,R.jsx)(CA,{name:`description`,label:`Description`,hint:`Shown on your public booking hub.`,value:n,onChange:e=>r(e.target.value),error:S?.description,disabled:w}),(0,R.jsx)(q,{name:`website`,label:`Website`,value:i,onChange:e=>a(e.target.value),error:S?.website,disabled:w}),(0,R.jsx)(q,{name:`contact_email`,label:`Contact email`,value:o,onChange:e=>s(e.target.value),error:S?.contact_email,disabled:w}),(0,R.jsx)(q,{name:`phone`,label:`Phone`,value:c,onChange:e=>l(e.target.value),error:S?.phone,disabled:w}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-kit":`workspace-address`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium leading-none`,children:`Address`}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Clear the street, city and country to remove it.`}),(0,R.jsx)(xA,{value:u,onChange:d,errors:f??{},disabled:w})]}),(0,R.jsx)(q,{name:`date_founded`,label:`Date founded`,type:`date`,value:p,onChange:e=>m(e.target.value),error:S?.date_founded,disabled:w}),(0,R.jsx)(q,{name:`registration_number`,label:`Registration number`,value:h,onChange:e=>g(e.target.value),error:S?.registration_number,disabled:w}),C&&(0,R.jsx)(`p`,{className:`text-destructive text-sm`,children:C}),(0,R.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,R.jsx)(G,{type:`submit`,disabled:w,children:w?`Savingâ¦`:`Save changes`}),T&&!w&&(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Saved`})]})]})})}function TA({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`skeleton`,className:W(`animate-pulse rounded-md bg-muted`,e),...t})}function EA(){let{t:e}=K(),{data:t,isLoading:n}
54=rC(),r=yee(),[i,a]=(0,L.useState)(``),[o,s]=(0,L.useState)(``),[c,l]=(0,L.useState)(``),[u,d]=(0,L.useState)(``),[f,p]=(0,L.useState)(``),[m,h]=(0,L.useState)(Wk),[g,_]=(0,L.useState)(``),[v,y]=(0,L.useState)(``),[b,x]=(0,L.useState)(null),[S,C]=(0,L.useState)(!1),[w,T]=(0,L.useState)();(0,L.useEffect)(()=>{t&&!S&&(a(t.name),s(t.description),l(t.website),d(t.contact_email),p(t.phone),h(Jk({type:`in_person`,address:t.address,coordinates:t.coordinates}).address),_(t.date_founded??``),y(t.registration_number),x(t.logo_url))},[t,S]);let E=async e=>{T(void 0);try{let t=await qO(e);x(t),C(!0)}catch(e){e instanceof zO?T(BO(e.code)):T(BO(`DECODE_FAILED`))}},D=()=>{x(null),C(!0),T(void 0)},O=()=>{if(w)return;let e={name:i,description:o,website:c,contact_email:u,phone:f,date_founded:g,registration_number:v};m.line1.trim()===``&&m.city.trim()===``&&m.country.trim()===``?e.address=null:(e.address={line1:m.line1,line2:m.line2,city:m.city,region:m.region,postal_code:m.postal_code,country:m.country},e.coordinates=m.latitude.trim()===``||m.longitude.trim()===``?null:{latitude:Number(m.latitude),longitude:Number(m.longitude)}),S&&(e.logo_data_url=b??``),r.mutate(e,{onSuccess:()=>{C(!1)}})};if(n||!t)return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(TA,{className:`h-64 w-full max-w-2xl`}),(0,R.jsx)(TA,{className:`h-12 w-full max-w-2xl`}),(0,R.jsx)(TA,{className:`h-12 w-full max-w-2xl`}),(0,R.jsx)(TA,{className:`h-12 w-full max-w-2xl`})]});let k=YC(r.error),ee=YC(r.error,e),A={};for(let[t,n]of Object.entries(uA(k,``)))A[t]=e(tk(n));return(0,R.jsx)(wA,{name:i,onNameChange:a,description:o,onDescriptionChange:s,website:c,onWebsiteChange:l,contactEmail:u,onContactEmailChange:d,phone:f,onPhoneChange:p,address:m,onAddressChange:h,addressErrors:A,dateFounded:g,onDateFoundedChange:_,registrationNumber:v,onRegistrationNumberChange:y,logo:b,logoFallback:VO(i),logoError:w,onLogoFileSelected:E,onLogoRemove:D,fieldErrors:ee,formError:XC(r.error,e),saving:r.isPending,saved:r.isSuccess&&!r.isPending,onSubmit:O})}var DA=Jo(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function OA({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?rs:`span`;return(0,R.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:W(DA({variant:t}),e),...r})}var kA=[{key:`billing.plan.free.limits.connections`,included:!0},{key:`billing.plan.free.limits.links`,included:!0},{key:`billing.plan.free.excludes.branding`,included:!1}],AA=[{key:`billing.plan.pro.includes.connections`,included:!0},{key:`billing.plan.pro.includes.links`,included:!0},{key:`billing.plan.pro.includes.branding`,included:!0}];function jA({features:e,kit:t}){let{t:n}=K();return(0,R.jsx)(`ul`,{"data-kit":t,className:`space-y-2 text-sm`,children:e.map(e=>(0,R.jsxs)(`li`,{className:`flex items-start gap-2`,children:[e.included?(0,R.jsx)(Bw,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-success`}):(0,R.jsx)(mT,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),(0,R.jsx)(`span`,{className:e.included?void 0:`text-muted-foreground`,children:n(e.key)})]},e.key))})}var MA={cancel:`billing.plan.scheduledChange.cancel`,pause:`billing.plan.scheduledChange.pause`,resume:`billing.plan.scheduledChange.resume`};function NA({state:e,trialEndsOn:t,trialDaysLeft:n,prices:r=[],onUpgrade:i,onManageBilling:a,busy:o=!1,billingUnavailable:s=!1,checkoutFailed:c=!1,onRetryCheckout:l,retryingCheckout:u=!1,scheduledChange:d}){let{t:f}=K(),p=e===`free`,m=e===`trialing`,h=e===`pro`||e===`past_due`,g=!s&&(h||p&&a!==void 0),_=!s&&!h&&c,v=!s&&!h&&!c&&r.length>0,y=d===void 0?null:(0,R.jsx)(`p`,{"data-kit":`billing-plan-card-scheduled-change`,className:`text-sm font-medium`,children:f(MA[d.action],{date:d.on}
54)}),b=(0,R.jsx)(IC,{children:(0,R.jsx)(OA,{"data-kit":`billing-plan-card-current`,children:f(`billing.plan.current`)})});return(0,R.jsxs)(`div`,{"data-kit":`billing-plan-card`,className:`flex w-full max-w-3xl flex-col gap-4`,children:[e===`past_due`&&(0,R.jsx)(`p`,{"data-kit":`billing-plan-card-warning`,className:`text-sm font-medium text-destructive`,children:f(`billing.pastDue.warning`)}),s&&(0,R.jsx)(`p`,{"data-kit":`billing-plan-card-notice`,className:`text-sm text-muted-foreground`,children:f(`billing.unavailable`)}),(0,R.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2`,children:[(0,R.jsxs)(MC,{"data-kit":`billing-plan-card-free`,className:p?`border-primary`:void 0,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{children:f(`billing.plan.free.name`)}),(0,R.jsx)(FC,{children:f(`billing.plan.free.description`)}),p&&y,p&&b]}),(0,R.jsx)(LC,{children:(0,R.jsx)(jA,{features:kA,kit:`billing-plan-card-free-features`})})]}),(0,R.jsxs)(MC,{"data-kit":`billing-plan-card-pro`,className:p?void 0:`border-primary`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{children:f(m?`billing.plan.trial.name`:`billing.plan.pro.name`)}),(0,R.jsx)(FC,{children:m?f(`billing.plan.trial.description`,{date:t}):f(`billing.plan.pro.description`)}),m&&n!==void 0&&(0,R.jsx)(`p`,{"data-kit":`billing-plan-card-days-left`,className:`text-sm font-medium`,children:n===0?f(`billing.plan.trial.endsToday`):n===1?f(`billing.plan.trial.dayLeft`):f(`billing.plan.trial.daysLeft`,{days:n})}),!p&&y,!p&&b]}),(0,R.jsx)(LC,{children:(0,R.jsx)(jA,{features:AA,kit:`billing-plan-card-pro-features`})}),(g||v||_)&&(0,R.jsxs)(RC,{"data-kit":`billing-plan-card-actions`,className:`flex-col items-stretch gap-2 border-t`,children:[g&&(0,R.jsx)(G,{"data-kit":e===`past_due`?`billing-plan-card-update`:`billing-plan-card-manage`,className:`w-full`,disabled:o,onClick:()=>a?.(),children:f(e===`past_due`?`billing.actions.updatePayment`:`billing.actions.manageBilling`)}),v&&r.map(e=>(0,R.jsx)(G,{"data-kit":`billing-plan-card-upgrade`,variant:e.interval===`year`?`default`:`outline`,className:`h-auto w-full whitespace-normal`,disabled:o,onClick:()=>i?.(e.priceId),children:f(e.interval===`month`?`billing.actions.upgradeMonthly`:`billing.actions.upgradeYearly`,{price:e.amountLabel})},e.priceId)),_&&(0,R.jsxs)(`div`,{"data-kit":`billing-plan-card-checkout-failed`,className:`flex flex-col gap-2`,children:[(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f(`billing.checkoutFailed`)}),(0,R.jsx)(G,{"data-kit":`billing-plan-card-retry`,variant:`outline`,className:`w-full`,disabled:u,onClick:()=>l?.(),children:f(`billing.actions.retry`)})]})]})]})]})]})}var PA={all:[`billing`],me:()=>[...PA.all,`me`],checkoutConfig:()=>[...PA.all,`checkout-config`]},FA=`calendhub.billing.dismissedNotice`;function Fee(e){try{return typeof localStorage>`u`?!1:localStorage.getItem(FA)===e}catch{return!1}}function IA(e){try{if(typeof localStorage>`u`)return;localStorage.setItem(FA,e)}catch{}}var LA=`/api/v1/billing`,RA=`https://api.calendhub.com`;async function zA(e){return(await B(`${LA}/me`,{baseUrl:RA,signal:e})).entitlement}async function BA(e){return(await B(`${LA}/checkout-config`,{baseUrl:RA,signal:e})).checkout}async function VA(){return(await B(`${LA}/portal-session`,{baseUrl:RA,method:`POST`})).portal.url}function HA(){return pt({queryKey:PA.me(),queryFn:({signal:e})=>zA(e),staleTime:3e4})}function UA(){return pt({queryKey:PA.checkoutConfig(),queryFn:({signal:e})=>BA(e),staleTime:3e5,retry:!1})}function WA(){return mt({mutationFn:()=>VA()})}function GA(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function KA(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){GA(a,r,i,o,s,`next`,e)}function s(e){GA(a,r,i,o,s,`throw`,e)}o(void 0)})}}function qA(e,t,n){return(t=ej(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
vendor: 5,145 bytes, line 54
54t%2?JA(Object(n),!0).forEach(function(t){qA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XA(e,t){if(e==null)return{};var n,r,i=ZA(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ZA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function QA(){QA=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a=typeof Symbol==`function`?Symbol:{},o=a.iterator||`@@iterator`,s=a.asyncIterator||`@@asyncIterator`,c=a.toStringTag||`@@toStringTag`;function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},``)}catch{l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof _?t:_,o=Object.create(a.prototype);return i(o,`_invoke`,{value:E(e,n,new ee(r||[]))}),o}function d(e,t,n){try{return{type:`normal`,arg:e.call(t,n)}}catch(e){return{type:`throw`,arg:e}}}t.wrap=u;var f=`suspendedStart`,p=`suspendedYield`,m=`executing`,h=`completed`,g={};function _(){}function v(){}function y(){}var b={};l(b,o,function(){return this});var x=Object.getPrototypeOf,S=x&&x(x(A([])));S&&S!==n&&r.call(S,o)&&(b=S);var C=y.prototype=_.prototype=Object.create(b);function w(e){[`next`,`throw`,`return`].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function T(e,t){function n(i,a,o,s){var c=d(e[i],e,a);if(c.type!==`throw`){var l=c.arg,u=l.value;return u&&typeof u==`object`&&r.call(u,`__await`)?t.resolve(u.__await).then(function(e){n(`next`,e,o,s)},function(e){n(`throw`,e,o,s)}):t.resolve(u).then(function(e){l.value=e,o(l)},function(e){return n(`throw`,e,o,s)})}s(c.arg)}var a;i(this,`_invoke`,{value:function(e,r){function i(){return new t(function(t,i){n(e,r,t,i)})}return a=a?a.then(i,i):i()}})}function E(t,n,r){var i=f;return function(a,o){if(i===m)throw Error(`Generator is already running`);if(i===h){if(a===`throw`)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=D(s,r);if(c){if(c===g)continue;return c}}if(r.method===`next`)r.sent=r._sent=r.arg;else if(r.method===`throw`){if(i===f)throw i=h,r.arg;r.dispatchException(r.arg)}else r.method===`return`&&r.abrupt(`return`,r.arg);i=m;var l=d(t,n,r);if(l.type===`normal`){if(i=r.done?h:p,l.arg===g)continue;return{value:l.arg,done:r.done}}l.type===`throw`&&(i=h,r.method=`throw`,r.arg=l.arg)}}}function D(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,r===`throw`&&t.iterator.return&&(n.method=`return`,n.arg=e,D(t,n),n.method===`throw`)||r!==`return`&&(n.method=`throw`,n.arg=TypeError(`The iterator does not provide a '`+r+`' method`)),g;var a=d(i,t.iterator,n.arg);if(a.type===`throw`)return n.method=`throw`,n.arg=a.arg,n.delegate=null,g;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,n.method!==`return`&&(n.method=`next`,n.arg=e),n.delegate=null,g):o:(n.method=`throw`,n.arg=TypeError(`iterator result is not an object`),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type=`normal`,delete t.arg,e.completion=t}function ee(e){this.tryEntries=[{tryLoc:`root`}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||t===``){var n=t[o];if(n)return n.call(t);if(typeof t.next==`function`)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw TypeError(typeof t+` is not iterable`)}return v.prototype=y,i(C,`constructor`,{value:y,configurable:!0}),i(y,`constructor`,{value:v,configurable:!0}),v.displayName=l(y,c,`GeneratorFunction`),t.isGeneratorFunction=function(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===v||(t.displayName||t.name)===`GeneratorFunction`)},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,l(e,c,`GeneratorFunction`)),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},w(T.prototype),l(T.prototype,s,function(){return this}),t.AsyncIterator=T,t.async=function(e,n,r,i,a){a===void 0&&(a=Promise);var o=new T(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then(function(e){return e.done?e.value:o.next()})},w(C),l(C,c,`Generator`),l(C,o,function(){return this}),l(C,`toString`,function(){return`[object Generator]`}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,ee.prototype={constructor:ee,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=`next`,this.arg=e,this.tryEntries.forEac
54h(k),!t)for(var n in this)n.charAt(0)===`t`&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type===`throw`)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type=`throw`,s.arg=t,n.next=r,i&&(n.method=`next`,n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if(o.tryLoc===`root`)return i(`end`);if(o.tryLoc<=this.prev){var c=r.call(o,`catchLoc`),l=r.call(o,`finallyLoc`);if(c&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw Error(`try statement without catch or finally`);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,`finallyLoc`)&&this.prev<i.finallyLoc){var a=i;break}}a&&(e===`break`||e===`continue`)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method=`next`,this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if(e.type===`throw`)throw e.arg;return e.type===`break`||e.type===`continue`?this.next=e.arg:e.type===`return`?(this.rval=this.arg=e.arg,this.method=`return`,this.next=`end`):e.type===`normal`&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type===`throw`){var i=r.arg;k(n)}return i}}throw Error(`illegal catch attempt`)},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},this.method===`next`&&(this.arg=e),g}},t}function $A(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ej(e){var t=$A(e,`string`);return typeof t==`symbol`?t:t+``}var tj={CLASSIC:`classic`,V1:`v1`},nj=tj.V1,rj=`https://cdn.paddle.com/paddle/paddle.js`,ij=`https://cdn.paddle.com/paddle/v2/paddle.js`,aj={url:rj},oj={url:ij};function sj(e){return document.querySelector(`script[src="${e}"]`)||void 0}function cj(e){var t=document.createElement(`script`);t.src=e;var n=document.head||document.body;if(!n)throw Error(`Cannot inject Paddle.js. It needs a <head> or <body> element.`);return n.appendChild(t),t}var lj={classic:void 0,v1:void 0},uj={classic:`PaddleClassic`,v1:`PaddleBillingV1`};function dj(e){var t=fj(e)?.url;if(t){var n=lj[e],r=uj[e];return n===void 0?(lj[e]=new Promise(function(n,i){if(typeof window>`u`){n(void 0);return}if(window[r]){n(window[r]);return}try{var a=sj(t);a||=cj(t),a.addEventListener(`load`,function(){window[r]?n(window[r]):i(Error(`Paddle.js not available`))}),a.addEventListener(`error`,function(){i(Error(`Failed to load Paddle.js - ${e}`))})}catch(e){i(e);return}}),lj[e]):n}}function fj(e){if(e===tj.CLASSIC)return aj;if(e===tj.V1)return oj;console.error(`[Paddle] Unknown Paddle Version`)}var pj=[`environment`,`version`],mj=[`environment`,`version`];function hj(e,t){var n=e.environment;e.version;var r=XA(e,pj);try{n&&t.Environment.set(n),t.Initialized?t.Update(YA({},r)):t.Initialize(YA({},r))}catch(e){console.warn(`[Paddle] Paddle Initialization failed. Please check the inputs`,e)}}function gj(e,t){var n=e.environment;e.version;var r=XA(e,mj);try{n&&t.Environment.set(n),t.Setup(YA({},r))}catch(e){console.warn(`[Paddle] Paddle Initialization failed. Please check the inputs`,e)}}var _j;(function(e){e.CHECKOUT_LOADED=`checkout.loaded`,e.CHECKOUT_CLOSED=`checkout.closed`,e.CHECKOUT_UPDATED=`checkout.updated`,e.CHECKOUT_COMPLETED=`checkout.completed`,e.CHECKOUT_ERROR=`checkout.error`,e.CHECKOUT_FAILED=`checkout.failed`,e.CHECKOUT_ITEMS_UPDATED=`checkout.items.updated`,e.CHECKOUT_ITEMS_REMOVED=`checkout.items.removed`,e.CHECKOUT_CUSTOMER_CREATED=`checkout.customer.created`,e.CHECKOUT_CUSTOMER_UPDATED=`checkout.customer.updated`,e.CHECKOUT_CUSTOMER_REMOVED=`checkout.customer.removed`,e.CHECKOUT_PAYMENT_SELECTED=`checkout.payment.selected`,e.CHECKOUT_PAYMENT_INITIATED=`checkout.payment.initiated`,e.CHECKOUT_PAYMENT_FAILED=`checkout.payment.failed`,e.CHECKOUT_PAYMENT_ERROR=`checkout.payment.error`,e.CHECKOUT_DISCOUNT_APPLIED=`checkout.discount.applied`,e.CHECKOUT_DISCOUNT_REMOVED=`checkout.discount.removed`,e.CHECKOUT_UPSELL_CANCELED=`checkout.upsell.canceled`})(_j||={});var vj;(function(e){e.DAY=`day`,e.WEEK=`week`,e.MONTH=`month`,e.YEAR=`year`})(vj||={});var yj;(function(e){e.ALIPAY=`alipay`,e.APPLE_PAY=`apple-pay`,e.CARD=`card`,e.GOOGLE_PAY=`google-pay`,e.IDEAL=`ideal`,e.PAYPAL=`paypal`,e.WECHAT_PAY=`wechat-pay`,e.WIRE_TRANSFER=`wire-transfer`,e.NONE=`
54none`})(yj||={});var bj;(function(e){e.AMERICAN_EXPRESS=`american_express`,e.DINERS_CLUB=`diners_club`,e.DISCOVER=`discover`,e.JCB=`jcb`,e.MADA=`mada`,e.MAESTRO=`maestro`,e.MASTER_CARD=`mastercard`,e.UNION_PAY=`union_pay`,e.VISA=`visa`,e.UNKNOWN=`unknown`})(bj||={});var xj;(function(e){e.DRAFT=`draft`,e.READY=`ready`,e.COMPLETED=`completed`,e.BILLED=`billed`,e.canceled=`canceled`,e.PAST_DUE=`past_due`})(xj||={});function Sj(e){return Cj.apply(this,arguments)}function Cj(){return Cj=KA(QA().mark(function e(t){var n,r;return QA().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?.version||nj,e.next=3,dj(n);case 3:if(r=e.sent,!r){e.next=9;break}return t&&(n===tj.V1?hj(t,r):n===tj.CLASSIC&&gj(t,r)),e.abrupt(`return`,r);case 9:return console.error(`[Paddle] Error Loading Paddle`),e.abrupt(`return`);case 11:case`end`:return e.stop()}},e)})),Cj.apply(this,arguments)}var wj=2e3,Tj=new Set;function Ej(e){return Tj.add(e),()=>{Tj.delete(e)}}var Dj=null,Oj=null;function kj(e,t){return Dj!==null&&Oj===e?Dj:(Oj=e,Dj=Sj({token:e,environment:t===`live`?`production`:`sandbox`,eventCallback:e=>{for(let t of[...Tj])t(e.name??``)}}),Dj)}async function Aj(e){let t=await kj(e.token,e.environment);if(t===void 0)throw Error(`Paddle failed to initialise`);t.Checkout.open({items:[{priceId:e.priceId}],customData:{checkout_ref:e.checkoutRef},...e.email?{customer:{email:e.email}}:{},settings:{displayMode:`overlay`}})}function jj(e){return e.status===`past_due`?`past_due`:e.status===`active`?e.t
54ier===`pro`?`pro`:`free`:e.status===`trialing`?`trialing`:`free`}function Mj(e,t){let n=new Date(e),r=new Date(t),i=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),a=Date.UTC(r.getFullYear(),r.getMonth(),r.getDate());return Math.max(0,Math.round((i-a)/864e5))}var Nj=`https://calendhub.com/terms-of-service`,Pj=`https://calendhub.com/refund-cancellation`;function Fj({href:e,children:t}){return(0,R.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary underline`,children:t})}function Ij(){let{t:e}=K(),t=z(),n=dt(HA()),r=dt(UA()),i=WA(),[a,o]=(0,L.useState)(!1);if((0,L.useEffect)(()=>Ej(e=>{e===`checkout.completed`&&o(!0)}),[]),(0,L.useEffect)(()=>{if(!a)return;let e=0,n=setInterval(()=>{e+=1,e>=10&&o(!1),t.invalidateQueries({queryKey:PA.me()})},wj);return()=>clearInterval(n)},[a,t]),(0,L.useEffect)(()=>{a&&n.data?.status===`active`&&o(!1)},[a,n.data?.status]),n.isLoading)return(0,R.jsx)(TA,{className:`h-64 w-full max-w-3xl`});if(n.isError||n.data===void 0)return(0,R.jsx)(`p`,{"data-kit":`billing-load-failed`,children:e(`billing.loadFailed`)});let s=ko(r.error)&&r.error.code===`PADDLE_NOT_CONFIGURED`,c=r.isError&&!s,l=zE(),u=e=>new Date(e).toLocaleDateString(l,{day:`numeric`,month:`long`,year:`numeric`}),d=(r.data?.prices??[]).map(e=>({priceId:e.price_id,interval:e.billing_interval,amountLabel:hk({amount_minor:e.amount_minor,currency:e.currency},l)})),f=jj(n.data),p=n.data.trial_ends_at,m=n.data.scheduled_change??null,h=n.data.status===`canceled`||n.data.status===`paused`;return(0,R.jsxs)(`div`,{className:`flex w-full max-w-3xl flex-col gap-4`,children:[(0,R.jsx)(NA,{state:f,trialEndsOn:p===null?void 0:u(p),trialDaysLeft:p===null?void 0:Mj(p,Date.now()),prices:d,onUpgrade:e=>{let n=r.data;if(n===void 0)return;let i=t.getQueryData(QS.me())?.email;Aj({token:n.client_token,environment:n.environment,priceId:e,checkoutRef:n.checkout_ref,email:i})},onManageBilling:f===`pro`||f===`past_due`||h?()=>i.mutate(void 0,{onSuccess:e=>{window.open(e,`_blank`,`noopener,noreferrer`)}}):void 0,scheduledChange:m===null?void 0:{action:m.action,on:u(m.effective_at)},busy:i.isPending,billingUnavailable:s,checkoutFailed:c,onRetryCheckout:()=>{r.refetch()},retryingCheckout:r.isFetching}),(f===`free`||f===`trialing`)&&(0,R.jsx)(`p`,{"data-kit":`billing-legal`,className:`text-muted-foreground text-xs`,children:(0,R.jsx)(RS,{t:e,i18nKey:`billing.legal`,components:{terms:(0,R.jsx)(Fj,{href:Nj}),refund:(0,R.jsx)(Fj,{href:Pj})}})})]})}function Lj({title:e,description:t,action:n,onDismiss:r,dismissLabel:i}){return(0,R.jsxs)(`div`,{"data-kit":`plan-notice`,className:`flex items-start gap-3 rounded-md border border-primary/30 bg-primary/5 px-4 py-3 text-sm`,children:[(0,R.jsx)(kT,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-primary`}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[(0,R.jsx)(`p`,{"data-kit":`plan-notice-title`,className:`font-medium`,children:e}),(0,R.jsx)(`p`,{"data-kit":`plan-notice-description`,className:`text-muted-foreground`,children:t}),n!==void 0&&(0,R.jsx)(`div`,{"data-kit":`plan-notice-action`,className:`pt-1`,children:n})]}),r!==void 0&&(0,R.jsx)(G,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":i,onClick:()=>r(),children:(0,R.jsx)(HT,{})})]})}function Rj(e,t){return e.trial_ends_at===null?null:e.status===`trialing`?Mj(e.trial_ends_at,t)<=3?`ending`:null:e.status===`expired`?`ended`:null}function zj(e,t,n,r){return t===`ending`?`ending:${e.user_id}:${n}:${Mj(n,r)}`:`ended:${e.user_id}:${n}`}function Bj({upgradeLink:e}){let{t}=K(),n=dt(HA()),[r,i]=(0,L.useState)(null),a=n.data;if(a===void 0||a.trial_ends_at===null)return null;let o=Date.now(),s=Rj(a,o);if(s===null)return null;let c=zj(a,s,a.trial_ends_at,o);if(r===c||Fee(c))return null;let l=()=>{IA(c),i(c)},u,d;
54if(s===`ending`){let e=Mj(a.trial_ends_at,o),n=e===0?t(`billing.plan.trial.endsToday`):e===1?t(`billing.plan.trial.dayLeft`):t(`billing.plan.trial.daysLeft`,{days:e});u=t(`billing.notice.trialEnding.title`),d=t(`billing.notice.trialEnding.description`,{remaining:n})}else{let{max_connections:e,max_booking_links:n}=a.limits,r=e===null?t(`billing.limits.connectionsUnlimited`):t(`billing.limits.connections`,{count:e}),i=n===null?t(`billing.limits.linksUnlimited`):t(`billing.limits.links`,{count:n});u=t(`billing.notice.trialEnded.title`),d=t(`billing.notice.trialEnded.description`,{connections:r,links:i})}return(0,R.jsx)(`div`,{"data-kit":`billing-notice`,className:`shrink-0 px-6 pt-4`,children:(0,R.jsx)(Lj,{title:u,description:d,action:e,onDismiss:l,dismissLabel:t(`billing.notice.dismiss`)})})}var Vj=rd,Hj=sd,Uj=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(ld,{ref:n,className:W(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));Uj.displayName=ld.displayName;var Wj=L.forwardRef(({className:e,children:t,...n},r)=>(0,R.jsxs)(Hj,{children:[(0,R.jsx)(Uj,{}),(0,R.jsxs)(pd,{ref:r,className:W(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...n,children:[t,(0,R.jsxs)(Sd,{className:`absolute right-4 top-4 roun
54ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,R.jsx)(HT,{className:`h-4 w-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));Wj.displayName=pd.displayName;var Gj=({className:e,...t})=>(0,R.jsx)(`div`,{className:W(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});Gj.displayName=`DialogHeader`;var Kj=({className:e,...t})=>(0,R.jsx)(`div`,{className:W(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Kj.displayName=`DialogFooter`;var qj=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(vd,{ref:n,className:W(`text-lg font-semibold leading-none tracking-tight`,e),...t}));qj.displayName=vd.displayName;var Jj=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(bd,{ref:n,className:W(`text-sm text-muted-foreground`,e),...t}));Jj.displayName=bd.displayName;var Yj=Jo(``,{variants:{size:{sm:`max-w-sm`,md:`max-w-lg`,lg:`max-w-2xl`},scrollBody:{true:`flex max-h-[90dvh] flex-col overflow-hidden`,false:``},mobile:{centred:``,sheet:`max-md:inset-x-0 max-md:top-auto max-md:bottom-0 max-md:w-full max-md:max-w-none max-md:translate-x-0 max-md:translate-y-0 max-md:rounded-t-lg max-md:rounded-b-none!`}},defaultVariants:{size:`md`,scrollBody:!1,mobile:`centred`}});function Xj({open:e,onOpenChange:t,title:n,description:r,footer:i,headerActions:a,headerLead:o,hideTitle:s=!1,size:c=`md`,scrollBody:l=!1,mobile:u=`centred`,children:d}){return(0,R.jsx)(Vj,{open:e,onOpenChange:e=>t(e),children:(0,R.jsxs)(Wj,{"data-kit":`dialog-panel`,className:Yj({size:c,scrollBody:l,mobile:u}),children:[(0,R.jsx)(Gj,{"data-kit":`dialog-header`,className:`shrink-0`,children:a||o?(0,R.jsxs)(`div`,{className:o?`flex items-start justify-between gap-3 border-b pb-4 pr-8`:`flex items-start justify-between gap-3 pr-8`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,R.jsx)(qj,{className:s?`sr-only`:void 0,children:n}),r?(0,R.jsx)(Jj,{children:r}):null,o?(0,R.jsx)(`div`,{"data-kit":`dialog-header-lead`,children:o}):null]}),a?(0,R.jsx)(`div`,{"data-kit":`dialog-header-actions`,className:`flex shrink-0 items-center gap-2`,children:a}):null]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(qj,{className:s?`sr-only`:void 0,children:n}),r?(0,R.jsx)(Jj,{children:r}):null]})}),l?(0,R.jsx)(`div`,{"data-kit":`dialog-body`,className:`min-h-0 flex-1 overflow-y-auto`,children:d}):d,i?(0,R.jsx)(Kj,{"data-kit":`dialog-footer`,className:`shrink-0`,children:i}):null]})})}function Zj({name:e,label:t,options:n,value:r,onValueChange:i,error:a,hint:o,disabled:s,"aria-required":c}){let l=(0,L.useId)(),u=`${l}-error`,d=`${l}-hint`,f=[o===void 0?void 0:d,a===void 0?void 0:u].filter(e=>e!==void 0).join(` `)||void 0;return(0,R.jsxs)(`fieldset`,{"data-kit":`radio-field`,disabled:s,className:`flex flex-col gap-2`,"aria-invalid":a!==void 0,"aria-describedby":f,children:[(0,R.jsx)(`legend`,{className:`mb-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,children:t}),(0,R.jsx)(`div`,{className:`flex flex-col gap-2`,children:n.map(t=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`input`,{"data-kit":`radio-field-option`,type:`radio`,id:`${l}-${t.value}`,name:e,value:t.value,checked:r===t.value,onChange:e=>i(e.target.value),disabled:s||t.disabled,className:`h-4 w-4 rounded-full border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,"aria-required":c}),(0,R.jsx)(`label`,{htmlFor:`${l}-${t.value}`,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,children:t.label})]},t.value))}),o===void 0?null:(0,R.jsx)(`p`,{id:d,className:`text-muted-foreground text-xs`,children:o}),a===void 0?null:(0,R.jsx)(`p`,{id:u,className:`text-destructive text-sm`,children:a})]})}var Qj=5e3;function $j({open:e,onOpenChange:t,kind:n,onSubmit:r,pending:i,sent:a,error:o,messageError:s}){let{t:c}=K();return(0,R.jsx)(Xj,{open:e,onOpenChange:e=>t(e),title:c(`support.dialog.title`),description:c(`support.dialog.description`),children:a?(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsx)(`p`,{role:`status`,className:`text-sm`,children:c(`support.dialog.sent`)}),(0,R.jsx)(`div`,{className:`flex justify-end`,children:(0,R.jsx)(G,{type:`button`,onClick:()=>t(!1),children:c(`support.dialog.done`)})})]}):(0,R.jsx)(eM,{initialKind:n,onCancel:()=>t(!1),onSubmit:r,pending:i,error:o,messageError:s})})}function eM({initialKind:e,onCancel:t,onSubmit:n,pending:r,error:i,messageError:a}){let{t:o}
54=K(),[s,c]=(0,L.useState)(e),[l,u]=(0,L.useState)(``),[d,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)(!1);function h(e){if(e.preventDefault(),l.trim()===``){f(!0);return}f(!1),m(!1),n({kind:s,message:l})}return(0,R.jsxs)(`form`,{noValidate:!0,onSubmit:h,className:`flex flex-col gap-4`,children:[(0,R.jsx)(Zj,{name:`kind`,label:o(`support.dialog.kind.label`),options:[{value:`support`,label:o(`support.dialog.kind.support`)},{value:`feedback`,label:o(`support.dialog.kind.feedback`)}],value:s,onValueChange:e=>c(e),disabled:r}),(0,R.jsx)(CA,{name:`message`,label:o(`support.dialog.message`),hint:o(`support.dialog.messageHint`),maxLength:Qj,rows:6,required:!0,disabled:r,value:l,onChange:e=>{u(e.target.value),f(!1),m(!0)},error:d?o(`errors.REQUIRED`):p?void 0:a}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:o(`support.dialog.context`)}),i?(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:i}):null,(0,R.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:t,disabled:r,children:o(`support.dialog.cancel`)}),(0,R.jsx)(G,{type:`submit`,disabled:r,children:o(r?`support.dialog.sending`:`support.dialog.send`)})]})]})}var tM=`ce31c3ac3fc773aa6568e92918a439a01afb5d7f`;function nM(e){return e.split(/[?#]/,1)[0].slice(0,512)}function rM({kind:e,page:t,onClose:n}){let{t:r}=K(),i=See(),{data:a}=dt(HA()),o=a?`${a.tier}/${a.status}`.slice(0,32):``,s=YC(i.error,r).message;function c(){let e=i.error;if(!e)return null;if(ko(e)){if(e.status===429)return r(`support.dialog.errors.limit`);if(e.status===502||e.status===503)return r(`support.dialog.errors.sendFailed`);if(e.status===422)return`message`in e.fields?null:r(`errors.UNEXPECTED`)}return XC(e,r)}function l({kind:e,message:n}){i.mutate({kind:e,message:n,page:nM(t),app_version:tM.slice(0,64),plan:o})}return(0,R.jsx)($j,{open:e!==null,onOpenChange:e=>{e||(i.reset(),n())},kind:e??`support`,onSubmit:l,pending:i.isPending,sent:i.isSuccess,messageError:s,error:c()})}function iM({brand:e=`CalendHub`,leading:t,trailing:n}){return(0,R.jsxs)(`header`,{className:`border-border flex shrink-0 items-center border-b px-6 py-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t,e===null?null:(0,R.jsx)(`span`,{className:`font-semibold tracking-tight`,children:e})]}),n===void 0?null:(0,R.jsx)(`div`,{className:`ml-auto flex items-center gap-2`,children:n})]})}var aM=768;function oM(){let[e,t]=L.useState(void 0);return L.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<aM)};return e.addEventListener(`change`,n),t(window.innerWidth<aM),()=>e.removeEventListener(`change`,n)},[]),!!e}function sM({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,R.jsx)(sv,{"data-slot":`separator`,decorative:n,orientation:t,className:W(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}function cM({...e}){return(0,R.jsx)(rd,{"data-slot":`sheet`,...e})}function lM({...e}){return(0,R.jsx)(sd,{"data-slot":`sheet-portal`,...e})}function uM({className:e,...t}){return(0,R.jsx)(ld,{"data-slot":`sheet-overlay`,className:W(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function dM({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,R.jsxs)(lM,{children:[(0,R.jsx)(uM,{}),(0,R.jsxs)(pd,{"data-slot":`sheet-content`,className:W(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,R.jsxs)(Sd,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,R.jsx)(HT,{className:`size-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function fM({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`sheet-header`,className:W(`flex flex-col gap-1.5 p-4`,e),...t})}function pM({className:e,...t}){return(0,R.jsx)(vd,{"data-slot":`sheet-title`,className:W(`font-semibold text-foreground`,e),...t})}function mM({className:e,...t}){return(0,R.jsx)(bd,{"data-slot":`sheet-description`,className:W(`text-sm text-muted-foreground`,e),...t})}function hM({delayDuration:e=0,...t}){return(0,R.jsx)(oy,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function gM({...e}){return(0,R.jsx)(sy,{"data-slot":`tooltip`,...e})}function _M({...e}){return(0,R.jsx)(cy,{"data-slot":`tooltip-trigger`,...e})}function vM({className:e,sideOffset:t=0,children:n,...r}){return(0,R.jsx)(ly,{children:(0,R.jsxs)(uy,{"data-slot":`tooltip-content`,sideOffset:t,className:W(`z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
54de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...r,children:[n,(0,R.jsx)(dy,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var yM=`sidebar_state`,bM=604800,xM=`16rem`,SM=`18rem`,CM=`3rem`,wM=`b`,TM=L.createContext(null);function EM(){let e=L.useContext(TM);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function DM({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=oM(),[c,l]=L.useState(!1),[u,d]=L.useState(e),f=t??u,p=L.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${yM}=${t}; path=/; max-age=${bM}`},[n,f]),m=L.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);L.useEffect(()=>{let e=e=>{e.key===wM&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=L.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,R.jsx)(TM.Provider,{value:g,children:(0,R.jsx)(hM,{delayDuration:0,children:(0,R.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":xM,"--sidebar-width-icon":CM,...i},className:W(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})})}function OM({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...a}){let{isMobile:o,state:s,openMobile:c,setOpenMobile:l}=EM();return n===`none`?(0,R.jsx)(`div`,{"data-slot":`sidebar`,className:W(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...a,children:i}):o?(0,R.jsx)(cM,{open:c,onOpenChange:l,...a,children:(0,R.jsxs)(dM,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":SM},side:e,children:[(0,R.jsxs)(fM,{className:`sr-only`,children:[(0,R.jsx)(pM,{children:`Sidebar`}),(0,R.jsx)(mM,{children:`Displays the mobile sidebar.`})]}),(0,R.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,R.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":s,"data-collapsible":s===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,R.jsx)(`div`,{"data-slot":`sidebar-gap`,className:W(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,R.jsx)(`div`,{"data-slot":`sidebar-container`,className:W(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,e===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...a,children:(0,R.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm`,children:i})})]})}function kM({className:e,onClick:t,...n}){let{toggleSidebar:r}=EM();return(0,R.jsxs)(G,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:W(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,R.jsx)(vT,{}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function AM({className:e,...t}){let{toggleSidebar:n}=EM();return(0,R.jsx)(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:n,title:`Toggle Sidebar`,className:W(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,e),...t})}function jM({className:e,...t}){return(0,R.jsx)(`main`,{"data-slot":`sidebar-inset`,className:W(`relative flex w-full flex-1 flex-col bg-background`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function MM({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:W(`flex flex-col gap-2 p-2`,e),...t})}function NM({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:W(`flex flex-col gap-2 p-2`,e),...t})}function PM({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:W(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function FM({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:W(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function IM({className:e,asChild:t=!1,...n}){let r=t?rs:`div`;return(0,R.jsx)(r,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:W(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground
54/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,e),...n})}function LM({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:W(`w-full text-sm`,e),...t})}function RM({className:e,...t}){return(0,R.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:W(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function zM({className:e,...t}){return(0,R.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:W(`group/menu-item relative`,e),...t})}var BM=Jo(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function VM({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let s=e?rs:`button`,{isMobile:c,state:l}=EM(),u=(0,R.jsx)(s,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:W(BM({variant:n,size:r}),a),...o});return i?(typeof i==`string`&&(i={children:i}),(0,R.jsxs)(gM,{children:[(0,R.jsx)(_M,{asChild:!0,children:u}),(0,R.jsx)(vM,{side:`right`,align:`center`,hidden:l!==`collapsed`||c,...i})]})):u}function HM({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:W(`pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none`,`peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,e),...t})}function UM({className:e,size:t=`default`,...n}){return(0,R.jsx)(Md,{"data-slot":`avatar`,"data-size":t,className:W(`group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6`,e),...n})}function WM({className:e,...t}){return(0,R.jsx)(Pd,{"data-slot":`avatar-image`,className:W(`aspect-square size-full`,e),...t})}function GM({className:e,...t}){return(0,R.jsx)(Id,{"data-slot":`avatar-fallback`,className:W(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,e),...t})}function KM({...e}){return(0,R.jsx)(v_,{"data-slot":`dropdown-menu`,...e})}function qM({...e}){return(0,R.jsx)(b_,{"data-slot":`dropdown-menu-portal`,...e})}function JM({...e}){return(0,R.jsx)(y_,{"data-slot":`dropdown-menu-trigger`,...e})}function YM({className:e,sideOffset:t=4,...n}){return(0,R.jsx)(b_,{children:(0,R.jsx)(x_,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:W(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
54de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function XM({...e}){return(0,R.jsx)(S_,{"data-slot":`dropdown-menu-group`,...e})}function ZM({className:e,inset:t,variant:n=`default`,...r}){return(0,R.jsx)(w_,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:W(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function QM({...e}){return(0,R.jsx)(T_,{"data-slot":`dropdown-menu-radio-group`,...e})}function $M({className:e,children:t,...n}){return(0,R.jsxs)(E_,{"data-slot":`dropdown-menu-radio-item`,className:W(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,R.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,R.jsx)(D_,{children:(0,R.jsx)(Qw,{className:`size-2 fill-current`})})}),t]})}function eN({className:e,inset:t,...n}){return(0,R.jsx)(C_,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:W(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function tN({className:e,...t}){return(0,R.jsx)(O_,{"data-slot":`dropdown-menu-separator`,className:W(`-mx-1 my-1 h-px bg-border`,e),...t})}function nN({...e}){return(0,R.jsx)(k_,{"data-slot":`dropdown-menu-sub`,...e})}function rN({className:e,inset:t,children:n,...r}){return(0,R.jsxs)(A_,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:W(`flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,R.jsx)(Uw,{className:`ml-auto size-4`})]})}function iN({className:e,...t}){return(0,R.jsx)(j_,{"data-slot":`dropdown-menu-sub-content`,className:W(`z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...t})}function aN({userName:e,userEmail:t,avatarSrc:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(UM,{className:`size-8 rounded-lg`,children:[n===void 0?null:(0,R.jsx)(WM,{src:n,alt:``,className:`rounded-lg`}),(0,R.jsx)(GM,{className:`rounded-lg text-xs`,children:VO(e)})]}),(0,R.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,R.jsx)(`span`,{className:`truncate font-medium`,children:e}),(0,R.jsx)(`span`,{className:`text-sidebar-foreground/70 truncate text-xs`,children:t})]})]})}function oN({userName:e,userEmail:t,avatarSrc:n,accountLink:r,preferencesLink:i,upgradeLink:a,theme:o,onThemeChange:s,onSignOut:c,signingOut:l}){let{t:u}=K(),{isMobile:d}=EM();return(0,R.jsx)(RM,{children:(0,R.jsx)(zM,{children:(0,R.jsxs)(KM,{children:[(0,R.jsx)(JM,{asChild:!0,children:(0,R.jsxs)(VM,{size:`lg`,"aria-label":u(`accountMenu.openMenu`),className:`data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground`,children:[(0,R.jsx)(aN,{userName:e,userEmail:t,avatarSrc:n}),(0,R.jsx)(qw,{className:`ml-auto size-4`})]})}),(0,R.jsxs)(YM,{className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,side:d?`bottom`:`right`,align:`end`,sideOffset:4,children:[(0,R.jsx)(eN,{
54className:`p-0 font-normal`,children:(0,R.jsx)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-left text-sm`,children:(0,R.jsx)(aN,{userName:e,userEmail:t,avatarSrc:n})})}),(0,R.jsx)(tN,{}),(0,R.jsxs)(XM,{children:[r===void 0?(0,R.jsxs)(ZM,{disabled:!0,children:[(0,R.jsx)(jw,{}),u(`accountMenu.account`)]}):(0,R.jsx)(ZM,{asChild:!0,children:r}),i===void 0?(0,R.jsxs)(ZM,{disabled:!0,children:[(0,R.jsx)(OT,{}),u(`accountMenu.preferences`)]}):(0,R.jsx)(ZM,{asChild:!0,children:i}),(0,R.jsxs)(nN,{children:[(0,R.jsxs)(rN,{children:[(0,R.jsx)(AT,{}),u(`accountMenu.theme`)]}),(0,R.jsx)(qM,{children:(0,R.jsx)(iN,{children:(0,R.jsxs)(QM,{value:o,onValueChange:e=>{GT(e)&&s(e)},children:[(0,R.jsxs)($M,{value:`light`,children:[(0,R.jsx)(jT,{}),u(`accountMenu.light`)]}),(0,R.jsxs)($M,{value:`dark`,children:[(0,R.jsx)(gT,{}),u(`accountMenu.dark`)]}),(0,R.jsxs)($M,{value:`system`,children:[(0,R.jsx)(hT,{}),u(`accountMenu.system`)]})]})})})]})]}),(0,R.jsx)(tN,{}),(0,R.jsx)(XM,{children:a===void 0?(0,R.jsxs)(ZM,{disabled:!0,children:[(0,R.jsx)(kT,{}),u(`accountMenu.upgrade`)]}):(0,R.jsx)(ZM,{asChild:!0,children:a})}),(0,R.jsx)(tN,{}),(0,R.jsxs)(ZM,{disabled:l,onSelect:c,children:[(0,R.jsx)(dT,{}),u(`accountMenu.logOut`)]})]})]})})})}function sN({items:e}){return(0,R.jsx)(RM,{children:e.map(e=>(0,R.jsx)(cN,{item:e},e.id))})}function cN({item:e}){let{t}=K(),n=(0,L.useId)();if(e.disabled!==!0)return(0,R.jsx)(zM,{children:(0,R.jsx)(VM,{asChild:!0,isActive:e.isActive===!0,tooltip:e.label,children:e.link})});let r=e.premium===!0,i=`${n}-premium`,a=`${n}-coming-soon`;return(0,R.jsxs)(zM,{className:`flex items-center gap-1`,children:[(0,R.jsx)(VM,{isActive:e.isActive===!0,tooltip:e.label,"aria-disabled":!0,"aria-describedby":r?`${i} ${a}`:a,className:`cursor-default opacity-50 hover:bg-transparent hover:text-sidebar-foreground`,children:e.link}),r?(0,R.jsxs)(HM,{id:i,"data-kit":`app-sidebar-item-premium`,className:`static shrink-0 text-primary`,children:[(0,R.jsx)(kT,{"aria-hidden":`true`,className:`size-3.5`}),(0,R.jsx)(`span`,{className:`sr-only`,children:t(`nav.premium`)})]}):null,(0,R.jsx)(HM,{id:a,"data-kit":`app-sidebar-item-coming-soon`,className:`static shrink-0 border border-sidebar-border px-1.5 font-normal whitespace-nowrap text-sidebar-foreground/70`,children:t(`common.comingSoon`)})]})}function lN({groups:e,secondaryItems:t,brand:n,userName:r,userEmail:i,avatarSrc:a,accountLink:o,preferencesLink:s,upgradeLink:c,theme:l,onThemeChange:u,onSignOut:d,signingOut:f}){return(0,R.jsxs)(OM,{collapsible:`icon`,children:[n===void 0?null:(0,R.jsx)(MM,{children:(0,R.jsx)(RM,{children:(0,R.jsx)(zM,{children:(0,R.jsx)(VM,{asChild:!0,size:`lg`,children:n})})})}),(0,R.jsxs)(PM,{children:[e.map(e=>(0,R.jsxs)(FM,{"data-kit":`app-sidebar-group`,"data-group":e.id,children:[e.label===void 0?null:(0,R.jsx)(IM,{children:e.label}),(0,R.jsx)(LM,{children:(0,R.jsx)(sN,{items:e.items})})]},e.id)),t===void 0||t.length===0?null:(0,R.jsx)(FM,{className:`mt-auto`,"data-kit":`app-sidebar-secondary`,children:(0,R.jsx)(LM,{children:(0,R.jsx)(sN,{items:t})})})]}),(0,R.jsx)(NM,{children:(0,R.jsx)(oN,{userName:r,userEmail:i,avatarSrc:a,accountLink:o,preferencesLink:s,upgradeLink:c,theme:l,onThemeChange:u,onSignOut:d,signingOut:f})}),(0,R.jsx)(AM,{})]})}function uN({count:e=0,disabled:t=!1,tooltip:n,onOpen:r}){let i=e>0?`Notifications, ${e} unread`:`Notifications`;return(0,R.jsx)(hM,{delayDuration:300,children:(0,R.jsxs)(gM,{children:[(0,R.jsx)(_M,{asChild:!0,children:(0,R.jsxs)(G,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-kit":`notification-bell`,"aria-label":i,"aria-disabled":t?!0:void 0,className:t?`relative cursor-default opacity-50 hover:bg-transparent`:`relative`,onClick:()=>{t||r?.()},children:[(0,R.jsx)(Mw,{}),e>0?(0,R.jsx)(`span`,{"data-kit":`notification-bell-badge`,"aria-hidden":`true`,className:`bg-primary text-primary-foreground absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] leading-none font-medium`,children:e>99?`99+`:e}):null]})}),(0,R.jsx)(vM,{side:`bottom`,children:n})]})})}var dN={sm:{width:89,height:16},md:{width:124,height:22},lg:{width:177,height:31}},fN={sm:20,md:28,lg:40};function pN({size:e}){let{width:t,height:n}=dN[e];return(0,R.jsxs)(`svg`,{"data-kit":`logo-wordmark`,width:t,height:n,viewBox:`0 0 124 22`,className:`shrink-0`,role:`img`,focusable:`false`,children:[(0,R.jsx)(`title`,{children:`CalendHub`}),(0,R.jsxs)(`text`,{x:`0`,y:`17`,fontSize:`17.5`,fontWeight:`800`,letterSpacing:`-0.3`,textLength:`118`,lengthAdjust:`spacingAndGlyphs`,fill:`currentColor`,children:[`Calend`,(0,R.jsx)(`tspan`,{className:`fill-primary`,children:`Hub`})]})]})}function mN({size:e}){let t=fN[e];return(0,R.jsxs)(`svg`,{"data-kit":`logo-initials`,width:t,height:t,viewBox:`0 0 32 32`,className:`shrink-0`,role:`img`,focusable:`false`,children:[(0,R.jsx)(`title`,{children:`CalendHub`}),(0,R.jsxs)(`text`,{x:`16`,y:`23`,fontSize:`19`,fontWeight:`800`,letterSpacing:`-0.5`,textAnchor:`middle`,textLength:`26`,lengthAdjust:`spacingAndGlyphs`,fill:`currentColor`,children:[`C`,(0,R.jsx)(`tspan`,{className:`fill-primary`,children:`H`})]})]})}function hN({variant:e=`wordmark`,size:t=`md`}){return(0,R.jsx)(`span`,{"data-kit":`logo`,className:`inline-flex items-center`,children:e===`initials`?(0,R.jsx)(mN,{size:t}):(0,R.jsx)(pN,{size:t})})}function gN(){let e=wi(),t=dee(),n=fee(),r={onSettled:()=>void e.navigate({to:`/login`})};return{signOut:()=>t.mutate(void 0,r),signOutEverywhere:()=>n.mutate(void 0,r),signingOut:t.isPending,signingOutEverywhere:n.isPending}}function _N(){let{data:e}=AO(),t=e?.language??``;(0,L.useEffect)(()=>
54{if(!CE(t)){LE(null),FE(EE());return}LE(t),FE(t)},[t])}function vN(e,t,n){return[{id:`settings`,label:e.settings,isActive:t.startsWith(`/settings`),link:(0,R.jsxs)(Sa,{to:`/settings/general`,children:[(0,R.jsx)(DT,{}),(0,R.jsx)(`span`,{children:e.settings})]})},{id:`support`,label:e.support,link:(0,R.jsxs)(`button`,{type:`button`,onClick:()=>n(`support`),children:[(0,R.jsx)(Xw,{}),(0,R.jsx)(`span`,{children:e.support})]})},{id:`feedback`,label:e.feedback,link:(0,R.jsxs)(`button`,{type:`button`,onClick:()=>n(`feedback`),children:[(0,R.jsx)(pT,{}),(0,R.jsx)(`span`,{children:e.feedback})]})}]}var yN=Ta({getParentRoute:()=>Hb,id:`_authed`,beforeLoad:async({context:e,location:t})=>{if(Do().status===`anonymous`)throw Jn({to:`/login`,search:{redirect:t.href}});try{await e.queryClient.ensureQueryData($S())}catch{throw Jn({to:`/login`,search:{redirect:t.href}})}},component:bN});function bN(){let{t:e}=K();_N();let{data:t}=eC(),{signOut:n,signingOut:r}=gN(),i=Xa({select:e=>e.location.pathname}),a=iE(),[o,s]=(0,L.useState)(null),c=[{id:`main`,items:[{id:`dashboard`,label:e(`nav.dashboard`),isActive:i===`/dashboard`,link:(0,R.jsxs)(Sa,{to:`/dashboard`,children:[(0,R.jsx)(cT,{}),(0,R.jsx)(`span`,{children:e(`nav.dashboard`)})]})},{id:`calendar`,label:e(`nav.calendar`),isActive:i.startsWith(`/calendar`),link:(0,R.jsxs)(Sa,{to:`/calendar`,children:[(0,R.jsx)(Rw,{}),(0,R.jsx)(`span`,{children:e(`nav.calendar`)})]})}]},{id:`scheduling`,label:e(`nav.groups.scheduling`),items:[{id:`booking`,label:e(`nav.booking`),isActive:i.startsWith(`/booking`),link:(0,R.jsxs)(Sa,{to:`/booking/links`,children:[(0,R.jsx)(Lw,{}),(0,R.jsx)(`span`,{children:e(`nav.booking`)})]})},{id:`team`,label:e(`nav.team`),isActive:i===`/team`,link:(0,R.jsxs)(Sa,{to:`/team`,children:[(0,R.jsx)(BT,{}),(0,R.jsx)(`span`,{children:e(`nav.team`)})]})}]},{id:`catalog`,label:e(`nav.groups.catalog`),items:[{id:`services`,label:e(`nav.services`),isActive:i.startsWith(`/catalog/services`),link:(0,R.jsxs)(Sa,{to:`/catalog/services`,children:[(0,R.jsx)(Pw,{}),(0,R.jsx)(`span`,{children:e(`nav.services`)})]})},{id:`products`,label:e(`nav.products`),isActive:i.startsWith(`/catalog/products`),link:(0,R.jsxs)(Sa,{to:`/catalog/products`,children:[(0,R.jsx)(_T,{}),(0,R.jsx)(`span`,{children:e(`nav.products`)})]})}]},{id:`build`,label:e(`nav.groups.build`),items:[{id:`pages`,label:e(`nav.pages`),disabled:!0,link:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(lT,{}),(0,R.jsx)(`span`,{children:e(`nav.pages`)})]})},{id:`forms`,label:e(`nav.forms`),disabled:!0,link:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($w,{}),(0,R.jsx)(`span`,{children:e(`nav.forms`)})]})},{id:`inputs`,label:e(`nav.inputs`),isActive:i.startsWith(`/inputs`),link:(0,R.jsxs)(Sa,{to:`/inputs`,children:[(0,R.jsx)(PT,{}),(0,R.jsx)(`span`,{children:e(`nav.inputs`)})]})}]},{id:`automate`,label:e(`nav.groups.automate`),items:[{id:`integrations`,label:e(`nav.integrations`),isActive:i.startsWith(`/integrations`),link:(0,R.jsxs)(Sa,{to:`/integrations`,children:[(0,R.jsx)(wT,{}),(0,R.jsx)(`span`,{children:e(`nav.integrations`)})]})},{id:`workflows`,label:e(`nav.workflows`),isActive:i===`/workflows`,link:(0,R.jsxs)(Sa,{to:`/workflows`,children:[(0,R.jsx)(VT,{}),(0,R.jsx)(`span`,{children:e(`nav.workflows`)})]})}]}],l=vN({settings:e(`nav.settings`),support:e(`nav.support`),feedback:e(`nav.feedback`)},i,s);return(0,R.jsxs)(DM,{className:`h-svh overflow-hidden`,children:[(0,R.jsx)(lN,{groups:c,secondaryItems:l,brand:(0,R.jsxs)(Sa,{to:`/dashboard`,children:[(0,R.jsx)(`span`,{className:`hidden w-full items-center justify-center group-data-[collapsible=icon]:flex`,children:(0,R.jsx)(hN,{variant:`initials`,size:`md`})}),(0,R.jsx)(`span`,{className:`inline-flex shrink-0 items-center group-data-[collapsible=icon]:hidden`,children:(0,R.jsx)(hN,{variant:`wordmark`,size:`md`})})]}),userName:t?.full_name,userEmail:t?.email,avatarSrc:t?.avatar_url??void 0,accountLink:(0,R.jsxs)(Sa,{to:`/account`,children:[(0,R.jsx)(jw,{}),(0,R.jsx)(`span`,{children:e(`nav.account`)})]}),preferencesLink:(0,R.jsxs)(Sa,{to:`/preferences`,children:[(0,R.jsx)(OT,{}),(0,R.jsx)(`span`,{children:e(`nav.preferences`)}
54)]}),upgradeLink:(0,R.jsxs)(Sa,{to:`/settings/billing`,children:[(0,R.jsx)(kT,{}),(0,R.jsx)(`span`,{children:e(`accountMenu.upgrade`)})]}),theme:a,onThemeChange:rE,onSignOut:n,signingOut:r}),(0,R.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,R.jsx)(iM,{brand:null,leading:(0,R.jsx)(kM,{}),trailing:(0,R.jsx)(uN,{disabled:!0,tooltip:e(`nav.notificationsComingSoon`)})}),!i.startsWith(`/settings/billing`)&&(0,R.jsx)(Bj,{upgradeLink:(0,R.jsx)(G,{asChild:!0,size:`sm`,children:(0,R.jsx)(Sa,{to:`/settings/billing`,children:e(`billing.notice.upgrade`)})})}),(0,R.jsx)(jM,{className:`min-h-0 overflow-hidden text-foreground`,children:(0,R.jsx)(`div`,{className:i.startsWith(`/calendar`)||i===`/dashboard`?`mx-auto flex min-h-0 w-full flex-1 flex-col gap-4 overflow-y-auto px-6 py-6`:`mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-4 overflow-y-auto px-6 py-6`,children:(0,R.jsx)(Ra,{})})})]}),(0,R.jsx)(rM,{kind:o,page:i,onClose:()=>s(null)})]})}var xN={"7d":7,"30d":30,"90d":90},SN={"7d":`period.last7Days`,"30d":`period.last30Days`,"90d":`period.last3Months`},CN=[{value:`7d`,labelKey:SN[`7d`]},{value:`30d`,labelKey:SN[`30d`]},{value:`90d`,labelKey:SN[`90d`]}];function wN(e){return typeof e==`string`&&(e===`7d`||e===`30d`||e===`90d`)}function TN(e,t){let n=t?new Date(t):new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+1),i=r.toISOString(),a=xN[e],o=new Date(r.getFullYear(),r.getMonth(),r.getDate()-a),s=o.toISOString(),c=s;return{from:s,to:i,previousFrom:new Date(o.getFullYear(),o.getMonth(),o.getDate()-a).toISOString(),previousTo:c}}function EN(e){let t=e?new Date(e):new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate());return{from:n.toISOString(),to:new Date(n.getFullYear(),n.getMonth(),n.getDate()+1).toISOString()}}function DN(e,t){return t===0?null:Math.round(100*(e-t)/t)}function ON(e,t){return t===0?null:Math.round(100*e/t)}function kN(e,t,n){let r=new Date(t),i=new Date(n),a={0:6,1:0,2:1,3:2,4:3,5:4,6:5},o=0,s=new Date(r);for(;s<i;){let t=e[GD[a[s.getDay()]]]||[];for(let e of t){let[t,n]=e.start.split(`:`).map(Number),[r,i]=e.end.split(`:`).map(Number),a=t*60+n,s=r*60+i;o+=(s-a)/60}s.setDate(s.getDate()+1)}return o}function AN(e){let t=e.getHours();return t<12?`morning`:t<18?`afternoon`:`evening`}function jN({title:e,description:t,action:n}){let r=(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h1`,{className:`text-3xl font-bold tracking-tight`,children:e}),t===void 0?null:(0,R.jsx)(`p`,{className:`text-muted-foreground mt-1 text-sm`,children:t})]});return n===void 0?r:(0,R.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[r,(0,R.jsx)(`div`,{"data-kit":`page-heading-action`,children:n})]})}var MN=Jo(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 min-w-9 px-2`,sm:`h-8 min-w-8 px-1.5`,lg:`h-10 min-w-10 px-2.5`}},defaultVariants:{variant:`default`,size:`default`}}),NN=L.createContext({size:`default`,variant:`default`,spacing:0});function PN({className:e,variant:t,size:n,spacing:r=0,children:i,...a}){return(0,R.jsx)(_v,{"data-slot":`toggle-group`,"data-variant":t,"data-size":n,"data-spacing":r,style:{"--gap":r},className:W(`group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs`,e),...a,children:(0,R.jsx)(NN.Provider,{value:{variant:t,size:n,spacing:r},children:i})})}function FN({className:e,children:t,variant:n,size:r,...i}){let a=L.useContext(NN);return(0,R.jsx)(Ev,{"data-slot":`toggle-group-item`,"data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:W(MN({variant:a.variant||n,size:a.size||r}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10`,`data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,e),...i,children:t})}function IN({value:e,onValueChange:t,options:n,ariaLabel:r,size:i=`default`}){return(0,R.jsx)(PN,{type:`single`,variant:`outline`,size:i,value:e,onValueChange:e=>{e!==``&&t(e)},"aria-label":r,"data-kit":`toggle-group`,children:n.map(e=>(0,R.jsx)(FN,{value:e.value,"data-kit":`toggle-group-item`,children:e.label},e.value))})}function LN({label:e,value:t,delta:n,invertTrend:r=!1,trendLine:i,contextLine:a,comingSoon:o=!1,loading:s=!1}){let{t:c}=K();return(0,R.jsxs)(MC,{"data-kit":`stat-card`,className:`@container/card`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(FC,{children:e}),(0,R.jsx)(PC,{className:`text-2xl font-semibold tabular-nums @[250px]/card:text-3xl`,"data-kit":`stat-card-value`,children:s?(0,R.jsx)(TA,{className:`h-8 w-24`}):o?`â`:t}),(0,R.jsx)(IC,{children:s?null:o?(0,R.jsx)(OA,{variant:`outline`,"data-kit":`stat-card-coming-soon`,children:c(`common.comingSoon`)}):n==null?null:(0,R.jsxs)(OA,{variant:`outline`,className:W(n!=null&&(n>0&&!r||n<0&&r)&&`text-success`,n!=null&&(n<0&&!r||n>0&&r)&&`text-destructive`),"data-kit":`stat-card-delta`,children:[n>0?(0,R.jsx)(LT,{}):n<0?(0,R.jsx)(IT,{}):null,n>0?`+`:``,n,`%`]})})]}),s&&(0,R.jsxs)(RC,{className:`flex-col items-start gap-1.5`,children:[(0,R.jsx)(TA,{className:`h-4 w-32`}),(0,R.jsx)(TA,{className:`h-4 w-40`})]}),!s&&(i||a)&&(0,R.jsxs)(RC,{className:`flex-col items-start gap-1.5 text-sm`,children:[i&&(0,R.jsx)(`div`,{className:`line-clamp-1 flex gap-2 font-medium`,children:i}),a&&(0,R.jsx)(`div`,{className:`text-muted-foreground`,children:a})]})]})}function RN({items:e,loading:t=!1}){let{t:n}=K(),r={confirmed:{variant:`secondary`,label:n(`upcomingBookings.status.confirmed`)},pending:{variant:`outline`,label:n(`upcomingBookings.status.pending`)},cancelled:{variant:`destructive`,label:n(`upcomingBookings.status.cancelled`)}};return t?(0,R.jsxs)(MC,{"data-kit":`upcoming-bookings`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{children:n(`upcomingBookings.title`)}),(0,R.jsx)(FC,{children:n(`upcomingBookings.description`)})]}),(0,R.jsx)(LC,{children:(0,R.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:3}).map((e,t)=>(0,R.jsx)(TA,{className:`h-10 w-full`},t))})})]}):(0,R.jsxs)(MC,{"data-kit":`upcoming-bookings`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{children:n(`upcomingBookings.title`)}),(0,R.jsx)(FC,{children:n(`upcomingBookings.description`)})]}),(0,R.jsx)(LC,{children:e.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:n(`upcomingBookings.empty`)}):(0,R.jsx)(`ul`,{className:`space-y-3`,children:e.map(e=>(0,R.jsxs)(`li`,{"data-kit":`upcoming-bookings-item`,className:`flex items-center gap-3`,children:[(0,R.jsx)(UM,{children:(0,R.jsx)(GM,{children:VO(e.inviteeName)})}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsx)(`p`,{className:`font-medium text-sm truncate`,children:e.inviteeName}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm truncate`,children:e.linkTitle})]}),(0,R.jsx)(`p`,{className:`text-sm tabular-nums whitespace-nowrap`,children:e.whenLabel}),(0,R.jsx)(OA,{variant:r[e.status].variant,children:r[e.status].label})]},e.id))})})]})}function zN({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,R.jsx)(`table`,{"data-slot":`table`,className:W(`w-full caption-bottom text-sm`,e),...t})})}function BN({className:e,...t}){return(0,R.jsx)(`thead`,{"data-slot":`table-header`,className:W(`[&_tr]:border-b`,e),...t})}function VN({className:e,...t}){return(0,R.jsx)(`tbody`,{"data-slot":`table-body`,className:W(`[&_tr:last-child]:border-0`,e),...t})}function HN({className:e,...t}){return(0,R.jsx)(`tr`,{"data-slot":`table-row`,className:W(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function UN({className:e,...t}){return(0,R.jsx)(`th`,{"data-slot":`table-head`,className:W(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}function WN({className:e,...t}){return(0,R.jsx)(`td`,{"data-slot":`table-cell`,className:W(`p-2 al
54ign-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}function GN({className:e,...t}){return(0,R.jsx)(`caption`,{"data-slot":`table-caption`,className:W(`mt-4 text-sm text-muted-foreground`,e),...t})}function KN({columns:e,rows:t,caption:n,emptyText:r}){return(0,R.jsxs)(zN,{"data-kit":`table`,children:[n&&(0,R.jsx)(GN,{children:n}),(0,R.jsx)(BN,{children:(0,R.jsx)(HN,{children:e.map(e=>(0,R.jsx)(UN,{className:e.align===`end`?`text-right`:void 0,children:e.header},e.id))})}),(0,R.jsx)(VN,{children:t.length===0?(0,R.jsx)(HN,{children:(0,R.jsx)(WN,{colSpan:e.length,className:`text-center`,"data-kit":`table-empty`,children:r})}):t.map(t=>(0,R.jsx)(HN,{"data-kit":`table-row`,children:t.cells.map((n,r)=>{let i=e[r];return(0,R.jsx)(WN,{className:i?.align===`end`?`text-right`:void 0,"data-kit":`table-cell`,children:n},`${t.id}-${r}`)})},t.id))})]})}function qN({rows:e,onCopy:t,createLink:n,loading:r=!1}){let{t:i}=K(),a={active:{variant:`default`,label:i(`booking.linkStats.status.active`)},paused:{variant:`secondary`,label:i(`booking.linkStats.status.paused`)},archived:{variant:`secondary`,label:i(`booking.linkStats.status.archived`)}};return r?(0,R.jsxs)(MC,{"data-kit":`booking-link-stats`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{children:`Booking links`}),(0,R.jsx)(FC,{children:`Bookings in the selected period`})]}),(0,R.jsx)(LC,{children:(0,R.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:3}).map((e,t)=>(0,R.jsx)(TA,{className:`h-8 w-full`},t))})})]}):(0,R.jsxs)(MC,{"data-kit":`booking-link-stats`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{children:i(`booking.linkStats.title`)}),(0,R.jsx)(FC,{children:i(`booking.linkStats.description`)})]}),(0,R.jsx)(LC,{children:e.length===0?(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:i(`booking.linkStats.empty`)}),n]}):(0,R.jsx)(KN,{columns:[{id:`link`,header:i(`booking.linkStats.columns.link`)},{id:`duration`,header:i(`booking.linkStats.columns.duration`)},{id:`status`,header:i(`booking.linkStats.columns.status`)},{id:`bookings`,header:i(`booking.linkStats.columns.bookings`),align:`end`},{id:`actions`,header:``,align:`end`}],rows:e.map(e=>({id:e.id,cells:[e.title,e.durationLabel,(0,R.jsx)(OA,{variant:a[e.status].variant,children:a[e.status].label},`status`),(0,R.jsx)(`span`,{className:`tabular-nums`,children:String(e.bookings)},`bookings`),e.status===`archived`?null:(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":i(`booking.linkStats.copyLinkFor`,{title:e.title}),title:i(`booking.linkStats.copyLink`),onClick:()=>t(e.publicUrl),children:(0,R.jsx)(tT,{className:`text-teal-600 dark:text-teal-400`})},`copy`)]}))})})]})}function JN({items:e}){let{t}=K(),n=e.filter(e=>e.done).length,r=e.length,i=r===0?0:Math.round(n/r*100);return(0,R.jsxs)(MC,{"data-kit":`setup-checklist`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{children:t(`setupChecklist.title`)}),(0,R.jsx)(FC,{children:t(`setupChecklist.progress`,{done:n,total:r})})]}),(0,R.jsxs)(LC,{className:`space-y-4`,children:[(0,R.jsx)(`div`,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":n,className:`bg-muted h-2 w-full overflow-hidden rounded-full`,children:(0,R.jsx)(`div`,{className:`bg-primary h-full`,style:{width:`${i}%`}})}),(0,R.jsx)(`ol`,{className:`space-y-3`,children:e.map(e=>(0,R.jsxs)(`li`,{"data-kit":`setup-checklist-item`,"data-done":e.done?`true`:`false`,className:`flex items-center gap-3`,children:[e.done?(0,R.jsx)(Jw,{className:`text-success size-4 flex-shrink-0`}):(0,R.jsx)(Qw,{className:`text-muted-foreground size-4 flex-shrink-0`}),(0,R.jsx)(`span`,{className:e.done?`line-through text-muted-foreground`:``,children:e.label}),!e.done&&(0,R.jsx)(`div`,{className:`ml-auto`,children:e.action})]},e.id))})]})]})}var YN={idle:{labelKey:`integrations.syncStatus.idle`,variant:`outline`,Icon:eT},syncing:{labelKey:`integrations.syncStatus.syncing`,variant:`secondary`,Icon:TT},synced:{labelKey:`integrations.syncStatus.synced`,variant:`secondary`,Icon:Jw},partial:{labelKey:`integrations.syncStatus.partial`,variant:`outline`,Icon:RT},failed:{labelKey:`integrations.syncStatus.failed`,variant:`destructive`,Icon:Zw}};function XN({status:e}){let{t}=K(),{labelKey:n,variant:r,Icon:i}=YN[e];return(0,R.jsxs)(OA,{variant:r,className:`gap-1.5`,children:[(0,R.jsx)(i,{className:`size-3.5 ${e===`syncing`?`animate-spin`:``}`}),t(n)]})}function ZN({items:e,connectLink:t,loading:n=!1}){let{t:r}=K();return n?(0,R.jsxs)(MC,{"data-kit":`connection-status-list`,children:[(0,R.jsx)(NC,{children:(0,R.jsx)(PC,{children:r(`integrations.connectionStatusList.title`)})}),(0,R.jsx)(LC,{children:(0,R.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:2}).map((e,t)=>(0,R.jsx)(TA,{className:`h-8 w-full`},t))})})]}):(0,R.jsxs)(MC,{"data-kit":`connection-status-list`,children:[(0,R.jsx)(NC,{children:(0,R.jsx)(PC,{children:r(`integrations.connectionStatusList.title`)})}),(0,R.jsx)(LC,{children:e.length===0?(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r(`integrations.connectionStatusList.empty`)}),t]}):(0,R.jsx)(`ul`,{className:`space-y-3`,children:e.map(e=>(0,R.jsxs)(`li`,{"data-kit":`connection-status-item`,className:`flex items-center gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsx)(`p`,{className:`font-medium text-sm truncate`,children:e.email}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm truncate`,children:e.providerLabel})]}),(0,R.jsx)(XN,{status:e.syncStatus}),e.revoked&&(0,R.jsx)(OA,{variant:`destructive`,children:r(`integrations.reconnectNeeded`)})]},e.id))})})]})}function QN({label:e,value:t,icon:n}){return n?(0,R.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`mt-0.5 shrink-0 text-muted-foreground`,children:n}),(0,R.jsx)(`span`,{className:`sr-only`,children:e}),(0,R.jsx)(`span`,{className:`font-medium`,children:t??`â`})]}):(0,R.jsxs)(`div`,{className:`flex justify-between gap-4`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:e}),(0,R.jsx)(`span`,{className:`font-medium`,children:t??`â`})]})}function $N({email:e,fullName:t,memberSince:n,description:r,action:i,actionHint:a}){return(0,R.jsxs)(MC,{children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{children:`Session`}),r===void 0?null:(0,R.jsx)(FC,{children:r})]}),(0,R.jsxs)(LC,{className:`flex flex-col gap-2 text-sm`,children:[(0,R.jsx)(QN,{label:`Email`,value:e}),(0,R.jsx)(QN,{label:`Name`,value:t}),(0,R.jsx)(QN,{label:`Member since`,value:n})]}),i===void 0?null:(0,R.jsxs)(RC,{"data-kit":`session-card-footer`,className:`flex flex-col items-start gap-2`,children:[i,a===void 0?null:(0,R.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:a})]})]})}var eP=`/api/v1/booking`,tP=`https://api.calendhub.com`;async function nP(e){return B(`${eP}/profile`,{baseUrl:tP,signal:e})}async function rP(e){return B(`${eP}/profile`,{baseUrl:tP,method:`PUT`,body:e})}async function iP(e,t){return B(`${eP}/handle-available?handle=${encodeURIComponent(e)}`,{baseUrl:tP,signal:t})}var aP=`/api/v1/booking`,oP=`https://api.calendhub.com`;async function Iee(e){return(await B(`${aP}/links`,{baseUrl:oP,signal:e})).links}async function Lee(e,t){return(await B(`${aP}/links/${e}`,{baseUrl:oP,signal:t})).link}async function Ree(e){return(await B(`${aP}/links`,{baseUrl:oP,method:`POST`,body:e})).link}async function zee(e,t){return(await B(`${aP}/links/${e}`,{baseUrl:oP,method:`PATCH`,body:t})).link}async function Bee(e){await B(`${aP}/links/${e}`,{baseUrl:oP,method:`DELETE`})}async function Vee(e,t){return B(`${aP}/slug-available?slug=${encodeURIComponent(e)}`,{baseUrl:oP,signal:t})}var sP=`/api/v1/booking`,cP=`https://api.calendhub.com`;async function Hee(e){return(await B(`${sP}/inputs`,{baseUrl:cP,signal:e})).inputs}async function Uee(e,t){return(await B(`${sP}/inputs/${e}`,{baseUrl:cP,signal:t})).input}async function Wee(e){return(await B(`${sP}/inputs`,{baseUrl:cP,method:`POST`,body:{field:e}})).input}async function Gee(e,t){return(await B(`${sP}/inputs/${e}`,{baseUrl:cP,method:`PUT`,body:{field:t}})).input}async function Kee(e){await B(`${sP}/inputs/${e}`,{baseUrl:cP,method:`DELETE`})}var lP=`/api/v1/public/booking`,uP=`https://api.calendhub.com`;async function qee(e,t){return B(`${lP}/${e}`,{baseUrl:uP,signal:t,auth:!1})}async function Jee(e,t,n){return B(`${lP}/${e}/${t}`,{baseUrl:uP,signal:n,auth:!1})}async function Yee(e,t,n,r,i,a){return B(`${lP}/${e}/${t}/availability?from=${n}&to=${r}&tz=${encodeURIComponent(i)}`,{baseUrl:uP,signal:a,auth:!1})}async function Xee(e,t,n,r,i){return B(`${lP}/${e}/${t}/slots?date=${n}&tz=${encodeURIComponent(r)}`,{baseUrl:uP,signal:i,auth:!1})}async function Zee(e,t,n){return(await B(`${lP}/${e}/${t}/bookings`,{baseUrl:uP,method:`POST`,body:n,auth:!1})).booking}async function Qee(e,t,n){return(await B(`/api/v1/public/booking/bookings/${e}?token=${encodeURIComponent(t)}`,{baseUrl:uP,signal:n,auth:!1})).booking}async function $ee(e,t){return(await B(`/api/v1/public/booking/bookings/${e}/cancel`,{baseUrl:uP,method:`POST`,body:{token:t},auth:!1})).booking}var dP=`/api/v1/booking`,fP=`https://api.calendhub.com`;function ete(e){let t={};for(let[n,r]of Object.entries(e))t[n]=typeof r==`number`?String(r):r;return t}async function tte(e,t){try{return(await B(`${dP}/bookings/by-event/${e}`,{baseUrl:fP,signal:t})).booking}catch(e){if(ko(e)&&e.status===404)return null;throw e}}async function nte(e,t){let n=new URLSearchParams({from:e.from,to:e.to});return e.status!==void 0&&n.append(`status`,e.status),e.limit!==void 0&&n.append(`limit`,String(e.limit)),(await B(`${dP}/bookings?${n}`,{baseUrl:fP,signal:t})).bookings}var pP=`/api/v1/booking/co-hosting`,mP=`https://api.calendhub.com`;async function rte(e){return(await B(pP,{baseUrl:mP,signal:e})).links}async function ite(e){await B(`${pP}/${encodeURIComponent(e)}`,{baseUrl:mP,method:`DELETE`})}var Y={all:[`booking`],profile:()=>[...Y.all,`profile`],handleAvailable:e=>[...Y.all,`handle-available`,e],handleAvailableAll:()=>[...Y.all,`handle-available`],slugAvailable:e=>[...Y.all,`slug-available`,e],slugAvailableAll:()=>[...Y.all,`slug-available`],links:()=>[...Y.all,`links`],coHosting:()=>[...Y.all,`co-hosting`],link:e=>[...Y.all,`link`,e],inputs:()=>[...Y.all,`inputs`],input:e=>[...Y.all,`input`,e],public:()=>[...Y.all,`public`],publicProfile:e=>[...Y.public(),`profile`,e],publicLink:(e,t)=>[...Y.public(),`link`,e,t],publicAvailability:(e,t,n,r,i)=>[...Y.public(),`availability`,e,t,n,r,i],publicSlots:(e,t,n,r)=>
54[...Y.public(),`slots`,e,t,n,r],publicBooking:(e,t)=>[...Y.public(),`booking`,e,t],byEvent:e=>[...Y.all,`by-event`,e],list:e=>[...Y.all,`bookings`,e],stats:e=>[...Y.all,`stats`,e]};function hP(){return pt({queryKey:Y.profile(),queryFn:({signal:e})=>nP(e),staleTime:3e5})}function ate(e){return pt({queryKey:Y.handleAvailable(e),queryFn:({signal:t})=>iP(e,t),staleTime:3e4,enabled:e.length>0})}function gP(){return pt({queryKey:Y.links(),queryFn:({signal:e})=>Iee(e),staleTime:3e4})}function ote(e){return pt({queryKey:Y.link(e),queryFn:({signal:t})=>Lee(e,t),staleTime:3e4})}function ste(e){return pt({queryKey:Y.slugAvailable(e),queryFn:({signal:t})=>Vee(e,t),staleTime:3e4,enabled:e.length>0})}function cte(){return pt({queryKey:Y.coHosting(),queryFn:({signal:e})=>rte(e)})}function lte(){return dt(cte())}function ute(){let e=z();return mt({mutationFn:e=>ite(e),onSuccess:()=>e.invalidateQueries({queryKey:Y.coHosting()})})}function _P(){return pt({queryKey:Y.inputs(),queryFn:({signal:e})=>Hee(e),staleTime:3e4})}function dte(e){return pt({queryKey:Y.input(e),queryFn:({signal:t})=>Uee(e,t),staleTime:3e4})}function fte(e){return pt({queryKey:Y.publicProfile(e),queryFn:({signal:t})=>qee(e,t),staleTime:3e4})}function pte(e,t){return pt({queryKey:Y.publicLink(e,t),queryFn:({signal:n})=>Jee(e,t,n),staleTime:3e4})}function mte(e,t,n,r,i){return pt({queryKey:Y.publicAvailability(e,t,n,r,i),queryFn:({signal:a})=>Yee(e,t,n,r,i,a),staleTime:6e4})}function hte(e,t,n,r){return pt({queryKey:Y.publicSlots(e,t,n,r),queryFn:({signal:i})=>Xee(e,t,n,r,i),staleTime:3e4})}function gte(e,t){return pt({queryKey:Y.publicBooking(e,t),queryFn:({signal:n})=>Qee(e,t,n),staleTime:1/0})}function _te(e){return pt({queryKey:Y.byEvent(e),queryFn:({signal:t})=>tte(e,t),enabled:e!==null,staleTime:3e4})}function vte(e){return pt({queryKey:Y.list(e),queryFn:({signal:t})=>nte(e,t),staleTime:3e4})}var yte=`/api/v1/booking`,bte=`https://api.calendhub.com`;async function xte(e,t){return B(`${yte}/stats?${new URLSearchParams({from:e.from,to:e.to})}`,{baseUrl:bte,signal:t})}function Ste(e){return pt({queryKey:Y.stats(e),queryFn:({signal:t})=>xte(e,t),staleTime:3e4})}function Cte(){let e=z();return mt({mutationFn:e=>rP(e),onSuccess:t=>{e.setQueryData(Y.profile(),t)}})}function wte(){let e=z();return mt({mutationFn:e=>Ree(e),onSuccess:t=>{e.setQueryData(Y.link(t.id),t),e.setQueryData(Y.links(),e=>e?[...e,t]:[t])}})}function vP(){let e=z();return mt({mutationFn:({id:e,input:t})=>zee(e,t),onSuccess:t=>{e.setQueryData(Y.link(t.id),t),e.setQueryData(Y.links(),e=>{if(e)return e.map(e=>e.id===t.id?t:e)})}})}function yP(){let e=z();return mt({mutationFn:e=>Bee(e),onSuccess:(t,n)=>{e.setQueryData(Y.links(),e=>{if(e)return e.filter(e=>e.id!==n)}),e.removeQueries({queryKey:Y.link(n)}),e.invalidateQueries({queryKey:Y.links()})}})}function bP(){let e=z();return mt({mutationFn:e=>Wee(e),onSuccess:t=>{e.setQueryData(Y.input(t.id),t),e.setQueryData(Y.inputs(),e=>e?[...e,t]:[t])}})}function Tte(){let e=z();return mt({mutationFn:({id:e,field:t})=>Gee(e,t),onSuccess:t=>{e.setQueryData(Y.input(t.id),t),e.setQueryData(Y.inputs(),e=>{if(e)return e.map(e=>e.id===t.id?t:e)})}})}function xP(){let e=z();return mt({mutationFn:e=>Kee(e),onSuccess:(t,n)=>{e.setQueryData(Y.inputs(),e=>{if(e)return e.filter(e=>e.id!==n)}),e.removeQueries({queryKey:Y.input(n)}),e.invalidateQueries({queryKey:Y.inputs()})}})}function Ete(e,t){let n=z();return mt({mutationFn:n=>Zee(e,t,n),onSuccess:e=>{n.setQueryData(Y.publicBooking(e.id,e.cancel_token),e)}})}function SP(){let e=z();return mt({mutationFn:({id:e,token:t})=>$ee(e,t),onSuccess:t=>{e.setQueryData(Y.publicBooking(t.id,t.cancel_token),t)}})}var CP=`/api/v1/calendar`,wP=`https://api.calendhub.com`;async function Dte(e,t){return(await B(`${CP}/events?${new URLSearchParams({from:e.from,to:e.to})}`,{baseUrl:wP,signal:t})).events}async function Ote(e){return B(`${CP}/events`,{baseUrl:wP,method:`POST`,body:e})}async function kte(e,t,n){let r=await B(`${CP}/events/${e}`,{baseUrl:wP,method:`PATCH`,body:n===void 0?t:{...t,scope:n}}),i=r,a=wO(r);return a===null?i:{...i,push:a}}async function Ate(e,t){await B(`${CP}/events/${e}${t===void 0?``:`?${new URLSearchParams({scope:t})}`}`,{baseUrl:wP,method:`DELETE`})}var TP={all:[`calendar`],events:()=>[...TP.all,`events`],range:(e,t)=>
54[...TP.events(),{from:e,to:t}]};function EP(e){let t=e.range;return pt({queryKey:TP.range(t?.from??``,t?.to??``),queryFn:({signal:e})=>Dte(t,e),enabled:t!==null,placeholderData:e=>e,staleTime:3e4,refetchOnWindowFocus:!0})}function DP(e){return e.includes(`_`)}function jte(e,t){let n={...e.extendedProps},r={...e,extendedProps:n};return t.title!==void 0&&(r.title=t.title),t.all_day!==void 0&&(r.allDay=t.all_day),t.description!==void 0&&(n.description=t.description),t.location!==void 0&&(n.location=t.location),t.categories!==void 0&&(n.categories=t.categories),t.busy!==void 0&&(n.busy=t.busy),t.visibility!==void 0&&(n.visibility=t.visibility),t.recurrence!==void 0&&(n.recurrence=t.recurrence),t.color!==void 0&&(n.color=t.color,r.backgroundColor=t.color,r.borderColor=t.color),t.start!==void 0&&(n.start=t.start,r.start=OP(t.start,r.allDay)),t.end!==void 0&&(n.end=t.end,r.end=OP(t.end,r.allDay)),r}function OP(e,t){return t?e.date:e.wall}function Mte(){let e=z();return mt({mutationFn:e=>Ote(e),onSettled:()=>{e.invalidateQueries({queryKey:TP.events()})}})}function Nte(){let e=z();return mt({mutationFn:({id:e,patch:t,scope:n})=>kte(e,t,n),onMutate:async({id:t,patch:n,scope:r})=>{if(await e.cancelQueries({queryKey:TP.events()}),r===`this`||r===`following`)return{previous:[]};let i=e.getQueriesData({queryKey:TP.events()});return e.setQueriesData({queryKey:TP.events()},e=>(e??[]).map(e=>e.id===t?jte(e,n):e)),{previous:i}},onError:(t,n,r)=>{r?.previous.forEach(([t,n])=>e.setQueryData(t,n))},onSettled:()=>{e.invalidateQueries({queryKey:TP.events()})}})}function Pte(){let e=z();return mt({mutationFn:({id:e,scope:t})=>Ate(e,t),onSettled:()=>{e.invalidateQueries({queryKey:TP.events()})}})}var kP=`/api/v1/calendar`,AP=`https://api.calendhub.com`;async function Fte(e){return B(`${kP}/working-hours`,{baseUrl:AP,signal:e})}async function Ite(e){return B(`${kP}/working-hours`,{baseUrl:AP,method:`PUT`,body:e})}var jP={all:[`calendar`,`working-hours`]};function MP(){return pt({queryKey:jP.all,queryFn:({signal:e})=>Fte(e),staleTime:3e5})}function Lte(){let e=z();return mt({mutationFn:e=>Ite(e),onSuccess:t=>{e.setQueryData(jP.all,t)}})}var NP=`calendhub.calendar.filters.v1`;function Rte(){let e={hiddenConnectionIds:[],hiddenEventTypes:[]},t=null;try{if(typeof localStorage>`u`)return e;t=localStorage.getItem(NP)}catch{return e}if(t===null)return e;try{let n=JSON.parse(t);if(typeof n!=`object`||!n)return e;let r=n;return{hiddenConnectionIds:PP(r.hiddenConnectionIds),hiddenEventTypes:PP(r.hiddenEventTypes).filter(e=>vE.includes(e))}}catch{return e}}function zte(e){try{if(typeof localStorage>`u`)return;localStorage.setItem(NP,JSON.stringify(e))}catch{}}function PP(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}var FP=`calendhub.calendar.display.v1`;function Bte(){let e=null;try{if(typeof localStorage>`u`)return xO;e=localStorage.getItem(FP)}catch{return xO}if(e===null)return xO;try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return xO;let n=t;return{showWeekends:IP(n.showWeekends,xO.showWeekends),dimPast:IP(n.dimPast,xO.dimPast)}}catch{return xO}}function Vte(e){try{if(typeof localStorage>`u`)return;localStorage.setItem(FP,JSON.stringify(e))}catch{}}function IP(e,t){return typeof e==`boolean`?e:t}var LP=Rte(),RP=new ho({view:MO(),focusedDate:AD(new Date),filters:{range:null,hiddenConnectionIds:LP.hiddenConnectionIds,hiddenEventTypes:LP.hiddenEventTypes},display:Bte(),editor:{mode:`closed`},notice:null});function zP(e){RP.setState(t=>t.view===e&&t.notice===null?t:{...t,view:e,notice:null})}function BP(){RP.setState(e=>{let t=MD(e.focusedDate,e.view,-1);return e.focusedDate===t&&e.notice===null?e:{...e,focusedDate:t,notice:null}})}function VP(){RP.setState(e=>{let t=MD(e.focusedDate,e.view,1);return e.focusedDate===t&&e.notice===null?e:{...e,focusedDate:t,notice:null}})}function HP(){RP.setState(e=>{let t=AD(new Date);return e.focusedDate===t&&e.notice===null?e:{...e,focusedDate:t,notice:null}})}function UP(e){RP.setState(t=>t.focusedDate===e&&t.notice===null?t:{...t,focusedDate:e,notice:null})}function WP(e=[],t=[]){return e.length===t.length&&e.every((e,n)=>e===t[n])}function GP(e,t){return e.range?.from===t.range?.from&&e.range?.to===t.range?.to&&WP(e.hiddenConnectionIds,t.hiddenConnectionIds)&&WP(e.hiddenEventTypes,t.hiddenEventTypes)}function KP(e){zte({hiddenConnectionIds:e.hiddenConnectionIds??[],hiddenEventTypes:e.hiddenEventTypes??[]})}function qP(e){let t=RP.state.filters,n={...t,...e};GP(t,n)||(KP(n),RP.setState(e=>({...e,filters:n})))}function JP(e){RP.setState(t=>{let n={...t.display,...e};return n.showWeekends===t.display.showWeekends&&n.dimPast===t.display.dimPast?t:(Vte(n),{...t,display:n})})}function YP(e,t){qP({hiddenConnectionIds:VD(RP.state.filters.hiddenConnectionIds,e,!t)})}
54function XP(e,t){qP({hiddenEventTypes:VD(RP.state.filters.hiddenEventTypes,e,!t)})}function ZP(){qP({hiddenConnectionIds:[],hiddenEventTypes:[]})}function QP(e){RP.setState(t=>t.filters.range?.from===e.from&&t.filters.range?.to===e.to&&t.view===e.view?t:{...t,view:e.view,filters:{...t.filters,range:{from:e.from,to:e.to}}})}function $P(){RP.setState(e=>{let t=new Date,n=e.filters.range,r=ND(n!==null&&t.getTime()>=new Date(n.from).getTime()&&t.getTime()<new Date(n.to).getTime()?AD(t):e.focusedDate);return{...e,editor:{mode:`create`,draft:r,dirty:!1},notice:null}})}function eF(e){RP.setState(t=>({...t,editor:{mode:`create`,draft:e,dirty:!1},notice:null}))}var tF=`(max-width: 767.98px)`;function nF(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(tF).matches}function rF(e,t){if(t===null||nF()){eF(e);return}RP.setState(n=>({...n,editor:{mode:`quick`,draft:e,anchor:t},notice:null}))}function iF(e){RP.setState(t=>t.editor.mode===`quick`?{...t,editor:{mode:`create`,draft:e,dirty:!1},notice:null}:t)}function aF(e,t){RP.setState(n=>({...n,editor:{mode:`peek`,id:e.id,draft:OD(e),editable:e.editable,readOnlyReason:e.editable?``:xE(e.extendedProps),anchor:t===null||nF()?null:t},notice:null}))}function oF(e,t){return!e.editable||nF()?!1:(RP.setState(n=>({...n,editor:{mode:`menu`,id:e.id,anchor:t},notice:null})),!0)}function sF(e){RP.setState(t=>{let n=OD(e),r=!e.editable;return{...t,editor:{mode:`edit`,id:e.id,draft:n,readOnly:r,dirty:!1,readOnlyReason:r?xE(e.extendedProps):``,attendees:e.extendedProps.attendees},notice:null}})}function cF(){RP.setState(e=>e.editor.mode===`closed`?e:{...e,editor:{mode:`closed`}})}function lF(e){RP.setState(t=>t.editor.mode!==`create`&&t.editor.mode!==`edit`||t.editor.dirty===e?t:{...t,editor:{...t.editor,dirty:e}})}function uF(){return RP.state}var dF=new ho({});function fF(e,t){dF.setState(n=>{let r=n[e];if(t===null){if(r===void 0)return n;let t={...n};return delete t[e],t}return r!==void 0&&r.state===t.state&&r.errorCode===t.errorCode&&r.message===t.message?n:{...n,[e]:t}})}function pF(e,t,n){return ko(e)&&e.code===`NETWORK`?n(t?`calendar.loadError.unreachable`:`calendar.loadError.offline`,{defaultValue:e.message}):XC(e,n)}function mF(e){return window.addEventListener(`online`,e),window.addEventListener(`offline`,e),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,e)}}function hF(){return navigator.onLine}function gF(){return!0}function _F(e=e=>e){return Ho(RP,e)}function vF(){return{display:_F(e=>e.display),setDisplay:JP}}function yF(e){return Ho(dF,t=>e===null?null:t[e]??null)}function bF(){let{t:e}=K(),{view:t,focusedDate:n,filters:r,editor:i,notice:a}=_F(),o=dt(EP(r)),s=Mte(),c=Nte(),l=Pte(),u=(0,L.useSyncExternalStore)(mF,hF,gF),d=o.data??[],f=BD(d,r),p=XC(s.error??c.error??l.error,e),m=pF(o.error,u,e);function h(){s.reset(),c.reset(),l.reset()}let g={setView:zP,goPrev:BP,goNext:VP,goToday:HP,goToDate:UP,setConnectionVisible:YP,setEventTypeVisible:XP,clearFilters:ZP,reportVisibleWindow:QP,openCreate:()=>{h(),$P()},openCreateWithDraft:e=>{h(),eF(e)},openQuickCreate:(e,t)=>{h(),rF(e,t)},promoteQuickToCreate:e=>{h(),iF(e)},closeEditor:()=>{h(),cF()},setEditorDirty:lF,retryLoad:()=>{o.refetch()},openEdit:e=>{let t=d.find(t=>t.id===e);t&&(h(),sF(t))},openPeek:(e,t)=>{let n=d.find(t=>t.id===e);n&&(h(),aF(n,t))},openContextMenu:(e,t)=>{let n=d.find(t=>t.id===e);return n?(h(),oF(n,t)):!1},recolorEvent:(e,t)=>{if(i.mode!==`menu`)return;let n=i.id;c.mutate({id:n,patch:{color:e},scope:t},{onSuccess:e=>{fF(n,e.push??null),cF()},onError:e=>fF(n,TO(e))})},submitDraft:(e,t)=>{if(i.mode===`create`||i.mode===`quick`)s.mutate(ED(e,kD()),{onSuccess:cF});else if(i.mode===`edit`){let n=i.id;c.mutate({id:n,patch:DD(e,i.draft,kD()),scope:t},{onSuccess:e=>{fF(n,e.push??null),cF()},onError:e=>fF(n,TO(e))})}},deleteEditingEvent:e=>{let t=i.mode===`edit`||i.mode===`peek`||i.mode===`menu`?i.id:null;t!==null&&l.mutate({id:t,scope:e},{onSuccess:cF})},moveEvent:(e,t)=>{c.mutate({id:e.id,patch:{start:e.start,end:e.end,all_day:e.all_day},scope:t},{onSuccess:t=>fF(e.id,t.push??null),onError:t=>{fF(e.id,TO(t)),e.revert()}})}};return{view:t,focusedDate:n,filters:r,editor:i,events:f,loading:o.isLoading,fetching:o.isFetching,saving:s.isPending||c.isPending,deleting:l.isPending,error:p,loadError:m,notice:a===null?null:e(a),editorDirty:i.mode===`create`||i.mode===`edit`?i.dirty:!1,fieldErrors:YC(s.error??c.error,e),actions:g}}function xF(e){let t=``,n=``,r=[],i=!1;function a(t){if(t===``){r.length>0&&e({event:n||`message`,data:r.join(` 55`)}),n=``,r=[];return}let i=t.indexOf(`:`),a=i===-1?t:t.slice(0,i),o=i===-1?``:t.slice(i+1);o.startsWith(` `)&&(o=o.slice(1)),a===`event`?n=o:a===`data`&&r.push(o)}return e=>{if(e===``)return;let n=t+e;t=``,i&&n.startsWith(` 56`)&&(n=n.slice(1)),i=!1;let r=0;for(let e=0;e<n.length;e++){let t=n[e];(t===`\r`||t===` 57`)&&(a(n.slice(r,e)),t===`\r`&&(e+1<n.length?n[e+1]===` 58`&&e++:i=!0),r=e+1)}t=n.slice(r)}}var SF=`/api/v1/calendar/events/stream`,CF=`https://api.calendhub.com`,wF=1e3,TF=3e4,EF=6e4;function DF(e){let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let{from:n,to:r}=t;if(typeof n!=`string`||typeof r!=`string`)return null;let i=Date.parse(n),a=Date.parse(r);return Number.isNaN(i)||Number.isNaN(a)||!(a>i)?null:{from:n,to:r}}function OF(e,t=Math.random){let n=Math.min(TF,wF*2**e);return Math.round(n/2+t()*(n/2))}function kF(e){return e.event===`ready`?{kind:`ready`}:e.event===`changed`?{kind:`changed`,range:DF(e.data)}:null}function AF(e,t){return new Promise(n=>{if(t.aborted){n();return}let r=setTimeout(i,e);function i(){clearTimeout(r),t.removeEventListener(`abort`,i),n()}t.addEventListener(`abort`,i,{once:!0})})}
58async function jF(e,t,n){if(e.body===null)return;let r=e.body.getReader(),i=()=>{r.cancel().catch(()=>void 0)};if(t.aborted){i();return}t.addEventListener(`abort`,i,{once:!0});let a=new TextDecoder;try{for(;;){let{done:e,value:t}=await r.read();if(e)return;n(a.decode(t,{stream:!0}))}}finally{t.removeEventListener(`abort`,i)}}async function MF(e,t){let n=new AbortController,r=()=>n.abort();e.addEventListener(`abort`,r,{once:!0});let i=setTimeout(r,EF);function a(){clearTimeout(i),i=setTimeout(r,EF)}let o=!1,s=0;try{let e=await zo(SF,{baseUrl:CF,signal:n.signal});if(!(e.headers.get(`Content-Type`)??``).startsWith(`text/event-stream`))return e.body?.cancel().catch(()=>void 0),`stop`;s=Date.now(),a();let r=xF(e=>{let n=kF(e);n!==null&&(n.kind===`ready`&&(o=!0),t(n))});await jF(e,n.signal,e=>{a(),r(e)})}catch(t){if(e.aborted||ko(t)&&t.status===401&&Do().status===`anonymous`||ko(t)&&t.status!==401&&t.status>=400&&t.status<500&&t.status!==408&&t.status!==429)return`stop`}finally{clearTimeout(i),e.removeEventListener(`abort`,r)}return e.aborted?`stop`:o&&Date.now()-s>=3e4?`healthy`:`retry`}async function NF(e){let{signal:t,onSignal:n,random:r}=e,i=0;for(;!t.aborted;){if(Do().status===`anonymous`)return;let e=await MF(t,n);if(t.aborted||e===`stop`)return;i=e===`healthy`?0:i+1,await AF(OF(i,r),t)}}function PF(e,t){let n=e[2];if(typeof n!=`object`||!n)return!0;let{from:r,to:i}=n;if(typeof r!=`string`||typeof i!=`string`)return!0;let a=Date.parse(r),o=Date.parse(i);return Number.isNaN(a)||Number.isNaN(o)?!0:a<Date.parse(t.to)&&Date.parse(t.from)<o}function FF(e,t){return t===null?e.invalidateQueries({queryKey:TP.events()}):e.invalidateQueries({queryKey:TP.events(),predicate:e=>t.some(t=>PF(e.queryKey,t))})}function IF(e){let t=null;function n(){if(t===null||e.isMutating()>0)return;let n=t;t=null,FF(e,n===`all`?null:n)}let r=e.getMutationCache().subscribe(()=>n());return{receive(e){e.kind===`ready`||e.range===null?t=`all`:t!==`all`&&(t=[...t??[],e.range]),n()},dispose(){t=null,r()}}}function LF(){let e=z(),t=Uo(e=>e.status===`anonymous`);(0,L.useEffect)(()=>{if(t)return;let n=new AbortController,r=IF(e);return NF({signal:n.signal,onSignal:e=>r.receive(e)}),()=>{n.abort(),r.dispose()}},[e,t])}var RF=`/api/v1/integrations`,zF=`https://api.calendhub.com`;async function BF(e){return(await B(`${RF}/providers`,{baseUrl:zF,signal:e})).providers}async function VF(e){return(await B(`${RF}/connect/${e}`,{baseUrl:zF,method:`POST`})).authorization_url}async function HF(e){return(await B(`${RF}/connections`,{baseUrl:zF,signal:e})).connections}async function UF(e,t){return(await B(`${RF}/connections/${e}`,{baseUrl:zF,method:`PATCH`,body:t})).connection}async function WF(e){await B(`${RF}/connections/${e}`,{baseUrl:zF,method:`DELETE`})}var GF={all:[`integrations`],providers:()=>[...GF.all,`providers`],connections:()=>[...GF.all,`connections`]};function KF(){return pt({queryKey:GF.providers(),queryFn:({signal:e})=>BF(e),staleTime:3e5})}function qF(){return pt({queryKey:GF.connections(),queryFn:({signal:e})=>HF(e),refetchInterval:e=>(e.state.data??[]).some(e=>e.sync_status===`syncing`)?5e3:!1})}function JF(){return mt({mutationFn:e=>VF(e)})}function YF(){let e=z();return mt({mutationFn:({id:e,patch:t})=>UF(e,t),onSuccess:t=>{e.setQueryData(GF.connections(),e=>(e??[]).map(e=>e.id===t.id?t:e)),e.invalidateQueries({queryKey:GF.connections()})}})}function XF(){let e=z();return mt({mutationFn:e=>WF(e),onSuccess:()=>{e.invalidateQueries({queryKey:GF.connections()})}})}var ZF=[`google`,`microsoft`,`zoom`],QF={google:`Google Calendar`,microsoft:`Outlook Calendar`,zoom:`Zoom`};function $F(e){let t=(e,t)=>e.account_email.localeCompare(t.account_email),n=ZF.flatMap(n=>e.filter(e=>e.provider===n).sort(t)),r=e.filter(e=>!ZF.includes(e.provider)).sort(t);return[...n,...r]}function eI(e){return e===`google`||e===`microsoft`}function tI(e){return $F(e).filter(e=>eI(e.provider))}var nI=[`access_denied`,`missing_scopes`,`provider_error`,`invalid_provider`,`invalid_request`,`not_configured`,`invalid_state`,`token_revoked`,`not_found`,`connection_limit_reached`];function rI(e){if(typeof e!=`string`)return`unknown`;let t=e.trim().toLowerCase();return nI.includes(t)?t:`unknown`}
58var iI={access_denied:`integrations.oauthError.accessDenied`,missing_scopes:`integrations.oauthError.missingScopes`,invalid_state:`integrations.oauthError.invalidState`,token_revoked:`integrations.oauthError.tokenRevoked`,not_configured:`integrations.oauthError.notConfigured`,invalid_provider:`integrations.oauthError.invalidProvider`,invalid_request:`integrations.oauthError.invalidRequest`,not_found:`integrations.oauthError.notFound`,provider_error:`integrations.oauthError.providerError`,connection_limit_reached:`integrations.oauthError.connectionLimitReached`,unknown:`integrations.oauthError.unknown`};function aI(e){return iI[e]}var oI={id:``,label:``,labelKey:`integrations.connectionSelect.calendhubOnly`,attachable:!0,reasonKey:``};function sI(e){return[oI,...tI(e).map(e=>{let t=`${QF[e.provider]??e.provider} â ${e.account_email}`;return e.revoked?{id:e.id,label:t,provider:e.provider,attachable:!1,reasonKey:`integrations.connectionSelect.reconnectFirst`}:{id:e.id,label:t,provider:e.provider,attachable:!0,reasonKey:``}})]}function cI(e,t,n){let r=e.find(e=>e.id===t);return r?r.labelKey?n(r.labelKey):r.label:t===``?n(`integrations.connectionSelect.calendhubOnly`):t}function lI(e,t){return t==null?null:e.filter(e=>!e.revoked).length>=t?t:null}function uI(){let{t:e}=K(),t=dt(KF()),n=dt(qF()),r=dt(HA()),i=JF(),a=YF(),o=XF(),[s,c]=(0,L.useState)(null),[l,u]=(0,L.useState)(null),d=t.data??{},f=n.data??[],p=lI(f,r.data?.limits.max_connections),m=ZF.map(e=>({id:e,label:QF[e],enabled:d[e]?.enabled??!1})),h=Object.fromEntries(ZF.map(e=>[e,f.filter(t=>t.provider===e)])),g=i.isPending?i.variables??null:null,_=XC(i.error??a.error??o.error,e)??XC(n.error,e),v=YC(a.error,e);return{providers:m,connectionsByProvider:h,settings:s,disconnecting:l,connectingProvider:g,loading:t.isLoading||n.isLoading,saving:a.isPending,removing:o.isPending,error:_,fieldErrors:v,reachedConnectionLimit:p,actions:{connect:e=>{i.mutate(e,{onSuccess:e=>{window.location.href=e}})},openSettings:e=>{c(e)},closeSettings:()=>{c(null)},saveSettings:e=>{s&&a.mutate({id:s.id,patch:e},{onSuccess:()=>{c(null)}})},askDisconnect:e=>{u(e)},cancelDisconnect:()=>{u(null)},confirmDisconnect:()=>{l&&o.mutate(l.id,{onSuccess:()=>{u(null)}})}}}}function dI(e){let{t}=K(),n=z();dt(qF());let r=!e.error&&!!e.connection,i=r?`connected`:`failed`,a=r?null:rI(e.error??`invalid_request`),o=r?null:t(aI(a??`unknown`));return(0,L.useEffect)(()=>{r&&n.invalidateQueries({queryKey:GF.connections()})},[r,n]),{status:i,code:a,message:o}}function fI(){let{data:e}=dt(qF());return(0,L.useMemo)(()=>Object.fromEntries((e??[]).map(e=>[e.id,e])),[e])}function pI(){let{data:e}=dt(qF());return sI(e??[])}async function mI(e){if(typeof window>`u`)return!1;if(navigator.clipboard&&navigator.clipboard.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}if(typeof document<`u`&&document.execCommand){let t=document.createElement(`input`);try{return t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,document.body.appendChild(t),t.select(),document.execCommand(`copy`)}catch{return!1}finally{t.remove()}}return!1}var hI={location_type:``,address:{...Wk},video:{...Vk},phone:``};function gI(e){return e===null?{location_type:``,address:{...Wk},video:{...Vk},phone:``}:{...Jk(e),video:Hk(e.video),phone:e.phone??``}}function _I(e){let t=$k(e,`location`);return t.location===null?{location:null,errors:t.errors}:{errors:t.errors,location:{...t.location,video:e.location_type===`video`?Uk(e.video):null,phone:e.location_type===`phone`?e.phone.trim():``}}}function vI(e){return e===null?{location_type:``,address:{...Wk},video:{...Vk},phone:``}:{...Jk(e),video:{...Vk},phone:``}}function yI(e){return[e.line1,e.city,e.postal_code,e.country].map(e=>e.trim()).filter(e=>e!==``).join(`, `)}function bI(e){if(e===null)return null;if(e.type===`in_person`){let t=e.address===null?``:yI(e.address);return t===``?{key:`location.type.inPerson`}:{key:`publicBooking.location.inPersonAt`,value:t}}return e.type===`video`?e.video===null?{key:`location.type.video`}:{key:`publicBooking.location.videoOn`,value:pA[e.video.provider]}:{key:`location.type.phone`}}function xI(e,t,n,r){if(t===``)return e;let i=n.find(e=>e.id===t);if(i===void 0)return e;let a=gA(i.provider),o=a===null?void 0:r.find(e=>e.value===a);return a===null||o===void 0||!o.available?{...e,location_type:`video`}:{...e,location_type:`video`,video:{provider:a,connection_id:t,url:``}}}function SI(e,t){let n=t.trim();return e.location_type!==`phone`||e.phone!==``||n===``?{location:e,prefilled:!1}:{location:{...e,phone:n},prefilled:!0}}function CI(e,t){let n=[];e.location_type!==t.location_type&&n.push(`location.type`);for(let r of[`line1`,`line2`,`city`,`region`,`postal_code`,`country`])e.address[r]!==t.address[r]&&n.push(`location.address.${r}`);return e.address.latitude!==t.address.latitude&&(n.push(`location.coordinates`),n.push(`location.coordinates.latitude`)),e.address.longitude!==t.address.longitude&&(n.push(`location.coordinates`),n.push(`location.coordinates.longitude`)),e.video.provider!==t.video.provider&&n.push(`location.video.provider`),e.video.connection_id!==t.video.connection_id&&n.push(`location.video.connection_id`),e.video.url!==t.video.url&&n.push(`location.video.url`),e.phone!==t.phone&&n.push(`location.phone`),n}var wI=1,TI=64;function EI(e){let t=e.normalize(`NFD`).replace(/[Ì-ͯ]/g,``).toLowerCase();return t=t.replace(/[\s_]+/g,`-`),t=t.replace(/[^a-z0-9-]/g,``),t=t.replace(/-+/g,`-`),t=t.replace(/^-+|-+$/g,``),t}function DI(e){return e.length<wI?`too-short`:e.length>TI?`too-long`:/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)?`ok`:`invalid`}var OI=[`about`,`admin`,`api`,`app`,`assets`,`b`,`book`,`booking`,`calendhub`,`dashboard`,`edit`,`help`,`login`,`me`,`new`,`privacy`,`register`,`settings`,`static`,`support`,`terms`,`www`];function kI(e){return e.length<3?`too-short`:e.length>32?`too-long`:RegExp(`^[a-z0-9]+(-[a-z0-9]+)*$`).test(e)?OI.includes(e)?`reserved`:`ok`:`invalid`}var AI;
vendor: 64,974 bytes, lines 58-121
58function X(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var jI=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},MI=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(AI=globalThis).__zod_globalConfig??(AI.__zod_globalConfig={});var NI=globalThis.__zod_globalConfig;function PI(e){return e&&Object.assign(NI,e),NI}function FI(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function II(e,t){return typeof t==`bigint`?t.toString():t}function LI(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function RI(e){return e==null}function zI(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function BI(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var VI=Symbol(`evaluating`);function HI(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==VI)return r===void 0&&(r=VI,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function UI(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function WI(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function GI(e){return JSON.stringify(e)}function KI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var qI=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function JI(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var YI=LI(()=>{if(NI.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function XI(e){if(JI(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return JI(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ZI(e){return XI(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var QI=new Set([`string`,`number`,`symbol`]);function $I(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function eL(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Z(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function tL(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var nL={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function rL(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return eL(e,WI(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return UI(this,`shape`,e),e},checks:[]}))}function iL(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return eL(e,WI(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return UI(this,`shape`,r),r},checks:[]}))}function aL(e,t){if(!XI(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return eL(e,WI(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return UI(this,`shape`,n),n}}))}function oL(e,t){if(!XI(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return eL(e,WI(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return UI(this,`shape`,n),n}}))}function sL(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return eL(e,WI(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return UI(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function cL(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return eL(t,WI(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return UI(this,`shape`,i),i},checks:[]}))}function lL(e,t,n){return eL(t,WI(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return UI(this,`shape`,i),i}}))}function uL(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function dL(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function fL(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function pL(e){return typeof e==`string`?e:e?.message}function mL(e,t,n){let r=e.message?e.message:pL(e.inst?._zod.def?.error?.(e))??pL(t?.error?.(e))??pL(n.customError?.(e))??pL(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function hL(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function gL(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var _L=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,II,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},vL=X(`$ZodError`,_L),yL=X(`$ZodError`,_L,{Parent:Error});function bL(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function xL(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var SL=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new jI;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>mL(e,a,PI())));throw qI(t,i?.callee),t}return o.value},CL=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>mL(e,a,PI())));throw qI(t,i?.callee),t}return o.value},wL=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new jI;return a.issues.length?{success:!1,error:new(e??vL)(a.issues.map(e=>mL(e,i,PI())))}:{success:!0,data:a.value}},TL=wL(yL),EL=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>mL(e,i,PI())))}:{success:!0,data:a.value}},DL=EL(yL),OL=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return SL(e)(t,n,i)},kL=e=>(t,n,r)=>SL(e)(t,n,r),AL=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return CL(e)(t,n,i)},jL=e=>async(t,n,r)=>CL(e)(t,n,r),ML=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return wL(e)(t,n,i)},NL=e=>(t,n,r)=>wL(e)(t,n,r),PL=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return EL(e)(t,n,i)},FL=e=>async(t,n,r)=>EL(e)(t,n,r),IL=/^[cC][0-9a-z]{6,}$/,LL=/^[0-9a-z]+$/,RL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zL=/^[0-9a-vA-V]{20}$/,BL=/^[A-Za-z0-9]{27}$/,VL=/^[a-zA-Z0-9_-]{21}$/,HL=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,UL=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,WL=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,GL=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,KL=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function qL(){return new RegExp(KL,`u`)}var JL=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,YL=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,XL=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ZL=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,QL=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$L=/^[A-Za-z0-9_-]*$/,eR=/^https?$/,tR=/^\+[1-9]\d{6,14}$/,nR=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,rR=RegExp(`^${nR}$`);function iR(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function aR(e){return RegExp(`^${iR(e)}$`)}function oR(e){let t=iR({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${nR}T(?:${r})$`)}var sR=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},cR=/^-?\d+$/,lR=/^-?\d+(?:\.\d+)?$/,uR=/^(?:true|false)$/i,dR=/^[^A-Z]*$/,fR=/^[^a-z]*$/,pR=X(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),mR={number:`number`,bigint:`bigint`,object:`date`},hR=X(`$ZodCheckLessThan`,(e,t)=>{pR.init(e,t);let n=mR[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),gR=X(`$ZodCheckGreaterThan`,(e,t)=>{pR.init(e,t);let n=mR[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_R=X(`$ZodCheckMultipleOf`,(e,t)=>{pR.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):BI(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),vR=X(`$ZodCheckNumberFormat`,(e,t)=>{pR.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=nL[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=cR)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),yR=X(`$ZodCheckMaxLength`,(e,t)=>{var n;pR.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!RI(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=hL(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bR=X(`$ZodCheckMinLength`,(e,t)=>{var n;pR.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!RI(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=hL(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xR=X(`$ZodCheckLengthEquals`,(e,t)=>{var n;pR.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!RI(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=hL(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),SR=X(`$ZodCheckStringFormat`,(e,t)=>{var n,r;pR.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),CR=X(`$ZodCheckRegex`,(e,t)=>{SR.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),wR=X(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=dR,SR.init(e,t)}),TR=X(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=fR,SR.init(e,t)}),ER=X(`$ZodCheckIncludes`,(e,t)=>{pR.init(e,t);let n=$I(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),DR=X(`$ZodCheckStartsWith`,(e,t)=>{pR.init(e,t);let n=RegExp(`^${$I(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),OR=X(`$ZodCheckEndsWith`,(e,t)=>{pR.init(e,t);let n=RegExp(`.*${$I(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),kR=X(`$ZodCheckOverwrite`,(e,t)=>{pR.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),AR=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` 59`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(` 60`))}},jR={major:4,minor:4,patch:3},MR=X(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jR;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=uL(e),i;for(let a of t){if(a._zod.def.when){if(dL(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new jI;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=uL(e,t))});else{if(e.issues.length===t)continue;r||=uL(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(uL(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new jI;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new jI;return o.then(e=>t(e,r,a))}return t(o,r,a)}}HI(e,`~standard`,()=>({validate:t=>{try{let n=TL(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return DL(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),NR=X(`$ZodString`,(e,t)=>{MR.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??sR(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),PR=X(`$ZodStringFormat`,(e,t)=>{SR.init(e,t),NR.init(e,t)}),FR=X(`$ZodGUID`,(e,t)=>{t.pattern??=UL,PR.init(e,t)}),IR=X(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=WL(e)}else t.pattern??=WL();PR.init(e,t)}),LR=X(`$ZodEmail`,(e,t)=>{t.pattern??=GL,PR.init(e,t)}),RR=X(`$ZodURL`,(e,t)=>{PR.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===eR.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),zR=X(`$ZodEmoji`,(e,t)=>{t.pattern??=qL(),PR.init(e,t)}),BR=X(`$ZodNanoID`,(e,t)=>{t.pattern??=VL,PR.init(e,t)}),VR=X(`$ZodCUID`,(e,t)=>{t.pattern??=IL,PR.init(e,t)}),HR=X(`$ZodCUID2`,(e,t)=>{t.pattern??=LL,PR.init(e,t)}),UR=X(`$ZodULID`,(e,t)=>{t.pattern??=RL,PR.init(e,t)}),WR=X(`$ZodXID`,(e,t)=>{t.pattern??=zL,PR.init(e,t)}),GR=X(`$ZodKSUID`,(e,t)=>{t.pattern??=BL,PR.init(e,t)}),KR=X(`$ZodISODateTime`,(e,t)=>{t.pattern??=oR(t),PR.init(e,t)}),qR=X(`$ZodISODate`,(e,t)=>{t.pattern??=rR,PR.init(e,t)}),JR=X(`$ZodISOTime`,(e,t)=>{t.pattern??=aR(t),PR.init(e,t)}),YR=X(`$ZodISODuration`,(e,t)=>{t.pattern??=HL,PR.init(e,t)}),XR=X(`$ZodIPv4`,(e,t)=>{t.pattern??=JL,PR.init(e,t),e._zod.bag.format=`ipv4`}),ZR=X(`$ZodIPv6`,(e,t)=>{t.pattern??=YL,PR.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),QR=X(`$ZodCIDRv4`,(e,t)=>{t.pattern??=XL,PR.init(e,t)}),$R=X(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ZL,PR.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function ez(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var tz=X(`$ZodBase64`,(e,t)=>{t.pattern??=QL,PR.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{ez(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function nz(e){if(!$L.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return ez(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var rz=X(`$ZodBase64URL`,(e,t)=>{t.pattern??=$L,PR.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{nz(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),iz=X(`$ZodE164`,(e,t)=>{t.pattern??=tR,PR.init(e,t)});function az(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var oz=X(`$ZodJWT`,(e,t)=>{PR.init(e,t),e._zod.check=n=>{az(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),sz=X(`$ZodNumber`,(e,t)=>{MR.init(e,t),e._zod.pattern=e._zod.bag.pattern??lR,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),cz=X(`$ZodNumberFormat`,(e,t)=>{vR.init(e,t),sz.init(e,t)}),lz=X(`$ZodBoolean`,(e,t)=>{MR.init(e,t),e._zod.pattern=uR,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),uz=X(`$ZodAny`,(e,t)=>{MR.init(e,t),e._zod.parse=e=>e}),dz=X(`$ZodUnknown`,(e,t)=>{MR.init(e,t),e._zod.parse=e=>e}),fz=X(`$ZodNever`,(e,t)=>{MR.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function pz(e,t,n){e.issues.length&&t.issues.push(...fL(n,e.issues)),t.value[n]=e.value}var mz=X(`$ZodArray`,(e,t)=>{MR.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>pz(t,n,e))):pz(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function hz(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...fL(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function gz(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=tL(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _z(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>hz(e,n,i,t,u,d))):hz(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var vz=X(`$ZodObject`,(e,t)=>{if(MR.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=LI(()=>gz(t));HI(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=JI,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>hz(n,t,e,s,r,i))):hz(a,t,e,s,r,i)}return i?_z(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),yz=X(`$ZodObjectJIT`,(e,t)=>{vz.init(e,t);let n=e._zod.parse,r=LI(()=>gz(t)),i=e=>{let t=new AR([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=GI(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=GI(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(` 61 if (${n}.issues.length) { 62 if (${o} in input) { 63 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 64 ...iss, 65 path: iss.path ? [${o}, ...iss.path] : [${o}] 66 }))); 67 } 68 } 69 70 if (${n}.value === undefined) { 71 if (${o} in input) { 72 newResult[${o}] = undefined; 73 } 74 } else { 75 newResult[${o}] = ${n}.value; 76 } 77 78 `):c?t.write(` 79 if (${n}.issues.length) { 80 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 81 ...iss, 82 path: iss.path ? [${o}, ...iss.path] : [${o}] 83 }))); 84 } 85 86 if (${n}.value === undefined) { 87 if (${o} in input) { 88 newResult[${o}] = undefined; 89 } 90 } else { 91 newResult[${o}] = ${n}.value; 92 } 93 94 `):t.write(` 95 const ${n}_present = ${o} in input; 96 if (${n}.issues.length) { 97 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 98 ...iss, 99 path: iss.path ? [${o}, ...iss.path] : [${o}] 100 }))); 101 } 102 if (!${n}_present && !${n}.issues.length) { 103 payload.issues.push({ 104 code: "invalid_type", 105 expected: "nonoptional", 106 input: undefined, 107 path: [${o}] 108 }); 109 } 110 111 if (${n}_present) { 112 if (${n}.value === undefined) { 113 newResult[${o}] = undefined; 114 } else { 115 newResult[${o}] = ${n}.value; 116 } 117 } 118 119 `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=JI,s=!NI.jitless,c=s&&YI.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?_z([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function bz(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!uL(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>mL(e,r,PI())))}),t)}var xz=X(`$ZodUnion`,(e,t)=>{MR.init(e,t),HI(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),HI(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),HI(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),HI(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>zI(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>bz(t,r,e,i)):bz(o,r,e,i)}}),Sz=X(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,xz.init(e,t);let n=e._zod.parse;HI(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=LI(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!JI(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Cz=X(`$ZodIntersection`,(e,t)=>{MR.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Tz(e,t,n)):Tz(e,i,a)}});function wz(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(XI(e)&&XI(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=wz(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=wz(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Tz(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),uL(e))return e;let o=wz(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Ez=X(`$ZodEnum`,(e,t)=>{MR.init(e,t);let n=FI(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>QI.has(typeof e)).map(e=>typeof e==`string`?$I(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Dz=X(`$ZodLiteral`,(e,t)=>{if(MR.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?$I(e):e?$I(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Oz=X(`$ZodTransform`,(e,t)=>{MR.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new MI(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new jI;return n.value=i,n.fallback=!0,n}});function kz(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Az=X(`$ZodOptional`,(e,t)=>{MR.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,HI(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),HI(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${zI(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>kz(e,r)):kz(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),jz=X(`$ZodExactOptional`,(e,t)=>{Az.init(e,t),HI(e._zod,`values`,()=>t.innerType._zod.values),HI(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Mz=X(`$ZodNullable`,(e,t)=>{MR.init(e,t),HI(e._zod,`optin`,()=>t.innerType._zod.optin),HI(e._zod,`optout`,()=>t.innerType._zod.optout),HI(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${zI(e.source)}|null)$`):void 0}),HI(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Nz=X(`$ZodDefault`,(e,t)=>{MR.init(e,t),e._zod.optin=`optional`,HI(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Pz(e,t)):Pz(r,t)}});function Pz(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Fz=X(`$ZodPrefault`,(e,t)=>{MR.init(e,t),e._zod.optin=`optional`,HI(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Iz=X(`$ZodNonOptional`,(e,t)=>{MR.init(e,t),HI(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Lz(t,e)):Lz(i,e)}});function Lz(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Rz=X(`$ZodCatch`,(e,t)=>{MR.init(e,t),e._zod.optin=`optional`,HI(e._zod,`optout`,()=>t.innerType._zod.optout),HI(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>mL(e,n,PI()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>mL(e,n,PI()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),zz=X(`$ZodPipe`,(e,t)=>{MR.init(e,t),HI(e._zod,`values`,()=>t.in._zod.values),HI(e._zod,`optin`,()=>t.in._zod.optin),HI(e._zod,`optout`,()=>t.out._zod.optout),HI(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Bz(e,t.in,n)):Bz(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Bz(e,t.out,n)):Bz(r,t.out,n)}});function Bz(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Vz=X(`$ZodReadonly`,(e,t)=>{MR.init(e,t),HI(e._zod,`propValues`,()=>t.innerType._zod.propValues),HI(e._zod,`values`,()=>t.innerType._zod.values),HI(e._zod,`optin`,()=>t.innerType?._zod?.optin),HI(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Hz):Hz(r)}});function Hz(e){return e.value=Object.freeze(e.value),e}var Uz=X(`$ZodCustom`,(e,t)=>{pR.init(e,t),MR.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Wz(t,n,r,e));Wz(i,n,r,e)}});function Wz(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(gL(e))}}var Gz,Kz=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function qz(){return new Kz}(Gz=globalThis).__zod_globalRegistry??(Gz.__zod_globalRegistry=qz());var Jz=globalThis.__zod_globalRegistry;function Yz(e,t){return new e({type:`string`,...Z(t)})}function Xz(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Z(t)})}function Zz(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Z(t)})}function Qz(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Z(t)})}function $z(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Z(t)})}function eB(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Z(t)})}function tB(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Z(t)})}function nB(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Z(t)})}function rB(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Z(t)})}function iB(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Z(t)})}function aB(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Z(t)})}function oB(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Z(t)})}function sB(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Z(t)})}function cB(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Z(t)})}function lB(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Z(t)})}function uB(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Z(t)})}function dB(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Z(t)})}function fB(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Z(t)})}function pB(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Z(t)})}function mB(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Z(t)})}function hB(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Z(t)})}function gB(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Z(t)})}function _B(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Z(t)})}function vB(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Z(t)})}function yB(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Z(t)})}function bB(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Z(t)})}function xB(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Z(t)})}function SB(e,t){return new e({type:`number`,checks:[],...Z(t)})}function CB(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Z(t)})}function wB(e,t){return new e({type:`boolean`,...Z(t)})}function TB(e){return new e({type:`any`})}function EB(e){return new e({type:`unknown`})}function DB(e,t){return new e({type:`never`,...Z(t)})}function OB(e,t){return new hR({check:`less_than`,...Z(t),value:e,inclusive:!1})}function kB(e,t){return new hR({check:`less_than`,...Z(t),value:e,inclusive:!0})}function AB(e,t){return new gR({check:`greater_than`,...Z(t),value:e,inclusive:!1})}function jB(e,t){return new gR({check:`greater_than`,...Z(t),value:e,inclusive:!0})}function MB(e,t){return new _R({check:`multiple_of`,...Z(t),value:e})}function NB(e,t){return new yR({check:`max_length`,...Z(t),maximum:e})}function PB(e,t){return new bR({check:`min_length`,...Z(t),minimum:e})}function FB(e,t){return new xR({check:`length_equals`,...Z(t),length:e})}function IB(e,t){return new CR({check:`string_format`,format:`regex`,...Z(t),pattern:e})}function LB(e){return new wR({check:`string_format`,format:`lowercase`,...Z(e)})}function RB(e){return new TR({check:`string_format`,format:`uppercase`,...Z(e)})}function zB(e,t){return new ER({check:`string_format`,format:`includes`,...Z(t),includes:e})}function BB(e,t){return new DR({check:`string_format`,format:`starts_with`,...Z(t),prefix:e})}function VB(e,t){return new OR({check:`string_format`,format:`ends_with`,...Z(t),suffix:e})}function HB(e){return new kR({check:`overwrite`,tx:e})}function UB(e){return HB(t=>t.normalize(e))}function WB(){return HB(e=>e.trim())}function GB(){return HB(e=>e.toLowerCase())}function KB(){return HB(e=>e.toUpperCase())}function qB(){return HB(e=>KI(e))}function JB(e,t,n){return new e({type:`array`,element:t,...Z(n)})}function YB(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Z(n)})}function XB(e,t){let n=ZB(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(gL(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(gL(r))}},e(t.value,t)),t);return n}function ZB(e,t){let n=new pR({check:`custom`,...Z(t)});return n._zod.check=e,n}function QB(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Jz,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function $B(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,$B(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&nV(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function eV(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root> 120 121Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function tV(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:iV(t,`input`,e.processors),output:iV(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function nV(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return nV(r.element,n);if(r.type===`set`)return nV(r.valueType,n);if(r.type===`lazy`)return nV(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return nV(r.innerType,n);if(r.type===`intersection`)return nV(r.left,n)||nV(r.right,n);if(r.type===`record`||r.type===`map`)return nV(r.keyType,n)||nV(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:nV(r.in,n)||nV(r.out,n);if(r.type===`object`){for(let e in r.shape)if(nV(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(nV(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(nV(e,n))return!0;return!!(r.rest&&nV(r.rest,n))}return!1}var rV=(e,t={})=>n=>{let r=QB({...n,processors:t});return $B(e,r),eV(r,e),tV(r,e)},iV=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=QB({...i??{},target:a,io:t,processors:n});return $B(e,o),eV(o,e),tV(o,e)},aV={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},oV=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=aV[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},sV=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},cV=(e,t,n,r)=>{n.type=`boolean`},lV=(e,t,n,r)=>{n.not={}},uV=(e,t,n,r)=>{let i=e._zod.def,a=FI(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},dV=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},fV=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},pV=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},mV=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=$B(a.element,t,{...r,path:[...r.path,`items`]})},hV=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=$B(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=$B(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},gV=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>$B(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},_V=(e,t,n,r)=>{let i=e._zod.def,a=$B(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=$B(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},vV=(e,t,n,r)=>{let i=e._zod.def,a=$B(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},yV=(e,t,n,r)=>{let i=e._zod.def;$B(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},bV=(e,t,n,r)=>{let i=e._zod.def;$B(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},xV=(e,t,n,r)=>{let i=e._zod.def;$B(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},SV=(e,t,n,r)=>{let i=e._zod.def;$B(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},CV=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;$B(o,t,r);let s=t.seen.get(e);s.ref=o},wV=(e,t,n,r)=>{let i=e._zod.def;$B(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},TV=(e,t,n,r)=>{let i=e._zod.def;$B(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},EV=X(`ZodISODateTime`,(e,t)=>{KR.init(e,t),$V.init(e,t)});function DV(e){return vB(EV,e)}var OV=X(`ZodISODate`,(e,t)=>{qR.init(e,t),$V.init(e,t)});function kV(e){return yB(OV,e)}var AV=X(`ZodISOTime`,(e,t)=>{JR.init(e,t),$V.init(e,t)});function jV(e){return bB(AV,e)}var MV=X(`ZodISODuration`,(e,t)=>{YR.init(e,t),$V.init(e,t)});function NV(e){return xB(MV,e)}var PV=X(`ZodError`,(e,t)=>{vL.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>xL(e,t)},flatten:{value:t=>bL(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,II,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,II,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),FV=SL(PV),IV=CL(PV),LV=wL(PV),RV=EL(PV),zV=OL(PV),BV=kL(PV),VV=AL(PV),HV=jL(PV),UV=ML(PV),WV=NL(PV),GV=PL(PV),KV=FL(PV),qV=new WeakMap;function JV(e,t,n){let r=Object.getPrototypeOf(e),i=qV.get(r);if(i||(i=new Set,qV.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var YV=X(`ZodType`,(e,t)=>(MR.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:iV(e,`input`),output:iV(e,`output`)}}),e.toJSONSchema=rV(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>FV(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>LV(e,t,n),e.parseAsync=async(t,n)=>IV(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>RV(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>zV(e,t,n),e.decode=(t,n)=>BV(e,t,n),e.encodeAsync=async(t,n)=>VV(e,t,n),e.decodeAsync=async(t,n)=>HV(e,t,n),e.safeEncode=(t,n)=>UV(e,t,n),e.safeDecode=(t,n)=>WV(e,t,n),e.safeEncodeAsync=async(t,n)=>GV(e,t,n),e.safeDecodeAsync=async(t,n)=>KV(e,t,n),JV(e,`ZodType`,{check(...e){let t=this.def;return this.clone(WI(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eL(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(fU(e,t))},superRefine(e,t){return this.check(pU(e,t))},overwrite(e){return this.check(HB(e))},optional(){return JH(this)},exactOptional(){return XH(this)},nullable(){return QH(this)},nullish(){return JH(QH(this))},nonoptional(e){return iU(this,e)},array(){return MH(this)},or(e){return IH([this,e])},and(e){return BH(this,e)},transform(e){return cU(this,KH(e))},default(e){return eU(this,e)},prefault(e){return nU(this,e)},catch(e){return oU(this,e)},pipe(e){return cU(this,e)},readonly(){return uU(this)},describe(e){let t=this.clone();return Jz.add(t,{description:e}),t},meta(...e){if(e.length===0)return Jz.get(this);let t=this.clone();return Jz.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Jz.get(e)?.description},configurable:!0}),e)),XV=X(`_ZodString`,(e,t)=>{NR.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oV(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,JV(e,`_ZodString`,{regex(...e){return this.check(IB(...e))},includes(...e){return this.check(zB(...e))},startsWith(...e){return this.check(BB(...e))},endsWith(...e){return this.check(VB(...e))},min(...e){return this.check(PB(...e))},max(...e){return this.check(NB(...e))},length(...e){return this.check(FB(...e))},nonempty(...e){return this.check(PB(1,...e))},lowercase(e){return this.check(LB(e))},uppercase(e){return this.check(RB(e))},trim(){return this.check(WB())},normalize(...e){return this.check(UB(...e))},toLowerCase(){return this.check(GB())},toUpperCase(){return this.check(KB())},slugify(){return this.check(qB())}})}),ZV=X(`ZodString`,(e,t)=>{NR.init(e,t),XV.init(e,t),e.email=t=>e.check(Xz(eH,t)),e.url=t=>e.check(nB(rH,t)),e.jwt=t=>e.check(_B(vH,t)),e.emoji=t=>e.check(rB(iH,t)),e.guid=t=>e.check(Zz(tH,t)),e.uuid=t=>e.check(Qz(nH,t)),e.uuidv4=t=>e.check($z(nH,t)),e.uuidv6=t=>e.check(eB(nH,t)),e.uuidv7=t=>e.check(tB(nH,t)),e.nanoid=t=>e.check(iB(aH,t)),e.guid=t=>e.check(Zz(tH,t)),e.cuid=t=>e.check(aB(oH,t)),e.cuid2=t=>e.check(oB(sH,t)),e.ulid=t=>e.check(sB(cH,t)),e.base64=t=>e.check(mB(hH,t)),e.base64url=t=>e.check(hB(gH,t)),e.xid=t=>e.check(cB(lH,t)),e.ksuid=t=>e.check(lB(uH,t)),e.ipv4=t=>e.check(uB(dH,t)),e.ipv6=t=>e.check(dB(fH,t)),e.cidrv4=t=>e.check(fB(pH,t)),e.cidrv6=t=>e.check(pB(mH,t)),e.e164=t=>e.check(gB(_H,t)),e.datetime=t=>e.check(DV(t)),e.date=t=>e.check(kV(t)),e.time=t=>e.check(jV(t)),e.duration=t=>e.check(NV(t))});function QV(e){return Yz(ZV,e)}var $V=X(`ZodStringFormat`,(e,t)=>{PR.init(e,t),XV.init(e,t)}),eH=X(`ZodEmail`,(e,t)=>{LR.init(e,t),$V.init(e,t)}),tH=X(`ZodGUID`,(e,t)=>{FR.init(e,t),$V.init(e,t)}),nH=X(`ZodUUID`,(e,t)=>{IR.init(e,t),$V.init(e,t)}),rH=X(`ZodURL`,(e,t)=>{RR.init(e,t),$V.init(e,t)}),iH=X(`ZodEmoji`,(e,t)=>{zR.init(e,t),$V.init(e,t)}),aH=X(`ZodNanoID`,(e,t)=>{BR.init(e,t),$V.init(e,t)}),oH=X(`ZodCUID`,(e,t)=>{VR.init(e,t),$V.init(e,t)}),sH=X(`ZodCUID2`,(e,t)=>{HR.init(e,t),$V.init(e,t)}),cH=X(`ZodULID`,(e,t)=>{UR.init(e,t),$V.init(e,t)}),lH=X(`ZodXID`,(e,t)=>{WR.init(e,t),$V.init(e,t)}),uH=X(`ZodKSUID`,(e,t)=>{GR.init(e,t),$V.init(e,t)}),dH=X(`ZodIPv4`,(e,t)=>{XR.init(e,t),$V.init(e,t)}),fH=X(`ZodIPv6`,(e,t)=>{ZR.init(e,t),$V.init(e,t)}),pH=X(`ZodCIDRv4`,(e,t)=>{QR.init(e,t),$V.init(e,t)}),mH=X(`ZodCIDRv6`,(e,t)=>{$R.init(e,t),$V.init(e,t)}),hH=X(`ZodBase64`,(e,t)=>{tz.init(e,t),$V.init(e,t)}),gH=X(`ZodBase64URL`,(e,t)=>{rz.init(e,t),$V.init(e,t)}),_H=X(`ZodE164`,(e,t)=>{iz.init(e,t),$V.init(e,t)}),vH=X(`ZodJWT`,(e,t)=>{oz.init(e,t),$V.init(e,t)}),yH=X(`ZodNumber`,(e,t)=>{sz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sV(e,t,n,r),JV(e,`ZodNumber`,{gt(e,t){return this.check(AB(e,t))},gte(e,t){return this.check(jB(e,t))},min(e,t){return this.check(jB(e,t))},lt(e,t){return this.check(OB(e,t))},lte(e,t){return this.check(kB(e,t))},max(e,t){return this.check(kB(e,t))},int(e){return this.check(SH(e))},safe(e){return this.check(SH(e))},positive(e){return this.check(AB(0,e))},nonnegative(e){return this.check(jB(0,e))},negative(e){return this.check(OB(0,e))},nonpositive(e){return this.check(kB(0,e))},multipleOf(e,t){return this.check(MB(e,t))},step(e,t){return this.check(MB(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function bH(e){return SB(yH,e)}var xH=X(`ZodNumberFormat`,(e,t)=>{cz.init(e,t),yH.init(e,t)});function SH(e){return CB(xH,e)}var CH=X(`ZodBoolean`,(e,t)=>{lz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cV(e,t,n,r)});function wH(e){return wB(CH,e)}var TH=X(`ZodAny`,(e,t)=>{uz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function EH(){return TB(TH)}var DH=X(`ZodUnknown`,(e,t)=>{dz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function OH(){return EB(DH)}var kH=X(`ZodNever`,(e,t)=>{fz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lV(e,t,n,r)});function AH(e){return DB(kH,e)}var jH=X(`ZodArray`,(e,t)=>{mz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mV(e,t,n,r),e.element=t.element,JV(e,`ZodArray`,{min(e,t){return this.check(PB(e,t))},nonempty(e){return this.check(PB(1,e))},max(e,t){return this.check(NB(e,t))},length(e,t){return this.check(FB(e,t))},unwrap(){return this.element}})});function MH(e,t){return JB(jH,e,t)}var NH=X(`ZodObject`,(e,t)=>{yz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hV(e,t,n,r),HI(e,`shape`,()=>t.shape),JV(e,`ZodObject`,{keyof(){return HH(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:OH()})},loose(){return this.clone({...this._zod.def,catchall:OH()})},strict(){return this.clone({...this._zod.def,catchall:AH()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return aL(this,e)},safeExtend(e){return oL(this,e)},merge(e){return sL(this,e)},pick(e){return rL(this,e)},omit(e){return iL(this,e)},partial(...e){return cL(qH,this,e[0])},required(...e){return lL(rU,this,e[0])}})});function PH(e,t){return new NH({type:`object`,shape:e??{},...Z(t)})}var FH=X(`ZodUnion`,(e,t)=>{xz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gV(e,t,n,r),e.options=t.options});function IH(e,t){return new FH({type:`union`,options:e,...Z(t)})}var LH=X(`ZodDiscriminatedUnion`,(e,t)=>{FH.init(e,t),Sz.init(e,t)});function RH(e,t,n){return new LH({type:`union`,options:t,discriminator:e,...Z(n)})}var zH=X(`ZodIntersection`,(e,t)=>{Cz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_V(e,t,n,r)});function BH(e,t){return new zH({type:`intersection`,left:e,right:t})}var VH=X(`ZodEnum`,(e,t)=>{Ez.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uV(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new VH({...t,checks:[],...Z(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new VH({...t,checks:[],...Z(r),entries:i})}});function HH(e,t){return new VH({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Z(t)})}var UH=X(`ZodLiteral`,(e,t)=>{Dz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dV(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
121(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function WH(e,t){return new UH({type:`literal`,values:Array.isArray(e)?e:[e],...Z(t)})}var GH=X(`ZodTransform`,(e,t)=>{Oz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pV(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new MI(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(gL(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(gL(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function KH(e){return new GH({type:`transform`,transform:e})}var qH=X(`ZodOptional`,(e,t)=>{Az.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function JH(e){return new qH({type:`optional`,innerType:e})}var YH=X(`ZodExactOptional`,(e,t)=>{jz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function XH(e){return new YH({type:`optional`,innerType:e})}var ZH=X(`ZodNullable`,(e,t)=>{Mz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function QH(e){return new ZH({type:`nullable`,innerType:e})}var $H=X(`ZodDefault`,(e,t)=>{Nz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eU(e,t){return new $H({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ZI(t)}})}var tU=X(`ZodPrefault`,(e,t)=>{Fz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nU(e,t){return new tU({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ZI(t)}})}var rU=X(`ZodNonOptional`,(e,t)=>{Iz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iU(e,t){return new rU({type:`nonoptional`,innerType:e,...Z(t)})}var aU=X(`ZodCatch`,(e,t)=>{Rz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oU(e,t){return new aU({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var sU=X(`ZodPipe`,(e,t)=>{zz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CV(e,t,n,r),e.in=t.in,e.out=t.out});function cU(e,t){return new sU({type:`pipe`,in:e,out:t})}var lU=X(`ZodReadonly`,(e,t)=>{Vz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wV(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uU(e){return new lU({type:`readonly`,innerType:e})}var dU=X(`ZodCustom`,(e,t)=>{Uz.init(e,t),YV.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fV(e,t,n,r)});function fU(e,t={}){return YB(dU,e,t)}function pU(e,t){return XB(e,t)}var mU=/^#[0-9a-fA-F]{6}$/,hU=[`none`,`sm`,`md`,`lg`,`full`],gU=[`inter`,`system`,`serif`,`mono`],_U=[`host-header`,`event-list`,`about`],vU=[`default`],yU=RH(`type`,[PH({type:WH(`host-header`),props:PH({showAvatar:wH().optional(),showTagline:wH().optional()})}),PH({type:WH(`event-list`),props:PH({layout:HH([`cards`,`list`]).optional(),order:MH(QV()).optional()})}),PH({type:WH(`about`),props:PH({text:QV().max(2e3).optional()})})]),bU=PH({logoAssetId:QV().nullable(),bannerAssetId:QV().nullable(),logoUrl:QV().nullable().catch(null),bannerUrl:QV().nullable().catch(null)}),xU=PH({preset:HH(vU).catch(`default`),brandColor:QV().regex(mU,`Not a hex colour.`),brandColorDark:QV().regex(mU,`Not a hex colour.`),radius:HH(hU),font:HH(gU),hideBranding:wH()}),SU=PH({version:WH(1),theme:xU,branding:bU,sections:MH(yU)});function CU(e){let t=SU.safeParse(e);if(!t.success){let e=[];for(let n of t.error.issues){let t=n.path.length>0?n.path.join(`.`):``,r=`PAGE_CONFIG_MALFORMED`;n.message===`Not a hex colour.`&&(r=`INVALID_HEX_COLOUR`),e.push({path:t,code:r})}return e.length===0&&e.push({path:``,code:`PAGE_CONFIG_MALFORMED`}),{page:null,errors:e}}return{page:t.data,errors:[]}}var wU={version:1,theme:{preset:`default`,brandColor:`#0f62fe`,brandColorDark:`#78a9ff`,radius:`md`,font:`inter`,hideBranding:!1},branding:{logoAssetId:null,bannerAssetId:null},sections:[{type:`host-header`,props:{showAvatar:!0,showTagline:!0}},{type:`event-list`,props:{layout:`cards`,order:[]}}]};function TU(e){return e.sections.find(e=>e.type===`event-list`)?.props?.layout===`list`?`list`:`cards`}function EU(e){return{"--book-brand":e.brandColor,"--book-brand-dark":e.brandColorDark,"--book-radius":{none:`0rem`,sm:`0.25rem`,md:`0.5rem`,lg:`1rem`,full:`9999rem`}[e.radius],"--book-font":{inter:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Inter", sans-serif`,system:`-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`,serif:`"Georgia", "Garamond", serif`,mono:`"Courier New", "Menlo", "Monaco", monospace`}[e.font]}}var DU=[15,30,45,60,90,120],OU=[0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,
121115,120];function kU(e){return`${e} min`}function AU(e,t){let n=Date.parse(e);return new Date(n+(Date.parse(t)-n)/2)}function jU(e,t,n){return n?e.includes(t)?[...e]:[...e,t]:e.filter(e=>e!==t)}function MU(e,t){return e.filter(e=>aA([e.title,e.slug],t))}function NU(e,t){return t==null?null:e.filter(e=>e.status!==`archived`).length>=t?t:null}function PU(e,t){return e.filter(e=>aA([e.field.label,e.field.name,e.field.type],t))}var FU={name:`Name`,text:`Short text`,textarea:`Long text`,number:`Number`,email:`Email`,phone:`Phone`,url:`Web address`,select:`Select`,multiselect:`Multi-select`,checkbox:`Checkbox`,radio:`Radio`},IU={name:`A full name, on one line.`,text:`One line of free text.`,textarea:`A paragraph of free text.`,number:`Digits only, such as a quantity.`,email:`An email address, checked for shape.`,phone:`A phone number, with a phone keypad on mobile.`,url:`A web address starting http or https.`,select:`One choice from a drop-down list.`,multiselect:`Any number of choices from a list.`,checkbox:`A single yes or no tick box.`,radio:`One choice from options shown side by side.`};function LU(e){return FU[e]}function RU(e){return IU[e]}function zU(e){return Math.round(e*10)/10}function BU(e,t,n){let r=xN[t];return e===null?n(`dashboard.stats.trend.none`):e>0?n(`dashboard.stats.trend.up`,{delta:e,days:r}):e<0?n(`dashboard.stats.trend.down`,{delta:-e,days:r}):n(`dashboard.stats.trend.flat`,{days:r})}function VU(e,t,n){let r=e.current,i=e.previous,a=DN(r.total,i.total),o=BU(a,t,n),s=r.avg_lead_hours===null?n(`dashboard.stats.bookings.noBookings`):n(`dashboard.stats.bookings.leadTime`,{days:zU(r.avg_lead_hours/24)});return{label:n(`dashboard.stats.bookings.label`),value:String(r.total),delta:a,trendLine:o,contextLine:s}}function HU(e,t,n,r,i){let a=e.current,o=e.previous,s=DN(a.hours_booked,o.hours_booked),c=BU(s,t,i),l=n?.configured?kN(n.windows,r.from,r.to):0,u=ON(a.hours_booked,l),d=u===null?i(`dashboard.stats.hoursBooked.noWorkingHours`):i(`dashboard.stats.hoursBooked.utilisation`,{percent:u});return{label:i(`dashboard.stats.hoursBooked.label`),value:`${zU(a.hours_booked)}h`,delta:s,trendLine:c,contextLine:d}}function UU(e,t,n){let r=e.current,i=e.previous,a=ON(r.cancelled,r.total),o=ON(i.cancelled,i.total),s=a===null||o===null?null:DN(a,o),c=BU(s,t,n),l=a===null?`â`:`${a}%`,u=n(`dashboard.stats.cancellationRate.context`,{cancelled:r.cancelled,total:r.total});return{label:n(`dashboard.stats.cancellationRate.label`),value:l,delta:s,invertTrend:!0,trendLine:c,contextLine:u}}function WU(e,t,n){let r=e.upcoming_7d,i=``;return i=t===null?n(`dashboard.stats.upcoming.none`):n(`dashboard.stats.upcoming.next`,{when:new Date(t.start_at).toLocaleString(zE(),{weekday:`short`,hour:`2-digit`,minute:`2-digit`}),title:t.link_title,name:t.invitee_name}),{label:n(`dashboard.stats.upcoming.label`),value:String(r),delta:null,trendLine:i,contextLine:n(`dashboard.stats.upcoming.context`)}}function GU(e,t,n){let r=e.current.revenue,i=e.previous.revenue;if(r.length===0&&i.length===0)return{label:n(`dashboard.stats.revenue.label`),value:`â`,delta:null,trendLine:n(`dashboard.stats.revenue.none`),contextLine:n(`dashboard.stats.revenue.hint`)};let a=r.length>0?r[0]:{currency:i[0].currency,amount_minor:0},o=i.find(e=>e.currency===a.currency)?.amount_minor,s=o===void 0?null:DN(a.amount_minor,o),c=hk(a),l=n(`dashboard.stats.revenue.context`);r.length>1?l=n(`dashboard.stats.revenue.also`,{list:r.slice(1).map(e=>hk(e)).join(` · `)}):r.length===0&&i.length>0&&(l=n(`dashboard.stats.revenue.none`));let u=BU(s,t,n);return{label:n(`dashboard.stats.revenue.label`),value:c,delta:s,trendLine:u,contextLine:l}}function KU(e){let t=e(`dashboard.stats.comingSoon.notTracked`);return[{label:e(`dashboard.stats.comingSoon.pageViews`),value:`â`,delta:null,comingSoon:!0,contextLine:t},{label:e(`dashboard.stats.comingSoon.conversionRate`),value:`â`,delta:null,comingSoon:!0,contextLine:t},{label:e(`dashboard.stats.comingSoon.noShows`),value:`â`,delta:null,comingSoon:!0,contextLine:t}]}function qU(e){let t=e.workingHours?.configured??!1,n=e.workingHours!==null&&t&&Ob
121ject.values(e.workingHours.windows).some(e=>e.length>0);return{calendar:e.connections>0,workingHours:n,handle:(e.profile?.handle??``)!==``,link:e.links>0,firstBooking:e.totalAllTime>0}}function JU(e,t,n){let r=t.getTime();return e.filter(e=>Date.parse(e.start_at)>=r).sort((e,t)=>Date.parse(e.start_at)-Date.parse(t.start_at)).slice(0,5).map(e=>{let t=new Date(e.start_at),r=e.all_day?n(`dashboard.upcoming.allDay`,{date:AU(e.start_at,e.end_at).toLocaleDateString(zE(),{weekday:`short`,month:`short`,day:`numeric`})}):t.toLocaleString(zE(),{weekday:`short`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}),i=e.invitee_name||e.invitee_email||n(`dashboard.upcoming.inviteeFallback`);return{id:e.id,whenLabel:r,inviteeName:i,linkTitle:e.link_title,status:e.status}})}function YU(e,t){let n=t.getTime(),r=e.filter(e=>Date.parse(e.start_at)>=n);return r.length===0?null:r.reduce((e,t)=>Date.parse(e.start_at)<Date.parse(t.start_at)?e:t)}function XU(e,t){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+1),i=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`;return e.filter(e=>{if(e.extendedProps?.status===`cancelled`)return!1;if(e.start.length===10)return e.start===i;let t=Date.parse(e.start);return t>=n.getTime()&&t<r.getTime()}).length}function ZU(e,t,n,r){let i=new Map(t.map(e=>[e.link_id,e]));return e.map(e=>{let t=i.get(e.id),a=(t?.confirmed??0)+(t?.cancelled??0);return{id:e.id,title:e.title,status:e.status,bookings:a,durationLabel:e.all_day?r(`booking.allDay`):kU(e.duration_minutes),publicUrl:`${n}${e.public_url}`}})}function QU(e){return e.map(e=>({id:e.id,providerLabel:QF[e.provider],email:e.account_email,syncStatus:e.sync_status,revoked:e.revoked}))}function $U(e){let{t}=K(),n=(e,n)=>t(e,n),r=(0,L.useMemo)(()=>new Date,[]),i=(0,L.useMemo)(()=>TN(e,r),[e,r]),a=(0,L.useMemo)(()=>EN(r),[r]),o=(0,L.useMemo)(()=>{let e=new Date(r);return e.setDate(e.getDate()+30),{from:a.from,to:e.toISOString()}},[r,a]),{data:s}=eC(),c={morning:`dashboard.greeting.morning`,afternoon:`dashboard.greeting.afternoon`,evening:`dashboard.greeting.evening`}[AN(r)],l=s===void 0?t(`dashboard.welcomeAnonymous`,{greeting:t(c)}):t(`dashboard.welcome`,{greeting:t(c),name:s.first_name}),u=dt(Ste({from:i.from,to:i.to})),d=dt(vte({from:o.from,to:o.to,status:`confirmed`,limit:100})),f=dt(EP({range:a})),p=dt(gP()),m=dt(hP()),h=dt(MP()),g=dt(qF()),{data:_}=u,{data:v=[]}=d,{data:y=[]}=f,{data:b=[]}=p,{data:x}=m,{data:S}=h,{data:C=[]}=g,w=[u,d,f,p,m,h,g],T=w.some(e=>e.isLoading),E=w.find(e=>e.error)?.error,D=E?XC(E,t):null,O=_??{range:i,current:{total:0,confirmed:0,cancelled:0,pending:0,hours_booked:0,avg_lead_hours:null,revenue:[]},previous:{total:0,confirmed:0,cancelled:0,pending:0,hours_booked:0,avg_lead_hours:null,revenue:[]},daily:[],by_link:[],upcoming_7d:0,total_all_time:0},k={bookings:VU(O,e,n),hoursBooked:HU(O,e,S??null,i,n),cancellationRate:UU(O,e,n),upcoming:WU(O,YU(v,r),n),revenue:GU(O,e,n),comingSoon:KU(n)},ee=O.daily.map(e=>({date:e.date,confirmed:e.confirmed,cancelled:e.cancelled})),A=JU(v,r,n),j=ZU(b,O.by_link,typeof window>`u`?``:window.location.origin,n),te=QU(C),ne=qU({connections:C.length,workingHours:S??null,profile:x?{handle:x.handle??``}:null,links:b.length,totalAllTime:O.total_all_time}),re=Object.values(ne).filter(Boolean).length,M=Object.keys(ne).length;return{greeting:l,dateLine:t(`dashboard.dateLine`,{count:XU(y,r),date:r.toLocaleDateString(zE(),{weekday:`long`,day:`numeric`,month:`long`,year:`numeric`})}),email:s?.email,fullName:s?.full_name,setup:{complete:re===M,flags:ne,done:re,total:M},stats:k,chart:ee,upcoming:A,linkRows:j,connections:te,loading:T,error:D,actions:{copyLink(e){mI(e)}}}}var eW=(0,L.lazy)(()=>jE(()=>import(`./src-CL4RyiUs.js`).then(e=>({default:e.BookingsChart})),[]));function tW(e){let{t}=K(),n=CN.map(e=>({value:e.value,label:t(e.labelKey)})),{greeting:r,dateLine:i,email:a,fullName:o,setup:s,stats:c,chart:l,upcoming:u,linkRows:d,connections:f,loading:p,error:m,actions:h}=$U(e.period);
121return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jN,{title:r,description:i,action:(0,R.jsx)(IN,{value:e.period,options:n,ariaLabel:t(`dashboard.periodLabel`),onValueChange:t=>e.onPeriodChange(t)})}),m!==null&&(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:m}),!s.complete&&(0,R.jsx)(JN,{items:[{id:`calendar`,label:t(`dashboard.setup.calendar`),done:s.flags.calendar,action:e.links.integrations},{id:`working-hours`,label:t(`dashboard.setup.workingHours`),done:s.flags.workingHours,action:e.links.availability},{id:`handle`,label:t(`dashboard.setup.handle`),done:s.flags.handle,action:e.links.bookingSettings},{id:`link`,label:t(`dashboard.setup.link`),done:s.flags.link,action:e.links.bookingLinks},{id:`first-booking`,label:t(`dashboard.setup.firstBooking`),done:s.flags.firstBooking,action:e.links.bookingLinks}]}),(0,R.jsxs)(`div`,{"data-kit":`dashboard-stats`,className:`grid gap-4 md:grid-cols-2 lg:grid-cols-4`,children:[(0,R.jsx)(LN,{label:c.bookings.label,value:c.bookings.value,delta:c.bookings.delta,invertTrend:c.bookings.invertTrend,trendLine:c.bookings.trendLine,contextLine:c.bookings.contextLine,loading:p}),(0,R.jsx)(LN,{label:c.hoursBooked.label,value:c.hoursBooked.value,delta:c.hoursBooked.delta,invertTrend:c.hoursBooked.invertTrend,trendLine:c.hoursBooked.trendLine,contextLine:c.hoursBooked.contextLine,loading:p}),(0,R.jsx)(LN,{label:c.cancellationRate.label,value:c.cancellationRate.value,delta:c.cancellationRate.delta,invertTrend:c.cancellationRate.invertTrend,trendLine:c.cancellationRate.trendLine,contextLine:c.cancellationRate.contextLine,loading:p}),(0,R.jsx)(LN,{label:c.upcoming.label,value:c.upcoming.value,delta:c.upcoming.delta,invertTrend:c.upcoming.invertTrend,trendLine:c.upcoming.trendLine,contextLine:c.upcoming.contextLine,loading:p}),(0,R.jsx)(LN,{label:c.revenue.label,value:c.revenue.value,delta:c.revenue.delta,invertTrend:c.revenue.invertTrend,trendLine:c.revenue.trendLine,contextLine:c.revenue.contextLine,loading:p}),c.comingSoon.map((e,t)=>(0,R.jsx)(LN,{label:e.label,value:e.value,delta:e.delta,invertTrend:e.invertTrend,trendLine:e.trendLine,contextLine:e.contextLine,comingSoon:e.comingSoon,loading:p},t))]}),(0,R.jsx)(L.Suspense,{fallback:(0,R.jsx)(TA,{className:`h-[250px] w-full`}),children:(0,R.jsx)(eW,{data:l,period:e.period,onPeriodChange:t=>e.onPeriodChange(t),loading:p})}),(0,R.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,R.jsx)(RN,{items:u,loading:p}),(0,R.jsx)(qN,{rows:d,onCopy:e=>h.copyLink(e),createLink:e.links.createLink,loading:p})]}),(0,R.jsx)(ZN,{items:f,connectLink:e.links.integrations,loading:p}),(0,R.jsx)($N,{email:a,fullName:o,memberSince:e.memberSince,action:(0,R.jsx)(G,{variant:`destructive`,disabled:e.signingOutEverywhere,onClick:()=>e.onSignOutEverywhere(),children:e.signingOutEverywhere?t(`dashboard.session.signingOut`):t(`dashboard.session.signOutEverywhere`)}),actionHint:t(`dashboard.session.hint`)})]})}function nW(e){let t=e.period;return{period:wN(t)?t:void 0}}var rW=Ta({getParentRoute:()=>yN,path:`/dashboard`,validateSearch:nW,component:iW});function iW(){let e=rW.useSearch(),t=oa(),{data:n}=eC(),r=kO(),{signOutEverywhere:i,signingOutEverywhere:a}=gN(),o=e.period??`30d`;return(0,R.jsx)(tW,{period:o,onPeriodChange:e=>void t({to:`/dashboard`,search:e===`30d`?{}:{period:e}}),links:{integrations:(0,R.jsx)(G,{asChild:!0,size:`sm`,variant:`outline`,children:(0,R.jsx)(Sa,{to:`/integrations`,children:`Connect a calendar`})}),availability:(0,R.jsx)(G,{asChild:!0,size:`sm`,variant:`outline`,children:(0,R.jsx)(Sa,{to:`/booking/availability`,children:`Set working hours`})}),bookingSettings:(0,R.jsx)(G,{asChild:!0,size:`sm`,variant:`outline`,children:(0,R.jsx)(Sa,{to:`/booking/settings`,children:`Claim handle`})}),bookingLinks:(0,R.jsx)(G,{asChild:!0,size:`sm`,variant:`outline`,children:(0,R.jsx)(Sa,{to:`/booking/links`,children:`Open booking links`})}),createLink:(0,R.jsx)(G,{asChild:!0,size:`sm`,children:(0,R.jsx)(Sa,{to:`/booking/links/new`,children:`Create a booking link`})})},memberSince:n===void 0?void 0:GE(new Date(n.created_at),r.dateFormat),onSignOutEverywhere:i,signingOutEverywhere:a})}var aW=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(ef,{ref:n,className:W(`peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground`,e),...t,children:(0,R.jsx)(nf,{className:W(`flex items-center justify-center text-current`),children:(0,R.jsx)(Bw,{className:`h-4 w-4`})})}));aW.displayName=ef.displayName;function oW({name:e,label:t,checked:n,onCheckedChange:r,error:i,hint:a,disabled:o,"aria-required":s}){let c=(0,L.useId)(),l=`${c}-error`,u=`${c}-hint`,d=[a===void 0?void 0:u,i===void 0?void 0:l].filter(e=>e!==void 0).join(` `)||void 0;return(0,R.jsxs)(`div`,{"data-kit":`checkbox-field`,className:`flex flex-col gap-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(aW,{"data-kit":`checkbox-field-control`,id:c,name:e,checked:n,onCheckedChange:e=>r(e===!0),"aria-invalid":i!==void 0,"aria-describedby":d,"aria-required":s,disabled:o}),(0,R.jsx)(HC,{htmlFor:c,children:t})]}),a===void 0?null:(0,R.jsx)(`p`,{id:u,className:`text-muted-foreground text-xs`,children:a}),i===void 0?null:(0,R.jsx)(`p`,{id:l,className:`text-destructive text-sm`,children:i})]})}var sW=[`name`,`text`,`textarea`,`number`,`email`,`phone`,`url`,`select`,`multiselect`,`checkbox`,`radio`],cW=[`text`,`textarea`,`number`,`email`,`phone`,`select`,`multiselect`,`checkbox`,`radio`],lW=[`system`,`system-but-optional`,`system-but-hidden`,`user`,`user-readonly`],uW=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,dW=/^https?:\/\/[^\s/?#]+[^\s]*$/,fW=/^\+?[0-9][0-9 ().-]{4,19}$/,pW=PH({label:QV(),value:QV()}),mW=PH({name:QV(),type:QV(),label:QV(),placeholder:QV().optional(),helpText:QV().optional(),required:wH(),hidden:wH(),editable:QV(),options:MH(pW).optional(),minLength:bH().int().optional().nullable(),maxLength:bH().int().optional().nullable(),showWhen:MH(PH({field:QV(),op:QV(),value:EH()})).optional()}),hW=PH({version:bH().int(),fields:MH(mW)});function gW(e){return e===`select`||e===`multiselect`||e===`radio`}function _W(e){return e===`name`||e===`text`||e===`textarea`}var vW={name:`Your name`,email:`Email address`};function yW(e){if(!bW(e.editable))return null;let t=vW[e.name];
121return t!==void 0&&t===e.label?`publicBooking.fields.${e.name}`:null}function bW(e){return e===`system`||e===`system-but-optional`||e===`system-but-hidden`}function xW(){return{version:1,fields:[{type:`name`,name:`name`,label:vW.name,required:!0,hidden:!1,editable:`system`},{type:`email`,name:`email`,label:vW.email,required:!0,hidden:!1,editable:`system-but-optional`}]}}function SW(e){let t=[];e.version!==1&&t.push({path:`version`,code:`CONFIG_UNSUPPORTED_VERSION`}),e.fields.length<1&&t.push({path:``,code:`CONFIG_NO_FIELDS`}),e.fields.length>30&&t.push({path:``,code:`CONFIG_TOO_MANY_FIELDS`});let n=new Set;for(let r=0;r<e.fields.length;r++){let i=e.fields[r],a=`fields.${r}`;if(i.name===``?t.push({path:`${a}.name`,code:`CONFIG_INVALID_NAME`}):([...i.name].length>64?t.push({path:`${a}.name`,code:`CONFIG_INVALID_NAME`}):RegExp(`^[a-z0-9]+(-[a-z0-9]+)*$`).test(i.name)||t.push({path:`${a}.name`,code:`CONFIG_INVALID_NAME`}),n.has(i.name)&&t.push({path:`${a}.name`,code:`CONFIG_DUPLICATE_NAME`}),n.add(i.name)),sW.includes(i.type)||t.push({path:`${a}.type`,code:`CONFIG_UNKNOWN_TYPE`}),lW.includes(i.editable)||t.push({path:`${a}.editable`,code:`CONFIG_UNKNOWN_EDITABLE`}),i.editable===`system`&&(i.required||t.push({path:`${a}.required`,code:`CONFIG_SYSTEM_FIELD_NOT_REQUIRED`}),i.hidden&&t.push({path:`${a}.hidden`,code:`CONFIG_SYSTEM_FIELD_HIDDEN`})),i.editable===`system-but-hidden`&&(i.hidden||t.push({path:`${a}.hidden`,code:`CONFIG_SYSTEM_HIDDEN_NOT_HIDDEN`})),i.label===``?t.push({path:`${a}.label`,code:`CONFIG_LABEL_REQUIRED`}):[...i.label].length>200&&t.push({path:`${a}.label`,code:`CONFIG_LABEL_TOO_LONG`}),i.placeholder&&i.placeholder!==``&&[...i.placeholder].length>200&&t.push({path:`${a}.placeholder`,code:`CONFIG_PLACEHOLDER_TOO_LONG`}),i.helpText&&i.helpText!==``&&[...i.helpText].length>500&&t.push({path:`${a}.helpText`,code:`CONFIG_HELP_TEXT_TOO_LONG`}),gW(i.type)){let e=i.options??[];e.length<1&&t.push({path:`${a}.options`,code:`CONFIG_OPTIONS_MISSING`}),e.length>50&&t.push({path:`${a}.options`,code:`CONFIG_TOO_MANY_OPTIONS`});let n=new Set;for(let r=0;r<e.length;r++){let i=e[r],o=`${a}.options.${r}`;i.label===``?t.push({path:`${o}.label`,code:`CONFIG_OPTION_LABEL_REQUIRED`}):[...i.label].length>200&&t.push({path:`${o}.label`,code:`CONFIG_LABEL_TOO_LONG`}),i.value===``?t.push({path:`${o}.value`,code:`CONFIG_OPTION_VALUE_REQUIRED`}):[...i.value].length>100&&t.push({path:`${o}.value`,code:`CONFIG_LABEL_TOO_LONG`}),n.has(i.value)&&t.push({path:`${o}.value`,code:`CONFIG_DUPLICATE_OPTION_VALUE`}),n.add(i.value)}}else(i.options??[]).length>0&&t.push({path:`${a}.options`,code:`CONFIG_OPTIONS_NOT_ALLOWED`});_W(i.type)?i.minLength!==null&&i.minLength!==void 0&&i.maxLength!==null&&i.maxLength!==void 0?((i.minLength<0||i.minLength>5e3)&&t.push({path:`${a}.minLength`,code:`CONFIG_LENGTH_OUT_OF_RANGE`}),(i.maxLength<0||i.maxLength>5e3)&&t.push({path:`${a}.maxLength`,code:`CONFIG_LENGTH_OUT_OF_RANGE`}),i.minLength>i.maxLength&&t.push({path:`${a}.minLength`,code:`CONFIG_LENGTH_RANGE_INVALID`})):i.minLength!==null&&i.minLength!==void 0?(i.minLength<0||i.minLength>5e3)&&t.push({path:`${a}.minLength`,code:`CONFIG_LENGTH_OUT_OF_RANGE`}):i.maxLength!==null&&i.maxLength!==void 0&&(i.maxLength<0||i.maxLength>5e3)&&t.push({path:`${a}.maxLength`,code:`CONFIG_LENGTH_OUT_OF_RANGE`}):(i.minLength!==null&&i.minLength!==void 0&&t.push({path:`${a}.minLength`,code:`CONFIG_LENGTH_NOT_ALLOWED`}),i.maxLength!==null&&i.maxLength!==void 0&&t.push({path:`${a}.maxLength`,code:`CONFIG_LENGTH_NOT_ALLOWED`}))}return t}function CW(e,t){let n=[],r=new Map;for(let t of e.fields)r.set(t.name,t);for(let e of Object.keys(t))r.has(e)||n.push({path:e,code:`ANSWER_UNKNOWN_FIELD`});for(let r of e.fields){let e=t[r.name],i=r.name in t;if(r.required&&!r.hidden){let t=!1;if(i?typeof e==`string`?t=e===``:Array.isArray(e)?t=e.length===0:typeof e==`boolean`&&(t=!1):t=!0,t){n.push({path:r.name,code:`ANSWER_REQUIRED`});continue}}if(!(!i||e===``))switch(r.type){case`name`:case`text`:case`email`:case`phone`:case`url`:case`textarea`:if(typeof e!=`string`){n.push({path:r.name,code:`ANSWER_WRONG_TYPE`});break}wW(r,e,n);break;case`number`:TW(r,e,n);break;case`select`:case`radio`:if(typeof e!=`string`){n.push({path:r.name,code:`ANSWER_WRONG_TYPE`});break}EW(r,e,n);break;case`multiselect`:if(!Array.isArray(e)){n.push({path:r.name,code:`ANSWER_WRONG_TYPE`});break}DW(r,e,n);break;case`checkbox`:if(typeof e!=`boolean`){n.push({path:r.name,code:`ANSWER_WRONG_TYPE`});break}r.required&&!r.hidden&&!e&&n.push({path:r.name,code:`ANSWER_REQUIRED`})}}return n}function wW(e,t,n){let r=[...t].length;if(r>5e3){n.push({path:e.name,code:`ANSWER_TOO_LONG`});return}switch(e.minLength!==null&&e.minLength!==void 0&&r<e.minLength&&n.push({path:e.name,code:`ANSWER_TOO_SHORT`}),e.maxLength!==null&&e.maxLength!==void 0&&r>e.maxLength&&n.push({path:e.name,code:`ANSWER_TOO_LONG`}),e.type){case`email`:uW.test(t)||n.push({path:e.name,code:`ANSWER_INVALID_EMAIL`});break;case`phone`:fW.test(t)||n.push({path:e.name,code:`ANSWER_INVALID_PHONE`});break;case`url`:dW.test(t)||n.push({path:e.name,code:`ANSWER_INVALID_URL`})}}function TW(e,t,n){typeof t==`number`||(typeof t==`string`?n.push({path:e.name,code:`ANSWER_NOT_A_NUMBER`}):n.push({path:e.name,code:`ANSWER_WRONG_TYPE`}))}function EW(e,t,n){let r=e.options??[];for(let e of r)if(e.value===t)return;n.push({path:e.name,code:`ANSWER_UNKNOWN_OPTION`})}function DW(e,t,n){let r=e.options??[],i=new Set;for(let e of r)i.add(e.value);for(let r of t){if(typeof r!=`string`){n.push({path:e.name,code:`ANSWER_WRONG_TYPE`});return}i.has(r)||n.push({path:e.name,code:`ANSWER_UNKNOWN_OPTION`})}}function OW(e){let t=hW.safeParse(e);return t.success?{config:t.data,errors:[]}:{config:null,errors:[{path:``,code:`CONFIG_MALFORMED`}]}}function kW(e,t){let n={};
121for(let r of e.fields){let e=t[r.name];if(e!==void 0&&!(e===``||Array.isArray(e)&&e.length===0)){if(r.type===`number`&&typeof e==`string`){let t=e.trim(),i=t===``?NaN:Number(t);Number.isFinite(i)?n[r.name]=i:n[r.name]=e;continue}n[r.name]=e}}return n}var AW={CONFIG_MALFORMED:`The form configuration is malformed`,CONFIG_UNSUPPORTED_VERSION:`Unsupported form version`,CONFIG_NO_FIELDS:`The form must have at least one field`,CONFIG_TOO_MANY_FIELDS:`The form has too many fields`,CONFIG_INVALID_NAME:`Invalid field name`,CONFIG_DUPLICATE_NAME:`Duplicate field name`,CONFIG_UNKNOWN_TYPE:`Unknown field type`,CONFIG_UNKNOWN_EDITABLE:`Unknown editable value`,CONFIG_LABEL_REQUIRED:`Field label is required`,CONFIG_LABEL_TOO_LONG:`Field label is too long`,CONFIG_PLACEHOLDER_TOO_LONG:`Placeholder is too long`,CONFIG_HELP_TEXT_TOO_LONG:`Help text is too long`,CONFIG_OPTIONS_MISSING:`This field type requires options`,CONFIG_OPTIONS_NOT_ALLOWED:`This field type does not support options`,CONFIG_TOO_MANY_OPTIONS:`Too many options for this field`,CONFIG_OPTION_LABEL_REQUIRED:`Option label is required`,CONFIG_OPTION_VALUE_REQUIRED:`Option value is required`,CONFIG_DUPLICATE_OPTION_VALUE:`Duplicate option value`,CONFIG_LENGTH_NOT_ALLOWED:`This field type does not support length bounds`,CONFIG_LENGTH_OUT_OF_RANGE:`Length bound is out of range`,CONFIG_LENGTH_RANGE_INVALID:`Minimum length cannot exceed maximum length`,CONFIG_SYSTEM_FIELD_NOT_REQUIRED:`System fields must be required`,CONFIG_SYSTEM_FIELD_HIDDEN:`System fields cannot be hidden`,CONFIG_SYSTEM_HIDDEN_NOT_HIDDEN:`This field must be hidden`,ANSWER_REQUIRED:`This field is required`,ANSWER_WRONG_TYPE:`The answer has the wrong type`,ANSWER_NOT_A_NUMBER:`The answer must be a number`,ANSWER_INVALID_EMAIL:`The answer must be a valid email address`,ANSWER_INVALID_URL:`The answer must be a valid URL`,ANSWER_INVALID_PHONE:`The answer must be a valid phone number`,ANSWER_TOO_SHORT:`The answer is too short`,ANSWER_TOO_LONG:`The answer is too long`,ANSWER_UNKNOWN_OPTION:`The selected option is not valid`,ANSWER_UNKNOWN_FIELD:`Unknown field`};function jW(e){return AW[e]||`Unknown error`}function MW(e){return`bookingForm.${e}`}var NW=`fields.0.`;function PW(e){let t=SW({version:1,fields:[e]});return t.length===0?[]:t.map(e=>({...e,path:e.path.startsWith(NW)?e.path.slice(9):e.path}))}function FW(e,t){return{type:e,name:t,label:``,editable:`user`,required:!1,hidden:!1,...gW(e)&&{options:[]}}}function IW(e,t){if(!t.has(e))return e;let n=2;for(;;){let r=`${e}-${n}`;if(!t.has(r))return r;n++}}function LW(e,t){if(e.fields.length>=30)return e;let n=new Set(e.fields.map(e=>e.name)),r=IW(t.name||t.type,n),{showWhen:i,...a}=t,o={...a,editable:`user`,name:r};return a.options&&(o.options=a.options.map(e=>({...e}))),{...e,fields:[...e.fields,o]}}function RW(e){let{t}=K(),{fields:n,values:r,errors:i,onChange:a,disabled:o}=e;return(0,R.jsx)(`div`,{className:`flex flex-col gap-5`,"data-kit":`booking-fields`,children:n.map(e=>{if(e.hidden)return null;let n=e.type===`checkbox`?!1:e.type===`multiselect`?[]:``,s=r[e.name]??n,c=i?.[e.name],l=o||e.editable===`user-readonly`,u=yW(e),d=u===null?e.label:t(u);return(0,R.jsx)(`div`,{"data-kit":`booking-fields-row`,"data-field-name":e.name,children:BW(e,s,c,l,a,d,t(`publicBooking.fields.selectPlaceholder`))},e.name)})})}function zW(e){switch(e){case`name`:return`name`;case`email`:return`email`;case`phone`:return`tel`;default:return}}function BW(e,t,n,r,i,a,o){let s=e.type,c=e.required?!0:void 0;switch(s){case`name`:case`text`:return(0,R.jsx)(q,{name:e.name,type:`text`,label:a,hint:e.helpText,"aria-required":c,placeholder:e.placeholder,value:t,onChange:t=>i(e.name,t.target.value),error:n,disabled:r,maxLength:e.maxLength??void 0,autoComplete:zW(s)});case`email`:return(0,R.jsx)(q,{name:e.name,type:`email`,label:a,hint:e.helpText,"aria-required":c,placeholder:e.placeholder,value:t,onChange:t=>i(e.name,t.target.value),error:n,disabled:r,autoComplete:zW(s)});case`phone`:return(0,R.jsx)(q,{name:e.name,type:`tel`,label:a,hint:e.helpText,"aria-required":c,placeholder:e.placeholder,value:t,onChange:t=>i(e.name,t.target.value),error:n,disabled:r,autoComplete:zW(s)});case`url`:return(0,R.jsx)(q,{name:e.name,type:`url`,label:a,hint:e.helpText,"aria-required":c,placeholder:e.placeholder,value:t,onChange:t=>i(e.name,t.target.value),error:n,disabled:r});case`number`:return(0,R.jsx)(q,{name:e.name,type:`number`,label:a,hint:e.helpText,"aria-required":c,placeholder:e.placeholder,value:t,onChange:t=>i(e.name,t.target.value),error:n,disabled:r});case`textarea`:return(0,R.jsx)(CA,{name:e.name,label:a,hint:e.helpText,"aria-required":c,placeholder:e.placeholder,value:t,onChange:t=>i(e.name,t.target.value),error:n,disabled:r,maxLength:e.maxLength??void 0});case`select`:{let s=e.options??[],l=[{label:e.placeholder??o,value:``},...s];return(0,R.jsx)($O,{name:e.name,label:a,hint:e.helpText,"aria-required":c,value:t,onChange:t=>i(e.name,t.target.value),error:n,disabled:r,options:l})}case`multiselect`:{let o=e.options??[];return(0,R.jsx)($O,{name:e.name,label:a,hint:e.helpText,"aria-required":c,value:t,multiple:!0,onChange:t=>{let n=Array.from(t.target.selectedOptions,e=>e.value);i(e.name,n)},error:n,disabled:r,options:o.map(e=>({value:e.value,label:e.label}))})}case`radio`:{let o=(e.options??[]).map(e=>({value:e.value,label:e.label}));return(0,R.jsx)(Zj,{name:e.name,label:a,hint:e.helpText,"aria-required":c,options:o,value:t,onValueChange:t=>i(e.name,t),error:n,disabled:r})}case`checkbox`:return(0,R.jsx)(oW,{name:e.name,label:a,hint:e.helpText,"aria-required":c,checked:t,onCheckedChange:t=>i(e.name,t),error:n,disabled:r});default:return null}}var VW={confirmed:`booking.answers.status.confirmed`,pending:`booking.answers.status.pending`,cancelled:`booking.answers.status.cancelled`};function HW({linkTitle:e,status:t,fields:n,values:r}){let{t:i}=K(),a=VW[t],o=a?i(a):t;return(0,R.jsxs)(`div`,{"data-kit":`booking-answers`,children:[(0,R.jsx)(`div`,{"data-kit":`booking-answers-link`,className:`mb-4`,children:(0,R.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:e})}),(0,R.jsx)(`div`,{"data-kit":`booking-answers-status`,className:`mb-4`,children:(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:o})}),(0,R.jsx)(`div`,{"data-kit":`booking-answers-fields`,children:(0,R.jsx)(RW,{fields:n,values:r,disabled:!0,onChange:()=>{}})})]})}function UW({action:e}){return(0,R.jsxs)(`div`,{role:`status`,className:`flex flex-wrap items-center justify-between gap-3 border-b bg-muted/40 px-4 py-3`,children:[(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No calendars connected yet. Events you create here stay in CalendHub.`}),e]})}function WW(e,t,n=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(` `)}var GW={},KW={};function qW(e,t){try{let n=(GW[e]||=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).format)(t).split(`GMT`)[1];return n in KW?KW[n]:YW(n,n.split(`:`))}catch{if(e in KW)return KW[e];let t=e?.match(JW);return t?YW(e,t.slice(1)):NaN}}var JW=/([+-]\d\d):?(\d\d)?/;function YW(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return KW[e]=n*60+r>0?n*60+r+i:n*60-r-i}var XW=class e extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]==`string`&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(qW(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]==`
121number`&&(e.length===1||e.length===2&&typeof e[1]!=`number`)?this.setTime(e[0]):typeof e[0]==`string`?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),eG(this,e)):this.setTime(Date.now())}static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){let e=-qW(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),QW(this),+this}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},ZW=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ZW.test(e))return;let t=e.replace(ZW,`$1UTC`);XW.prototype[t]&&(e.startsWith(`get`)?XW.prototype[e]=function(){return this.internal[t]()}:(XW.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),$W(this),+this},XW.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),QW(this),+this}))});function QW(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-qW(e.timeZone,e)*60))}function $W(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),eG(e)}function eG(e,t){let n=Array.isArray(t)?tG(t):+e.internal,r=qW(e.timeZone,e),i=r>0?Math.floor(r):Math.ceil(r),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);let o=-new Date(+e).getTimezoneOffset(),s=-new Date(+a).getTimezoneOffset(),c=o-s,l=o;if(c&&o!==i&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=o-i;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=qW(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===i&&(l=s)}let u=l-i;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);let d=new Date(+e);d.setUTCSeconds(0);let f=o>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-(qW(e.timeZone,e)*60))%60;(p||f)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+f);let m=qW(e.timeZone,e),h=m>0?Math.floor(m):Math.ceil(m),g=-new Date(+e).getTimezoneOffset()-h,_=h!==i,v=g-u,y=h-i,b=n-h*60*1e3,x=y>0&&nG(e)-n===y*60*1e3&&nG(e,b)!==n;if(_&&v&&!x){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);let t=qW(e.timeZone,e),n=h-(t>0?Math.floor(t):Math.ceil(t));n&&v<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}QW(e);let S=(t?n:n+p*1e3)-+e.internal;S&&Math.abs(S)<18e5&&(Date.prototype.setTime.call(e,+e+S),QW(e))}function tG(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function nG(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-qW(e.timeZone,n)*60)),+n}var rG=class e extends XW{static tz(t,...n){return n.length?new e(...n,t):new e(Date.now(),t)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(` `);return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(` `)[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${WW(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset();return[e>0?`-`:`+`,String(Math.floor(Math.abs(e)/60)).padStart(2,`0`),String(Math.abs(e)%60).padStart(2,`0`)]}withTimeZone(t){return new e(+this,t)}[Symbol.for(`constructDateFrom`)](t){return new e(+new Date(t),this.timeZone)}},iG=365.2425,aG=6048e5,oG=864e5,sG=86400;sG*7,sG*iG/12*3;var cG=Symbol.for(`constructDateFrom`);function lG(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&cG in e?e[cG](t):e instanceof Date?new e.constructor(t):new Date(t)}function uG(e,t){return lG(t||e,e)}function dG(e,t,n){let r=uG(e,n?.in);return isNaN(t)?lG(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function fG(e,t,n){let r=uG(e,n?.in);if(isNaN(t))return lG(n?.in||e,NaN);if(!t)return r;let i=r.getDate(),a=lG(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),i>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}var pG={};function mG(){return pG}function hG(e,t){let n=mG(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=uG(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function gG(e,t){return hG(e,{...t,weekStartsOn:1}
vendor: 13,786 bytes, line 121
121)}function _G(e,t){let n=uG(e,t?.in),r=n.getFullYear(),i=lG(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=gG(i),o=lG(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=gG(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function vG(e){let t=uG(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function yG(e,...t){let n=lG.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function bG(e,t){let n=uG(e,t?.in);return n.setHours(0,0,0,0),n}function xG(e,t,n){let[r,i]=yG(n?.in,e,t),a=bG(r),o=bG(i),s=+a-vG(a),c=+o-vG(o);return Math.round((s-c)/oG)}function SG(e,t){let n=_G(e,t),r=lG(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),gG(r)}function CG(e,t,n){return dG(e,t*7,n)}function wG(e,t,n){return fG(e,t*12,n)}function TG(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=lG.bind(null,e));let t=uG(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),lG(r,n||NaN)}function EG(e,t){let n,r=t?.in;return e.forEach(e=>{!r&&typeof e==`object`&&(r=lG.bind(null,e));let t=uG(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),lG(r,n||NaN)}function DG(e,t,n){let[r,i]=yG(n?.in,e,t);return+bG(r)==+bG(i)}function OG(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function kG(e){return!(!OG(e)&&typeof e!=`number`||isNaN(+uG(e)))}function AG(e,t,n){let[r,i]=yG(n?.in,e,t),a=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return a*12+o}function jG(e,t){let n=uG(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function MG(e,t){let[n,r]=yG(e,t.start,t.end);return{start:n,end:r}}function NG(e,t){let{start:n,end:r}=MG(t?.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);let c=[];for(;+o<=a;)c.push(lG(n,o)),o.setMonth(o.getMonth()+s);return i?c.reverse():c}function PG(e,t){let n=uG(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function FG(e,t){let n=uG(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function IG(e,t){let n=uG(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function LG(e,t){let{start:n,end:r}=MG(t?.in,e),i=+n>+r,a=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0),o.setMonth(0,1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,i=!i);let c=[];for(;+o<=a;)c.push(lG(n,o)),o.setFullYear(o.getFullYear()+s);return i?c.reverse():c}function RG(e,t){let n=mG(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=uG(e,t?.in),a=i.getDay(),o=(a<r?-7:0)+6-(a-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}function zG(e,t){return RG(e,{...t,weekStartsOn:1})}var BG={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},VG=(e,t,n)=>{let r,i=BG[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function HG(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var UG={date:HG({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:HG({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:HG({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},WG={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},GG=(e,t,n,r)=>WG[e];function KG(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var qG={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:KG({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:KG({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:KG({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:KG({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:KG({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function JG(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?XG(s,e=>e.test(o)):YG(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function YG(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function XG(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ZG(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var QG={code:`en-US`,formatDistance:VG,formatLong:UG,formatRelative:GG,localize:qG,match:{ordinalNumber:ZG({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:JG({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:JG({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:JG({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:JG({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:JG({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function $G(e,t){let n=uG(e,t?.in);return xG(n,IG(n))+1}function eK(e,t){let n=uG(e,t?.in),r=gG(n)-+SG(n);return Math.round(r/aG)+1}function tK(e,t){let n=uG(e,t?.in),r=n.getFullYear(),i=mG(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=lG(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=hG(o,t),c=lG(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=hG(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function nK(e,t){let n=mG(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=tK(e,t),a=lG(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),hG(a,t)}function rK(e,t){let n=uG(e,t?.in),r=hG(n,t)-+nK(n,t);return Math.round(r/aG)+1}function iK(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var aK={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return iK(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):iK(n+1,2)},d(e,t){return iK(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return iK(e.getHours()%12||12,t.length)},H(e,t){return iK(e.getHours(),t.length)},m(e,t){return iK(e.getMinutes(),t.length)},s(e,t){return iK(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return iK(Math.trunc(r*10**(n-3)),t.length)}},oK={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},sK={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return aK.y(e,t)},Y:function(e,t,n,r){let i=tK(e,r),a=i>0?i:1-i;return t===`YY`?iK(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):iK(a,t.length)},R:function(e,t){return iK(_G(e),t.length)},u:function(e,t){return iK(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return iK(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return iK(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return aK.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return iK(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=rK(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):iK(i,t.length)},I:function(e,t,n){let r=eK(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):iK(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):aK.d(e,t)},D:function(e,t,n){let r=$G(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):iK(r,t.length)},E:function(e,t,n){let r=e.getDay();
vendor: 5,167 bytes, line 121
121switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return iK(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return iK(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return iK(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?oK.noon:r===0?oK.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?oK.evening:r>=12?oK.afternoon:r>=4?oK.morning:oK.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return aK.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):aK.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):iK(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):iK(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):aK.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):aK.s(e,t)},S:function(e,t){return aK.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return lK(r);case`XXXX`:case`XX`:return uK(r);default:return uK(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return lK(r);case`xxxx`:case`xx`:return uK(r);default:return uK(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+cK(r,`:`);default:return`GMT`+uK(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+cK(r,`:`);default:return`GMT`+uK(r,`:`)}},t:function(e,t,n){return iK(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return iK(+e,t.length)}};function cK(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+iK(a,2)}function lK(e,t){return e%60==0?(e>0?`-`:`+`)+iK(Math.abs(e)/60,2):uK(e,t)}function uK(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=iK(Math.trunc(r/60),2),a=iK(r%60,2);return n+i+t+a}var dK=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},fK=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},pK={p:fK,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return dK(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`})}return a.replace(`{{date}}`,dK(r,t)).replace(`{{time}}`,fK(i,t))}},mK=/^D+$/,hK=/^Y+$/,gK=[`D`,`DD`,`YY`,`YYYY`];function _K(e){return mK.test(e)}function vK(e){return hK.test(e)}
vendor: 36,925 bytes, line 121
121function yK(e,t,n){let r=bK(e,t,n);if(console.warn(r),gK.includes(e))throw RangeError(r)}function bK(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var xK=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,SK=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CK=/^'([^]*?)'?$/,wK=/''/g,TK=/[a-zA-Z]/;function EK(e,t,n){let r=mG(),i=n?.locale??r.locale??QG,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=uG(e,n?.in);if(!kG(s))throw RangeError(`Invalid time value`);let c=t.match(SK).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=pK[t];return n(e,i.formatLong)}return e}).join(``).match(xK).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:DK(e)};if(sK[t])return{isToken:!0,value:e};if(t.match(TK))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&vK(a)||!n?.useAdditionalDayOfYearTokens&&_K(a))&&yK(a,t,String(e));let o=sK[a[0]];return o(s,a,i.localize,l)}).join(``)}function DK(e){let t=e.match(CK);return t?t[1].replace(wK,`'`):e}function OK(e,t){let n=uG(e,t?.in),r=n.getFullYear(),i=n.getMonth(),a=lG(n,0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}function kK(e,t){return uG(e,t?.in).getMonth()}function AK(e,t){return uG(e,t?.in).getFullYear()}function jK(e,t){return+uG(e)>+uG(t)}function MK(e,t){return+uG(e)<+uG(t)}function NK(e,t,n){let[r,i]=yG(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function PK(e,t,n){let[r,i]=yG(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function FK(e,t,n){let r=uG(e,n?.in),i=r.getFullYear(),a=r.getDate(),o=lG(n?.in||e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);let s=OK(o);return r.setMonth(t,Math.min(a,s)),r}function IK(e,t,n){let r=uG(e,n?.in);return isNaN(+r)?lG(n?.in||e,NaN):(r.setFullYear(t),r)}var LK=5,RK=4;function zK(e,t){let n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,i=t.addDays(e,-r+1),a=t.addDays(i,34);return t.getMonth(e)===t.getMonth(a)?LK:RK}function BK(e,t){let n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function VK(e,t){let n=BK(e,t),r=zK(e,t);return t.addDays(n,r*7-1)}var HK={...QG,labels:{labelDayButton:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>EK(e,t,{locale:QG,...n});let a=i(e,`PPPP`);return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:`Choose the Month`,labelNext:`Go to the Next Month`,labelPrevious:`Go to the Previous Month`,labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:`Choose the Year`,labelGrid:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>EK(e,n,{locale:QG,...t}),r(e,`LLLL yyyy`)},labelGridcell:(e,t,n,r)=>{let i;i=r&&typeof r.format==`function`?r.format.bind(r):(e,t)=>EK(e,t,{locale:QG,...n});let a=i(e,`PPPP`);return t?.today&&(a=`Today, ${a}`),a},labelNav:`Navigation bar`,labelWeekNumberHeader:`Week Number`,labelWeekday:(e,t,n)=>{let r;return r=n&&typeof n.format==`function`?n.format.bind(n):(e,n)=>EK(e,n,{locale:QG,...t}),r(e,`cccc`)}}},UK=class e{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?rG.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new rG(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):dG(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):fG(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):CG(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):wG(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):xG(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):AG(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):NG(e),this.eachYearOfInterval=e=>{let t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):LG(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;let r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):VK(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):zG(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):jG(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):RG(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):FG(e),this.format=(e,t,n)=>{let r=this.overrides?.format?this.overrides.format(e,t,this.options):EK(e,t,this.options);return this.options.numerals&&this.options.numerals!==`latn`?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):eK(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):kK(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):AK(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):rK(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):jK(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):MK(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):OG(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):DG(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):NK(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):PK(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):TG(e),this.min=e=>this.overrides?.min?this.overrides.min(e):EG(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):FK(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):IK(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):BK(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):bG(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):gG(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):PG(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):hG(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):IG(e),this.options={locale:HK,...e},this.overrides=t}getDigitMap(){let{numerals:e=`latn`}=this.options,t=new Intl.NumberFormat(`en-US`,{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){let t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){let t=this.options.locale?.code;return t&&e.yearFirstLocales.has(t)?`year-first`:`month-first`}formatMonthYear(t){let{locale:n,timeZone:r,numerals:i}=this.options,a=n?.code;if(a&&e.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:`long`,year:`numeric`,timeZone:r,numberingSystem:i}).format(t)}catch{}let o=this.getMonthYearOrder()===`year-first`?`y LLLL`:`LLLL y`;return this.format(t,o)}};UK.yearFirstLocales=new Set([`eu`,`hu`,`ja`,`ja-Hira`,`ja-JP`,`ko`,`ko-KR`,`lt`,`lt-LT`,`lv`,`lv-LV`,`mn`,`mn-MN`,`zh`,`zh-CN`,`zh-HK`,`zh-TW`]);var WK=new UK,GK=class{constructor(e,t,n=WK){this.date=e,this.displayMonth=t,this.outside=!!(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,`yyyy-MM-dd`),this.displayMonthId=n.format(t,`yyyy-MM`),this.dateMonthId=n.format(e,`yyyy-MM`)}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}},KK=class{constructor(e,t){this.date=e,this.weeks=t}},qK=class{constructor(e,t){this.days=t,this.weekNumber=e}};function JK(e){return L.createElement(`button`,{...e})}function YK(e){return L.createElement(`span`,{...e})}function XK(e){let{size:t=24,orientation:n=`left`,className:r}=e;return L.createElement(`svg`,{className:r,width:t,height:t,viewBox:`0 0 24 24`},n===`up`&&L.createElement(`polygon`,{points:`6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28`}),n===`down`&&L.createElement(`polygon`,{points:`6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72`}),n===`left`&&L.createElement(`polygon`,{points:`16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20`}),n===`right`&&L.createElement(`polygon`,{points:`8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20`}))}function ZK(e){let{day:t,modifiers:n,...r}=e;return L.createElement(`td`,{...r})}function QK(e){let{day:t,modifiers:n,...r}=e,i=L.useRef(null);return L.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),L.createElement(`button`,{ref:i,...r})}var $K;(function(e){e.Root=`root`,e.Chevron=`chevron`,e.Day=`day`,e.DayButton=`day_button`,e.CaptionLabel=`caption_label`,e.Dropdowns=`dropdowns`,e.Dropdown=`dropdown`,e.DropdownRoot=`dropdown_root`,e.Footer=`footer`,e.MonthGrid=`month_grid`,e.MonthCaption=`month_caption`,e.MonthsDropdown=`months_dropdown`,e.Month=`month`,e.Months=`months`,e.Nav=`nav`,e.NextMonthButton=`button_next`,e.PreviousMonthButton=`button_previous`,e.Week=`week`,e.Weeks=`weeks`,e.Weekday=`weekday`,e.Weekdays=`weekdays`,e.WeekNumber=`week_number`,e.WeekNumberHeader=`week_number_header`,e.YearsDropdown=`years_dropdown`})($K||={});var eq;(function(e){e.disabled=`disabled`,e.hidden=`hidden`,e.outside=`outside`,e.focused=`focused`,e.today=`today`})(eq||={});var tq;(function(e){e.range_end=`range_end`,e.range_middle=`range_middle`,e.range_start=`range_start`,e.selected=`selected`})(tq||={});var nq;(function(e){e.weeks_before_enter=`weeks_before_enter`,e.weeks_before_exit=`weeks_before_exit`,e.weeks_after_enter=`weeks_after_enter`,e.weeks_after_exit=`weeks_after_exit`,e.caption_after_enter=`caption_after_enter`,e.caption_after_exit=`caption_after_exit`,e.caption_before_enter=`caption_before_enter`,e.caption_before_exit=`caption_before_exit`})(nq||={});function rq(e){let{options:t,className:n,components:r,classNames:i,...a}=e,o=[i[$K.Dropdown],n].join(` `),s=t?.find(({value:e})=>e===a.value);return L.createElement(`span`,{"data-disabled":a.disabled,className:i[$K.DropdownRoot]},L.createElement(r.Select,{className:o,...a},t?.map(({value:e,label:t,disabled:n})=>L.createElement(r.Option,{key:e,value:e,disabled:n},t))),L.createElement(`span`,{className:i[$K.CaptionLabel],"aria-hidden":!0},s?.label,L.createElement(r.Chevron,{orientation:`down`,size:18,className:i[$K.Chevron]})))}function iq(e){return L.createElement(`div`,{...e})}function aq(e){return L.createElement(`div`,{...e})}function oq(e){let{calendarMonth:t,displayIndex:n,...r}=e;return L.createElement(`div`,{...r},e.children)}function sq(e){let{calendarMonth:t,displayIndex:n,...r}=e;return L.createElement(`div`,{...r})}function cq(e){return L.createElement(`table`,{...e})}function lq(e){return L.createElement(`div`,{...e})}var uq=(0,L.createContext)(void 0);function dq(){let e=(0,L.useContext)(uq);if(e===void 0)throw Error(`useDayPicker() must be used within a custom component.`);return e}function fq(e){let{components:t}=dq();return L.createElement(t.Dropdown,{...e})}function pq(e){let{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...a}=e,{components:o,classNames:s,labels:{labelPrevious:c,labelNext:l}}=dq(),u=(0,L.useCallback)(e=>{i&&n?.(e)},[i,n]),d=(0,L.useCallback)(e=>{r&&t?.(e)},[r,t]);return L.createElement(`nav`,{...a},L.createElement(o.PreviousMonthButton,{type:`button`,className:s[$K.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":c(r),onClick:d},L.createElement(o.Chevron,{disabled:!r||void 0,className:s[$K.Chevron],orientation:`left`})),L.createElement(o.NextMonthButton,{type:`button`,className:s[$K.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":!i||void 0,"aria-label":l(i),onClick:u},L.createElement(o.Chevron,{disabled:!i||void 0,orientation:`right`,className:s[$K.Chevron]})))}function mq(e){let{components:t}=dq();return L.createElement(t.Button,{...e})}function hq(e){return L.createElement(`option`,{...e})}function gq(e){let{components:t}=dq();return L.createElement(t.Button,{...e})}function _q(e){let{rootRef:t,...n}=e;return L.createElement(`div`,{...n,ref:t})}function vq(e){return L.createElement(`select`,{...e})}function yq(e){let{week:t,...n}=e;return L.createElement(`tr`,{...n})}function bq(e){return L.createElement(`th`,{...e})}function xq(e){return L.createElement(`thead`,{"aria-hidden":!0},L.createElement(`tr`,{...e}))}function Sq(e){let{week:t,...n}=e;return L.createElement(`th`,{...n})}function Cq(e){return L.createElement(`th`,{...e})}function wq(e){return L.createElement(`tbody`,{...e})}function Tq(e){let{components:t}=dq();return L.createElement(t.Dropdown,{...e})}var Eq=s({Button:()=>JK,CaptionLabel:()=>YK,Chevron:()=>XK,Day:()=>ZK,DayButton:()=>QK,Dropdown:()=>rq,DropdownNav:()=>iq,Footer:()=>aq,Month:()=>oq,MonthCaption:()=>sq,MonthGrid:()=>cq,Months:()=>lq,MonthsDropdown:()=>fq,Nav:()=>pq,NextMonthButton:()=>mq,Option:()=>hq,PreviousMonthButton:()=>gq,Root:()=>_q,Select:()=>vq,Week:()=>yq,WeekNumber:()=>Sq,WeekNumberHeader:()=>Cq,Weekday:()=>bq,Weekdays:()=>xq,Weeks:()=>wq,YearsDropdown:()=>Tq});function Dq(e,t,n=!1,r=WK){let{from:i,to:a}=e,{differenceInCalendarDays:o,isSameDay:s}=r;return i&&a?(o(a,i)<0&&([i,a]=[a,i]),o(t,i)>=+!!n&&o(a,t)>=+!!n):!n&&a?s(a,t):!n&&i?s(i,t):!1}function Oq(e){return!!(e&&typeof e==`object`&&`before`in e&&`after`in e)}function kq(e){return!!(e&&typeof e==`object`&&`from`in e)}function Aq(e){return!!(e&&typeof e==`object`&&`after`in e)}function jq(e){return!!(e&&typeof e==`object`&&`before`in e)}function Mq(e){return!!(e&&typeof e==`object`&&`dayOfWeek`in e)}function Nq(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Pq(e,t,n=WK){let r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:a,isAfter:o}=n;return r.some(t=>{if(typeof t==`boolean`)return t;if(n.isDate(t))return i(e,t);if(Nq(t,n))return t.some(t=>i(e,t));if(kq(t))return Dq(t,e,!1,n);if(Mq(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(Oq(t)){let n=a(t.before,e),r=a(t.after,e),i=n>0,s=r<0;return o(t.before,t.after)?s&&i:i||s}return Aq(t)?a(e,t.after)>0:jq(t)?a(t.before,e)>0:typeof t==`function`&&t(e)})}function Fq(e,t,n,r,i){let{disabled:a,hidden:o,modifiers:s,showOutsideDays:c,broadcastCalendar:l,today:u=i.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:h,isAfter:g}=i,_=n&&p(n),v=r&&h(r),y={[eq.focused]:[],[eq.outside]:[],[eq.disabled]:[],[eq.hidden]:[],[eq.today]:[]},b={};for(let t of e){let{date:e,displayMonth:n}=t,r=!!(n&&!f(e,n)),p=!!(_&&m(e,_)),h=!!(v&&g(e,v)),x=!!(a&&Pq(e,a,i)),S=!!(o&&Pq(e,o,i))||p||h||!l&&!c&&r||l&&c===!1&&r,C=d(e,u);r&&y.outside.push(t),x&&y.disabled.push(t),S&&y.hidden.push(t),C&&y.today.push(t),s&&Object.keys(s).forEach(n=>{let r=s?.[n];r&&Pq(e,r,i)&&(b[n]?b[n].push(t):b[n]=[t])})}return e=>{let t={[eq.focused]:!1,[eq.disabled]:!1,[eq.hidden]:!1,[eq.outside]:!1,[eq.today]:!1},n={};for(let n in y)t[n]=y[n].some(t=>t===e);for(let t in b)n[t]=b[t].some(t=>t===e);return{...t,...n}}}function Iq(e,t,n={}){return Object.entries(e).filter(([,e])=>e===!0).reduce((e,[r])=>(n[r]?e.push(n[r]):t[eq[r]]?e.push(t[eq[r]]):t[tq[r]]&&e.push(t[tq[r]]),e),[t[$K.Day]])}function Lq(e){return{...Eq,...e}}function Rq(e){let t={"data-mode":e.mode??void 0,"data-required":`required`in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith(`data-`)&&(t[e]=n)}),t}function zq(){let e={};for(let t in $K)e[$K[t]]=`rdp-${$K[t]}`;for(let t in eq)e[eq[t]]=`rdp-${eq[t]}`;for(let t in tq)e[tq[t]]=`rdp-${tq[t]}`;for(let t in nq)e[nq[t]]=`rdp-${nq[t]}`;return e}function Bq(e,t,n){return(n??new UK(t)).formatMonthYear(e)}var Vq=Bq;function Hq(e,t,n){return(n??new UK(t)).format(e,`d`)}function Uq(e,t=WK){return t.format(e,`LLLL`)}function Wq(e,t,n){return(n??new UK(t)).format(e,`cccccc`)}function Gq(e,t=WK){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Kq(){return``}function qq(e,t=WK){return t.format(e,`yyyy`)}var Jq=qq,Yq=s({formatCaption:()=>Bq,formatDay:()=>Hq,formatMonthCaption:()=>Vq,formatMonthDropdown:()=>Uq,formatWeekNumber:()=>Gq,formatWeekNumberHeader:()=>Kq,formatWeekdayName:()=>Wq,formatYearCaption:()=>Jq,formatYearDropdown:()=>qq});function Xq(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Yq,...e}}function Zq(e,t,n,r){let i=(r??new UK(n)).format(e,`PPPP`);return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}var Qq=Zq;function $q(e,t,n){return(n??new UK(t)).formatMonthYear(e)}var eJ=$q;function tJ(e,t,n,r){let i=(r??new UK(n)).format(e,`PPPP`);return t?.today&&(i=`Today, ${i}`),i}function nJ(e){return`Choose the Month`}function rJ(){return``}var iJ=`Go to the Next Month`;function aJ(e,t){return iJ}function oJ(e){return`Go to the Previous Month`}function sJ(e,t,n){return(n??new UK(t)).format(e,`cccc`)}function cJ(e,t){return`Week ${e}`}function lJ(e){return`Week Number`}function uJ(e){return`Choose the Year`}var dJ=s({labelCaption:()=>eJ,labelDay:()=>Qq,labelDayButton:()=>Zq,labelGrid:()=>$q,labelGridcell:()=>tJ,labelMonthDropdown:()=>nJ,labelNav:()=>rJ,labelNext:()=>aJ,labelPrevious:()=>oJ,labelWeekNumber:()=>cJ,labelWeekNumberHeader:()=>lJ,labelWeekday:()=>sJ,labelYearDropdown:()=>uJ}),fJ=(e,t,n)=>t||(n?typeof n==`function`?n:(...e)=>n:e);function pJ(e,t){let n=t.locale?.labels??{};return{...dJ,...e??{},labelDayButton:fJ(Zq,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:fJ(nJ,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:fJ(aJ,e?.labelNext,n.labelNext),labelPrevious:fJ(oJ,e?.labelPrevious,n.labelPrevious),labelWeekNumber:fJ(cJ,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:fJ(uJ,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:fJ($q,e?.labelGrid,n.labelGrid),labelGridcell:fJ(tJ,e?.labelGridcell,n.labelGridcell),labelNav:fJ(rJ,e?.labelNav,n.labelNav),labelWeekNumberHeader:fJ(lJ,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:fJ(sJ,e?.labelWeekday,n.labelWeekday)}}function mJ(e,t,n,r,i){let{startOfMonth:a,startOfYear:o,endOfYear:s,eachMonthOfInterval:c,getMonth:l}=i;return c({start:o(e),end:s(e)}).map(e=>{let o=r.formatMonthDropdown(e,i);return{value:l(e),label:o,disabled:t&&e<a(t)||n&&e>a(n)||!1}})}function hJ(e,t={},n={}){let r={...t?.[$K.Day]};return Object.entries(e).filter(([,e])=>e===!0).forEach(([e])=>{r={...r,...n?.[e]}}),r}function gJ(e,t,n,r){let i=r??e.today(),a=n?e.startOfBroadcastWeek(i,e):t?e.startOfISOWeek(i):e.startOfWeek(i),o=[];for(let t=0;t<7;t++){let n=e.addDays(a,t);o.push(n)}return o}function _J(e,t,n,r,i=!1){if(!e||!t)return;let{startOfYear:a,endOfYear:o,eachYearOfInterval:s,getYear:c}=r,l=s({start:a(e),end:o(t)});return i&&l.reverse(),l.map(e=>{let t=n.formatYearDropdown(e,r);return{value:c(e),label:t,disabled:!1}})}function vJ(e,t={}){let{weekStartsOn:n,locale:r}=t,i=n??r?.options?.weekStartsOn??0,a=t=>{let n=typeof t==`number`||typeof t==`string`?new Date(t):t;return new rG(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},o=e=>{let t=a(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>a(rG.tz(e)),newDate:(t,n,r)=>new rG(t,n,r,12,0,0,e),startOfDay:e=>a(e),startOfWeek:(e,t)=>{let n=a(e),r=t?.weekStartsOn??i,o=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-o),n},startOfISOWeek:e=>{let t=a(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{let t=a(e);return t.setDate(1),t},startOfYear:e=>{let t=a(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{let n=a(e),r=(((t?.weekStartsOn??i)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{let t=a(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{let t=a(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{let t=a(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{let n=a(t.start),r=a(t.end),i=[],o=new rG(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=r.getFullYear()*12+r.getMonth();for(;o.getFullYear()*12+o.getMonth()<=s;)i.push(new rG(o,e)),o.setMonth(o.getMonth()+1,1);return i},addDays:(e,t)=>{let n=a(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{let n=a(e);return n.setDate(n.getDate()+t*7),n},addMonths:(e,t)=>{let n=a(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{let n=a(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{let n=a(t.start),r=a(t.end),i=[],o=new rG(n.getFullYear(),0,1,12,0,0,e);for(;o.getFullYear()<=r.getFullYear();)i.push(new rG(o,e)),o.setFullYear(o.getFullYear()+1,0,1);return i},getWeek:(e,t)=>rK(o(e),{weekStartsOn:t?.weekStartsOn??i,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>eK(o(e)),differenceInCalendarDays:(e,t)=>xG(o(e),o(t)),differenceInCalendarMonths:(e,t)=>AG(o(e),o(t))}}var yJ=e=>e instanceof HTMLElement?e:null,bJ=e=>[...e.querySelectorAll(`[data-animated-month]`)??[]],xJ=e=>yJ(e.querySelector(`[data-animated-month]`)),SJ=e=>yJ(e.querySelector(`[data-animated-caption]`)),CJ=e=>yJ(e.querySelector(`[data-animated-weeks]`)),wJ=e=>yJ(e.querySelector(`[data-animated-nav]`)),TJ=e=>yJ(e.querySelector(`[data-animated-weekdays]`));function EJ(e,t,{classNames:n,months:r,focused:i,dateLib:a}){let o=(0,L.useRef)(null),s=(0,L.useRef)(r),c=(0,L.useRef)(!1);(0,L.useLayoutEffect)(()=>{let l=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||l.length===0||r.length!==l.length)return;let u=a.isSameMonth(r[0].date,l[0].date),d=a.isAfter(r[0].date,l[0].date),f=d?n[nq.caption_after_enter]:n[nq.caption_before_enter],p=d?n[nq.weeks_after_enter]:n[nq.weeks_before_enter],m=o.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(bJ(h).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=xJ(e);t&&e.contains(t)&&e.removeChild(t);let n=SJ(e);n&&n.classList.remove(f);let r=CJ(e);r&&r.classList.remove(p)}),o.current=h):o.current=null,c.current||u||i)return;let g=m instanceof HTMLElement?bJ(m):[],_=bJ(e.current);if(_?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){c.current=!0;let t=[];e.current.style.isolation=`isolate`;let r=wJ(e.current);r&&(r.style.zIndex=`1`),_.forEach((i,a)=>{let o=g[a];if(!o)return;i.style.position=`relative`,i.style.overflow=`hidden`;let s=SJ(i);s&&s.classList.add(f);let l=CJ(i);l&&l.classList.add(p);let u=()=>{c.current=!1,e.current&&(e.current.style.isolation=``),r&&(r.style.zIndex=``),s&&s.classList.remove(f),l&&l.classList.remove(p),i.style.position=``,i.style.overflow=``,i.contains(o)&&i.removeChild(o)};t.push(u),o.style.pointerEvents=`none`,o.style.position=`absolute`,o.style.overflow=`hidden`,o.setAttribute(`aria-hidden`,`true`);let m=TJ(o);m&&(m.style.opacity=`0`);let h=SJ(o);h&&(h.classList.add(d?n[nq.caption_before_exit]:n[nq.caption_after_exit]),h.addEventListener(`animationend`,u));let _=CJ(o);_&&_.classList.add(d?n[nq.weeks_before_exit]:n[nq.weeks_after_exit]),i.insertBefore(o,i.firstChild)})}})}function DJ(e,t,n,r){let i=e[0],a=e[e.length-1],{ISOWeek:o,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:h,isAfter:g,startOfBroadcastWeek:_,startOfISOWeek:v,startOfWeek:y}=r,b=c?_(i,r):o?v(i):y(i),x=c?f(a):o?p(m(a)):h(m(a)),S=t&&(c?f(t):o?p(t):h(t)),C=u(S&&g(x,S)?S:x,b),w=d(a,i)+1,T=[];for(let e=0;e<=C;e++){let t=l(b,e);T.push(t)}let E=(c?35:42)*w;if(s&&T.length<E){let e=E-T.length;for(let t=0;t<e;t++){let e=l(T[T.length-1],1);T.push(e)}}return T}function OJ(e){let t=[];return e.reduce((e,n)=>{let r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}function kJ(e,t,n,r){let{numberOfMonths:i=1}=n,a=[];for(let n=0;n<i;n++){let i=r.addMonths(e,n);if(t&&i>t)break;a.push(i)}return a}function AJ(e,t,n,r){let{month:i,defaultMonth:a,today:o=r.today(),numberOfMonths:s=1}=e,c=i||a||o,{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=r;return n&&l(n,c)<s-1&&(c=u(n,-1*(s-1))),t&&l(c,t)<0&&(c=t),d(c)}function jJ(e,t,n,r){let{addDays:i,endOfBroadcastWeek:a,endOfISOWeek:o,endOfMonth:s,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((e,m)=>{let h=n.broadcastCalendar?d(m,r):n.ISOWeek?f(m):p(m),g=n.broadcastCalendar?a(m):n.ISOWeek?o(s(m)):c(s(m)),_=t.filter(e=>e>=h&&e<=g),v=n.broadcastCalendar?35:42;if(n.fixedWeeks&&_.length<v){let e=t.filter(e=>{let t=v-_.length;return e>g&&e<=i(g,t)});_.push(...e)}let y=new KK(m,_.reduce((e,t)=>{let i=n.ISOWeek?l(t):u(t),a=e.find(e=>e.weekNumber===i),o=new GK(t,m,r);return a?a.days.push(o):e.push(new qK(i,[o])),e},[]));return e.push(y),e},[]);return n.reverseMonths?m.reverse():m}function MJ(e,t){let{startMonth:n,endMonth:r}=e,{startOfYear:i,startOfDay:a,startOfMonth:o,endOfMonth:s,addYears:c,endOfYear:l,newDate:u,today:d}=t,{fromYear:f,toYear:p,fromMonth:m,toMonth:h}=e;!n&&m&&(n=m),!n&&f&&(n=t.newDate(f,0,1)),!r&&h&&(r=h),!r&&p&&(r=u(p,11,31));let g=e.captionLayout===`dropdown`||e.captionLayout===`dropdown-years`;return n?n=o(n):f?n=u(f,0,1):!n&&g&&(n=i(c(e.today??d(),-100))),r?r=s(r):p?r=u(p,11,31):!r&&g&&(r=l(e.today??d())),[n&&a(n),r&&a(r)]}function NJ(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a=1}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:c}=r,l=i?a:1,u=o(e);if(!t||!(c(t,e)<a))return s(u,l)}function PJ(e,t,n,r){if(n.disableNavigation)return;let{pagedNavigation:i,numberOfMonths:a}=n,{startOfMonth:o,addMonths:s,differenceInCalendarMonths:c}=r,l=i?a??1:1,u=o(e);if(!t||!(c(u,t)<=0))return s(u,-l)}function FJ(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}function IJ(e,t){let[n,r]=(0,L.useState)(e);return[t===void 0?n:t,r]}function LJ(e,t){let[n,r]=MJ(e,t),{startOfMonth:i,endOfMonth:a}=t,o=AJ(e,n,r,t),[s,c]=IJ(o,e.month?o:void 0);(0,L.useEffect)(()=>{let i=AJ(e,n,r,t);c(i)},[e.timeZone]);let{months:l,weeks:u,days:d,previousMonth:f,nextMonth:p}=(0,L.useMemo)(()=>{let i=kJ(s,r,{numberOfMonths:e.numberOfMonths},t),o=jJ(i,DJ(i,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t);return{months:o,weeks:FJ(o),days:OJ(o),previousMonth:PJ(s,n,e,t),nextMonth:NJ(s,r,e,t)}},[t,s.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:h}=e,g=e=>u.some(t=>t.days.some(t=>t.isEqualTo(e))),_=e=>{if(m)return;let t=i(e);n&&t<i(n)&&(t=i(n)),r&&t>i(r)&&(t=i(r)),c(t),h?.(t)};return{months:l,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:p,goToMonth:_,goToDay:e=>{g(e)||_(e.date)}}}var RJ;(function(e){e[e.Today=0]=`Today`,e[e.Selected=1]=`Selected`,e[e.LastFocused=2]=`LastFocused`,e[e.FocusedModifier=3]=`FocusedModifier`})(RJ||={});function zJ(e){return!e[eq.disabled]&&!e[eq.hidden]&&!e[eq.outside]}function BJ(e,t,n,r){let i,a=-1;for(let o of e){let e=t(o);zJ(e)&&(e[eq.focused]&&a<RJ.FocusedModifier?(i=o,a=RJ.FocusedModifier):r?.isEqualTo(o)&&a<RJ.LastFocused?(i=o,a=RJ.LastFocused):n(o.date)&&a<RJ.Selected?(i=o,a=RJ.Selected):e[eq.today]&&a<RJ.Today&&(i=o,a=RJ.Today))}return i||=e.find(e=>zJ(t(e))),i}function VJ(e,t,n,r,i,a,o){let{ISOWeek:s,broadcastCalendar:c}=a,{addDays:l,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:h,max:g,min:_,startOfBroadcastWeek:v,startOfISOWeek:y,startOfWeek:b}=o,x={day:l,week:d,month:u,year:f,startOfWeek:e=>c?v(e,o):s?y(e):b(e),endOfWeek:e=>c?p(e):s?m(e):h(e)}[e](n,t===`after`?1:-1);return t===`before`&&r?x=g([r,x]):t===`after`&&i&&(x=_([i,x])),x}function HJ(e,t,n,r,i,a,o,s=0){if(s>365)return;let c=VJ(e,t,n.date,r,i,a,o),l=!!(a.disabled&&Pq(c,a.disabled,o)),u=!!(a.hidden&&Pq(c,a.hidden,o)),d=new GK(c,c,o);return!l&&!u?d:HJ(e,t,d,r,i,a,o,s+1)}function UJ(e,t,n,r,i){let{autoFocus:a}=e,[o,s]=(0,L.useState)(),c=BJ(t.days,n,r||(()=>!1),o),[l,u]=(0,L.useState)(a?c:void 0);return{isFocusTarget:e=>!!c?.isEqualTo(e),setFocused:u,focused:l,blur:()=>{s(l),u(void 0)},moveFocus:(n,r)=>{if(!l)return;let a=HJ(n,r,l,t.navStart,t.navEnd,e,i);a&&(e.disableNavigation&&!t.days.some(e=>e.isEqualTo(a))||(t.goToDay(a),u(a)))}}}function WJ(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=IJ(n,i?n:void 0),s=i?n:a,{isSameDay:c}=t,l=e=>s?.some(t=>c(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(l(e)){if(s?.length===u||r&&s?.length===1)return;a=s?.filter(t=>!c(t,e))}else a=s?.length===d?[e]:[...a,e];return i||o(a),i?.(a,e,t,n),a},isSelected:l}}function GJ(e,t,n=0,r=0,i=!1,a=WK){let{from:o,to:s}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=a,d;if(!o&&!s)d={from:e,to:n>0?void 0:e};else if(o&&!s)d=c(o,e)?n===0?{from:o,to:e}:i?{from:o,to:void 0}:void 0:u(e,o)?{from:e,to:o}:{from:o,to:e};else if(o&&s){if(c(o,e)&&c(s,e))d=i?{from:o,to:s}:void 0;else if(c(o,e))d={from:o,to:n>0?void 0:e};else if(c(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,o))d={from:e,to:s};else if(l(e,o))d={from:o,to:e};else if(l(e,s))d={from:o,to:e};else throw Error(`Invalid range`)}if(d?.from&&d?.to){let t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}function KJ(e,t,n=WK){let r=Array.isArray(t)?t:[t],i=e.from,a=n.differenceInCalendarDays(e.to,e.from),o=Math.min(a,6);for(let e=0;e<=o;e++){if(r.includes(i.getDay()))return!0;i=n.addDays(i,1)}return!1}function qJ(e,t,n=WK){return Dq(e,t.from,!1,n)||Dq(e,t.to,!1,n)||Dq(t,e.from,!1,n)||Dq(t,e.to,!1,n)}function JJ(e,t,n=WK){let r=Array.isArray(t)?t:[t];if(r.filter(e=>typeof e!=`function`).some(t=>typeof t==`boolean`?t:n.isDate(t)?Dq(e,t,!1,n):Nq(t,n)?t.some(t=>Dq(e,t,!1,n)):kq(t)?t.from&&t.to?qJ(e,{from:t.from,to:t.to},n):!1:Mq(t)?KJ(e,t.dayOfWeek,n):Oq(t)?n.isAfter(t.before,t.after)?qJ(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):Pq(e.from,t,n)||Pq(e.to,t,n):Aq(t)||jq(t)?Pq(e.from,t,n)||Pq(e.to,t,n):!1))return!0;let i=r.filter(e=>typeof e==`function`);if(i.length){let t=e.from,r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}function YJ(e,t){let{disabled:n,excludeDisabled:r,resetOnSelect:i,selected:a,required:o,onSelect:s}=e,[c,l]=IJ(a,s?a:void 0),u=s?a:c;return{selected:u,select:(a,c,d)=>{let{min:f,max:p}=e,m;if(a){let e=u?.from,n=u?.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(a,e);m=i&&(r||!u?.from)?!o&&s?void 0:{from:a,to:void 0}:GJ(a,u,f,p,o,t)}return r&&n&&m?.from&&m.to&&JJ({from:m.from,to:m.to},n,t)&&(m.from=a,m.to=void 0),s||l(m),s?.(m,a,c,d),m},isSelected:e=>u&&Dq(u,e,!1,t)}}function XJ(e,t){let{selected:n,required:r,onSelect:i}=e,[a,o]=IJ(n,i?n:void 0),s=i?n:a,{isSameDay:c}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!r&&s&&s&&c(e,s)&&(a=void 0),i||o(a),i?.(a,e,t,n),a},isSelected:e=>s?c(s,e):!1}}function ZJ(e,t){let n=XJ(e,t),r=WJ(e,t),i=YJ(e,t);switch(e.mode){case`single`:return n;case`multiple`:return r;case`range`:return i;default:return}}function QJ(e,t){return e instanceof rG&&e.timeZone===t?e:new rG(e,t)}function $J(e,t,n){if(!n)return QJ(e,t);let r=QJ(e,t),i=new rG(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(i.getTime())}function eY(e,t,n){return typeof e==`boolean`||typeof e==`function`?e:e instanceof Date?$J(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?$J(e,t,n):e):kq(e)?{...e,from:e.from?QJ(e.from,t):e.from,to:e.to?QJ(e.to,t):e.to}:Oq(e)?{before:$J(e.before,t,n),after:$J(e.after,t,n)}:Aq(e)?{after:$J(e.after,t,n)}:jq(e)?{before:$J(e.before,t,n)}:e}function tY(e,t,n){return e&&(Array.isArray(e)?e.map(e=>eY(e,t,n)):eY(e,t,n))}function nY(e){let t=e,n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=QJ(t.today,n)),t.month&&(t.month=QJ(t.month,n)),t.defaultMonth&&(t.defaultMonth=QJ(t.defaultMonth,n)),t.startMonth&&(t.startMonth=QJ(t.startMonth,n)),t.endMonth&&(t.endMonth=QJ(t.endMonth,n)),t.mode===`single`&&t.selected?t.selected=QJ(t.selected,n):t.mode===`multiple`&&t.selected?t.selected=t.selected?.map(e=>QJ(e,n)):t.mode===`range`&&t.selected&&(t.selected={from:t.selected.from?QJ(t.selected.from,n):t.selected.from,to:t.selected.to?QJ(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=tY(t.disabled,n)),t.hidden!==void 0&&(t.hidden=tY(t.hidden,n)),t.modifiers)){let e={};Object.keys(t.modifiers).forEach(r=>{e[r]=tY(t.modifiers?.[r],n)}),t.modifiers=e}let{components:r,formatters:i,labels:a,dateLib:o,locale:s,classNames:c}=(0,L.useMemo)(()=>{let e={...HK,...t.locale},n=t.broadcastCalendar?1:t.weekStartsOn,r=t.noonSafe&&t.timeZone?vJ(t.timeZone,{weekStartsOn:n,locale:e}):void 0,i=t.dateLib&&r?{...r,...t.dateLib}:t.dateLib??r,a=new UK({locale:e,weekStartsOn:n,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},i);return{dateLib:a,components:Lq(t.components),formatters:Xq(t.formatters),labels:pJ(t.labels,a.options),locale:e,classNames:{...zq(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:o.today()});let{captionLayout:l,mode:u,navLayout:d,numberOfMonths:f=1,onDayBlur:p,onDayClick:m,onDayFocus:h,onDayKeyDown:g,onDayMouseEnter:_,onDayMouseLeave:v,onNextClick:y,onPrevClick:b,showWeekNumber:x,styles:S}=t,{formatCaption:C,formatDay:w,formatMonthDropdown:T,formatWeekNumber:E,formatWeekNumberHeader:D,formatWeekdayName:O,formatYearDropdown:k}=i,ee=LJ(t,o),{days:A,months:j,navStart:te,navEnd:ne,previousMonth:re,nextMonth:M,goToMonth:N}=ee,ie=Fq(A,t,te,ne,o),{isSelected:ae,select:oe,selected:P}=ZJ(t,o)??{},{blur:F,focused:I,isFocusTarget:se,moveFocus:ce,setFocused:le}=UJ(t,ee,ie,ae??(()=>!1),o),{labelDayButton:ue,labelGridcell:de,labelGrid:fe,labelMonthDropdown:pe,labelNav:me,labelPrevious:he,labelNext:ge,labelWeekday:_e,labelWeekNumber:ve,labelWeekNumberHeader:ye,labelYearDropdown:be}=a,xe=(0,L.useMemo)(()=>gJ(o,t.ISOWeek,t.broadcastCalendar,t.today),[o,t.ISOWeek,t.broadcastCalendar,t.today]),Se=u!==void 0||m!==void 0,Ce=(0,L.useCallback)(()=>{re&&(N(re),b?.(re))},[re,N,b]),we=(0,L.useCallback)(()=>{M&&(N(M),y?.(M))},[N,M,y]),Te=(0,L.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),le(e),!t.disabled&&(oe?.(e.date,t,n),m?.(e.date,t,n))},[oe,m,le]),Ee=(0,L.useCallback)((e,t)=>n=>{le(e),h?.(e.date,t,n)},[h,le]),De=(0,L.useCallback)((e,t)=>n=>{F(),p?.(e.date,t,n)},[F,p]),Oe=(0,L.useCallback)((e,n)=>r=>{let i={ArrowLeft:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`after`:`before`],ArrowRight:[r.shiftKey?`month`:`day`,t.dir===`rtl`?`before`:`after`],ArrowDown:[r.shiftKey?`year`:`week`,`after`],ArrowUp:[r.shiftKey?`year`:`week`,`before`],PageUp:[r.shiftKey?`year`:`month`,`before`],PageDown:[r.shiftKey?`year`:`month`,`after`],Home:[`startOfWeek`,`before`],End:[`endOfWeek`,`after`]};if(i[r.key]){r.preventDefault(),r.stopPropagation();let[e,t]=i[r.key];ce(e,t)}g?.(e.date,n,r)},[ce,g,t.dir]),ke=(0,L.useCallback)((e,t)=>n=>{_?.(e.date,t,n)},[_]),Ae=(0,L.useCallback)((e,t)=>n=>{v?.(e.date,t,n)},[v]),je=(0,L.useCallback)(e=>t=>{let n=Number(t.target.value),r=o.setMonth(o.startOfMonth(e),n);N(r)},[o,N]),Me=(0,L.useCallback)(e=>t=>{let n=Number(t.target.value),r=o.setYear(o.startOfMonth(e),n);N(r)},[o,N]),{className:Ne,style:Pe}=(0,L.useMemo)(()=>
vendor: 6,437 bytes, line 121
121({className:[c[$K.Root],t.className].filter(Boolean).join(` `),style:{...S?.[$K.Root],...t.style}}),[c,t.className,t.style,S]),Fe=Rq(t),Ie=(0,L.useRef)(null);EJ(Ie,!!t.animate,{classNames:c,months:j,focused:I,dateLib:o});let Le={dayPickerProps:t,selected:P,select:oe,isSelected:ae,months:j,nextMonth:M,previousMonth:re,goToMonth:N,getModifiers:ie,components:r,classNames:c,styles:S,labels:a,formatters:i};return L.createElement(uq.Provider,{value:Le},L.createElement(r.Root,{rootRef:t.animate?Ie:void 0,className:Ne,style:Pe,dir:t.dir,id:t.id,lang:t.lang??s.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t[`aria-label`],"aria-labelledby":t[`aria-labelledby`],...Fe},L.createElement(r.Months,{className:c[$K.Months],style:S?.[$K.Months]},!t.hideNavigation&&!d&&L.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[$K.Nav],style:S?.[$K.Nav],"aria-label":me(),onPreviousClick:Ce,onNextClick:we,previousMonth:re,nextMonth:M}),j.map((e,n)=>L.createElement(r.Month,{"data-animated-month":t.animate?`true`:void 0,className:c[$K.Month],style:S?.[$K.Month],key:n,displayIndex:n,calendarMonth:e},d===`around`&&!t.hideNavigation&&n===0&&L.createElement(r.PreviousMonthButton,{type:`button`,className:c[$K.PreviousMonthButton],tabIndex:re?void 0:-1,"aria-disabled":!re||void 0,"aria-label":he(re),onClick:Ce,"data-animated-button":t.animate?`true`:void 0},L.createElement(r.Chevron,{disabled:!re||void 0,className:c[$K.Chevron],orientation:t.dir===`rtl`?`right`:`left`})),L.createElement(r.MonthCaption,{"data-animated-caption":t.animate?`true`:void 0,className:c[$K.MonthCaption],style:S?.[$K.MonthCaption],calendarMonth:e,displayIndex:n},l?.startsWith(`dropdown`)?L.createElement(r.DropdownNav,{className:c[$K.Dropdowns],style:S?.[$K.Dropdowns]},(()=>{let n=l===`dropdown`||l===`dropdown-months`?L.createElement(r.MonthsDropdown,{key:`month`,className:c[$K.MonthsDropdown],"aria-label":pe(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:je(e.date),options:mJ(e.date,te,ne,i,o),style:S?.[$K.Dropdown],value:o.getMonth(e.date)}):L.createElement(`span`,{key:`month`},T(e.date,o)),a=l===`dropdown`||l===`dropdown-years`?L.createElement(r.YearsDropdown,{key:`year`,className:c[$K.YearsDropdown],"aria-label":be(o.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Me(e.date),options:_J(te,ne,i,o,!!t.reverseYears),style:S?.[$K.Dropdown],value:o.getYear(e.date)}):L.createElement(`span`,{key:`year`},k(e.date,o));return o.getMonthYearOrder()===`year-first`?[a,n]:[n,a]})(),L.createElement(`span`,{role:`status`,"aria-live":`polite`,style:{border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}},C(e.date,o.options,o))):L.createElement(r.CaptionLabel,{className:c[$K.CaptionLabel],role:`status`,"aria-live":`polite`},C(e.date,o.options,o))),d===`around`&&!t.hideNavigation&&n===f-1&&L.createElement(r.NextMonthButton,{type:`button`,className:c[$K.NextMonthButton],tabIndex:M?void 0:-1,"aria-disabled":!M||void 0,"aria-label":ge(M),onClick:we,"data-animated-button":t.animate?`true`:void 0},L.createElement(r.Chevron,{disabled:!M||void 0,className:c[$K.Chevron],orientation:t.dir===`rtl`?`left`:`right`})),n===f-1&&d===`after`&&!t.hideNavigation&&L.createElement(r.Nav,{"data-animated-nav":t.animate?`true`:void 0,className:c[$K.Nav],style:S?.[$K.Nav],"aria-label":me(),onPreviousClick:Ce,onNextClick:we,previousMonth:re,nextMonth:M}),L.createElement(r.MonthGrid,{role:`grid`,"aria-multiselectable":u===`multiple`||u===`range`,"aria-label":fe(e.date,o.options,o)||void 0,className:c[$K.MonthGrid],style:S?.[$K.MonthGrid]},!t.hideWeekdays&&L.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?`true`:void 0,className:c[$K.Weekdays],style:S?.[$K.Weekdays]},x&&L.createElement(r.WeekNumberHeader,{"aria-label":ye(o.options),className:c[$K.WeekNumberHeader],style:S?.[$K.WeekNumberHeader],scope:`col`},D()),xe.map(e=>L.createElement(r.Weekday,{"aria-label":_e(e,o.options,o),className:c[$K.Weekday],key:String(e),style:S?.[$K.Weekday],scope:`col`},O(e,o.options,o)))),L.createElement(r.Weeks,{"data-animated-weeks":t.animate?`true`:void 0,className:c[$K.Weeks],style:S?.[$K.Weeks]},e.weeks.map(e=>L.createElement(r.Week,{className:c[$K.Week],key:e.weekNumber,style:S?.[$K.Week],week:e},x&&L.createElement(r.WeekNumber,{week:e,style:S?.[$K.WeekNumber],"aria-label":ve(e.weekNumber,{locale:s}),className:c[$K.WeekNumber],scope:`row`,role:`rowheader`},E(e.weekNumber,o)),e.days.map(e=>{let{date:n}=e,i=ie(e);if(i[eq.focused]=!i.hidden&&!!I?.isEqualTo(e),i[tq.selected]=ae?.(n)||i.selected,kq(P)){let{from:e,to:t}=P;i[tq.range_start]=!!(e&&t&&o.isSameDay(n,e)),i[tq.range_end]=!!(e&&t&&o.isSameDay(n,t)),i[tq.range_middle]=Dq(P,n,!0,o)}let a=hJ(i,S,t.modifiersStyles),s=Iq(i,c,t.modifiersClassNames),l=!Se&&!i.hidden?de(n,i,o.options,o):void 0;return L.createElement(r.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:i,className:s.join(` `),style:a,role:`gridcell`,"aria-selected":i.selected||void 0,"aria-label":l,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":i.selected||void 0,"data-disabled":i.disabled||void 0,"data-hidden":i.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":i.focused||void 0,"data-today":i.today||void 0},!i.hidden&&Se?L.createElement(r.DayButton,{className:c[$K.DayButton],style:S?.[$K.DayButton],type:`button`,day:e,modifiers:i,disabled:!i.focused&&i.disabled||void 0,"aria-disabled":i.focused&&i.disabled||void 0,tabIndex:se(e)?0:-1,"aria-label":ue(n,i,o.options,o),onClick:Te(e,i),onBlur:De(e,i),onFocus:Ee(e,i),onKeyDown:Oe(e,i),onMouseEnter:ke(e,i),onMouseLeave:Ae(e,i)},w(n,o.options,o)):!i.hidden&&w(e.date,o.options,o))})))))))),t.footer&&L.createElement(r.Footer,{className:c[$K.Footer],style:S?.[$K.Footer],role:`status`,"aria-live":`polite`},t.footer)))}function rY({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r=`label`,buttonVariant:i=`ghost`,formatters:a,components:o,...s}){let c=zq();return(0,R.jsx)(nY,{showOutsideDays:n,className:W(`group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent`,String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:e=>
121e.toLocaleString(`default`,{month:`short`}),...a},classNames:{root:W(`w-fit`,c.root),months:W(`relative flex flex-col gap-4 md:flex-row`,c.months),month:W(`flex w-full flex-col gap-4`,c.month),nav:W(`absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1`,c.nav),button_previous:W(Rb({variant:i}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,c.button_previous),button_next:W(Rb({variant:i}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,c.button_next),month_caption:W(`flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)`,c.month_caption),dropdowns:W(`flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium`,c.dropdowns),dropdown_root:W(`relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50`,c.dropdown_root),dropdown:W(`absolute inset-0 bg-popover opacity-0`,c.dropdown),caption_label:W(`font-medium select-none`,r===`label`?`text-sm`:`flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground`,c.caption_label),month_grid:W(`w-full border-collapse`,c.month_grid),weekdays:W(`flex`,c.weekdays),weekday:W(`flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none`,c.weekday),week:W(`mt-2 flex w-full`,c.week),week_number_header:W(`w-(--cell-size) select-none`,c.week_number_header),week_number:W(`text-[0.8rem] text-muted-foreground select-none`,c.week_number),day:W(`group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md`,s.showWeekNumber?`[&:nth-child(2)[data-selected=true]_button]:rounded-l-md`:`[&:first-child[data-selected=true]_button]:rounded-l-md`,c.day),range_start:W(`rounded-l-md bg-accent`,c.range_start),range_middle:W(`rounded-none`,c.range_middle),range_end:W(`rounded-r-md bg-accent`,c.range_end),today:W(`rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none`,c.today),outside:W(`text-muted-foreground aria-selected:text-muted-foreground`,c.outside),disabled:W(`text-muted-foreground opacity-50`,c.disabled),hidden:W(`invisible`,c.hidden),...t},components:{Root:({className:e,rootRef:t,...n})=>(0,R.jsx)(`div`,{"data-slot":`calendar`,ref:t,className:W(e),...n}),Chevron:({className:e,orientation:t,...n})=>t===`left`?(0,R.jsx)(Hw,{className:W(`size-4`,e),...n}):t===`right`?(0,R.jsx)(Uw,{className:W(`size-4`,e),...n}):(0,R.jsx)(Vw,{className:W(`size-4`,e),...n}),DayButton:iY,WeekNumber:({children:e,...t})=>(0,R.jsx)(`td`,{...t,children:(0,R.jsx)(`div`,{className:`flex size-(--cell-size) items-center justify-center text-center`,children:e})}),...o},...s})}function iY({className:e,day:t,modifiers:n,...r}){let i=zq(),a=L.useRef(null);return L.useEffect(()=>{n.focused&&a.current?.focus()},[n.focused]),(0,R.jsx)(G,{ref:a,variant:`ghost`,size:`icon`,"data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:W(`flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70`,i.day,e),...r})}function aY({...e}){return(0,R.jsx)(Rc,{"data-slot":`collapsible`,...e})}function oY({...e}){return(0,R.jsx)(Nc,{"data-slot":`collapsible-trigger`,...e})}function sY({...e}){return(0,R.jsx)(Fc,{"data-slot":`collapsible-content`,...e})}function cY(e){let{t}=K(),n=jD(e.focusedDate),r=e.weekStartsOn??1;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(`div`,{className:`flex justify-center`,children:(0,R.jsx)(rY,{mode:`single`,weekStartsOn:r,selected:n,defaultMonth:n,onSelect:t=>{t&&e.onSelectDate(AD(t))},className:`bg-transparent p-0`},e.focusedDate.slice(0,7))}),(0,R.jsx)(sM,{}),(0,R.jsxs)(lY,{title:t(`calendar.filters.calendars`),children:[(0,R.jsx)(uY,{id:`calendar-filter-local`,label:`CalendHub`,color:``,checked:!e.hiddenConnectionIds.includes(``),onCheckedChange:t=>e.onConnectionVisibleChange(``,t)}),e.connections.map(t=>(0,R.jsx)(uY,{id:`calendar-filter-${t.id}`,label:t.accountEmail,color:t.color,dimmed:t.revoked,checked:!e.hiddenConnectionIds.includes(t.id),onCheckedChange:n=>e.onConnectionVisibleChange(t.id,n)},t.id))]}),(0,R.jsx)(lY,{title:t(`calendar.filters.eventTypes`),children:vE.map(n=>(0,R.jsx)(uY,{id:`event-type-filter-${n}`,label:t(_E[n]),color:``,checked:!e.hiddenEventTypes.includes(n),onCheckedChange:t=>e.onEventTypeVisibleChange(n,t)},n))}),e.footer!==void 0&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(sM,{}),(0,R.jsx)(`div`,{className:`pt-1`,children:e.footer})]})]})}function lY({title:e,children:t}){return(0,R.jsxs)(aY,{defaultOpen:!0,className:`group/filter-group`,children:[(0,R.jsxs)(oY,{className:`flex h-8 w-full items-center justify-between rounded-md px-1 text-xs font-medium text-muted-foreground outline-hidden focu
121s-visible:ring-2 focus-visible:ring-ring`,children:[e,(0,R.jsx)(Vw,{className:`size-4 transition-transform motion-reduce:transition-none group-data-[state=closed]/filter-group:-rotate-90`})]}),(0,R.jsx)(sY,{children:(0,R.jsx)(`ul`,{className:`flex w-full min-w-0 flex-col gap-1`,children:t})})]})}function uY({id:e,label:t,color:n,checked:r,dimmed:i=!1,onCheckedChange:a}){return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`div`,{className:W(`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm`,i&&`opacity-60`),style:n===``?void 0:{backgroundColor:`${n}20`},children:[(0,R.jsx)(aW,{id:e,checked:r,onCheckedChange:e=>a(e===!0)}),(0,R.jsx)(`label`,{htmlFor:e,className:`min-w-0 flex-1 cursor-pointer truncate`,children:t})]})})}function dY({open:e,onOpenChange:t,title:n,description:r,confirmLabel:i=`Confirm`,cancelLabel:a=`Cancel`,destructive:o=!1,pending:s=!1,error:c=null,onConfirm:l,onCancel:u}){return(0,R.jsx)(Xj,{open:e,onOpenChange:t,title:n,description:r,footer:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(G,{variant:`outline`,onClick:u,disabled:s,children:a}),(0,R.jsx)(G,{variant:o?`destructive`:`default`,onClick:l,disabled:s,children:i})]}),children:c?(0,R.jsx)(`div`,{className:`text-sm text-destructive`,children:c}):null})}var fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY={},SY=[],CY=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function wY(e,t){for(var n in t)e[n]=t[n];return e}function TY(e){var t=e.parentNode;t&&t.removeChild(e)}function Q(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?fY.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]
121);return EY(e,o,r,i,null)}function EY(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++mY};return i==null&&pY.vnode!=null&&pY.vnode(a),a}function DY(){return{current:null}}function OY(e){return e.children}function kY(e,t,n,r,i){for(var a in n)a===`children`||a===`key`||a in t||jY(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!=`function`||a===`children`||a===`key`||a===`value`||a===`checked`||n[a]===t[a]||jY(e,a,t[a],n[a],r)}function AY(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||CY.test(t)?n:n+`px`}function jY(e,t,n,r,i){var a;n:if(t===`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||AY(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||AY(e.style,t,n[t])}}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/Capture$/,``)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r||e.addEventListener(t,a?NY:MY,a):e.removeEventListener(t,a?NY:MY,a);else if(t!==`dangerouslySetInnerHTML`){if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t.indexOf(`-`)==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function MY(e){gY=!0;try{return this.l[e.type+!1](pY.event?pY.event(e):e)}finally{gY=!1}}function NY(e){gY=!0;try{return this.l[e.type+!0](pY.event?pY.event(e):e)}finally{gY=!1}}function PY(e,t){this.props=e,this.context=t}function FY(e,t){if(t==null)return e.__?FY(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?FY(e):null}function IY(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return IY(e)}}function LY(e){gY?setTimeout(e):yY(e)}function RY(e){(!e.__d&&(e.__d=!0)&&_Y.push(e)&&!zY.__r++||vY!==pY.debounceRendering)&&((vY=pY.debounceRendering)||LY)(zY)}function zY(){var e,t,n,r,i,a,o,s;for(_Y.sort(function(e,t){return e.__v.__b-t.__v.__b});e=_Y.shift();)e.__d&&(t=_Y.length,r=void 0,i=void 0,o=(a=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=wY({},a)).__v=a.__v+1,GY(s,a,i,n.__n,s.ownerSVGElement!==void 0,a.__h==null?null:[o],r,o??FY(a),a.__h),KY(r,a),a.__e!=o&&IY(a)),_Y.length>t&&_Y.sort(function(e,t){return e.__v.__b-t.__v.__b}));zY.__r=0}function BY(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r&&r.__k||SY,v=_.length;for(n.__k=[],u=0;u<t.length;u++)if((p=n.__k[u]=(p=t[u])==null||typeof p==`boolean`?null:typeof p==`string`||typeof p==`number`||typeof p==`bigint`?EY(null,p,null,null,p):Array.isArray(p)?EY(OY,{children:p},null,null,null):p.__b>0?EY(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[u])===null||f&&p.key==f.key&&p.type===f.type)_[u]=void 0;else for(d=0;d<v;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}GY(e,p,f||=xY,i,a,o,s,c,l),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||=[],f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m==null?c&&f.__e==c&&c.parentNode!=e&&(c=FY(f)):(h??=m,typeof p.type==`function`&&p.__k===f.__k?p.__d=c=VY(p,c,e):c=UY(e,p,f,_,m,c),typeof n.type==`function`&&(n.__d=c))}for(n.__e=h,u=v;u--;)_[u]!=null&&(typeof n.type==`function`&&_[u].__e!=null&&_[u].__e==n.__d&&(n.__d=WY(r).nextSibling),YY(_[u],_[u]));if(g)for(u=0;u<g.length;u++)JY(g[u],g[++u],g[++u])}function VY(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type==`function`?VY(r,t,n):UY(n,r,r,i,r.__e,t));return t}function HY(e,t){return t||=[],e==null||typeof e==`boolean`||(Array.isArray(e)?e.some(function(e){HY(e,t)}):t.push(e)),t}function UY(e,t,n,r,i,a){var o,s,c;
vendor: 14,155 bytes, line 121
121if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=a||i.parentNode==null)n:if(a==null||a.parentNode!==e)e.appendChild(i),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<r.length;c+=1)if(s==i)break n;e.insertBefore(i,a),o=a}return o===void 0?i.nextSibling:o}function WY(e){var t,n,r;if(e.type==null||typeof e.type==`string`)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=WY(n)))return r}return null}function GY(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,s=t.__e=n.__e,t.__h=null,a=[s]),(l=pY.__b)&&l(t);try{n:if(typeof w==`function`){if(g=t.props,_=(l=w.contextType)&&r[l.__c],v=l?_?_.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:(`prototype`in w&&w.prototype.render?t.__c=u=new w(g,v):(t.__c=u=new PY(g,v),u.constructor=w,u.render=XY),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s??(u.__s=u.state),w.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=wY({},u.__s)),wY(u.__s,w.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)w.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,v),!u.__e&&u.shouldComponentUpdate!=null&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&o.push(u);break n}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,v),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,m)})}if(u.context=v,u.props=g,u.__P=e,b=pY.__r,x=0,`prototype`in w&&w.prototype.render){for(u.state=u.__s,u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++x<25);u.state=u.__s,u.getChildContext!=null&&(r=wY(wY({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(m=u.getSnapshotBeforeUpdate(f,p)),C=l!=null&&l.type===OY&&l.key==null?l.props.children:l,BY(e,Array.isArray(C)?C:[C],t,n,r,i,a,o,s,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),h&&(u.__E=u.__=null),u.__e=!1}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=qY(n.__e,t,n,r,i,a,o,c);(l=pY.diffed)&&l(t)}catch(e){t.__v=null,(c||a!=null)&&(t.__e=s,t.__h=!!c,a[a.indexOf(s)]=null),pY.__e(e,t,n)}}function KY(e,t){pY.__c&&pY.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){pY.__e(e,t.__v)}})}function qY(e,t,n,r,i,a,o,s){var c,l,u,d=n.props,f=t.props,p=t.type,m=0;if(p===`svg`&&(i=!0),a!=null){for(;m<a.length;m++)if((c=a[m])&&`setAttribute`in c==!!p&&(p?c.localName===p:c.nodeType===3)){e=c,a[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(f);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,p):document.createElement(p,f.is&&f),a=null,s=!1}if(p===null)d===f||s&&e.data===f||(e.data=f);else{if(a&&=fY.call(e.childNodes),l=(d=n.props||xY).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(a!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||``))}if(kY(e,f,d,i,s),u)t.__k=[];else if(m=t.props.children,BY(e,Array.isArray(m)?m:[m],t,n,r,i&&p!==`foreignObject`,a,o,a?a[0]:n.__k&&FY(n,0),s),a!=null)for(m=a.length;m--;)a[m]!=null&&TY(a[m]);s||(`value`in f&&(m=f.value)!==void 0&&(m!==e.value||p===`progress`&&!m||p===`option`&&m!==d.value)&&jY(e,`value`,m,d.value,!1),`checked`in f&&(m=f.checked)!==void 0&&m!==e.checked&&jY(e,`checked`,m,d.checked,!1))}return e}function JY(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){pY.__e(e,n)}}function YY(e,t,n){var r,i;if(pY.unmount&&pY.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||JY(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){pY.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&YY(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||TY(e.__e),e.__=e.__e=e.__d=void 0}function XY(e,t,n){return this.constructor(e,n)}function ZY(e,t,n){var r,i,a;pY.__&&pY.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],GY(t,e=(!r&&n||t).__k=Q(OY,null,[e]),i||xY,xY,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?fY.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),KY(a,e)}function QY(e,t){var n={__c:t=`__cC`+bY++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,RY(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}fY=SY.slice,pY={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},mY=0,hY=function(e){return e!=null&&e.constructor===void 0},gY=!1,PY.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=wY({},this.state);typeof e==`function`&&(e=e(wY({},n),this.props)),e&&wY(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),RY(this))},PY.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),RY(this))},PY.prototype.render=OY,_Y=[],yY=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zY.__r=0,bY=0;var $Y,eX,tX,nX=[],rX=[],iX=pY.__b,aX=pY.__r,oX=pY.diffed,sX=pY.__c,cX=pY.unmount;function lX(){for(var e;e=nX.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fX),e.__H.__h.forEach(pX),e.__H.__h=[]}catch(t){e.__H.__h=[],pY.__e(t,e.__v)}}pY.__b=function(e){$Y=null,iX&&iX(e)},pY.__r=function(e){aX&&aX(e);var t=($Y=e.__c).__H;t&&(eX===$Y?(t.__h=[],$Y.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=rX,e.__N=e.i=void 0})):(t.__h.forEach(fX),t.__h.forEach(pX),t.__h=[])),eX=$Y},pY.diffed=function(e){oX&&oX(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(nX.push(t)!==1&&tX===pY.requestAnimationFrame||((tX=pY.requestAnimationFrame)||dX)(lX)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==rX&&(e.__=e.__V),e.i=void 0,e.__V=rX})),eX=$Y=null},pY.__c=function(e,t){t.some(function(e){try{e.__h.forEach(fX),e.__h=e.__h.filter(function(e){return!e.__||pX(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],pY.__e(n,e.__v)}}),sX&&sX(e,t)},pY.unmount=function(e){cX&&cX(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{fX(e)}catch(e){t=e}}),n.__H=void 0,t&&pY.__e(t,n.__v))};var uX=typeof requestAnimationFrame==`function`;function dX(e){var t,n=function(){clearTimeout(r),uX&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);uX&&(t=requestAnimationFrame(n))}function fX(e){var t=$Y,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),$Y=t}function pX(e){var t=$Y;e.__c=e.__(),$Y=t}function mX(e,t){for(var n in t)e[n]=t[n];return e}function hX(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function gX(e){this.props=e}(gX.prototype=new PY).isPureReactComponent=!0,gX.prototype.shouldComponentUpdate=function(e,t){return hX(this.props,e)||hX(this.state,t)};var _X=pY.__b;pY.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),_X&&_X(e)},typeof Symbol<`u`&&Symbol.for;var vX=pY.__e;pY.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}vX(e,t,n,r)};var yX=pY.unmount;function bX(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=mX({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return bX(e,t,n)})),e}function xX(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return xX(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function SX(){this.__u=0,this.t=null,this.__b=null}function CX(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function wX(){this.u=null,this.o=null}pY.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),yX&&yX(e)},(SX.prototype=new PY).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=CX(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=xX(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},SX.prototype.componentWillUnmount=function(){this.t=[]},SX.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=bX(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Q(OY,null,e.fallback);return i&&(i.__h=null),[Q(OY,null,t.__a?null:e.children),i]};var TX=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function EX(e){return this.getChildContext=function(){return e.context},e.children}function DX(e){var t=this,n=e.i;t.componentWillUnmount=function(){ZY(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||=(t.i=n,{nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),ZY(Q(EX,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function OX(e,t){var n=Q(DX,{__v:e,i:t});return n.containerInfo=t,n}(wX.prototype=new PY).__a=function(e){var t=this,n=CX(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),TX(t,e,r)):i()};n?n(a):a()}},wX.prototype.render=function(e){this.u=null,this.o=new Map;var t=HY(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},wX.prototype.componentDidUpdate=wX.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){TX(e,n,t)})};var kX=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,AX=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,jX=typeof document<`u`,MX=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/i:/fil|che|ra/i).test(e)};PY.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(PY.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var NX=pY.event;function PX(){}function FX(){return this.cancelBubble}function IX(){return this.defaultPrevented}pY.event=function(e){return NX&&(e=NX(e)),e.persist=PX,e.isPropagationStopped=FX,e.isDefaultPrevented=IX,e.nativeEvent=e};var LX={configurable:!0,get:function(){return this.class}},RX=pY.vnode;pY.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t==`string`){var i=t.indexOf(`-`)===-1;for(var a in r={},n){var o=n[a];jX&&a===`children`&&t===`noscript`||a===`value`&&`defaultValue`in n&&o==null||(a===`defaultValue`&&`value`in n&&n.value==null?a=`value`:a===`download`&&!0===o?o=``:/ondoubleclick/i.test(a)?a=`ondblclick`:/^onchange(textarea|input)/i.test(a+t)&&!MX(n.type)?a=`oninput`:/^onfocus$/i.test(a)?a=`onfocusin`:/^onblur$/i.test(a)?a=`onfocusout`:/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&AX.test(a)?a=a.replace(/[A-Z0-9]/g,`-$&`).toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a=`oninputCapture`)),r[a]=o)}t==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=HY(n.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),t==`select`&&r.defaultValue!=null&&(r.value=HY(n.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(LX.enumerable=`className`in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",LX))}e.$$typeof=kX,RX&&RX(e)};var zX=pY.__r;pY.__r=function(e){zX&&zX(e),e.__c};var BX=[],VX=new Map;function HX(e){BX.push(e),VX.forEach(t=>{KX(t,e)})}function UX(e){e.isConnected&&e.getRootNode&&WX(e.getRootNode())}function WX(e){let t=VX.get(e);if(!t||!t.isConnected){if(t=e.querySelector(`style[data-fullcalendar]`),!t){t=document.createElement(`style`),t.setAttribute(`data-fullcalendar`,``);let n=JX();n&&(t.nonce=n);let r=e===document?document.head:e,i=e===document?r.querySelector(`script,link[rel=stylesheet],link[as=style],style`):r.firstChild;r.insertBefore(t,i)}VX.set(e,t),GX(t)}}function GX(e){for(let t of BX)KX(e,t)}function KX(e,t){let{sheet:n}=e,r=n.cssRules.length;t.split(`}`).forEach((e,t)=>{e=e.trim(),e&&n.insertRule(e+`}`,r+t)})}var qX;function JX(){return qX===void 0&&(qX=YX()),qX}function YX(){let e=document.querySelector(`meta[name="csp-nonce"]`);if(e&&e.hasAttribute(`content`))return e.getAttribute(`content`);let t=document.querySelector(`script[nonce]`);return t&&t.nonce||``}typeof document<`u`&&WX(document),HX(`
vendor: 7,143 bytes, line 121
121:root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}
vendor: 7,156 bytes, line 121
121.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}
121`);var XX=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=``){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e=``,t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(--n[e],n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&=(clearTimeout(this.timeoutId),0)}drained(){this.drainedOption&&this.drainedOption()}};function ZX(e){e.parentNode&&e.parentNode.removeChild(e)}function QX(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if($X(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function $X(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function eZ(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].querySelectorAll(t);for(let e=0;e<i.length;e+=1)r.push(i[e])}return r}var tZ=/(top|left|right|bottom|width|height)$/i;function nZ(e,t){for(let n in t)rZ(e,n,t[n])}function rZ(e,t,n){n==null?e.style[t]=``:typeof n==`number`&&tZ.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function iZ(e){return e.composedPath?.call(e)[0]??e.target}var aZ=0;function oZ(){return aZ+=1,`fc-dom-`+aZ}function sZ(e){e.preventDefault()}function cZ(e,t){return n=>{let r=QX(n.target,e);r&&t.call(r,n,r)}}function lZ(e,t,n,r){let i=cZ(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function uZ(e,t,n,r){let i;return lZ(e,`mouseover`,t,(e,t)=>{if(t!==i){i=t,n(e,t);let a=e=>{i=null,r(e,t),t.removeEventListener(`mouseleave`,a)};t.addEventListener(`mouseleave`,a)}})}var dZ=[`webkitTransitionEnd`,`otransitionend`,`oTransitionEnd`,`msTransitionEnd`,`transitionend`];function fZ(e,t){let n=r=>
vendor: 20,056 bytes, line 121
121{t(r),dZ.forEach(t=>{e.removeEventListener(t,n)})};dZ.forEach(t=>{e.addEventListener(t,n)})}function pZ(e){return Object.assign({onClick:e},mZ(e))}function mZ(e){return{tabIndex:0,onKeyDown(t){(t.key===`Enter`||t.key===` `)&&(e(t),t.preventDefault())}}}var hZ=0;function gZ(){return hZ+=1,String(hZ)}function _Z(){document.body.classList.add(`fc-not-allowed`)}function vZ(){document.body.classList.remove(`fc-not-allowed`)}function yZ(e){e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,e.addEventListener(`selectstart`,sZ)}function bZ(e){e.style.userSelect=``,e.style.webkitUserSelect=``,e.removeEventListener(`selectstart`,sZ)}function xZ(e){e.addEventListener(`contextmenu`,sZ)}function SZ(e){e.removeEventListener(`contextmenu`,sZ)}function CZ(e){let t=[],n=[],r,i;for(typeof e==`string`?n=e.split(/\s*,\s*/):typeof e==`function`?n=[e]:Array.isArray(e)&&(n=e),r=0;r<n.length;r+=1)i=n[r],typeof i==`string`?t.push(i.charAt(0)===`-`?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i==`function`&&t.push({func:i});return t}function wZ(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=TZ(e,t,n[r]),i)return i;return 0}function TZ(e,t,n){return n.func?n.func(e,t):EZ(e[n.field],t[n.field])*(n.order||1)}function EZ(e,t){return!e&&!t?0:t==null?-1:e==null?1:typeof e==`string`||typeof t==`string`?String(e).localeCompare(String(t)):e-t}function DZ(e,t){let n=String(e);return`000`.substr(0,t-n.length)+n}function OZ(e,t,n){return typeof e==`function`?e(...t):typeof e==`string`?t.reduce((e,t,n)=>e.replace(`$`+n,t||``),e):n}function kZ(e,t){return e-t}function AZ(e){return e%1==0}function jZ(e){let t=e.querySelector(`.fc-scrollgrid-shrink-frame`),n=e.querySelector(`.fc-scrollgrid-shrink-cushion`);if(!t)throw Error(`needs fc-scrollgrid-shrink-frame className`);if(!n)throw Error(`needs fc-scrollgrid-shrink-cushion className`);return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var MZ=[`years`,`months`,`days`,`milliseconds`],NZ=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function PZ(e,t){return typeof e==`string`?FZ(e):typeof e==`object`&&e?IZ(e):typeof e==`number`?IZ({[t||`milliseconds`]:e}):null}function FZ(e){let t=NZ.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function IZ(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:(e.hours||e.hour||0)*60*60*1e3+(e.minutes||e.minute||0)*60*1e3+(e.seconds||e.second||0)*1e3+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=n*7,t.specifiedWeeks=!0),t}function LZ(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function RZ(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function zZ(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function BZ(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function VZ(e){return UZ(e)/365}function HZ(e){return UZ(e)/30}function UZ(e){return WZ(e)/864e5}function WZ(e){return e.years*31536e6+e.months*2592e6+e.days*864e5+e.milliseconds}function GZ(e,t){let n=null;for(let r=0;r<MZ.length;r+=1){let i=MZ[r];if(t[i]){let r=e[i]/t[i];if(!AZ(r)||n!==null&&n!==r)return null;n=r}else if(e[i])return null}return n}function KZ(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:`millisecond`,value:t};if(t%6e4!=0)return{unit:`second`,value:t/1e3};if(t%36e5!=0)return{unit:`minute`,value:t/6e4};if(t)return{unit:`hour`,value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:`week`,value:e.days/7}:{unit:`day`,value:e.days}:e.months?{unit:`month`,value:e.months}:e.years?{unit:`year`,value:e.years}:{unit:`millisecond`,value:0}}function qZ(e,t,n){if(e===t)return!0;let r=e.length,i;if(r!==t.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(e[i],t[i]):e[i]===t[i]))return!1;return!0}var JZ=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];function YZ(e,t){let n=hQ(e);return n[2]+=t*7,gQ(n)}function XZ(e,t){let n=hQ(e);return n[2]+=t,gQ(n)}function ZZ(e,t){let n=hQ(e);return n[6]+=t,gQ(n)}function QZ(e,t){return $Z(e,t)/7}function $Z(e,t){return(t.valueOf()-e.valueOf())/864e5}function eQ(e,t){return(t.valueOf()-e.valueOf())/36e5}function tQ(e,t){return(t.valueOf()-e.valueOf())/6e4}function nQ(e,t){return(t.valueOf()-e.valueOf())/1e3}function rQ(e,t){let n=oQ(e),r=oQ(t);return{years:0,months:0,days:Math.round($Z(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function iQ(e,t){let n=aQ(e,t);return n!==null&&n%7==0?n/7:null}function aQ(e,t){return vQ(e)===vQ(t)?Math.round($Z(e,t)):null}function oQ(e){return gQ([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function sQ(e){return gQ([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function cQ(e){return gQ([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function lQ(e){return gQ([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function uQ(e,t,n){let r=e.getUTCFullYear(),i=dQ(e,r,t,n);if(i<1)return dQ(e,r-1,t,n);let a=dQ(e,r+1,t,n);return a>=1?Math.min(i,a):i}function dQ(e,t,n,r){let i=gQ([t,0,1+fQ(t,n,r)]),a=oQ(e),o=Math.round($Z(i,a));return Math.floor(o/7)+1}function fQ(e,t,n){let r=7+t-n;return-((7+gQ([e,0,r]).getUTCDay()-t)%7)+r-1}function pQ(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function mQ(e){return new Date(e[0],e[1]||0,e[2]==null?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function hQ(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function gQ(e){return e.length===1&&(e=e.concat([0])),new Date(Date.UTC(...e))}function _Q(e){return!isNaN(e.valueOf())}function vQ(e){return e.getUTCHours()*1e3*60*60+e.getUTCMinutes()*1e3*60+e.getUTCSeconds()*1e3+e.getUTCMilliseconds()}function yQ(e,t,n=!1){let r=e.toISOString();return r=r.replace(`.000`,``),n&&(r=r.replace(`T00:00:00Z`,``)),r.length>10&&(t==null?r=r.replace(`Z`,``):t!==0&&(r=r.replace(`Z`,CQ(t,!0)))),r}function bQ(e){return e.toISOString().replace(/T.*$/,``)}function xQ(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]}function SQ(e){return DZ(e.getUTCHours(),2)+`:`+DZ(e.getUTCMinutes(),2)+`:`+DZ(e.getUTCSeconds(),2)}function CQ(e,t=!1){let n=e<0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=Math.round(r%60);return t?`${n+DZ(i,2)}:${DZ(a,2)}`:`GMT${n}${i}${a?`:${DZ(a,2)}`:``}`}function wQ(e,t,n){let r,i;return function(...a){if(!r)i=e.apply(this,a);else if(!qZ(r,a)){n&&n(i);let r=e.apply(this,a);(!t||!t(r,i))&&(i=r)}return r=a,i}}function TQ(e,t,n){let r,i;return a=>{if(!r)i=e.call(this,a);else if(!u$(r,a)){n&&n(i);let r=e.call(this,a);(!t||!t(r,i))&&(i=r)}return r=a,i}}var EQ={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},DQ={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},OQ=/\s*([ap])\.?m\.?/i,kQ=/,/g,AQ=/\s+/g,jQ=/\u200e/g,MQ=/UTC|GMT/,NQ=class{constructor(e){let t={},n={},r=9;for(let i in e)i in EQ?(n[i]=e[i],EQ[i]<9&&(r=Math.min(EQ[i],r))):(t[i]=e[i],i in DQ&&(r=Math.min(DQ[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=wQ(PQ)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:a}=this,o=BQ(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let s=o;s>1&&(i.year===`numeric`||i.year===`2-digit`)&&(i.month===`numeric`||i.month===`2-digit`)&&(i.day===`numeric`||i.day===`2-digit`)&&(s=1);let c=this.format(e,n),l=this.format(t,n);if(c===l)return c;let u=PQ(VQ(i,s),a,n),d=u(e),f=u(t),p=HQ(c,d,l,f),m=a.separator||r||n.defaultSeparator||``;return p?p.before+d+m+f+p.after:c+m+l}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return`year`;case 4:return`month`;case 3:return`week`;case 2:return`day`;default:return`time`}}};function PQ(e,t,n){let r=Object.keys(e).length;return r===1&&e.timeZoneName===`short`?e=>CQ(e.timeZoneOffset):r===0&&t.week?e=>zQ(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):FQ(e,t,n)}function FQ(e,t,n){e=Object.assign({},e),t=Object.assign({},t),IQ(e,t),e.timeZone=`UTC`;let r=new Intl.DateTimeFormat(n.locale.codes,e),i;if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,i=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let{marker:o}=a,s;return s=i&&!o.getUTCMinutes()?i:r,LQ(s.format(o),a,e,t,n)}}function IQ(e,t){e.timeZoneName&&(e.hour||=`2-digit`,e.minute||=`2-digit`),e.timeZoneName===`long`&&(e.timeZoneName=`short`),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function LQ(e,t,n,r,i){return e=e.replace(jQ,``),n.timeZoneName===`short`&&(e=RQ(e,i.timeZone===`UTC`||t.timeZoneOffset==null?`UTC`:CQ(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(kQ,``).trim()),r.omitZeroMinute&&(e=e.replace(`:00`,``)),r.meridiem===!1?e=e.replace(OQ,``).trim():r.meridiem===`narrow`?e=e.replace(OQ,(e,t)=>t.toLocaleLowerCase()):r.meridiem===`short`?e=e.replace(OQ,(e,t)=>`${t.toLocaleLowerCase()}m`):r.meridiem===`lowercase`&&(e=e.replace(OQ,e=>e.toLocaleLowerCase())),e=e.replace(AQ,` `),e=e.trim(),e}function RQ(e,t){let n=!1;return e=e.replace(MQ,()=>(n=!0,t)),n||(e+=` ${t}`),e}function zQ(e,t,n,r,i){let a=[];return i===`long`?a.push(n):(i===`short`||i===`narrow`)&&a.push(t),(i===`long`||i===`short`)&&a.push(` `),a.push(r.simpleNumberFormat.format(e)),r.options.direction===`rtl`&&a.reverse(),a.join(``)}function BQ(e,t,n){return n.getMarkerYear(e)===n.getMarkerYear(t)?n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerDay(e)===n.getMarkerDay(t)?vQ(e)===vQ(t)?0:1:2:4:5}function VQ(e,t){let n={};for(let r in e)(!(r in DQ)||DQ[r]<=t)&&(n[r]=e[r]);return n}function HQ(e,t,n,r){let i=0;for(;i<e.length;){let a=e.indexOf(t,i);if(a===-1)break;let o=e.substr(0,a);i=a+t.length;let s=e.substr(i),c=0;for(;c<n.length;){let e=n.indexOf(r,c);if(e===-1)break;let t=n.substr(0,e);c=e+r.length;let i=n.substr(c);if(o===t&&s===i)return{before:o,after:s}}}return null}function UQ(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function WQ(e,t,n,r){let i=UQ(e,n.calendarSystem);return{date:i,start:i,end:t?UQ(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var GQ=class{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,WQ(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,WQ(e,t,n,r))}},KQ=class{constructor(e){this.func=e}format(e,t,n){return this.func(WQ(e,null,t,n))}formatRange(e,t,n,r){return this.func(WQ(e,t,n,r))}};function qQ(e){return typeof e==`object`&&e?new NQ(e):typeof e==`string`?new GQ(e):typeof e==`function`?new KQ(e):null}var JQ={navLinkDayClick:$,navLinkWeekClick:$,duration:PZ,bootstrapFontAwesome:$,buttonIcons:$,customButtons:$,defaultAllDayEventDuration:PZ,defaultTimedEventDuration:PZ,nextDayThreshold:PZ,scrollTime:PZ,scrollTimeReset:Boolean,slotMinTime:PZ,slotMaxTime:PZ,dayPopoverFormat:qQ,slotDuration:PZ,snapDuration:PZ,headerToolbar:$,footerToolbar:$,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:qQ,dayHeaderClassNames:$,dayHeaderContent:$,dayHeaderDidMount:$,dayHeaderWillUnmount:$,dayCellClassNames:$,dayCellContent:$,dayCellDidMount:$,dayCellWillUnmount:$,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:$,weekNumbers:Boolean,weekNumberClassNames:$,weekNumberContent:$,weekNumberDidMount:$,weekNumberWillUnmount:$,editable:Boolean,viewClassNames:$,viewDidMount:$,viewWillUnmount:$,nowIndicator:Boolean,nowIndicatorSnap:$,nowIndicatorClassNames:$,nowIndicatorContent:$,nowIndicatorDidMount:$,nowIndicatorWillUnmount:$,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:$,locale:$,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:$,eventOrder:CZ,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:$,contentHeight:$,direction:String,weekNumberFormat:qQ,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:$,initialDate:$,now:$,eventDataTransform:$,stickyHeaderDates:$,stickyFooterScrollbar:$,viewHeight:$,defaultAllDay:Boolean,eventSourceFailure:$,eventSourceSuccess:$,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:$,eventConstraint:$,eventAllow:$,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:$,eventContent:$,eventDidMount:$,eventWillUnmount:$,selectConstraint:$,selectOverlap:$,selectAllow:$,droppable:Boolean,unselectCancel:String,slotLabelFormat:$,slotLaneClassNames:$,slotLaneContent:$,slotLaneDidMount:$,slotLaneWillUnmount:$,slotLabelClassNames:$,slotLabelContent:$,slotLabelDidMount:$,slotLabelWillUnmount:$,dayMaxEvents:$,dayMaxEventRows:$,dayMinWidth:Number,slotLabelInterval:PZ,allDayText:String,allDayClassNames:$,allDayContent:$,allDayDidMount:$,allDayWillUnmount:$,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:qQ,rerenderDelay:Number,moreLinkText:$,moreLinkHint:$,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:$,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:PZ,hiddenDays:$,fixedWeekCount:Boolean,validRange:$,visibleRange:$,titleFormat:$,eventInteractive:Boolean,noEventsText:String,viewHint:$,navLinkHint:$,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:$,moreLinkClassNames:$,moreLinkContent:$,moreLinkDidMount:$,moreLinkWillUnmount:$,monthStartFormat:qQ,handleCustomRendering:$,customRenderingMetaMap:$,customRenderingReplaces:Boolean},YQ={eventDisplay:`auto`,defaultRangeSeparator:` - `,titleRangeSeparator:` â `,defaultTimedEventDuration:`01:00:00`,defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:`00:00:00`,dayHeaders:!0,initialView:``,aspectRatio:1.35,headerToolbar:{start:`title`,center:``,end:`today prev,next`},weekends:!0,weekNumbers:!1,weekNumberCalculation:`local`,editable:!1,nowIndicator:!1,scrollTime:`06:00:00`,scrollTimeReset:!0,slotMinTime:`00:00:00`,slotMaxTime:`24:00:00`,showNonCurrentDates:!0,lazyFetching:!0,startParam:`start`,endParam:`end`,timeZoneParam:`timeZone`,timeZone:`local`,locales:[],locale:``,themeSystem:`standard`,dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:`*`,eventOrder:`start,-duration,allDay,title`,dayPopoverFormat:{month:`long`,day:`numeric`,year:`numeric`},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:`long`,day:`numeric`},nowIndicatorSnap:`auto`},XQ={datesSet:$,eventsSet:$,eventAdd:$,eventChange:$,eventRemove:$,windowResize:$,eventClick:$,eventMouseEnter:$,eventMouseLeave:$,select:$,unselect:$,loading:$,_unmount:$,_beforeprint:$,_afterprint:$,_noEventDrop:$,_noEventResize:$,_resize:$,_scrollRequest:$},ZQ={buttonText:$,buttonHints:$,views:$,plugins:$,initialEvents:$,events:$,eventSources:$},QQ={headerToolbar:$Q,footerToolbar:$Q,buttonText:$Q,buttonHints:$Q,buttonIcons:$Q,dateIncrement:$Q,plugins:e$,events:e$,eventSources:e$,resources:e$};function $Q(e,t){return typeof e==`object`&&typeof t==`object`&&e&&t?u$(e,t):e===t}function e$(e,t){return Array.isArray(e)&&Array.isArray(t)?qZ(e,t):e===t}var t$={type:String,component:$,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:$,usesMinMaxTime:Boolean,classNames:$,content:$,didMount:$,willUnmount:$};function n$(e){return a$(e,QQ)}function r$(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function $(e){return e}var{hasOwnProperty:i$}=Object.prototype;function a$(e,t){let n={};if(t){for(let r in t)if(t[r]===$Q){let t=[];for(let i=e.length-1;i>=0;--i){let a=e[i][r];if(typeof a==`object`&&a)t.unshift(a);else if(a!==void 0){n[r]=a;break}}t.length&&(n[r]=a$(t))}}for(let t=e.length-1;t>=0;--t){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function o$(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function s$(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function c$(e){let t={};for(let n of e)t[n]=!0;return t}function l$(e){let t=[];for(let n in e)t.push(e[n]);return t}function u$(e,t){if(e===t)return!0;for(let n in e)if(i$.call(e,n)&&!(n in t))return!1;for(let n in t)if(i$.call(t,n)&&e[n]!==t[n])return!1;return!0}var d$=/^on[A-Z]/;function f$(e,t){let n=p$(e,t);for(let e of n)if(!d$.test(e))return!1;return!0}function p$(e,t){let n=[];for(let r in e)i$.call(e,r)&&(r in t||n.push(r));for(let r in t)i$.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function m$(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e&&h$(e[r],t[r],n[r])))return!1;for(let n in e)if(!(n in t))return!1;return!0}function h$(e,t,n){return e===t||n===!0?!0:n?n(e,t):!1}function g$(e,t=0,n,r=1){let i=[];n??=Object.keys(e).length;for(let a=t;a<n;a+=r){let t=e[a];t!==void 0&&i.push(t)}return i}var _$={};function v$(e,t){_$[e]=t}function y$(e){return new _$[e]}v$(`gregory`,class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return gQ(e)}markerToArray(e){return hQ(e)}});var b$=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function x$(e){let t=b$.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?Number(`0.${t[12]}`)*1e3:0));if(_Q(e)){let n=null;return t[13]&&(n=(t[15]===`-`?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}var S$=class{constructor(e){let t=this.timeZone=e.timeZone,n=t!==`local`&&t!==`UTC`;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!!(!n||this.namedTimeZoneImpl),this.calendarSystem=y$(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation===`ISO`&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay==`number`&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation==`function`&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText==null?e.locale.options.weekText:e.weekText,this.weekTextLong=(e.weekTextLong==null?e.locale.options.weekTextLong:e.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):gQ(pQ(new Date))}createMarkerMeta(e){if(typeof e==`string`)return this.parse(e);let t=null;return typeof e==`number`?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=gQ(e)),t===null||!_Q(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=x$(e);
121if(t===null)return null;let{marker:n}=t,r=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-t.timeZoneOffset*60*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return vQ(e)===vQ(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return vQ(e)===vQ(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+(n.getMarkerYear(t)-n.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return n===null?(n=this.diffWholeMonths(e,t),n===null?(n=iQ(e,t),n===null?(n=aQ(e,t),n===null?(n=eQ(e,t),AZ(n)?{unit:`hour`,value:n}:(n=tQ(e,t),AZ(n)?{unit:`minute`,value:n}:(n=nQ(e,t),AZ(n)?{unit:`second`,value:n}:{unit:`millisecond`,value:t.valueOf()-e.valueOf()}))):{unit:`day`,value:n}):{unit:`week`,value:n}):{unit:`month`,value:n}):{unit:`year`,value:n}}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),r!==null)?r/VZ(n):n.months&&(r=this.diffWholeMonths(e,t),r!==null)?r/HZ(n):n.days&&(r=aQ(e,t),r!==null)?r/UZ(n):(t.valueOf()-e.valueOf())/WZ(n)}startOf(e,t){return t===`year`?this.startOfYear(e):t===`month`?this.startOfMonth(e):t===`week`?this.startOfWeek(e):t===`day`?oQ(e):t===`hour`?sQ(e):t===`minute`?cQ(e):t===`second`?lQ(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):uQ(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:n.forcedTzo==null?this.offsetForMarker(e):n.forcedTzo},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=ZZ(t,-1)),n.formatRange({marker:e,timeZoneOffset:r.forcedStartTzo==null?this.offsetForMarker(e):r.forcedStartTzo},{marker:t,timeZoneOffset:r.forcedEndTzo==null?this.offsetForMarker(t):r.forcedEndTzo},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=t.forcedTzo==null?this.offsetForMarker(e):t.forcedTzo),yQ(e,n,t.omitTime)}timestampToMarker(e){return this.timeZone===`local`?gQ(pQ(new Date(e))):this.timeZone===`UTC`||!this.namedTimeZoneImpl?new Date(e):gQ(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone===`local`?-mQ(hQ(e)).getTimezoneOffset():this.timeZone===`UTC`?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(hQ(e)):null}toDate(e,t){return this.timeZone===`local`?mQ(hQ(e)):this.timeZone===`UTC`?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(hQ(e))*1e3*60):new Date(e.valueOf()-(t||0))}},C$=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if(typeof e==`object`&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||``}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:``}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:``}};C$.prototype.classes={},C$.prototype.iconClasses={},C$.prototype.baseIconClass=``,C$.prototype.iconOverridePrefix=``;function w$(e){e();let t=pY.debounceRendering,n=[];function r(e){n.push(e)}for(pY.debounceRendering=r,ZY(Q(T$,{}),document.createElement(`div`));n.length;)n.shift()();pY.debounceRendering=t}var T$=class extends PY{render(){return Q(`div`,{})}componentDidMount(){this.setState({})}};function E$(e){let t=QY(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>
vendor: 10,522 bytes, line 121
121{this.props.value!==t.value&&e.forEach(e=>{e.context=t.value,e.forceUpdate()})},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}var D$=class{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on(`_scrollRequest`,this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off(`_scrollRequest`,this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},O$=E$({});function k$(e,t,n,r,i,a,o,s,c,l,u,d,f,p){return{dateEnv:i,nowManager:a,options:n,pluginHooks:s,emitter:u,dispatch:c,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:n.direction===`rtl`,addResizeHandler(e){u.on(`_resize`,e)},removeResizeHandler(e){u.off(`_resize`,e)},createScrollResponder(e){return new D$(e,u,PZ(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:p}}var A$=class extends PY{shouldComponentUpdate(e,t){return!m$(this.props,e,this.propEquality)||!m$(this.state,t,this.stateEquality)}safeSetState(e){m$(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};A$.addPropsEquality=M$,A$.addStateEquality=N$,A$.contextType=O$,A$.prototype.propEquality={},A$.prototype.stateEquality={};var j$=class extends A${};j$.contextType=O$;function M$(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t}function N$(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t}function P$(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var F$=class extends j${constructor(){super(...arguments),this.id=gZ(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:n}=this.props;(!t.customRenderingReplaces||!I$(n,t))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&P$(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=L$(e,[],this.handleEl),s=!1,c,l=[],u;if(r!=null){let e=typeof r==`function`?r(a,Q):r;if(e===!0)s=!0;else{let t=e&&typeof e==`object`;t&&`html`in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&`domNodes`in e?l=Array.prototype.slice.call(e.domNodes):(t?hY(e):typeof e!=`function`)?c=e:u=e}}else s=!I$(e.generatorName,n);return s&&i&&(c=i(a)),this.queuedDomNodes=l,this.currentGeneratorMeta=u,Q(e.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){let{props:t,context:n}=this,{handleCustomRendering:r,customRenderingMetaMap:i}=n.options;if(r){let n=this.currentGeneratorMeta??i?.[t.generatorName];n&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:n},t),{elClasses:(t.elClasses||[]).filter(R$)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!qZ(e,t)){t.forEach(ZX);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}};F$.addPropsEquality({elClasses:qZ,elStyle:u$,elAttrs:f$,renderProps:u$});function I$(e,t){return!!(t.handleCustomRendering&&e&&t.customRenderingMetaMap?.[e])}function L$(e,t,n){let r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(` `)),e.elStyle&&(r.style=e.elStyle),r}function R$(e){return!!e}var z$=E$(0),B$=class extends PY{constructor(){super(...arguments),this.InnerContent=V$.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(P$(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=H$(e.classNameGenerator,e.renderProps);if(e.children){let n=L$(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?Q(e.elTag,n,r):r}return Q(F$,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||`div`,elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?(t=(e=this.props).didMount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};B$.contextType=z$;function V$(e,t){let n=e.props;return Q(F$,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}function H$(e,t){let n=typeof e==`function`?e(t):e||[];return typeof n==`string`?[n]:n}var U$=class extends j${render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return Q(B$,{elRef:e.elRef,elTag:e.elTag||`div`,elAttrs:e.elAttrs,elClasses:[...W$(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},()=>e.children)}};function W$(e){return[`fc-${e.type}-view`,`fc-view`]}function G$(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function K$(e,t){let n=[],{start:r}=t,i,a;for(e.sort(q$),i=0;i<e.length;i+=1)a=e[i],a.start>r&&n.push({start:r,end:a.start}),a.end>r&&(r=a.end);return r<t.end&&n.push({start:r,end:t.end}),n}function q$(e,t){return e.start.valueOf()-t.start.valueOf()}function J$(e,t){let{start:n,end:r}=e,i=null;return t.start!==null&&(n=n===null?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),t.end!=null&&(r=r===null?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function Y$(e,t){return(e.start===null?null:e.start.valueOf())===(t.start===null?null:t.start.valueOf())&&(e.end===null?null:e.end.valueOf())===(t.end===null?null:t.end.valueOf())}function X$(e,t){return(e.end===null||t.start===null||e.end>t.start)&&(e.start===null||t.end===null||e.start<t.end)}function Z$(e,t){return(e.start===null||t.start!==null&&t.start>=e.start)&&(e.end===null||t.end!==null&&t.end<=e.end)}function Q$(e,t){return(e.start===null||t>=e.start)&&(e.end===null||t<e.end)}function $$(e,t){return t.start!=null&&e<t.start?t.start:t.end!=null&&e>=t.end?new Date(t.end.valueOf()-1):e}function e1(e){let t=Math.floor($Z(e.start,e.end))||1,n=oQ(e.start);return{start:n,end:XZ(n,t)}}function t1(e,t=PZ(0)){let n=null,r=null;if(e.end){r=oQ(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=WZ(t)&&(r=XZ(r,1))}return e.start&&(n=oQ(e.start),r&&r<=n&&(r=XZ(n,1))),{start:n,end:r}}function n1(e){let t=t1(e);return $Z(t.start,t.end)>1}function r1(e,t,n,r){return r===`year`?PZ(n.diffWholeYears(e,t),`year`):r===`month`?PZ(n.diffWholeMonths(e,t),`month`):rQ(e,t)}var i1=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let{props:r}=this,i,a,o,s,c,l;return i=this.buildValidRange(),i=this.trimHiddenDays(i),n&&(e=$$(e,i)),a=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(a.unit),s=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),s=this.trimHiddenDays(s),c=s,r.showNonCurrentDates||(c=J$(c,a.range)),c=this.adjustActiveRange(c),c=J$(c,i),l=X$(a.range,i),Q$(s,e)||(e=s.start),{currentDate:e,validRange:i,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:c,renderRange:s,slotMinTime:r.slotMinTime,slotMaxTime:r.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e==`function`?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:n}=this,r=null,i=null,a=null,o;return n.duration?(r=n.duration,i=n.durationUnit,a=this.buildRangeFromDuration(e,t,r,i)):(o=this.props.dayCount)?(i=`day`,a=this.buildRangeFromDayCount(e,t,o)):(a=this.buildCustomVisibleRange(e))?i=n.dateEnv.greatestWholeUnit(a.start,a.end).unit:(r=this.getFallbackDuration(),i=KZ(r).unit,a=this.buildRangeFromDuration(e,t,r,i)),{duration:r,unit:i,range:a}}getFallbackDuration(){return PZ({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return n&&(UZ(r)<0&&(a=oQ(a),a=t.add(a,r)),UZ(i)>1&&(o=oQ(o),o=XZ(o,-1),o=t.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,t,n,r){let{dateEnv:i,dateAlignment:a}=this.props,o,s,c;if(!a){let{dateIncrement:e}=this.props;a=e&&WZ(e)<WZ(n)?KZ(e).unit:r}UZ(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=oQ(o));function l(){o=i.startOf(e,a),s=i.add(o,n),c={start:o,end:s}}return l(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,t),l()),c}buildRangeFromDayCount(e,t,n){let{dateEnv:r,dateAlignment:i}=this.props,a=0,o=e,s;i&&(o=r.startOf(o,i)),o=oQ(o),o=this.skipHiddenDays(o,t),s=o;do s=XZ(s,1),this.isHiddenDay(s)||(a+=1);while(a<n);return{start:o,end:s}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r=typeof n==`function`?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,n;return t||((n=this.props.dateAlignment)?PZ(1,n):e||PZ({days:1}))}refineRange(e){if(e){let t=G$(e,this.props.dateEnv);return t&&=t1(t),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],n=0,r;for(this.props.weekends===!1&&e.push(0,6),r=0;r<7;r+=1)(t[r]=e.indexOf(r)!==-1)||(n+=1);if(!n)throw Error(`invalid hiddenDays`);this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:n}=e;return t&&=this.skipHiddenDays(t),n&&=this.skipHiddenDays(n,-1,!0),t==null||n==null||t<n?{start:t,end:n}:null}
121isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=XZ(e,t);return e}};function a1(e,t,n,r){return{instanceId:gZ(),defId:e,range:t,forcedStartTzo:n??null,forcedEndTzo:r??null}}function o1(e,t,n,r){for(let i=0;i<r.length;i+=1){let a=r[i].parse(e,n);if(a){let{allDay:n}=e;return n??(n=t,n??(n=a.allDayGuess,n??=!1)),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:i}}}return null}function s1(e,t,n){let{dateEnv:r,pluginHooks:i,options:a}=n,{defs:o,instances:s}=e;s=o$(s,e=>!o[e.defId].recurringDef);for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration;let c=c1(n,o,t,r,i.recurringTypes);for(let t of c){let n=a1(e,{start:t,end:r.add(t,o)});s[n.instanceId]=n}}}return{defs:o,instances:s}}function c1(e,t,n,r,i){let a=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(oQ)),a}var l1={id:String,groupId:String,title:String,url:String,interactive:Boolean},u1={start:$,end:$,date:$,allDay:Boolean},d1=Object.assign(Object.assign(Object.assign({},l1),u1),{extendedProps:$});function f1(e,t,n,r,i=m1(n),a,o){let{refined:s,extra:c}=p1(e,n,i),l=_1(t,n),u=o1(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let e=h1(s,c,t?t.sourceId:``,u.allDay,!!u.duration,n,a);return e.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:e,instance:null}}let d=g1(s,l,n,r);if(d){let e=h1(s,c,t?t.sourceId:``,d.allDay,d.hasEnd,n,a),r=a1(e.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function p1(e,t,n=m1(t)){return r$(e,n)}function m1(e){return Object.assign(Object.assign(Object.assign({},O1),d1),e.pluginHooks.eventRefiners)}function h1(e,t,n,r,i,a,o){let s={title:e.title||``,groupId:e.groupId||``,publicId:e.id||``,url:e.url||``,recurringDef:null,defId:(o&&e.id?o[e.id]:``)||gZ(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:A1(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(s,t(e));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function g1(e,t,n,r){let{allDay:i}=e,a,o=null,s=!1,c,l=null,u=e.start==null?e.date:e.start;if(a=n.dateEnv.createMarkerMeta(u),a)o=a.marker;else if(!r)return null;return e.end!=null&&(c=n.dateEnv.createMarkerMeta(e.end)),i??=t??((!a||a.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&o&&(o=oQ(o)),c&&(l=c.marker,i&&(l=oQ(l)),o&&l<=o&&(l=null)),l?s=!0:r||(s=n.options.forceEventDuration||!1,l=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:s,range:{start:o,end:l},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function _1(e,t){let n=null;return e&&(n=e.defaultAllDay),n??=t.options.defaultAllDay,n}function v1(e,t,n,r,i,a){let o=S1(),s=m1(n);for(let c of e){let e=f1(c,t,n,r,s,i,a);e&&y1(e,o)}return o}function y1(e,t=S1()){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function b1(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=w1(e,e=>x1(t,e));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return S1()}function x1(e,t){return!!(e.groupId&&e.groupId===t.groupId)}function S1(){return{defs:{},instances:{}}}function C1(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function w1(e,t){let n=o$(e.defs,t);return{defs:n,instances:o$(e.instances,e=>n[e.defId])}}function T1(e,t){let{defs:n,instances:r}=e,i={},a={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(a[e]=r[e]);return{defs:i,instances:a}}function E1(e,t){return Array.isArray(e)?v1(e,null,t,!0):typeof e==`object`&&e?v1([e],null,t,!0):e==null?null:String(e)}function D1(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/):[]}var O1={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:$,overlap:$,allow:$,className:D1,classNames:D1,color:String,backgroundColor:String,borderColor:String,textColor:String},k1={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]};function A1(e,t){let n=E1(e.constraint,t);return{display:e.display||null,startEditable:e.startEditable==null?e.editable:e.startEditable,durationEditable:e.durationEditable==null?e.editable:e.durationEditable,constraints:n==null?[]:[n],overlap:e.overlap==null?null:e.overlap,allows:e.allow==null?[]:[e.allow],backgroundColor:e.backgroundColor||e.color||``,borderColor:e.borderColor||e.color||``,textColor:e.textColor||``,classNames:(e.className||[]).concat(e.classNames||[])}}function j1(e){return e.reduce(M1,k1)}function M1(e,t){return{display:t.display==null?e.display:t.display,startEditable:t.startEditable==null?e.startEditable:t.startEditable,durationEditable:t.durationEditable==null?e.durationEditable:t.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:typeof t.overlap==`boolean`?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.c
121oncat(t.classNames)}}var N1={id:String,defaultAllDay:Boolean,url:String,format:String,events:$,eventDataTransform:$,success:$,failure:$};function P1(e,t,n=F1(t)){let r;if(typeof e==`string`?r={url:e}:typeof e==`function`||Array.isArray(e)?r={events:e}:typeof e==`object`&&e&&(r=e),r){let{refined:i,extra:a}=r$(r,n),o=I1(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:``,fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||``,sourceId:gZ(),sourceDefId:o.sourceDefId,meta:o.meta,ui:A1(i,t),extendedProps:a}}return null}function F1(e){return Object.assign(Object.assign(Object.assign({},O1),N1),e.pluginHooks.eventSourceRefiners)}function I1(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;--t){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}function L1(e,t,n,r,i){switch(t.type){case`RECEIVE_EVENTS`:return R1(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case`RESET_RAW_EVENTS`:return z1(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case`ADD_EVENTS`:return H1(e,t.eventStore,r?r.activeRange:null,i);case`RESET_EVENTS`:return t.eventStore;case`MERGE_EVENTS`:return C1(e,t.eventStore);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return r?s1(e,r.activeRange,i):e;case`REMOVE_EVENTS`:return T1(e,t.eventStore);case`REMOVE_EVENT_SOURCE`:return W1(e,t.sourceId);case`REMOVE_ALL_EVENT_SOURCES`:return w1(e,e=>!e.sourceId);case`REMOVE_ALL_EVENTS`:return S1();default:return e}}function R1(e,t,n,r,i,a){if(t&&n===t.latestFetchId){let n=v1(B1(i,t,a),t,a);return r&&(n=s1(n,r,a)),C1(W1(e,t.sourceId),n)}return e}function z1(e,t,n,r,i){let{defIdMap:a,instanceIdMap:o}=K1(e);return s1(v1(B1(n,t,i),t,i,!1,a,o),r,i)}function B1(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=V1(e,i)),r&&(e=V1(e,r)),e}function V1(e,t){let n;if(!t)n=e;else{n=[];for(let r of e){let e=t(r);e?n.push(e):e??n.push(r)}}return n}function H1(e,t,n,r){return n&&(t=s1(t,n,r)),C1(e,t)}function U1(e,t,n){let{defs:r}=e;return{defs:r,instances:s$(e.instances,e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo}))}}function W1(e,t){return w1(e,e=>e.sourceId!==t)}function G1(e,t){return{defs:e.defs,instances:o$(e.instances,e=>!t[e.instanceId])}}function K1(e){let{defs:t,instances:n}=e,r={},i={};for(let e in t){let{publicId:n}=t[e];n&&(r[n]=e)}for(let e in n){let{publicId:r}=t[n[e].defId];r&&(i[r]=e)}return{defIdMap:r,instanceIdMap:i}}var q1=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){J1(this.handlers,e,t)}off(e,t){Y1(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};function J1(e,t,n){(e[t]||(e[t]=[])).push(n)}function Y1(e,t,n){n?e[t]&&(e[t]=e[t].filter(e=>e!==n)):delete e[t]}var X1={startTime:`09:00`,endTime:`17:00`,daysOfWeek:[1,2,3,4,5],display:`inverse-background`,classNames:`fc-non-business`,groupId:`_businessHours`};function Z1(e,t){return v1(Q1(e),null,t)}function Q1(e){let t;return t=e===!0?[{}]:Array.isArray(e)?e.filter(e=>e.daysOfWeek):typeof e==`object`&&e?[e]:[],t=t.map(e=>Object.assign(Object.assign({},X1),e)),t}function $1(e,t,n){n.emitter.trigger(`select`,Object.assign(Object.assign({},t0(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function e0(e,t){t.emitter.trigger(`unselect`,{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function t0(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));return Object.assign(n,j0(e,t.dateEnv)),n}function n0(e,t,n){let{dateEnv:r,options:i}=n,a=t;
vendor: 41,594 bytes, line 121
121return e?(a=oQ(a),a=r.add(a,i.defaultAllDayEventDuration)):a=r.add(a,i.defaultTimedEventDuration),a}function r0(e,t,n,r){let i=m0(e.defs,t),a=S1();for(let t in e.defs){let o=e.defs[t];a.defs[t]=i0(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],s=a.defs[o.defId];a.instances[t]=a0(o,s,i[o.defId],n,r)}return a}function i0(e,t,n,r){let i=n.standardProps||{};i.hasEnd==null&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function a0(e,t,n,r,i){let{dateEnv:a}=i,o=r.standardProps&&r.standardProps.allDay===!0,s=r.standardProps&&r.standardProps.hasEnd===!1,c=Object.assign({},e);return o&&(c.range=e1(c.range)),r.datesDelta&&n.startEditable&&(c.range={start:a.add(c.range.start,r.datesDelta),end:a.add(c.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(c.range={start:a.add(c.range.start,r.startDelta),end:c.range.end}),r.endDelta&&n.durationEditable&&(c.range={start:c.range.start,end:a.add(c.range.end,r.endDelta)}),s&&(c.range={start:c.range.start,end:n0(t.allDay,c.range.start,i)}),t.allDay&&(c.range={start:oQ(c.range.start),end:oQ(c.range.end)}),c.range.end<c.range.start&&(c.range.end=n0(t.allDay,c.range.start,i)),c}var o0=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:`FETCH_EVENT_SOURCES`,sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},s0=class e{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in u1)console.warn(`Could not set date-related prop 'name'. Use one of the date-related methods instead.`);else if(e===`id`)t=l1[e](t),this.mutate({standardProps:{publicId:t}});else if(e in l1)t=l1[e](t),this.mutate({standardProps:{[e]:t}});else if(e in O1){let n=O1[e](t);n=e===`color`?{backgroundColor:t,borderColor:t}:e===`editable`?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=this._instance.range,i=r1(e.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}}setEnd(e,t={}){let{dateEnv:n}=this._context,r;if(!(e!=null&&(r=n.createMarker(e),!r))&&this._instance){if(r){let e=r1(this._instance.range.end,r,n,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}}setDates(e,t,n={}){let{dateEnv:r}=this._context,i={allDay:n.allDay},a=r.createMarker(e),o;if(a&&!(t!=null&&(o=r.createMarker(t),!o))&&this._instance){let e=this._instance.range;n.allDay===!0&&(e=e1(e));let t=r1(e.start,a,r,n.granularity);if(o){let a=r1(e.end,o,r,n.granularity);LZ(t,a)?this.mutate({datesDelta:t,standardProps:i}):this.mutate({startDelta:t,endDelta:a,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:t,standardProps:i})}}moveStart(e){let t=PZ(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=PZ(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=PZ(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;r??=this._context.options.allDayMaintainDuration,this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=qQ(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(t){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:a}=i.getCurrentData(),o=b1(a,n.instanceId);o=r0(o,{"":{display:``,startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]}},t,i);let s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:`MERGE_EVENTS`,eventStore:o}),i.emitter.trigger(`eventChange`,{oldEvent:s,event:this,relatedEvents:l0(o,i,n),revert(){i.dispatch({type:`RESET_EVENTS`,eventStore:a})}})}}remove(){let e=this._context,t=c0(this);e.dispatch({type:`REMOVE_EVENTS`,eventStore:t}),e.emitter.trigger(`eventRemove`,{event:this,relatedEvents:[],revert(){e.dispatch({type:`MERGE_EVENTS`,eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new o0(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):``}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):``}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||`auto`}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&n.display!==`auto`&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}};function c0(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function l0(e,t,n){let{defs:r,instances:i}=e,a=[],o=n?n.instanceId:``;for(let e in i){let n=i[e],s=r[n.defId];n.instanceId!==o&&a.push(new s0(t,s,n))}return a}function u0(e,t,n,r){let i={},a={},o={},s=[],c=[],l=m0(e.defs,t);for(let t in e.defs){let n=e.defs[t];l[n.defId].display===`inverse-background`&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let o=e.instances[t],u=e.defs[o.defId],d=l[u.defId],f=o.range,p=!u.allDay&&r?t1(f,r):f,m=J$(p,n);m&&(d.display===`inverse-background`?u.groupId?i[u.groupId].push(m):a[o.defId].push(m):d.display!==`none`&&(d.display===`background`?s:c).push({def:u,ui:d,instance:o,range:m,isStart:p.start&&p.start.valueOf()===m.start.valueOf(),isEnd:p.end&&p.end.valueOf()===m.end.valueOf()}))}for(let e in i){let t=i[e],r=K$(t,n);for(let t of r){let n=o[e],r=l[n.defId];s.push({def:n,ui:r,instance:null,range:t,isStart:!1,isEnd:!1})}}for(let t in a){let r=a[t],i=K$(r,n);for(let n of i)s.push({def:e.defs[t],ui:l[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:s,fg:c}}function d0(e){return e.ui.display===`background`||e.ui.display===`inverse-background`}function f0(e,t){e.fcSeg=t}function p0(e){return e.fcSeg||e.parentNode.fcSeg||null}function m0(e,t){return s$(e,e=>h0(e,t))}function h0(e,t){let n=[];return t[``]&&n.push(t[``]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),j1(n)}function g0(e,t){let n=e.map(_0);return n.sort((e,n)=>wZ(e,n,t)),n.map(e=>e._seg)}function _0(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function v0(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:a}=e.eventRange,o=a.startEditable;for(let e of r)o=e(o,i,a,t);return o}function y0(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function b0(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function x0(e,t,n,r,i,a,o){let{dateEnv:s,options:c}=n,{displayEventTime:l,displayEventEnd:u}=c,d=e.eventRange.def,f=e.eventRange.instance;l??=r!==!1,u??=i!==!1;let p=f.range.start,m=f.range.end,h=a||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,_=oQ(p).valueOf()===oQ(h).valueOf(),v=oQ(ZZ(m,-1)).valueOf()===oQ(ZZ(g,-1)).valueOf();return l&&!d.allDay&&(_||v)?(h=_?p:h,g=v?m:g,u&&d.hasEnd?s.formatRange(h,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):s.format(h,t,{forcedTzo:a?null:f.forcedStartTzo})):``}function S0(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Q$(t,r.start)}}function C0(e){let t=[`fc-event`];return e.isMirror&&t.push(`fc-event-mirror`),e.isDraggable&&t.push(`fc-event-draggable`),(e.isStartResizable||e.isEndResizable)&&t.push(`fc-event-resizable`),e.isDragging&&t.push(`fc-event-dragging`),e.isResizing&&t.push(`fc-event-resizing`),e.isSelected&&t.push(`fc-event-selected`),e.isStart&&t.push(`fc-event-start`),e.isEnd&&t.push(`fc-event-end`),e.isPast&&t.push(`fc-event-past`),e.isToday&&t.push(`fc-event-today`),e.isFuture&&t.push(`fc-event-future`),t}function w0(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function T0(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:a,options:o}=t,{eventInteractive:s}=o;return s??(s=n.interactive,s??=!!a.hasHandlers(`eventClick`)),s?mZ(e=>{a.trigger(`eventClick`,{el:e.target,event:new s0(t,n,r),jsEvent:e,view:t.viewApi})}):{}}var E0={start:$,end:$,allDay:Boolean};function D0(e,t,n){let r=O0(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=t.add(i.start,n)}return r}function O0(e,t){let{refined:n,extra:r}=r$(e,E0),i=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return o??=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified),Object.assign({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:o},r)}function k0(e,t){return Y$(e.range,t.range)&&e.allDay===t.allDay&&A0(e,t)}function A0(e,t){for(let n in t)if(n!==`range`&&n!==`allDay`&&e[n]!==t[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}function j0(e,t){return Object.assign(Object.assign({},N0(e.range,t,e.allDay)),{allDay:e.allDay})}function M0(e,t,n){return Object.assign(Object.assign({},N0(e,t,n)),{timeZone:t.timeZone})}function N0(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function P0(e,t,n){let r=p1({editable:!1},n),i=h1(r.refined,r.extra,``,e.allDay,!0,n);return{def:i,ui:h0(i,t),instance:a1(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function F0(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},a=function(e){r||(r=!0,n(e))},o=e(i,a);o&&typeof o.then==`function`&&o.then(i,a)}var I0=class extends Error{constructor(e,t){super(e),this.response=t}};function L0(e,t,n){e=e.toUpperCase();let r={method:e};return e===`GET`?t+=(t.indexOf(`?`)===-1?`?`:`&`)+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":`application/x-www-form-urlencoded`}),fetch(t,r).then(e=>{if(e.ok)return e.json().then(t=>[t,e],()=>{throw new I0(`Failure parsing JSON`,e)});throw new I0(`Request failed`,e)})}var R0;function z0(){return R0??=B0(),R0}function B0(){if(typeof document>`u`)return!0;let e=document.createElement(`div`);e.style.position=`absolute`,e.style.top=`0px`,e.style.left=`0px`,e.innerHTML=`<table><tr><td><div></div></td></tr></table>`,e.querySelector(`table`).style.height=`100px`,e.querySelector(`div`).style.height=`100%`,document.body.appendChild(e);let t=e.querySelector(`div`).offsetHeight>0;return document.body.removeChild(e),t}var V0=class extends j${constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{w$(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{w$(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||t.height===`auto`||t.contentHeight===`auto`,i=!r&&t.height!=null?t.height:``,a=[`fc`,n?`fc-media-print`:`fc-media-screen`,`fc-direction-${t.direction}`,e.theme.getClass(`root`)];return z0()||a.push(`fc-liquid-hack`),e.children(a,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on(`_beforeprint`,this.handleBeforePrint),e.on(`_afterprint`,this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off(`_beforeprint`,this.handleBeforePrint),e.off(`_afterprint`,this.handleAfterPrint)}},H0=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};function U0(e,t){return{component:e,el:t.el,useEventCenter:t.useEventCenter==null||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function W0(e){return{[e.component.uid]:e}}var G0={},K0=class extends PY{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener(`visibilitychange`,this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener(`visibilitychange`,this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,n=t.nowManager.getDateMarker(),{nowIndicatorSnap:r}=t.options;r===`auto`&&(r=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let i,a;return r?(i=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(i,PZ(1,e.unit)).valueOf()-n.valueOf()):(i=n,a=6e4),a=Math.min(864e5,a),{state:{nowDate:i,todayRange:q0(i)},waitMs:a}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};K0.contextType=O$;function q0(e){let t=oQ(e);return{start:t,end:XZ(t,1)}}var J0=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger(`_resize`,!0)}setOption(e,t){this.dispatch({type:`SET_OPTION`,optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t){if(t.start&&t.end)this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e}),this.dispatch({type:`SET_OPTION`,optionName:`visibleRange`,rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e,dateMarker:n.createMarker(t)})}}else this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e})})}zoomTo(e,t){let n=this.getCurrentData(),r;t||=`day`,r=n.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),r?this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:r.type,dateMarker:e}):this.dispatch({type:`CHANGE_DATE`,dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:n}=this.getCurrentData(),r=[].concat(n.header?n.header.viewsWithButtons:[],n.footer?n.footer.viewsWithButtons:[]),i,a;for(let e in t)r.push(e);for(i=0;i<r.length;i+=1)if(a=t[r[i]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:`PREV`})}next(){this.unselect(),this.dispatch({type:`NEXT`})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=PZ(e);n&&(this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),qQ(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),qQ(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=t==null?e.start==null?{start:e,end:null}:e:{start:e,end:t};let r=this.getCurrentData(),i=D0(n,r.dateEnv,PZ({days:1}));i&&(this.dispatch({type:`SELECT_DATES`,selection:i}),$1(i,null,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:`UNSELECT_DATES`}),e0(e,t))}addEvent(e,t){if(e instanceof s0){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:`ADD_EVENTS`,eventStore:y1({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n=this.getCurrentData(),r;if(t instanceof o0)r=t.internalEventSource;else if(typeof t==`boolean`)t&&([r]=l$(n.eventSources));else if(t!=null){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;r=e.internalEventSource}let i=f1(e,r,n,!1);if(i){let e=new s0(n,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:`ADD_EVENTS`,eventStore:y1(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger(`eventAdd`,{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:`REMOVE_EVENTS`,eventStore:c0(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let a=n[i];if(a.publicId===e){if(a.recurringDef)return new s0(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new s0(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return l0(e.eventStore,e)}removeAllEvents(){this.dispatch({type:`REMOVE_ALL_EVENTS`})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new o0(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new o0(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof o0)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[e.internalEventSource]}),e;let n=P1(e,t);return n?(this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[n]}),new o0(t,n)):null}removeAllEventSources(){this.dispatch({type:`REMOVE_ALL_EVENT_SOURCES`})}refetchEvents(){this.dispatch({type:`FETCH_EVENT_SOURCES`,isRefetch:!0})}scrollToTime(e){let t=PZ(e);t&&this.trigger(`_scrollRequest`,{time:t})}};function Y0(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function X0(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function Z0(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function Q0(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function $0(e,t){return{left:e.left-t.left,top:e.top-t.top}}var e2=S1(),t2=class{constructor(){this.getKeysForEventDefs=wQ(this._getKeysForEventDefs),this.splitDateSelection=wQ(this._splitDateSpan),this.splitEventStore=wQ(this._splitEventStore),this.splitIndividualUi=wQ(this._splitIndividualUi),this.splitEventDrag=wQ(this._splitInteraction),this.splitEventResize=wQ(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,n),a=this.splitEventStore(e.eventStore,n),o=this.splitEventDrag(e.eventDrag),s=this.splitEventResize(e.eventResize),c={};this.eventUiBuilders=s$(t,(e,t)=>this.eventUiBuilders[t]||wQ(n2));for(let n in t){let l=t[n],u=a[n]||e2,d=this.eventUiBuilders[n];c[n]={businessHours:l.businessHours||e.businessHours,dateSelection:r[n]||null,eventStore:u,eventUiBases:d(e.eventUiBases[``],l.ui,i[n]),eventSelection:u.instances[e.eventSelection]?e.eventSelection:``,eventDrag:o[n]||null,eventResize:s[n]||null}}return c}_splitDateSpan(e){let t={};if(e){let n=this.getKeysForDateSpan(e);for(let r of n)t[r]=e}return t}_getKeysForEventDefs(e){return s$(e.defs,e=>this.getKeysForEventDef(e))}_splitEventStore(e,t){let{defs:n,instances:r}=e,i={};for(let e in n)for(let r of t[e])i[r]||(i[r]=S1()),i[r].defs[e]=n[e];for(let e in r){let n=r[e];for(let r of t[n.defId])i[r]&&(i[r].instances[e]=n)}return i}_splitIndividualUi(e,t){let n={};for(let r in e)if(r)for(let i of t[r])n[i]||(n[i]={}),n[i][r]=e[r];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),a=r=>{t[r]||(t[r]={affectedEvents:n[r]||e2,mutatedEvents:i[r]||e2,isEvent:e.isEvent})};for(let e in n)a(e);for(let e in i)a(e)}return t}};function n2(e,t,n){let r=[];e&&r.push(e),t&&r.push(t);let i={"":j1(r)};return n&&Object.assign(i,n),i}function r2(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:!!(r&&(!r.activeRange||!Q$(r.activeRange,e))),isOther:!!(r&&!Q$(r.currentRange,e)),isToday:!!(t&&Q$(t,e)),isPast:!!(n?e<n:t&&e<t.start),isFuture:!!(n?e>n:t&&e>=t.end)}}function i2(e,t){let n=[`fc-day`,`fc-day-${JZ[e.dow]}`];return e.isDisabled?n.push(`fc-day-disabled`):(e.isToday&&(n.push(`fc-day-today`),n.push(t.getClass(`today`))),e.isPast&&n.push(`fc-day-past`),e.isFuture&&n.push(`fc-day-future`),e.isOther&&n.push(`fc-day-other`)),n}var a2=qQ({year:`numeric`,month:`long`,day:`numeric`}),o2=qQ({week:`long`});function s2(e,t,n=`day`,r=!0){let{dateEnv:i,options:a,calendarApi:o}=e,s=i.format(t,n===`week`?o2:a2);if(a.navLinks){let e=i.toDate(t),c=e=>{let r=n===`day`?a.navLinkDayClick:n===`week`?a.navLinkWeekClick:null;typeof r==`function`?r.call(o,i.toDate(t),e):(typeof r==`string`&&(n=r),o.zoomTo(t,n))};return Object.assign({title:OZ(a.navLinkHint,[s,e],s),"data-navlink":``},r?pZ(c):{onClick:c})}return{"aria-label":s}}var c2=null;function l2(){return c2===null&&(c2=u2()),c2}function u2(){let e=document.createElement(`div`);nZ(e,{position:`absolute`,top:-1e3,left:0,border:0,padding:0,overflow:`scroll`,direction:`rtl`}),e.innerHTML=`<div></div>`,document.body.appendChild(e);let t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return ZX(e),t}var d2;function f2(){return d2||=p2(),d2}function p2(){let e=document.createElement(`div`);e.style.overflow=`scroll`,e.style.position=`absolute`,e.style.top=`-9999px`,e.style.left=`-9999px`,document.body.appendChild(e);let t=m2(e);return document.body.removeChild(e),t}function m2(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function h2(e,t=!1){let n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,a=parseInt(n.borderTopWidth,10)||0,o=parseInt(n.borderBottomWidth,10)||0,s=m2(e),c=s.y-r-i,l={borderLeft:r,borderRight:i,borderTop:a,borderBottom:o,scrollbarBottom:s.x-a-o,scrollbarLeft:0,scrollbarRight:0};return l2()&&n.direction===`rtl`?l.scrollbarLeft=c:l.scrollbarRight=c,t&&(l.paddingLeft=parseInt(n.paddingLeft,10)||0,l.paddingRight=parseInt(n.paddingRight,10)||0,l.paddingTop=parseInt(n.paddingTop,10)||0,l.paddingBottom=parseInt(n.paddingBottom,10)||0),l}function g2(e,t=!1,n){let r=n?e.getBoundingClientRect():_2(e),i=h2(e,t),a={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(a.left+=i.paddingLeft,a.right-=i.paddingRight,a.top+=i.paddingTop,a.bottom-=i.paddingBottom),a}function _2(e){let t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,right:t.right+window.scrollX,bottom:t.bottom+window.scrollY}}function v2(e){let t=y2(e),n=e.getBoundingClientRect();for(let e of t){let t=X0(n,e.getBoundingClientRect());if(t)n=t;else return null}return n}function y2(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if(n.position===`fixed`)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var b2=class{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let{lefts:t,rights:n}=this,r=t.length,i;for(i=0;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}topToIndex(e){let{tops:t,bottoms:n}=this,r=t.length,i;for(i=0;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return x2(this.tops||[],e.tops||[])&&x2(this.bottoms||[],e.bottoms||[])&&x2(this.lefts||[],e.lefts||[])&&x2(this.rights||[],e.rights||[])}};function x2(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}var S2=class{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}},C2=class extends S2{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}},w2=class extends S2{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}},T2=class extends j${constructor(){super(...arguments),this.uid=gZ()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!QX(e,`.fc-event-mirror`)}isValidDateDownEl(e){return!QX(e,`.fc-event:not(.fc-bg-event)`)&&!QX(e,`.fc-more-link`)&&!QX(e,`a[data-navlink]`)&&!QX(e,`.fc-popover`)}},E2=class{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){let r=Object.assign(Object.assign({},t),{span:j2(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;t.lateral===-1?(M2(r,t.level,t.levelCoord),M2(n,t.level,[e])):M2(n[t.level],t.lateral,e),this.stackCnts[O2(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,a=t.length,o=0,s=-1,c=-1,l=null,u=0;for(let d=0;d<a;d+=1){let a=t[d];if(!r&&a>=o+this.getEntryThickness(e))break;let f=n[d],p,m=N2(f,e.span.start,D2),h=m[0]+m[1];for(;(p=f[h])&&p.span.start<e.span.end;){let e=a+this.getEntryThickness(p);e>o&&(o=e,l=p,s=d,c=h),e===o&&(u=Math.max(u,i[O2(p)]+1)),h+=1}}let d=0;if(l)for(d=s+1;d<a&&t[d]<o;)d+=1;let f=-1;return d<a&&t[d]===o&&(f=N2(n[d],e.span.end,D2)[0]),{touchingLevel:s,touchingLateral:c,touchingEntry:l,stackCnt:u,levelCoord:o,level:d,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],a=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}};function D2(e){return e.span.end}function O2(e){return e.index+`:`+e.span.start}function k2(e){let t=[];for(let n of e){let e=[],r={span:n.span,entries:[n]};for(let n of t)j2(n.span,r.span)?r={entries:n.entries.concat(r.entries),span:A2(n.span,r.span)}:e.push(n);e.push(r),t=e}return t}function A2(e,t){return{start:Math.min(e.start,t.start),end:Math.max(e.end,t.end)}}function j2(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function M2(e,t,n){e.splice(t,0,n)}function N2(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let a=Math.floor(r+(i-r)/2),o=n(e[a]);if(t<o)i=a;else if(t>o)r=a+1;else return[a,1]}return[r,0]}var P2=class{constructor(e,t){this.emitter=new q1}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}},F2={};function I2(e,t){return qQ(!e||t>10?{weekday:`short`}:t>1?{weekday:`short`,month:`numeric`,day:`numeric`,omitCommas:!0}:{weekday:`long`})}var L2=`fc-col-header-cell`;function R2(e){return e.text}var z2=class extends j${render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:a,dateProfile:o}=i,s=r2(a,i.todayRange,null,o),c=[L2].concat(i2(s,n)),l=e.format(a,i.dayHeaderFormat),u=!s.isDisabled&&i.colCnt>1?s2(this.context,a):{},d=e.toDate(a);e.namedTimeZoneImpl&&(d=ZZ(d,36e5));let f=Object.assign(Object.assign(Object.assign({date:d,view:r},i.extraRenderProps),{text:l}),s);return Q(B$,{elTag:`th`,elClasses:c,elAttrs:Object.assign({role:`columnheader`,colSpan:i.colSpan,"data-date":s.isDisabled?void 0:bQ(a)},i.extraDataAttrs),renderProps:f,generatorName:`dayHeaderContent`,customGenerator:t.dayHeaderContent,defaultGenerator:R2,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},e=>Q(`div`,{className:`fc-scrollgrid-sync-inner`},!s.isDisabled&&Q(e,{elTag:`a`,elAttrs:u,elClasses:[`fc-col-header-cell-cushion`,i.isSticky&&`fc-sticky`]})))}},B2=qQ({weekday:`long`}),V2=class extends j${render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,a=XZ(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=t.format(a,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:r}),e.extraRenderProps),{text:s});return Q(B$,{elTag:`th`,elClasses:[L2,...i2(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:`columnheader`,colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:`dayHeaderContent`,customGenerator:i.dayHeaderContent,defaultGenerator:R2,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},n=>Q(`div`,{className:`fc-scrollgrid-sync-inner`},Q(n,{elTag:`a`,elClasses:[`fc-col-header-cell-cushion`,e.isSticky&&`fc-sticky`],elAttrs:{"aria-label":t.format(a,B2)}})))}},H2=class extends j${constructor(){super(...arguments),this.createDayHeaderFormatter=wQ(U2)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return Q(K0,{unit:`day`},(e,o)=>Q(`tr`,{role:`row`},i&&i(`day`),t.map(e=>r?Q(z2,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:a}):Q(V2,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))}};function U2(e,t,n){return e||I2(t,n)}var W2=class{constructor(e,t){let n=e.start,{end:r}=e,i=[],a=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),a.push(n)),n=XZ(n,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(XZ(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor($Z(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}},G2=class{constructor(e,t){let{dates:n}=e,r,i,a;if(t){for(i=n[0].getUTCDay(),r=1;r<n.length&&n[r].getUTCDay()!==i;r+=1);a=Math.ceil(n.length/r)}else a=1,r=n.length;this.rowCnt=a,this.colCnt=r,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,a=e;for(;a<=i;){let o=Math.floor(a/t),s=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&s-1===i}),a=s}}return r}},K2=class{constructor(){this.sliceBusinessHours=wQ(this._sliceBusinessHours),this.sliceDateSelection=wQ(this._sliceDateSpan),this.sliceEventStore=wQ(this._sliceEventStore),this.sliceEventDrag=wQ(this._sliceInteraction),this.sliceEventResize=wQ(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:ZZ(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(s1(e,q2(t,!!n),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let a=u0(e,t,q2(n,!!r),r);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let a=u0(e.mutatedEvents,t,q2(n,!!r),r);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...a){if(!e)return[];let o=q2(t,!!n),s=J$(e.range,o);if(s){e=Object.assign(Object.assign({},e),{range:s});let t=P0(e,r,i),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&e.ui.display===`list-item`&&(n={start:n.start,end:XZ(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}};function q2(e,t){let n=e.activeRange;return t?n:{start:ZZ(n.start,e.slotMinTime.milliseconds),end:ZZ(n.end,e.slotMaxTime.milliseconds-864e5)}}function J2(e,t,n){let{instances:r}=e.mutatedEvents;for(let e in r)if(!Z$(t.validRange,r[e].range))return!1;return X2({eventDrag:e},n)}function Y2(e,t,n){return Z$(t.validRange,e.range)?X2({dateSelection:e},n):!1}function X2(e,t){let n=t.getCurrentData(),r=Object.assign({businessHours:n.businessHours,dateSelection:``,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:``,eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Z2)(r,t)}function Z2(e,t,n={},r){return!(e.eventDrag&&!Q2(e,t,n,r)||e.dateSelection&&!$2(e,t,n,r))}function Q2(e,t,n,r){let i=t.getCurrentData(),a=e.eventDrag,o=a.mutatedEvents,s=o.defs,c=o.instances,l=m0(s,a.isEvent?e.eventUiBases:{"":i.selectionConfig});r&&(l=s$(l,r));let u=G1(e.eventStore,a.affectedEvents.instances),d=u.defs,f=u.instances,p=m0(d,e.eventUiBases);for(let r in c){let o=c[r],m=o.range,h=l[o.defId],g=s[o.defId];if(!e4(h.constraints,m,u,e.businessHours,t))return!1;let{eventOverlap:_}=t.options,v=typeof _==`function`?_:null;for(let e in f){let n=f[e];if(X$(m,n.range)&&(p[n.defId].overlap===!1&&a.isEvent||h.overlap===!1||v&&!v(new s0(t,d[n.defId],n),new s0(t,g,o))))return!1}let y=i.eventStore;for(let e of h.allows){let i=Object.assign(Object.assign({},n),{range:o.range,allDay:g.allDay}),a=y.defs[g.defId],s=y.instances[r],c;if(c=a?new s0(t,a,s):new s0(t,g),!e(t0(i,t),c))return!1}}return!0}function $2(e,t,n,r){let i=e.eventStore,a=i.defs,o=i.instances,s=e.dateSelection,c=s.range,{selectionConfig:l}=t.getCurrentData();if(r&&(l=r(l)),!e4(l.constraints,c,i,e.businessHours,t))return!1;let{selectOverlap:u}=t.options,d=typeof u==`function`?u:null;for(let e in o){let n=o[e];if(X$(c,n.range)&&(l.overlap===!1||d&&!d(new s0(t,a[n.defId],n),null)))return!1}for(let e of l.allows)if(!e(t0(Object.assign(Object.assign({},n),s),t),null))return!1;return!0}function e4(e,t,n,r,i){for(let a of e)if(!r4(t4(a,t,n,r,i),t))return!1;return!0}function t4(e,t,n,r,i){return e===`businessHours`?n4(s1(r,t,i)):typeof e==`string`?n4(w1(n,t=>t.groupId===e)):typeof e==`object`&&e?n4(s1(e,t,i)):[]}function n4(e){let{instances:t}=e,n=[];for(let e in t)n.push(t[e].range);return n}function r4(e,t){for(let n of e)if(Z$(n,t))return!0;return!1}var i4=/^(visible|hidden)$/,a4=class extends j${constructor(){super(...arguments),this.handleEl=e=>{this.el=e,P$(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=[`fc-scroller`];return t&&(n?i.push(`fc-scroller-liquid-absolute`):i.push(`fc-scroller-liquid`)),Q(`div`,{ref:this.handleEl,className:i.join(` `),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||``,right:r&&-(e.overcomeRight||0)||``,bottom:r&&-(e.overcomeBottom||0)||``,marginLeft:!r&&-(e.overcomeLeft||0)||``,marginRight:!r&&-(e.overcomeRight||0)||``,marginBottom:!r&&-(e.overcomeBottom||0)||``,maxHeight:e.maxHeight||``}},e.children)}needsXScrolling(){if(i4.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(i4.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return i4.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return i4.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},o4=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>
121{let{depths:n,currentMap:r}=this,i=!1,a=!1;e===null?(--n[t],n[t]||(delete r[t],delete this.callbackMap[t],i=!0)):(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0),this.masterCallback&&(i&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||=this.callbackMap[e]=t=>{this.handleValue(t,String(e))},t}collect(e,t,n){return g$(this.currentMap,e,t,n)}getAll(){return l$(this.currentMap)}};function s4(e){let t=eZ(e,`.fc-scrollgrid-shrink`),n=0;for(let e of t)n=Math.max(n,jZ(e));return Math.ceil(n)}function c4(e,t){return e.liquid&&t.liquid}function l4(e,t){return t.maxHeight!=null||c4(e,t)}function u4(e,t,n,r){let{expandRows:i}=n;return typeof t.content==`function`?t.content(n):Q(`table`,{role:`presentation`,className:[t.tableClassName,e.syncRowHeights?`fc-scrollgrid-sync-table`:``].join(` `),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:``}},n.tableColGroupNode,Q(r?`thead`:`tbody`,{role:`presentation`},typeof t.rowContent==`function`?t.rowContent(n):t.rowContent))}function d4(e,t){return qZ(e,t,u$)}function f4(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(Q(`col`,{style:{width:r.width===`shrink`?p4(t):r.width||``,minWidth:r.minWidth||``}}))}return Q(`colgroup`,{},...n)}function p4(e){return e??4}function m4(e){for(let t of e)if(t.width===`shrink`)return!0;return!1}function h4(e,t){let n=[`fc-scrollgrid`,t.theme.getClass(`table`)];return e&&n.push(`fc-scrollgrid-liquid`),n}function g4(e,t){let n=[`fc-scrollgrid-section`,`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&e.maxHeight==null&&n.push(`fc-scrollgrid-section-liquid`),e.isSticky&&n.push(`fc-scrollgrid-section-sticky`),n}function _4(e){return Q(`div`,{className:`fc-scrollgrid-sticky-shim`,style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function v4(e){let{stickyHeaderDates:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}function y4(e){let{stickyFooterScrollbar:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}var b4=class extends j${constructor(){super(...arguments),this.processCols=wQ(e=>e,d4),this.renderMicroColGroup=wQ(f4),this.scrollerRefs=new o4,this.scrollerElRefs=new o4(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),a=this.renderMicroColGroup(i,t.shrinkWidth),o=h4(e.liquid,n);e.collapsibleWidth&&o.push(`fc-scrollgrid-collapsible`);let s=r.length,c=0,l,u=[],d=[],f=[];for(;c<s&&(l=r[c]).type===`header`;)u.push(this.renderSection(l,a,!0)),c+=1;for(;c<s&&(l=r[c]).type===`body`;)d.push(this.renderSection(l,a,!1)),c+=1;for(;c<s&&(l=r[c]).type===`footer`;)f.push(this.renderSection(l,a,!0)),c+=1;let p=!z0(),m={role:`rowgroup`};return Q(`table`,{role:`grid`,className:o.join(` `),style:{height:e.height}},!!(!p&&u.length)&&Q(`thead`,m,...u),!!(!p&&d.length)&&Q(`tbody`,m,...d),!!(!p&&f.length)&&Q(`tfoot`,m,...f),p&&Q(`tbody`,m,...u,...d,...f))}renderSection(e,t,n){return`outerContent`in e?Q(OY,{key:e.key},e.outerContent):Q(`tr`,{key:e.key,role:`presentation`,className:g4(e,this.props.liquid).join(` `)},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if(`outerContent`in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:s}=this.state,c=l4(i,e),l=c4(i,e),u=i.liquid?a?`scroll`:c?`auto`:`hidden`:`visible`,d=e.key,f=u4(e,n,{tableColGroupNode:t,tableMinWidth:``,clientWidth:!i.collapsibleWidth&&o[d]!==void 0?o[d]:null,clientHeight:s[d]===void 0?null:s[d],expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return Q(r?`th`:`td`,{ref:n.elRef,role:`presentation`},Q(`div`,{className:`fc-scroller-harness${l?` fc-scroller-harness-liquid`:``}`},Q(a4,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?`hidden`:`visible`,maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=x4(this.props.sections,t);n&&P$(n.chunk.scrollerElRef,e)}
vendor: 22,246 bytes, line 121
121componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return m4(this.props.cols)?s4(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=f2(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,s=n.currentMap[o];if(s){let t=s.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:a}}};b4.addStateEquality({scrollerClientWidths:u$,scrollerClientHeights:u$});function x4(e,t){for(let n of e)if(n.key===t)return n;return null}var S4=class extends j${constructor(){super(...arguments),this.buildPublicEvent=wQ((e,t,n)=>new s0(e,t,n)),this.handleEl=e=>{this.el=e,P$(this.props.elRef,e),e&&f0(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:a}=i,o={event:this.buildPublicEvent(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&v0(r,t),isStartResizable:!e.disableResizing&&y0(r,t),isEndResizable:!e.disableResizing&&b0(r),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!r.isStart,isEnd:!!r.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return Q(B$,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...C0(o),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:`eventContent`,customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&f0(this.el,this.props.seg)}},C4=class extends j${render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,a=x0(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Q(S4,Object.assign({},e,{elTag:`a`,elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:T0(r,t),defaultGenerator:w4,timeText:a}),(e,t)=>Q(OY,null,Q(e,{elTag:`div`,elClasses:[`fc-event-main`],elStyle:{color:t.textColor}}),!!t.isStartResizable&&Q(`div`,{className:`fc-event-resizer fc-event-resizer-start`}),!!t.isEndResizable&&Q(`div`,{className:`fc-event-resizer fc-event-resizer-end`})))}};C4.addPropsEquality({seg:u$});function w4(e){return Q(`div`,{className:`fc-event-main-frame`},e.timeText&&Q(`div`,{className:`fc-event-time`},e.timeText),Q(`div`,{className:`fc-event-title-container`},Q(`div`,{className:`fc-event-title fc-sticky`},e.event.title||Q(OY,null,`\xA0`))))}var T4=e=>Q(O$.Consumer,null,t=>{let{options:n}=t,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Q(B$,{elRef:e.elRef,elTag:e.elTag||`div`,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:r,generatorName:`nowIndicatorContent`,customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}),E4=qQ({day:`numeric`}),D4=class extends j${constructor(){super(...arguments),this.refineRenderProps=TQ(k4)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return Q(B$,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":bQ(e.date)}),elClasses:[...i2(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:`dayCellContent`,customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}};function O4(e){return!!(e.dayCellContent||I$(`dayCellContent`,e))}function k4(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,a=r2(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:E4):``;return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}var A4=class extends j${render(){let{props:e}=this,{seg:t}=e;return Q(S4,{elTag:`div`,elClasses:[`fc-bg-event`],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:j4,seg:t,timeText:``,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};function j4(e){let{title:t}=e.event;return t&&Q(`div`,{className:`fc-event-title`},e.event.title)}function M4(e){return Q(`div`,{className:`fc-${e}`})}var N4=e=>Q(O$.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,a=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,a),date:i};return Q(B$,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:o,generatorName:`weekNumberContent`,customGenerator:r.weekNumberContent,defaultGenerator:P4,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)});function P4(e){return e.text}var F4=10,I4=class extends j${constructor(){super(...arguments),this.state={titleId:oZ()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&P$(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=iZ(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key===`Escape`&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=[`fc-popover`,e.getClass(`popover`)].concat(n.extraClassNames||[]);return OX(Q(`div`,Object.assign({},n.extraAttrs,{id:n.id,className:i.join(` `),"aria-labelledby":r.titleId,ref:this.handleRootEl}),Q(`div`,{className:`fc-popover-header `+e.getClass(`popoverHeader`)},Q(`span`,{className:`fc-popover-title`,id:r.titleId},n.title),Q(`span`,{className:`fc-popover-close `+e.getIconClass(`close`),title:t.closeHint,onClick:this.handleCloseClick})),Q(`div`,{className:`fc-popover-body `+e.getClass(`popoverContent`)},n.children)),n.parentEl)}componentDidMount(){document.addEventListener(`mousedown`,this.handleDocumentMouseDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener(`mousedown`,this.handleDocumentMouseDown),document.removeEventListener(`keydown`,this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=v2(t);if(i){let a=r.getBoundingClientRect(),o=n?QX(t,`.fc-scrollgrid`).getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;o=Math.max(o,F4),s=Math.min(s,document.documentElement.clientWidth-F4-a.width),s=Math.max(s,F4);let c=r.offsetParent.getBoundingClientRect();nZ(r,{top:o-c.top,left:s-c.left})}}},L4=class extends T2{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:a}=n,o=t.format(r,e.dayPopoverFormat);return Q(D4,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:i},(t,r,i)=>Q(I4,{elRef:i.ref,id:n.id,title:o,extraClassNames:[`fc-more-popover`].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},O4(e)&&Q(t,{elTag:`div`,elClasses:[`fc-more-popover-misc`]}),n.children))}queryHit(e,t,n,r){let{rootEl:i,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}},R4=class extends j${constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:oZ()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&P$(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=B4(t).start;function a(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new s0(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}typeof r==`function`&&(r=r({date:i,allDay:!!t.allDayDate,allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),!r||r===`popover`?this.setState({isPopoverOpen:!0}):typeof r==`string`&&n.calendarApi.zoomTo(i,r)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return Q(O$.Consumer,null,n=>{let{viewApi:r,options:i,calendarApi:a}=n,{moreLinkText:o}=i,{moreCnt:s}=e,c=B4(e),l=typeof o==`function`?o.call(a,s):`+${s} ${o}`,u=OZ(i.moreLinkHint,[s],l),d={num:s,shortText:`+${s}`,text:l,view:r};return Q(OY,null,!!e.moreCnt&&Q(B$,{elTag:e.elTag||`a`,elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],`fc-more-link`],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),pZ(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:``}),renderProps:d,generatorName:`moreLinkContent`,customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||z4,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&Q(L4,{id:t.popoverId,startDate:c.start,endDate:c.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=QX(this.linkEl,`.fc-view-harness`))}};function z4(e){return e.text}function B4(e){if(e.allDayDate)return{start:e.allDayDate,end:XZ(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:V4(t),end:U4(t)}}function V4(e){return e.reduce(H4).eventRange.range.start}function H4(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function U4(e){return e.reduce(W4).eventRange.range.end}function W4(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var G4=class{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}},K4=class extends G4{constructor(){super(...arguments),this.map=new Map}handle(e){let{map:t}=this,n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}},q4=[],J4={code:`en`,week:{dow:0,doy:4},direction:`ltr`,buttonText:{prev:`prev`,next:`next`,prevYear:`prev year`,nextYear:`next year`,year:`year`,today:`today`,month:`month`,week:`week`,day:`day`,list:`list`},weekText:`W`,weekTextLong:`Week`,closeHint:`Close`,timeHint:`Time`,eventHint:`Event`,allDayText:`all-day`,moreLinkText:`more`,noEventsText:`No events to display`},Y4=Object.assign(Object.assign({},J4),{buttonHints:{prev:`Previous $0`,next:`Next $0`,today(e,t){return t===`day`?`Today`:`This ${e}`}},viewHint:`$0 view`,navLinkHint:`Go to $0`,moreLinkHint(e){return`Show ${e} more event${e===1?``:`s`}`}});function X4(e){let t=e.length>0?e[0].code:`en`,n=q4.concat(e),r={en:Y4};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function Z4(e,t){return typeof e==`object`&&!Array.isArray(e)?e3(e.code,[e.code],e):Q4(e,t)}function Q4(e,t){let n=[].concat(e||[]);return e3(e,n,$4(n,t)||Y4)}function $4(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split(`-`);for(let e=r.length;e>0;--e){let n=r.slice(0,e).join(`-`);if(t[n])return t[n]}}return null}function e3(e,t,n){let r=a$([J4,n],[`buttonText`]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function t3(e){return{id:gZ(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||``,elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function n3(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:``,elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let t of e){let e=t.name,a=n[e];a===void 0?(n[e]=t.id,i(t.deps),r=i3(r,t)):a!==t.id&&console.warn(`Duplicate plugin '${e}'`)}}return e&&i(e),i(t),r}function r3(){let e=[],t=[],n;return(r,i)=>((!n||!qZ(r,e)||!qZ(i,t))&&(n=n3(r,i)),e=r,t=i,n)}function i3(e,t){return{premiumReleaseDate:a3(e.premiumReleaseDate,t.premiumReleaseDate),reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},e.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},e.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},e.propSetHandlers),t.propSetHandlers)}}function a3(e,t){return e===void 0?t:t===void 0?e:new Date(Math.max(e.valueOf(),t.valueOf()))}var o3=class extends C${};o3.prototype.classes={root:`fc-theme-standard`,tableCellShaded:`fc-cell-shaded`,buttonGroup:`fc-button-group`,button:`fc-button fc-button-primary`,buttonActive:`fc-button-active`},o3.prototype.baseIconClass=`fc-icon`,o3.prototype.iconClasses={close:`fc-icon-x`,prev:`fc-icon-chevron-left`,next:`fc-icon-chevron-right`,prevYear:`fc-icon-chevrons-left`,nextYear:`fc-icon-chevrons-right`},o3.prototype.rtlIconClasses={prev:`fc-icon-chevron-right`,next:`fc-icon-chevron-left`,prevYear:`fc-icon-chevrons-right`,nextYear:`fc-icon-chevrons-left`},o3.prototype.iconOverrideOption=`buttonIcons`,o3.prototype.iconOverrideCustomButtonOption=`icon`,o3.prototype.iconOverridePrefix=`fc-icon-`;function s3(e,t){let n={},r;for(r in e)c3(r,n,e,t);for(r in t)c3(r,n,e,t);return n}function c3(e,t,n,r){if(t[e])return t[e];let i=l3(e,t,n,r);return i&&(t[e]=i),i}function l3(e,t,n,r){let i=n[e],a=r[e],o=e=>i&&i[e]!==null?i[e]:a&&a[e]!==null?a[e]:null,s=o(`component`),c=o(`superType`),l=null;if(c){if(c===e)throw Error(`Can't have a custom view type that references itself`);l=c3(c,t,n,r)}return!s&&l&&(s=l.component),s?{type:e,component:s,defaults:Object.assign(Object.assign({},l?l.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},l?l.overrides:{}),a?a.rawOptions:{})}:null}function u3(e){return s$(e,d3)}function d3(e){let t=typeof e==`function`?{component:e}:e,{component:n}=t;return t.content?n=f3(t):n&&!(n.prototype instanceof j$)&&(n=f3(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function f3(e){return t=>Q(O$.Consumer,null,n=>Q(B$,{elTag:`div`,elClasses:W$(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function p3(e,t,n,r){let i=u3(e),a=u3(t.views);return s$(s3(i,a),e=>m3(e,a,t,n,r))}function m3(e,t,n,r,i){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s=``,c=``,l={};if(a&&(o=g3(a),o)){let e=KZ(o);s=e.unit,e.value===1&&(c=s,l=t[s]?t[s].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:c,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},l),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u(YQ)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d(YQ)}}var h3={};function g3(e){let t=JSON.stringify(e),n=h3[t];return n===void 0&&(n=PZ(e),h3[t]=n),n}function _3(e,t){return t.type===`CHANGE_VIEW_TYPE`&&(e=t.viewType),e}function v3(e,t){switch(t.type){case`CHANGE_DATE`:return t.dateMarker;default:return e}}function y3(e,t,n){let r=e.initialDate;return r==null?n.getDateMarker():t.createMarker(r)}function b3(e,t){switch(t.type){case`SET_OPTION`:return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}function x3(e,t,n,r){let i;switch(t.type){case`CHANGE_VIEW_TYPE`:return r.build(t.dateMarker||n);case`CHANGE_DATE`:return r.build(t.dateMarker);case`PREV`:if(i=r.buildPrev(e,n),i.isValid)return i;break;case`NEXT`:if(i=r.buildNext(e,n),i.isValid)return i}return e}function S3(e,t,n){let r=t?t.activeRange:null;return E3({},P3(e,n),r,n)}function C3(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case`ADD_EVENT_SOURCES`:return E3(e,t.sources,i,r);case`REMOVE_EVENT_SOURCE`:return D3(e,t.sourceId);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return n?O3(e,i,r):e;case`FETCH_EVENT_SOURCES`:return A3(e,t.sourceIds?c$(t.sourceIds):N3(e,r),i,t.isRefetch||!1,r);case`RECEIVE_EVENTS`:case`RECEIVE_EVENT_ERROR`:return M3(e,t.sourceId,t.fetchId,t.fetchRange);case`REMOVE_ALL_EVENT_SOURCES`:return{};default:return e}}function w3(e,t,n){let r=t?t.activeRange:null;return A3(e,N3(e,n),r,!0,n)}function T3(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function E3(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=O3(i,n,r)),Object.assign(Object.assign({},e),i)}function D3(e,t){return o$(e,e=>e.sourceId!==t)}function O3(e,t,n){return A3(e,o$(e,e=>k3(e,t,n)),t,!1,n)}function k3(e,t,n){return F3(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function A3(e,t,n,r,i){let a={};for(let o in e){let s=e[o];
121a[o]=t[o]?j3(s,n,r,i):s}return a}function j3(e,t,n,r){let{options:i,calendarApi:a}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=gZ();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(a,o,n.response)||o),e.success&&(o=e.success.call(a,o,n.response)||o),r.dispatch({type:`RECEIVE_EVENTS`,sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})},n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(a,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:`RECEIVE_EVENT_ERROR`,sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:s})}function M3(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}function N3(e,t){return o$(e,e=>F3(e,t))}function P3(e,t){let n=F1(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=P1(e,t,n);r&&i.push(r)}return i}function F3(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function I3(e,t){switch(t.type){case`UNSELECT_DATES`:return null;case`SELECT_DATES`:return t.selection;default:return e}}function L3(e,t){switch(t.type){case`UNSELECT_EVENT`:return``;case`SELECT_EVENT`:return t.eventInstanceId;default:return e}}function R3(e,t){let n;switch(t.type){case`UNSET_EVENT_DRAG`:return null;case`SET_EVENT_DRAG`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function z3(e,t){let n;switch(t.type){case`UNSET_EVENT_RESIZE`:return null;case`SET_EVENT_RESIZE`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function B3(e,t,n,r,i){return{header:e.headerToolbar?V3(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?V3(e.footerToolbar,e,t,n,r,i):null}}function V3(e,t,n,r,i,a){let o={},s=[],c=!1;for(let l in e){let u=e[l],d=H3(u,t,n,r,i,a);o[l]=d.widgets,s.push(...d.viewsWithButtons),c||=d.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:c}}function H3(e,t,n,r,i,a){let o=t.direction===`rtl`,s=t.customButtons||{},c=n.buttonText||{},l=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(` `):[],p=[],m=!1;return{widgets:f.map(e=>e.split(`,`).map(e=>{if(e===`title`)return m=!0,{buttonName:e};let n,f,h,g,_,v;if(n=s[e])h=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(_=n.text),v=n.hint||n.text;else if(f=i[e]){p.push(e),h=()=>{a.changeView(e)},(_=f.buttonTextOverride)||(g=r.getIconClass(e,o))||(_=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;v=OZ(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e]){if(h=()=>{a[e]()},(_=c[e])||(g=r.getIconClass(e,o))||(_=l[e]),e===`prevYear`||e===`nextYear`){let t=e===`prevYear`?`prev`:`next`;v=OZ(u[t]||d[t],[l.year||`year`,`year`],l[e])}else v=t=>OZ(u[e]||d[e],[l[t]||t,t],l[e])}return{buttonName:e,buttonClick:h,buttonIcon:g,buttonText:_,buttonHint:v}})),viewsWithButtons:p,hasTitle:m}}var U3=class{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},W3=t3({name:`array-event-source`,eventSourceDefs:[{ignoreRange:!0,parseMeta(e){return Array.isArray(e.events)?e.events:null},fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),G3=t3({name:`func-event-source`,eventSourceDefs:[{parseMeta(e){return typeof e.events==`function`?e.events:null}
vendor: 9,279 bytes, line 121
121,fetch(e,t,n){let{dateEnv:r}=e.context,i=e.eventSource.meta;F0(i.bind(null,M0(e.range,r)),e=>t({rawEvents:e}),n)}}]}),K3=t3({name:`json-event-source`,eventSourceRefiners:{method:String,extraParams:$,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(e){return e.url&&(e.format===`json`||!e.format)?{url:e.url,format:`json`,method:(e.method||`GET`).toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch(e,t,n){let{meta:r}=e.eventSource,i=q3(r,e.range,e.context);L0(r.method,r.url,i).then(([e,n])=>{t({rawEvents:e,response:n})},n)}}]});function q3(e,t,n){let{dateEnv:r,options:i}=n,a,o,s,c,l={};return a=e.startParam,a??=i.startParam,o=e.endParam,o??=i.endParam,s=e.timeZoneParam,s??=i.timeZoneParam,c=typeof e.extraParams==`function`?e.extraParams():e.extraParams||{},Object.assign(l,c),l[a]=r.formatIso(t.start),l[o]=r.formatIso(t.end),r.timeZone!==`local`&&(l[s]=r.timeZone),l}var J3=t3({name:`simple-recurring-event`,recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t},r;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=zZ(e.endTime,e.startTime)),{allDayGuess:!e.startTime&&!e.endTime,duration:r,typeData:n}}return null},expand(e,t,n){let r=J$(t,{start:e.startRecur,end:e.endRecur});return r?Y3(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:$,startTime:PZ,endTime:PZ,duration:PZ,startRecur:$,endRecur:$}});function Y3(e,t,n,r,i){let a=e?c$(e):null,o=oQ(i.start),s=i.end,c=[];for(t&&(t.milliseconds<0?s=XZ(s,1):t.milliseconds>=864e5&&(o=XZ(o,-1)));o<s;){let e;(!a||a[o.getUTCDay()])&&(e=t?r.add(o,t):o,c.push(r.createMarker(n.toDate(e)))),o=XZ(o,1)}return c}var X3=t3({name:`change-handler`,optionChangeHandlers:{events(e,t){Z3([e],t)},eventSources:Z3}});function Z3(e,t){let n=l$(t.getCurrentData().eventSources);if(n.length===1&&e.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(e[0])){t.dispatch({type:`RESET_RAW_EVENTS`,sourceId:n[0].sourceId,rawEvents:e[0]});return}let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}function Q3(e,t){t.emitter.trigger(`datesSet`,Object.assign(Object.assign({},M0(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function $3(e,t){let{emitter:n}=t;n.hasHandlers(`eventsSet`)&&n.trigger(`eventsSet`,l0(e,t))}var e6=[W3,G3,K3,J3,X3,t3({name:`misc`,isLoadingFuncs:[e=>T3(e.eventSources)],propSetHandlers:{dateProfile:Q3,eventStore:$3}})],t6=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new XX(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],n;for(;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};function n6(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,qQ(t.titleFormat||r6(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function r6(e){let{currentRangeUnit:t}=e;if(t===`year`)return{year:`numeric`};if(t===`month`)return{year:`numeric`,month:`long`};let n=aQ(e.currentRange.start,e.currentRange.end);return n!==null&&n>1?{year:`numeric`,month:`short`,day:`numeric`}:{year:`numeric`,month:`long`,day:`numeric`}}var i6=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let n=this.dateEnv;if(e!==n&&(typeof t==`function`?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(let e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}},a6=class{constructor(e){this.computeCurrentViewData=wQ(this._computeCurrentViewData),this.organizeRawLocales=wQ(X4),this.buildLocale=wQ(Z4),this.buildPluginHooks=r3(),this.buildDateEnv=wQ(o6),this.buildTheme=wQ(s6),this.parseToolbars=wQ(B3),this.buildViewSpecs=wQ(p3),this.buildDateProfileGenerator=TQ(c6),this.buildViewApi=wQ(l6),this.buildViewUiProps=TQ(f6),this.buildEventUiBySource=wQ(u6,u$),this.buildEventUiBases=wQ(d6),this.parseContextBusinessHours=TQ(m6),this.buildTitle=wQ(n6),this.nowManager=new i6,this.emitter=new q1,this.actionRunner=new t6(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new i6;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=y3(n.calendarOptions,n.dateEnv,this.nowManager),s=i.dateProfileGenerator.build(o);Q$(s.activeRange,o)||(o=s.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let c=S3(n.calendarOptions,s,a),l={dynamicOptionOverrides:t,currentViewType:r,currentDate:o,dateProfile:s,businessHours:this.parseContextBusinessHours(a),eventSources:c,eventUiBases:{},eventStore:S1(),renderableEventStore:S1(),dateSelection:null,eventSelection:``,eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},u=Object.assign(Object.assign({},a),l);for(let e of n.pluginHooks.reducers)Object.assign(l,e(null,null,u));p6(l,a)&&this.emitter.trigger(`loading`,!0),this.state=l,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;t===void 0?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:`NOTHING`})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=b3(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=_3(n.currentViewType,e),s=this.computeCurrentViewData(o,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);let c={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:l,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(u=s.dateProfileGenerator.build(l)),l=v3(l,e),u=x3(u,e,l,s.dateProfileGenerator),(e.type===`PREV`||e.type===`NEXT`||!Q$(u.currentRange,l))&&(l=u.currentRange.start);let d=C3(n.eventSources,e,u,c),f=L1(n.eventStore,e,d,u,c),p=T3(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:h}=this.buildViewUiProps(c),g=this.buildEventUiBySource(d),_=this.buildEventUiBases(p.defs,m,g),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:l,dateProfile:u,eventSources:d,eventStore:f,renderableEventStore:p,selectionConfig:h,eventUiBases:_,businessHours:this.parseContextBusinessHours(c),dateSelection:I3(n.dateSelection,e),eventSelection:L3(n.eventSelection,e),eventDrag:R3(n.eventDrag,e),eventResize:z3(n.eventResize,e)},y=Object.assign(Object.assign({},c),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=p6(n,c),x=p6(v,c);!b&&x?r.trigger(`loading`,!0):b&&!x&&r.trigger(`loading`,!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,c=r.calendarOptions;if(s&&s!==c){s.timeZone!==c.timeZone&&(t.eventSources=a.eventSources=w3(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=U1(a.eventStore,
121n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=U1(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in o)(this.optionsForHandling.indexOf(e)!==-1||s[e]!==c[e])&&o[e](c[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o,extra:s}=this.processRawCalendarOptions(e,t);h6(s);let c=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),l=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,l,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:c,viewSpecs:l,theme:u,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=n$([YQ,e,t]),i=this.organizeRawLocales(n),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],e6),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},JQ),XQ),ZQ),s.listenerRefiners),s.optionRefiners),l={},u=n$([YQ,o,e,t]),d={},f=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,m=!1;for(let e in u)this.optionsForRefining.indexOf(e)===-1&&(u[e]===f[e]||QQ[e]&&e in f&&QQ[e](f[e],u[e]))?d[e]=p[e]:c[e]?(d[e]=c[e](u[e]),m=!0):l[e]=f[e];return m&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:o,extra:l}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return h6(o),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:i,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let a=n$([YQ,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},JQ),XQ),ZQ),t$),t.listenerRefiners),t.optionRefiners),s={},c=this.currentViewOptionsInput,l=this.currentViewOptionsRefined,u=!1,d={};for(let e in a)a[e]===c[e]||QQ[e]&&QQ[e](a[e],c[e])?s[e]=l[e]:(a[e]===this.currentCalendarOptionsInput[e]||QQ[e]&&QQ[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(s[e]=this.currentCalendarOptionsRefined[e]):o[e]?s[e]=o[e](a[e]):d[e]=a[e],u=!0);return u&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}};function o6(e,t,n,r,i,a,o,s){let c=Z4(t||o.defaultCode,o.map);return new S$({calendarSystem:`gregory`,timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:c,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:a.cmdFormatter,defaultSeparator:s})}function s6(e,t){return new(t.themeClasses[e.themeSystem]||o3)(e)}function c6(e){return new(e.dateProfileGeneratorClass||i1)(e)}function l6(e,t,n){return new U3(e,t,n)}function u6(e){return s$(e,e=>e.ui)}function d6(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function f6(e){let{options:t}=e;return{eventUiSingleBase:A1({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap==`boolean`?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroun
vendor: 4,219 bytes, line 121
121dColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:A1({constraint:t.selectConstraint,overlap:typeof t.selectOverlap==`boolean`?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function p6(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function m6(e){return Z1(e.options.businessHours,e)}function h6(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:``))}var g6=class extends j${render(){return Q(`div`,{className:`fc-toolbar-chunk`},...this.props.widgetGroups.map(e=>this.renderWidgetGroup(e)))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let a of e){let{buttonName:e,buttonClick:o,buttonText:s,buttonIcon:c,buttonHint:l}=a;if(e===`title`)i=!1,r.push(Q(`h2`,{className:`fc-toolbar-title`,id:t.titleId},t.title));else{let i=e===t.activeButton,a=!t.isTodayEnabled&&e===`today`||!t.isPrevEnabled&&e===`prev`||!t.isNextEnabled&&e===`next`,u=[`fc-${e}-button`,n.getClass(`button`)];i&&u.push(n.getClass(`buttonActive`)),r.push(Q(`button`,{type:`button`,title:typeof l==`function`?l(t.navUnit):l,disabled:a,"aria-pressed":i,className:u.join(` `),onClick:o},s||(c?Q(`span`,{className:c,role:`img`}):``)))}}return r.length>1?Q(`div`,{className:i&&n.getClass(`buttonGroup`)||``},...r):r[0]}},_6=class extends j${render(){let{model:e,extraClassName:t}=this.props,n=!1,r,i,a=e.sectionWidgets,o=a.center;return a.left?(n=!0,r=a.left):r=a.start,a.right?(n=!0,i=a.right):i=a.end,Q(`div`,{className:[t||``,`fc-toolbar`,n?`fc-toolbar-ltr`:``].join(` `)},this.renderSection(`start`,r||[]),this.renderSection(`center`,o||[]),this.renderSection(`end`,i||[]))}renderSection(e,t){let{props:n}=this;return Q(g6,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}},v6=class extends j${constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,P$(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=[`fc-view-harness`,n||e.liquid||e.height?`fc-view-harness-active`:`fc-view-harness-passive`],i=``,a=``;return n?t.availableWidth===null?a=`${1/n*100}%`:i=t.availableWidth/n:i=e.height||``,Q(`div`,{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(` `),style:{height:i,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},y6=class extends H0{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=p0(t);if(i&&n.isValidSegDownEl(e.target)){let a=QX(e.target,`.fc-event-forced-url`),o=a?a.querySelector(`a[href]`).href:``;r.emitter.trigger(`eventClick`,{el:t,event:new s0(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=lZ(e.el,`click`,`.fc-event`,this.handleSegClick)}},b6=class extends H0{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{p0(t)&&(this.currentSegEl=t,this.triggerEvent(`eventMouseEnter`,e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent(`eventMouseLeave`,e,t))},this.removeHoverListeners=uZ(e.el,`.fc-event`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,a=p0(n);(!t||r.isValidSegDownEl(t.target))&&i.emitter.trigger(e,{el:n,event:new s0(i,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:i.viewApi})}},x6=class extends A${constructor(){super(...arguments),this.buildViewContext=wQ(k$),this.buildViewPropTransformers=wQ(C6),this.buildToolbarProps=wQ(S6),this.headerRef=DY(),this.footerRef=DY(),this.interactionsStore={},this.state={viewLabelId:oZ()},this.registerInteractiveComponent=(e,t)=>
vendor: 4,610 bytes, line 121
121{let n=U0(e,t),r=[y6,b6].concat(this.props.pluginHooks.componentInteractions).map(e=>new e(n));this.interactionsStore[e.uid]=r,G0[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete G0[e.uid]},this.resizeRunner=new XX(()=>{this.props.emitter.trigger(`_resize`,!0),this.props.emitter.trigger(`windowResize`,{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:n}=e,r=!1,i=``,a;e.isHeightAuto||e.forPrint?i=``:n.height==null?n.contentHeight==null?a=Math.max(n.aspectRatio,.5):i=n.contentHeight:r=!0;let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=t.header&&t.header.hasTitle?this.state.viewLabelId:void 0;return Q(O$.Provider,{value:o},Q(K0,{unit:`day`},n=>{let o=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,n,e.viewTitle);return Q(OY,null,t.header&&Q(_6,Object.assign({ref:this.headerRef,extraClassName:`fc-header-toolbar`,model:t.header,titleId:s},o)),Q(v6,{liquid:r,height:i,aspectRatio:a,labeledById:s},this.renderView(e),this.buildAppendContent()),t.footer&&Q(_6,Object.assign({ref:this.footerRef,extraClassName:`fc-footer-toolbar`,model:t.footer,titleId:``},o)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(t=>new t(e)),window.addEventListener(`resize`,this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger(`_unmount`)}buildAppendContent(){let{props:e}=this;return Q(OY,{},...e.pluginHooks.viewContainerAppends.map(t=>t(e)))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));let a=n.component;return Q(a,Object.assign({},r))}};function S6(e,t,n,r,i,a){let o=n.build(i,void 0,!1),s=n.buildPrev(t,r,!1),c=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!Q$(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:c.isValid}}function C6(e){return e.map(e=>new e)}var w6=class extends J0{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case`SET_EVENT_DRAG`:case`SET_EVENT_RESIZE`:this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;w$(()=>{ZY(Q(V0,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),Q(z$.Provider,{value:this.customContentRenderId},Q(x6,Object.assign({isHeightAuto:r,forPrint:i},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,ZY(null,this.el),this.setClassNames([]),this.setHeight(``))},UX(e),this.el=e,this.renderRunner=new XX(this.handleRenderRequest),new a6({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){w$(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause(`batchRendering`),e(),this.renderRunner.resume(`batchRendering`)}pauseRendering(){this.renderRunner.pause(`pauseRendering`)}resumeRendering(){this.renderRunner.resume(`pauseRendering`,!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!qZ(e,this.currentClassNames)){let{classList:t}=this.el;
121for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){rZ(this.el,`height`,e)}},T6=parseInt(`19.2.8`.split(`.`)[0])<18,E6=class extends L.Component{constructor(){super(...arguments),this.elRef=(0,L.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){let e=[];for(let t of this.state.customRenderingMap.values())e.push(L.createElement(D6,{key:t.id,customRendering:t}));return L.createElement(`div`,{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;let e=new K4;this.handleCustomRendering=e.handle.bind(e),this.calendar=new w6(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on(`_beforeprint`,()=>{(0,gs.flushSync)(()=>{})});let t;e.subscribe(e=>{let n=Date.now(),r=!t;(T6||r||this.isUpdating||this.isUnmounting||n-t<100?O6:gs.flushSync)(()=>{this.setState({customRenderingMap:e},()=>{t=n,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}};E6.act=O6;var D6=class extends L.PureComponent{render(){let{customRendering:e}=this.props,{generatorMeta:t}=e,n=typeof t==`function`?t(e.renderProps):t;return(0,gs.createPortal)(n,e.containerEl)}};function O6(e){e()}var k6=class extends T2{constructor(){super(...arguments),this.headerElRef=DY()}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],a=v4(r.options);return e&&i.push({type:`header`,key:`header`,isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}}),i.push({type:`body`,key:`body`,liquid:!0,chunk:{content:t}}),Q(U$,{elClasses:[`fc-daygrid`],viewSpec:r.viewSpec},Q(b4,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw Error(`No ScrollGrid implementation`);let{props:a,context:o}=this,s=!a.forPrint&&v4(o.options),c=!a.forPrint&&y4(o.options),l=[];return e&&l.push({type:`header`,key:`header`,isSticky:s,chunks:[{key:`main`,elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}]}),l.push({type:`body`,key:`body`,liquid:!0,chunks:[{key:`main`,content:t}]}),c&&l.push({type:`footer`,key:`footer`,isSticky:!0,chunks:[{key:`main`,content:_4}]}),Q(U$,{elClasses:[`fc-daygrid`],viewSpec:o.viewSpec},Q(i,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}};function A6(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function j6(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function M6(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}var N6=qQ({hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`narrow`});function P6(e){let{display:t}=e.eventRange.ui;return t===`list-item`||t===`auto`&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var F6=class extends j${render(){let{props:e}=this;return Q(C4,Object.assign({},e,{elClasses:[`fc-daygrid-event`,`fc-daygrid-block-event`,`fc-h-event`],defaultTimeFormat:N6,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},I6=class extends j${render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=x0(r,n.eventTimeFormat||N6,t,!0,e.defaultDisplayEventEnd);return Q(S4,Object.assign({}
vendor: 2,293 bytes, line 121
121,e,{elTag:`a`,elClasses:[`fc-daygrid-event`,`fc-daygrid-dot-event`],elAttrs:T0(e.seg,t),defaultGenerator:L6,timeText:i,isResizing:!1,isDateSelecting:!1}))}};function L6(e){return Q(OY,null,Q(`div`,{className:`fc-daygrid-event-dot`,style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Q(`div`,{className:`fc-event-time`},e.timeText),Q(`div`,{className:`fc-event-title`},e.event.title||Q(OY,null,`\xA0`)))}var R6=class extends j${constructor(){super(...arguments),this.compileSegs=wQ(z6)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return Q(R4,{elClasses:[`fc-daygrid-more-link`],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return Q(OY,null,t.map(t=>{let r=t.eventRange.instance.instanceId;return Q(`div`,{className:`fc-daygrid-event-harness`,key:r,style:{visibility:n[r]?`hidden`:``}},P6(t)?Q(I6,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},S0(t,e.todayRange))):Q(F6,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},S0(t,e.todayRange))))}))}})}};function z6(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}var B6=qQ({week:`narrow`}),V6=class extends T2{constructor(){super(...arguments),this.rootElRef=DY(),this.state={dayNumberId:oZ()},this.handleRootEl=e=>{P$(this.rootElRef,e),P$(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:a}=e,{date:o,dateProfile:s}=t,c=t.showDayNumber&&U6(o,s.currentRange,a);return Q(D4,{elTag:`td`,elRef:this.handleRootEl,elClasses:[`fc-daygrid-day`,...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:`gridcell`}),defaultGenerator:H6,date:o,dateProfile:s,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:c,extraRenderProps:t.extraRenderProps},(a,s)=>
vendor: 1,059 bytes, line 121
121Q(`div`,{ref:t.innerElRef,className:`fc-daygrid-day-frame fc-scrollgrid-sync-inner`,style:{minHeight:t.minHeight}},t.showWeekNumber&&Q(N4,{elTag:`a`,elClasses:[`fc-daygrid-week-number`],elAttrs:s2(e,o,`week`),date:o,defaultFormat:B6}),!s.isDisabled&&(t.showDayNumber||O4(i)||t.forceDayTop)?Q(`div`,{className:`fc-daygrid-day-top`},Q(a,{elTag:`a`,elClasses:[`fc-daygrid-day-number`,c&&`fc-daygrid-month-start`],elAttrs:Object.assign(Object.assign({},s2(e,o)),{id:n.dayNumberId})})):t.showDayNumber?Q(`div`,{className:`fc-daygrid-day-top`,style:{visibility:`hidden`}},Q(`a`,{className:`fc-daygrid-day-number`},`\xA0`)):void 0,Q(`div`,{className:`fc-daygrid-day-events`,ref:t.fgContentElRef},t.fgContent,Q(`div`,{className:`fc-daygrid-day-bottom`,style:{marginTop:t.moreMarginTop}},Q(R6,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}
vendor: 6,334 bytes, line 121
121))),Q(`div`,{className:`fc-daygrid-day-bg`},t.bgContent)))}};function H6(e){return e.dayNumberText||Q(OY,null,`\xA0`)}function U6(e,t,n){let{start:r,end:i}=t,a=ZZ(i,-1),o=n.getYear(r),s=n.getMonth(r),c=n.getYear(a),l=n.getMonth(a);return(o!==c||s!==l)&&(e.valueOf()===r.valueOf()||n.getDay(e)===1&&e.valueOf()<i.valueOf())}function W6(e){return e.eventRange.instance.instanceId+`:`+e.firstCol}function G6(e){return W6(e)+`:`+e.lastCol}function K6(e,t,n,r,i,a,o){let s=new X6(t=>i[e[t.index].eventRange.instance.instanceId+`:`+t.span.start+`:`+(t.span.end-1)]||1);s.allowReslicing=!0,s.strictOrder=r,t===!0||n===!0?(s.maxCoord=a,s.hiddenConsumes=!0):typeof t==`number`?s.maxStackCnt=t:typeof n==`number`&&(s.maxStackCnt=n,s.hiddenConsumes=!0);let c=[],l=[];for(let t=0;t<e.length;t+=1){let n=e[t];i[G6(n)]==null?l.push(n):c.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}})}let u=s.addSegs(c),{singleColPlacements:d,multiColPlacements:f,leftoverMargins:p}=q6(s.toRects(),e,o),m=[],h=[];for(let e of l){f[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)d[t].push({seg:Y6(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(0);for(let t of u){let n=e[t.index],r=t.span;f[r.start].push({seg:Y6(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)m[e]+=1,d[e].push({seg:Y6(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)h.push(p[e]);return{singleColPlacements:d,multiColPlacements:f,moreCnts:m,moreMarginTops:h}}function q6(e,t,n){let r=J6(e,n.length),i=[],a=[],o=[];for(let e=0;e<n.length;e+=1){let s=r[e],c=[],l=0,u=0;for(let r of s){let i=t[r.index];c.push({seg:Y6(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-l}),l=r.levelCoord+r.thickness}let d=[];l=0,u=0;for(let r of s){let i=t[r.index],a=r.span.end-r.span.start>1,o=r.span.start===e;u+=r.levelCoord-l,l=r.levelCoord+r.thickness,a?(u+=r.thickness,o&&d.push({seg:Y6(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(d.push({seg:Y6(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:u}),u=0)}i.push(c),a.push(d),o.push(u)}return{singleColPlacements:i,multiColPlacements:a,leftoverMargins:o}}function J6(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}function Y6(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,a=i.range,o=J$(a,{start:r[t].date,end:XZ(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===a.end.valueOf()})}var X6=class extends E2{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[O2(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){let{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:s}=e;if(this.hiddenConsumes&&a){let e=O2(a);if(!i[e]){if(this.allowReslicing){let e=Object.assign(Object.assign({},a),{span:j2(a.span,t.span)}),c=O2(e);i[c]=!0,r[o][s]=e,n.push(e),this.splitEntry(a,t,n)}else i[e]=!0,n.push(a)}}super.handleInvalidInsertion(e,t,n)}},Z6=class extends T2{constructor(){super(...arguments),this.cellElRefs=new o4,this.frameElRefs=new o4,this.fgElRefs=new o4,this.segHarnessRefs=new o4,this.rootElRef=DY(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,a=j6(e.businessHourSegs,i),o=j6(e.bgEventSegs,i),s=j6(this.getHighlightSegs(),i),c=j6(this.getMirrorSegs(),i),{singleColPlacements:l,multiColPlacements:u,moreCnts:d,moreMarginTops:f}=K6(g0(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return Q(`tr`,{ref:this.rootElRef,role:`row`},e.renderIntro&&e.renderIntro(),e.cells.map((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?l[n]:u[n],e.todayRange,p),i=this.renderFgSegs(n,Q6(c[n],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return Q(V6,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&n===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:d[n],moreMarginTop:f[n],singlePlacements:l[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:Q(OY,null,Q(OY,null,r),Q(OY,null,i)),bgContent:Q(OY,null,this.renderFillSegs(s[n],`highlight`),this.renderFillSegs(a[n],`non-business`),this.renderFillSegs(o[n],`bg-event`)),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!u$(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,a,o){let{context:s}=this,{eventSelection:c}=this.props,{framePositions:l}=this.state,u=this.props.cells.length===1,d=i||a||o,f=[];if(l)for(let e of t){let{seg:t}=e,{instanceId:p}=t.eventRange.instance,m=e.isVisible&&!r[p],h=e.isAbsolute,g=``,_=``;h&&(s.isRtl?(_=0,g=l.lefts[t.lastCol]-l.lefts[t.firstCol]):(g=0,_=l.rights[t.firstCol]-l.rights[t.lastCol])),f.push(Q(`div`,{className:`fc-daygri
121d-event-harness`+(h?` fc-daygrid-event-harness-abs`:``),key:W6(t),ref:d?null:this.segHarnessRefs.createRef(G6(t)),style:{visibility:m?``:`hidden`,marginTop:h?``:e.marginTop,top:h?e.absoluteTop:``,left:g,right:_}},P6(t)?Q(I6,Object.assign({seg:t,isDragging:i,isSelected:p===c,defaultDisplayEventEnd:u},S0(t,n))):Q(F6,Object.assign({seg:t,isDragging:i,isResizing:a,isDateSelecting:o,isSelected:p===c,defaultDisplayEventEnd:u},S0(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,a=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};a.push(Q(`div`,{key:w0(o.eventRange),className:`fc-daygrid-bg-harness`,style:e},t===`bg-event`?Q(A4,Object.assign({seg:o},S0(o,r))):M4(t)))}return Q(OY,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let e=t.cells.map(e=>r.currentMap[e.key]);if(e.length){let t=this.rootElRef.current,r=new b2(t,e,!0,!1);(!n.framePositions||!n.framePositions.similarTo(r))&&this.setState({framePositions:new b2(t,e,!0,!1)})}}let i=this.state.segHeights,a=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};Z6.addStateEquality({segHeights:u$});function Q6(e,t){if(!e.length)return[];let n=$6(t);return e.map(e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}))}function $6(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}var e8=class extends T2{constructor(){super(...arguments),this.splitBusinessHourSegs=wQ(A6),this.splitBgEventSegs=wQ(t8),this.splitFgEventSegs=wQ(A6),this.splitDateSelectionSegs=wQ(A6),this.splitEventDrag=wQ(M6),this.splitEventResize=wQ(M6),this.rowRefs=new o4}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),s=this.splitEventDrag(e.eventDrag,n),c=this.splitEventResize(e.eventResize,n),l=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return Q(K0,{unit:`day`},(t,u)=>Q(OY,null,e.cells.map((t,d)=>Q(Z6,{ref:this.rowRefs.createRef(d),key:t.length?t[0].date.toISOString():d,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[d],eventSelection:e.eventSelection,bgEventSegs:i[d],fgEventSegs:a[d],dateSelectionSegs:o[d],eventDrag:s[d],eventResize:c[d],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:l,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(`.fc-daygrid-body`):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&=(this.context.unregisterInteractiveComponent(this),null)}prepareHits(){this.rowPositions=new b2(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new b2(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),a=r.topToIndex(t);if(a!=null&&i!=null){let e=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:XZ(n,1)}}};function t8(e,t){return A6(e.filter(n8),t)}function n8(e){return e.eventRange.def.allDay}var r8=class extends T2{constructor(){super(...arguments),this.elRef=DY(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=n===!0||t===!0;i&&!r&&(i=!1,t=null,n=null);
vendor: 4,028 bytes, line 121
121let a=[`fc-daygrid-body`,i?`fc-daygrid-body-balanced`:`fc-daygrid-body-unbalanced`,r?``:`fc-daygrid-body-natural`];return Q(`div`,{ref:this.elRef,className:a.join(` `),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Q(`table`,{role:`presentation`,className:`fc-scrollgrid-sync-table`,style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:``}},e.colGroupNode,Q(`tbody`,{role:`presentation`},Q(e8,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile===this.props.dateProfile?this.flushScrollReset():this.requestScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=i8(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(`.fc-daygrid-body`),n=t.closest(`.fc-scroller`),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}};function i8(e,t){let n;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${xQ(t.currentDate)}-01"]`)),n||=e.querySelector(`[data-date="${bQ(t.currentDate)}"]`),n}var a8=class extends K2{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},o8=class extends T2{constructor(){super(...arguments),this.slicer=new a8,this.tableRef=DY()}render(){let{props:e,context:t}=this;return Q(r8,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},s8=class extends k6{constructor(){super(...arguments),this.buildDayTableModel=wQ(c8),this.headerRef=DY(),this.tableRef=DY()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&Q(H2,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:r.rowCnt===1}),a=t=>Q(o8,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,a)}};function c8(e,t){return new G2(new W2(e.renderRange,t),/year|month|week/.test(e.currentRangeUnit))}var l8=class extends i1{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return u8({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};function u8(e){let{dateEnv:t,currentRange:n}=e,{start:r,end:i}=n,a;if(e.snapToWeek&&(r=t.startOfWeek(r),a=t.startOfWeek(i),a.valueOf()!==i.valueOf()&&(i=YZ(a,1))),e.fixedWeekCount){let e=t.startOfWeek(t.startOfMonth(XZ(n.end,-1))),r=Math.ceil(QZ(e,i));i=YZ(i,6-r)}return{start:r,end:i}}HX(`
vendor: 3,520 bytes, line 121
121:root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}
121`);var d8=t3({name:`@fullcalendar/daygrid`,initialView:`dayGridMonth`,views:{dayGrid:{component:s8,dateProfileGeneratorClass:l8},dayGridDay:{type:`dayGrid`,duration:{days:1}},dayGridWeek:{type:`dayGrid`,duration:{weeks:1}},dayGridMonth:{type:`dayGrid`,duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:`dayGrid`,duration:{years:1}}}}),f8=class extends t2{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?[`allDay`]:[`timed`]}getKeysForEventDef(e){return e.allDay?d0(e)?[`timed`,`allDay`]:[`allDay`]:[`timed`]}},p8=qQ({hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`short`});function m8(e){let t=[`fc-timegrid-slot`,`fc-timegrid-slot-label`,e.isLabeled?`fc-scrollgrid-shrink`:`fc-timegrid-slot-minor`];return Q(O$.Consumer,null,n=>{if(!e.isLabeled)return Q(`td`,{className:t.join(` `),"data-time":e.isoTimeStr});let{dateEnv:r,options:i,viewApi:a}=n,o=i.slotLabelFormat==null?p8:Array.isArray(i.slotLabelFormat)?qQ(i.slotLabelFormat[0]):qQ(i.slotLabelFormat),s={level:0,time:e.time,date:r.toDate(e.date),view:a,text:r.format(e.date,o)};return Q(B$,{elTag:`td`,elClasses:t,elAttrs:{"data-time":e.isoTimeStr},renderProps:s,generatorName:`slotLabelContent`,customGenerator:i.slotLabelContent,defaultGenerator:h8,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},e=>Q(`div`,{className:`fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame`},Q(e,{elTag:`div`,elClasses:[`fc-timegrid-slot-label-cushion`,`fc-scrollgrid-shrink-cushion`]})))})}function h8(e){return e.text}var g8=class extends j${render(){return this.props.slatMetas.map(e=>Q(`tr`,{key:e.key},Q(m8,Object.assign({},e))))}},_8=qQ({week:`short`}),v8=5,y8=class extends T2{constructor(){super(...arguments),this.allDaySplitter=new f8,this.headerElRef=DY(),this.rootElRef=DY(),this.scrollerElRef=DY(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t=``)=>{let{options:n}=this.context,{dateProfile:r}=this.props,i=r.renderRange,a=$Z(i.start,i.end)===1?s2(this.context,i.start,`week`):{};return n.weekNumbers&&e===`day`?Q(N4,{elTag:`th`,elClasses:[`fc-timegrid-axis`,`fc-scrollgrid-shrink`],elAttrs:{"aria-hidden":!0},date:i.start,defaultFormat:_8},e=>Q(`div`,{className:[`fc-timegrid-axis-frame`,`fc-scrollgrid-shrink-frame`,`fc-timegrid-axis-frame-liquid`].join(` `),style:{height:t}},Q(e,{elTag:`a`,elClasses:[`fc-timegrid-axis-cushion`,`fc-scrollgrid-shrink-cushion`,`fc-scrollgrid-sync-inner`],elAttrs:a}))):Q(`th`,{"aria-hidden":!0,className:`fc-timegrid-axis`},Q(`div`,{className:`fc-timegrid-axis-frame`,style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:n}=this.context;return Q(B$,{elTag:`td`,elClasses:[`fc-timegrid-axis`,`fc-scrollgrid-shrink`],elAttrs:{"aria-hidden":!0},renderProps:{text:t.allDayText,view:n},generatorName:`allDayContent`,customGenerator:t.allDayContent,defaultGenerator:b8,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},t=>Q(`div`,{className:[`fc-timegrid-axis-frame`,`fc-scrollgrid-shrink-frame`,e==null?` fc-timegrid-axis-frame-liquid`:``].join(` `),style:{height:e}},Q(t,{elTag:`span`,elClasses:[`fc-timegrid-axis-cushion`,`fc-scrollgrid-shrink-cushion`,`fc-scrollgrid-sync-inner`]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,n){let{context:r,props:i}=this,a=[],o=v4(r.options);return e&&a.push({type:`header`,key:`header`,isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}}),t&&(a.push({type:`body`,key:`all-day`,chunk:{content:t}}),a.push({type:`body`,key:`all-day-divider`,outerContent:Q(`tr`,{role:`presentation`,className:`fc-scrollgrid-section`},Q(`td`,{className:`fc-timegrid-divider `+r.theme.getClass(`tableCellShaded`)}))})),a.push({type:`body`,key:`body`,liquid:!0,expandRows:!!r.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Q(U$,{elRef:this.rootElRef,elClasses:[`fc-timegrid`],viewSpec:r.viewSpec},Q(b4,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:`shrink`}],sections:a}))}renderHScrollLayout(e,t,n,r,i,a,o){let s=this.context.pluginHooks.scrollGridImpl;if(!s)throw Error(`No ScrollGrid implementation`);let{context:c,props:l}=this,u=!l.forPrint&&v4(c.options),d=!l.forPrint&&y4(c.options),f=[];e&&f.push({type:`header`,key:`header`,isSticky:u,syncRowHeights:!0,chunks:[{key:`axis`,rowContent:e=>Q(`tr`,{role:`presentation`},this.renderHeadAxis(`day`,e.rowSyncHeights[0]))},{key:`cols`,elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}]}),t&&(f.push({type:`body`,key:`all-day`,syncRowHeights:!0,chunks:[{key:`axis`,rowContent:e=>Q(`tr`,{role:`presentation`},this.renderTableRowAxis(e.rowSyncHeights[0]))},{key:`cols`,content:t}]}),f.push({key:`all-day-divider`,type:`body`,outerContent:Q(`tr`,{role:`presentation`,className:`fc-scrollgrid-section`},Q(`td`,{colSpan:2,className:`fc-timegrid-divider `+c.theme.getClass(`tableCellShaded`)}))}));let p=c.options.nowIndicator;return f.push({type:`body`,key:`body`,liquid:!0,expandRows:!!c.options.expandRows,chunks:[{key:`axis`,content:e=>Q(`div`,{className:`fc-timegrid-axis-chunk`},Q(`table`,{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:``}},e.tableColGroupNode,Q(`tbody`,null,Q(g8,{slatMetas:a}))),Q(`div`,{className:`fc-timegrid-now-indicator-container`},Q(K0,{unit:p?`minute`:`day`},e=>{let t=p&&o&&o.safeComputeTop(e);return typeof t==`number`?Q(T4,{elClasses:[`fc-timegrid-now-indicator-arrow`],elStyle:{to
vendor: 19,099 bytes, line 121
121p:t},isAxis:!0,date:e}):null})))},{key:`cols`,scrollerElRef:this.scrollerElRef,content:n}]}),d&&f.push({key:`footer`,type:`footer`,isSticky:!0,chunks:[{key:`axis`,content:_4},{key:`cols`,content:_4}]}),Q(U$,{elRef:this.rootElRef,elClasses:[`fc-timegrid`],viewSpec:c.viewSpec},Q(s,{liquid:!l.isHeightAuto&&!l.forPrint,forPrint:l.forPrint,collapsibleWidth:!1,colGroups:[{width:`shrink`,cols:[{width:`shrink`}]},{cols:[{span:r,minWidth:i}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return(e===!0||t===!0)&&(e=void 0,t=v8),{dayMaxEvents:e,dayMaxEventRows:t}}};function b8(e){return e.text}var x8=class{constructor(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}safeComputeTop(e){let{dateProfile:t}=this;if(Q$(t.currentRange,e)){let n=oQ(e),r=e.valueOf()-n.valueOf();if(r>=WZ(t.slotMinTime)&&r<WZ(t.slotMaxTime))return this.computeTimeTop(PZ(r))}return null}computeDateTop(e,t){return t||=oQ(e),this.computeTimeTop(PZ(e.valueOf()-t.valueOf()))}computeTimeTop(e){let{positions:t,dateProfile:n}=this,r=t.els.length,i=(e.milliseconds-WZ(n.slotMinTime))/WZ(this.slotDuration),a,o;return i=Math.max(0,i),i=Math.min(r,i),a=Math.floor(i),a=Math.min(a,r-1),o=i-a,t.tops[a]+t.getHeight(a)*o}},S8=class extends j${render(){let{props:e,context:t}=this,{options:n}=t,{slatElRefs:r}=e;return Q(`tbody`,null,e.slatMetas.map((i,a)=>{let o={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi};return Q(`tr`,{key:i.key,ref:r.createRef(i.key)},e.axis&&Q(m8,Object.assign({},i)),Q(B$,{elTag:`td`,elClasses:[`fc-timegrid-slot`,`fc-timegrid-slot-lane`,!i.isLabeled&&`fc-timegrid-slot-minor`],elAttrs:{"data-time":i.isoTimeStr},renderProps:o,generatorName:`slotLaneContent`,customGenerator:n.slotLaneContent,classNameGenerator:n.slotLaneClassNames,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount}))}))}},C8=class extends j${constructor(){super(...arguments),this.rootElRef=DY(),this.slatElRefs=new o4}render(){let{props:e,context:t}=this;return Q(`div`,{ref:this.rootElRef,className:`fc-timegrid-slots`},Q(`table`,{"aria-hidden":!0,className:t.theme.getClass(`table`),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Q(S8,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;t.onCoords&&t.clientWidth!==null&&this.rootElRef.current.offsetHeight&&t.onCoords(new x8(new b2(this.rootElRef.current,w8(this.slatElRefs.currentMap,t.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}};function w8(e,t){return t.map(t=>e[t.key])}function T8(e,t){let n=[],r;for(r=0;r<t;r+=1)n.push([]);if(e)for(r=0;r<e.length;r+=1)n[e[r].col].push(e[r]);return n}function E8(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.col].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}var D8=class extends j${render(){let{props:e}=this;return Q(R4,{elClasses:[`fc-timegrid-more-link`],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>U8(e.hiddenSegs,e),defaultGenerator:O8,forceTimed:!0},e=>Q(e,{elTag:`div`,elClasses:[`fc-timegrid-more-link-inner`,`fc-sticky`]}))}};function O8(e){return e.shortText}function k8(e,t,n){let r=new E2;t!=null&&(r.strictOrder=t),n!=null&&(r.maxStackCnt=n);let i=k2(r.addSegs(e)),a=A8(r);return a=F8(a,1),{segRects:I8(a),hiddenGroups:i}}function A8(e){let{entriesByLevel:t}=e,n=L8((e,t)=>e+`:`+t,(r,i)=>{let a=j8(P8(e,r,i),n),o=t[r][i];return[Object.assign(Object.assign({},o),{nextLevelNodes:a[0]}),o.thickness+a[1]]});return j8(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}function j8(e,t){if(!e)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=e,a=r,o=[];for(;a<i;)o.push(t(n,a)),a+=1;return o.sort(M8),[o.map(N8),o[0][1]]}function M8(e,t){return t[1]-e[1]}function N8(e){return e[0]}function P8(e,t,n){let{levelCoords:r,entriesByLevel:i}=e,a=i[t][n],o=r[t]+a.thickness,s=r.length,c=t;for(;c<s&&r[c]<o;c+=1);for(;c<s;c+=1){let e=i[c],t,n=N2(e,a.span.start,D2),r=n[0]+n[1],o=r;for(;(t=e[o])&&t.span.start<a.span.end;)o+=1;if(r<o)return{level:c,lateralStart:r,lateralEnd:o}}return null}function F8(e,t){let n=L8((e,t,n)=>O2(e),(e,r,i)=>{let{nextLevelNodes:a,thickness:o}=e,s=o+i,c=o/s,l,u=[];if(!a.length)l=t;else for(let e of a)if(l===void 0){let t=n(e,r,s);l=t[0],u.push(t[1])}else{let t=n(e,l,0);u.push(t[1])}let d=(l-r)*c;return[l-d,Object.assign(Object.assign({},e),{thickness:d,nextLevelNodes:u})]});return e.map(e=>n(e,0,0)[1])}function I8(e){let t=[],n=L8((e,t,n)=>O2(e),(e,n,i)=>{let a=Object.assign(Object.assign({},e),{levelCoord:n,stackDepth:i,stackForward:0});return t.push(a),a.stackForward=r(e.nextLevelNodes,n+e.thickness,i+1)+1});function r(e,t,r){let i=0;for(let a of e)i=Math.max(n(a,t,r),i);return i}return r(e,0,0),t}function L8(e,t){let n={};return(...r)=>{let i=e(...r);return i in n?n[i]:n[i]=t(...r)}}function R8(e,t,n=null,r=0){let i=[];if(n)for(let a=0;a<e.length;a+=1){let o=e[a],s=n.computeDateTop(o.start,t),c=Math.max(s+(r||0),n.computeDateTop(o.end,t));i.push({start:Math.round(s),end:Math.round(c)})}return i}function z8(e,t,n,r){let i=[],a=[];for(let n=0;n<e.length;n+=1){let r=t[n];r?i.push({index:n,thickness:1,span:r}):a.push(e[n])}let{segRects:o,hiddenGroups:s}=k8(i,n,r),c=[];for(let t of o)c.push({seg:e[t.index],rect:t});for(let e of a)c.push({seg:e,rect:null});return{segPlacements:c,hiddenGroups:s}}var B8=qQ({hour:`numeric`,minute:`2-digit`,meridiem:!1}),V8=class extends j${render(){return Q(C4,Object.assign({},this.props,{elClasses:[`fc-timegrid-event`,`fc-v-event`,this.props.isShort&&`fc-timegrid-event-short`],defaultTimeFormat:B8}))}},H8=class extends j${constructor(){super(...arguments),this.sortEventSegs=wQ(g0)}render(){let{props:e,context:t}=this,{options:n}=t,r=n.selectMirror,i=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||r&&e.dateSelectionSegs||[],a=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,n.eventOrder);return Q(D4,{elTag:`td`,elRef:e.elRef,elClasses:[`fc-timegrid-col`,...e.extraClassNames||[]],elAttrs:Object.assign({role:`gridcell`},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},t=>Q(`div`,{className:`fc-timegrid-col-frame`},Q(`div`,{className:`fc-timegrid-col-bg`},this.renderFillSegs(e.businessHourSegs,`non-business`),this.renderFillSegs(e.bgEventSegs,`bg-event`),this.renderFillSegs(e.dateSelectionSegs,`highlight`)),Q(`div`,{className:`fc-timegrid-col-events`},this.renderFgSegs(o,a,!1,!1,!1)),Q(`div`,{className:`fc-timegrid-col-events`},this.renderFgSegs(i,{},!!e.eventDrag,!!e.eventResize,!!r,`mirror`)),Q(`div`,{className:`fc-timegrid-now-indicator-container`},this.renderNowIndicator(e.nowIndicatorSegs)),O4(n)&&Q(t,{elTag:`div`,elClasses:[`fc-timegrid-col-misc`]})))}renderFgSegs(e,t,n,r,i,a){let{props:o}=this;return o.forPrint?U8(e,o):this.renderPositionedFgSegs(e,t,n,r,i,a)}renderPositionedFgSegs(e,t,n,r,i,a){let{eventMaxStack:o,eventShortHeight:s,eventOrderStrict:c,eventMinHeight:l}=this.context.options,{date:u,slatCoords:d,eventSelection:f,todayRange:p,nowDate:m}=this.props,h=n||r||i,{segPlacements:g,hiddenGroups:_}=z8(e,R8(e,u,d,l),c,o);return Q(OY,null,this.renderHiddenGroups(_,e),g.map(e=>{let{seg:o,rect:c}=e,l=o.eventRange.instance.instanceId,u=h||!!(!t[l]&&c),d=W8(c&&c.span),g=!h&&c?this.computeSegHStyle(c):{left:0,right:0},_=!!c&&c.stackForward>0,v=!!c&&c.span.end-c.span.start<s;return Q(`div`,{className:`fc-timegrid-event-harness`+(_?` fc-timegrid-event-harness-inset`:``),key:a||l,style:Object.assign(Object.assign({visibility:u?``:`hidden`},d),g)},Q(V8,Object.assign({seg:o,isDragging:n,isResizing:r,isDateSelecting:i,isSelected:l===f,isShort:v},S0(o,p,m))))}))}renderHiddenGroups(e,t){let{extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:a,eventSelection:o,eventDrag:s,eventResize:c}=this.props;return Q(OY,null,e.map(e=>{let l=W8(e.span),u=G8(e.entries,t);return Q(D8,{key:yQ(V4(u)),hiddenSegs:u,top:l.top,bottom:l.bottom,extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:a,eventSelection:o,eventDrag:s,eventResize:c})}))}renderFillSegs(e,t){let{props:n,context:r}=this;return Q(OY,null,R8(e,n.date,n.slatCoords,r.options.eventMinHeight).map((r,i)=>{let a=e[i];return Q(`div`,{key:w0(a.eventRange),className:`fc-timegrid-bg-harness`,style:W8(r)},t===`bg-event`?Q(A4,Object.assign({seg:a},S0(a,n.todayRange,n.nowDate))):M4(t))}))}renderNowIndicator(e){let{slatCoords:t,date:n}=this.props;return t?e.map((e,r)=>Q(T4,{key:r,elClasses:[`fc-timegrid-now-indicator-line`],elStyle:{top:t.computeDateTop(e.start,n)},isAxis:!1,date:n})):null}computeSegHStyle(e){let{isRtl:t,options:n}=this.context,r=n.slotEventOverlap,i=e.levelCoord,a=e.levelCoord+e.thickness,o,s;r&&(a=Math.min(1,i+(a-i)*2)),t?(o=1-a,s=i):(o=i,s=1-a);let c={zIndex:e.stackDepth+1,left:o*100+`%`,right:s*100+`%`};return r&&!e.stackForward&&(c[t?`marginLeft`:`marginRight`]=20),c}};function U8(e,{todayRange:t,nowDate:n,eventSelection:r,eventDrag:i,eventResize:a}){let o=(i?i.affectedInstances:null)||(a?a.affectedInstances:null)||{};return Q(OY,null,e.map(e=>{let i=e.eventRange.instance.instanceId;return Q(`div`,{key:i,style:{visibility:o[i]?`hidden`:``}},Q(V8,Object.assign({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:i===r,isShort:!1},S0(e,t,n))))}))}function W8(e){return e?{top:e.start,bottom:-e.end}:{top:``,bottom:``}}function G8(e,t){return e.map(e=>t[e.index])}var K8=class extends j${constructor(){super(...arguments),this.splitFgEventSegs=wQ(T8),this.splitBgEventSegs=wQ(T8),this.splitBusinessHourSegs=wQ(T8),this.splitNowIndicatorSegs=wQ(T8),this.splitDateSelectionSegs=wQ(T8),this.splitEventDrag=wQ(E8),this.splitEventResize=wQ(E8),this.rootElRef=DY(),this.cellElRefs=new o4}render(){let{props:e,context:t}=this,n=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),r=e.cells.length,i=this.splitFgEventSegs(e.fgEventSegs,r),a=this.splitBgEventSegs(e.bgEventSegs,r),o=this.splitBusinessHourSegs(e.businessHourSegs,r),s=this.splitNowIndicatorSegs(e.nowIndicatorSegs,r),c=this.splitDateSelectionSegs(e.dateSelectionSegs,r),l=this.splitEventDrag(e.eventDrag,r),u=this.splitEventResize(e.eventResize,r);return Q(`div`,{className:`fc-timegrid-cols`,ref:this.rootElRef},Q(`table`,{role:`presentation`,style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,Q(`tbody`,{role:`presentation`},Q(`tr`,{role:`row`},e.axis&&Q(`td`,{"aria-hidden":!0,className:`fc-timegrid-col fc-timegrid-axis`},Q(`div`,{className:`fc-timegrid-col-frame`},Q(`div`,{className:`fc-timegrid-now-indicator-container`},typeof n==`number`&&Q(T4,{elClasses:[`fc-timegrid-now-indicator-arrow`],elStyle:{top:n},isAxis:!0,date:e.nowDate})))),e.cells.map((t,n)=>Q(H8,{key:t.key,elRef:this.cellElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,fgEventSegs:i[n],bgEventSegs:a[n],businessHourSegs:o[n],nowIndicatorSegs:s[n],dateSelectionSegs:c[n],eventDrag:l[n],eventResize:u[n],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new b2(this.rootElRef.current,q8(this.cellElRefs.currentMap,e.cells),!0,!1))}};function q8(e,t){return t.map(t=>e[t.key])}var J8=class extends T2{constructor(){super(...arguments),this.processSlotOptions=wQ(Y8),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:n}=this.state;if(t&&n){if(e.time){let r=n.computeTimeTop(e.time);r=Math.ceil(r),r&&(r+=1),t(r)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return Q(`div`,{className:`fc-timegrid-body`,ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Q(C8,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:``,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),Q(K8,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:n,options:r}=this.context,{colCoords:i}=this,{dateProfile:a}=this.props,{slatCoords:o}=this.state,{snapDuration:s,snapsPerSlot:c}=this.processSlotOptions(this.props.slotDuration,r.snapDuration),l=i.leftToIndex(e),u=o.positions.topToIndex(t);if(l!=null&&u!=null){let e=this.props.cells[l],r=o.positions.tops[u],d=o.positions.getHeight(u),f=(t-r)/d,p=Math.floor(f*c),m=u*c+p,h=this.props.cells[l].date,g=RZ(a.slotMinTime,BZ(s,m)),_=n.add(h,g),v=n.add(_,s);return{dateProfile:a,dateSpan:Object.assign({range:{start:_,end:v},allDay:!1},e.extraDateSpan),dayEl:i.els[l],rect:{left:i.lefts[l],right:i.rights[l],top:r,bottom:r+d},layer:0}}return null}};function Y8(e,t){let n=t||e,r=GZ(e,n);return r===null&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var X8=class extends K2{sliceRange(e,t){let n=[];for(let r=0;r<t.length;r+=1){let i=J$(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n}},Z8=class extends T2{constructor(){super(...arguments),this.buildDayRanges=wQ(Q8),this.slicer=new X8,this.timeColsRef=DY()}render(){let{props:e,context:t}=this,{dateProfile:n,dayTableModel:r}=e,{nowIndicator:i,nextDayThreshold:a}=t.options,o=this.buildDayRanges(r,n,t.dateEnv);return Q(K0,{unit:i?`minute`:`day`},(s,c)=>Q(J8,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,n,null,t,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:n,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:r.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:s,nowIndicatorSegs:i&&this.slicer.sliceNowDate(s,n,a,t,o),todayRange:c,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}};function Q8(e,t,n){let r=[];for(let i of e.headerDates)r.push({start:n.add(i,t.slotMinTime),end:n.add(i,t.slotMaxTime)});return r}var $8=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function e5(e,t,n,r,i){let a=new Date(0),o=e,s=PZ(0),c=n||t5(r),l=[];for(;WZ(o)<WZ(t);){let e=i.add(a,o),t=GZ(s,c)!==null;l.push({date:e,time:o,key:e.toISOString(),isoTimeStr:SQ(e),isLabeled:t}),o=RZ(o,r),s=RZ(s,r)}return l}function t5(e){let t,n,r;for(t=$8.length-1;t>=0;--t)if(n=PZ($8[t]),r=GZ(n,e),r!==null&&r>1)return n;return e}var n5=class extends y8{constructor(){super(...arguments),this.buildTimeColsModel=wQ(r5),this.buildSlatMetas=wQ(e5)}render(){let{options:e,dateEnv:t,dateProfileGenerator:n}=this.context,{props:r}=this,{dateProfile:i}=r,a=this.buildTimeColsModel(i,n),o=this.allDaySplitter.splitProps(r),s=this.buildSlatMetas(i.slotMinTime,i.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:c}=e,l=!c,u=c,d=e.dayHeaders&&Q(H2,{dates:a.headerDates,dateProfile:i,datesRepDistinctDays:!0,renderIntro:l?this.renderHeadAxis:null}),f=e.allDaySlot!==!1&&(t=>Q(o8,Object.assign({},o.allDay,{dateProfile:i,dayTableModel:a,nextDayThreshold:e.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:l?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:r.forPrint},this.getAllDayMaxEventProps()))),p=t=>Q(Z8,Object.assign({},o.timed,{dayTableModel:a,dateProfile:i,axis:l,slotDuration:e.slotDuration,slatMetas:s,forPrint:r.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return u?this.renderHScrollLayout(d,f,p,a.colCnt,c,s,this.state.slatCoords):this.renderSimpleLayout(d,f,p)}};function r5(e,t){return new G2(new W2(e.renderRange,t),!1)}HX(`.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}
121.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}`);var i5=t3({name:`@fullcalendar/timegrid`,initialView:`timeGridWeek`,optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:n5,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:`00:30:00`,slotEventOverlap:!0},timeGridDay:{type:`timeGrid`,duration:{days:1}},timeGridWeek:{type:`timeGrid`,duration:{weeks:1}}}}),a5=class extends j${constructor(){super(...arguments),this.state={textId:oZ()}}render(){let{theme:e,dateEnv:t,options:n,viewApi:r}=this.context,{cellId:i,dayDate:a,todayRange:o}=this.props,{textId:s}=this.state,c=r2(a,o),l=n.listDayFormat?t.format(a,n.listDayFormat):``,u=n.listDaySideFormat?t.format(a,n.listDaySideFormat):``,d=Object.assign({date:t.toDate(a),view:r,textId:s,text:l,sideText:u,navLinkAttrs:s2(this.context,a),sideNavLinkAttrs:s2(this.context,a,`day`,!1)},c);return Q(B$,{elTag:`tr`,elClasses:[`fc-list-day`,...i2(c,e)],elAttrs:{"data-date":bQ(a)},renderProps:d,generatorName:`dayHeaderContent`,customGenerator:n.dayHeaderContent,defaultGenerator:o5,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},t=>Q(`th`,{scope:`colgroup`,colSpan:3,id:i,"aria-labelledby":s},Q(t,{elTag:`div`,elClasses:[`fc-list-day-cushion`,e.getClass(`tableCellShaded`)]})))}};function o5(e){return Q(OY,null,e.text&&Q(`a`,Object.assign({id:e.textId,className:`fc-list-day-text`},e.navLinkAttrs),e.text),e.sideText&&Q(`a`,Object.assign({"aria-hidden":!0,
vendor: 35,110 bytes, line 121
121className:`fc-list-day-side-text`},e.sideNavLinkAttrs),e.sideText))}var s5=qQ({hour:`numeric`,minute:`2-digit`,meridiem:`short`}),c5=class extends j${render(){let{props:e,context:t}=this,{options:n}=t,{seg:r,timeHeaderId:i,eventHeaderId:a,dateHeaderId:o}=e,s=n.eventTimeFormat||s5;return Q(S4,Object.assign({},e,{elTag:`tr`,elClasses:[`fc-list-event`,r.eventRange.def.url&&`fc-event-forced-url`],defaultGenerator:()=>l5(r,t),seg:r,timeText:``,disableDragging:!0,disableResizing:!0}),(e,n)=>Q(OY,null,u5(r,s,t,i,o),Q(`td`,{"aria-hidden":!0,className:`fc-list-event-graphic`},Q(`span`,{className:`fc-list-event-dot`,style:{borderColor:n.borderColor||n.backgroundColor}})),Q(e,{elTag:`td`,elClasses:[`fc-list-event-title`],elAttrs:{headers:`${a} ${o}`}})))}};function l5(e,t){let n=T0(e,t);return Q(`a`,Object.assign({},n),e.eventRange.def.title)}function u5(e,t,n,r,i){let{options:a}=n;if(a.displayEventTime!==!1){let o=e.eventRange.def,s=e.eventRange.instance,c=!1,l;if(o.allDay?c=!0:n1(e.eventRange.range)?e.isStart?l=x0(e,t,n,null,null,s.range.start,e.end):e.isEnd?l=x0(e,t,n,null,null,e.start,s.range.end):c=!0:l=x0(e,t,n),c){let e={text:n.options.allDayText,view:n.viewApi};return Q(B$,{elTag:`td`,elClasses:[`fc-list-event-time`],elAttrs:{headers:`${r} ${i}`},renderProps:e,generatorName:`allDayContent`,customGenerator:a.allDayContent,defaultGenerator:d5,classNameGenerator:a.allDayClassNames,didMount:a.allDayDidMount,willUnmount:a.allDayWillUnmount})}return Q(`td`,{className:`fc-list-event-time`},l)}return null}function d5(e){return e.text}var f5=class extends T2{constructor(){super(...arguments),this.computeDateVars=wQ(m5),this.eventStoreToSegs=wQ(this._eventStoreToSegs),this.state={timeHeaderId:oZ(),eventHeaderId:oZ(),dateHeaderIdRoot:oZ()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:n,dayRanges:r}=this.computeDateVars(e.dateProfile),i=this.eventStoreToSegs(e.eventStore,e.eventUiBases,r);return Q(U$,{elRef:this.setRootEl,elClasses:[`fc-list`,t.theme.getClass(`table`),t.options.stickyHeaderDates===!1?``:`fc-list-sticky`],viewSpec:t.viewSpec},Q(a4,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?`visible`:`hidden`,overflowY:e.isHeightAuto?`visible`:`auto`},i.length>0?this.renderSegList(i,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context;return Q(B$,{elTag:`div`,elClasses:[`fc-list-empty`],renderProps:{text:e.noEventsText,view:t},generatorName:`noEventsContent`,customGenerator:e.noEventsContent,defaultGenerator:p5,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},e=>Q(e,{elTag:`div`,elClasses:[`fc-list-empty-cushion`]}))}renderSegList(e,t){let{theme:n,options:r}=this.context,{timeHeaderId:i,eventHeaderId:a,dateHeaderIdRoot:o}=this.state,s=h5(e);return Q(K0,{unit:`day`},(e,c)=>{let l=[];for(let n=0;n<s.length;n+=1){let u=s[n];if(u){let s=bQ(t[n]),d=o+`-`+s;l.push(Q(a5,{key:s,cellId:d,dayDate:t[n],todayRange:c})),u=g0(u,r.eventOrder);for(let t of u)l.push(Q(c5,Object.assign({key:s+`:`+t.eventRange.instance.instanceId,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:i,eventHeaderId:a,dateHeaderId:d},S0(t,c,e))))}}return Q(`table`,{className:`fc-list-table `+n.getClass(`table`)},Q(`thead`,null,Q(`tr`,null,Q(`th`,{scope:`col`,id:i},r.timeHint),Q(`th`,{scope:`col`,"aria-hidden":!0}),Q(`th`,{scope:`col`,id:a},r.eventHint))),Q(`tbody`,null,l))})}_eventStoreToSegs(e,t,n){return this.eventRangesToSegs(u0(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)}eventRangesToSegs(e,t){let n=[];for(let r of e)n.push(...this.eventRangeToSegs(r,t));return n}eventRangeToSegs(e,t){let{dateEnv:n}=this.context,{nextDayThreshold:r}=this.context.options,i=e.range,a=e.def.allDay,o,s,c,l=[];for(o=0;o<t.length;o+=1)if(s=J$(i,t[o]),s&&(c={component:this,eventRange:e,start:s.start,end:s.end,isStart:e.isStart&&s.start.valueOf()===i.start.valueOf(),isEnd:e.isEnd&&s.end.valueOf()===i.end.valueOf(),dayIndex:o},l.push(c),!c.isEnd&&!a&&o+1<t.length&&i.end<n.add(t[o+1].start,r))){c.end=i.end,c.isEnd=!0;break}return l}};function p5(e){return e.text}function m5(e){let t=oQ(e.renderRange.start),n=e.renderRange.end,r=[],i=[];for(;t<n;)r.push(t),i.push({start:t,end:XZ(t,1)}),t=XZ(t,1);return{dayDates:r,dayRanges:i}}function h5(e){let t=[],n,r;for(n=0;n<e.length;n+=1)r=e[n],(t[r.dayIndex]||(t[r.dayIndex]=[])).push(r);return t}HX(`:root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}`);var g5={listDayFormat:_5,listDaySideFormat:_5,noEventsClassNames:$,noEventsContent:$,noEventsDidMount:$,noEventsWillUnmount:$};function _5(e){return e===!1?null:qQ(e)}var v5=t3({name:`@fullcalendar/list`,optionRefiners:g5,views:{list:{component:f5,buttonTextKey:`list`,listDayFormat:{month:`long`,day:`numeric`,year:`numeric`}},listDay:{type:`list`,duration:{days:1},listDayFormat:{weekday:`long`}},listWeek:{type:`list`,duration:{weeks:1},listDayFormat:{weekday:`long`},listDaySideFormat:{month:`long`,day:`numeric`,year:`numeric`}},listMonth:{type:`list`,duration:{month:1},listDaySideFormat:{weekday:`long`}},listYear:{type:`list`,duration:{year:1},listDaySideFormat:{weekday:`long`}}}});F2.touchMouseIgnoreWait=500;var y5=0,b5=0,x5=!1,S5=class{constructor(e){this.subjectEl=null,this.selector=``,this.handleSelector=``,this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=e=>{if(!this.shouldIgnoreMouse()&&C5(e)&&this.tryStart(e)){let t=this.createEventFromMouse(e,!0);this.emitter.trigger(`pointerdown`,t),this.initScrollWatch(t),this.shouldIgnoreMove||document.addEventListener(`mousemove`,this.handleMouseMove),document.addEventListener(`mouseup`,this.handleMouseUp)}},this.handleMouseMove=e=>{let t=this.createEventFromMouse(e);this.recordCoords(t),this.emitter.trigger(`pointermove`,t)},this.handleMouseUp=e=>{document.removeEventListener(`mousemove`,this.handleMouseMove),document.removeEventListener(`mouseup`,this.handleMouseUp),this.emitter.trigger(`pointerup`,this.createEventFromMouse(e)),this.cleanup()},this.handleTouchStart=e=>{if(this.tryStart(e)){this.isTouchDragging=!0;let t=this.createEventFromTouch(e,!0);this.emitter.trigger(`pointerdown`,t),this.initScrollWatch(t);let n=e.target;this.shouldIgnoreMove||n.addEventListener(`touchmove`,this.handleTouchMove),n.addEventListener(`touchend`,this.handleTouchEnd),n.addEventListener(`touchcancel`,this.handleTouchEnd),window.addEventListener(`scroll`,this.handleTouchScroll,!0)}},this.handleTouchMove=e=>{let t=this.createEventFromTouch(e);this.recordCoords(t),this.emitter.trigger(`pointermove`,t)},this.handleTouchEnd=e=>{if(this.isDragging){let t=e.target;t.removeEventListener(`touchmove`,this.handleTouchMove),t.removeEventListener(`touchend`,this.handleTouchEnd),t.removeEventListener(`touchcancel`,this.handleTouchEnd),window.removeEventListener(`scroll`,this.handleTouchScroll,!0),this.emitter.trigger(`pointerup`,this.createEventFromTouch(e)),this.cleanup(),this.isTouchDragging=!1,w5()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=e=>{if(!this.shouldIgnoreMove){let t=window.scrollX-this.prevScrollX+this.prevPageX,n=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger(`pointermove`,{origEvent:e,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:t,pageY:n,deltaX:t-this.origPageX,deltaY:n-this.origPageY})}},this.containerEl=e,this.emitter=new q1,e.addEventListener(`mousedown`,this.handleMouseDown),e.addEventListener(`touchstart`,this.handleTouchStart,{passive:!0}),T5()}destroy(){this.containerEl.removeEventListener(`mousedown`,this.handleMouseDown),this.containerEl.removeEventListener(`touchstart`,this.handleTouchStart,{passive:!0}),E5()}tryStart(e){let t=this.querySubjectEl(e),n=e.target;return t&&(!this.handleSelector||QX(n,this.handleSelector))?(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){x5=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?QX(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return y5||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(x5=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener(`scroll`,this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener(`scroll`,this.handleScroll,!0)}createEventFromMouse(e,t){let n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}}createEventFromTouch(e,t){let n=e.touches,r,i,a=0,o=0;return n&&n.length?(r=n[0].pageX,i=n[0].pageY):(r=e.pageX,i=e.pageY),t?(this.origPageX=r,this.origPageY=i):(a=r-this.origPageX,o=i-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:r,pageY:i,deltaX:a,deltaY:o}}};function C5(e){return e.button===0&&!e.ctrlKey}function w5(){y5+=1,setTimeout(()=>{--y5},F2.touchMouseIgnoreWait)}function T5(){b5+=1,b5===1&&window.addEventListener(`touchmove`,D5,{passive:!1})}function E5(){--b5,b5||window.removeEventListener(`touchmove`,D5,{passive:!1})}function D5(e){x5&&e.preventDefault()}var O5=class{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.scrollX,this.origScreenY=n-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,t){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=t-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=``),this.isVisible=e,this.updateElPosition()):this.isVisible&&=(this.mirrorEl&&(this.mirrorEl.style.display=`none`),e)}stop(e,t){let n=()=>{this.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(n,this.revertDuration):setTimeout(n,0)}doRevertAnimation(e,t){let n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition=`top `+t+`ms,left `+t+`ms`,nZ(n,{left:r.left,top:r.top}),fZ(n,()=>{n.style.transition=``,e()})}cleanup(){this.mirrorEl&&=(ZX(this.mirrorEl),null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&nZ(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,t=this.mirrorEl;return t||(t=this.mirrorEl=this.sourceEl.cloneNode(!0),t.style.userSelect=`none`,t.style.webkitUserSelect=`none`,t.style.pointerEvents=`none`,t.classList.add(`fc-event-dragging`),nZ(t,{position:`fixed`,zIndex:this.zIndex,visibility:``,boxSizing:`border-box`,width:e.right-e.left,height:e.bottom-e.top,right:`auto`,bottom:`auto`,margin:0}),this.parentNode.appendChild(t)),t}},k5=class extends S2{constructor(e,t){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=t,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener(`scroll`,this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener(`scroll`,this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}},A5=class extends k5{constructor(e,t){super(new C2(e),t)}getEventTarget(){return this.scrollController.el}computeClientRect(){return g2(this.scrollController.el)}},j5=class extends k5{constructor(e){super(new w2,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}},M5=typeof performance==`function`?performance.now:Date.now,N5=class{constructor(){this.isEnabled=!0,this.scrollQuery=[window,`.fc-scroller`],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let t=M5();this.handleSide(e,(t-this.msSinceRequest)/1e3),this.requestAnimation(t)}else this.isAnimating=!1}}}start(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))}handleMove(e,t){if(this.isEnabled){let n=e-window.scrollX,r=t-window.scrollY,i=this.pointerScreenY===null?0:r-this.pointerScreenY,a=this.pointerScreenX===null?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),a<0?this.everMovedLeft=!0:a>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(M5()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,t){let{scrollCache:n}=e,{edgeThreshold:r}=this,i=r-e.distance,a=i*i/(r*r)*this.maxVelocity*t,o=1;switch(e.name){case`left`:o=-1;case`right`:n.setScrollLeft(n.getScrollLeft()+a*o);break;case`top`:o=-1;case`bottom`:n.setScrollTop(n.getScrollTop()+a*o)}}computeBestEdge(e,t){let{edgeThreshold:n}=this,r=null,i=this.scrollCaches||[];for(let a of i){let i=a.clientRect,o=e-i.left,s=i.right-e,c=t-i.top,l=i.bottom-t;o>=0&&s>=0&&c>=0&&l>=0&&(c<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:a,name:`top`,distance:c}),l<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>l)&&(r={scrollCache:a,name:`bottom`,distance:l}),o<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>o)&&(r={scrollCache:a,name:`left`,distance:o}),s<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>s)&&(r={scrollCache:a,name:`right`,distance:s}))}return r}buildCaches(e){return this.queryScrollEls(e).map(e=>e===window?new j5(!1):new A5(e,!1))}queryScrollEls(e){let t=[];for(let n of this.scrollQuery)typeof n==`object`?t.push(n):t.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(n)));return t}},P5=class extends P2{constructor(e,t){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=e=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,yZ(document.body),xZ(document.body),e.isTouch||e.origEvent.preventDefault(),this.emitter.trigger(`pointerdown`,e),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(e.subjectEl,e.pageX,e.pageY),this.startDelay(e),this.minDistance||this.handleDistanceSurpassed(e)))},this.onPointerMove=e=>{if(this.isInteracting){if(this.emitter.trigger(`pointermove`,e),!this.isDistanceSurpassed){let t=this.minDistance,n,{deltaX:r,deltaY:i}=e;n=r*r+i*i,n>=t*t&&this.handleDistanceSurpassed(e)}this.isDragging&&(e.origEvent.type!==`scroll`&&(this.mirror.handleMove(e.pageX,e.pageY),this.autoScroller.handleMove(e.pageX,e.pageY)),this.emitter.trigger(`dragmove`,e))}},this.onPointerUp=e=>{this.isInteracting&&(this.isInteracting=!1,bZ(document.body),SZ(document.body),this.emitter.trigger(`pointerup`,e),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(e)),this.delayTimeoutId&&=(clearTimeout(this.delayTimeoutId),null))};let n=this.pointer=new S5(e);n.emitter.on(`pointerdown`,this.onPointerDown),n.emitter.on(`pointermove`,this.onPointerMove),n.emitter.on(`pointerup`,this.onPointerUp),t&&(n.selector=t),this.mirror=new O5,this.autoScroller=new N5}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay==`number`?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger(`dragstart`,e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger(`dragend`,e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}},F5=class{constructor(e){this.el=e,this.origRect=_2(e),this.scrollCaches=y2(e).map(e=>new A5(e,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let t of this.scrollCaches)e+=t.origScrollLeft-t.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let t of this.scrollCaches)e+=t.origScrollTop-t.getScrollTop();return e}isWithinClipping(e,t){let n={left:e,top:t};for(let e of this.scrollCaches)if(!I5(e.getEventTarget())&&!Y0(n,e.clientRect))return!1;return!0}};function I5(e){let t=e.tagName;return t===`HTML`||t===`BODY`}var L5=class{constructor(e,t){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=e=>{let{dragging:t}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(e),this.initialHit||!this.requireInitial?(t.setIgnoreMove(!1),this.emitter.trigger(`pointerdown`,e)):t.setIgnoreMove(!0)},this.handleDragStart=e=>{this.emitter.trigger(`dragstart`,e),this.handleMove(e,!0)},this.handleDragMove=e=>{this.emitter.trigger(`dragmove`,e),this.handleMove(e)},this.handlePointerUp=e=>{this.releaseHits(),this.emitter.trigger(`pointerup`,e)},this.handleDragEnd=e=>{this.movingHit&&this.emitter.trigger(`hitupdate`,null,!0,e),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger(`dragend`,e)},this.droppableStore=t,e.emitter.on(`pointerdown`,this.handlePointerDown),e.emitter.on(`dragstart`,this.handleDragStart),e.emitter.on(`dragmove`,this.handleDragMove),e.emitter.on(`pointerup`,this.handlePointerUp),e.emitter.on(`dragend`,this.handleDragEnd),this.dragging=e,this.emitter=new q1}processFirstCoord(e){let t={left:e.pageX,top:e.pageY},n=t,r=e.subjectEl,i;r instanceof HTMLElement&&(i=_2(r),n=Z0(n,i));let a=this.initialHit=this.queryHitForOffset(n.left,n.top);if(a){if(this.useSubjectCenter&&i){let e=X0(i,a.rect);e&&(n=Q0(e))}this.coordAdjust=$0(n,t)}else this.coordAdjust={left:0,top:0}}handleMove(e,t){let n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(t||!R5(this.movingHit,n))&&(this.movingHit=n,this.emitter.trigger(`hitupdate`,n,!1,e))}prepareHits(){this.offsetTrackers=s$(this.droppableStore,e=>(e.component.prepareHits(),new F5(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let t in e)e[t].destroy();this.offsetTrackers={}}queryHitForOffset(e,t){let{droppableStore:n,offsetTrackers:r}=this,i=null;for(let a in n){let o=n[a].component,s=r[a];if(s&&s.isWithinClipping(e,t)){let n=s.computeLeft(),r=s.computeTop(),c=e-n,l=t-r,{origRect:u}=s,d=u.right-u.left,f=u.bottom-u.top;if(c>=0&&c<d&&l>=0&&l<f){let e=o.queryHit(c,l,d,f);e&&Z$(e.dateProfile.activeRange,e.dateSpan.range)&&(this.disablePointCheck||s.el.contains(s.el.getRootNode().elementFromPoint(c+n-window.scrollX,l+r-window.scrollY)))&&(!i||e.layer>i.layer)&&(e.componentId=a,e.context=o.context,e.rect.left+=n,e.rect.right+=n,e.rect.top+=r,e.rect.bottom+=r,i=e)}}}return i}};function R5(e,t){return!e&&!t||!!e==!!t&&k0(e.dateSpan,t.dateSpan)}function z5(e,t){let n={};for(let r of t.pluginHooks.datePointTransforms)Object.assign(n,r(e,t));return Object.assign(n,B5(e,t.dateEnv)),n}function B5(e,t){return{date:t.toDate(e.range.start),dateStr:t.formatIso(e.range.start,{omitTime:e.allDay}),allDay:e.allDay}}var V5=class extends H0{constructor(e){super(e),this.handlePointerDown=e=>{let{dragging:t}=this,n=e.origEvent.target;t.setIgnoreMove(!this.component.isValidDateDownEl(n))},this.handleDragEnd=e=>{let{component:t}=this,{pointer:n}=this.dragging;if(!n.wasTouchScroll){let{initialHit:n,finalHit:r}=this.hitDragging;if(n&&r&&R5(n,r)){let{context:r}=t,i=Object.assign(Object.assign({},z5(n.dateSpan,r)),{dayEl:n.dayEl,jsEvent:e.origEvent,view:r.viewApi||r.calendarApi.view});r.emitter.trigger(`dateClick`,i)}}},this.dragging=new P5(e.el),this.dragging.autoScroller.isEnabled=!1;let t=this.hitDragging=new L5(this.dragging,W0(e));t.emitter.on(`pointerdown`,this.handlePointerDown),t.emitter.on(`dragend`,this.handleDragEnd)}destroy(){this.dragging.destroy()}},H5=class extends H0{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=e=>{let{component:t,dragging:n}=this,{options:r}=t.context,i=r.selectable&&t.isValidDateDownEl(e.origEvent.target);n.setIgnoreMove(!i),n.delay=e.isTouch?U5(t):null},this.handleDragStart=e=>{this.component.context.calendarApi.unselect(e)},this.handleHitUpdate=(e,t)=>{let{context:n}=this.component,r=null,i=!1;if(e){let t=this.hitDragging.initialHit;e.componentId===t.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(t,e)||(r=W5(t,e,n.pluginHooks.dateSelectionTransformers)),(!r||!Y2(r,e.dateProfile,n))&&(i=!0,r=null)}r?n.dispatch({type:`SELECT_DATES`,selection:r}):t||n.dispatch({type:`UNSELECT_DATES`}),i?_Z():vZ(),t||(this.dragSelection=r)},this.handlePointerUp=e=>{this.dragSelection&&=($1(this.dragSelection,e,this.component.context),null)};let{component:t}=e,{options:n}=t.context,r=this.dragging=new P5(e.el);r.touchScrollAllowed=!1,r.minDistance=n.selectMinDistance||0,r.autoScroller.isEnabled=n.dragScroll;let i=this.hitDragging=new L5(this.dragging,W0(e));i.emitter.on(`pointerdown`,this.handlePointerDown),i.emitter.on(`dragstart`,this.handleDragStart),i.emitter.on(`hitupdate`,this.handleHitUpdate),i.emitter.on(`pointerup`,this.handlePointerUp)}destroy(){this.dragging.destroy()}};function U5(e){let{options:t}=e.context,n=t.selectLongPressDelay;return n??=t.longPressDelay,n}function W5(e,t,n){let r=e.dateSpan,i=t.dateSpan,a=[r.range.start,r.range.end,i.range.start,i.range.end];a.sort(kZ);let o={};for(let r of n){let n=r(e,t);if(n===!1)return null;n&&Object.assign(o,n)}return o.range={start:a[0],end:a[3]},o.allDay=r.allDay,o}var G5=class e extends H0{constructor(t){super(t),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=e=>{let t=e.origEvent.target,{component:n,dragging:r}=this,{mirror:i}=r,{options:a}=n.context,o=n.context;this.subjectEl=e.subjectEl;let s=this.subjectSeg=p0(e.subjectEl),c=(this.eventRange=s.eventRange).instance.instanceId;this.relevantEvents=b1(o.getCurrentData().eventStore,c),r.minDistance=e.isTouch?0:a.eventDragMinDistance,r.delay=e.isTouch&&c!==n.props.eventSelection?q5(n):null,i.parentNode=a.fixedMirrorParent?a.fixedMirrorParent:QX(t,`.fc`),i.revertDuration=a.dragRevertDuration;let l=n.isValidSegDownEl(t)&&!QX(t,`.fc-event-resizer`);r.setIgnoreMove(!l),this.isDragging=l&&e.subjectEl.classList.contains(`fc-event-draggable`)},this.handleDragStart=e=>{let t=this.component.context,n=this.eventRange,r=n.instance.instanceId;e.isTouch?r!==this.component.props.eventSelection&&t.dispatch({type:`SELECT_EVENT`,eventInstanceId:r}):t.dispatch({type:`UNSELECT_EVENT`}),this.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger(`eventDragStart`,{el:this.subjectEl,event:new s0(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},this.handleHitUpdate=(e,t)=>{if(!this.isDragging)return;let n=this.relevantEvents,r=this.hitDragging.initialHit,i=this.component.context,a=null,o=null,s=null,c=!1,l={affectedEvents:n,mutatedEvents:S1(),isEvent:!0};if(e){a=e.context;let t=a.options;i===a||t.editable&&t.droppable?(o=K5(r,e,this.eventRange.instance.range.start,a.getCurrentData().pluginHooks.eventDragMutationMassagers),o&&(s=r0(n,a.getCurrentData().eventUiBases,o,a),l.mutatedEvents=s,J2(l,e.dateProfile,a)||(c=!0,o=null,s=null,l.mutatedEvents=S1()))):a=null}this.displayDrag(a,l),c?_Z():vZ(),t||(i===a&&R5(r,e)&&(o=null),this.dragging.setMirrorNeedsRevert(!o),this.dragging.setMirrorIsVisible(!e||!this.subjectEl.getRootNode().querySelector(`.fc-event-mirror`)),this.receivingContext=a,this.validMutation=o,this.mutatedRelevantEvents=s)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=e=>{if(this.isDragging){let t=this.component.context,n=t.viewApi,{receivingContext:r,validMutation:i}=this,a=this.eventRange.def,o=this.eventRange.instance,s=new s0(t,a,o),c=this.relevantEvents,l=this.mutatedRelevantEvents,{finalHit:u}=this.hitDragging;if(this.clearDrag(),t.emitter.trigger(`eventDragStop`,{el:this.subjectEl,event:s,jsEvent:e.origEvent,view:n}),i){if(r===t){let r=new s0(t,l.defs[a.defId],o?l.instances[o.instanceId]:null);t.dispatch({type:`MERGE_EVENTS`,eventStore:l});let u={oldEvent:s,event:r,relatedEvents:l0(l,t,o),revert(){t.dispatch({type:`MERGE_EVENTS`,eventStore:c})}},d={};for(let e of t.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(d,e(i,t));t.emitter.trigger(`eventDrop`,Object.assign(Object.assign(Object.assign({},u),d),{el:e.subjectEl,delta:i.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger(`eventChange`,u)}else if(r){let i={event:s,relatedEvents:l0(c,t,o),revert(){t.dispatch({type:`MERGE_EVENTS`,eventStore:c})}};t.emitter.trigger(`eventLeave`,Object.assign(Object.assign({},i),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:`REMOVE_EVENTS`,eventStore:c}),t.emitter.trigger(`eventRemove`,i);let d=l.defs[a.defId],f=l.instances[o.instanceId],p=new s0(r,d,f);r.dispatch({type:`MERGE_EVENTS`,eventStore:l});let m={event:p,relatedEvents:l0(l,r,f),revert(){r.dispatch({type:`REMOVE_EVENTS`,eventStore:l})}};r.emitter.trigger(`eventAdd`,m),e.isTouch&&r.dispatch({type:`SELECT_EVENT`,eventInstanceId:o.instanceId}),r.emitter.trigger(`drop`,Object.assign(Object.assign({},z5(u.dateSpan,r)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:u.context.viewApi})),r.emitter.trigger(`eventReceive`,Object.assign(Object.assign({},m),{draggedEl:e.subjectEl,view:u.context.viewApi}))}}else t.emitter.trigger(`_noEventDrop`)}this.cleanup()};let{component:n}=this,{options:r}=n.context,i=this.dragging=new P5(t.el);i.pointer.selector=e.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.dragScroll;let a=this.hitDragging=new L5(this.dragging,G0);a.useSubjectCenter=t.useEventCenter,a.emitter.on(`pointerdown`,this.handlePointerDown),a.emitter.on(`dragstart`,this.handleDragStart),a.emitter.on(`hitupdate`,this.handleHitUpdate),a.emitter.on(`pointerup`,this.handlePointerUp),a.emitter.on(`dragend`,this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,t){let n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:`SET_EVENT_DRAG`,state:{affectedEvents:t.affectedEvents,mutatedEvents:S1(),isEvent:!0}}):r.dispatch({type:`UNSET_EVENT_DRAG`})),e&&e.dispatch({type:`SET_EVENT_DRAG`,state:t})}clearDrag(){let e=this.component.context,{receivingContext:t}=this;t&&t.dispatch({type:`UNSET_EVENT_DRAG`}),e!==t&&e.dispatch({type:`UNSET_EVENT_DRAG`})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}};G5.SELECTOR=`.fc-event-draggable, .fc-event-resizable`;function K5(e,t,n,r){let i=e.dateSpan,a=t.dateSpan,o=i.range.start,s=a.range.start,c={};i.allDay!==a.allDay&&(c.allDay=a.allDay,c.hasEnd=t.context.options.allDayMaintainDuration,o=a.allDay?oQ(n):n);let l=r1(o,s,e.context.dateEnv,e.componentId===t.componentId?e.largeUnit:null);l.milliseconds&&(c.allDay=!1);let u={datesDelta:l,standardProps:c};for(let n of r)n(u,e,t);return u}function q5(e){let{options:t}=e.context,n=t.eventLongPressDelay;return n??=t.longPressDelay,n}var J5=class extends H0{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=e=>{let{component:t}=this,n=p0(this.querySegEl(e)),r=this.eventRange=n.eventRange;this.dragging.minDistance=t.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&this.component.props.eventSelection!==r.instance.instanceId)},this.handleDragStart=e=>{let{context:t}=this.component,n=this.eventRange;this.relevantEvents=b1(t.getCurrentData().eventStore,this.eventRange.instance.instanceId);let r=this.querySegEl(e);this.draggingSegEl=r,this.draggingSeg=p0(r),t.calendarApi.unselect(),t.emitter.trigger(`eventResizeStart`,{el:r,event:new s0(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi})},this.handleHitUpdate=(e,t,n)=>{let{context:r}=this.component,i=this.relevantEvents,a=this.hitDragging.initialHit,o=this.eventRange.instance,s=null,c=null,l=!1,u={affectedEvents:i,mutatedEvents:S1(),isEvent:!0};e&&(e.componentId===a.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(a,e)||(s=Y5(a,e,n.subjectEl.classList.contains(`fc-event-resizer-start`),o.range))),s&&(c=r0(i,r.getCurrentData().eventUiBases,s,r),u.mutatedEvents=c,J2(u,e.dateProfile,r)||(l=!0,s=null,c=null,u.mutatedEvents=null)),c?r.dispatch({type:`SET_EVENT_RESIZE`,state:u}):r.dispatch({type:`UNSET_EVENT_RESIZE`}),l?_Z():vZ(),t||(s&&R5(a,e)&&(s=null),this.validMutation=s,this.mutatedRelevantEvents=c)},this.handleDragEnd=e=>{let{context:t}=this.component,n=this.eventRange.def,r=this.eventRange.instance,i=new s0(t,n,r),a=this.relevantEvents,o=this.mutatedRelevantEvents;if(t.emitter.trigger(`eventResizeStop`,{el:this.draggingSegEl,event:i,jsEvent:e.origEvent,view:t.viewApi}),this.validMutation){let s=new s0(t,o.defs[n.defId],r?o.instances[r.instanceId]:null);t.dispatch({type:`MERGE_EVENTS`,eventStore:o});let c={oldEvent:i,event:s,relatedEvents:l0(o,t,r),revert(){t.dispatch({type:`MERGE_EVENTS`,eventStore:a})}};t.emitter.trigger(`eventResize`,Object.assign(Object.assign({},c),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||PZ(0),endDelta:this.validMutation.endDelta||PZ(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger(`eventChange`,c)}else t.emitter.trigger(`_noEventResize`);this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:t}=e,n=this.dragging=new P5(e.el);n.pointer.selector=`.fc-event-resizer`,n.touchScrollAllowed=!1,n.autoScroller.isEnabled=t.context.options.dragScroll;let r=this.hitDragging=new L5(this.dragging,W0(e));r.emitter.on(`pointerdown`,this.handlePointerDown),r.emitter.on(`dragstart`,this.handleDragStart),r.emitter.on(`hitupdate`,this.handleHitUpdate),r.emitter.on(`dragend`,this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return QX(e.subjectEl,`.fc-event`)}};function Y5(e,t,n,r){let i=e.context.dateEnv,a=e.dateSpan.range.start,o=t.dateSpan.range.start,s=r1(a,o,i,e.largeUnit);if(n){if(i.add(r.start,s)<r.end)return{startDelta:s}}else if(i.add(r.end,s)>r.start)return{endDelta:s};return null}var X5=class{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=e=>{e.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=e=>{let t=this.context.options.unselectCancel,n=iZ(e.origEvent);this.matchesCancel=!!QX(n,t),this.matchesEvent=!!QX(n,G5.SELECTOR)},this.onDocumentPointerUp=e=>{let{context:t}=this,{documentPointer:n}=this,r=t.getCurrentData();if(!n.wasTouchScroll){if(r.dateSelection&&!this.isRecentPointerDateSelect){let n=t.options.unselectAuto;n&&(!n||!this.matchesCancel)&&t.calendarApi.unselect(e)}
121r.eventSelection&&!this.matchesEvent&&t.dispatch({type:`UNSELECT_EVENT`})}this.isRecentPointerDateSelect=!1};let t=this.documentPointer=new S5(document);t.shouldIgnoreMove=!0,t.shouldWatchScroll=!1,t.emitter.on(`pointerdown`,this.onDocumentPointerDown),t.emitter.on(`pointerup`,this.onDocumentPointerUp),e.emitter.on(`select`,this.onSelect)}destroy(){this.context.emitter.off(`select`,this.onSelect),this.documentPointer.destroy()}},Z5={fixedMirrorParent:$},Q5={dateClick:$,eventDragStart:$,eventDragStop:$,eventDrop:$,eventResizeStart:$,eventResizeStop:$,eventResize:$,drop:$,eventReceive:$,eventLeave:$};F2.dataAttrPrefix=``;var $5=t3({name:`@fullcalendar/interaction`,componentInteractions:[V5,H5,G5,J5],calendarInteractions:[X5],elementDraggingImpl:P5,optionRefiners:Z5,listenerRefiners:Q5});function e7({...e}){return(0,R.jsx)(Z_,{"data-slot":`popover`,...e})}function t7({...e}){return(0,R.jsx)(Q_,{"data-slot":`popover-trigger`,...e})}function n7({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,R.jsx)($_,{children:(0,R.jsx)(ev,{"data-slot":`popover-content`,align:t,sideOffset:n,className:W(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r})})}var r7=Jo(``,{variants:{width:{sm:`w-56`,md:`w-72`,lg:`w-80`},scrollContent:{true:`max-h-[70vh] overflow-y-auto`,false:``}}
121,defaultVariants:{width:`md`,scrollContent:!1}});function i7({open:e,onOpenChange:t,trigger:n,align:r=`center`,width:i=`md`,scrollContent:a=!1,children:o}){return(0,R.jsxs)(e7,{open:e,onOpenChange:e=>t(e),children:[(0,R.jsx)(t7,{asChild:!0,children:n}),(0,R.jsx)(n7,{"data-kit":`popover-panel`,align:r,className:r7({width:i,scrollContent:a}),children:o})]})}function a7({view:e,onView:t,display:n,onDisplayChange:r,disabled:i}){let{t:a}=K(),[o,s]=(0,L.useState)(!1),c=fE.find(t=>t.key===e)??fE[0];return(0,R.jsx)(i7,{open:o,onOpenChange:s,align:`end`,width:`md`,trigger:(0,R.jsxs)(G,{variant:`outline`,size:`sm`,"data-kit":`calendar-view-menu-trigger`,disabled:i,"aria-label":a(`calendar.viewMenu.trigger`,{view:a(c.labelKey)}),children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,children:a(c.labelKey)}),(0,R.jsx)(Vw,{"aria-hidden":`true`})]}),children:(0,R.jsxs)(`div`,{"data-kit":`calendar-view-menu`,"aria-label":a(`calendar.viewMenu.ariaLabel`),className:`flex flex-col gap-1`,children:[(0,R.jsx)(`ul`,{role:`group`,"aria-label":a(`calendar.toolbar.view`),children:fE.map(n=>(0,R.jsx)(`li`,{children:(0,R.jsxs)(G,{variant:`ghost`,size:`sm`,className:W(`w-full justify-start`,e===n.key&&`bg-accent text-accent-foreground`),"aria-pressed":e===n.key,"aria-keyshortcuts":n.shortcut,onClick:()=>{t(n.key),s(!1)},children:[(0,R.jsx)(`span`,{className:`flex-1 text-left`,children:a(n.labelKey)}),(0,R.jsx)(`kbd`,{"aria-hidden":`true`,className:`ml-auto text-xs uppercase text-muted-foreground`,children:n.shortcut})]})},n.key))}),(0,R.jsx)(sM,{}),(0,R.jsxs)(`ul`,{className:`flex flex-col gap-1`,children:[(0,R.jsx)(o7,{id:`calendar-display-weekends`,label:a(`calendar.viewMenu.showWeekends`),checked:n.showWeekends,onCheckedChange:e=>r({showWeekends:e})}),(0,R.jsx)(o7,{id:`calendar-display-dim-past`,label:a(`calendar.viewMenu.dimPast`),checked:n.dimPast,onCheckedChange:e=>r({dimPast:e})})]})]})})}function o7({id:e,label:t,checked:n,onCheckedChange:r}){return(0,R.jsxs)(`li`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,R.jsx)(aW,{id:e,checked:n,onCheckedChange:e=>r(e===!0)}),(0,R.jsx)(`label`,{htmlFor:e,className:`cursor-pointer text-sm`,children:t})]})}function s7({title:e,view:t,onView:n,onPrev:r,onNext:i,onToday:a,onCreate:o,busy:s=!1,leading:c,timezone:l,display:u=xO,onDisplayChange:d=()=>void 0}){let{t:f}=K();return(0,R.jsxs)(`div`,{className:W(`flex flex-wrap items-center gap-x-4 gap-y-2 border-b px-4 py-3`,s&&`opacity-50`),children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[c,(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:r,disabled:s,"aria-label":`Previous`,title:`Previous`,"aria-keyshortcuts":`k p ArrowLeft`,children:(0,R.jsx)(Hw,{})}),(0,R.jsxs)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:a,disabled:s,"aria-keyshortcuts":`t`,children:[(0,R.jsx)(Rw,{className:`h-4 w-4 sm:hidden`}),(0,R.jsx)(`span`,{className:`sr-only sm:not-sr-only`,children:`Today`})]}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:i,disabled:s,"aria-label":`Next`,title:`Next`,"aria-keyshortcuts":`j n ArrowRight`,children:(0,R.jsx)(Uw,{})})]}),(0,R.jsxs)(`h1`,{className:`min-w-0 flex-1 truncate text-base font-semibold lg:text-center lg:text-lg`,children:[(0,R.jsx)(`span`,{className:`sr-only`,children:`Calendar: `}),e]}),l&&(0,R.jsx)(`span`,{className:`hidden text-xs text-muted-foreground lg:inline`,children:l}),(0,R.jsxs)(`div`,{className:`flex w-full items-center justify-end gap-2 lg:w-auto`,children:[(0,R.jsx)(`div`,{className:`hidden md:block`,children:(0,R.jsx)(a7,{view:t,onView:n,display:u,onDisplayChange:d,disabled:s})}),(0,R.jsx)(`select`,{"aria-label":`View`,value:t,onChange:e=>n(e.target.value),disabled:s,className:`h-8 rounded-md border bg-background px-2 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 md:hidden dark:bg-input/30`,children:fE.map(e=>(0,R.jsx)(`option`,{value:e.key,children:f(e.labelKey)},e.key))}),(0,R.jsxs)(G,{onClick:o,disabled:s,size:`sm`,"aria-keyshortcuts":`c`,children:[(0,R.jsx)(CT,{className:`h-4 w-4 mr-1`}),`New event`]})]})]})}function c7({title:e,timeText:t,eventType:n,outOfOffice:r,statusProperties:i,workingLocation:a,connections:o,recurrenceSummary:s,eventColor:c}){let{t:l}=K(),u=l7(n,r,i),d=r?i?.declineMessage??``:``,f=[n==="default"?``:l(_E[n]),n==="default"&&r?l(`calendar.eventType.out_of_office`):``,s,d].filter(e=>e!==``).join(` · `);return(0,R.jsxs)(`span`,{className:`chub-chip`,title:f||void 0,children:[(0,R.jsx)(`span`,{className:`chub-chip__bar`,"aria-hidden":`true`,style:{backgroundColor:c}}),o.length>0?(0,R.jsx)(`span`,{className:`chub-chip__dots`,children:o.map(e=>(0,R.jsx)(`span`,{role:`img`,className:`chub-chip__dot`,style:{backgroundColor:e.color||`currentColor`},title:e.accountEmail||e.provider,"aria-label":e.accountEmail||e.provider},e.connectionId))}):null,u?(0,R.jsx)(u,{className:`chub-chip__glyph`,"aria-hidden":`true`}):null,s?(0,R.jsx)(ET,{className:`chub-chip__glyph`,"aria-hidden":`true`}):null,t?(0,R.jsx)(`span`,{className:`chub-chip__time`,children:t}):null,(0,R.jsx)(`span`,{className:`chub-chip__title`,children:e||l(`calendar.summary.untitled`)}),a?(0,R.jsx)(`span`,{className:`chub-chip__meta`,children:a}):null]})}function l7(e,t,n){return e===`birthday`?Iw:e===`focus_time`?aT:e===`working_location`?n?.w
121orkingLocation?.type===`home_office`?oT:Fw:t?xT:null}var u7={hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`short`},d7={hour:`2-digit`,minute:`2-digit`,hour12:!1},f7={timeGrid:{allDayText:``},listSchedule:{type:`list`,duration:{days:30},listDayFormat:{weekday:`long`},listDaySideFormat:{month:`long`,day:`numeric`,year:`numeric`}}};function p7({events:e,view:t,focusedDate:n,loading:r=!1,fetching:i=!1,error:a,onRetry:o,notice:s,editorOpen:c=!1,showSlotPlaceholder:l=!1,defaultEventColor:u=uO,connections:d={},businessHours:f,weekStartsOn:p=1,hour12:m,onVisibleWindowChange:h,onViewChange:g,onPrev:_,onNext:v,onToday:y,onSelectSlot:b,onSelectEvent:x,onContextMenuEvent:S=()=>!1,onMoveEvent:C,onCreate:w,toolbarLeading:T,belowToolbar:E,display:D=xO,onDisplayChange:O=()=>void 0}){let{t:k}=K(),ee=(0,L.useRef)(null),A=(0,L.useRef)(null),[j,te]=(0,L.useState)(null),ne=(0,L.useRef)(``),re=(0,L.useRef)(``),[M]=(0,L.useState)(()=>`${String(new Date().getHours()).padStart(2,`0`)}:00:00`),[N]=(0,L.useState)(()=>oO(kD())),ie=(0,L.useRef)(null),ae=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(!A.current||typeof window>`u`||!window.ResizeObserver)return;let e=null,t=new ResizeObserver(()=>{e!==null&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{ee.current?.getApi().updateSize(),e=null})});return t.observe(A.current),()=>{e!==null&&cancelAnimationFrame(e),t.disconnect()}},[]);function oe(e){let t=e.start.toISOString(),n=e.end.toISOString(),r=e.view.title,i=e.view.type,a=`${i}|${t}|${n}`;a!==ne.current&&(ne.current=a,queueMicrotask(()=>{te(r),h({from:t,to:n,view:i,title:r})}))}(0,L.useEffect)(()=>{queueMicrotask(()=>{let e=ee.current?.getApi();e&&e.view.type!==t&&(e.changeView(t),e.scrollToTime(M))})},[t,M]),(0,L.useEffect)(()=>{queueMicrotask(()=>{let e=ee.current?.getApi();e&&AD(e.getDate())!==n&&e.gotoDate(n)})},[n]),(0,L.useEffect)(()=>{if(c){ae.current=!0;return}if(!ae.current)return;ae.current=!1;let e=ie.current;ie.current=null,e?.isConnected&&e.focus()},[c]);let P=(0,L.useRef)(!1);(0,L.useEffect)(()=>{let e=A.current;if(!e)return;function t(){P.current=!0}function n(){P.current=!1}return e.addEventListener(`mousedown`,t),window.addEventListener(`mouseup`,n),()=>{e.removeEventListener(`mousedown`,t),window.removeEventListener(`mouseup`,n)}},[]);let F=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(l){F.current=!0;return}!F.current&&!c||(F.current=!1,!P.current&&queueMicrotask(()=>{ee.current?.getApi().unselect()}))},[l,c]),(0,L.useEffect)(()=>{function e(e){if(!(r||c)&&!(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)&&!g7(e.target)){switch(e.key){case`t`:y();break;case`j`:case`n`:case`ArrowRight`:v();break;case`k`:case`p`:case`ArrowLeft`:_();break;case`d`:g(`timeGridDay`);break;case`w`:g(`timeGridWeek`);break;case`m`:g(`dayGridMonth`);break;case`l`:g(`listWeek`);break;case`a`:g(`listSchedule`);break;case`c`:w();break;default:return}e.preventDefault()}}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r,c,y,v,_,g,w]);function I(e){b(e.allDay?{allDay:!0,start:yD(vD(e.start)),end:bD(vD(e.end)),title:``,notes:{text:``,html:``},color:``,location:``}:{allDay:!1,start:xD(e.start.toISOString()),end:xD(e.end.toISOString()),title:``,notes:{text:``,html:``},color:``,location:``},e.jsEvent?{x:e.jsEvent.clientX,y:e.jsEvent.clientY}:null)}function se(e){let{event:t}=e,n=t.start;if(n===null)return;let r=t.end??new Date(n.getTime()+(t.allDay?864e5:36e5)),i=kD();C({id:t.id,all_day:t.allDay,start:wD(n,t.allDay,i),end:wD(r,t.allDay,i),revert:e.revert})}function ce(e){ie.current=e.el;let t=e.el?e.el.getBoundingClientRect():null;x(e.event.id,t===null?null:{x:t.left,y:t.top,width:t.width,height:t.height})}let le=(0,L.useCallback)(e=>{let t=pE(e.event.extendedProps);return h7(e)&&t.push(`chub-event--placeholder`),t},[]),ue=(0,L.useCallback)(e=>{let t=e.connections?.[0]?.connectionId??``;return pO(e.color??``,d[t]?.color??``,u)},[d,u]),de=(0,L.useCallback)(e=>{if(h7(e))return(0,R.jsx)(`span`,{className:`chub-chip__time`,children:e.timeText});let t=e.event.extendedProps,n=hE(t),r=n.labelKey?k(n.labelKey):n.label;return(0,R.jsx)(c7,{title:e.event.title,timeText:e.timeText,eventType:t.eventType,outOfOffice:mE(t),statusProperties:t.statusProperties,workingLocation:r,connections:RD(t.connections??[],d),recurrenceSummary:_D(t,k),eventColor:ue(t).background})},[d,ue,k]);function fe(e){let t=e.event.extendedProps;
121e.el.dataset.chubEventId=e.event.id;let{background:n,foreground:r}=ue(t);m7(e.el,n,r)}return(0,L.useEffect)(()=>{let t=A.current;if(!t)return;let n=[...Object.entries(d).map(([e,t])=>`${e}:${t.color}`).sort(),...e.map(e=>`${e.id}:${e.extendedProps.color}`)].join(`|`);if(n!==re.current){re.current=n;for(let n of e){let{background:e,foreground:r}=ue(n.extendedProps);t.querySelectorAll(`[data-chub-event-id="${n.id}"]`).forEach(t=>m7(t,e,r))}}}),(0,L.useEffect)(()=>{let t=A.current;if(!t)return;function n(t){let n=t.target;if(!n||typeof n.closest!=`function`)return;let r=n.closest(`[data-chub-event-id]`);if(r===null)return;let i=r.dataset.chubEventId??``,a=e.find(e=>e.id===i);!a||!a.editable||(ie.current=r,S(i,t.clientX,t.clientY)&&t.preventDefault())}return t.addEventListener(`contextmenu`,n),()=>t.removeEventListener(`contextmenu`,n)},[e,S]),(0,R.jsxs)(`div`,{className:`flex min-h-[70vh] flex-1 flex-col bg-background`,"aria-busy":r||i,children:[a&&(0,R.jsxs)(`div`,{"data-kit":`event-calendar-error`,className:`flex flex-wrap items-center gap-x-3 gap-y-1 px-4 py-2`,children:[(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}),o&&(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,"data-kit":`event-calendar-retry`,disabled:i,onClick:()=>o(),children:k(`calendar.loadError.retry`)})]}),s&&(0,R.jsx)(`p`,{role:`status`,className:`px-4 py-2 text-sm text-muted-foreground`,children:s}),(0,R.jsx)(s7,{title:j??`Loadingâ¦`,view:t,onView:g,onPrev:_,onNext:v,onToday:y,onCreate:w,busy:r,leading:T,timezone:N,display:D,onDisplayChange:O}),i&&(0,R.jsx)(`div`,{role:`progressbar`,"aria-label":`Loading events`,"aria-valuetext":`Loading`,className:`h-0.5 w-full overflow-hidden bg-primary/20`,children:(0,R.jsx)(`div`,{className:`h-full w-1/3 bg-primary animate-[chub-progress_1.1s_ease-in-out_infinite] motion-reduce:animate-none`})}),E,(0,R.jsx)(`div`,{className:W(`flex-1`,D.dimPast&&`chub-calendar--dim-past`),ref:A,children:(0,R.jsx)(E6,{ref:ee,plugins:[d8,i5,v5,$5],initialView:t,initialDate:n,firstDay:p,weekends:D.showWeekends,scrollTime:M,scrollTimeReset:!1,businessHours:f,slotLabelFormat:m===void 0?void 0:m?u7:d7,eventTimeFormat:m===void 0?void 0:m?u7:d7,headerToolbar:!1,height:`100%`,editable:!0,selectable:!0,selectMirror:!0,unselectCancel:`[role="dialog"]`,eventResizableFromStart:!0,nowIndicator:!0,allDaySlot:!0,views:f7,allDayMaintainDuration:!1,dayMaxEvents:!0,noEventsContent:`No events in this range.`,nowIndicatorContent:e=>e.isAxis?(0,R.jsx)(`span`,{className:`sr-only`,children:`Current time`}):null,events:e,eventBackgroundColor:u,eventBorderColor:u,eventClassNames:le,eventContent:de,eventDidMount:fe,select:I,eventClick:ce,eventDrop:se,eventResize:se,datesSet:oe})})]})}function m7(e,t,n){!e.classList.contains(`fc-v-event`)&&!e.classList.contains(`fc-h-event`)||(e.style.backgroundColor=t,e.style.borderColor=t,e.style.setProperty(`--fc-event-text-color`,n))}function h7(e){return e.isMirror===!0&&e.isDragging!==!0&&e.isResizing!==!0}function g7(e){let t=e;return!t||typeof t.closest!=`function`?!1:t.closest(`input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="dialog"]`)!==null}var _7=[{name:`Default`,value:``,labelKey:`common.colour.swatch.default`},{name:`Red`,value:`#dc2626`,labelKey:`common.colour.swatch.red`},{name:`Orange`,value:`#ea580c`,labelKey:`common.colour.swatch.orange`},{name:`Amber`,value:`#d97706`,labelKey:`common.colour.swatch.amber`},{name:`Green`,value:`#16a34a`,labelKey:`common.colour.swatch.green`},{name:`Emerald`,value:`#059669`,labelKey:`common.colour.swatch.emerald`},{name:`Teal`,value:`#0d9488`,labelKey:`common.colour.swatch.teal`},{name:`Cyan`,value:`#0891b2`,labelKey:`common.colour.swatch.cyan`},{name:`Blue`,value:`#2563eb`,labelKey:`common.colour.swatch.blue`},{name:`Indigo`,value:`#4f46e5`,labelKey:`common.colour.swatch.indigo`},{name:`Violet`,value:`#7c3aed`,labelKey:`common.colour.swatch.violet`},{name:`Pink`,value:`#db2777`,labelKey:`common.colour.swatch.pink`},{name:`Slate`,value:`#475569`,labelKey:`common.colour.swatch.slate`}],Hte=/^#[0-9a-fA-F]{6}$/;
121function v7({value:e,onChange:t,label:n,colors:r=_7,disabled:i=!1,allowCustom:a=!1,name:o,placeholder:s,error:c,inheritedColor:l}){let{t:u}=K(),d=n??u(`common.colour.label`),f=(0,L.useId)(),p=`${f}-hex`,m=`${f}-error`,h=a?u(`common.colour.presets`,{label:d}):d,g=Hte.test(e)?e:uO;return(0,R.jsxs)(`div`,{className:`space-y-2`,"data-kit":`color-picker`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:a?p:void 0,children:d}),(0,R.jsx)(`div`,{className:`flex flex-wrap gap-2`,role:`group`,"aria-label":h,children:r.map(n=>{let r=n.value||l||`#3b6ea5`,a=e===n.value;return(0,R.jsx)(`button`,{type:`button`,onClick:()=>t(n.value),"aria-pressed":a,"aria-label":n.labelKey?u(n.labelKey):n.name,disabled:i,className:W(`relative h-8 w-8 rounded-md border-2 transition-all`,a?`border-ring ring-2 ring-ring/50`:`border-border hover:border-ring`,i&&`cursor-not-allowed opacity-50`),style:{backgroundColor:r},children:(n.value===``||a)&&(0,R.jsxs)(`svg`,{className:`absolute inset-0 h-full w-full`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,style:{color:fO(r)},"aria-hidden":`true`,children:[n.value===``&&l===void 0&&(0,R.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`}),a&&(0,R.jsx)(`polyline`,{points:`6 12.5 10.5 17 18 8`})]})},n.value||`default`)})}),a&&(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`input`,{type:`color`,"aria-label":u(`common.colour.picker`,{label:d}),value:g,disabled:i,onChange:e=>t(e.target.value),className:`h-9 w-12 shrink-0 cursor-pointer rounded-md border border-input bg-transparent p-1 disabled:cursor-not-allowed disabled:opacity-50`}),(0,R.jsx)(VC,{id:p,name:o,type:`text`,value:e,placeholder:s,disabled:i,"aria-invalid":c!==void 0,"aria-describedby":c===void 0?void 0:m,onChange:e=>t(e.target.value)})]}),a&&c!==void 0&&(0,R.jsx)(`p`,{id:m,className:`text-destructive text-sm`,children:c})]})}function y7(e,t,n=!0){(0,L.useEffect)(()=>{if(!n)return;function r(n){let r=e.current;r&&!r.contains(n.target)&&t()}function i(e){e.key===`Escape`&&(e.stopPropagation(),t())}return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e,t,n])}var b7=224,x7=250,S7=4;function Ute({anchorX:e,anchorY:t,color:n,inheritedColor:r,pending:i=!1,error:a,onRecolor:o,onDelete:s,onDismiss:c}){let{t:l}=K(),u=(0,L.useRef)(null);y7(u,c);let{left:d,top:f}=bO(e+S7,t+S7,b7,x7,typeof window>`u`?b7+16:window.innerWidth,typeof window>`u`?x7+16:window.innerHeight);return(0,R.jsxs)(`div`,{ref:u,role:`dialog`,"aria-label":l(`calendar.contextMenu.ariaLabel`),"data-kit":`event-context-menu`,style:{position:`fixed`,left:d,top:f,zIndex:50},className:`w-56 rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg`,children:[(0,R.jsxs)(G,{variant:`ghost`,className:`w-full justify-start text-destructive`,disabled:i,onClick:s,children:[(0,R.jsx)(FT,{"aria-hidden":`true`}),l(`calendar.contextMenu.delete`)]}),(0,R.jsx)(sM,{}),(0,R.jsx)(`div`,{className:`p-2`,children:(0,R.jsx)(v7,{value:n,inheritedColor:r,disabled:i,onChange:o})}),n===``&&(0,R.jsxs)(`p`,{"data-kit":`event-context-menu-inherited`,className:`mx-1.5 mb-1 flex items-start gap-2 rounded-md bg-muted px-2.5 py-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(sT,{"aria-hidden":`true`,className:`mt-0.5 h-3.5 w-3.5 shrink-0`}),l(`calendar.contextMenu.inheritedColor`)]}),a?(0,R.jsx)(`p`,{role:`alert`,className:`px-2 py-1 text-sm text-destructive`,children:a}):null]})}function C7({value:e,onChange:t,label:n,name:r=`color`,colors:i=_7,disabled:a=!1,inheritedColor:o}){let{t:s}=K(),c=n??s(`common.colour.label`);return(0,R.jsx)($O,{name:r,label:c,value:e,onChange:e=>t(e.target.value),disabled:a,swatch:e||o||`#3b6ea5`,options:i.map(e=>({value:e.value,label:e.labelKey?s(e.labelKey):e.name}))})}function w7({value:e,onChange:t,options:n,canChoose:r,disabled:i=!1,hint:a}){let{t:o}=K(),s=(0,L.useId)(),c=e=>e.labelKey?o(e.labelKey):e.label;if(!r){let t=n.find(t=>t.id===e),r=t?c(t):e===``?o(`integrations.connectionSelect.calendhubOnly`):e;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(`label`,{htmlFor:s,className:`text-sm font-medium leading-none`,children:o(`integrations.connectionSelect.label`)}),(0,R.jsx)(`output`,{id:s,className:`text-sm text-muted-foreground`,children:r})]})}return n.length<=1?null:(0,R.jsx)($O,{name:`connection`,label:o(`integrations.connectionSelect.label`),value:e,onCh
121ange:e=>t(e.target.value),disabled:i,options:n.map(e=>({value:e.id,label:e.reasonKey?o(`integrations.connectionSelect.optionWithReason`,{label:c(e),reason:o(e.reasonKey)}):c(e),disabled:!e.attachable})),hint:a===``?void 0:a??o(`integrations.connectionSelect.hint`)})}function T7({attendees:e}){let{t}=K();return e.length===0?null:(0,R.jsxs)(`div`,{"data-kit":`event-guests`,className:`space-y-1`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium leading-none`,children:t(`calendar.guests.title`)}),(0,R.jsx)(`ul`,{className:`space-y-1 text-sm`,children:e.map(e=>(0,R.jsxs)(`li`,{className:`flex flex-wrap items-baseline gap-x-2`,children:[(0,R.jsx)(`span`,{children:e.displayName||e.email}),e.displayName!==``&&(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:e.email}),(0,R.jsxs)(`span`,{className:`text-muted-foreground`,children:[t(`calendar.guests.response.${e.response}`),e.optional?` · ${t(`calendar.guests.optional`)}`:``]})]},e.email))}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t(`calendar.guests.explainer`)})]})}var Wte=`These cannot be changed after the event is created.`;function Gte({eventType:e,value:t,onChange:n,canChange:r,disabled:i=!1}){let{showDecline:a,showChatStatus:o,showWorkingLocation:s}=bE(e),c=i||!r,l=r?void 0:Wte;return(0,R.jsxs)(R.Fragment,{children:[a&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($O,{name:`auto_decline`,label:`Conflicting invitations`,value:t.autoDecline||`decline_none`,onChange:e=>n({autoDecline:e.target.value}),disabled:c,options:[{value:`decline_none`,label:`Do nothing`},{value:`decline_only_new_conflicting_invitations`,label:`Decline new conflicting invitations`},{value:`decline_all_conflicting_invitations`,label:`Decline all conflicting invitations`}],hint:l??`Google enforces this on your Google calendar. CalendHub only records it.`}),(0,R.jsx)(q,{name:`decline_message`,label:`Decline message`,value:t.declineMessage,onChange:e=>n({declineMessage:e.target.value}),placeholder:`I'm out of office`,disabled:c})]}),o&&(0,R.jsx)($O,{name:`chat_status`,label:`Chat status`,value:t.chatStatus||`do_not_disturb`,onChange:e=>n({chatStatus:e.target.value}),disabled:c,options:[{value:`do_not_disturb`,label:`Do not disturb`},{value:`available`,label:`Available`}],hint:a?void 0:l}),s&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($O,{name:`work_location_type`,label:`Working from`,value:t.workLocationType||`home_office`,onChange:e=>n({workLocationType:e.target.value}),disabled:c,options:[{value:`home_office`,label:`Home`},{value:`office_location`,label:`Office`},{value:`custom_location`,label:`Somewhere else`}],hint:l}),(0,R.jsx)(q,{name:`work_location_label`,label:`Label`,value:t.workLocationLabel,onChange:e=>n({workLocationLabel:e.target.value}),placeholder:`Building 4`,disabled:c})]})]})}function E7({eventType:e,provider:t=``,allDay:n,start:r,end:i,onAllDayChange:a,onStartChange:o,onEndChange:s,startError:c,endError:l,timezoneLabel:u,disabled:d=!1,layout:f=`stacked`}){let{t:p}=K(),m=(0,L.useId)(),{allDayAllowed:h}=bE(e,t),g=(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(aW,{id:m,checked:n,onCheckedChange:e=>a(e===!0),disabled:d||!h}),(0,R.jsx)(HC,{htmlFor:m,className:`cursor-pointer`,children:p(`calendar.timeFields.allDay`)}),!h&&(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:p(`calendar.timeFields.noAllDayOnGoogle`,{type:p(_E[e])})})]}),_=(0,R.jsx)(q,{name:`start`,label:p(n?`calendar.timeFields.startDate`:`calendar.timeFields.startTime`),error:c,hint:!n&&u?p(`calendar.timeFields.timezoneHint`,{timezone:u}):void 0,required:!0,type:n?`date`:`datetime-local`,value:r,onChange:e=>o(e.target.value),disabled:d}),v=(0,R.jsx)(q,{name:`end`,label:p(n?`calendar.timeFields.endDate`:`calendar.timeFields.endTime`),error:l,required:!0,type:n?`date`:`datetime-local`,value:i,onChange:e=>s(e.target.value),disabled:d});return f===`chips`?(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsxs)(`div`,{"data-kit":`event-time-chips`,className:`flex flex-wrap items-start gap-2 [&_label]:sr-only [&_input]:h-8 [&_input]:w-auto [&_input]:rounded-md [&_input]:border-transparent [&_input]:bg-secondary [&_input]:px-3 [&_input]:font-medium [&_input]:shadow-none`,children:[_,(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`mt-1 text-muted-foreground`,children:`â`}),v]}),(0,R.jsx)(`div`,{"data-kit":`event-time-all-day`,children:g})]}):(0,R.jsxs)(R.Fragment,{children:[g,_,v]})}var Kte=`[&_input]:h-auto [&_input]:rounded-none [&_input]:border-x-0 [&_input]:border-t-0 [&_input]:border-b-2 [&_input]:border-input [&_input]:bg-transparent [&_input]:px-0 [&_input]:pb-1.5 [&_input]:shadow-none [&_label]:sr-only [&_input]:focus-visible:border-primary [&_input]:focus-visible:ring-0`,qte={editor:`[&_input]:text-xl [&_input]:font-semibold`,quick:`[&_input]:text-base [&_input]:font-medium`};function D7({size:e=`editor`,...t}){return(0,R.jsx)(`div`,{"data-kit":`event-title-field`,className:`${Kte} ${qte[e]}`,children:(0,R.jsx)(q,{...t})})}
121function Jte({value:e,onChange:t,canChange:n,attached:r,disabled:i=!1}){let{t:a}=K(),o=(0,L.useId)(),s=(0,L.useId)(),c=gE.map(e=>({value:e,label:a(_E[e])}));return!n&&!gE.includes(e)&&c.push({value:e,label:a(_E[e])}),n?(0,R.jsx)($O,{name:`event_type`,label:a(`calendar.typeSelect.label`),value:e,onChange:e=>t(e.target.value),disabled:i,options:c,hint:r?a(`calendar.typeSelect.workspaceHint`):void 0}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`label`,{htmlFor:o,children:a(`calendar.typeSelect.label`)}),(0,R.jsx)(`output`,{id:o,"data-kit":`event-type-locked`,"aria-describedby":s,className:`inline-flex h-8 w-fit items-center rounded-md bg-secondary px-3 text-sm font-medium`,children:a(_E[e])}),(0,R.jsx)(`p`,{id:s,className:`text-muted-foreground text-xs`,children:a(`calendar.typeSelect.immutableHint`)})]})}function O7({icon:e,hideLabels:t=!1,children:n}){return(0,R.jsxs)(`div`,{"data-kit":`form-row`,className:`grid grid-cols-[1.25rem_minmax(0,1fr)] items-start gap-x-3 has-[>div:empty]:hidden`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`mt-2 flex h-5 w-5 shrink-0 items-center justify-center text-muted-foreground`,children:e}),(0,R.jsx)(`div`,{className:t?`[&_label]:sr-only [&_[data-field-label]]:sr-only`:void 0,children:n})]})}function Yte({open:e,onOpenChange:t,startDateKey:n,value:r,onDone:i}){let{t:a}=K(),[o,s]=(0,L.useState)(r);(0,L.useEffect)(()=>{e&&s(r)},[e,r]);let[c,l,u]=n.split(`-`).map(Number),d=XE(new Date(c,l-1,u),`long`),{nth:f,last:p}=eD(n),m=(o.freq!==`weekly`||o.weekdays.length>0)&&(o.ends!==`on`||o.until!==``)&&(o.ends!==`after`||o.count>=1),h={...o,weekdays:[...o.weekdays].sort((e,t)=>YE.indexOf(e)-YE.indexOf(t)),until:o.ends===`on`?o.until:``,count:o.ends===`after`?o.count:0,monthlyMode:o.monthlyMode===`lastWeek
121day`&&!p?`day`:o.monthlyMode},g=[{value:`daily`,label:a(`calendar.recurrenceDialog.unitDay`)},{value:`weekly`,label:a(`calendar.recurrenceDialog.unitWeek`)},{value:`monthly`,label:a(`calendar.recurrenceDialog.unitMonth`)},{value:`yearly`,label:a(`calendar.recurrenceDialog.unitYear`)}],_=[{value:`never`,label:a(`calendar.recurrenceDialog.endsNever`)},{value:`on`,label:a(`calendar.recurrenceDialog.endsOn`)},{value:`after`,label:a(`calendar.recurrenceDialog.endsAfter`)}],v=[{value:`day`,label:a(`calendar.recurrenceDialog.onDayOfMonth`,{day:u})},{value:`weekday`,label:a(`calendar.recurrenceDialog.onNthWeekday`,{ordinal:a(`calendar.recurrenceSummary.ordinal.${[`first`,`second`,`third`,`fourth`,`fifth`][f-1]}`),weekday:d})}];return p&&v.push({value:`lastWeekday`,label:a(`calendar.recurrenceDialog.onLastWeekday`,{weekday:d})}),(0,R.jsx)(Xj,{title:a(`calendar.recurrenceDialog.title`),open:e,onOpenChange:t,size:`sm`,footer:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(G,{variant:`outline`,type:`button`,onClick:()=>t(!1),children:a(`calendar.recurrenceDialog.cancel`)}),(0,R.jsx)(G,{type:`button`,disabled:!m,onClick:()=>i(h),children:a(`calendar.recurrenceDialog.done`)})]}),children:(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsx)(q,{name:`recurrence_interval`,type:`number`,min:1,max:99,label:a(`calendar.recurrenceDialog.repeatEvery`),value:String(o.interval),onChange:e=>{let t=parseInt(e.target.value,10);s({...o,interval:isNaN(t)||t<1?1:Math.min(t,99)})}}),(0,R.jsx)($O,{name:`recurrence_freq`,label:a(`calendar.recurrenceDialog.unit`),value:o.freq,onChange:e=>s({...o,freq:e.target.value}),options:g}),o.freq===`weekly`&&(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)(`fieldset`,{"data-kit":`recurrence-dialog-weekdays`,className:`space-y-3`,children:[(0,R.jsx)(`legend`,{className:`text-sm font-medium`,children:a(`calendar.recurrenceDialog.repeatOn`)}),(0,R.jsx)(`div`,{className:`space-y-2`,children:YE.map(e=>{let t=YE.indexOf(e),n=XE(new Date(2026,7,17+t),`long`);return(0,R.jsx)(oW,{name:`recurrence_weekday_${e}`,label:n,checked:o.weekdays.includes(e),onCheckedChange:t=>{s(t?{...o,weekdays:[...o.weekdays,e]}:{...o,weekdays:o.weekdays.filter(t=>t!==e)})}},e)})}),o.weekdays.length===0&&(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-red-600`,children:a(`calendar.recurrenceDialog.pickADay`)})]})}),(o.freq===`monthly`||o.freq===`yearly`)&&(0,R.jsx)(Zj,{name:`recurrence_monthly_mode`,label:a(`calendar.recurrenceDialog.repeatOn`),value:o.monthlyMode,onValueChange:e=>s({...o,monthlyMode:e}),options:v}),(0,R.jsx)(Zj,{name:`recurrence_ends`,label:a(`calendar.recurrenceDialog.ends`),value:o.ends,onValueChange:e=>s({...o,ends:e}),options:_}),o.ends===`on`&&(0,R.jsx)(q,{name:`recurrence_until`,type:`date`,label:a(`calendar.recurrenceDialog.endDate`),value:o.until,onChange:e=>s({...o,until:e.target.value})}),o.ends===`after`&&(0,R.jsx)(q,{name:`recurrence_count`,type:`number`,min:1,max:999,label:a(`calendar.recurrenceDialog.occurrences`),value:String(o.count),onChange:e=>{let t=parseInt(e.target.value,10);s({...o,count:isNaN(t)||t<1?1:Math.min(t,999)})}})]})})}function Xte({start:e,value:t,onChange:n,canChange:r,disabled:i=!1}){let{t:a}=K(),[o,s]=(0,L.useState)(!1),c=(0,L.useId)(),l=(0,L.useId)();if(!r&&t.preset===`none`)return null;let u=nD(e);if(!r){let n=t.preset===`custom`&&!t.custom?a(`calendar.recurrenceField.customRuleHint`,{rrule:t.rrule}):a(`calendar.recurrenceField.lockedHint`);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`label`,{htmlFor:c,children:a(`calendar.recurrenceField.label`)}),(0,R.jsx)(`output`,{id:c,"data-kit":`recurrence-locked`,"aria-describedby":l,className:`inline-flex h-8 w-fit items-center rounded-md bg-secondary px-3 text-sm font-medium`,children:yO(t,e,a)}),(0,R.jsx)(`p`,{id:l,className:`text-muted-foreground text-xs`,children:n})]})}let d=hD(u).map(e=>({value:e.value,label:a(e.labelKey,e.params)}));t.preset===`custom`&&t.custom?d[d.length-1].label=pD(t.custom,u,a):t.preset===`custom`&&!t.custom&&(d[d.length-1].label=a(`calendar.recurrence.custom`));let f=t.preset===`custom`&&!t.custom?a(`calendar.recurrenceField.customRuleHint`,{rrule:t.rrule}):void 0;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($O,{name:`recurrence`,label:a(`calendar.recurrenceField.label`),value:t.preset,onChange:e=>{let r=e.target.value;r===`custom`?s(!0):n(fD(t,r,u))},disabled:i,options:d,hint:f}),r&&t.preset!==`none`&&(0,R.jsxs)(`p`,{"data-kit":`recurrence-create-warning`,className:`flex items-start gap-2 text-xs text-warning`,children:[(0,R.jsx)(RT,{"aria-hidden":`true`,className:`mt-0.5 h-3.5 w-3.5 shrink-0`}),a(`calendar.recurrenceField.createWarning`)]}),r&&t.preset===`custom`&&t.custom&&(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>s(!0),children:a(`calendar.recurrenceField.editCustom`)}),(0,R.jsx)(Yte,{open:o,onOpenChange:s,startDateKey:u,value:t.custom??tD(u),onDone:e=>{s(!1),n({preset:`custom`,until:``,rrule:``,custom:e})}}),t.preset!==`none`&&!(t.preset===`custom`&&t.custom)&&(0,R.jsx)(q,{name:`recurrence_until`,label:a(`calendar.recurrenceField.endsOn`),type:`date`,value:t.until,onCh
121ange:e=>n({...t,until:e.target.value}),disabled:i,hint:a(`calendar.recurrenceField.endsOnHint`)})]})}function k7({formId:e,mode:t,readOnly:n=!1,pending:r=!1,deleting:i=!1,onCancel:a,onDelete:o,part:s=`all`}){let{t:c}=K(),l=!n&&s!==`secondary`&&(0,R.jsx)(G,{type:`submit`,form:e,disabled:r||i,children:c(r?`calendar.form.saving`:`calendar.form.save`)});return s===`primary`?(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:l}):(0,R.jsxs)(`div`,{className:`flex w-full flex-row items-center justify-end gap-2`,children:[!n&&t===`edit`&&o&&(0,R.jsx)(G,{type:`button`,variant:`ghost`,onClick:()=>o(),disabled:i,className:`mr-auto`,children:c(`calendar.form.delete`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:()=>a(),disabled:r||i,children:c(n?`calendar.form.close`:`calendar.form.cancel`)}),l]})}var A7=`h-4 w-4`;function Zte({mode:e,initial:t,onSubmit:n,onCancel:r,workingHours:i,onDelete:a,pending:o=!1,deleting:s=!1,error:c,fieldErrors:l={},readOnly:u=!1,readOnlyReason:d,connectionOptions:f=[],bookingPanel:p,attendees:m=[],onDirtyChange:h,id:g,actions:_=`inline`,titleHost:v}){let{t:y}=K(),[b,x]=(0,L.useState)(t),[S,C]=(0,L.useState)({}),w=(0,L.useRef)(null),[T]=(0,L.useState)(()=>oO(kD())),E=b.eventType??`default`,D=e===`create`,O=o||s||u;function k(e){return e?f.find(t=>t.id===e)?.provider??`google`:``}let ee=k(b.connectionId??``),A=tO(b,i??null),j=lO(b,t),te=(0,L.useRef)(j);(0,L.useEffect)(()=>{te.current!==j&&(te.current=j,h?.(j))},[j,h]);function ne(e){x(t=>({...t,...e})),C({})}let re={...S,...l},M=e=>{e.preventDefault();let t=LD(b);if(Object.keys(t).length>0){C(Object.fromEntries(Object.entries(t).map(([e,t])=>[e,y(t)]))),t.title&&w.current?.focus();return}n(b)},N=(0,R.jsx)(D7,{size:`editor`,name:`title`,label:y(`calendar.form.title`),error:re.title,ref:w,value:b.title,onChange:e=>ne({title:e.target.value}),placeholder:y(`calendar.form.titlePlaceholder`),autoFocus:!0,disabled:O,form:g});return(0,R.jsxs)(`form`,{id:g,onSubmit:M,className:`space-y-4`,children:[u&&(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:d||y(`calendar.readOnly.default`)}),c&&(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:c}),p,A&&(0,R.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:y(`calendar.form.outsideWorkingHours`)}),v===void 0?(0,R.jsxs)(R.Fragment,{children:[N,(0,R.jsx)(sM,{})]}):v&&(0,gs.createPortal)(N,v),(0,R.jsx)(O7,{icon:(0,R.jsx)(eT,{className:A7}),children:(0,R.jsx)(E7,{eventType:E,provider:ee,allDay:b.allDay,start:b.start,end:b.end,onAllDayChange:e=>ne(PD(b,e)),onStartChange:e=>ne({start:e}),onEndChange:e=>ne({end:e}),startError:re.start,endError:re.end,timezoneLabel:T,disabled:O,layout:`chips`})}),(0,R.jsx)(O7,{icon:(0,R.jsx)(ET,{className:A7}),hideLabels:!0,children:(0,R.jsx)(Xte,{start:b.start,value:b.recurrence??qE,onChange:e=>ne({recurrence:e}),canChange:D,disabled:O})}),(0,R.jsx)(O7,{icon:(0,R.jsx)(zw,{className:A7}),hideLabels:!0,children:(0,R.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,R.jsx)(`div`,{className:`min-w-0 flex-1 empty:hidden`,children:(0,R.jsx)(w7,{value:b.connectionId??``,onChange:e=>{x(t=>ID(t,e,k(e))),C({})},options:f,canChoose:D,disabled:O})}),(0,R.jsx)(`div`,{className:`w-36 shrink-0`,children:(0,R.jsx)(C7,{value:b.color,onChange:e=>ne({color:e}),disabled:O})})]})}),(0,R.jsx)(O7,{icon:(0,R.jsx)(MT,{className:A7}),hideLabels:!0,children:(0,R.jsx)(Jte,{value:E,onChange:e=>{x(t=>FD(t,e,ee)),C({})},canChange:D,attached:!!b.connectionId,disabled:O})}),(0,R.jsx)(O7,{icon:(0,R.jsx)(fT,{className:A7}),hideLabels:!0,children:(0,R.jsx)(q,{name:`location`,label:y(`calendar.form.location`),value:b.location,onChange:e=>ne({location:e.target.value}),placeholder:y(`calendar.form.locationPlaceholder`),disabled:O,error:re.location})}),(0,R.jsx)(O7,{icon:(0,R.jsx)(BT,{className:A7}),children:(0,R.jsx)(T7,{attendees:m})}),(0,R.jsx)(O7,{icon:(0,R.jsx)(Yw,{className:A7}),children:(0,R.jsx)(Gte,{eventType:E,canChange:D,value:{autoDecline:b.autoDecline??``,declineMessage:b.declineMessage??``,chatStatus:b.chatStatus??``,workLocationType:b.workLocationType??``,workLocationLabel:b.workLocationLabel??``},onChange:ne,disabled:O})}),(0,R.jsx)(O7,{icon:(0,R.jsx)(NT,{className:A7}),hideLabels:!0,children:(0,R.jsx)(CA,{name:`notes`,label:y(`calendar.form.notes`),value:mO(b.notes),onChange:e=>ne({notes:{text:e.target.value,html:``}}),placeholder:y(`calendar.form.notesPlaceholder`),disabled:O,error:re.notes})}),ee!==``&&(0,R.jsx)(`p`,{"data-kit":`event-form-provider-note`,className:`text-right text-xs text-muted-foreground`,children:y(`calendar.form.providerNote`,{provider:QF[ee]??ee})}),_===`inline`&&(0,R.jsx)(k7,{mode:e,readOnly:u,pending:o,deleting:s,onCancel:r,onDelete:a})]})}function Qte({event:e,reason:t,connectionOptions:n=[],bookingPanel:r,attendees:i=[]}){let{t:a}=K(),o=e.eventType??`default`,s=e.connectionId??``,c=mO(e.notes),l=cI(n,s,a),u=yO(e.recurrence,e.start,a),d=o===`working_location`?e.workLocationType===`home_office`?`calendar.workingLocation.home`:e.workLocationType===`office_location`?`calendar.workingLocation.office`:e.workLocationType===`custom_location`?`calendar.workingLocation.custom`:``:``,f=o===`working_location`?e.workLocationLabel||(d?a(d):``):``;return(0,R.jsxs)(`div`,{"data-kit":`event-summary`,className:`space-y-5`,children:[(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t||a(`calendar.readOnly.default`)}),r,(0,R.jsx)(`p`,{className:`text-base font-semibold leading-snug`,children:e.title||a(`calendar.summary.untitled`)}),(0,R.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[(0,R.jsx)(QN,{label:a(`calendar.summary.when`),value:vO(e,a)||void 0}),!e.allDay&&(0,R.jsx)(QN,{label:a(`calendar.summary.timezone`),value:oO(kD())}),u!==``&&(0,R.jsx)(QN,{label:a(`calendar.summary.repeats`),value:u}),(0,R.jsx)(QN,{label:a(`calendar.summary.calendar`),value:l}),o!=="default"&&(0,R.jsx)(QN,{label:a(`calendar.summary.type`),value:a(_E[o])}),e.location!==``&&(0,R.jsx)(QN,{label:a(`calendar.summary.location`),value:e.location}),f!==``&&(0,R.jsx)(QN,{label:a(`calendar.summary.workingLocation`),value:f})]}),(0,R.jsx)(T7,{attendees:i}),c!==``&&(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium leading-none`,children:a(`calendar.summary.notes`)}),(0,R.jsx)(`p`,{className:`whitespace-pre-wrap text-sm text-muted-foreground`,children:c})]})]})}function $te({open:e,onOpenChange:t,onCancel:n,onDelete:r,onDirtyChange:i,error:a,deleting:o=!1,confirmDelete:s=!0,...c}){let{t:l}
121=K(),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(`none`),[m,h]=(0,L.useState)(null),g=(0,L.useId)(),_=(0,L.useRef)(null);function v(e){if(!u){e();return}_.current=e,p(`discard`)}return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Xj,{open:e,onOpenChange:e=>{if(e){t(!0);return}v(()=>t(!1))},scrollBody:!0,mobile:`sheet`,title:c.readOnly?l(`calendar.dialog.detailsTitle`):c.mode===`create`?l(`calendar.dialog.createTitle`):l(`calendar.dialog.editTitle`),hideTitle:!c.readOnly,headerLead:c.readOnly?void 0:(0,R.jsx)(`div`,{"data-kit":`event-dialog-title`,ref:h,className:`min-w-0`}),headerActions:c.readOnly?void 0:(0,R.jsx)(k7,{part:`primary`,formId:g,mode:c.mode,pending:c.pending,deleting:o,onCancel:()=>v(n)}),footer:(0,R.jsx)(k7,{part:`secondary`,formId:g,mode:c.mode,readOnly:c.readOnly,pending:c.pending,deleting:o,onCancel:()=>v(n),onDelete:r?()=>s?p(`delete`):r():void 0}),children:c.readOnly?(0,R.jsx)(Qte,{event:c.initial,reason:c.readOnlyReason,connectionOptions:c.connectionOptions,bookingPanel:c.bookingPanel,attendees:c.attendees}):(0,R.jsx)(Zte,{...c,id:g,titleHost:m,actions:`none`,deleting:o,error:f===`delete`?null:a,onCancel:()=>v(n),onDelete:r?()=>s?p(`delete`):r():void 0,onDirtyChange:e=>{d(e),i?.(e)}})}),(0,R.jsx)(dY,{open:f===`discard`,onOpenChange:e=>{e||p(`none`)},title:l(`calendar.dialog.discardTitle`),description:l(`calendar.dialog.discardDescription`),cancelLabel:l(`calendar.dialog.keepEditing`),confirmLabel:l(`calendar.dialog.discardConfirm`),destructive:!0,onCancel:()=>p(`none`),onConfirm:()=>{let e=_.current;_.current=null,p(`none`),e?.()}}),(0,R.jsx)(dY,{open:f===`delete`,onOpenChange:e=>{e||p(`none`)},title:l(`calendar.dialog.deleteTitle`),description:l(`calendar.dialog.deleteDescription`),confirmLabel:l(`calendar.dialog.deleteConfirm`),destructive:!0,pending:o,error:a??null,onCancel:()=>p(`none`),onConfirm:()=>r?.()})]})}function ene({state:e}){let{t}=K();if(e===null)return null;let n=DO[e];if(n===void 0||n===``)return null;let r=OO[e];return(0,R.jsx)(`div`,{"data-kit":`push-state-row`,"data-tone":r?`action`:`info`,className:r?`text-warning`:`text-muted-foreground`,children:(0,R.jsx)(QN,{icon:(0,R.jsx)(r?RT:TT,{"aria-hidden":`true`,className:`h-4 w-4 ${r?`text-warning`:``}`}),label:t(`calendar.pushState.label`),value:t(n)})})}var j7=320,tne=260,M7=8,N7=8;function nne(e,t,n){let r=e.x+e.width+M7;return{left:r+j7+N7<=t?r:Math.max(N7,e.x-M7-j7),top:Math.max(N7,Math.min(e.y,n-tne-N7))}}function rne({event:e,color:t,connectionOptions:n,editable:r,reason:i,pushState:a}){let{t:o}=K(),s=e.eventType??`default`,c=e.connectionId??``,l=vO(e,o),u=yO(e.recurrence,e.start,o),d=cI(n,c,o),f=s==="default"?``:o(_E[s]),p=mO(e.notes);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center`,children:t!==``&&(0,R.jsx)(`span`,{className:`h-3 w-3 rounded-[3px]`,style:{backgroundColor:t}})}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,R.jsx)(`p`,{className:`text-lg font-semibold leading-snug`,children:e.title||o(`calendar.summary.untitled`)}),l!==``&&(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:l})]})]}),(0,R.jsx)(ene,{state:a}),r===!1&&(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i||o(`calendar.readOnly.default`)}),(0,R.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[u!==``&&(0,R.jsx)(QN,{icon:(0,R.jsx)(ET,{className:`h-4 w-4`}),label:o(`calendar.summary.repeats`),value:u}),d!==``&&(0,R.jsx)(QN,{icon:(0,R.jsx)(zw,{className:`h-4 w-4`}),label:o(`calendar.summary.calendar`),value:d}),f!==``&&(0,R.jsx)(QN,{icon:(0,R.jsx)(MT,{className:`h-4 w-4`}),label:o(`calendar.summary.type`),value:f}),e.location!==``&&(0,R.jsx)(QN,{icon:(0,R.jsx)(fT,{className:`h-4 w-4`}),label:o(`calendar.summary.location`),value:e.location})]}),p!==``&&(0,R.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,R.jsx)(NT,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 shrink-0 text-muted-foreground`}),(0,R.jsx)(`p`,{className:`whitespace-pre-wrap text-sm`,children:p})]})]})}function ine({anchor:e,event:t,color:n=``,connectionOptions:r=[],editable:i=!0,reason:a,pushState:o=null,onOpenFull:s,onDelete:c,onClose:l}){let{t:u}=K(),d=(0,L.useRef)(null);y7(d,l,e!==null);let f=(0,R.jsx)(rne,{event:t,color:n,connectionOptions:r,editable:i,reason:a,pushState:o});if(e===null){let e=i?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(G,{variant:`outline`,onClick:s,children:u(`calendar.peek.edit`)}),(0,R.jsx)(G,{variant:`destructive`,onClick:c,children:u(`calendar.peek.delete`)})]}):(0,R.jsx)(G,{variant:`outline`,onClick:s,children:u(`calendar.peek.details`)});return(0,R.jsx)(Xj,{open:!0,onOpenChange:e=>{e||l()},size:`sm`,mobile:`sheet`,title:t.title||u(`calendar.summary.untitled`),footer:e,children:(0,R.jsx)(`div`,{"data-kit":`event-peek-sheet`,children:f})})}
121let{left:p,top:m}=nne(e,typeof window>`u`?336:window.innerWidth,typeof window>`u`?276:window.innerHeight);return(0,R.jsxs)(`div`,{ref:d,role:`dialog`,"aria-label":u(`calendar.peek.ariaLabel`),"data-kit":`event-peek-card`,style:{position:`fixed`,left:p,top:m,zIndex:50},className:`w-80 rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg`,children:[(0,R.jsxs)(`div`,{className:`mb-3 flex items-center justify-end gap-1`,children:[i?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(G,{variant:`ghost`,size:`icon-sm`,className:`text-blue-600 dark:text-blue-400`,onClick:s,"aria-label":u(`calendar.peek.edit`),children:(0,R.jsx)(bT,{"aria-hidden":`true`})}),(0,R.jsx)(G,{variant:`ghost`,size:`icon-sm`,className:`text-destructive`,onClick:c,"aria-label":u(`calendar.peek.delete`),children:(0,R.jsx)(FT,{"aria-hidden":`true`})})]}):(0,R.jsx)(G,{variant:`ghost`,size:`icon-sm`,onClick:s,"aria-label":u(`calendar.peek.details`),children:(0,R.jsx)(sT,{"aria-hidden":`true`})}),(0,R.jsx)(G,{variant:`ghost`,size:`icon-sm`,onClick:l,"aria-label":u(`calendar.form.close`),children:(0,R.jsx)(HT,{"aria-hidden":`true`})})]}),f]})}var P7=`h-4 w-4`,F7=372,I7=420,L7=8;function ane(e,t,n,r){return bO(e+L7,t+L7,F7,I7,n,r)}function one({anchorX:e,anchorY:t,draft:n,pending:r=!1,error:i,onSubmit:a,onDismiss:o,connectionOptions:s=[],onMoreOptions:c}){let{t:l}
121=K(),[u,d]=(0,L.useState)(n),[f,p]=(0,L.useState)({}),m=(0,L.useRef)(null);y7(m,o);function h(e){d(t=>({...t,...e})),p({})}function g(){let e=LD(u),t={};if(e.title!==void 0&&(t.title=l(e.title)),e.end!==void 0&&(t.end=l(e.end)),Object.keys(t).length>0){p(t);return}p({}),a(u)}let{left:_,top:v}=ane(e,t,typeof window>`u`?F7+16:window.innerWidth,typeof window>`u`?I7+16:window.innerHeight);return(0,R.jsxs)(`div`,{ref:m,role:`dialog`,"aria-label":l(`calendar.quickCreate.ariaLabel`),"data-kit":`event-quick-create`,style:{left:_,top:v,position:`fixed`,zIndex:50},className:`w-[372px] rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg space-y-3`,children:[(0,R.jsx)(D7,{size:`quick`,autoFocus:!0,name:`title`,label:l(`calendar.quickCreate.titleLabel`),placeholder:l(`calendar.quickCreate.titlePlaceholder`),value:u.title,error:f.title,disabled:r,onChange:e=>h({title:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),g())}}),(0,R.jsx)(O7,{icon:(0,R.jsx)(eT,{className:P7}),children:(0,R.jsx)(E7,{eventType:`default`,allDay:u.allDay,start:u.start,end:u.end,onAllDayChange:e=>h(PD(u,e)),onStartChange:e=>h({start:e}),onEndChange:e=>h({end:e}),endError:f.end,disabled:r,layout:`chips`})}),(0,R.jsx)(O7,{icon:(0,R.jsx)(zw,{className:P7}),hideLabels:!0,children:(0,R.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,R.jsx)(`div`,{className:`min-w-0 flex-1 empty:hidden`,children:(0,R.jsx)(w7,{value:u.connectionId??``,onChange:e=>h({connectionId:e}),options:s,canChoose:!0,disabled:r,hint:``})}),(0,R.jsx)(`div`,{className:`w-36 shrink-0`,children:(0,R.jsx)(C7,{value:u.color,onChange:e=>h({color:e}),disabled:r})})]})}),i?(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:i}):null,(0,R.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,R.jsx)(G,{variant:`ghost`,size:`sm`,onClick:()=>c(u),children:l(`calendar.quickCreate.moreOptions`)}),(0,R.jsx)(G,{size:`sm`,disabled:r,onClick:g,children:l(r?`calendar.quickCreate.saving`:`calendar.quickCreate.save`)})]})]})}function sne({chips:e,onRemove:t,onClearAll:n,className:r}){let{t:i}=K();return e.length===0?null:(0,R.jsxs)(`div`,{role:`group`,"aria-label":i(`calendar.filters.active`),className:W(`flex flex-wrap items-center gap-2 border-b px-4 py-2`,r),children:[e.map(e=>{let n=e.labelKey===``?e.label:i(e.labelKey);return(0,R.jsxs)(OA,{variant:`secondary`,className:`gap-1 pr-1`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:i(`calendar.filters.hiding`,{label:n})}),(0,R.jsx)(`button`,{type:`button`,onClick:()=>t(e.id),"aria-label":i(`calendar.filters.stopHiding`,{label:n}),title:i(`calendar.filters.stopHiding`,{label:n}),className:`rounded-full p-0.5 hover:bg-background/60 cursor-pointer`,children:(0,R.jsx)(HT,{className:`size-3`})})]},e.id)}),(0,R.jsx)(G,{variant:`ghost`,size:`sm`,onClick:n,children:i(`calendar.filters.clear`)})]})}function cne({open:e,onOpenChange:t,mode:n,offerFollowing:r=!0,pending:i=!1,error:a=null,onChoose:o,onCancel:s}){let{t:c}=K(),[l,u]=(0,L.useState)(`this`);(0,L.useEffect)(()=>{e&&u(`this`)},[e]);let d=[{value:`this`,label:c(`calendar.scopeDialog.thisEvent`)},...r?[{value:`following`,label:c(`calendar.scopeDialog.thisAndFollowing`)}]:[],{value:`all`,label:c(`calendar.scopeDialog.allEvents`)}];return(0,R.jsxs)(Xj,{open:e,onOpenChange:e=>{e||s(),t(e)},title:c(n===`delete`?`calendar.scopeDialog.deleteTitle`:`calendar.scopeDialog.editTitle`),description:c(`calendar.scopeDialog.description`),size:`sm`,footer:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(G,{variant:`outline`,type:`button`,onClick:s,disabled:i,children:c(`calendar.scopeDialog.cancel`)}),(0,R.jsx)(G,{type:`button`,variant:n===`delete`?`destructive`:`default`,disabled:i,onClick:()=>o(l),children:c(n===`delete`?`calendar.scopeDialog.confirmDelete`:`calendar.scopeDialog.confirmSave`)})]}),children:[(0,R.jsx)(Zj,{name:`event_scope`,label:c(`calendar.scopeDialog.legend`),options:d,value:l,onValueChange:e=>u(e)}),a?(0,R.jsx)(`p`,{className:`text-destructive mt-3 text-sm`,children:a}):null]})}function lne(e){return e.allDay?e.start.replace(/-/g,``):new Date(e.start).toISOString().replace(/[-:]/g,``).replace(/\.\d{3}Z$/,`Z`)}function une({connectCalendarLink:e}={}){let{t}=K(),n=bF(),{actions:r,editor:i,filters:a}=n;LF();let{display:o,setDisplay:s}=vF(),c=fI(),l=pI(),u=kO(),d=yF(i.mode===`peek`?i.id:null),f=dt(MP()),p=(0,L.useMemo)(()=>$D(f.data??null),[f.data]),m=i.mode===`edit`?n.events.find(e=>e.id===i.id)??null:null,h=dt(_te(i.mode===`edit`&&!DP(i.id)&&m?.extendedProps.origin?.kind===`booking`?i.id:null)),[g,_]=(0,L.use
121State)(!1),[v,y]=(0,L.useState)(null);(0,L.useEffect)(()=>{i.mode===`closed`&&y(null)},[i.mode]);let[b,x]=(0,L.useState)(null),S=i.mode===`edit`||i.mode===`peek`||i.mode===`menu`?i.id:null,C=i.mode===`edit`?!i.readOnly:i.mode===`peek`?i.editable:i.mode===`menu`,w=S!==null&&DP(S)&&C,T=(()=>{if(S===null)return!0;let e=n.events.find(e=>e.id===S),t=e?.extendedProps.seriesId;if(!t)return!0;let r=n.events.find(e=>e.id===t);return!r||e?.extendedProps.recurrenceId!==lne(r)})(),E=i.mode===`peek`?n.events.find(e=>e.id===i.id)??null:null,D=E?pO(E.extendedProps.color,c[E.extendedProps.connections[0]?.connectionId??``]?.color??``).background:``,O=i.mode===`menu`?n.events.find(e=>e.id===i.id)??null:null,k=O?.extendedProps.color??``,ee=O?pO(``,c[O.extendedProps.connections[0]?.connectionId??``]?.color??``).background:uO,A=$F(Object.values(c)).map(e=>({id:e.id,accountEmail:e.account_email,color:e.color,revoked:e.revoked})),j=WD(a,Object.fromEntries(Object.values(c).map(e=>[e.id,e.account_email]))),te=Object.keys(c).length===0&&!n.loading&&n.events.length===0;function ne(e){e.startsWith(`connection:`)?r.setConnectionVisible(e.slice(HD.length),!0):e.startsWith(`type:`)&&r.setEventTypeVisible(e.slice(UD.length),!0)}return(0,R.jsxs)(`div`,{className:`flex min-h-[70vh] flex-1 flex-col`,children:[(0,R.jsx)(p7,{events:n.events,view:n.view,focusedDate:n.focusedDate,loading:n.loading,fetching:n.fetching,error:n.loadError??(i.mode===`closed`?n.error:null),onRetry:n.loadError===null?void 0:r.retryLoad,notice:n.notice,editorOpen:i.mode!==`closed`,showSlotPlaceholder:i.mode===`quick`,connections:c,businessHours:p,weekStartsOn:u.weekStartDay,hour12:u.hour12,display:o,onDisplayChange:s,toolbarLeading:(0,R.jsx)(i7,{open:g,onOpenChange:_,align:`start`,width:`lg`,scrollContent:!0,trigger:(0,R.jsxs)(G,{variant:`ghost`,size:`sm`,"aria-label":`Filters`,children:[(0,R.jsx)(OT,{className:`h-4 w-4`}),(0,R.jsx)(`span`,{className:`ml-1 hidden sm:inline`,children:`Filters`}),j.length>0&&(0,R.jsx)(OA,{variant:`default`,className:`ml-1 px-1.5`,children:j.length})]}),children:(0,R.jsx)(cY,{focusedDate:n.focusedDate,onSelectDate:r.goToDate,connections:A,hiddenConnectionIds:a.hiddenConnectionIds??[],hiddenEventTypes:a.hiddenEventTypes??[],onConnectionVisibleChange:r.setConnectionVisible,onEventTypeVisibleChange:r.setEventTypeVisible,footer:e,weekStartsOn:u.weekStartDay})}),belowToolbar:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(sne,{chips:j,onRemove:ne,onClearAll:r.clearFilters}),te&&(0,R.jsx)(UW,{action:e})]}),onVisibleWindowChange:r.reportVisibleWindow,onViewChange:r.setView,onPrev:r.goPrev,onNext:r.goNext,onToday:r.goToday,onSelectSlot:r.openQuickCreate,onSelectEvent:r.openPeek,onContextMenuEvent:(e,t,n)=>r.openContextMenu(e,{x:t,y:n}),onMoveEvent:e=>{DP(e.id)?y({kind:`move`,change:e}):r.moveEvent(e)},onCreate:r.openCreate}),(i.mode===`create`||i.mode===`edit`)&&(0,R.jsx)($te,{open:!0,onOpenChange:e=>{e||r.closeEditor()},mode:i.mode,initial:i.draft,onSubmit:e=>{w?y({kind:`save`,draft:e}):r.submitDraft(e)},onCancel:r.closeEditor,onDelete:i.mode===`edit`?()=>{w?y({kind:`delete`,holdOpen:!1}):r.deleteEditingEvent()}:void 0,confirmDelete:!w,pending:n.saving,deleting:n.deleting,error:n.error,fieldErrors:n.fieldErrors,readOnly:i.mode===`edit`&&i.readOnly,readOnlyReason:i.mode===`edit`&&i.readOnlyReason!==``?t(i.readOnlyReason):``,connectionOptions:l,bookingPanel:h.data?(0,R.jsx)(HW,{linkTitle:h.data.link.title,status:h.data.status,fields:h.data.form.fields,values:ete(h.data.responses)}):void 0,workingHours:f.data??null,attendees:i.mode===`edit`?i.attendees:[],onDirtyChange:r.setEditorDirty},i.mode===`edit`?i.id:`create`),v!==null&&(0,R.jsx)(cne,{open:!0,onOpenChange:()=>{},mode:v.kind===`delete`?`delete`:`edit`,offerFollowing:T,pending:n.saving||n.deleting,error:n.error,onCancel:()=>{v.kind===`move`&&v.change.revert(),y(null)},onChoose:e=>{let t=v;if(t.kind===`recolor`){r.recolorEvent(t.color,e);return}if(t.kind===`delete`&&t.holdOpen){r.deleteEditingEvent(e);return}y(null),t.kind===`save`?r.submitDraft(t.draft,e):t.kind===`delete`?r.deleteEditingEvent(e):r.moveEvent(t.change,e)}}),i.mode===`quick`&&(0,R.jsx)(one,{anchorX:i.anchor.x,anchorY:i.anch
121or.y,draft:i.draft,connectionOptions:l,pending:n.saving,error:n.error,onSubmit:r.submitDraft,onDismiss:r.closeEditor,onMoreOptions:r.promoteQuickToCreate},`${i.draft.start}|${i.draft.end}`),i.mode===`peek`&&b!==i.id&&v===null&&(0,R.jsx)(ine,{anchor:i.anchor,event:i.draft,color:D,connectionOptions:l,editable:i.editable,reason:i.readOnlyReason===``?``:t(i.readOnlyReason),pushState:EO(d),onOpenFull:()=>{x(null),r.openEdit(i.id)},onDelete:()=>{w?y({kind:`delete`,holdOpen:!0}):x(i.id)},onClose:()=>{x(null),r.closeEditor()}},i.id),i.mode===`menu`&&b!==i.id&&v===null&&(0,R.jsx)(Ute,{anchorX:i.anchor.x,anchorY:i.anchor.y,color:k,inheritedColor:ee,pending:n.saving||n.deleting,error:n.error,onRecolor:e=>{w?y({kind:`recolor`,color:e}):r.recolorEvent(e)},onDelete:()=>{w?y({kind:`delete`,holdOpen:!0}):x(i.id)},onDismiss:()=>{x(null),r.closeEditor()}},i.id),(i.mode===`peek`||i.mode===`menu`)&&b===i.id&&(0,R.jsx)(dY,{open:!0,onOpenChange:e=>{e||x(null)},title:t(`calendar.dialog.deleteTitle`),description:t(`calendar.dialog.deleteDescription`),confirmLabel:t(`calendar.dialog.deleteConfirm`),destructive:!0,pending:n.deleting,error:n.error,onCancel:()=>x(null),onConfirm:()=>r.deleteEditingEvent()})]})}function R7({blocked:e,description:t=`Your availability has changes that have not been saved. Leaving this page will lose them.`,onStay:n,onDiscard:r}){return(0,R.jsx)(dY,{open:e,onOpenChange:e=>{e||n()},title:`Discard unsaved changes?`,description:t,cancelLabel:`Stay`,confirmLabel:`Discard changes`,destructive:!0,onCancel:()=>n(),onConfirm:()=>r()})}var z7=`timeGridWeek`,dne=`listSchedule`,fne=`(max-width: 767.98px)`,pne=/^\d{4}-\d{2}-\d{2}$/;function mne(e){if(typeof e!=`string`||!pne.test(e))return!1;let[t,n,r]=e.split(`-`).map(Number),i=new Date(t,n-1,r);return i.getFullYear()===t&&i.getMonth()===n-1&&i.getDate()===r}function hne(e){return dE.includes(e)}function gne(){return typeof window>`u`||typeof window.matchMedia!=`function`?z7:window.matchMedia(fne).matches?dne:z7}function _ne(e){let t=e.date,n=e.view;return{date:mne(t)?t:void 0,view:hne(n)?n:void 0}}function B7(e){return{date:e.date??AD(new Date),view:e.view??gne()}}function V7(e){let t=B7(e);UP(t.date),zP(t.view)}function vne(e){e.cause===`enter`&&V7(e.search)}var H7=Ta({getParentRoute:()=>yN,path:`/calendar`,validateSearch:_ne,beforeLoad:vne,component:bne});function yne(e){return(e.editor.mode===`create`||e.editor.mode===`edit`)&&e.editor.dirty}function bne(){let e=H7.useSearch(),t=oa(),n=_F(e=>e.focusedDate),r=_F(e=>e.view),i=_F(yne),a=Ya({shouldBlockFn:(0,L.useCallback)(()=>i,[i]),enableBeforeUnload:i,withResolver:!0}),o=(0,L.useRef)(null);return(0,L.useEffect)(()=>{let i=`${e.date??``}|${e.view??``}`,a=o.current!==i;o.current=i,a&&V7(e);let s=a?uF():{focusedDate:n,view:r},c=B7(e);(c.date!==s.focusedDate||c.view!==s.view)&&t({to:`/calendar`,search:{date:s.focusedDate,view:s.view}})},[e,n,r,t]),(0,L.useEffect)(()=>{let e=document.title;return document.title=`Calendar · CalendHub`,()=>{document.title=e}},[]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(une,{connectCalendarLink:(0,R.jsx)(G,{asChild:!0,size:`sm`,children:(0,R.jsxs)(Sa,{to:`/integrations`,children:[(0,R.jsx)(CT,{className:`h-4 w-4 mr-1`}),`Connect calendar`]})})}),(0,R.jsx)(R7,{blocked:a.status===`blocked`,description:`This event has changes that have not been saved. Leaving this page will lose them.`,onStay:()=>a.reset?.(),onDiscard:()=>{cF(),a.proceed?.()}})]})}function xne({name:e,enabled:t,connecting:n=!1,icon:r,lockedReason:i,onConnect:a,children:o}){let{t:s}=K();return(0,R.jsxs)(MC,{children:[(0,R.jsx)(NC,{children:(0,R.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[r&&(0,R.jsx)(`div`,{className:`shrink-0`,children:r}),(0,R.jsx)(`div`,{children:(0,R.jsx)(PC,{children:e})})]}),!t&&(0,R.jsx)(OA,{variant:`secondary`,children:s(`integrations.providerCard.notAvailable`)})]})}),(0,R.jsxs)(LC,{className:`space-y-4`,children:[!t&&(0,R.jsx)(FC,{children:s(`integrations.providerCard.notConfigured`)}),(0,R.jsx)(G,{onClick:a,disabled:!t||n||i!==void 0,className:`w-full sm:w-auto`,children:s(`integrations.providerCard.connect`)}),t&&i!==void 0&&(0,R.jsx)(`p`,{"data-kit":`provider-card-locked`,className:`text-xs text-muted-foreground`,children:i}),t&&i===void 0&&(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s(`integrations.providerCard.consent`)}),L.Children.count(o)>0?(0,R.jsx)(`div`,{className:`space-y-2 border-t pt-4`,children:o}):t?(0,R.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:s(`integrations.providerCard.empty`)}):null]})]})}var Sne=[`google`,`zoom`,`google_meet`],Cne={sm:16,md:20,lg:24};function wne(){return(0,R.jsx)(`path`,{fill:`currentColor`,d:`M18.316 5.684H24v12.632h-5.684V5.684zM5.684 24h12.632v-5.684H5.684V24zM18.316 5.684V0H1.895A1.894 1.894 0 0 0 0 1.895v16.421h5.684V5.684h12.632zm-7.207 6.25v-.065c.272-.144.5-.349.687-.617s.279-.595.279-.982c0-.379-.099-.72-.3-1.025a2.05 2.05 0 0 0-.832-.714 2.703 2.703 0 0 0-1.197-.257c-.6 0-1.094.156-1.481.467-.386.311-.65.671-.793 1.078l1.085.452c.086-.249.224-.461.413-.633.189-.172.445-.257.767-.257.33 0 .602.088.816.264a.86.86 0 0 1 .322.703c0 .33-.12.589-.36.778-.24.19-.535.284-.886.284h-.567v1.085h.633c.407 0 .748.109 1.02.327.272.218.407.499.407.843 0 .336-.129.614-.387.832s-.565.327-.924.327c-.351 0-.651-.103-.897-.311-.248-.208-.422-.502-.521-.881l-1.096.452c.178.616.505 1.082.977 1.401.472.319.984.478 1.538.477a2.84 2.84 0 0 0 1.293-.291c.382-.193.684
121-.458.902-.794.218-.336.327-.72.327-1.149 0-.429-.115-.797-.344-1.105a2.067 2.067 0 0 0-.881-.689zm2.093-1.931l.602.913L15 10.045v5.744h1.187V8.446h-.827l-2.158 1.557zM22.105 0h-3.289v5.184H24V1.895A1.894 1.894 0 0 0 22.105 0zm-3.289 23.5l4.684-4.684h-4.684V23.5zM0 22.105C0 23.152.848 24 1.895 24h3.289v-5.184H0v3.289z`})}function Tne(){return(0,R.jsx)(`path`,{fill:`currentColor`,d:`M5.53 2.13 0 7.75h5.53zm.398 0v5.62h7.608v3.65l5.47-4.45c-.014-1.22.031-2.25-.025-3.46-.148-1.09-1.287-1.47-2.236-1.36zM23.1 4.32c-.802.295-1.358.995-2.047 1.49-2.506 2.05-4.982 4.12-7.468 6.19 3.025 2.59 6.04 5.18 9.065 7.76 1.218.671 1.428-.814 1.328-1.64v-13a.828.828 0 0 0-.877-.825zM.038 8.15v7.7h5.53v-7.7zm13.577 8.1H6.008v5.62c3.864-.006 7.737.011 11.58-.009 1.02-.07 1.618-1.12 1.468-2.07v-2.51l-5.47-4.68v3.65zm-13.577 0c.02 1.44-.041 2.88.033 4.31.162.948 1.158 1.43 2.047 1.31h3.464v-5.62z`})}function Ene(){return(0,R.jsx)(`path`,{fill:`currentColor`,d:`M5.033 14.649H.743a.74.74 0 0 1-.686-.458.74.74 0 0 1 .16-.808L3.19 10.41H1.06A1.06 1.06 0 0 1 0 9.35h3.957c.301 0 .57.18.686.458a.74.74 0 0 1-.161.808L1.51 13.59h2.464c.585 0 1.06.475 1.06 1.06zM24 11.338c0-1.14-.927-2.066-2.066-2.066-.61 0-1.158.265-1.537.686a2.061 2.061 0 0 0-1.536-.686c-1.14 0-2.066.926-2.066 2.066v3.311a1.06 1.06 0 0 0 1.06-1.06v-2.251a1.004 1.004 0 0 1 2.013 0v2.251c0 .586.474 1.06 1.06 1.06v-3.311a1.004 1.004 0 0 1 2.012 0v2.251c0 .586.475 1.06 1.06 1.06zM16.265 12a2.728 2.728 0 1 1-5.457 0 2.728 2.728 0 0 1 5.457 0zm-1.06 0a1.669 1.669 0 1 0-3.338 0 1.669 1.669 0 0 0 3.338 0zm-4.82 0a2.728 2.728 0 1 1-5.458 0 2.728 2.728 0 0 1 5.457 0zm-1.06 0a1.669 1.669 0 1 0-3.338 0 1.669 1.669 0 0 0 3.338 0z`})}function Dne(){return(0,R.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,R.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`16`,rx:`2`}),(0,R.jsx)(`line`,{x1:`3`,y1:`10`,x2:`21`,y2:`10`}),(0,R.jsx)(`line`,{x1:`8`,y1:`2`,x2:`8`,y2:`6`}),(0,R.jsx)(`line`,{x1:`16`,y1:`2`,x2:`16`,y2:`6`})]})}function One(){return(0,R.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,R.jsx)(`rect`,{x:`2`,y:`6`,width:`13`,height:`12`,rx:`2`}),(0,R.jsx)(`path`,{d:`M15 9.5 22 6v12l-7-3.5z`})]})}function kne(e){switch(e){case`google`:return(0,R.jsx)(wne,{});case`google_meet`:return(0,R.jsx)(Tne,{});case`zoom`:return(0,R.jsx)(Ene,{});case`microsoft`:return(0,R.jsx)(Dne,{});default:return(0,R.jsx)(One,{})}}function Ane({provider:e,label:t,labelMode:n=`text`,size:r=`md`}){let i=Sne.includes(e),a=Cne[r];return(0,R.jsxs)(`span`,{"data-kit":`provider-mark`,"data-provider":e,className:`inline-flex items-center gap-2`,children:[(0,R.jsxs)(`svg`,{"data-kit":`provider-mark-glyph`,"data-mark":i?`brand`:`neutral`,width:a,height:a,viewBox:`0 0 24 24`,className:`shrink-0`,focusable:`false`,role:n===`tooltip`?`img`:void 0,"aria-hidden":n===`tooltip`?void 0:`true`,children:[n===`tooltip`?(0,R.jsx)(`title`,{children:t}):null,kne(e)]}),n===`text`?(0,R.jsx)(`span`,{"data-kit":`provider-mark-label`,children:t}):null]})}function jne({email:e,color:t,isPrivate:n,revoked:r,syncStatus:i,busy:a=!1,onEdit:o,onDisconnect:s,onReconnect:c}){let{t:l}=K(),u=i===`syncing`&&!r;return(0,R.jsxs)(`div`,{className:`rounded-lg border p-3 sm:p-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,R.jsx)(`div`,{className:`h-6 w-6 shrink-0 rounded-md border border-border`,style:{backgroundColor:t},"aria-hidden":!0}),(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e})}),(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,R.jsx)(XN,{status:i}),n&&(0,R.jsx)(OA,{variant:`outline`,children:l(`integrations.connectionRow.private`)}),r&&(0,R.jsx)(OA,{variant:`destructive`,children:l(`integrations.reconnectNeeded`)})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r&&(0,R.jsxs)(G,{type:`button`,variant:`default`,size:`sm`,onClick:c,disabled:a,children:[(0,R.jsx)(TT,{}),l(`integrations.connectionRow.reconnect`)]}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:o,disabled:a,"aria-label":l(`integrations.connectionRow.edit`),title:l(`integrations.connectionRow.edit`),children:(0,R.jsx)(bT,{className:`text-blue-600 dar
121k:text-blue-400`})}),(0,R.jsxs)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:s,disabled:a,children:[(0,R.jsx)(zT,{}),l(`integrations.connectionRow.disconnect`)]})]})]}),u&&(0,R.jsx)(`p`,{className:`text-muted-foreground mt-2 text-sm`,children:l(`integrations.connectionRow.firstSync`)})]})}var Mne=_7.filter(e=>e.value!==``);function Nne({open:e,onOpenChange:t,email:n,initialColor:r,initialIsPrivate:i,pending:a=!1,error:o=null,onSubmit:s,onCancel:c}){let{t:l}=K(),[u,d]=(0,L.useState)(r),[f,p]=(0,L.useState)(i);return(0,R.jsx)(Xj,{open:e,onOpenChange:t,title:l(`integrations.connectionDialog.title`),footer:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(G,{variant:`outline`,onClick:c,disabled:a,children:l(`integrations.connectionDialog.cancel`)}),(0,R.jsx)(G,{onClick:()=>{s({color:u,is_private:f})},disabled:a,children:l(`integrations.connectionDialog.save`)})]}),children:(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:n}),o&&(0,R.jsx)(`div`,{className:`text-sm text-destructive`,children:o}),(0,R.jsx)(v7,{value:u,onChange:d,label:l(`integrations.connectionDialog.colour`),colors:Mne}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(aW,{id:`private`,checked:f,onCheckedChange:e=>p(e===!0)}),(0,R.jsx)(HC,{htmlFor:`private`,className:`font-normal`,children:l(`integrations.connectionDialog.hideDetails`)})]})]})})}function Pne({upgradeLink:e}){let{t}=K(),{providers:n,connectionsByProvider:r,settings:i,disconnecting:a,connectingProvider:o,loading:s,saving:c,removing:l,error:u,reachedConnectionLimit:d,actions:f}=uI();return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jN,{title:t(`integrations.title`),description:t(`integrations.description`)}),u&&(0,R.jsx)(`p`,{className:`text-destructive text-sm`,children:u}),d!==null&&(0,R.jsx)(Lj,{title:t(`integrations.limit.title`),description:t(`integrations.limit.description`,{count:d}),action:e}),s?(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(TA,{className:`h-40`}),(0,R.jsx)(TA,{className:`h-40`})]}):(0,R.jsx)(`div`,{className:`space-y-4`,children:n.map(e=>(0,R.jsx)(xne,{name:e.label,enabled:e.enabled,connecting:o===e.id,icon:(0,R.jsx)(Ane,{provider:e.id,label:e.label,labelMode:`none`}),lockedReason:d===null?void 0:t(`integrations.providerCard.limitReached`),onConnect:()=>f.connect(e.id),children:r[e.id].map(t=>(0,R.jsx)(jne,{email:t.account_email,color:t.color,isPrivate:t.is_private,revoked:t.revoked,syncStatus:t.sync_status,busy:c||l,onEdit:()=>f.openSettings(t),onDisconnect:()=>f.askDisconnect(t),onReconnect:()=>f.connect(e.id)},t.id))},e.id))}),i!==null&&(0,R.jsx)(Nne,{open:!0,onOpenChange:e=>{e||f.closeSettings()},email:i.account_email,initialColor:i.color,initialIsPrivate:i.is_private,pending:c,onSubmit:e=>f.saveSettings(e),onCancel:f.closeSettings},i.id),a!==null&&(0,R.jsx)(dY,{open:!0,onOpenChange:e=>{e||f.cancelDisconnect()},title:t(`integrations.disconnect.title`,{email:a.account_email}),description:t(`integrations.disconnect.description`,{provider:QF[a.provider]}),confirmLabel:t(`integrations.disconnect.confirm`),destructive:!0,pending:l,onConfirm:f.confirmDisconnect,onCancel:f.cancelDisconnect})]})}function Fne({status:e,message:t=null,action:n}){let{t:r}=K();return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4`,children:[e===`pending`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uT,{className:`h-8 w-8 animate-spin`}),(0,R.jsx)(`p`,{className:`text-center`,children:r(`integrations.oauthCallback.pending`)})]}),e===`connected`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Jw,{className:`h-8 w-8 text-success`}),(0,R.jsx)(`p`,{className:`text-center`,children:r(`integrations.oauthCallback.connected`)})]}),e===`failed`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(RT,{className:`h-8 w-8 text-warning`}),t&&(0,R.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:t}),n&&(0,R.jsx)(`div`,{children:n})]})]})}function Ine({connection:e,error:t,onDone:n,onRetry:r}){let{t:i}=K(),{status:a,message:o}=dI({connection:e,error:t});return(0,L.useEffect)(()=>{a===`connected`&&n()},[a,n]),(0,R.jsx)(Fne,{status:a===`connected`?`connected`:`failed`,message:o,action:a===`failed`?(0,R.jsx)(G,{onClick:r,children:i(`integrations.oauthCallback.backToIntegrations`)}):void 0})}var Lne=Ta({getParentRoute:()=>yN,path:`/integrations`,component:Rne});function Rne(){let{t:e}=K();return(0,R.jsx)(Pne,{upgradeLink:(0,R.jsx)(G,{asChild:!0,size:`sm`,children:(0,R.jsx)(Sa,{to:`/settings/billing`,children:e(`b
121illing.notice.upgrade`)})})})}function zne(e){return{connection:typeof e.connection==`string`&&e.connection!==``?e.connection:void 0,error:typeof e.error==`string`&&e.error!==``?e.error:void 0}}var U7=Ta({getParentRoute:()=>yN,path:`/integrations/callback`,validateSearch:zne,component:Bne});function Bne(){let e=wi(),t=aa({from:U7.id});return(0,R.jsx)(Ine,{connection:t.connection,error:t.error,onDone:()=>{e.navigate({to:`/integrations`,replace:!0})},onRetry:()=>{e.navigate({to:`/integrations`})}})}function Vne({email:e,firstName:t,lastName:n,phone:r,onFirstNameChange:i,onLastNameChange:a,onPhoneChange:o,avatar:s,avatarFallback:c,avatarError:l,onAvatarFileSelected:u,onAvatarRemove:d,fieldErrors:f,formError:p,saving:m,saved:h,onSubmit:g}){let{t:_}=K();return(0,R.jsx)(MC,{className:`w-full max-w-2xl`,children:(0,R.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),g()},className:`space-y-6 p-6`,children:[(0,R.jsx)(QO,{value:s,fallback:c,error:l,onFileSelected:u,onRemove:d,disabled:m}),(0,R.jsx)(q,{name:`first_name`,label:_(`account.firstName`),value:t,onChange:e=>i(e.target.value),error:f?.first_name,disabled:m}),(0,R.jsx)(q,{name:`last_name`,label:_(`account.lastName`),value:n,onChange:e=>a(e.target.value),error:f?.last_name,disabled:m}),(0,R.jsx)(q,{name:`phone`,label:_(`account.phone`),type:`tel`,autoComplete:`tel`,inputMode:`tel`,maxLength:40,value:r,onChange:e=>o(e.target.value),error:f?.phone,hint:_(`account.phoneHint`),disabled:m}),(0,R.jsx)(q,{name:`email`,label:_(`account.email`),value:e,readOnly:!0,disabled:!0,hint:_(`account.emailHint`)}),p&&(0,R.jsx)(`p`,{className:`text-destructive text-sm`,children:p}),(0,R.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,R.jsx)(G,{type:`submit`,disabled:m,children:_(m?`common.saving`:`common.save`)}),h&&!m&&(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:_(`common.saved`)})]})]})})}function Hne({onSubmit:e,fieldErrors:t={},formError:n=null,saving:r=!1,saved:i=!1}){let{t:a}=K(),[o,s]=(0,L.useState)(``),[c,l]=(0,L.useState)(``),[u,d]=(0,L.useState)(``),[f,p]=(0,L.use
121State)({});(0,L.useEffect)(()=>{i&&!r&&(s(``),l(``),d(``))},[i,r]);let m=t=>{t.preventDefault();let n={};if(o||(n.current_password=mC),c?c.length<10?n.new_password=_C(10):c.length>128&&(n.new_password=vC(128)):n.new_password=mC,u!==c&&(n.confirm_password=gC),Object.keys(n).length>0){p(n);return}p({}),e({currentPassword:o,newPassword:c})},h={...Object.fromEntries(Object.entries(f).map(([e,t])=>[e,a(t.key,t.params)])),...t};return(0,R.jsx)(MC,{"data-kit":`change-password-form`,className:`w-full max-w-2xl`,children:(0,R.jsxs)(`form`,{onSubmit:m,className:`flex flex-col gap-4 px-6`,children:[n&&(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:n}),(0,R.jsx)(q,{type:`password`,name:`current_password`,label:a(`account.password.current`),value:o,onChange:e=>s(e.target.value),error:h.current_password,autoComplete:`current-password`}),(0,R.jsx)(q,{type:`password`,name:`new_password`,label:a(`account.password.new`),value:c,onChange:e=>l(e.target.value),error:h.new_password,autoComplete:`new-password`}),(0,R.jsx)(q,{type:`password`,name:`confirm_password`,label:a(`account.password.confirm`),value:u,onChange:e=>d(e.target.value),error:h.confirm_password,autoComplete:`new-password`}),(0,R.jsx)(G,{type:`submit`,disabled:r,children:a(r?`account.password.submitting`:`account.password.submit`)}),i&&!r&&(0,R.jsx)(`p`,{role:`status`,className:`text-muted-foreground text-sm`,children:a(`account.password.changed`)})]})})}function Une(){let{t:e}=K(),{data:t}
121=eC(),n=hee(),r=gee(),[i,a]=(0,L.useState)(``),[o,s]=(0,L.useState)(``),[c,l]=(0,L.useState)(``),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(!1),[m,h]=(0,L.useState)();(0,L.useEffect)(()=>{t&&!f&&(a(t.first_name),s(t.last_name),l(t.phone),d(t.avatar_url))},[t,f]);let g=async e=>{h(void 0);try{let t=await GO(e);d(t),p(!0)}catch(e){e instanceof zO?h(BO(e.code)):h(BO(`DECODE_FAILED`))}},_=()=>{d(null),p(!0),h(void 0)},v=()=>{if(m)return;let e={first_name:i,last_name:o,phone:c};f&&(e.avatar_data_url=u??``),n.mutate(e,{onSuccess:()=>{p(!1)}})},y=r.error,b=ko(y)&&y.code===`INVALID_CREDENTIALS`?{current_password:y.message}:YC(y,e),x=ko(y)&&y.code===`INVALID_CREDENTIALS`?null:XC(y,e);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,R.jsx)(jN,{title:e(`account.title`),description:e(`account.description`)}),(0,R.jsx)(Vne,{email:t?.email??``,firstName:i,lastName:o,phone:c,onFirstNameChange:a,onLastNameChange:s,onPhoneChange:l,avatar:u,avatarFallback:VO(t?.full_name),avatarError:m,onAvatarFileSelected:g,onAvatarRemove:_,fieldErrors:YC(n.error,e),formError:XC(n.error,e),saving:n.isPending,saved:n.isSuccess,onSubmit:v}),(0,R.jsx)(Hne,{onSubmit:({currentPassword:e,newPassword:t})=>{r.mutate({currentPassword:e,newPassword:t})},fieldErrors:b,formError:x,saving:r.isPending,saved:r.isSuccess})]})}var Wne=Ta({getParentRoute:()=>yN,path:`/account`,component:Une});function W7({timezones:e,value:t,onChange:n,hostLabel:r,hostTimezone:i,error:a,hint:o}){let{t:s}=K(),c=(0,L.useMemo)(()=>e.map(e=>({value:e,label:oO(e)})),[e]);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)($O,{name:`timezone`,label:s(`preferences.region.timezone.label`),options:c,value:t,onChange:e=>n(e.currentTarget.value),error:a,hint:o,"data-kit":`timezone-select`}),r&&i?(0,R.jsxs)(`p`,{className:W(`text-xs text-muted-foreground`),children:[r,`: `,oO(i)]}):null]})}function Gne({initial:e,timezoneOptions:t,onSubmit:n,saving:r=!1,saved:i=!1,error:a=null,fieldErrors:o={},onDirtyChange:s,timezoneHint:c}){let{t:l}
121=K(),[u,d]=(0,L.useState)(e),[f,p]=(0,L.useState)({}),[m]=(0,L.useState)(e),h=!iO(u,m);(0,L.useEffect)(()=>{s?.(h)},[h,s]);let g={...f,...o},_=e=>l(KD[e]),v=e=>{e.preventDefault();let t=YD(u),r=Object.entries(t);if(r.length>0){p(Object.fromEntries(r.map(([e,t])=>[e,l(t.key,t.params)])));return}p({}),n(u)},y=(e,t)=>{d(n=>({...n,windows:{...n.windows,[e]:t}}))},b=e=>{u.windows[e].length>0?y(e,[]):y(e,[{start:`09:00`,end:`17:00`}])},x=e=>{let t=u.windows[e];t.length<4&&y(e,[...t,{start:`09:00`,end:`17:00`}])},S=(e,t)=>{let n=u.windows[e];y(e,n.filter((e,n)=>n!==t))},C=(e,t,n,r)=>{let i=[...u.windows[e]];i[t]={...i[t],[n]:r},y(e,i)};return(0,R.jsx)(MC,{className:`w-full max-w-2xl`,children:(0,R.jsxs)(`form`,{onSubmit:v,className:`flex flex-col gap-6 p-6`,children:[(0,R.jsx)(W7,{timezones:t,value:u.timezone,onChange:e=>d(t=>({...t,timezone:e})),error:g.timezone,hint:c}),(0,R.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,R.jsx)(aW,{id:`show-on-calendar`,checked:u.show_on_calendar,onCheckedChange:e=>d(t=>({...t,show_on_calendar:e===!0}))}),(0,R.jsx)(HC,{htmlFor:`show-on-calendar`,children:l(`booking.availability.showOnCalendar`)})]}),(0,R.jsx)(`div`,{"data-kit":`availability-form-days`,className:`flex max-h-[60dvh] flex-col gap-6 overflow-y-auto pr-1 [scrollbar-width:thin]`,children:GD.map(e=>(0,R.jsxs)(`div`,{className:`border-t pt-4`,children:[(0,R.jsxs)(`div`,{className:`mb-4 flex items-center space-x-2`,children:[(0,R.jsx)(aW,{id:`toggle-${e}`,checked:u.windows[e].length>0,onCheckedChange:()=>b(e)}),(0,R.jsx)(HC,{htmlFor:`toggle-${e}`,children:_(e)})]}),g[`windows.${e}`]&&(0,R.jsx)(`p`,{role:`alert`,className:`mb-2 text-sm text-destructive`,children:g[`windows.${e}`]}),u.windows[e].map((t,n)=>(0,R.jsxs)(`div`,{className:`mb-3 space-y-2`,children:[(0,R.jsxs)(`div`,{className:`flex gap-4`,children:[(0,R.jsx)(q,{type:`time`,name:`${e}-start-${n}`,label:l(`booking.availability.windowStart`,{day:_(e),n:n+1}),value:t.start,onChange:t=>C(e,n,`start`,t.target.value),error:g[`windows.${e}.${n}.start`]}),(0,R.jsx)(q,{type:`time`,name:`${e}-end-${n}`,label:l(`booking.availability.windowEnd`,{day:_(e),n:n+1}),value:t.end,onChange:t=>C(e,n,`end`,t.target.value),error:g[`windows.${e}.${n}.end`]})]}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>S(e,n),"aria-label":l(`booking.availability.removeWindowFor`,{day:_(e),n:n+1}),title:l(`booking.availability.removeWindowFor`,{day:_(e),n:n+1}),children:(0,R.jsx)(FT,{className:`text-destructive`})})]},n)),u.windows[e].length<4&&(0,R.jsxs)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>x(e),"aria-label":l(`booking.availability.addWindowFor`,{day:_(e)}),children:[(0,R.jsx)(CT,{}),l(`booking.availability.addWindow`)]})]},e))}),(0,R.jsxs)(`div`,{"data-kit":`availability-form-actions`,className:`sticky bottom-0 z-10 -mx-6 flex flex-wrap items-center gap-x-4 gap-y-2 border-t bg-card px-6 pt-4`,children:[(0,R.jsx)(G,{type:`submit`,disabled:r,children:l(r?`booking.availability.saving`:`booking.availability.save`)}),a&&(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}),i&&(0,R.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:l(`common.saved`)})]})]})})}function Kne({onDirtyChange:e}){let{t}=K(),n=dt(MP()),r=Lte(),i=kO(),a=(0,L.useMemo)(()=>rO(),[]),o=n.data?.configured?JD(n.data):qD(i.preferredTimezone||kD());if(n.isLoading||i.isLoading)return(0,R.jsx)(TA,{className:`h-96`});let s=n.data?.configured?n.data.timezone:``,c=i.preferredTimezone!==``&&s!==``&&s!==i.preferredTimezone?t(`booking.timezoneHint`,{timezone:i.preferredTimezone}):void 0;return(0,R.jsx)(Gne,{initial:o,timezoneOptions:a,onSubmit:e=>r.mutate(e),saving:r.isPending,saved:r.isSuccess&&!r.isPending,error:XC(r.error,t)??XC(n.error,t),fieldErrors:YC(r.error,t),onDirtyChange:e,timezoneHint:c},n.data?.updated_at??`unset`)}function G7({items:e}){return(0,R.jsx)(`div`,{"data-kit":`section-tabs`,className:`flex gap-8 border-b border-border`,children:e.map(e=>(0,R.jsxs)(`div`,{"data-kit":`section-tabs-item`,"data-id":e.id,"aria-current":e.isActive?`page`:void 0,className:`relative pb-3 text-sm font-medium transition-colors ${e.isActive?`text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:[e.link,e.isActive&&(0,R.jsx)(`div`,{className:`absolute bottom-0 left-0 right-0 h-0.5 bg-primary`,"data-kit":`section-tabs-active-indicator`})]},e.id))})}var K7=Ta({getParentRoute:()=>yN,id:`_booking`,component:qne});function qne(){let e=Xa({select:e=>e.location.pathname});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jN,{title:`Booking`,de
121scription:`Your public booking page, your links, and the hours you offer.`}),(0,R.jsx)(G7,{items:[{id:`links`,label:`Links`,isActive:e.startsWith(`/booking/links`),link:(0,R.jsx)(Sa,{to:`/booking/links`,children:`Links`})},{id:`availability`,label:`Availability`,isActive:e===`/booking/availability`,link:(0,R.jsx)(Sa,{to:`/booking/availability`,children:`Availability`})},{id:`settings`,label:`Page`,isActive:e===`/booking/settings`,link:(0,R.jsx)(Sa,{to:`/booking/settings`,children:`Page`})}]}),(0,R.jsx)(Ra,{})]})}var Jne=Ta({getParentRoute:()=>K7,path:`/booking/availability`,component:q7});function q7(){let[e,t]=(0,L.useState)(!1),n=Ya({shouldBlockFn:(0,L.useCallback)(()=>e,[e]),enableBeforeUnload:e,withResolver:!0});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Kne,{onDirtyChange:t}),(0,R.jsx)(R7,{blocked:n.status===`blocked`,onStay:()=>n.reset?.(),onDiscard:()=>n.proceed?.()})]})}function Yne({link:e,publicUrl:t,onCopy:n,onEdit:r,onTogglePause:i,onDelete:a,busy:o=!1}){let{t:s}=K(),[c,l]=(0,L.useState)(!1),u=e.status===`paused`,d=e.status===`archived`,f=s(d?`booking.linkCard.status.archived`:u?`booking.linkCard.status.paused`:`booking.linkCard.status.active`),p=s(u?`booking.linkCard.resume`:`booking.linkCard.pause`);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`rounded-lg border border-border bg-card p-4`,"data-kit":`booking-link-card`,children:(0,R.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(`h3`,{className:`min-w-0 truncate font-semibold`,children:e.title}),(0,R.jsx)(OA,{variant:d||u?`secondary`:`default`,children:f}),(0,R.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:e.all_day?s(`booking.allDay`):kU(e.duration_minutes)})]}),(0,R.jsx)(`p`,{className:`mt-1 truncate text-xs text-muted-foreground`,children:t})]}),(0,R.jsxs)(`div`,{className:`flex shrink-0 flex-wrap justify-end gap-1`,children:[!d&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":s(`booking.linkCard.copy`),title:s(`booking.linkCard.copy`),onClick:()=>n(t),disabled:o,children:(0,R.jsx)(tT,{className:`text-teal-600 dark:text-teal-400`})}),(0,R.jsx)(G,{asChild:!0,variant:`outline`,size:`icon-sm`,children:(0,R.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,"aria-label":s(`booking.linkCard.open`),title:s(`booking.linkCard.open`),"data-kit":`booking-link-card-open`,children:(0,R.jsx)(nT,{className:`text-violet-600 dark:text-violet-400`})})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":s(`booking.linkCard.edit`),title:s(`booking.linkCard.edit`),onClick:r,disabled:o,children:(0,R.jsx)(bT,{className:`text-blue-600 dark:text-blue-400`})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":p,title:p,onClick:i,disabled:o,children:u?(0,R.jsx)(ST,{className:`text-warning`}):(0,R.jsx)(yT,{className:`text-warning`})})]}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":s(`booking.linkCard.delete`),title:s(`booking.linkCard.delete`),"data-kit":`booking-link-card-delete`,onClick:()=>l(!0),disabled:o,children:(0,R.jsx)(FT,{className:`text-destructive`})})]})]})}),(0,R.jsx)(dY,{open:c,onOpenChange:l,title:s(`booking.linkCard.deleteTitle`),description:s(`booking.linkCard.deleteDescription`),confirmLabel:s(`booking.linkCard.deleteConfirm`),cancelLabel:s(`booking.linkCard.deleteCancel`),destructive:!0,pending:o,onConfirm:()=>{a(),l(!1)},onCancel:()=>l(!1)})]})}function Xne({page:e,pageCount:t,onPageChange:n}){let{t:r}=K();return t<=1?null:(0,R.jsxs)(`div`,{className:`inline-flex items-center gap-1`,"data-kit":`pagination`,children:[(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":`First page`,title:`First page`,disabled:e<=1,onClick:()=>n(1),children:(0,R.jsx)(Gw,{})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":r(`common.pagination.previous`),title:r(`common.pagination.previous`),disabled:e<=1,onClick:()=>n(e-1),children:(0,R.jsx)(Hw,{})}),(0,R.jsx)(`div`,{className:`hidden items-center gap-1 sm:inline-flex`,children:iA(e,t).map((t,r)=>t===`gap`?(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`px-1 text-sm text-muted-foreground`,children:`â¦`},`gap-${r}`):(0,R.jsx)(G,{type:`button`,variant:t===e?`secondary`:`ghost`,size:`icon-sm`,"aria-current":t===e?`page`:void 0,onClick:()=>n(t),children:String(t)},t))}),(0,R.jsx)(`p`,{className:`px-1 text-sm text-muted-foreground sm:sr-only`,"aria-live":`polite`,children:r(`common.pagination.pageOf`,{page:e,pageCount:t})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":r(`common.pagination.next`),title:r(`common.pagination.next`),disabled:e>=t,onClick:()=>n(e+1),children:(0,R.jsx)(Uw,{})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":`Last page`,title:`Last page`,disabled:e>=t,onClick:()=>n(t),children:(0,R.jsx)(Kw,{})})]})}function J7({items:e,searchName:t,searchLabel:n,searchPlaceholder:r,filter:i,itemKey:a,renderItem:o,renderEmpty:s,controls:c,action:l,fill:u=!1,gridClassName:d,resetKey:f,pageSize:p=20}
121){let[m,h]=(0,L.useState)(``),[g,_]=(0,L.useState)(1),[v,y]=(0,L.useState)(f);f!==v&&(y(f),_(1));let b=i(e,m),x=nA(b.length,p),S=Math.min(g,x),C=rA(b,S,p),w=(S-1)*p+1,T=w+C.length-1,E=(0,R.jsx)(`div`,{className:d===void 0?`grid gap-4`:`grid gap-4 ${d}`,"data-kit":`searchable-list-items`,children:C.map(e=>(0,R.jsx)(L.Fragment,{children:o(e)},a(e)))}),D=(0,R.jsx)(Xne,{page:S,pageCount:x,onPageChange:_}),O=s(m.trim());return(0,R.jsxs)(`div`,{className:u?`flex min-h-0 flex-1 flex-col gap-4`:`space-y-4`,"data-kit":`searchable-list`,children:[(0,R.jsxs)(`div`,{className:u?`flex shrink-0 flex-col gap-3 sm:flex-row sm:items-end sm:justify-between`:`flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between`,"data-kit":`searchable-list-toolbar`,children:[(0,R.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-end`,children:[(0,R.jsx)(`div`,{className:`w-full sm:max-w-xs`,children:(0,R.jsx)(q,{name:t,label:n,type:`search`,value:m,placeholder:r,onChange:e=>{h(e.target.value),_(1)}})}),c===void 0?null:(0,R.jsx)(`div`,{className:`sm:pb-2`,children:c})]}),l]}),u?(0,R.jsxs)(R.Fragment,{children:[b.length===0?(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-y-auto`,children:O}):(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto pr-1`,children:E}),(0,R.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-4 border-t border-border pt-3`,"data-kit":`searchable-list-footer`,children:[(0,R.jsx)(`p`,{className:`min-h-5 text-sm text-muted-foreground`,"data-kit":`searchable-list-range`,children:b.length===0?null:`Showing ${w}-${T} of ${b.length}`}),D]})]}):b.length===0?O:(0,R.jsxs)(R.Fragment,{children:[E,D]})]})}function Zne({settingsLink:e,upgradeLink:t,onCreateClick:n,onEditClick:r}){let{t:i}=K(),{data:a}=ft(hP()),{data:o}=ft(gP()),s=NU(o,dt(HA()).data?.limits.max_booking_links),c=s===null?null:(0,R.jsx)(Lj,{title:i(`booking.links.limit.title`),description:i(`booking.links.limit.description`,{count:s}),action:t}),l=typeof window<`u`&&window.location!==void 0?window.location.origin:``,u=vP(),d=yP(),f=e=>{mI(e)},p=(e,t)=>{let n=t===`paused`?`active`:`paused`;u.mutate({id:e,input:{status:n}})},m=e=>{d.mutate(e)},h=e=>{r(e)};return a.handle?o.length===0?(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center py-12`,children:[c,(0,R.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,R.jsx)(`h2`,{className:`text-2xl font-semibold`,children:i(`booking.links.emptyTitle`)}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:i(`booking.links.emptyDescription`)}),(0,R.jsx)(`div`,{className:`pt-4`,children:(0,R.jsxs)(G,{onClick:n,disabled:s!==null,children:[(0,R.jsx)(CT,{}),i(`booking.links.create`)]})})]})]}):(0,R.jsxs)(R.Fragment,{children:[c,(0,R.jsx)(J7,{items:o,searchName:`link-search`,searchLabel:i(`booking.links.searchLabel`),searchPlaceholder:i(`booking.links.searchPlaceholder`),filter:MU,itemKey:e=>e.id,fill:!0,gridClassName:`lg:grid-cols-2`,action:(0,R.jsxs)(G,{onClick:n,disabled:s!==null,children:[(0,R.jsx)(CT,{}),i(`booking.links.create`)]}),renderEmpty:e=>(0,R.jsx)(`div`,{className:`flex flex-col items-center justify-center py-12`,"data-kit":`link-search-empty`,children:(0,R.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,R.jsx)(`h2`,{className:`text-xl font-semibold`,children:i(`booking.links.noMatchTitle`,{query:e})}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:i(`booking.links.noMatchDescription`)})]})}),renderItem:e=>(0,R.jsx)(Yne,{link:e,publicUrl:`${l}${e.public_url}`,onCopy:f,onEdit:()=>h(e.id),onTogglePause:()=>p(e.id,e.status),onDelete:()=>m(e.id),busy:u.isPending||d.isPending})})]}):(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center py-12`,children:(0,R.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,R.jsx)(`h2`,{className:`text-2xl font-semibold`,children:i(`booking.links.claimTitle`)}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:i(`booking.links.claimDescription`)}),(0,R.jsx)(`div`,{className:`pt-4`,children:e})]})})}var Y7={all:[`catalog`],services:()=>[...Y7.all,`services`],service:e=>[...Y7.all,`service`,e],products:()=>[...Y7.all,`products`],product:e=>[...Y7.all,`product`,e],suggestions:()=>[...Y7.all,`suggestions`]},X7=`/api/v1/catalog`,Z7=`https://api.calendhub.com`;async function Qne(e){return(await B(`${X7}/services`,{baseUrl:Z7,signal:e})).services}async function $ne(e,t){return(await B(`${X7}/services/${e}`,{baseUrl:Z7,signal:t})).service}async function ere(e){return(await B(`${X7}/services`,{baseUrl:Z7,method:`POST`,body:e})).service}async function tre(e,t){return(await B(`${X7}/services/${e}`,{baseUrl:Z7,method:`PUT`,body:t})).service}async function nre(e){await B(`${X7}/services/${e}`,{baseUrl:Z7,method:`DELETE`})}async function rre(e){return(await B(`${X7}/services/${e}/archive`,{baseUrl:Z7,method:`POST`})).service}async function ire(e){return(await B(`${X7}/services/${e}/unarchive`,{baseUrl:Z7,method:`POST`})).service}var Q7=`/api/v1/catalog`,$7=`https://api.calendhub.com`;async function are(e){return(await B(`${Q7}/products`,{baseUrl:$7,signal:e})).products}async function ore(e,t){return(await B(`${Q7}/products/${e}`,{baseUrl:$7,signal:t})).product}async function sre(e){return(await B(`${Q7}/products`,{baseUrl:$7,method:`POST`,body:e})).product}async function cre(e,t){return(await B(`${Q7}/products/${e}`,{baseUrl:$7,method:`PUT`,body:t})).product}async function lre(e){await B(`${Q7}/products/${e}`,{baseUrl:$7,method:`DELETE`})}async function ure(e){return(await B(`${Q7}/products/${e}/archive`,{baseUrl:$7,method:`POST`})).product}async function dre(e){return(await B(`${Q7}/products/${e}/unarchive`,{baseUrl:$7,method:`POST`})).product}var fre=`/api/v1/catalog`,pre=`https://api.calendhub.com`;async function mre(e){return B(`${fre}/suggestions`,{baseUrl:pre,signal:e})}function e9(){return pt({queryKey:Y7.services(),queryFn:({signal:e})=>Qne(e),staleTime:3e4})}function hre(e){return pt({queryKey:Y7.service(e),queryFn:({signal:t})=>$ne(e,t),staleTime:3e4})}function gre(){return pt({queryKey:Y7.products(),queryFn:({signal:e})=>are(e),staleTime:3e4})}function _re(e){return pt({queryKey:Y7.product(e),queryFn:({signal:t})=>ore(e,t),staleTime:3e4})}function t9(){return pt({queryKey:Y7.suggestions(),queryFn:({signal:e})=>mre(e),staleTime:0})}function n9(e,t){if(e!==void 0)return e.findIndex(e=>e.id===t.id)===-1?[t,...e]:e.map(e=>e.id===t.id?t:e)}function vre(){let e=z();return mt({mutationFn:e=>ere(e),onSuccess:t=>
121{e.setQueryData(Y7.service(t.id),t),e.setQueryData(Y7.services(),e=>e===void 0?[t]:n9(e,t)),e.invalidateQueries({queryKey:Y7.suggestions()})}})}function yre(){let e=z();return mt({mutationFn:({id:e,input:t})=>tre(e,t),onSuccess:t=>{e.setQueryData(Y7.service(t.id),t),e.setQueryData(Y7.services(),e=>n9(e,t)),e.invalidateQueries({queryKey:Y7.suggestions()})}})}function bre(){let e=z();return mt({mutationFn:e=>rre(e),onSuccess:t=>{e.setQueryData(Y7.service(t.id),t),e.setQueryData(Y7.services(),e=>n9(e,t))}})}function xre(){let e=z();return mt({mutationFn:e=>ire(e),onSuccess:t=>{e.setQueryData(Y7.service(t.id),t),e.setQueryData(Y7.services(),e=>n9(e,t))}})}function r9(){let e=z();return mt({mutationFn:e=>nre(e),onSuccess:(t,n)=>{e.setQueryData(Y7.services(),e=>e===void 0?void 0:e.filter(e=>e.id!==n)),e.removeQueries({queryKey:Y7.service(n)}),e.invalidateQueries({queryKey:Y7.services()}),e.invalidateQueries({queryKey:Y7.suggestions()})}})}function i9(e,t){if(e!==void 0)return e.findIndex(e=>e.id===t.id)===-1?[t,...e]:e.map(e=>e.id===t.id?t:e)}function Sre(){let e=z();return mt({mutationFn:e=>sre(e),onSuccess:t=>{e.setQueryData(Y7.product(t.id),t),e.setQueryData(Y7.products(),e=>e===void 0?[t]:i9(e,t)),e.invalidateQueries({queryKey:Y7.suggestions()})}})}function Cre(){let e=z();return mt({mutationFn:({id:e,input:t})=>cre(e,t),onSuccess:t=>{e.setQueryData(Y7.product(t.id),t),e.setQueryData(Y7.products(),e=>i9(e,t)),e.invalidateQueries({queryKey:Y7.suggestions()})}})}function wre(){let e=z();return mt({mutationFn:e=>ure(e),onSuccess:t=>{e.setQueryData(Y7.product(t.id),t),e.setQueryData(Y7.products(),e=>i9(e,t))}})}function Tre(){let e=z();return mt({mutationFn:e=>dre(e),onSuccess:t=>{e.setQueryData(Y7.product(t.id),t),e.setQueryData(Y7.products(),e=>i9(e,t))}})}function a9(){let e=z();return mt({mutationFn:e=>lre(e),onSuccess:(t,n)=>{e.setQueryData(Y7.products(),e=>e===void 0?void 0:e.filter(e=>e.id!==n)),e.removeQueries({queryKey:Y7.product(n)}),e.invalidateQueries({queryKey:Y7.products()}),e.invalidateQueries({queryKey:Y7.suggestions()})}})}function o9(e){switch(e){case`system`:return{canDelete:!1,canRename:!1,canReorder:!0,canToggleRequired:!1,canToggleHidden:!1,canEditLabel:!0,canEditOptions:!1,canSaveToLibrary:!1,badge:`system`};case`system-but-optional`:return{canDelete:!1,canRename:!1,canReorder:!0,canToggleRequired:!0,canToggleHidden:!0,canEditLabel:!0,canEditOptions:!1,canSaveToLibrary:!1,badge:`locked`};case`system-but-hidden`:return{canDelete:!1,canRename:!1,canReorder:!0,canToggleRequired:!1,canToggleHidden:!1,canEditLabel:!0,canEditOptions:!1,canSaveToLibrary:!1,badge:`locked`};case`user`:return{canDelete:!0,canRename:!0,canReorder:!0,canToggleRequired:!0,canToggleHidden:!0,canEditLabel:!0,canEditOptions:!0,canSaveToLibrary:!0,badge:null};case`user-readonly`:return{canDelete:!1,canRename:!1,canReorder:!0,canToggleRequired:!1,canToggleHidden:!1,canEditLabel:!1,canEditOptions:!1,canSaveToLibrary:!1,badge:`locked`}}}function Ere(e,t){let n=cW.map(e=>({value:e,label:t(`inputs.fieldType.${e}`,{defaultValue:e})}));return e&&!cW.includes(e)&&n.push({value:e,label:t(`inputs.editor.typeRetired`,{type:t(`inputs.fieldType.${e}`,{defaultValue:e})}),disabled:!0}),n}function Dre(){let{t:e}=K();return t=>t===void 0?void 0:e(MW(t),{defaultValue:jW(t)})}function s9({value:e,onChange:t,errors:n={},disabled:r=!1,deriveNameFromLabel:i=!0}){let{t:a}=K(),o=Dre(),[s,c]=(0,L.useState)(!1),l=n=>{t({...e,...n})},u=e=>{if(!s&&i){let t=EI(e);l({label:e,name:t})}else l({label:e})},d=e=>{l({name:e}),s||c(!0)},f=e.editable,p=o9(f);return(0,R.jsxs)(`div`,{className:`space-y-4`,"data-kit":`field-editor`,children:[(0,R.jsx)(q,{name:`field-label`,label:a(`inputs.editor.label`),value:e.label,onChange:e=>u(e.target.value),disabled:r||!p.canEditLabel,error:o(n.label),maxLength:200}),(0,R.jsx)(q,{name:`field-name`,label:a(`inputs.editor.name`),value:e.name,onChange:e=>d(e.target.value),disabled:r||!p.canRename,error:o(n.name),hint:a(`inputs.editor.nameHint`)}),(0,R.jsx)($O,{name:`field-type`,label:a(`inputs.editor.type`),value:e.type,onChange:e=>l({type:e.target.value}),disabled:r||!p.canRename,options:Ere(e.type,a),error:o(n.type)}),(0,R.jsx)(q,{name:`field-placeholder`,label:a(`inputs.editor.placeholder`),value:e.placeholder||``,onChange:e=>l({placeholder:e.target.value}),disabled:r,error:o(n.placeholder),maxLength:200}),(0,R.jsx)(q,{name:`field-helpText`,label:a(`inputs.editor.helpText`),value:e.helpText||``,onChange:e=>l({helpText:e.target.value}),disabled:r,error:o(n.helpText),maxLength:500}),(0,R.jsx)(oW,{name:`field-required`,label:a(`inputs.editor.required`),checked:e.required,onCheckedChange:e=>l({required:e}),disabled:r||!p.canToggleRequired,error:o(n.required)}),(0,R.jsx)(oW,{name:`field-hidden`,label:a(`inputs.editor.hidden`),checked:e.hidden,onCheckedChange:e=>l({hidden:e}),disabled:r||!p.canToggleHidden,error:o(n.hidden)}),_W(e.type)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{name:`field-minLength`,label:a(`inputs.editor.minLength`),type:`number`,value:e.minLength||``,onChange:e=>l({minLength:e.target.value?parseInt(e.target.value,10):void 0}),disabled:r,error:o(n.minLength),min:`0`,max:5e3}),(0,R.jsx)(q,{name:`field-maxLength`,label:a(`inputs.editor.maxLength`),type:`number`,value:e.maxLength||``,onChange:e=>l({maxLength:e.target.value?parseInt(e.target.value,10):void 0}),disabled:r,error:o(n.maxLength),min:`0`,max:5e3})]}),gW(e.type)&&(0,R.jsxs)(`div`,{className:`border-t pt-4`,children:[(0,R.jsx)(`h4`,{className:`font-medium text-sm mb-3`,children:a(`inputs.editor.options`)}),(0,R.jsxs)(`div`,{className:`space-y-3`,children:[e.options?.map((t,n)=>(0,R.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,R.jsx)(q,{name:`field-option-${n}-label`,label:a(`inputs.editor.option`,{index:n+1}),value:t.label,onChange:r=>{let i=[...e.options||[]];i[n]={...t,label:r.target.value,value:EI(r.target.value)},l({options:i})},disabled:r,className:`flex-1`}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>{let t=e.options?.filter((e,t)=>
121t!==n);l({options:t})},disabled:r,"aria-label":`Remove option ${n+1}`,title:`Remove option ${n+1}`,children:(0,R.jsx)(FT,{className:`text-destructive`})})]},n)),(e.options?.length||0)<50&&(0,R.jsx)(G,{onClick:()=>{let t=[...e.options||[],{label:``,value:``}];l({options:t})},disabled:r,variant:`outline`,size:`sm`,children:a(`inputs.editor.addOption`)})]}),n.options&&(0,R.jsx)(`p`,{className:`text-destructive text-sm mt-2`,children:o(n.options)})]})]})}function c9({field:e,name:t,showFlags:n=!0}){let{t:r}=K(),[i,a]=(0,L.useState)({}),o={...e,name:t,hidden:!1},s=[e.required?r(`inputs.preview.required`):null,e.hidden?r(`inputs.preview.hidden`):null].filter(e=>e!==null);return(0,R.jsxs)(`div`,{"data-kit":`field-preview`,className:`space-y-3`,children:[(0,R.jsx)(RW,{fields:[o],values:i,onChange:(e,t)=>a(n=>({...n,[e]:t}))}),n&&s.length>0&&(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s.join(` · `)})]})}function Ore({open:e,onOpenChange:t,items:n,loading:r=!1,error:i=null,takenNames:a,disabled:o=!1,onAdd:s,onManage:c}){let{t:l}=K(),[u,d]=(0,L.useState)({}),f=a.length>=30,p=e=>{let t=IW(e.field.name||e.field.type,new Set(a));s(e),d(n=>({...n,[e.id]:[...n[e.id]??[],t]}))};return(0,R.jsxs)(Xj,{open:e,onOpenChange:t,size:`lg`,scrollBody:!0,mobile:`sheet`,title:l(`inputs.picker.title`),description:l(`inputs.picker.description`),footer:(0,R.jsx)(G,{type:`button`,onClick:()=>t(!1),children:l(`inputs.picker.done`)}),children:[f?(0,R.jsx)(`p`,{role:`status`,"data-kit":`input-picker-limit`,className:`mb-4 text-sm text-muted-foreground`,children:l(`inputs.picker.limit`,{max:30})}):null,r?(0,R.jsx)(`p`,{role:`status`,"data-kit":`input-picker-loading`,className:`py-12 text-center text-muted-foreground`,children:l(`inputs.picker.loading`)}):i?(0,R.jsx)(`p`,{role:`alert`,"data-kit":`input-picker-error`,className:`py-12 text-center text-destructive`,children:i}):n.length===0?(0,R.jsxs)(`div`,{"data-kit":`input-picker-empty`,className:`space-y-3 py-12 text-center`,children:[(0,R.jsx)(`h3`,{className:`text-lg font-medium`,children:l(`inputs.picker.empty.title`)}),(0,R.jsx)(`p`,{className:`mx-auto max-w-md text-sm text-muted-foreground`,children:l(`inputs.picker.empty.description`)}),c?(0,R.jsx)(G,{type:`button`,variant:`outline`,"data-kit":`input-picker-manage`,onClick:c,children:l(`inputs.picker.empty.manage`)}):null]}):(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(J7,{items:n,searchName:`input-picker-search`,searchLabel:l(`inputs.searchLabel`),searchPlaceholder:l(`inputs.searchPlaceholder`),filter:PU,itemKey:e=>e.id,renderItem:e=>(0,R.jsx)(`div`,{"data-kit":`input-picker-card`,"data-input-name":e.field.name,className:`rounded-lg border border-border bg-card p-4`,children:(0,R.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,R.jsxs)(`div`,{className:`space-y-3 sm:min-w-0 sm:flex-1`,children:[(0,R.jsx)(`h3`,{className:`text-base font-medium`,children:e.field.label||e.field.name}),(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,R.jsx)(OA,{variant:`outline`,children:e.field.type}),e.field.required&&(0,R.jsx)(OA,{variant:`secondary`,children:l(`inputs.card.required`)}),e.field.hidden&&(0,R.jsx)(OA,{variant:`outline`,children:l(`inputs.card.hidden`)})]}),(0,R.jsxs)(G,{type:`button`,size:`sm`,variant:`outline`,"data-kit":`input-picker-add`,"aria-label":l(`inputs.picker.add`,{label:e.field.label||e.field.name}),disabled:o||f,onClick:()=>p(e),children:[(0,R.jsx)(CT,{className:`size-4`}),l(`inputs.picker.add`,{label:e.field.label||e.field.name})]}),u[e.id]&&(0,R.jsx)(`p`,{role:`status`,"data-kit":`input-picker-added`,className:`text-xs text-muted-foreground`,children:l(`inputs.picker.added`,{names:u[e.id].join(`, `)})})]}),(0,R.jsx)(`div`,{"data-kit":`input-picker-preview`,className:`w-full sm:w-72 sm:shrink-0`,children:(0,R.jsx)(c9,{field:e.field,name:`picker-${e.id}`,showFlags:!1})})]})}),renderEmpty:e=>(0,R.jsx)(`div`,{"data-kit":`input-picker-search-empty`,className:`py-12 text-center`,children:(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:l(`inputs.noMatch`,{query:e})})}),pageSize:10})})]})}function kre(e,t){let n={},r=`fields.${t}.`;for(let[t,i]of Object.entries(e))t.startsWith(r)&&(n[t.slice(r.length)]=i);return n}
121function Are({value:e,onChange:t,errors:n={},disabled:r=!1,library:i}){let{t:a}=K(),[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(!1),f=(0,L.useId)(),p=e.fields.length>=30,m=i??{items:[]},h=m.onSave,g=m.savedNames??[],_=e.fields,v=(n,r)=>{let i=[..._];i[n]=r,t({...e,fields:i})},y=n=>{let r=_.filter((e,t)=>t!==n);t({...e,fields:r})},b=n=>{if(n<=0)return;let r=[..._];[r[n],r[n-1]]=[r[n-1],r[n]],t({...e,fields:r})},x=n=>{if(n>=_.length-1)return;let r=[..._];[r[n],r[n+1]]=[r[n+1],r[n]],t({...e,fields:r})},S=n=>{if(_.length>=30)return;let r=n.split(`-`)[0],i=1,a=`${r}-${i}`;for(;_.some(e=>e.name===a);)i++,a=`${r}-${i}`;let o=FW(n,a);t({...e,fields:[..._,o]})},C=(()=>{let t=SW(e),r={};return t.forEach(e=>{r[e.path]=e.code}),Object.assign(r,n),r})();return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(`div`,{className:`space-y-2`,children:_.map((e,t)=>{let n=o===t,i=e.editable,c=o9(i);return(0,R.jsxs)(`div`,{"data-kit":`field-builder-row`,"data-field-name":e.name,className:`border rounded-md`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 p-3 bg-muted/30 border-b`,children:[(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>s(n?null:t),"aria-label":a(n?`inputs.builder.collapse`:`inputs.builder.expand`,{field:e.label||e.name}),title:a(n?`inputs.builder.collapse`:`inputs.builder.expand`,{field:e.label||e.name}),"aria-expanded":n,disabled:r,children:n?(0,R.jsx)(Ww,{}):(0,R.jsx)(Vw,{})}),(0,R.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,R.jsx)(`div`,{className:`text-sm font-medium truncate`,children:e.label||e.name})}),(0,R.jsx)(`span`,{className:`text-xs bg-primary/10 text-primary px-2 py-1 rounded`,children:e.type}),e.required&&(0,R.jsx)(`span`,{className:`text-xs bg-warning/15 text-foreground px-2 py-1 rounded`,children:a(`inputs.builder.required`)}),e.hidden&&(0,R.jsx)(`span`,{className:`text-xs bg-muted text-muted-foreground px-2 py-1 rounded`,children:a(`inputs.builder.hidden`)}),c.badge&&(0,R.jsx)(`span`,{className:W(`text-xs px-2 py-1 rounded`,c.badge===`system`?`bg-accent text-accent-foreground`:`bg-muted text-muted-foreground`),title:c.badge===`system`?a(`inputs.builder.systemTitle`):a(`inputs.builder.lockedTitle`),children:c.badge===`system`?a(`inputs.builder.system`):a(`inputs.builder.locked`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>b(t),disabled:t===0||r||!c.canReorder,"aria-label":a(`inputs.builder.moveUp`,{field:e.label||e.name}),title:a(`inputs.builder.moveUp`,{field:e.label||e.name}),children:(0,R.jsx)(Ww,{})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>x(t),disabled:t===_.length-1||r||!c.canReorder,"aria-label":a(`inputs.builder.moveDown`,{field:e.label||e.name}),title:a(`inputs.builder.moveDown`,{field:e.label||e.name}),children:(0,R.jsx)(Vw,{})}),h&&c.canSaveToLibrary&&(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>h(e),disabled:r||m.savingName===e.name||g.includes(e.name),"aria-label":`Save ${e.label||e.name} to Inputs`,title:g.includes(e.name)?`Saved to Inputs`:`Save to Inputs`,"data-kit":`field-builder-row-save`,"data-saved":g.includes(e.name)?`true`:void 0,children:g.includes(e.name)?(0,R.jsx)(Bw,{className:`text-emerald-600 dark:text-emerald-400`}):(0,R.jsx)(Nw,{className:`text-emerald-600 dark:text-emerald-400`})}),c.canDelete&&(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>y(t),disabled:r,"aria-label":a(`inputs.builder.delete`,{field:e.label||e.name}),title:a(`inputs.builder.delete`,{field:e.label||e.name}),children:(0,R.jsx)(FT,{className:`text-destructive`})})]}),n&&(0,R.jsx)(`div`,{className:`p-4`,children:(0,R.jsx)(s9,{value:e,onChange:e=>v(t,e),errors:kre(C,t),disabled:r})})]},t)})}),(0,R.jsxs)(`div`,{"data-kit":`field-builder-toolbar`,className:`space-y-2`,children:[(0,R.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,R.jsx)(i7,{open:c,onOpenChange:l,align:`start`,width:`lg`,scrollContent:!0,trigger:(0,R.jsxs)(G,{type:`button`,variant:`outline`,size:`sm`,disabled:r||p,children:[(0,R.jsx)(CT,{}),a(`inputs.builder.addField`)]}),children:(0,R.jsx)(`div`,{className:`space-y-1`,"data-kit":`field-type-menu`,children:cW.map(e=>(0,R.jsxs)(`button`,{type:`button`,"data-kit":`field-type-option`,"data-field-type":e,"aria-describedby":`${f}-${e}`,onClick:()=>{S(e),l(!1)},className:`w-full rounded-md px-2 py-2 text-left hover:bg-accent hover:text-accent-foreground`,children:[(0,R.jsx)(`span`,{className:`block text-sm font-medium`,children:LU(e)}),(0,R.jsx)(`span`,{id:`${f}-${e}`,"aria-hidden":`true`,className:`block text-xs text-muted-foreground`,children:RU(e)})]},e))})}),(0,R.jsxs)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>d(!0),disabled:r||p,"aria-label":a(`inputs.builder.library`),"data-kit":`field-builder-library-trigger`,children:[(0,R.jsx)(tT,{}),a(`inputs.builder.library`)]}),(0,R.jsxs)(`div`,{className:`ml-auto text-right`,"data-kit":`field-builder-counter`,children:[(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a(`inputs.builder.counter`,{count:_.length,max:30})}),p&&(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:a(`inputs.builder.counterFull`)})]})]}),m.saveError&&(0,R.jsx)(`p`,{role:`alert`,"data-kit":`field-builder-save-error`,className:`text-sm text-destructive`,children:m.saveError})]}),(0,R.jsx)(Ore,{open:u,onOpenChange:d,items:m.items,loading:m.loading,error:m.error,takenNames:_.map(e=>e.name),disabled:r,onManage:m.onManage,onAdd:n=>t(LW(e,n.field))})]})}
121function l9({value:e,onChange:t,typeError:n,addressErrors:r,disabled:i,prefilledFrom:a,video:o,phone:s}){let{t:c}=K();return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-kit":`location-fields`,children:[(0,R.jsx)(Zj,{name:`location_type`,label:c(`location.label`),options:cA.map(e=>({value:e.value,label:c(e.labelKey)})),value:e.location_type,onValueChange:n=>t({...e,location_type:n}),error:n,disabled:i}),e.location_type===`in_person`?(0,R.jsx)(xA,{value:e.address,onChange:n=>t({...e,address:n}),errors:r??{},disabled:i}):null,e.location_type===`video`&&o!==void 0?(0,R.jsx)(jre,{video:o,disabled:i}):null,e.location_type===`phone`&&s!==void 0?(0,R.jsx)(`div`,{"data-kit":`location-phone`,children:(0,R.jsx)(q,{name:`location_phone`,label:c(`location.phone.label`),type:`tel`,autoComplete:`tel`,inputMode:`tel`,maxLength:40,value:s.value,onChange:e=>s.onChange(e.target.value),hint:s.prefilledFromAccount?c(`location.phone.prefilledFromAccount`):c(`location.phone.hint`),error:s.error,disabled:i})}):null,a===void 0?null:(0,R.jsx)(`p`,{className:`text-muted-foreground text-xs`,"data-kit":`location-fields-hint`,children:c({preferences:`location.prefilled.preferences`,workspace:`location.prefilled.workspace`}[a])})]})}function jre({video:e,disabled:t}){let{t:n}=K(),r=e.errors??{},i=e.value.provider,a=[{value:``,label:n(`location.video.unspecified`)},...e.providers.map(e=>({value:e.value,label:e.available?e.label:`${e.label} â ${n(e.reasonKey)}`,disabled:!e.available}))],o=[{value:``,label:n(`location.video.accountUnspecified`)},...e.accounts.map(e=>({value:e.id,label:e.revoked?`${e.label} â ${n(`location.video.revoked`)}`:e.label}))];return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-kit":`location-video`,children:[(0,R.jsx)($O,{name:`video_provider`,label:n(`location.video.label`),value:i,onChange:t=>{let n=t.target.value;e.onChange({...e.value,provider:n})},options:a,error:r.provider,disabled:t}),i!==``&&mA(i)?(0,R.jsx)($O,{name:`video_connection_id`,label:n(`location.video.account`),value:e.value.connection_id,onChange:t=>e.onChange({...e.value,connection_id:t.target.value}),options:o,error:r.connection_id,hint:n(`location.video.accountHint`,{provider:pA[i]}),disabled:t}):null,i===`custom`?(0,R.jsx)(q,{name:`video_url`,label:n(`location.video.url`),type:`url`,value:e.value.url,onChange:t=>e.onChange({...e.value,url:t.target.value}),placeholder:`https://`,hint:n(`location.video.urlHint`),error:r.url,disabled:t}):null]})}function Mre({value:e,onChange:t,state:n,origin:r,handle:i,error:a,hint:o,disabled:s}){let{t:c}=K(),l={idle:null,checking:c(`booking.slugField.state.checking`),available:c(`booking.slugField.state.available`),taken:c(`booking.slugField.state.taken`),"too-short":c(`booking.slugField.state.tooShort`),"too-long":c(`booking.slugField.state.tooLong`),invalid:c(`booking.slugField.state.invalid`)}[n],u=n===`taken`||n===`too-short`||n===`too-long`||n===`invalid`,d=a||(u&&l?l:void 0);return(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(q,{name:`slug`,label:c(`booking.slugField.label`),value:e,onChange:e=>t(e.target.value),placeholder:`unique-slug`,error:d,hint:o,disabled:s,"data-kit":`slug-field`}),(0,R.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Preview:`,(0,R.jsxs)(`div`,{className:`mt-1 font-mono text-sm break-all`,children:[r,`/book/`,i,`/`,e||`â¦`]})]}),l&&!u&&!a&&(0,R.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:l})]})}var u9=`all_day`;function Nre({mode:e,initial:t,onSubmit:n,onCancel:r,onDelete:i,pending:a=!1,deleting:o=!1,error:s,fieldErrors:c={},formErrors:l={},publicOrigin:u,handle:d,library:f,services:p=[],connections:m=[],locationPrefilledFrom:h,onSlugChange:g,slugAvailability:_=`idle`,calendarOptions:v=[],accountPhone:y=``,coHostOptions:b,coHostsLockedReason:x}){let{t:S}=K(),C=SI(t.location,y),[w,T]=(0,L.useState)({...t,location:C.location}
121),[E,D]=(0,L.useState)(C.prefilled),[O,k]=(0,L.useState)(!1),[ee,A]=(0,L.useState)(!1),[j,te]=(0,L.useState)(!1),[ne,re]=(0,L.useState)(e===`edit`&&t.location.location_type!==``),[M,N]=(0,L.useState)(()=>new Set);(0,L.useEffect)(()=>{a||N(new Set)},[a]);let ie=(...e)=>{e.length!==0&&N(t=>{let n=new Set(t);for(let t of e)n.add(t);return n})},ae=QC(c,M),oe=(0,L.useRef)(null),P=a||o,F=w.all_day===!0,I=e===`edit`,se=DI(w.slug),ce=!I&&se!==`ok`,le=I?`idle`:w.slug===``?j?`too-short`:`idle`:se===`ok`?_:se,ue=e=>{if(ie(`title`),O)T(t=>({...t,title:e}));else{ie(`slug`);let t=EI(e);T(n=>({...n,title:e,slug:t})),g?.(t)}},de=e=>{ie(`slug`),T(t=>({...t,slug:e})),g?.(e),O||k(!0)},fe=e=>{let t=e===null?void 0:p.find(t=>t.id===e),n=!ne&&t!==void 0?SI(vI(t.location),y):null;n?.prefilled&&D(!0),T(t=>({...t,service_id:e,location:n===null?t.location:n.location}))},pe=F?yA(m).map(e=>e.value===`custom`?e:{...e,available:!1,reasonKey:`booking.linkForm.allDayNoVideo`}):yA(m),me=e=>{if(ie(`push_connection_id`),e===``){T(e=>({...e,push_connection_id:null}));return}re(!0);let t=xI(w.location,e,m,pe);ie(...CI(w.location,t)),T(n=>({...n,push_connection_id:e,location:t}))},he=e=>{let t=SI(e,y);t.prefilled&&D(!0),T(e=>({...e,location:t.location}))},ge=e=>{e.preventDefault(),te(!0),!ce&&(N(new Set),n(w))},_e=[{value:``,label:S(`booking.linkForm.selectDuration`)},...DU.map(e=>({value:String(e),label:kU(e)})),{value:u9,label:S(`booking.allDay`)}],ve=[{value:``,label:S(`booking.linkForm.selectBuffer`)},...OU.map(e=>({value:String(e),label:e===0?S(`booking.linkForm.bufferNone`):S(`booking.linkForm.bufferMinutes`,{minutes:e})}))],ye=w.service_id,be=[{value:``,label:S(`booking.linkForm.noService`)}];ye!==null&&!p.some(e=>e.id===ye)&&be.push({value:ye,label:S(`booking.linkForm.deletedService`)});let xe=[];if(p.length>0){let e=p.filter(e=>!e.archived),t=p.filter(e=>e.archived);e.length>0&&xe.push({label:S(`booking.linkForm.activeServices`),options:e.map(e=>({value:e.id,label:e.label}))}),t.length>0&&xe.push({label:S(`booking.linkForm.archivedServices`),options:t.map(e=>({value:e.id,label:e.label}))})}return(0,R.jsxs)(`form`,{onSubmit:ge,className:`space-y-6`,"data-kit":`booking-link-form`,children:[s&&(0,R.jsx)(`div`,{className:`rounded-lg border border-destructive/50 bg-destructive/5 p-4`,children:(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:s})}),(0,R.jsx)(q,{ref:oe,name:`title`,label:S(`booking.linkForm.title`),value:w.title,onChange:e=>ue(e.target.value),placeholder:S(`booking.linkForm.titlePlaceholder`),error:ae.title,disabled:P}),(0,R.jsx)(Mre,{value:w.slug,onChange:de,state:le,origin:u,handle:d,error:ae.slug,hint:I?`The URL cannot be changed after the link is created.`:O?S(`booking.linkForm.slugEdited`):void 0,disabled:P||I}),(0,R.jsx)($O,{name:`duration_minutes`,label:S(`booking.linkForm.duration`),value:F?u9:String(w.duration_minutes),hint:F?S(`booking.linkForm.allDayHint`):void 0,onChange:e=>{ie(`duration_minutes`);let t=e.target.value;if(t===u9){ie(`buffer_before_minutes`,`buffer_after_minutes`,`location.video.provider`),T(e=>({...e,all_day:!0,buffer_before_minutes:0,buffer_after_minutes:0,duration_minutes:DU.includes(e.duration_minutes)?e.duration_minutes:30}));return}T(e=>({...e,all_day:!1,duration_minutes:Number(t)}))},options:_e,error:ae.duration_minutes,disabled:P}),F?null:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($O,{name:`buffer_before_minutes`,label:S(`booking.linkForm.bufferBefore`),value:String(w.buffer_before_minutes),onChange:e=>{ie(`buffer_before_minutes`),T(t=>({...t,buffer_before_minutes:Number(e.target.value)}))},options:ve,error:ae.buffer_before_minutes,disabled:P}),(0,R.jsx)($O,{name:`buffer_after_minutes`,label:S(`booking.linkForm.bufferAfter`),value:String(w.buffer_after_minutes),onChange:e=>{ie(`buffer_after_minutes`),T(t=>({...t,buffer_after_minutes:Number(e.target.value)}))},options:ve,error:ae.buffer_after_minutes,disabled:P})]}),(0,R.jsx)($O,{name:`service_id`,label:S(`booking.linkForm.service`),value:w.service_id||``,onChange:e=>{ie(`service_id`),fe(e.target.value||null)},options:be,groups:xe.length>0?xe:void 0,error:ae.service_id,hint:S(`booking.linkForm.serviceHint`),disabled:P}),(0,R.jsx)(w7,{value:w.push_connection_id??``,onChange:me,options:v,canChoose:!0,disabled:P,hint:S(`booking.linkForm.calendarHint`)}),b===void 0?null:(0,R.jsxs)(`fieldset`,{className:`space-y-2`,"data-kit":`booking-link-co-hosts`,children:[(0,R.jsx)(`legend`,{className:`text-sm font-medium`,children:S(`booking.linkForm.coHosts`)}),b.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:S(`booking.linkForm.coHostsNone`)}):(0,R.jsxs)(R.Fragment,{children:[b.map(e=>{let t=w.co_host_ids??[],n=t.includes(e.id),r=F||x!==void 0||t.length>=4;return(0,R.jsx)(oW,{name:`co_host_${e.id}`,label:e.departed?S(`booking.linkForm.formerMember`):e.label,checked:n,onCheckedChange:t=>{ie(`co_host_ids`),T(n=>({...n,co_host_ids:jU(n.co_host_ids??[],e.id,t)}))},disabled:P||!n&&r},e.id)}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:F?S(`booking.linkForm.coHostsAllDay`):x??S(`booking.linkForm.coHostsHint`,{max:4})})]}),ae.co_host_ids?(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:ae.co_host_ids}):null]}),(0,R.jsx)(l9,{value:w.location,onChange:e=>{re(!0);let t={...w.location,...e};ie(...CI(w.location,t)),he(t)},typeError:ae[`location.type`],addressErrors:dA(ae),disabled:P,prefilledFrom:ne||w.service_id!==null?void 0:h,video:{value:w.location.video,onChange:e=>{re(!0),w.location.video.provider!==e.provider&&ie(`location.video.provider`),w.location.video.connection_id!==e.connection_id&&ie(`location.video.connection_id`),w.location.video.url!==e.url&&ie(`location.video.url`),T(t=>({...t,location:{...t.location,video:e}}))},providers:pe,accounts:bA(m,w.location.video.provider),errors:{provider:ae[`location.video.provider`],connection_id:ae[`location.video.connection_id`],url:ae[`location.video.url`]}},phone:{value:w.location.phone,onChange:e=>{ie(`location.phone`),re(!0),D(!1),T(t=>({...t,location:{...t.location,phone:e}}))},error:ae[`location.phone`],prefilledFromAccount:E}}),(0,R.jsx)(CA,{name:`description`,label:S(`booking.linkForm.description`),value:w.description,onChange:e=>{ie(`description`),T(t=>({...t,description:e.target.value}))},placeholder:S(`booking.linkForm.descriptionPlaceholder`),error:ae.description,disabled:P}),(0,R.jsxs)(`div`,{className:`border-t pt-6`,children:[(0,R.jsx)(`h3`,{className:`font-semibold mb-4`,children:S(`booking.linkForm.formFields`)}),(0,R.jsx)(Are,{value:w.form,onChange:e=>T(t=>({...t,form:e})),errors:l,disabled:P,library:f})]}),ee?(0,R.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-destructive/50 bg-destructive/5 p-4`,children:[(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-foreground`,children:S(`booking.linkForm.deleteWarning`)}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`button`,variant:`destructive`,onClick:()=>{A(!1),i?.()},disabled:o,children:S(`booking.linkForm.deletePermanently`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:()=>A(!1),disabled:o,children:S(`booking.linkForm.cancel`)})]})]}):(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`submit`,disabled:a||o,children:S(a?`booking.linkForm.saving`:`booking.linkForm.save`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:r,disabled:a||o,children:S(`booking.linkForm.cancel`)}),e===`edit`&&i&&(0,R.jsx)(G,{type:`button`,variant:`ghost`,onClick:()=>A(!0),disabled:o,children:S(`booking.linkForm.delete`)})]})]})}function Pre(e){return e.map(e=>({id:e.id,label:`${e.title} â ${hk(e.price)}`,archived:e.archived_at!==null,location:e.location}))}function d9({mode:e,linkId:t,onSuccess:n,onCancel:r,onManageInputs:i,upgradeLink:a}){let{t:o}=K(),{data:s}=ft(hP()),c=dt({...ote(t||``),enabled:e===`edit`&&!!t}),l=c.data,u=dt(_P()),d=dt(e9()),f=dt(qF()),p=rC(),m=eC(),h=AO(),g=aC(),_=dt(HA()).data?.limits.max_co_hosts===0,v=l?.co_host_ids,y=(0,L.useRef)(null);(0,L.useEffect)(()=>{y.current===null&&l!==void 0&&(y.current=l.co_host_ids??[])},[l]);let b=(0,L.useMemo)(()=>
121{if(g.data===void 0)return;let e=g.data.filter(e=>e.role===`member`).map(e=>({id:e.user_id,label:`${e.first_name} ${e.last_name}`.trim()||e.email,departed:!1}));for(let t of v??[])e.some(e=>e.id===t)||e.push({id:t,label:``,departed:!0});return e},[g.data,v]),x=z(),S=wte(),C=vP(),w=yP(),T=bP(),[E,D]=(0,L.useState)(null),[O,k]=(0,L.useState)([]),[ee,A]=(0,L.useState)({}),j=e===`create`?S:C,te=j.error,ne=e===`create`?_A(h.data?.default_location,p.data?.address,p.data?.coordinates):null,re=e===`create`?{slug:``,title:``,description:``,duration_minutes:30,all_day:!1,buffer_before_minutes:0,buffer_after_minutes:0,form:xW(),service_id:null,push_connection_id:null,co_host_ids:[],location:ne===null?hI:{location_type:ne.location_type,address:ne.address,video:{...hI.video},phone:``}}:{slug:l?.slug||``,title:l?.title||``,description:l?.description||``,duration_minutes:l?.duration_minutes||30,all_day:l?.all_day??!1,buffer_before_minutes:l?.buffer_before_minutes||0,buffer_after_minutes:l?.buffer_after_minutes||0,form:l?.form||{version:1,fields:[]},service_id:l?.service_id??null,push_connection_id:l?.push_connection_id??null,co_host_ids:l?.co_host_ids??[],location:gI(l?.location??null)},M=r=>{let{location:i,errors:a}=_I(r.location);if(Object.keys(a).length>0){A(a);return}A({});let{location:o,...s}=r,c={...s,location:i};if(e===`create`)S.mutate(c,{onSuccess:n,onError:e=>{let t=e;t.status===409&&t.code===`SLUG_TAKEN`&&x.invalidateQueries({queryKey:Y.slugAvailableAll()})}});else if(t){let{slug:e,co_host_ids:r,...i}=c,a=y.current??[],o=(r??[]).length===a.length&&(r??[]).every((e,t)=>e===a[t])?i:{...i,co_host_ids:r};C.mutate({id:t,input:o},{onSuccess:n})}},N=()=>{t&&w.mutate(t,{onSuccess:n})},ie=e=>{D(e.name);let{showWhen:t,...n}=e;T.mutate(n,{onSuccess:()=>{k(t=>[...t,e.name]),D(null)},onError:()=>D(null)})}
121,[ae,oe]=(0,L.useState)(``),[P,F]=(0,L.useState)(``);(0,L.useEffect)(()=>{let e=setTimeout(()=>F(ae),400);return()=>clearTimeout(e)},[ae]);let I=e===`create`&&DI(ae)===`ok`,{data:se}=dt(ste(I?P:``)),ce=(0,L.useMemo)(()=>I?P!==ae||!se?`checking`:se.available?`available`:`taken`:`idle`,[I,ae,P,se]),le={},ue={},de=null;if(te){le=YC(te,o),ue=ZC(te),de=XC(te,o);let e=te;e.status===409&&e.code===`SLUG_TAKEN`&&(le={...le,slug:`You already have a link with that URL.`})}let fe=a!==void 0&&e===`create`&&jo(te)?(0,R.jsx)(Lj,{title:o(`booking.links.limit.title`),description:o(`errors.LINK_LIMIT_REACHED`),action:a}):null,pe=typeof window<`u`&&window.location!==void 0?window.location.origin:``,me=s.handle||``;if(e===`create`&&(p.isLoading||h.isLoading))return(0,R.jsx)(`div`,{className:`max-w-2xl py-12 text-center text-muted-foreground`,children:`Loadingâ¦`});if(e===`edit`&&!l)return(0,R.jsx)(`div`,{className:`max-w-2xl py-12 text-center text-muted-foreground`,children:c.isError?o(`booking.editor.loadFailed`):o(`booking.editor.loading`)});let he={items:u.data??[],loading:u.isPending,error:u.isError?`Your saved inputs could not be loaded.`:null,onManage:i,onSave:ie,savingName:E,savedNames:O,saveError:XC(T.error,o)};return(0,R.jsxs)(`div`,{className:`max-w-2xl`,children:[fe,(0,R.jsx)(Nre,{mode:e,initial:re,onSubmit:M,onCancel:r,onDelete:e===`edit`?N:void 0,pending:j.isPending,deleting:w.isPending,error:fe===null?de:null,fieldErrors:{...le,...ee},formErrors:ue,publicOrigin:pe,handle:me,library:he,services:Pre(d.data??[]),connections:f.data??[],locationPrefilledFrom:ne?.source??void 0,calendarOptions:sI(f.data??[]),accountPhone:m.data?.phone??``,coHostOptions:b,coHostsLockedReason:_?o(`booking.linkForm.coHostsLocked`):void 0,onSlugChange:oe,slugAvailability:ce},e===`edit`?t:`create`)]})}var Fre=Ta({getParentRoute:()=>K7,path:`/booking/links`,component:Ire});function Ire(){let e=oa(),{t}=K();return(0,R.jsx)(Zne,{settingsLink:(0,R.jsx)(Sa,{to:`/booking/settings`,children:`Go to settings`}),upgradeLink:(0,R.jsx)(G,{asChild:!0,size:`sm`,children:(0,R.jsx)(Sa,{to:`/settings/billing`,children:t(`billing.notice.upgrade`)})}),onCreateClick:()=>e({to:`/booking/links/new`}),onEditClick:t=>e({to:`/booking/links/$linkId`,params:{linkId:t}})})}var Lre=Ta({getParentRoute:()=>K7,path:`/booking/links/new`,component:Rre});function Rre(){let e=oa(),{t}=K();return(0,R.jsx)(d9,{mode:`create`,upgradeLink:(0,R.jsx)(G,{asChild:!0,size:`sm`,children:(0,R.jsx)(Sa,{to:`/settings/billing`,children:t(`billing.notice.upgrade`)})}),onSuccess:()=>e({to:`/booking/links`}),onCancel:()=>e({to:`/booking/links`}),onManageInputs:()=>e({to:`/inputs`})})}var f9=Ta({getParentRoute:()=>K7,path:`/booking/links/$linkId`,component:zre});function zre(){let{linkId:e}=f9.useParams(),t=oa();return(0,R.jsx)(d9,{mode:`edit`,linkId:e,onSuccess:()=>t({to:`/booking/links`}),onCancel:()=>t({to:`/booking/links`}),onManageInputs:()=>t({to:`/inputs`})})}function Bre({value:e,onChange:t,state:n,origin:r,error:i,disabled:a=!1}){let{t:o}=K(),s={idle:null,checking:o(`booking.handleField.state.checking`),available:o(`booking.handleField.state.available`),taken:o(`booking.handleField.state.taken`),reserved:o(`booking.handleField.state.reserved`),invalid:o(`booking.handleField.state.invalid`)}[n],c=n===`taken`||n===`reserved`||n===`invalid`,l=i||(c&&s?s:void 0);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsx)(q,{name:`handle`,label:o(`booking.handleField.label`),value:e,onChange:e=>t(e.target.value),placeholder:o(`booking.handleField.placeholder`),error:l,disabled:a,"data-kit":`handle-field`}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[o(`booking.handleField.urlPreview`),(0,R.jsxs)(`div`,{className:`mt-1 font-mono text-sm break-all`,children:[r,`/book/`,e||`â¦`]})]}),s&&!c&&!i&&(0,R.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:s})]})]})}function Vre({handle:e,onHandleChange:t,handleState:n,handleError:r,origin:i,displayName:a,onDisplayNameChange:o,displayNameError:s,displayNameHint:c,tagline:l,onTaglineChange:u,taglineError:d,timezone:f,onTimezoneChange:p,timezones:m,timezoneHint:h}){let{t:g}=K();return(0,R.jsxs)(MC,{className:`p-6`,"data-kit":`booking-profile-fields`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold mb-4`,children:g(`booking.profileFields.title`)}),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(Bre,{value:e,onCh
121ange:t,state:n,origin:i,error:r}),(0,R.jsx)(q,{name:`display_name`,label:g(`booking.profileFields.displayName`),value:a,onChange:e=>o(e.target.value),error:s,hint:c}),(0,R.jsx)(q,{name:`tagline`,label:g(`booking.profileFields.tagline`),value:l,onChange:e=>u(e.target.value),error:d,hint:g(`booking.profileFields.taglineHint`),maxLength:160}),(0,R.jsx)(W7,{timezones:m,value:f,onChange:p,hint:h})]})]})}var p9=_7.filter(e=>e.value!==``),Hre={none:`booking.themeFields.radiusLabels.none`,sm:`booking.themeFields.radiusLabels.sm`,md:`booking.themeFields.radiusLabels.md`,lg:`booking.themeFields.radiusLabels.lg`,full:`booking.themeFields.radiusLabels.full`},Ure={inter:`booking.themeFields.fontLabels.inter`,system:`booking.themeFields.fontLabels.system`,serif:`booking.themeFields.fontLabels.serif`,mono:`booking.themeFields.fontLabels.mono`};function Wre({brandColor:e,onBrandColorChange:t,brandColorError:n,brandColorDark:r,onBrandColorDarkChange:i,brandColorDarkError:a,radius:o,onRadiusChange:s,font:c,onFontChange:l,hideBranding:u,onHideBrandingChange:d,hideBrandingLockedReason:f,hideBrandingAction:p}){let{t:m}=K(),h=(0,L.useId)(),g=f!==void 0;return(0,R.jsxs)(MC,{className:`p-6`,"data-kit":`booking-theme-fields`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold mb-4`,children:m(`booking.themeFields.title`)}),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(v7,{label:m(`booking.themeFields.brandColor`),name:`theme.brandColor`,value:e,onChange:t,error:n,colors:p9,placeholder:`#0f62fe`,allowCustom:!0}),(0,R.jsx)(v7,{label:m(`booking.themeFields.brandColorDark`),name:`theme.brandColorDark`,value:r,onChange:i,error:a,colors:p9,placeholder:`#78a9ff`,allowCustom:!0}),(0,R.jsx)($O,{name:`theme.radius`,label:m(`booking.themeFields.radius`),value:o,onChange:e=>s(e.currentTarget.value),options:hU.map(e=>({label:m(Hre[e]),value:e}))}),(0,R.jsx)($O,{name:`theme.font`,label:m(`booking.themeFields.font`),value:c,onChange:e=>l(e.currentTarget.value),options:gU.map(e=>({label:m(Ure[e]),value:e}))}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`label`,{className:`flex items-center gap-2 ${g?`cursor-not-allowed`:`cursor-pointer`}`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:u,disabled:g,"aria-describedby":g?h:void 0,onChange:e=>d(e.target.checked),className:`h-4 w-4 disabled:opacity-50`}),(0,R.jsx)(`span`,{className:`text-sm font-medium`,children:m(`booking.themeFields.hideBranding`)})]}),g&&(0,R.jsx)(`p`,{id:h,"data-kit":`booking-theme-fields-branding-locked`,className:`text-xs text-muted-foreground`,children:f}),g&&p!==void 0&&(0,R.jsx)(`div`,{"data-kit":`booking-theme-fields-branding-action`,className:`pt-1`,children:p})]})]})]})}function Gre({logo:e,logoError:t,onLogoFileSelected:n,onLogoRemove:r,banner:i,bannerError:a,onBannerFileSelected:o,onBannerRemove:s,lockedReason:c,lockedAction:l}){let{t:u}=K(),d=c!==void 0;return(0,R.jsxs)(MC,{"data-kit":`booking-branding-fields`,children:[(0,R.jsx)(`div`,{className:`flex items-center justify-between mb-6`,children:(0,R.jsx)(`h3`,{className:`text-lg font-semibold`,children:u(`booking.brandingFields.title`)})}),(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsx)(QO,{label:u(`booking.brandingFields.logo`),hint:u(`booking.brandingFields.logoHint`),shape:`square`,fallback:``,value:e??null,error:t,disabled:d,onFileSelected:n,onRemove:r}),(0,R.jsx)(QO,{label:u(`booking.brandingFields.banner`),hint:u(`booking.brandingFields.bannerHint`),shape:`square`,fallback:``,value:i??null,error:a,disabled:d,onFileSelected:o,onRemove:s})]}),d&&(0,R.jsxs)(`div`,{className:`mt-6 pt-6 border-t space-y-3`,children:[(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:c}),l&&(0,R.jsx)(`div`,{children:l})]})]})}var m9=2e3;function h9(e){let t=e.props;return{showAvatar:t.showAvatar===!0,showTagline:t.showTagline===!0}}function Kre(e){return e.props.layout===`list`?`list`:`cards`}function g9(e){let t=e.props.text;return typeof t==`string`?t:``}function qre({sections:e,onChange:t}){let{t:n}=K(),r=e=>n(`booking.sectionsEditor.sectionTypes.${e}`),i=n=>{if(n<=0)return;let r=[...e];[r[n-1],r[n]]=[r[n],r[n-1]],t(r)},a=n=>{if(n>=e.length-1)return;let r=[...e];[r[n],r[n+1]]=[r[n+1],r[n]],t(r)},o=n=>{t(e.filter((e,t)=>
121t!==n))},s=(n,r)=>{let i=[...e],a=i[n];i[n]={...a,props:{...a.props,...r}},t(i)},c=n=>{t([...e,{type:n,props:{}}])},l=new Set(e.map(e=>e.type)),u=_U.filter(e=>!l.has(e));return(0,R.jsxs)(MC,{className:`p-6`,"data-kit":`booking-sections-editor`,children:[(0,R.jsx)(`h2`,{children:n(`booking.sectionsEditor.title`)}),(0,R.jsx)(`div`,{className:`space-y-2`,children:e.map((t,c)=>{let l=r(t.type);return(0,R.jsxs)(`div`,{"data-kit":`booking-sections-editor-row`,"data-section-type":t.type,className:`rounded-md border p-3 space-y-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`flex-1 text-sm font-medium`,children:l}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>i(c),disabled:c===0,"aria-label":n(`booking.sectionsEditor.moveUp`,{section:l}),children:(0,R.jsx)(Ww,{})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>a(c),disabled:c===e.length-1,"aria-label":n(`booking.sectionsEditor.moveDown`,{section:l}),children:(0,R.jsx)(Vw,{})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,onClick:()=>o(c),"aria-label":n(`booking.sectionsEditor.remove`,{section:l}),children:(0,R.jsx)(FT,{})})]}),t.type===`host-header`&&(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(oW,{name:`showAvatar-${c}`,label:n(`booking.sectionsEditor.showAvatar`),checked:h9(t).showAvatar,onCheckedChange:e=>s(c,{showAvatar:e})}),(0,R.jsx)(oW,{name:`showTagline-${c}`,label:n(`booking.sectionsEditor.showTagline`),checked:h9(t).showTagline,onCheckedChange:e=>s(c,{showTagline:e})})]}),t.type===`event-list`&&(0,R.jsx)($O,{name:`layout-${c}`,label:n(`booking.sectionsEditor.layout`),value:Kre(t),onChange:e=>s(c,{layout:e.target.value}),options:[{value:`cards`,label:n(`booking.sectionsEditor.layoutCards`)},{value:`list`,label:n(`booking.sectionsEditor.layoutList`)}]}),t.type===`about`&&(0,R.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,R.jsx)(CA,{name:`aboutText-${c}`,label:n(`booking.sectionsEditor.aboutText`),value:g9(t),onChange:e=>s(c,{text:e.target.value}),maxLength:m9}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`booking.sectionsEditor.aboutRemaining`,{count:m9-g9(t).length})})]})]},c)})}),u.length>0&&(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n(`booking.sectionsEditor.add`)}),(0,R.jsx)(`div`,{"data-kit":`booking-sections-editor-toolbar`,className:`flex flex-wrap gap-2`,children:u.map(e=>(0,R.jsxs)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>c(e),children:[(0,R.jsx)(CT,{}),r(e)]},e))})]})}function Jre({owner:e,showAvatar:t=!1,showTagline:n=!1,logoUrl:r}){return(0,R.jsxs)(`div`,{"data-kit":`booking-host-header`,className:`flex items-center gap-3 pb-6 border-b`,children:[t&&(0,R.jsxs)(UM,{className:`ring-2 ring-[var(--book-brand)] dark:ring-[var(--book-brand-dark)]`,children:[(0,R.jsx)(WM,{src:e.avatar_url||``,alt:e.display_name}),(0,R.jsx)(GM,{children:e.display_name.charAt(0)})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r?(0,R.jsx)(`img`,{src:r,alt:``,"data-kit":`booking-host-header-logo`,className:`h-8 w-auto max-w-32 object-contain`}):null,(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h1`,{className:`text-xl font-semibold`,children:e.display_name}),n&&e.tagline?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-kit":`booking-host-header-tagline`,children:e.tagline}):null]})]})]})}function Yre({children:e}){return(0,R.jsx)(`div`,{"data-kit":`booking-event-list`,className:`py-6`,children:e})}function Xre({text:e}){return(0,R.jsx)(`div`,{"data-kit":`booking-about`,className:`py-6`,children:(0,R.jsx)(`p`,{className:`text-sm whitespace-pre-wrap`,children:e})})}var Zre={"host-header":({section:e,owner:t,logoUrl:n})=>{let r=e.props;return(0,R.jsx)(Jre,{owner:t,showAvatar:r.showAvatar,showTagline:r.showTagline,logoUrl:n})},"event-list":({children:e})=>(0,R.jsx)(Yre,{children:e}),about:({section:e})=>(0,R.jsx)(Xre,{text:e.props.text})};function _9({page:e,owner:t,children:n}){let r=EU(e.theme),i=(r,i)=>{let a=Zre[i.type];return a?(0,R.jsx)(L.Fragment,{children:a({section:i,owner:t,logoUrl:e.branding.logoUrl??null,children:n})},r):null};return(0,R.jsxs)(`div`,{style:{...r,fontFamily:`var(--book-font)`},className:W(`max-w-2xl lg:max-w-5xl mx-auto p-6`),"data-kit":`booking-page`,children:[e.branding.bannerUrl?(0,R.jsx)(`img`,{src:e.branding.bannerUrl,alt:``,"data-kit":`booking-page-banner`,className:`mb-6 block aspect-[4/1] w-full rounded-[var(--book-radius)] object-cover`}):null,e.sections.map((e,t)=>i(t,e)),!e.theme.hideBranding&&(0,R.jsxs)(`div`,{className:`mt-8 pt-6 border-t text-center text-xs text-muted-foreground`,children:[`powered by `,(0,R.jsx)(`span`,{className:`font-semibold`,children:`CalendHub`})]})]})}function Qre({page:e,owner:t}){let{t:n}=K();return(0,R.jsxs)(`div`,{"data-kit":`booking-page-preview`,className:`flex flex-col gap-2`,children:[(0,R.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wide`,children:n(`booking.pagePreview.title`)}),(0,R.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,R.jsx)(_9,{page:e,owner:t,children:(0,R.jsx)(`div`,{"data-kit":`booking-page-preview-placeholder`,className:`rounded-md border border-dashed border-border p-4 text-center text-sm text-muted-foreground`,children:n(`booking.pagePreview.placeholder`)})})})]})}var v9={PAGE_INVALID_COLOR:`booking.settings.pageErrors.PAGE_INVALID_COLOR`,PAGE_INVALID_RADIUS:`booking.settings.pageErrors.PAGE_INVALID_RADIUS`,PAGE_INVALID_FONT:`booking.settings.pageErrors.PAGE_INVALID_FONT`};function $re({upgradeLink:e}){let{t}=K(),{data:n,isLoading:r}=dt(hP()),i=Cte(),{data:a}=eC(),{data:o}=dt(nC()),s=kO(),c=z(),l=dt(HA()).data?.can_remove_branding===!1,u=(0,L.useMemo)(()=>
121rO(),[]),[d,f]=(0,L.useState)(``),[p,m]=(0,L.useState)(``),[h,g]=(0,L.useState)(``),[_,v]=(0,L.useState)(``),[y,b]=(0,L.useState)(`#0f62fe`),[x,S]=(0,L.useState)(`#78a9ff`),[C,w]=(0,L.useState)(`md`),[T,E]=(0,L.useState)(`inter`),[D,O]=(0,L.useState)(!1),[k,ee]=(0,L.useState)([]),[A,j]=(0,L.useState)(null),[te,ne]=(0,L.useState)(!1),[re,M]=(0,L.useState)(),[N,ie]=(0,L.useState)(null),[ae,oe]=(0,L.useState)(!1),[P,F]=(0,L.useState)(),[I,se]=(0,L.useState)({}),ce=n?.page?.theme??{},le={...wU.theme,...ce,preset:vU.includes(ce.preset??``)?ce.preset:wU.theme.preset},ue=n&&(d!==(n.handle||``)||p!==n.display_name||h!==n.tagline||_!==n.timezone||y!==le.brandColor||x!==le.brandColorDark||C!==le.radius||T!==le.font||D!==le.hideBranding||JSON.stringify(k)!==JSON.stringify(n.page?.sections??wU.sections)||te||ae)||!1,de=o?.configured===!0?o.name:``,fe=de||(a?.full_name??``);(0,L.useEffect)(()=>{n&&(f(n.handle||``),m(n.display_name||fe),g(n.tagline??``),v(n.timezone||s.preferredTimezone||kD()||`UTC`),b(le.brandColor),S(le.brandColorDark),w(le.radius),E(le.font),O(le.hideBranding),ee(n.page?.sections??wU.sections),j(n.page?.branding?.logoUrl??null),ie(n.page?.branding?.bannerUrl??null),ne(!1),oe(!1),M(void 0),F(void 0))},[n,fe,s.preferredTimezone]);let[pe,me]=(0,L.useState)(d);(0,L.useEffect)(()=>{let e=setTimeout(()=>{me(d)},400);return()=>clearTimeout(e)},[d]);let{data:he}=dt(ate(pe)),ge=(0,L.useMemo)(()=>{if(d===(n?.handle||``)||!d)return`idle`;let e=kI(d);return e===`ok`?pe!==d||!he?`checking`:he.available?`available`:`taken`:e===`reserved`?`reserved`:`invalid`},[d,pe,he,n?.handle]),_e=s.preferredTimezone!==``&&(n?.timezone??``)!==``&&n?.timezone!==s.preferredTimezone?t(`booking.timezoneHint`,{timezone:s.preferredTimezone}):void 0,ve=de!==``&&p.trim()!==de?t(`booking.settings.displayNameHint`,{name:de}):void 0,ye=async e=>{try{let t=await qO(e);j(t),ne(!0),M(void 0)}catch(e){M(e instanceof zO?BO(e.code):BO(`DECODE_FAILED`))}},be=()=>{j(null),ne(!0),M(void 0)},xe=async e=>{try{let t=await ZO(e);ie(t),oe(!0),F(void 0)}catch(e){F(e instanceof zO?BO(e.code):BO(`DECODE_FAILED`))}},Se=()=>{ie(null),oe(!0),F(void 0)},Ce=async()=>{if(se({}),!mU.test(y)){se(e=>({...e,"theme.brandColor":t(`booking.settings.pageErrors.PAGE_INVALID_COLOR`)}));return}if(!mU.test(x)){se(e=>({...e,"theme.brandColorDark":t(`booking.settings.pageErrors.PAGE_INVALID_COLOR`)}));return}if(re||P||!n)return;let e=a===void 0?{}:{avatar_url:a.avatar_url??``},r={handle:d||null,display_name:p,timezone:_,tagline:h,...e,...te?{logo_data_url:A??``}:{},...ae?{banner_data_url:N??``}:{},page:{version:n.page?.version??wU.version,theme:{preset:le.preset,brandColor:y.toLowerCase(),brandColorDark:x.toLowerCase(),radius:C,font:T,hideBranding:D},branding:n.page?.branding??wU.branding,sections:k}};try{await i.mutateAsync(r)}catch(e){let n=e;if(n.status===409&&n.code===`HANDLE_TAKEN`){se({handle:t(`booking.settings.handleTaken`)}),c.invalidateQueries({queryKey:Y.handleAvailableAll()});return}if(n.fields){let e={};for(let[r,i]of Object.entries(n.fields))e[r]=i&&v9[i]?t(v9[i]):i&&[`IMAGE_TOO_LARGE`,`IMAGE_UNSUPPORTED_TYPE`,`IMAGE_INVALID`].includes(i)?t(`errors.${i}`):i||t(`booking.settings.invalidValue`);se(e)}}},we=!l&&D,Te={version:n?.page?.version??wU.version,theme:{preset:le.preset,brandColor:y,brandColorDark:x,radius:C,font:T,hideBranding:we},branding:{...n?.page?.branding??wU.branding,logoUrl:l?null:A,bannerUrl:l?null:N},sections:k},Ee={handle:d,display_name:p,timezone:_,tagline:h,avatar_url:a?.avatar_url??null};return r?(0,R.jsxs)(`div`,{className:`space-y-6 p-6 max-w-2xl`,children:[(0,R.jsx)(TA,{className:`h-8 w-48`}),(0,R.jsx)(TA,{className:`h-12 w-full`}),(0,R.jsx)(TA,{className:`h-12 w-full`}),(0,R.jsx)(TA,{className:`h-12 w-full`})]}):(0,R.jsxs)(`div`,{className:`grid grid-cols-1 items-start gap-6 p-6 lg:grid-cols-[minmax(0,36rem)_minmax(0,1fr)]`,children:[(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsx)(Vre,{handle:d,onHandleChange:e=>{f(e),se(e=>{let t={...e};return delete t.handle,t})},handleState:ge,handleError:I.handle,origin:typeof window<`u`?window.location.origin:``,displayName:p,onDisplayNameChange:m,displayNameError:I.display_name,displayNameHint:ve,tagline:h,onTaglineChange:g,taglineError:I.tagline,timezone:_,onTimezoneChange:v,timezones:u,timezoneHint:_e}),(0,R.jsx)(Wre,{brandColor:y,onBrandColorChange:b,brandColorError:I[`theme.brandColor`],brandColorDark:x,onBrandColorDarkChange:S,brandColorDarkError:I[`theme.brandColorDark`],radius:C,onRadiusChange:w,font:T,onFontChange:E,hideBranding:we,onHideBrandingChange:O,hideBrandingLockedReason:l?t(`booking.themeFields.hideBrandingLocked`):void 0,hideBrandingAction:l?e:void 0}),(0,R.jsx)(Gre,{logo:A,logoError:re??I.logo_data_url,onLogoFileSelected:ye,onLogoRemove:be,banner:N,bannerError:P??I.banner_data_url,onBannerFileSelected:xe,onBannerRemove:Se,lockedReason:l?t(`booking.brandingFields.locked`):void 0,lockedAction:l?e:void 0}),(0,R.jsx)(qre,{sections:k,onChange:ee}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,"data-kit":`booking-settings-actions`,children:[(0,R.jsx)(G,{onClick:Ce,disabled:!ue||i.isPending,className:`bg-primary text-white hover:opacity-90 disabled:opacity-50`,children:i.isPending?t(`booking.settings.saving`):t(`booking.settings.save`)}),i.isSuccess&&!i.isPending&&(0,R.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:t(`common.saved`)})]}),i.isError&&(0,R.jsx)(`div`,{className:`p-3 rounded border border-border bg-destructive text-destructive-foreground`,children:t(`booking.settings.saveFailed`)})]}),(0,R.jsx)(`div`,{className:`lg:sticky lg:top-6`,children:(0,R.jsx)(Qre,{page:Te,owner:Ee})})]})}var eie=Ta({getParentRoute:()=>K7,path:`/booking/settings`,component:tie});function tie(){let{t:e}=K();return(0,R.jsx)($re,{upgradeLink:(0,R.jsx)(G,{asChild:!0,size:`sm`,children:(0,R.jsx)(Sa,{to:`/settings/billing`,children:e(`b
121illing.notice.upgrade`)})})})}function nie({value:e,onValueChange:t,disabled:n}){let{t:r}=K(),i=[{value:`light`,label:r(`preferences.theme.light`)},{value:`dark`,label:r(`preferences.theme.dark`)},{value:`system`,label:r(`preferences.theme.system`)}];return(0,R.jsx)(`div`,{"data-kit":`theme-picker`,children:(0,R.jsx)(Zj,{name:`theme`,label:r(`preferences.theme.label`),hint:r(`preferences.theme.hint`),options:i,value:e,onValueChange:e=>{GT(e)&&t(e)},disabled:n})})}var rie=e=>e===`monday`||e===`sunday`,iie=e=>e===`system`||e===`12h`||e===`24h`,aie=e=>e===`system`||e===`dmy`||e===`mdy`||e===`ymd`;function oie({language:e,onLanguageChange:t,timezones:n,timezone:r,onTimezoneChange:i,weekStart:a,onWeekStartChange:o,timeFormat:s,onTimeFormatChange:c,dateFormat:l,onDateFormatChange:u,saving:d=!1,saved:f=!1,error:p,fieldErrors:m={}}){let{t:h}=K();return(0,R.jsxs)(`div`,{"data-kit":`region-fields`,className:`flex flex-col gap-4`,children:[(0,R.jsx)($O,{name:`language`,label:h(`preferences.region.language.label`),"data-kit":`region-fields-language`,options:[{value:``,label:h(`preferences.region.language.system`)},...SE.map(e=>({value:e,label:e===`en`?wE[e]:h(`preferences.region.language.machineDraft`,{name:wE[e]})}))],value:e,onChange:e=>{let n=e.currentTarget.value;(n===``||CE(n))&&t(n)},error:m.language,disabled:d}),(0,R.jsx)(W7,{timezones:n,value:r,onChange:i,error:m.timezone}),(0,R.jsx)($O,{name:`week_start`,label:h(`preferences.region.weekStart.label`),"data-kit":`region-fields-week-start`,options:[{value:`monday`,label:h(`preferences.region.weekStart.monday`)},{value:`sunday`,label:h(`preferences.region.weekStart.sunday`)}],value:a,onChange:e=>{let t=e.currentTarget.value;rie(t)&&o(t)},error:m.week_start,disabled:d}),(0,R.jsx)($O,{name:`time_format`,label:h(`preferences.region.timeFormat.label`),"data-kit":`region-fields-time-format`,options:[{value:`system`,label:h(`preferences.region.timeFormat.system`)},{value:`12h`,label:h(`preferences.region.timeFormat.h12`)},{value:`24h`,label:h(`preferences.region.timeFormat.h24`)}],value:s,onChange:e=>{let t=e.currentTarget.value;iie(t)&&c(t)},error:m.time_format,disabled:d}),(0,R.jsx)($O,{name:`date_format`,label:h(`preferences.region.dateFormat.label`),"data-kit":`region-fields-date-format`,options:[{value:`system`,label:h(`preferences.region.dateFormat.system`)},{value:`dmy`,label:h(`preferences.region.dateFormat.dmy`)},{value:`mdy`,label:h(`preferences.region.dateFormat.mdy`)},{value:`ymd`,label:h(`preferences.region.dateFormat.ymd`)}],value:l,onChange:e=>{let t=e.currentTarget.value;aie(t)&&u(t)},error:m.date_format,disabled:d}),p&&(0,R.jsx)(`p`,{className:`text-destructive text-sm`,children:p}),f&&!d&&(0,R.jsx)(`p`,{role:`status`,className:`text-muted-foreground text-sm`,children:h(`common.saved`)})]})}var sie=e=>dE.includes(e);function cie({value:e,onValueChange:t,disabled:n=!1}){let{t:r}=K();return(0,R.jsx)($O,{name:`default_view`,label:r(`preferences.defaultView.label`),"data-kit":`default-view-field`,hint:r(`preferences.defaultView.hint`),options:[{value:`dayGridMonth`,label:r(`preferences.defaultView.month`)},{value:`timeGridWeek`,label:r(`preferences.defaultView.week`)},{value:`timeGridDay`,label:r(`preferences.defaultView.day`)},{value:`listWeek`,label:r(`preferences.defaultView.list`)},{value:`listSchedule`,label:r(`preferences.defaultView.schedule`)}],value:e,onChange:e=>{let n=e.currentTarget.value;sie(n)&&t(n)},disabled:n})}function lie({bookingCreated:e,onBookingCreatedChange:t,bookingCancelled:n,onBookingCancelledChange:r,saving:i=!1,saved:a=!1,error:o=null}){let{t:s}=K();return(0,R.jsxs)(`div`,{"data-kit":`notification-toggles`,className:`flex flex-col gap-4`,children:[(0,R.jsx)(oW,{"data-kit":`notification-toggles-created`,name:`notify_booking_created`,label:s(`preferences.notifications.bookingCreated`),checked:e,onCheckedChange:t,disabled:i}),(0,R.jsx)(oW,{"data-kit":`notification-toggles-cancelled`,name:`notify_booking_cancelled`,label:s(`preferences.notifications.bookingCancelled`),checked:n,onCheckedChange:r,disabled:i}),o&&(0,R.jsx)(`p`,{className:`text-destructive text-sm`,children:o}),a&&!i&&(0,R.jsx)(`p`,{role:`status`,className:`text-success text-sm`,children:s(`common.saved`)})]})}function y9(e,t){return{language:e.language??``,timezone:e.timezone||t,weekStart:e.week_start||`monday`,timeFormat:e.time_format||`system`,dateFormat:e.date_format||`system`,notifyBookingCreated:e.n
121otify_booking_created??!0,notifyBookingCancelled:e.notify_booking_cancelled??!0,location:Jk(e.default_location)}}function uie(e,t){let n={};return t.language!==e.language&&(n.language=t.language),t.timezone!==e.timezone&&(n.timezone=t.timezone),t.weekStart!==e.weekStart&&(n.week_start=t.weekStart),t.timeFormat!==e.timeFormat&&(n.time_format=t.timeFormat),t.dateFormat!==e.dateFormat&&(n.date_format=t.dateFormat),t.notifyBookingCreated!==e.notifyBookingCreated&&(n.notify_booking_created=t.notifyBookingCreated),t.notifyBookingCancelled!==e.notifyBookingCancelled&&(n.notify_booking_cancelled=t.notifyBookingCancelled),n}function die(e,t){return JSON.stringify(e.location)!==JSON.stringify(t.location)}function fie(){let{t:e}=K(),t=iE(),n=AO(),r=uE(),i=IO(),a=(0,L.useMemo)(()=>rO(),[]),[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)({});(0,L.useEffect)(()=>{n.data!==void 0&&o===null&&s(y9(n.data,kD()))},[n.data,o]);let u=e=>s(t=>t===null?t:{...t,...e}),d=()=>{if(o===null||n.data===void 0)return;let e=y9(n.data,kD()),t=uie(e,o);if(die(e,o)){let e=$k(o.location,`default_location`);if(Object.keys(e.errors).length>0){l(e.errors);return}t.default_location=e.location}l({}),r.mutate(t)},f=YC(r.error,e),p={...f,...c},m={};for(let[e,t]of Object.entries(uA(p,`default_location`)))m[e]=tk(t);let h=XC(r.error,e)??XC(n.error,e);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,R.jsx)(jN,{title:e(`preferences.title`),description:e(`preferences.description`)}),(0,R.jsx)(`section`,{"aria-labelledby":`prefs-appearance`,children:(0,R.jsxs)(MC,{"data-kit":`preferences-appearance`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(`h2`,{id:`prefs-appearance`,className:`font-semibold leading-none`,children:e(`preferences.sections.appearance`)}),(0,R.jsx)(FC,{children:e(`preferences.deviceOnly`)})]}),(0,R.jsx)(LC,{children:(0,R.jsx)(nie,{value:t,onValueChange:rE})})]})}),(0,R.jsx)(`section`,{"aria-labelledby":`prefs-region`,children:(0,R.jsxs)(MC,{"data-kit":`preferences-region`,children:[(0,R.jsx)(NC,{children:(0,R.jsx)(`h2`,{id:`prefs-region`,className:`font-semibold leading-none`,children:e(`preferences.sections.region`)})}),o===null?null:(0,R.jsx)(LC,{children:(0,R.jsx)(oie,{language:o.language,onLanguageChange:e=>{(e===``||CE(e))&&u({language:e})},timezones:a,timezone:o.timezone,onTimezoneChange:e=>u({timezone:e}),weekStart:o.weekStart,onWeekStartChange:e=>u({weekStart:e}),timeFormat:o.timeFormat,onTimeFormatChange:e=>u({timeFormat:e}),dateFormat:o.dateFormat,onDateFormatChange:e=>u({dateFormat:e}),saving:r.isPending,fieldErrors:f})})]})}),(0,R.jsx)(`section`,{"aria-labelledby":`prefs-default-location`,children:(0,R.jsxs)(MC,{"data-kit":`preferences-default-location`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(`h2`,{id:`prefs-default-location`,className:`font-semibold leading-none`,children:e(`preferences.sections.defaultLocation`)}),(0,R.jsx)(FC,{children:e(`preferences.defaultLocation.description`)})]}),o===null?null:(0,R.jsx)(LC,{children:(0,R.jsx)(l9,{value:o.location,onChange:e=>u({location:e}),typeError:p[`default_location.type`],addressErrors:m,disabled:r.isPending})})]})}),(0,R.jsx)(`section`,{"aria-labelledby":`prefs-calendar`,children:(0,R.jsxs)(MC,{"data-kit":`preferences-calendar`,children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(`h2`,{id:`prefs-calendar`,className:`font-semibold leading-none`,children:e(`preferences.sections.calendar`)}),(0,R.jsx)(FC,{children:e(`preferences.deviceOnly`)})]}),(0,R.jsx)(LC,{children:(0,R.jsx)(cie,{value:i,onValueChange:FO})})]})}),(0,R.jsx)(`section`,{"aria-labelledby":`prefs-notifications`,children:(0,R.jsxs)(MC,{"data-kit":`preferences-notifications`,children:[(0,R.jsx)(NC,{children:(0,R.jsx)(`h2`,{id:`prefs-notifications`,className:`font-semibold leading-none`,children:e(`preferences.sections.notifications`)})}),o===null?null:(0,R.jsx)(LC,{children:(0,R.jsx)(lie,{bookingCreated:o.notifyBookingCreated,onBookingCreatedChange:e=>u({notifyBookingCreated:e}),bookingCancelled:o.notifyBookingCancelled,onBookingCancelledChange:e=>u({notifyBookingCancelled:e}),saving:r.isPending})})]})}),(0,R.jsxs)(`div`,{"data-kit":`preferences-actions`,className:`flex items-center gap-4`,children:[(0,R.jsx)(G,{type:`button`,onClick:d,disabled:o===null||r.isPending,children:r.isPending?e(`common.saving`):e(`common.save`)}),r.isSuccess&&!r.isPending?(0,R.jsx)(`p`,{role:`status`,className:`text-muted-foreground text-sm`,children:e(`common.saved`)}):null,h===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:h})]})]})}var pie=Ta({getParentRoute:()=>yN,path:`/preferences`,component:fie});function mie({links:e,onRemove:t,busyIds:n=[]}){let{t:r}=K();return(0,R.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(`h2`,{className:`text-base font-semibold`,children:r(`team.coHosting.title`)}),e.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r(`team.coHosting.none`)}):(0,R.jsx)(`ul`,{"aria-label":r(`team.coHosting.title`),className:`flex flex-col divide-y rounded-md border`,children:e.map(e=>(0,R.jsxs)(`li`,{"data-kit":`co-hosted-link-item`,className:`flex items-center justify-between gap-4 p-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,R.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.title}),e.ownerName===``?null:(0,R.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:r(`team.coHosting.ownedBy`,{name:e.ownerName})})]}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,disabled:n.includes(e.id),onClick:()=>t(e.id),children:r(`team.coHosting.remove`)})]},e.id))})]})}function hie({onSubmit:e,pending:t=!1,sentTo:n=null,emailError:r,error:i=null}){let{t:a}
121=K(),[o,s]=(0,L.useState)(``),[c,l]=(0,L.useState)(void 0),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(n);n!==f&&(p(n),n!==null&&(s(``),l(void 0),d(!1)));function m(e){return EC(`email`,{email:e,password:``})}function h(t){t.preventDefault();let n=m(o);if(l(n),n!==void 0){let e=t.currentTarget.elements.namedItem(`email`);e instanceof HTMLInputElement&&e.focus();return}d(!1),e(SC(o))}let g=c===void 0?u?void 0:r:a(c.key,c.params);return(0,R.jsxs)(`form`,{onSubmit:h,className:`flex flex-col gap-4`,noValidate:!0,children:[(0,R.jsx)(q,{name:`email`,label:a(`team.invite.email`),hint:a(`team.invite.hint`),type:`email`,autoComplete:`off`,required:!0,value:o,error:g,onBlur:()=>l(m(o)),onChange:e=>{s(e.target.value),d(!0),c!==void 0&&l(m(e.target.value))}}),n===null?null:(0,R.jsx)(`p`,{role:`status`,className:`text-sm`,children:a(`team.invite.sent`,{email:n})}),i===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:i}),(0,R.jsx)(G,{type:`submit`,disabled:t,children:a(t?`team.invite.submitting`:`team.invite.submit`)})]})}function gie({members:e,invites:t,onRemove:n,onRevoke:r,busyIds:i=[]}){let{t:a}=K();return(0,R.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,R.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(`h2`,{className:`text-base font-semibold`,children:a(`team.members.title`)}),(0,R.jsx)(`ul`,{"aria-label":a(`team.members.title`),className:`flex flex-col divide-y rounded-md border`,children:e.map(e=>(0,R.jsxs)(`li`,{"data-kit":`member-list-member`,className:`flex items-center justify-between gap-4 p-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,R.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name.trim()===``?e.email:e.name}),(0,R.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email}),(0,R.jsxs)(`span`,{className:`text-muted-foreground flex gap-2 text-xs`,children:[(0,R.jsx)(`span`,{children:e.role===`owner`?a(`team.members.owner`):a(`team.members.member`)}),(0,R.jsx)(`span`,{children:a(`team.members.joined`,{date:e.joined})})]})]}),e.role===`owner`?null:(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,disabled:i.includes(e.userId),onClick:()=>n(e.userId),children:a(`team.members.remove`)})]},e.userId))})]}),(0,R.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(`h2`,{className:`text-base font-semibold`,children:a(`team.members.pendingTitle`)}),t.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:a(`team.members.pendingNone`)}):(0,R.jsx)(`ul`,{"aria-label":a(`team.members.pendingTitle`),className:`flex flex-col divide-y rounded-md border`,children:t.map(e=>(0,R.jsxs)(`li`,{"data-kit":`member-list-invite`,className:`flex items-center justify-between gap-4 p-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,R.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.email}),(0,R.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:a(`team.members.expires`,{date:e.expires})})]}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,disabled:i.includes(e.id),onClick:()=>r(e.id),children:a(`team.members.revoke`)})]},e.id))})]})]})}function _ie({memberships:e,onLeave:t,busyIds:n=[]}){let{t:r}=K();return(0,R.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(`h2`,{className:`text-base font-semibold`,children:r(`team.memberships.title`)}),e.length===0?(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r(`team.memberships.none`)}):(0,R.jsx)(`ul`,{"aria-label":r(`team.memberships.title`),className:`flex flex-col divide-y rounded-md border`,children:e.map(e=>(0,R.jsxs)(`li`,{"data-kit":`membership-list-item`,className:`flex items-center justify-between gap-4 p-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,R.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),e.ownerName===``?null:(0,R.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:r(`team.memberships.ownedBy`,{name:e.ownerName})}),(0,R.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:r(`team.members.joined`,{date:e.joined})})]}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,disabled:n.includes(e.workspaceId),onClick:()=>t(e.workspaceId),children:r(`team.memberships.leave`)})]},e.workspaceId))})]})}function b9(e,t){return new Intl.DateTimeFormat(t,{dateStyle:`medium`}).format(new Date(e))}function vie({settingsLink:e}){let{t,i18n:n}=K(),r=rC(),i=aC(),a=oC(),o=sC(),s=lC(),c=uC(),l=dC(),u=fC(),d=lte(),f=ute(),[p,m]=(0,L.use
121State)(null),h=e=>b9(e,n.language);function g(){let e=s.error;if(!e)return null;if(ko(e)){if(e.status===429)return t(`team.invite.errors.limit`);if(e.status===502)return t(`team.invite.errors.sendFailed`);if(e.status===422&&`email`in e.fields)return null}return XC(e,t)}function _(e){l.reset(),u.reset(),f.reset(),m(e)}function v(){l.reset(),u.reset(),f.reset(),m(null)}let y=p?.kind===`leave`?u:p?.kind===`unhost`?f:l;function b(){p!==null&&(p.kind===`remove`?l:p.kind===`unhost`?f:u).mutate(p.id,{onSuccess:()=>m(null)})}let x=(i.data??[]).map(e=>({userId:e.user_id,name:`${e.first_name} ${e.last_name}`.trim(),email:e.email,role:e.role,joined:h(e.joined_at)})),S=(a.data??[]).map(e=>({id:e.id,email:e.email,expires:h(e.expires_at)})),C=(o.data??[]).map(e=>({workspaceId:e.workspace_id,name:e.name,ownerName:e.owner_name,joined:h(e.joined_at)})),w=(d.data??[]).map(e=>({id:e.id,title:e.title,ownerName:e.owner_name})),T=XC(c.error,t),E=XC(i.error??a.error,t),D=XC(o.error,t),O=XC(d.error,t);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,R.jsx)(jN,{title:t(`team.title`),description:t(`team.description`)}),(0,R.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,R.jsx)(`h2`,{className:`text-xl font-semibold`,children:t(`team.company.title`)}),r.data===void 0?null:r.data.configured?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(hie,{onSubmit:e=>s.mutate({email:e}),pending:s.isPending,sentTo:s.data?.email??null,emailError:YC(s.error,t).email,error:g()}),i.data===void 0||a.data===void 0?E===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:E}):(0,R.jsx)(gie,{members:x,invites:S,onRemove:e=>{let t=x.find(t=>t.userId===e);_({kind:`remove`,id:e,name:t?.name||t?.email||``})},onRevoke:e=>c.mutate(e),busyIds:c.isPending&&c.variables?[c.variables]:[]}),T===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:T})]}):(0,R.jsxs)(`p`,{className:`text-sm`,children:[t(`team.company.unnamed`),` `,e]})]}),o.data===void 0?D===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:D}):(0,R.jsx)(_ie,{memberships:C,onLeave:e=>{_({kind:`leave`,id:e,name:C.find(t=>t.workspaceId===e)?.name??``})}}),d.data===void 0?O===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:O}):(0,R.jsx)(mie,{links:w,onRemove:e=>{_({kind:`unhost`,id:e,name:w.find(t=>t.id===e)?.title??``})}}),(0,R.jsx)(dY,{open:p!==null,onOpenChange:e=>{e||v()},title:p===null?``:p.kind===`remove`?t(`team.members.removeTitle`,{name:p.name}):p.kind===`unhost`?t(`team.coHosting.removeTitle`,{title:p.name}):t(`team.memberships.leaveTitle`,{name:p.name}),description:p?.kind===`leave`?t(`team.memberships.leaveDescription`):p?.kind===`unhost`?t(`team.coHosting.removeDescription`):t(`team.members.removeDescription`),confirmLabel:p?.kind===`leave`?t(`team.memberships.leave`):p?.kind===`unhost`?t(`team.coHosting.remove`):t(`team.members.remove`),cancelLabel:t(`team.cancel`),destructive:!0,pending:y.isPending,error:XC(y.error,t),onConfirm:b,onCancel:v})]})}function yie({state:e,companyName:t=``,inviterName:n=``,expires:r,signedInAs:i,pending:a=!1,error:o=null,onJoin:s,onNotNow:c,teamLink:l}){let{t:u}=K();return(0,R.jsx)(MC,{className:`w-full max-w-sm`,children:e===`ready`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(NC,{children:[(0,R.jsx)(PC,{role:`heading`,"aria-level":2,className:`text-xl`,children:u(`team.accept.title`,{name:t})}),(0,R.jsx)(FC,{children:n.trim()===``?u(`team.accept.invited`):u(`team.accept.invitedBy`,{name:n})})]}),(0,R.jsxs)(LC,{className:`flex flex-col gap-3 text-sm`,children:[i===void 0?null:(0,R.jsx)(`p`,{children:u(`team.accept.signedInAs`,{email:i})}),r===void 0?null:(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:u(`team.accept.expires`,{date:r})}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-kit":`invite-accept-co-host-notice`,children:u(`team.accept.coHostNotice`)}),o===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:o})]}),(0,R.jsxs)(RC,{className:`gap-2`,children:[(0,R.jsx)(G,{type:`button`,disabled:a,onClick:()=>s(),children:u(a?`team.accept.joining`:`team.accept.join`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:()=>c(),children:u(`team.accept.notNow`)})]})]}):(0,R.jsx)(LC,{className:`flex flex-col gap-4 text-sm`,children:e===`loading`?(0,R.jsx)(`p`,{role:`status`,children:u(`team.accept.loading`)}
121):e===`invalid`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{role:`alert`,children:u(`team.accept.invalid`)}),l]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{role:`status`,children:u(`team.accept.alreadyMember`)}),l]})})})}function bie({token:e,onJoined:t,onNotNow:n,teamLink:r}){let{t:i,i18n:a}=K(),o=cC(e),s=pC(),{data:c}=eC(),l=ko(s.error)?s.error.code:null,u=e===null||o.isError?`invalid`:o.data===void 0?`loading`:l===`ALREADY_MEMBER`?`already-member`:l===`INVITE_INVALID`?`invalid`:`ready`;function d(){e!==null&&s.mutate(e,{onSuccess:()=>t()})}return(0,R.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,R.jsx)(jN,{title:i(`team.title`)}),(0,R.jsx)(yie,{state:u,companyName:o.data?.name,inviterName:o.data?.inviter_name,expires:o.data===void 0?void 0:b9(o.data.expires_at,a.language),signedInAs:c?.email,pending:s.isPending,error:XC(s.error,i),onJoin:d,onNotNow:n,teamLink:r})]})}var xie=Ta({getParentRoute:()=>yN,path:`/team`,component:Sie});function Sie(){let{t:e}=K();return(0,R.jsx)(vie,{settingsLink:(0,R.jsx)(Sa,{to:`/settings/general`,className:`text-primary underline`,children:e(`team.company.openSettings`)})})}function Cie(e){let t=e.token;return{token:typeof t==`string`&&t.length>0&&t.length<=256?t:void 0}}var x9=Ta({getParentRoute:()=>yN,path:`/invite`,validateSearch:Cie,component:wie});function wie(){let{t:e}=K(),t=oa(),{token:n}=x9.useSearch(),[r]=(0,L.useState)(n??null);return(0,L.useEffect)(()=>{n!==void 0&&t({to:`/invite`,search:{},replace:!0})},[n,t]),(0,R.jsx)(bie,{token:r,onJoined:()=>void t({to:`/team`}),onNotNow:()=>void t({to:`/dashboard`}),teamLink:(0,R.jsx)(Sa,{to:`/team`,className:`text-primary underline`,children:e(`team.accept.toTeam`)})})}var S9={all:[`workflows`],list:()=>[`workflows`,`list`]},C9=`/api/v1/calendar/workflows`,w9=`https://api.calendhub.com`;function Tie(e){return B(C9,{baseUrl:w9,signal:e})}function Eie(e){return B(C9,{baseUrl:w9,method:`POST`,body:e})}function Die(e,t){return B(`${C9}/${encodeURIComponent(e)}`,{baseUrl:w9,method:`PATCH`,body:{enabled:t}})}function Oie(e){return B(`${C9}/${encodeURIComponent(e)}`,{baseUrl:w9,method:`DELETE`})}function kie(){return pt({queryKey:S9.list(),queryFn:({signal:e})=>Tie(e),enabled:Do().status!==`anonymous`})}function Aie(){let e=z();return mt({mutationFn:e=>Eie(e),onSuccess:()=>e.invalidateQueries({queryKey:S9.all})})}function jie(){let e=z();return mt({mutationFn:e=>Die(e.id,e.enabled),onSuccess:()=>e.invalidateQueries({queryKey:S9.all})})}function Mie(){let e=z();return mt({mutationFn:e=>Oie(e),onSuccess:()=>e.invalidateQueries({queryKey:S9.all})})}function Nie({options:e,submitting:t,error:n,onSubmit:r}){let{t:i}
121=K(),[a,o]=(0,L.useState)(``),[s,c]=(0,L.useState)(``),[l,u]=(0,L.useState)(!1),d=[{value:``,label:i(`workflows.builder.choose`)},...e.map(e=>({value:e.id,label:e.label}))],f=l?i(`workflows.builder.sameCalendar`):n;function p(e){if(e.preventDefault(),a===s){u(!0);return}r(a,s)}return(0,R.jsxs)(`form`,{"data-kit":`workflow-builder`,className:`flex flex-col gap-4`,onSubmit:p,children:[(0,R.jsx)($O,{name:`source`,label:i(`workflows.builder.when`),options:d,value:a,onChange:e=>{o(e.target.value),u(!1)}}),(0,R.jsx)($O,{name:`target`,label:i(`workflows.builder.then`),options:d,value:s,onChange:e=>{c(e.target.value),u(!1)}}),f===void 0?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:f}),(0,R.jsx)(G,{type:`submit`,disabled:t||a===``||s===``,children:i(`workflows.builder.submit`)})]})}function Pie({source:e,target:t,state:n,blockCount:r,hasError:i,pending:a=!1,onEnabledChange:o,onDelete:s}){let{t:c}=K(),l=n===`on`,u=n===`off`;return(0,R.jsx)(MC,{"data-kit":`workflow-card`,className:`gap-3 py-4`,children:(0,R.jsxs)(LC,{className:`flex flex-col gap-3`,children:[(0,R.jsx)(PC,{role:`heading`,"aria-level":3,className:`text-sm`,children:c(`workflows.card.title`,{source:e,target:t})}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[l?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(OA,{variant:`secondary`,children:c(`workflows.card.on`)}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:c(`workflows.card.blocks`,{count:r})})]}):null,u?(0,R.jsx)(OA,{variant:`outline`,children:c(`workflows.card.off`)}):null,n===`paused-plan`?(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:c(`workflows.card.pausedPlan`)}):null,n===`paused-connection`?(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:c(`workflows.card.pausedConnection`)}):null]}),i&&l?(0,R.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:c(`workflows.card.error`)}):null,(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,disabled:a,onClick:()=>o(u),children:c(u?`workflows.card.turnOn`:`workflows.card.turnOff`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,disabled:a,onClick:()=>s(),children:c(`workflows.card.delete`)})]})]})})}function Fie(e){return e.enabled?e.paused_reason===`plan`?`paused-plan`:e.paused_reason===`connection`?`paused-connection`:`on`:`off`}function Iie({upgradeLink:e,integrationsLink:t}){let{t:n}=K(),r=dt(kie()),i=dt(HA()),a=dt(qF()),o=pI(),s=Aie(),c=jie(),l=Mie(),[u,d]=(0,L.useState)(null),[f,p]=(0,L.use
121State)(0),m=o.filter(e=>e.id!==``&&e.attachable).map(e=>({id:e.id,label:e.label})),h=e=>o.find(t=>t.id===e&&t.id!==``)?.label??n(`workflows.disconnected`),g=r.data??[],_=i.data?.limits.max_workflows,v=g.length,y=!i.isPending&&!r.isPending&&!a.isPending,b=XC(r.error,n),x=XC(c.error,n);function S(){l.reset(),d(null)}let C;return C=y?_===0?(0,R.jsx)(Lj,{title:n(`workflows.plan.proTitle`),description:n(`workflows.plan.proDescription`),action:e}):typeof _==`number`&&v>=_?(0,R.jsx)(Lj,{title:n(`workflows.plan.limitTitle`),description:n(`workflows.plan.limitDescription`,{count:_}),action:e}):m.length<2?(0,R.jsx)(Lj,{title:n(`workflows.connect.title`),description:n(`workflows.connect.description`),action:t}):(0,R.jsx)(Nie,{options:m,submitting:s.isPending,error:XC(s.error,n)??void 0,onSubmit:(e,t)=>s.mutate({source_connection_id:e,target_connection_id:t},{onSuccess:()=>p(e=>e+1)})},f):null,(0,R.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,R.jsx)(jN,{title:n(`workflows.title`),description:n(`workflows.description`)}),C,y?(0,R.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[r.data===void 0&&b!==null?(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:b}):null,r.data!==void 0&&v===0?(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:n(`workflows.empty`)}):null,g.map(e=>(0,R.jsx)(Pie,{source:h(e.source_connection_id),target:h(e.target_connection_id),state:Fie(e),blockCount:e.block_count,hasError:e.last_error!==``,pending:c.isPending&&c.variables?.id===e.id||l.isPending&&l.variables===e.id,onEnabledChange:t=>c.mutate({id:e.id,enabled:t}),onDelete:()=>d(e)},e.id)),x===null?null:(0,R.jsx)(`p`,{role:`alert`,className:`text-destructive text-sm`,children:x})]}):null,(0,R.jsx)(dY,{open:u!==null,onOpenChange:e=>{e||S()},title:n(`workflows.delete.title`),description:u===null?``:n(`workflows.delete.description`,{target:h(u.target_connection_id)}),confirmLabel:n(`workflows.delete.confirm`),cancelLabel:n(`workflows.delete.cancel`),destructive:!0,pending:l.isPending,error:XC(l.error,n),onConfirm:()=>{u!==null&&l.mutate(u.id,{onSuccess:()=>d(null)})},onCancel:S})]})}var Lie=Ta({getParentRoute:()=>yN,path:`/workflows`,component:Rie});function Rie(){let{t:e}=K();return(0,R.jsx)(Iie,{upgradeLink:(0,R.jsx)(G,{asChild:!0,size:`sm`,children:(0,R.jsx)(Sa,{to:`/settings/billing`,children:e(`billing.notice.upgrade`)})}),integrationsLink:(0,R.jsx)(Sa,{to:`/integrations`,className:`text-primary underline`,children:e(`workflows.connect.link`)})})}function zie({input:e,onEdit:t,onDelete:n,busy:r=!1}){let{t:i}
121=K(),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(!1);return(0,R.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4`,"data-kit":`input-card`,"data-input-name":e.field.name,children:[(0,R.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(`h3`,{className:`min-w-0 truncate text-base font-medium`,children:e.field.label||e.field.name}),(0,R.jsx)(OA,{variant:`outline`,children:e.field.type}),e.field.required&&(0,R.jsx)(OA,{variant:`secondary`,children:i(`inputs.card.required`)}),e.field.hidden&&(0,R.jsx)(OA,{variant:`outline`,children:i(`inputs.card.hidden`)})]})}),(0,R.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[(0,R.jsx)(G,{onClick:()=>c(e=>!e),variant:`outline`,size:`icon-sm`,"aria-label":s?`Hide preview`:`Show preview`,title:s?`Hide preview`:`Show preview`,"aria-expanded":s,"data-kit":`input-card-preview-toggle`,children:s?(0,R.jsx)(rT,{className:`size-4 text-emerald-600 dark:text-emerald-400`}):(0,R.jsx)(iT,{className:`size-4 text-emerald-600 dark:text-emerald-400`})}),(0,R.jsx)(G,{onClick:t,disabled:r,variant:`outline`,size:`icon-sm`,"aria-label":i(`inputs.card.edit`),title:i(`inputs.card.edit`),children:(0,R.jsx)(bT,{className:`size-4 text-blue-600 dark:text-blue-400`})}),(0,R.jsx)(G,{onClick:()=>o(!0),disabled:r,variant:`outline`,size:`icon-sm`,"aria-label":i(`inputs.card.delete`),title:i(`inputs.card.delete`),"data-kit":`input-card-delete`,children:(0,R.jsx)(FT,{className:`size-4 text-destructive`})})]})]}),s?(0,R.jsx)(`div`,{"data-kit":`input-card-preview`,className:`mt-3 border-t border-border pt-3`,children:(0,R.jsx)(`div`,{className:`max-w-sm`,children:(0,R.jsx)(c9,{field:e.field,name:`preview-${e.id}`,showFlags:!1})})}):null,(0,R.jsx)(dY,{open:a,onOpenChange:o,title:i(`inputs.card.deleteTitle`),description:i(`inputs.card.deleteDescription`),confirmLabel:i(`inputs.card.delete`),destructive:!0,pending:r,onConfirm:()=>{n(),o(!1)},onCancel:()=>o(!1)})]})}function Bie({onCreateClick:e,onEditClick:t}){let{t:n}=K(),{data:r}=ft(_P()),i=xP(),a=e=>{i.mutate(e)};return(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4`,children:[(0,R.jsx)(jN,{title:n(`inputs.title`),description:n(`inputs.description`)}),r.length===0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`flex gap-2`,children:(0,R.jsxs)(G,{onClick:e,children:[(0,R.jsx)(CT,{}),n(`inputs.newInput`)]})}),(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-4 py-12 text-center`,children:[(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:n(`inputs.empty`)}),(0,R.jsxs)(G,{onClick:e,children:[(0,R.jsx)(CT,{}),n(`inputs.createFirst`)]})]})]}):(0,R.jsx)(J7,{items:r,searchName:`input-search`,searchLabel:n(`inputs.searchLabel`),searchPlaceholder:n(`inputs.searchPlaceholder`),filter:PU,itemKey:e=>e.id,fill:!0,gridClassName:`md:grid-cols-2`,action:(0,R.jsxs)(G,{onClick:e,children:[(0,R.jsx)(CT,{}),n(`inputs.newInput`)]}),renderEmpty:e=>(0,R.jsx)(`div`,{className:`flex flex-col items-center justify-center py-12`,"data-kit":`inputs-search-empty`,children:(0,R.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,R.jsx)(`h2`,{className:`text-xl font-semibold`,children:n(`inputs.noMatch`,{query:e})}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:n(`inputs.noMatchHint`)})]})}),renderItem:e=>(0,R.jsx)(zie,{input:e,onEdit:()=>t(e.id),onDelete:()=>a(e.id),busy:i.isPending})})]})}function Vie({mode:e,initial:t,onSubmit:n,onCancel:r,onDelete:i,pending:a=!1,deleting:o=!1,error:s,fieldErrors:c={}}){let{t:l}
121=K(),[u,d]=(0,L.useState)(t),[f,p]=(0,L.useState)(!1),[m,h]=(0,L.useState)(!1),g=e=>{e.preventDefault(),p(!0),n(u)},_={...f?Object.fromEntries(PW(u).map(e=>[e.path,e.code])):{},...c};return(0,R.jsxs)(`form`,{onSubmit:g,"data-kit":`input-form`,className:`space-y-6`,children:[(0,R.jsxs)(`div`,{className:`grid gap-6 md:grid-cols-2`,children:[(0,R.jsx)(s9,{value:u,onChange:d,errors:_,disabled:a||o,deriveNameFromLabel:e===`create`}),(0,R.jsxs)(`div`,{"data-kit":`input-form-preview`,className:`space-y-3`,children:[(0,R.jsx)(`h3`,{className:`text-lg font-medium`,children:l(`inputs.form.preview`)}),(0,R.jsx)(c9,{field:u,name:`preview`})]})]}),s&&(0,R.jsx)(`div`,{className:`rounded-lg border border-destructive bg-destructive/10 p-4`,children:(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:s})}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`submit`,disabled:a||o,children:l(a?`inputs.form.saving`:`inputs.form.save`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:r,disabled:a||o,children:l(`inputs.form.cancel`)}),e===`edit`&&i&&(0,R.jsx)(G,{type:`button`,variant:`ghost`,className:`text-destructive hover:text-destructive`,onClick:()=>h(!0),disabled:a||o,children:l(`inputs.form.delete`)})]}),e===`edit`&&i&&(0,R.jsx)(dY,{open:m,onOpenChange:h,title:l(`inputs.card.deleteTitle`),description:l(`inputs.card.deleteDescription`),confirmLabel:l(`inputs.card.delete`),destructive:!0,pending:o,onConfirm:i,onCancel:()=>h(!1)})]})}function T9({mode:e,inputId:t,onSuccess:n,onCancel:r}){let{t:i}=K(),a=e===`create`,{data:o,isLoading:s}=dt({...dte(t||``),enabled:e===`edit`&&!!t}),c=bP(),l=Tte(),u=xP(),d=a?FW(`text`,``):o?.field||FW(`text`,``),f=e=>{a?c.mutate(e,{onSuccess:n}):t&&l.mutate({id:t,field:e},{onSuccess:n})},p=()=>{t&&u.mutate(t,{onSuccess:n})},m={...YC(c.error,i),...YC(l.error,i)},h=XC(c.error,i)||XC(l.error,i);return!a&&s?(0,R.jsx)(`div`,{className:`text-center py-12`,children:i(`inputs.loading`)}):!a&&!o?(0,R.jsx)(`div`,{className:`text-center py-12`,children:i(`inputs.loadFailed`)}):(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsx)(jN,{title:i(a?`inputs.newInput`:`inputs.editInput`)}),(0,R.jsx)(Vie,{mode:e,initial:d,onSubmit:f,onCancel:r,onDelete:p,pending:c.isPending||l.isPending,deleting:u.isPending,error:h,fieldErrors:m})]})}var Hie=Ta({getParentRoute:()=>yN,path:`/inputs`,component:Uie});function Uie(){let e=oa();return(0,R.jsx)(Bie,{onCreateClick:()=>e({to:`/inputs/new`}),onEditClick:t=>e({to:`/inputs/$inputId`,params:{inputId:t}})})}var Wie=Ta({getParentRoute:()=>yN,path:`/inputs/new`,component:Gie});function Gie(){let e=oa();return(0,R.jsx)(T9,{mode:`create`,onSuccess:()=>e({to:`/inputs`}),onCancel:()=>e({to:`/inputs`})})}var E9=Ta({getParentRoute:()=>yN,path:`/inputs/$inputId`,component:Kie});function Kie(){let{inputId:e}=E9.useParams(),t=oa();return(0,R.jsx)(T9,{mode:`edit`,inputId:e,onSuccess:()=>t({to:`/inputs`}),onCancel:()=>t({to:`/inputs`})})}var D9=Ta({getParentRoute:()=>yN,id:`_settings`,component:qie});function qie(){let e=Xa({select:e=>e.location.pathname});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jN,{title:`Settings`,description:`Your workspace â how it presents itself, and your plan.`}),(0,R.jsx)(G7,{items:[{id:`general`,label:`General`,isActive:e===`/settings/general`,link:(0,R.jsx)(Sa,{to:`/settings/general`,children:`General`})},{id:`billing`,label:`Billing`,isActive:e===`/settings/billing`,link:(0,R.jsx)(Sa,{to:`/settings/billing`,children:`Billing`})}]}),(0,R.jsx)(Ra,{})]})}var Jie=Ta({getParentRoute:()=>D9,path:`/settings`,beforeLoad:()=>{throw Jn({to:`/settings/general`})}}),Yie=Ta({getParentRoute:()=>D9,path:`/settings/general`,component:EA}),Xie=Ta({getParentRoute:()=>D9,path:`/settings/billing`,component:Ij}),O9=Ta({getParentRoute:()=>yN,id:`_catalog`,component:Zie});function Zie(){let{t:e}=K(),t=Xa({select:e=>e.location.pathname});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(jN,{title:e(`nav.groups.catalog`),description:e(`catalog.heading.description`)}),(0,R.jsx)(G7,{items:[{id:`services`,isActive:t.startsWith(`/catalog/services`),label:e(`nav.services`),link:(0,R.jsx)(Sa,{to:`/catalog/services`,children:e(`nav.services`)}
121)},{id:`products`,isActive:t.startsWith(`/catalog/products`),label:e(`nav.products`),link:(0,R.jsx)(Sa,{to:`/catalog/products`,children:e(`nav.products`)})}]}),(0,R.jsx)(Ra,{})]})}var Qie=Ta({getParentRoute:()=>O9,path:`/catalog`,beforeLoad:()=>{throw Jn({to:`/catalog/services`})}}),$ie={service:`catalog.card.deleteServiceTitle`,product:`catalog.card.deleteProductTitle`},eae={service:`catalog.card.deleteServiceConfirm`,product:`catalog.card.deleteProductConfirm`};function k9({kind:e,title:t,priceLabel:n,meta:r,category:i,photoUrl:a,archived:o,onEdit:s,onArchiveToggle:c,onDelete:l,busy:u=!1}){let{t:d}=K(),[f,p]=(0,L.useState)(!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`rounded-lg border border-border bg-card p-4`,"data-kit":`catalog-item-card`,children:(0,R.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[a?(0,R.jsx)(`img`,{src:a,alt:``,"data-kit":`catalog-item-card-photo`,className:`size-12 shrink-0 rounded-md object-cover`}):null,(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(`h3`,{className:`min-w-0 truncate font-semibold`,children:t}),i?(0,R.jsx)(OA,{variant:`outline`,children:i}):null,o?(0,R.jsx)(OA,{variant:`secondary`,children:d(`catalog.card.archived`)}):null]}),(0,R.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-x-2 text-sm text-muted-foreground`,children:[(0,R.jsx)(`span`,{children:n}),r?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,R.jsx)(`span`,{"data-kit":`catalog-item-card-meta`,children:r})]}):null]})]}),(0,R.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":d(`catalog.card.edit`),title:d(`catalog.card.edit`),"data-kit":`catalog-item-card-edit`,onClick:()=>s(),disabled:u,children:(0,R.jsx)(bT,{className:`text-blue-600 dark:text-blue-400`})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":d(o?`catalog.card.unarchive`:`catalog.card.archive`),title:d(o?`catalog.card.unarchive`:`catalog.card.archive`),"data-kit":`catalog-item-card-archive`,onClick:()=>c(),disabled:u,children:o?(0,R.jsx)(kw,{className:`text-warning`}):(0,R.jsx)(Aw,{className:`text-warning`})}),(0,R.jsx)(G,{type:`button`,variant:`outline`,size:`icon-sm`,"aria-label":d(`catalog.card.delete`),title:d(`catalog.card.delete`),"data-kit":`catalog-item-card-delete`,onClick:()=>p(!0),disabled:u,children:(0,R.jsx)(FT,{className:`text-destructive`})})]})]})}),(0,R.jsx)(dY,{open:f,onOpenChange:p,title:d($ie[e]),description:d(`catalog.card.deleteDescription`),confirmLabel:d(eae[e]),cancelLabel:d(`catalog.card.cancel`),destructive:!0,pending:u,onConfirm:()=>{l(),p(!1)},onCancel:()=>p(!1)})]})}function tae(e,t){if(t!==void 0)return t.kind===`key`?e(t.key):t.text}function nae({onCreateClick:e,onEditClick:t}){let{t:n}=K(),{data:r}
121=ft(e9()),[i,a]=(0,L.useState)(!1),o=bre(),s=xre(),c=r9(),l=o.isPending||s.isPending||c.isPending;return r.length===0?(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center py-12`,"data-kit":`catalog-services-empty`,children:(0,R.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,R.jsx)(`h2`,{className:`text-2xl font-semibold`,children:n(`catalog.services.emptyTitle`)}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:n(`catalog.services.emptyBody`)}),(0,R.jsx)(`div`,{className:`pt-4`,children:(0,R.jsxs)(G,{onClick:e,children:[(0,R.jsx)(CT,{}),n(`catalog.services.create`)]})})]})}):(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,"data-kit":`catalog-services-screen`,children:(0,R.jsx)(J7,{items:r,searchName:`service-search`,searchLabel:n(`catalog.services.searchLabel`),searchPlaceholder:n(`catalog.services.searchPlaceholder`),filter:(e,t)=>oA(e,t,i),resetKey:i,itemKey:e=>e.id,fill:!0,gridClassName:`md:grid-cols-2`,controls:(0,R.jsx)(oW,{name:`show-archived`,label:n(`catalog.list.showArchived`),checked:i,onCheckedChange:a}),action:(0,R.jsxs)(G,{onClick:e,children:[(0,R.jsx)(CT,{}),n(`catalog.services.create`)]}),renderEmpty:e=>e===``?(0,R.jsx)(`div`,{className:`flex flex-col items-center justify-center py-12`,"data-kit":`catalog-archived-empty`,children:(0,R.jsx)(`div`,{className:`text-center space-y-2`,children:(0,R.jsx)(`h2`,{className:`text-xl font-semibold`,children:n(`catalog.services.archivedEmpty`,{archivedCount:r.filter(e=>e.archived_at!==null).length})})})}):(0,R.jsx)(`div`,{className:`flex flex-col items-center justify-center py-12`,"data-kit":`catalog-services-search-empty`,children:(0,R.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,R.jsx)(`h2`,{className:`text-xl font-semibold`,children:n(`catalog.services.searchEmptyTitle`,{query:e})}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:n(`catalog.services.searchEmptyBody`)})]})}),renderItem:e=>(0,R.jsx)(k9,{kind:`service`,title:e.title,priceLabel:hk(e.price),meta:[e.duration_minutes===null?void 0:n(`catalog.services.duration`,{minutes:e.duration_minutes}),tae(n,lA(e.location))].filter(e=>e!==void 0).join(` · `)||void 0,category:e.category===``?void 0:e.category,photoUrl:e.photo_url??null,archived:e.archived_at!==null,onEdit:()=>t(e.id),onArchiveToggle:()=>e.archived_at===null?o.mutate(e.id):s.mutate(e.id),onDelete:()=>c.mutate(e.id),busy:l})})})}function rae(e,t){if(t!==void 0)return t.kind===`key`?e(t.key):t.text}function iae({onCreateClick:e,onEditClick:t}){let{t:n}=K(),{data:r}
121=ft(gre()),[i,a]=(0,L.useState)(!1),o=wre(),s=Tre(),c=a9(),l=o.isPending||s.isPending||c.isPending;return r.length===0?(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center py-12`,"data-kit":`catalog-products-empty`,children:(0,R.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,R.jsx)(`h2`,{className:`text-2xl font-semibold`,children:n(`catalog.products.emptyTitle`)}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:n(`catalog.products.emptyBody`)}),(0,R.jsx)(`div`,{className:`pt-4`,children:(0,R.jsxs)(G,{onClick:e,children:[(0,R.jsx)(CT,{}),n(`catalog.products.create`)]})})]})}):(0,R.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,"data-kit":`catalog-products-screen`,children:(0,R.jsx)(J7,{items:r,searchName:`product-search`,searchLabel:n(`catalog.products.searchLabel`),searchPlaceholder:n(`catalog.products.searchPlaceholder`),filter:(e,t)=>sA(e,t,i),resetKey:i,itemKey:e=>e.id,fill:!0,gridClassName:`md:grid-cols-2`,controls:(0,R.jsx)(oW,{name:`show-archived`,label:n(`catalog.list.showArchived`),checked:i,onCheckedChange:a}),action:(0,R.jsxs)(G,{onClick:e,children:[(0,R.jsx)(CT,{}),n(`catalog.products.create`)]}),renderEmpty:e=>e===``?(0,R.jsx)(`div`,{className:`flex flex-col items-center justify-center py-12`,"data-kit":`catalog-archived-empty`,children:(0,R.jsx)(`div`,{className:`text-center space-y-2`,children:(0,R.jsx)(`h2`,{className:`text-xl font-semibold`,children:n(`catalog.products.archivedEmpty`,{archivedCount:r.filter(e=>e.archived_at!==null).length})})})}):(0,R.jsx)(`div`,{className:`flex flex-col items-center justify-center py-12`,"data-kit":`catalog-products-search-empty`,children:(0,R.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,R.jsx)(`h2`,{className:`text-xl font-semibold`,children:n(`catalog.products.searchEmptyTitle`,{query:e})}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:n(`catalog.products.searchEmptyBody`)})]})}),renderItem:e=>(0,R.jsx)(k9,{kind:`product`,title:e.name,priceLabel:hk(e.price),meta:[n(`catalog.products.stock`,{stock:e.stock}),rae(n,lA(e.location))].filter(e=>e!==void 0).join(` · `),category:e.category===``?void 0:e.category,photoUrl:e.photo_url??null,archived:e.archived_at!==null,onEdit:()=>t(e.id),onArchiveToggle:()=>e.archived_at===null?o.mutate(e.id):s.mutate(e.id),onDelete:()=>c.mutate(e.id),busy:l})})})}function A9({value:e,onChange:t,suggestions:n,error:r,disabled:i}){let{t:a}=K(),o=(0,L.useId)();return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{name:`category`,label:a(`catalog.category.label`),value:e,onChange:e=>t(e.target.value),list:o,placeholder:a(`catalog.category.placeholder`),error:r,disabled:i,"data-kit":`category-field`}),(0,R.jsx)(`datalist`,{id:o,"data-kit":`category-field-list`,children:n.map(e=>(0,R.jsx)(`option`,{value:e},e))})]})}function aae({value:e,onChange:t,error:n,disabled:r,label:i,name:a=`currency`}){let{t:o}=K(),s=[{label:o(`catalog.currency.common`),options:ak.map(e=>({value:e,label:oae(e)}))},{label:o(`catalog.currency.all`),options:ik.map(e=>({value:e.code,label:`${e.code} â ${e.name}`}))}];return(0,R.jsx)($O,{name:a,label:i??o(`catalog.currency.label`),options:[],groups:s,value:e,onChange:e=>t(e.currentTarget.value),error:n,disabled:r,"data-kit":`currency-select`})}function oae(e){let t=ik.find(t=>t.code===e);return t===void 0?e:`${t.code} â ${t.name}`}function j9({amount:e,currency:t,onAmountChange:n,onCurrencyChange:r,amountError:i,currencyError:a,disabled:o,label:s}){let{t:c}=K(),l=ck(t),u=l===0?c(`catalog.money.wholeNumbersOnly`):c(`catalog.money.decimalPlaces`,{places:l});return(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-kit":`money-field`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:s??c(`catalog.money.price`)}),(0,R.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,R.jsx)(q,{name:`price_amount`,label:c(`catalog.money.amount`),value:e,onChange:e=>n(e.target.value),inputMode:`decimal`,placeholder:c(`catalog.money.amountPlaceholder`),hint:u,error:i,disabled:o}),(0,R.jsx)(aae,{value:t,onChange:r,error:a,disabled:o})]})]})}function sae({mode:e,initial:t,onSubmit:n,onCancel:r,onDelete:i,pending:a=!1,deleting:o=!1,error:s,fieldErrors:c={},categorySuggestions:l=[],prefilledFrom:u,photo:d,photoError:f,onPhotoFileSelected:p,onPhotoRemove:m}){let{t:h}
121=K(),[g,_]=(0,L.useState)(t),[v,y]=(0,L.useState)(!1),b=a||o,x=dA(c);return(0,R.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),n(g)},className:`space-y-6`,"data-kit":`service-form`,children:[s?(0,R.jsx)(`div`,{className:`rounded-lg border border-destructive/50 bg-destructive/5 p-4`,children:(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:s})}):null,(0,R.jsx)(q,{name:`title`,label:h(`catalog.service.title`),value:g.title,onChange:e=>_(t=>({...t,title:e.target.value})),placeholder:h(`catalog.service.titlePlaceholder`),error:c.title,disabled:b}),(0,R.jsx)(CA,{name:`description`,label:h(`catalog.form.description`),value:g.description,onChange:e=>_(t=>({...t,description:e.target.value})),placeholder:h(`catalog.form.descriptionPlaceholder`),error:c.description,disabled:b}),p?(0,R.jsx)(QO,{label:h(`catalog.form.photo`),hint:h(`catalog.form.photoHint`),shape:`square`,fallback:``,value:d??null,error:f??c.photo_data_url,disabled:b,onFileSelected:p,onRemove:m??(()=>void 0)}):null,(0,R.jsx)(j9,{amount:g.amount,currency:g.currency,onAmountChange:e=>_(t=>({...t,amount:e})),onCurrencyChange:e=>_(t=>({...t,currency:e})),amountError:c[`price.amount_minor`]??c.price,currencyError:c[`price.currency`],disabled:b}),(0,R.jsx)(q,{name:`duration_minutes`,label:h(`catalog.service.duration`),type:`number`,step:5,min:5,max:nk,value:g.duration_minutes,onChange:e=>_(t=>({...t,duration_minutes:e.target.value})),hint:h(`catalog.service.durationHint`),error:c.duration_minutes,disabled:b}),(0,R.jsx)(A9,{value:g.category,onChange:e=>_(t=>({...t,category:e})),suggestions:l,error:c.category,disabled:b}),(0,R.jsx)(l9,{value:{location_type:g.location_type,address:g.address},onChange:e=>_(t=>({...t,...e})),typeError:c[`location.type`],addressErrors:x,disabled:b,prefilledFrom:u}),v?(0,R.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-destructive/50 bg-destructive/5 p-4`,children:[(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-foreground`,children:h(`catalog.service.deleteWarning`)}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`button`,variant:`destructive`,onClick:()=>{y(!1),i?.()},disabled:o,children:h(`catalog.form.deletePermanently`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:()=>y(!1),disabled:o,children:h(`catalog.form.cancel`)})]})]}):(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`submit`,disabled:b,children:h(a?`catalog.form.saving`:`catalog.form.save`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:r,disabled:b,children:h(`catalog.form.cancel`)}),e===`edit`&&i?(0,R.jsx)(G,{type:`button`,variant:`ghost`,onClick:()=>y(!0),disabled:o,children:h(`catalog.form.delete`)}):null]})]})}function M9({mode:e,serviceId:t,onSuccess:n,onCancel:r}){let{t:i}=K(),{data:a}=ft(t9()),o=rC(),s=AO(),c=dt({...hre(t??``),enabled:e===`edit`&&t!==void 0}),l=c.data,u=vre(),d=yre(),f=r9(),p=e===`create`?u:d,[m,h]=(0,L.use
121State)({}),[g,_]=(0,L.useState)(null),[v,y]=(0,L.useState)(!1),[b,x]=(0,L.useState)(void 0);(0,L.useEffect)(()=>{l&&!v&&_(l.photo_url??null)},[l,v]);let S=async e=>{try{let t=await ZO(e);_(t),y(!0),x(void 0)}catch(e){x(e instanceof zO?BO(e.code):BO(`DECODE_FAILED`))}},C=()=>{_(null),y(!0),x(void 0)},w=r=>{if(b)return;let i=eA(r);if(!i.ok){h(i.errors);return}let a=Ik(i.input);if(a.length>0){let e={};for(let t of a)e[t.path]=tk(t.code);h(e);return}let o=v?{...i.input,photo_data_url:g??``}:i.input;h({}),e===`create`?u.mutate(o,{onSuccess:n}):t!==void 0&&d.mutate({id:t,input:o},{onSuccess:n})},T=()=>{t!==void 0&&f.mutate(t,{onSuccess:n})},E={};for(let[e,t]of Object.entries(YC(p.error)))E[e]=tk(t);let D={};for(let[e,t]of Object.entries({...E,...m}))D[e]=i(t);let O=p.error?XC(p.error):null;if(e===`create`&&(o.isLoading||s.isLoading))return(0,R.jsx)(`div`,{className:`w-full max-w-2xl py-12 text-center text-muted-foreground`,children:i(`catalog.editor.loading`)});if(e===`edit`&&l===void 0)return(0,R.jsx)(`div`,{className:`w-full max-w-2xl py-12 text-center text-muted-foreground`,children:c.isError?i(`catalog.editor.serviceLoadFailed`):i(`catalog.editor.loading`)});let k=e===`create`?_A(s.data?.default_location,o.data?.address,o.data?.coordinates):null,ee=e===`create`||l===void 0?{...Gk(a.currency),...k===null?{}:{location_type:k.location_type,address:k.address}}:Yk(l);return(0,R.jsx)(`div`,{className:`w-full max-w-2xl`,children:(0,R.jsx)(sae,{mode:e,initial:ee,onSubmit:w,onCancel:r,onDelete:e===`edit`?T:void 0,pending:p.isPending,deleting:f.isPending,error:O,fieldErrors:D,categorySuggestions:a.categories,prefilledFrom:k?.source??void 0,photo:g,photoError:b,onPhotoFileSelected:S,onPhotoRemove:C},e===`edit`?t:`create`)})}function cae({mode:e,initial:t,onSubmit:n,onCancel:r,onDelete:i,pending:a=!1,deleting:o=!1,error:s,fieldErrors:c={},categorySuggestions:l=[],prefilledFrom:u,photo:d,photoError:f,onPhotoFileSelected:p,onPhotoRemove:m}){let{t:h}=K(),[g,_]=(0,L.useState)(t),[v,y]=(0,L.useState)(!1),b=a||o,x=dA(c);return(0,R.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),n(g)},className:`space-y-6`,"data-kit":`product-form`,children:[s?(0,R.jsx)(`div`,{className:`rounded-lg border border-destructive/50 bg-destructive/5 p-4`,children:(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:s})}):null,(0,R.jsx)(q,{name:`name`,label:h(`catalog.product.name`),value:g.name,onChange:e=>_(t=>({...t,name:e.target.value})),placeholder:h(`catalog.product.namePlaceholder`),error:c.name,disabled:b}),(0,R.jsx)(CA,{name:`description`,label:h(`catalog.form.description`),value:g.description,onChange:e=>_(t=>({...t,description:e.target.value})),placeholder:h(`catalog.form.descriptionPlaceholder`),error:c.description,disabled:b}),p?(0,R.jsx)(QO,{label:h(`catalog.form.photo`),hint:h(`catalog.form.photoHint`),shape:`square`,fallback:``,value:d??null,error:f??c.photo_data_url,disabled:b,onFileSelected:p,onRemove:m??(()=>void 0)}):null,(0,R.jsx)(j9,{amount:g.amount,currency:g.currency,onAmountChange:e=>_(t=>({...t,amount:e})),onCurrencyChange:e=>_(t=>({...t,currency:e})),amountError:c[`price.amount_minor`]??c.price,currencyError:c[`price.currency`],disabled:b}),(0,R.jsx)(q,{name:`stock`,label:h(`catalog.product.stock`),type:`number`,step:1,min:0,max:rk,value:g.stock,onChange:e=>_(t=>({...t,stock:e.target.value})),hint:h(`catalog.product.stockHint`),error:c.stock,disabled:b}),(0,R.jsx)(A9,{value:g.category,onChange:e=>_(t=>({...t,category:e})),suggestions:l,error:c.category,disabled:b}),(0,R.jsx)(l9,{value:{location_type:g.location_type,address:g.address},onChange:e=>_(t=>({...t,...e})),typeError:c[`location.type`],addressErrors:x,disabled:b,prefilledFrom:u}),v?(0,R.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-destructive/50 bg-destructive/5 p-4`,children:[(0,R.jsx)(`p`,{role:`alert`,className:`text-sm text-foreground`,children:h(`catalog.product.deleteWarning`)}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`button`,variant:`destructive`,onClick:()=>{y(!1),i?.()},disabled:o,children:h(`catalog.form.deletePermanently`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:()=>y(!1),disabled:o,children:h(`catalog.form.cancel`)})]})]}):(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(G,{type:`submit`,disabled:b,children:h(a?`catalog.form.saving`:`catalog.form.save`)}),(0,R.jsx)(G,{type:`button`,variant:`outline`,onClick:r,disabled:b,children:h(`catalog.form.cancel`)}),e===`edit`&&i?(0,R.jsx)(G,{type:`button`,variant:`ghost`,onClick:()=>y(!0),disabled:o,children:h(`catalog.form.delete`)}):null]})]})}function N9({mode:e,productId:t,onSuccess:n,onCancel:r}){let{t:i}=K(),{data:a}=ft(t9()),o=rC(),s=AO(),c=dt({..._re(t??``),enabled:e===`edit`&&t!==void 0}),l=c.data,u=Sre(),d=Cre(),f=a9(),p=e===`create`?u:d,[m,h]=(0,L.use
121State)({}),[g,_]=(0,L.useState)(null),[v,y]=(0,L.useState)(!1),[b,x]=(0,L.useState)(void 0);(0,L.useEffect)(()=>{l&&!v&&_(l.photo_url??null)},[l,v]);let S=async e=>{try{let t=await ZO(e);_(t),y(!0),x(void 0)}catch(e){x(e instanceof zO?BO(e.code):BO(`DECODE_FAILED`))}},C=()=>{_(null),y(!0),x(void 0)},w=r=>{if(b)return;let i=tA(r);if(!i.ok){h(i.errors);return}let a=Bk(i.input);if(a.length>0){let e={};for(let t of a)e[t.path]=tk(t.code);h(e);return}let o=v?{...i.input,photo_data_url:g??``}:i.input;h({}),e===`create`?u.mutate(o,{onSuccess:n}):t!==void 0&&d.mutate({id:t,input:o},{onSuccess:n})},T=()=>{t!==void 0&&f.mutate(t,{onSuccess:n})},E={};for(let[e,t]of Object.entries(YC(p.error)))E[e]=tk(t);let D={};for(let[e,t]of Object.entries({...E,...m}))D[e]=i(t);let O=p.error?XC(p.error):null;if(e===`create`&&(o.isLoading||s.isLoading))return(0,R.jsx)(`div`,{className:`w-full max-w-2xl py-12 text-center text-muted-foreground`,children:i(`catalog.editor.loading`)});if(e===`edit`&&l===void 0)return(0,R.jsx)(`div`,{className:`w-full max-w-2xl py-12 text-center text-muted-foreground`,children:c.isError?i(`catalog.editor.productLoadFailed`):i(`catalog.editor.loading`)});let k=e===`create`?_A(s.data?.default_location,o.data?.address,o.data?.coordinates):null,ee=e===`create`||l===void 0?{...Kk(a.currency),...k===null?{}:{location_type:k.location_type,address:k.address}}:Xk(l);return(0,R.jsx)(`div`,{className:`w-full max-w-2xl`,children:(0,R.jsx)(cae,{mode:e,initial:ee,onSubmit:w,onCancel:r,onDelete:e===`edit`?T:void 0,pending:p.isPending,deleting:f.isPending,error:O,fieldErrors:D,categorySuggestions:a.categories,prefilledFrom:k?.source??void 0,photo:g,photoError:b,onPhotoFileSelected:S,onPhotoRemove:C},e===`edit`?t:`create`)})}var lae=Ta({getParentRoute:()=>O9,path:`/catalog/services`,component:uae});function uae(){let e=oa();return(0,R.jsx)(nae,{onCreateClick:()=>e({to:`/catalog/services/new`}),onEditClick:t=>e({to:`/catalog/services/$serviceId`,params:{serviceId:t}})})}var dae=Ta({getParentRoute:()=>O9,path:`/catalog/services/new`,component:fae});function fae(){let e=oa();return(0,R.jsx)(M9,{mode:`create`,onSuccess:()=>e({to:`/catalog/services`}),onCancel:()=>e({to:`/catalog/services`})})}var P9=Ta({getParentRoute:()=>O9,path:`/catalog/services/$serviceId`,component:pae});function pae(){let{serviceId:e}=P9.useParams(),t=oa();return(0,R.jsx)(M9,{mode:`edit`,serviceId:e,onSuccess:()=>t({to:`/catalog/services`}),onCancel:()=>t({to:`/catalog/services`})})}var mae=Ta({getParentRoute:()=>O9,path:`/catalog/products`,component:hae});function hae(){let e=oa();return(0,R.jsx)(iae,{onCreateClick:()=>e({to:`/catalog/products/new`}),onEditClick:t=>e({to:`/catalog/products/$productId`,params:{productId:t}})})}var gae=Ta({getParentRoute:()=>O9,path:`/catalog/products/new`,component:_ae});function _ae(){let e=oa();return(0,R.jsx)(N9,{mode:`create`,onSuccess:()=>e({to:`/catalog/products`}),onCancel:()=>e({to:`/catalog/products`})})}var F9=Ta({getParentRoute:()=>O9,path:`/catalog/products/$productId`,component:vae});function vae(){let{productId:e}=F9.useParams(),t=oa();return(0,R.jsx)(N9,{mode:`edit`,productId:e,onSuccess:()=>t({to:`/catalog/products`}),onCancel:()=>t({to:`/catalog/products`})})}function yae({links:e,layout:t=`cards`}){return(0,R.jsx)(`div`,{"data-kit":`booking-link-list`,"data-layout":t,className:t===`list`?`divide-y divide-border space-y-0`:`space-y-4`,children:e.map(e=>{let n=(0,R.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsx)(`h3`,{className:`font-semibold text-base text-[var(--book-brand)] dark:text-[var(--book-brand-dark)]`,children:e.title}),t!==`list`&&e.description&&(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.description})]}),(0,R.jsx)(OA,{variant:`secondary`,className:`shrink-0`,children:e.durationLabel??kU(e.duration_minutes)})]}),r=t===`list`?`py-3 transition-shadow block w-full text-left hover:border-[var(--book-brand)] dark:hover:border-[var(--book-brand-dark)]`:`rounded-[var(--book-radius)] border p-4 hover:shadow-sm transition-shadow block w-full text-left hover:border-[var(--book-brand)] dark:hover:border-[var(--book-brand-dark)]`;return(0,R.jsx)(`div`,{children:e.link?(0,L.cloneElement)(e.link,{"data-kit":`booking-link-list-item`,className:W(e.link.props.className,r),"aria-label":e.title,children:n}):(0,R.jsx)(`div`,{"data-kit":`booking-link-list-item`,className:r,children:n})},e.slug)})})}function I9({owner:e,reason:t}){let{t:n}=K(),r=t===`paused`||t===`archived`||t===`unavailable`?t:`fallback`;return(0,R.jsxs)(`div`,{className:W(`max-w-md mx-auto p-6 text-center space-y-6`),"data-kit":`booking-offline`,children:[(0,R.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,R.jsxs)(UM,{className:`h-16 w-16`,children:[(0,R.jsx)(WM,{src:e.avatar_url||``,alt:e.display_name}),(0,R.jsx)(GM,{children:e.display_name.charAt(0)})]}),(0,R.jsx)(`h1`,{className:`text-2xl font-bold`,children:e.display_name})]}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:n(`publicBo
121oking.offline.${r}.headline`,{name:e.display_name})}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:n(`publicBooking.offline.${r}.description`)})]})]})}function bae({handle:e,onLinkClick:t}){let{t:n}=K(),{data:r,isPending:i,error:a}=dt(fte(e));if(i)return(0,R.jsx)(TA,{className:`h-64 w-full`});if(a||!r)return(0,R.jsx)(`div`,{className:`text-center text-destructive`,children:n(`publicBooking.errors.pageLoadFailed`)});if(r.status===`offline`)return(0,R.jsx)(I9,{owner:r.owner,reason:r.reason||`unavailable`});let o=CU(r.page).page??wU,s=(r.links??[]).map(e=>({slug:e.slug,title:e.title,description:e.description,duration_minutes:e.duration_minutes,durationLabel:e.all_day?n(`publicBooking.allDay`):void 0,link:(0,R.jsx)(`button`,{type:`button`,onClick:()=>t(e.slug),className:`text-primary hover:underline`})}));return(0,R.jsx)(_9,{page:o,owner:r.owner,children:(0,R.jsx)(yae,{links:s,layout:TU(o)})})}function L9(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}var xae=[`border border-transparent`,`hover:border-[var(--book-brand)] hover:bg-transparent hover:text-[var(--book-brand)]`,`dark:hover:border-[var(--book-brand-dark)] dark:hover:bg-transparent dark:hover:text-[var(--book-brand-dark)]`,`group-data-[today=true]/day:font-semibold group-data-[today=true]/day:text-[var(--book-brand)]`,`dark:group-data-[today=true]/day:text-[var(--book-brand-dark)]`,`data-[selected-single=true]:bg-[var(--book-brand)] data-[selected-single=true]:text-white`,`dark:data-[selected-single=true]:bg-[var(--book-brand-dark)] dark:data-[selected-single=true]:text-white`].join(` `);function Sae({className:e,...t}){return(0,R.jsx)(iY,{...t,className:W(e,xae)})}function Cae({days:e,selectedDate:t,onDateChange:n,onMonthChange:r,slots:i,selectedStart:a,onSelectSlot:o,timezone:s,loadingDays:c=!1,loadingSlots:l=!1,durationMinutes:u,weekStartsOn:d=1,hour12:f=!1,allDay:p=!1}){let{t:m}=K(),h=(0,L.useMemo)(()=>new Set(e.filter(e=>e.slot_count>0).map(e=>e.date)),[e]),g=t?(()=>{let[e,n,r]=t.split(`-`).map(Number);return new Date(e,n-1,r)})():void 0,[_,v]=(0,L.useState)(()=>g??new Date),y=e=>{e&&(v(e),n(L9(e)))},b=e=>{v(e),r(`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-01`)},x=(0,L.useMemo)(()=>i.map(e=>{if(p)return{start:e.start,time:m(`publicBooking.allDay`)};let t=new Intl.DateTimeFormat(void 0,{timeZone:s,hour:f?`numeric`:`2-digit`,minute:`2-digit`,hour12:f}).format(new Date(e.start));return{start:e.start,time:t}}),[i,s,f,p,m]);return(0,R.jsxs)(`div`,{className:`grid grid-cols-1 items-start gap-6 lg:grid-cols-[minmax(0,20rem)_minmax(0,1fr)]`,children:[(0,R.jsx)(`div`,{className:`min-w-0 [&_nav_button:hover]:bg-transparent [&_nav_button:hover]:text-[var(--book-brand)] dark:[&_nav_button:hover]:text-[var(--book-brand-dark)]`,"data-kit":`slot-picker-day`,children:c?(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(TA,{className:`h-8 w-full`}),(0,R.jsx)(`div`,{className:`grid grid-cols-7 gap-1`,children:Array.from({length:35}).map((e,t)=>(0,R.jsx)(TA,{className:`aspect-square`},t))})]}):(0,R.jsx)(rY,{mode:`single`,weekStartsOn:d,month:_,selected:g,onSelect:y,onMonthChange:b,disabled:e=>!h.has(L9(e)),className:`bg-transparent p-0`,classNames:{root:`rdp-root w-full`,today:`rdp-today`},components:{DayButton:Sae}})}),(0,R.jsx)(`div`,{className:`flex max-h-80 min-w-0 flex-col gap-2 overflow-y-auto pr-1 [scrollbar-width:thin]`,"data-kit":`slot-picker-slots`,children:l?(0,R.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:4}).map((e,t)=>(0,R.jsx)(TA,{className:`h-10 w-full`},t))}):i.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground py-4`,children:m(`publicBo
121oking.noTimes`)}):x.map(e=>(0,R.jsx)(`button`,{type:`button`,onClick:()=>o(e.start),"aria-pressed":e.start===a,"data-kit":`slot-picker-slot`,className:W(`w-full px-3 py-2 rounded-md border text-sm transition-colors`,e.start===a?`border-[var(--book-brand)] bg-[var(--book-brand)] text-white dark:border-[var(--book-brand-dark)] dark:bg-[var(--book-brand-dark)]`:`border-input hover:border-[var(--book-brand)] hover:bg-muted dark:hover:border-[var(--book-brand-dark)]`),children:e.time},e.start))})]})}function R9({booking:e,answers:t,onCancel:n,cancelling:r=!1,hour12:i=!1}){let{t:a}=K(),o=new Date(e.start),s=e.all_day?`${new Intl.DateTimeFormat(void 0,{timeZone:e.owner.timezone,weekday:`long`,year:`numeric`,month:`long`,day:`numeric`}).format(AU(e.start,e.end))} · ${a(`publicBooking.confirmation.allDay`,{timezone:e.owner.timezone})}`:new Intl.DateTimeFormat(void 0,{timeZone:e.timezone,year:`numeric`,month:`long`,day:`numeric`,hour:i?`numeric`:`2-digit`,minute:`2-digit`,hour12:i}).format(o);return(0,R.jsxs)(`div`,{className:W(`max-w-md mx-auto p-6 space-y-6`),"data-kit":`booking-confirmation`,children:[(0,R.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,R.jsx)(`h1`,{className:`text-2xl font-bold`,children:a(`publicBooking.confirmation.title`)}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:a(`publicBooking.confirmation.subtitle`,{name:e.owner.dis
121play_name})})]}),(0,R.jsxs)(`div`,{className:`rounded-lg bg-muted p-4 space-y-3`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:a(`publicBooking.confirmation.when`)}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s})]}),e.meeting_url?(0,R.jsxs)(`div`,{"data-kit":`booking-confirmation-meeting`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:a(`publicBooking.confirmation.joinLabel`)}),(0,R.jsx)(`a`,{href:e.meeting_url,target:`_blank`,rel:`noreferrer noopener`,className:`text-sm text-primary underline break-all`,children:a(`publicBooking.confirmation.joinAction`)})]}):null,e.location?.type===`phone`&&e.location.phone?(0,R.jsxs)(`div`,{"data-kit":`booking-confirmation-phone`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:a(`publicBooking.confirmation.joinLabel`)}),(0,R.jsx)(`a`,{href:`tel:${e.location.phone.replace(/[^+0-9]/g,``)}`,className:`text-sm text-primary underline`,children:a(`publicBooking.confirmation.callAction`,{phone:e.location.phone})})]}):null,(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsxs)(UM,{className:`h-8 w-8`,children:[(0,R.jsx)(WM,{src:e.owner.handle,alt:e.owner.dis
121play_name}),(0,R.jsx)(GM,{children:e.owner.display_name.charAt(0)})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:e.owner.display_name}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.link.title}),e.co_hosts&&e.co_hosts.length>0?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-kit":`booking-confirmation-co-hosts`,children:a(`publicBooking.confirmation.withHosts`,{names:e.co_hosts.map(e=>e.display_name).join(`, `)})}):null]})]})]}),t.length>0&&(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:a(`publicBooking.confirmation.responses`)}),(0,R.jsx)(`dl`,{className:`space-y-1`,children:t.map(({label:e,value:t})=>(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`dt`,{className:`font-medium text-muted-foreground`,children:e}),(0,R.jsx)(`dd`,{className:`text-foreground`,children:t})]},e))})]}),(0,R.jsx)(G,{variant:`outline`,onClick:()=>n(),disabled:r,className:`w-full`,children:a(r?`publicBooking.confirmation.cancelling`:`publicBo
121oking.confirmation.cancel`)})]})}function wae({hosts:e}){let{t}=K();if(e.length===0)return null;let n=e.map(e=>e.display_name).join(`, `);return(0,R.jsxs)(`div`,{"data-kit":`booking-hosts`,className:`flex items-center gap-2`,children:[(0,R.jsx)(`div`,{className:`flex -space-x-2`,children:e.map((e,t)=>(0,R.jsxs)(UM,{className:`ring-background h-6 w-6 ring-2`,children:[(0,R.jsx)(WM,{src:e.avatar_url||``,alt:e.display_name}),(0,R.jsx)(GM,{children:e.display_name.charAt(0)})]},`${t}-${e.display_name}`))}),(0,R.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:t(`publicBooking.withHosts`,{names:n})})]})}function z9(e){if(typeof e!=`object`||!e)return;let t=e.code;return typeof t==`string`?t:void 0}function B9(e){return z9(e)===`TOKEN_USED`}function V9(e){switch(z9(e)){case`TOKEN_EXPIRED`:return`publicBooking.manage.expired`;case`TOKEN_INVALID`:return`publicBooking.manage.invalid`;case`RATE_LIMITED`:return`publicBooking.errors.RATE_LIMITED`;default:return`publicBooking.manage.cancelFailed`}}function H9({booking:e}){let{t}=K();return(0,R.jsxs)(`div`,{className:`max-w-md mx-auto p-6 space-y-2 text-center`,"data-kit":`public-booking-cancelled`,children:[(0,R.jsx)(`h1`,{className:`text-2xl font-bold`,children:t(`publicBooking.manage.cancelledTitle`)}),(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:t(`publicBooking.manage.cancelledSubtitle`,{name:e.owner.dis
121play_name})})]})}function U9({message:e}){return(0,R.jsx)(`div`,{role:`alert`,"data-kit":`public-booking-cancel-error`,className:`max-w-md mx-auto rounded-md border border-destructive/40 bg-destructive/10 p-4`,children:(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:e})})}function W9(e,t){return e.filter(e=>!e.hidden).map(e=>({label:e.label,value:String(t[e.name]??``)})).filter(e=>e.value)}function G9(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function Tae(e){let[t,n]=e.split(`-`).map(Number);return{from:e,to:G9(new Date(t,n,0))}}function K9(e,t){return e(MW(t),{defaultValue:jW(t)})}function Eae({handle:e,slug:t,onSuccess:n}){let{t:r}=K(),i=z(),a=kD(),[o,s]=(0,L.useState)(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-01`}),[c,l]=(0,L.useState)(()=>G9(new Date)),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(a),[m,h]=(0,L.useState)({}),[g,_]=(0,L.useState)({}),[v,y]=(0,L.useState)(``),[b,x]=(0,L.useState)(``),S=(0,L.useMemo)(()=>rO(),[]),C=(0,L.useMemo)(()=>HE(VE()),[]),w=(0,L.useMemo)(()=>UE(),[]),{data:T,isPending:E,error:D}=dt(pte(e,t)),O=(0,L.useMemo)(()=>Tae(o),[o]),{data:k,isPending:ee}=dt(mte(e,t,O.from,O.to,f)),{data:A,isPending:j}=dt({...hte(e,t,c||``,f),enabled:!!c}),te=Ete(e,t),ne=SP(),[re,M]=(0,L.useState)(!1),[N,ie]=(0,L.useState)(``),ae=(0,L.useRef)(null);if((0,L.useEffect)(()=>{if(u===null)return;let e=ae.current;if(e===null)return;let t=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;e.scrollIntoView?.({behavior:t?`auto`:`smooth`,block:`start`})},[u]),E)return(0,R.jsx)(TA,{className:`h-64 w-full`});if(D||!T)return(0,R.jsx)(`div`,{className:`text-center text-destructive`,children:r(`publicBooking.errors.linkLoadFailed`)});let oe=CU(T.page).page??wU;if(T.status===`offline`)return(0,R.jsx)(_9,{page:oe,owner:T.owner,children:(0,R.jsx)(I9,{owner:T.owner,reason:T.reason||`unavailable`})});let P=T.link;if(!P)return(0,R.jsx)(`div`,{className:`text-center text-destructive`,children:r(`publicBooking.errors.linkNotFound`)});let F=OW(P.form).config;if(!F)return(0,R.jsx)(`div`,{className:`text-center text-destructive`,children:r(`publicBooking.errors.invalidForm`)});let I=F.fields;if(Object.keys(m).length===0&&I.length>0){let e={};for(let t of I)if(!t.hidden){let n=t.type===`checkbox`?!1:t.type===`multiselect`?[]:``;e[t.name]=n}h(e)}if(te.data){let e=te.data;if(re)return(0,R.jsx)(_9,{page:oe,owner:T.owner,children:(0,R.jsx)(H9,{booking:e})});let t=W9(I,m);return(0,R.jsx)(_9,{page:oe,owner:T.owner,children:(0,R.jsxs)(`div`,{className:`flex w-full flex-col gap-4`,children:[N&&(0,R.jsx)(U9,{message:N}),(0,R.jsx)(R9,{booking:e,answers:t,onCancel:()=>{ie(``),ne.mutate({id:e.id,token:e.cancel_token},{onSuccess:()=>M(!0),onError:e=>{if(B9(e)){M(!0);return}ie(r(V9(e)))}})},cancelling:ne.isPending})]})})}let se=bI(P.location??null);return(0,R.jsx)(_9,{page:oe,owner:T.owner,children:(0,R.jsxs)(`div`,{className:`flex w-full flex-col gap-8`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h1`,{className:`text-3xl font-bold`,children:P.title}),(0,R.jsx)(wae,{hosts:P.co_hosts??[]}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r(`publicBooking.hostTimezone`,{timezone:oO(T.owner.timezone)})}),se===null?null:(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-kit":`public-booking-location`,children:r(se.key,{value:se.value})})]}),P.all_day?null:(0,R.jsx)(W7,{timezones:S,value:f,onChange:e=>{p(e),d(null),y(``),x(``)},hostLabel:r(`publicBooking.hostTimezoneLabel`,{name:T.owner.dis
121play_name}),hostTimezone:T.owner.timezone}),(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:P.all_day?r(`publicBooking.selectDay`):r(`publicBooking.selectTime`)}),(0,R.jsx)(Cae,{days:k?.days||[],selectedDate:c,onDateChange:e=>{l(e),d(null),y(``),x(``)},onMonthChange:s,slots:A?.slots||[],selectedStart:u,onSelectSlot:e=>{d(e),y(``),x(``)},timezone:f,loadingDays:ee,loadingSlots:j,durationMinutes:P.duration_minutes,weekStartsOn:C,hour12:w,allDay:P.all_day===!0})]}),v&&(0,R.jsx)(`div`,{className:`rounded-[var(--book-radius)] border-warning/40 bg-warning/10 border p-4`,children:(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:v})}),u&&I.length>0&&(0,R.jsxs)(`div`,{ref:ae,className:`flex w-full max-w-2xl flex-col gap-4 scroll-mt-4`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:r(`publicBooking.yourDetails`)}),(0,R.jsx)(RW,{fields:I,values:m,errors:g,onChange:(e,t)=>{h(n=>({...n,[e]:t})),_(t=>{let n={...t};return delete n[e],n})},disabled:te.isPending})]}),b&&(0,R.jsx)(`div`,{role:`alert`,"data-kit":`public-booking-submit-error`,className:`rounded-[var(--book-radius)] border border-destructive/40 bg-destructive/10 p-4`,children:(0,R.jsx)(`p`,{className:`text-sm text-foreground`,children:b})}),u&&(0,R.jsx)(G,{onClick:async()=>{x(``);let n=kW(F,m),a=CW(F,n);if(a.length>0){let e={};for(let t of a)e[t.path]=K9(r,t.code);_(e);return}te.mutate({start:u,timezone:f,responses:n},{onError:n=>{let a=n;if(a.code===`SLOT_TAKEN`)y(r(`publicBooking.slotTaken`)),d(null),i.invalidateQueries({queryKey:Y.publicSlots(e,t,c||``,f)});else if(a.code===`VALIDATION_FAILED`&&a.fields){let e=new Set(I.filter(e=>!e.hidden).map(e=>e.name)),t={};for(let[n,i]of Object.entries(a.fields))e.has(n)&&(t[n]=K9(r,i));Object.keys(t).length===0&&x(r(`publicBooking.errors.submitFailed`)),_(t)}else a.code===`SLOT_NOT_AVAILABLE`?(x(r(`publicBooking.errors.slotGone`)),d(null),i.invalidateQueries({queryKey:Y.publicSlots(e,t,c||``,f)})):x(r(`publicBooking.errors.${a.code}`,{defaultValue:r(`publicBooking.errors.submitFailed`)}))}})},disabled:te.isPending||!u,className:`w-full lg:max-w-2xl bg-[var(--book-brand)] hover:bg-[var(--book-brand)] dark:bg-[var(--book-brand-dark)] dark:hover:bg-[var(--book-brand-dark)] hover:opacity-90 text-white`,children:te.isPending?r(`publicBo
121oking.submitting`):r(`publicBooking.submit`)})]})})}function Dae({bookingId:e,token:t,onCancelled:n}){let{t:r}=K(),i=z(),{data:a,isPending:o,error:s}=dt(gte(e,t)),c=SP(),l=(0,L.useMemo)(()=>UE(),[]),[u,d]=(0,L.useState)(``);if(o)return(0,R.jsx)(TA,{className:`h-64 w-full`});if(s||!a){let e=s?.code;return e===`TOKEN_INVALID`||e===`TOKEN_EXPIRED`||e===`TOKEN_USED`?(0,R.jsxs)(`div`,{className:`text-center space-y-4`,children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:r(`publicBooking.manage.title`)}),(0,R.jsxs)(`p`,{className:`text-muted-foreground`,children:[e===`TOKEN_INVALID`&&r(`publicBooking.manage.invalid`),e===`TOKEN_EXPIRED`&&r(`publicBooking.manage.expired`),e===`TOKEN_USED`&&r(`publicBooking.manage.used`)]})]}):(0,R.jsx)(`div`,{className:`text-center text-destructive`,children:r(`publicBooking.errors.bookingLoadFailed`)})}if(a.status===`cancelled`)return(0,R.jsx)(`div`,{className:`max-w-md mx-auto`,children:(0,R.jsx)(H9,{booking:a})});let f=()=>{i.setQueryData(Y.publicBooking(e,t),e=>e&&{...e,status:`cancelled`})},p=OW(a.form??null).config,m=p?W9(p.fields,a.responses??{}):[];return(0,R.jsxs)(`div`,{className:`max-w-md mx-auto space-y-4`,children:[u&&(0,R.jsx)(U9,{message:u}),(0,R.jsx)(R9,{booking:a,answers:m,onCancel:()=>{d(``),c.mutate({id:e,token:t},{onSuccess:()=>{f(),n?.()},onError:e=>{if(B9(e)){f();return}d(r(V9(e)))}})},cancelling:c.isPending,hour12:l})]})}var q9=Promise.resolve();function Oae(){NE.use(FS),q9=PE().catch(()=>{})}function kae(){return q9}function J9(e){let t=e.lang;return{lang:typeof t==`string`&&CE(t)?t:void 0}}function Aae(e){return{token:String(e.token??``),...J9(e)}}async function jae(e){await kae(),LE(e??null),await FE(e??EE())}async function Y9(e){if(e.cause!==`preload`)try{await jae(e.search.lang)}catch{}}var X9=Ta({getParentRoute:()=>Hb,path:`/book/$handle`,validateSearch:J9,beforeLoad:Y9,component:Mae});function Mae(){let{handle:e}=X9.useParams(),{lang:t}=X9.useSearch(),n=oa();return(0,R.jsx)(bae,{handle:e,onLinkClick:r=>n({to:`/book/$handle/$slug`,params:{handle:e,slug:r},search:{lang:t}})})}var Z9=Ta({getParentRoute:()=>Hb,path:`/book/$handle/$slug`,validateSearch:J9,beforeLoad:Y9,component:Nae});function Nae(){let{handle:e,slug:t}=Z9.useParams();return(0,R.jsx)(Eae,{handle:e,slug:t})}var Q9=Ta({getParentRoute:()=>Hb,path:`/book/b/$bookingId`,validateSearch:Aae,beforeLoad:Y9,component:Pae});function Pae(){let{bookingId:e}=Q9.useParams(),{token:t}=Q9.useSearch();return(0,R.jsx)(Dae,{bookingId:e,token:t})}var Fae=Hb.addChildren([Wb,dw,pw,hw,vw,X9,Z9,Q9,yN.addChildren([rW,H7,Lne,U7,Wne,pie,xie,x9,Lie,Hie,Wie,E9,D9.addChildren([Jie,Yie,Xie]),O9.addChildren([Qie,lae,dae,P9,mae,gae,F9]),K7.addChildren([Fre,Lre,f9,Jne,eie])])]);function Iae(e){return Wa({routeTree:Fae,context:{queryClient:e},defaultPreload:`intent`,defaultPreloadStaleTime:0,defaultNotFoundComponent:Lae,defaultErrorComponent:Bb,defaultPendingComponent:Vb})}function Lae(){return(0,R.jsx)(zb,{action:(0,R.jsx)(G,{asChild:!0,variant:`outline`,children:(0,R.jsx)(Sa,{to:`/`,children:`Back to CalendHub`})})})}Oae();var $9=Bo(),Rae=Iae($9);function zae(){return(0,R.jsxs)(Xe,{client:$9,children:[(0,R.jsx)(qa,{router:Rae}),null]})}go.createRoot(document.getElementById(`root`)).render((0,R.jsx)(L.StrictMode,{children:(0,R.jsx)(zae,{})}));export{m as _,MC as a,l as b,FC as c,K as d,W as f,v as g,Je as h,TA as i,NC as l,Yi as m,SN as n,IC as o,Go as p,CN as r,LC as s,IN as t,PC as u,o as v,s as y};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.