const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-yMj8live.js","assets/app-layout-D4ftBqmM.js","assets/dist-CpxP8T7M.js","assets/dialog-CnxDxMp1.js","assets/x-CNIkD3YH.js","assets/dist-AWHq1sQs.js","assets/dist-7VFSSFOV.js","assets/useLocation-B-0SqFIj.js","assets/chevron-left-r2x2HO6r.js","assets/folder-input--tEWrMtP.js","assets/folder-Dl7FxCLT.js","assets/route-C-dN6SG2.js","assets/shield-alert-XSqo2W3w.js","assets/login-AXVtM6Py.js","assets/radio-group-dGI8aZOA.js","assets/(user)-ByN4Axee.js","assets/useQuery-dxbdhNvu.js","assets/file-type-BBx4p_T6.js","assets/file-COj1kCUn.js","assets/prop-types-BuNDdpC2.js","assets/extract-sa8PNFSm.js","assets/list-DFASxSFf.js","assets/file-category-filter-BIAErrxo.js","assets/xlsx-DLapqJRf.js","assets/file-category-filter-DdKuH37F.css","assets/data-table-CEq6a930.js","assets/directory-breadcrumb-u3uCxukv.js","assets/chevron-right-_MvSGoRx.js","assets/inside-BDK478rm.js","assets/pagination-Bragnnjj.js","assets/remove-file-dialog-cN0TGs4y.js","assets/use-fetch-files-rnWwNE4C.js","assets/my-C6gzFuIT.js","assets/select-stsOu5jD.js","assets/es-6YDPW35u.js","assets/upload-Cr-BixPb.js","assets/use-upload-config-OxxQwpLm.js","assets/use-security-enabled-CyVC7otU.js","assets/outside-DtRMqIkz.js","assets/recycle-CSeB7_Hw.js","assets/share-D-HlQYDW.js","assets/textarea-Dyx6I5ZN.js","assets/console-nn2bY2CJ.js","assets/tabs-DopbVsQe.js","assets/plus-BHIlMeNy.js","assets/file-record-xAA0hSRQ.js","assets/date-range-picker-CAdUnH9W.js","assets/search-BGsuWyQ1.js","assets/org-account-BvqGo47r.js","assets/edit-user-dialog-DTs4QrEM.js","assets/tenant-DS3zyWsK.js","assets/org-CX5LJyS0.js","assets/upload-config-D_24SNBe.js","assets/user-CwyiWp7E.js"])))=>i.map(i=>d[i]); var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(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},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function.")});(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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),(function(){typeof URL>`u`||(typeof URL.parse!=`function`&&(URL.parse=function(e,t){try{return new URL(e,t)}catch{return null}}),typeof URL.canParse!=`function`&&(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch{return!1}}))})(),(typeof Promise!=`function`||!Promise.withResolvers)&&(Promise.withResolvers=function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}});var p=s((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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 P(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,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u{t.exports=p()})),h=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(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&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&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&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(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||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(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=s(((e,t)=>{t.exports=h()})),_=s((e=>{var t=m();function n(e){var t=`https://react.dev/errors/`+e;if(1{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=s((e=>{var t=g(),n=m(),r=v();function i(e){var t=`https://react.dev/errors/`+e;if(1he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hp(t),e=gp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){var t=e.memoizedState;t!==null&&(dh._currentValue=t.memoizedState,ve(Se,e)),t=ye.current;var n=gp(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),dh._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1)`:-1i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);case 30:return ke(`ViewTransition`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(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&-e;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 at(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=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(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 ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(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`u`||window.document===void 0||window.document.createElement===void 0),On=!1;if(Dn)try{var kn={};Object.defineProperty(kn,`passive`,{get:function(){On=!0}}),window.addEventListener(`test`,kn,kn),window.removeEventListener(`test`,kn,kn)}catch{On=!1}var An=null,jn=null,Mn=null;function Nn(){if(Mn)return Mn;var e,t=jn,n=t.length,r,i=`value`in An?An.value:An.textContent,a=i.length;for(e=0;e=fr),hr=` `,gr=!1;function _r(e,t){switch(e){case`keyup`:return ur.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function vr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var yr=!1;function br(e,t){switch(e){case`compositionend`:return vr(t);case`keypress`:return t.which===32?(gr=!0,hr):null;case`textInput`:return e=t.data,e===hr&&gr?null:e;default:return null}}function xr(e,t){if(yr)return e===`compositionend`||!dr&&_r(e,t)?(e=Nn(),Mn=jn=An=null,yr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Wr(n)}}function Kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ur(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;t=Ur(e.document)}return t}function Jr(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 Yr=Dn&&`documentMode`in document&&11>=document.documentMode,Xr=null,Zr=null,Qr=null,$r=!1;function ei(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$r||Xr==null||Xr!==Ur(r)||(r=Xr,`selectionStart`in r&&Jr(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}),Qr&&Hr(Qr,r)||(Qr=r,r=Qf(Zr,`onSelect`),0>=o,i-=o,Xi=1<<32-Ze(t)+i|n<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),B&&Qi(i,h),l;if(d===null){for(;hg?(_=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),B&&Qi(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 B&&Qi(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(_.key===null?g:_.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)}),B&&Qi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),co(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&to(l)===r.type){n(e,r.sibling),c=a(r,o.props),co(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===j?(c=Li(o.props.children,e.mode,c,o.key),co(c,o),c.return=e,e=c):(c=Ii(o.type,o.key,o.props,null,e.mode,c),co(c,o),c.return=e,e=c)}return s(e);case A: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}else{n(e,r);break}else t(e,r);r=r.sibling}c=Bi(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=to(o),_(e,r,o,c)}if(fe(o))return h(e,r,o,c);if(le(o)){if(l=le(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,so(o),c);if(o.$$typeof===F)return _(e,r,Ea(e,o),c);lo(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=Ri(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{oo=0;var i=_(e,t,n,r);return ao=null,i}catch(t){if(t===Ya||t===Za)throw t;var a=Mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var fo=uo(!0),po=uo(!1),mo=!1;function ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function go(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 _o(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ed&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ki(e),Oi(e,null,n),t}return Ti(e,r,t,n),ki(e)}function yo(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,mt(e,n)}}function bo(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 xo=!1;function So(){if(xo){var e=Ba;if(e!==null)throw e}}function Co(e,t,n,r){xo=!1;var i=e.updateQueue;mo=!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 f=s.lane&-536870913,p=f!==s.lane;if(p?(nd&f)===f:(r&f)===f){f!==0&&f===za&&(xo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:mo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,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),ud|=o,e.lanes=o,e.memoizedState=d}}function wo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function To(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=R.T,s={};s.types=o===null?null:o.types,R.T=s,fc(e,!1,t,n);try{var c=i(),l=R.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?dc(e,t,Ua(c,r),Pd(e)):dc(e,t,r,Pd(e))}catch(n){dc(e,t,{then:function(){},status:`rejected`,reason:n},Pd())}finally{z.p=a,o!==null&&s.types!==null&&(o.types=s.types),R.T=o}}function tc(){}function nc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=rc(e).queue;ec(e,a,t,pe,n===null?tc:function(){return ic(e),n(r)})}function rc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ic(e){var t=rc(e);t.next===null&&(t=e.alternate.memoizedState),dc(e,t.next.queue,{},Pd())}function ac(){return Ta(dh)}function oc(){return cs().memoizedState}function sc(){return cs().memoizedState}function cc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Pd();e=_o(n);var r=vo(t,e,n);r!==null&&(Ld(r,t,n),yo(r,t,n)),t={cache:Ma()},e.payload=t;return}t=t.return}}function lc(e,t,n){var r=Pd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},pc(e)?mc(t,n):(n=Ei(e,t,n,r),n!==null&&(Ld(n,e,r),hc(n,t,r)))}function uc(e,t,n){dc(e,t,n,Pd())}function dc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(pc(e))mc(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,Vr(s,o))return Ti(e,t,i,0),td===null&&wi(),!1}catch{}if(n=Ei(e,t,i,r),n!==null)return Ld(n,e,r),hc(n,t,r),!0}return!1}function fc(e,t,n,r){if(r={lane:2,revertLane:Rf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},pc(e)){if(t)throw Error(i(479))}else t=Ei(e,n,r,2),t!==null&&Ld(t,e,2)}function pc(e){var t=e.alternate;return e===V||t!==null&&t===V}function mc(e,t){Ko=Go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}var gc={readContext:Ta,use:ds,useCallback:Qo,useContext:Qo,useEffect:Qo,useImperativeHandle:Qo,useLayoutEffect:Qo,useInsertionEffect:Qo,useMemo:Qo,useReducer:Qo,useRef:Qo,useState:Qo,useDebugValue:Qo,useDeferredValue:Qo,useTransition:Qo,useSyncExternalStore:Qo,useId:Qo,useHostTransitionStatus:Qo,useFormState:Qo,useActionState:Qo,useOptimistic:Qo,useMemoCache:Qo,useCacheRefresh:Qo,useEffectEvent:Qo},_c={readContext:Ta,use:ds,useCallback:function(e,t){return ss().memoizedState=[e,t===void 0?null:t],e},useContext:Ta,useEffect:Vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),zs(4194308,4,qs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){zs(4,2,e,t)},useMemo:function(e,t){var n=ss();t=t===void 0?null:t;var r=e();if(qo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ss();if(n!==void 0){var i=n(t);if(qo){Xe(!0);try{n(t)}finally{Xe(!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=lc.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=ss();return e={current:e},t.memoizedState=e},useState:function(e){e=Cs(e);var t=e.queue,n=uc.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){return Qs(ss(),e,t)},useTransition:function(){var e=Cs(!1);return e=ec.bind(null,V,e.queue,!0,!1),ss().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=ss();if(B){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),td===null)throw Error(i(349));nd&127||vs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Vs(bs.bind(null,r,o,e),[e]),r.flags|=2048,Ls(9,{destroy:void 0},ys.bind(null,r,o,n,t),null),n},useId:function(){var e=ss(),t=td.identifierPrefix;if(B){var n=Zi,r=Xi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Jo++,0<\/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[xt]=t,o[St]=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(sp(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&&fl(t)}}return _l(t),t.subtreeFlags&=-33554433,pl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&fl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,da(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ra,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ip(e.nodeValue,n)),e||ca(t,!0)}else e=mp(e).createTextNode(r),e[xt]=t,t.stateNode=e}return _l(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=da(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[xt]=t}else fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_l(t),e=!1}else n=pa(),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 _l(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=da(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[xt]=t}else fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_l(t),a=!1}else a=pa(),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),hl(t,t.updateQueue),_l(t),null);case 4:return we(),e===null&&Jf(t.stateNode.containerInfo),t.flags|=67108864,_l(t),null;case 10:return ya(t.type),_l(t),null;case 19:if(Bo(t),r=t.memoizedState,r===null)return _l(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)gl(r,!1);else{if(ld!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Vo(e),o!==null){for(t.flags|=128,gl(r,!1),e=o.updateQueue,t.updateQueue=e,hl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Fi(n,e),n=n.sibling;return zo(t,Ro.current&1|2),B&&Qi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>bd&&(t.flags|=128,a=!0,gl(r,!1),t.lanes=4194304)}else{if(!a)if(e=Vo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,hl(t,e),gl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!B)return _l(t),null}else 2*ze()-r.renderingStartTime>bd&&n!==536870912&&(t.flags|=128,a=!0,gl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,o=Ro.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||B?zo(t,o):(n=o,ve(jo,t),ve(Ro,n),Mo===null&&(Mo=t)),B&&Qi(t,r.treeForkCount),e}return _l(t),null;case 22:case 23:return Lo(t),Ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(_l(t),t.subtreeFlags&6&&(t.flags|=8192)):_l(t),n=t.updateQueue,n!==null&&hl(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&&_e(Ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ya(ja),_l(t),null;case 25:return null;case 30:return t.flags|=33554432,_l(t),null}throw Error(i(156,t.tag))}function yl(e,t){switch(ta(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(ja),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Lo(t),t.alternate===null)throw Error(i(340));fa()}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));fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return ya(t.type),null;case 22:case 23:return Lo(t),Ao(),e!==null&&_e(Ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(ja),null;case 25:return null;default:return null}}function bl(e,t){switch(ta(t),t.tag){case 3:ya(ja),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Lo(t);break;case 13:Lo(t);break;case 19:Bo(t);break;case 10:ya(t.type);break;case 22:case 23:Lo(t),Ao(),e!==null&&_e(Ga);break;case 24:ya(ja)}}function xl(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){_f(t,t.return,e)}}function Sl(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){_f(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){_f(t,t.return,e)}}function Cl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{To(t,n)}catch(t){_f(e,e.return,t)}}}function wl(e,t,n){n.props=wc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){_f(e,t,n)}}function Tl(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:var i=e.stateNode,a=_i(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=zp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Bp(e);f(e.child,!1,rm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){_f(e,t,n)}}function El(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){_f(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){_f(e,t,n)}else n.current=null}function Dl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),sp(r,t,n),r[xt]=e,Ft(r),t=r;break a;case`link`:if(o=Ym(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Gr(s,h),v=Gr(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;sn?32:n,R.T=null,n=Od,Od=null;var o=wd,s=Ed;if(Cd=0,Td=wd=null,Ed=0,ed&6)throw Error(i(331));var c=ed;if(ed|=4,Xu(o.current),Hu(o,o.current,s,n),ed=c,jf(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{z.p=a,R.T=r,pf(e,t)}}function gf(e,t,n){t=Hi(n,t),t=Ac(e.stateNode,t,2),e=vo(e,t,2),e!==null&&(dt(e,2),Af(e))}function _f(e,t,n){if(e.tag===3)gf(e,e,n);else for(;t!==null;){if(t.tag===3){gf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Sd===null||!Sd.has(r))){e=Hi(n,e),n=jc(2),r=vo(t,n,2),r!==null&&(Mc(n,r,t,e),dt(r,2),Af(r));break}}t=t.return}}function vf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;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)||(sd=!0,i.add(n),e=yf.bind(null,e,t,n),t.then(e,e))}function yf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,td===e&&(nd&n)===n&&(ld===4||ld===3&&(nd&62914560)===nd&&300>ze()-vd?ed&2?fd|=n:Wd(e,0):fd|=n,md===nd&&(md=0)),Af(e)}function bf(e,t){t===0&&(t=lt()),e=Di(e,t),e!==null&&(dt(e,t),Af(e))}function xf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bf(e,n)}function Sf(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),bf(e,n)}function Cf(e,t){return Fe(e,t)}var wf=null,Tf=null,Ef=!1,Df=!1,Of=!1,kf=0;function Af(e){e!==Tf&&e.next===null&&(Tf===null?wf=Tf=e:Tf=Tf.next=e),Df=!0,Ef||(Ef=!0,Lf())}function jf(e,t){if(!Of&&Df){Of=!0;do for(var n=!1,r=wf;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,If(r,a))}else a=nd,a=at(r,r===td?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,If(r,a));r=r.next}while(n);Of=!1}}function Mf(){Nf()}function Nf(){Df=Ef=!1;var e=0;kf!==0&&bp()&&(e=kf);for(var t=ze(),n=null,r=wf;r!==null;){var i=r.next,a=Pf(r,t);a===0?(r.next=null,n===null?wf=i:n.next=i,i===null&&(Tf=n)):(n=r,(e!==0||a&3)&&(Df=!0)),r=i}Cd!==0&&Cd!==5||jf(e,!1),kf!==0&&(kf=0)}function Pf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&up(d)&&(c=c.responseEnd,o+=u*(crh){s.length=o;break}f=new Promise(Ip.bind(f)),s.push(f)}}}if(0`u`?null:document;function km(e,t,n){var r=Om;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cm.has(i)||(Cm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),sp(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Am(e){Tm.D(e),km(`dns-prefetch`,e,null)}function jm(e,t){Tm.C(e,t),km(`preconnect`,e,t)}function Mm(e,t,n){Tm.L(e,t,n);var r=Om;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Rm(e);break;case`script`:a=Hm(e)}if(!(Sm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(zm(a))||t===`script`&&r.querySelector(Um(a))))){var o=r.createElement(`link`);sp(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function Nm(e,t){Tm.m(e,t);var n=Om;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Hm(e)}if(!Sm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),Sm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Um(a)))return}r=n.createElement(`link`),sp(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function Pm(e,t,n){Tm.S(e,t,n);var r=Om;if(r&&e){var i=Pt(r).hoistableStyles,a=Rm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(zm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sm.get(a))&&Km(e,n);var c=o=r.createElement(`link`);Ft(c),sp(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,Gm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Fm(e,t){Tm.X(e,t);var n=Om;if(n&&e){var r=Pt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=D({src:e,async:!0},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Ft(a),sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t){Tm.M(e,t);var n=Om;if(n&&e){var r=Pt(n).hoistableScripts,i=Hm(e),a=r.get(i);a||(a=n.querySelector(Um(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=Sm.get(i))&&qm(e,t),a=n.createElement(`script`),Ft(a),sp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lm(e,t,n,r){var a=(a=xe.current)?wm(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`?(n=Rm(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Rm(n.href);var o=Pt(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(zm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Sm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sm.set(e,o)),Vm(a,e,o,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`?(n=Hm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rm(e){return`href="`+nn(e)+`"`}function zm(e){return`link[rel="stylesheet"][`+e+`]`}function Bm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Vm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=It.bind(null,t),sp(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Hm(e){return`[src="`+nn(e)+`"]`}function Um(e){return`script[async]`+e}function Wm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),sp(r,`style`,a),Gm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Rm(n.href);var o=e.querySelector(zm(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Bm(n),(a=Sm.get(a))&&Km(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),sp(o,`link`,r),t.state.loading|=4,Gm(o,n.precedence,e),t.instance=o;case`script`:return o=Hm(n.src),(a=e.querySelector(Um(o)))?(t.instance=a,Ft(a),a):(r=n,(a=Sm.get(o))&&(r=D({},n),qm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),sp(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,Gm(r,n.precedence,e));return t.instance}function Gm(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 title`):null)}function Zm(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 Qm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function $m(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function eh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function th(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=eh(t),e.suspenseyImages.push(t)),e=sh.bind(e),t.decode().then(e,e))}function nh(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=Rm(r.href),a=t.querySelector(zm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Bm(r),(i=Sm.get(i))&&Km(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),sp(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=oh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rh=0;function ih(e,t){return e.stylesheets&&e.count===0&&lh(e,e.stylesheets),0rh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ah(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)lh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function oh(){this.count--,ah(this)}function sh(){this.imgCount--,ah(this)}var ch=null;function lh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ch=new Map,t.forEach(uh,e),ch=null,oh.call(e))}function uh(e,t){if(!(t.state.loading&4)){var n=ch.get(e);if(n)var r=n.get(null);else{n=new Map,ch.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{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=s((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})),S=s(((e,t)=>{t.exports=x()})),C=u(m(),1),w=u(S(),1),T=C.createContext(void 0),E=e=>{let t=C.useContext(T);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},D=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,w.jsx)(T.Provider,{value:e,children:t}));function O(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function k(e,t,n){O(e,t),t.set(e,n)}function A(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function j(e,t){return e.get(A(e,t))}function M(e,t,n){return e.set(A(e,t),n),n}var N,P,F={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},I=new(N=new WeakMap,P=new WeakMap,class{constructor(){k(this,N,F),k(this,P,!1)}setTimeoutProvider(e){M(N,this,e)}setTimeout(e,t){return j(N,this).setTimeout(e,t)}clearTimeout(e){j(N,this).clearTimeout(e)}setInterval(e,t){return j(N,this).setInterval(e,t)}clearInterval(e){j(N,this).clearInterval(e)}});function ee(e){setTimeout(e,0)}var te=typeof window>`u`||`Deno`in globalThis;function ne(){}function re(e,t){return typeof e==`function`?e(t):e}function ie(e){return typeof e==`number`&&e>=0&&e!==1/0}function ae(e,t){return Math.max(e+(t||0)-Date.now(),0)}function oe(e,t){return typeof e==`function`?e(t):e}function se(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ce(o,t.options))return!1}else if(!ue(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 L(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(le(t.options.mutationKey)!==le(a))return!1}else if(!ue(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ce(e,t){return((t==null?void 0:t.queryKeyHashFn)||le)(e)}function le(e){return JSON.stringify(e,(e,t)=>pe(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ue(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)){if(t.length>e.length)return!1;for(let n=0;n500)return t;let r=z(e)&&z(t);if(!r&&!(pe(e)&&pe(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{I.setTimeout(t,e)})}function ge(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:fe(e,t)}function _e(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ve(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ye=Symbol();function be(e,t){return!e.queryFn&&t!=null&&t.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ye?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xe(e,t){return typeof e==`function`?e(...t):!!e}function Se(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 Ce=()=>te,we=()=>Ce(),Te=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(){}},Ee,De,Oe,ke=new(Ee=new WeakMap,De=new WeakMap,Oe=new WeakMap,class extends Te{constructor(){super(),k(this,Ee,void 0),k(this,De,void 0),k(this,Oe,void 0),M(Oe,this,e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}})}onSubscribe(){j(De,this)||this.setEventListener(j(Oe,this))}onUnsubscribe(){if(!this.hasListeners()){var e;(e=j(De,this))==null||e.call(this),M(De,this,void 0)}}setEventListener(e){var t;M(Oe,this,e),(t=j(De,this))==null||t.call(this),M(De,this,e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()}))}setFocused(e){j(Ee,this)!==e&&(M(Ee,this,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof j(Ee,this)==`boolean`?j(Ee,this):((e=globalThis.document)==null?void 0:e.visibilityState)!==`hidden`}}),Ae=ee;function je(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Ae,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{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 Me=je(),Ne,Pe,Fe,Ie=new(Ne=new WeakMap,Pe=new WeakMap,Fe=new WeakMap,class extends Te{constructor(){super(),k(this,Ne,!0),k(this,Pe,void 0),k(this,Fe,void 0),M(Fe,this,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(){j(Pe,this)||this.setEventListener(j(Fe,this))}onUnsubscribe(){if(!this.hasListeners()){var e;(e=j(Pe,this))==null||e.call(this),M(Pe,this,void 0)}}setEventListener(e){var t;M(Fe,this,e),(t=j(Pe,this))==null||t.call(this),M(Pe,this,e(this.setOnline.bind(this)))}setOnline(e){j(Ne,this)!==e&&(M(Ne,this,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return j(Ne,this)}});function Le(e){return Math.min(1e3*2**e,3e4)}function Re(e){return(e??`online`)===`online`?Ie.isOnline():!0}var ze=class extends Error{constructor(e){super(`CancelledError`),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Be(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(ne);let c=()=>i!==`pending`,l=t=>{if(!c()){var n;let r=new ze(t);h(r),(n=e.onCancel)==null||n.call(e,r)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>ke.isFocused()&&(e.networkMode===`always`||Ie.isOnline())&&e.canRun(),p=()=>Re(e.networkMode)&&e.canRun(),m=e=>{c()||(r==null||r(),i=`resolved`,a(e))},h=e=>{c()||(r==null||r(),i=`rejected`,o(e))},g=t=>new Promise(n=>{var i;r=e=>{(c()||t())&&n(e)},(i=e.onPause)==null||i.call(e)}).then(()=>{var t;r=void 0,c()||(t=e.onContinue)==null||t.call(e)}),_=()=>{if(c())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(m).catch(r=>{var i;if(c())return;let a=e.retry??(we()?0:3),o=e.retryDelay??Le,s=typeof o==`function`?o(n,r):o,l=a===!0||typeof a==`number`&&nf()?void 0:g(f)).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r==null||r(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var Ve,He=(Ve=new WeakMap,class{constructor(){k(this,Ve,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ie(this.gcTime)&&M(Ve,this,I.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(we()?1/0:3e5))}clearGcTimeout(){j(Ve,this)!==void 0&&(I.clearTimeout(j(Ve,this)),M(Ve,this,void 0))}});function Ue(e){return{onFetch:(t,n)=>{var r,i,a;let o=t.options,s=(r=t.fetchOptions)==null||(r=r.meta)==null||(r=r.fetchMore)==null?void 0:r.direction,c=((i=t.state.data)==null?void 0:i.pages)||[],l=((a=t.state.data)==null?void 0:a.pageParams)||[],u={pages:[],pageParams:[]},d=0,f=async()=>{let n=!1,r=e=>{Se(e,()=>t.signal,()=>n=!0)},i=be(t.options,t.fetchOptions),a=async(e,a,o)=>{if(n)return Promise.reject(t.signal.reason);if(a==null&&e.pages.length)return Promise.resolve(e);let s=await i((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:a,direction:o?`backward`:`forward`,meta:t.options.meta};return r(e),e})()),{maxPages:c}=t.options,l=o?ve:_e;return{pages:l(e.pages,s,c),pageParams:l(e.pageParams,a,c)}};if(s&&c.length){let e=s===`backward`,t=e?Ge:We,n={pages:c,pageParams:l};u=await a(n,t(o,n),e)}else{let t=e??c.length;do{let e=d===0?l[0]===void 0?o.initialPageParam:l[0]:We(o,u);if(d>0&&e==null)break;u=await a(u,e),d++}while(d{var e,r;return(e=(r=t.options).persister)==null?void 0:e.call(r,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function We(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 Ge(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function Ke(e,t){O(e,t),t.add(e)}var qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt=(qe=new WeakMap,Je=new WeakMap,Ye=new WeakMap,Xe=new WeakMap,Ze=new WeakMap,Qe=new WeakMap,$e=new WeakMap,et=new WeakMap,tt=new WeakSet,class extends He{constructor(e){super(),Ke(this,tt),k(this,qe,void 0),k(this,Je,void 0),k(this,Ye,void 0),k(this,Xe,void 0),k(this,Ze,void 0),k(this,Qe,void 0),k(this,$e,void 0),k(this,et,void 0),M(et,this,!1),M($e,this,e.defaultOptions),this.setOptions(e.options),this.observers=[],M(Ze,this,e.client),M(Xe,this,j(Ze,this).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,M(Je,this,ot(this.options)),this.state=e.state??j(Je,this),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return j(qe,this)}get promise(){var e;return(e=j(Qe,this))==null?void 0:e.promise}setOptions(e){if(this.options={...j($e,this),...e},e!=null&&e._type&&M(qe,this,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ot(this.options);e.data!==void 0&&(this.setState(at(e.data,e.dataUpdatedAt)),M(Je,this,e))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&j(Xe,this).remove(this)}setData(e,t){let n=ge(this.state.data,e,this.options);return A(tt,this,rt).call(this,{data:n,type:`success`,dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e){A(tt,this,rt).call(this,{type:`setState`,state:e})}cancel(e){var t,n;let r=(t=j(Qe,this))==null?void 0:t.promise;return(n=j(Qe,this))==null||n.cancel(e),r?r.then(ne).catch(ne):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return j(Je,this)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>oe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ye||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>oe(e.options.staleTime,this)===`static`):!1}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:!ae(this.state.dataUpdatedAt,e)}onFocus(){var e,t;(e=this.observers.find(e=>e.shouldFetchOnWindowFocus()))==null||e.refetch({cancelRefetch:!1}),(t=j(Qe,this))==null||t.continue()}onOnline(){var e,t;(e=this.observers.find(e=>e.shouldFetchOnReconnect()))==null||e.refetch({cancelRefetch:!1}),(t=j(Qe,this))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(Xe,this).notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(j(Qe,this)&&(j(et,this)||this.state.fetchStatus===`paused`&&this.state.status===`pending`?j(Qe,this).cancel({revert:!0}):j(Qe,this).cancelRetry()),this.scheduleGc()),j(Xe,this).notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||A(tt,this,rt).call(this,{type:`invalidate`})}async fetch(e,t){var n,r,i,a;if(this.state.fetchStatus!==`idle`&&((n=j(Qe,this))==null?void 0:n.status())!==`rejected`){if(this.state.data!==void 0&&t!=null&&t.cancelRefetch)this.cancel({silent:!0});else if(j(Qe,this))return j(Qe,this).continueRetry(),j(Qe,this).promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let o=new AbortController,s=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(M(et,this,!0),o.signal)})},c=()=>{let e=be(this.options,t),n=(()=>{let e={client:j(Ze,this),queryKey:this.queryKey,meta:this.meta};return s(e),e})();return M(et,this,!1),this.options.persister?this.options.persister(e,n,this):e(n)},l=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:j(Ze,this),state:this.state,fetchFn:c};return s(e),e})();(r=j(qe,this)===`infinite`?Ue(this.options.pages):this.options.behavior)==null||r.onFetch(l,this),M(Ye,this,this.state),(this.state.fetchStatus===`idle`||this.state.fetchMeta!==((i=l.fetchOptions)==null?void 0:i.meta))&&A(tt,this,rt).call(this,{type:`fetch`,meta:(a=l.fetchOptions)==null?void 0:a.meta});let u=M(Qe,this,Be({initialPromise:t==null?void 0:t.initialPromise,fn:l.fetchFn,onCancel:e=>{e instanceof ze&&e.revert&&this.setState({...j(Ye,this),fetchStatus:`idle`}),o.abort()},onFail:(e,t)=>{A(tt,this,rt).call(this,{type:`failed`,failureCount:e,error:t})},onPause:()=>{A(tt,this,rt).call(this,{type:`pause`})},onContinue:()=>{A(tt,this,rt).call(this,{type:`continue`})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{var d,f,p,m;let e=await u.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),(d=(f=j(Xe,this).config).onSuccess)==null||d.call(f,e,this),(p=(m=j(Xe,this).config).onSettled)==null||p.call(m,e,this.state.error,this),e}catch(e){var h,g,_,v;if(e instanceof ze){if(e.silent)return j(Qe,this).promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw A(tt,this,rt).call(this,{type:`error`,error:e}),(h=(g=j(Xe,this).config).onError)==null||h.call(g,e,this),(_=(v=j(Xe,this).config).onSettled)==null||_.call(v,this.state.data,e,this),e}finally{j(Qe,this)===u&&M(Qe,this,void 0),this.scheduleGc()}}});function rt(e){this.state=(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,...it(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...at(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return M(Ye,this,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),Me.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),j(Xe,this).notify({query:this,type:`updated`,action:e})})}function it(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Re(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function at(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ot(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,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var st,ct,lt,ut,dt,ft=(st=new WeakMap,ct=new WeakMap,lt=new WeakMap,ut=new WeakMap,dt=new WeakSet,class extends He{constructor(e){super(),Ke(this,dt),k(this,st,void 0),k(this,ct,void 0),k(this,lt,void 0),k(this,ut,void 0),M(st,this,e.client),this.mutationId=e.mutationId,M(lt,this,e.mutationCache),M(ct,this,[]),this.state=e.state||mt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(ct,this).includes(e)||(j(ct,this).push(e),this.clearGcTimeout(),j(lt,this).notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){M(ct,this,j(ct,this).filter(t=>t!==e)),this.scheduleGc(),j(lt,this).notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){j(ct,this).length||(this.state.status===`pending`?this.scheduleGc():j(lt,this).remove(this))}continue(){var e;return((e=j(ut,this))==null?void 0:e.continue())??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{A(dt,this,pt).call(this,{type:`continue`})},n={client:j(st,this),meta:this.options.meta,mutationKey:this.options.mutationKey},r=M(ut,this,Be({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{A(dt,this,pt).call(this,{type:`failed`,failureCount:e,error:t})},onPause:()=>{A(dt,this,pt).call(this,{type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(lt,this).canRun(this)})),i=this.state.status===`pending`,a=!r.canStart();try{var o,s,c,l,u,d,f,p;if(i)t();else{var m,h;A(dt,this,pt).call(this,{type:`pending`,variables:e,isPaused:a}),j(lt,this).config.onMutate&&await j(lt,this).config.onMutate(e,this,n);let t=await((m=(h=this.options).onMutate)==null?void 0:m.call(h,e,n));t!==this.state.context&&A(dt,this,pt).call(this,{type:`pending`,context:t,variables:e,isPaused:a})}let g=await r.start();return await((o=(s=j(lt,this).config).onSuccess)==null?void 0:o.call(s,g,e,this.state.context,this,n)),await((c=(l=this.options).onSuccess)==null?void 0:c.call(l,g,e,this.state.context,n)),await((u=(d=j(lt,this).config).onSettled)==null?void 0:u.call(d,g,null,this.state.variables,this.state.context,this,n)),await((f=(p=this.options).onSettled)==null?void 0:f.call(p,g,null,e,this.state.context,n)),A(dt,this,pt).call(this,{type:`success`,data:g}),g}catch(t){try{var g,_;await((g=(_=j(lt,this).config).onError)==null?void 0:g.call(_,t,e,this.state.context,this,n))}catch(e){Promise.reject(e)}try{var v,y;await((v=(y=this.options).onError)==null?void 0:v.call(y,t,e,this.state.context,n))}catch(e){Promise.reject(e)}try{var b,x;await((b=(x=j(lt,this).config).onSettled)==null?void 0:b.call(x,void 0,t,this.state.variables,this.state.context,this,n))}catch(e){Promise.reject(e)}try{var S,C;await((S=(C=this.options).onSettled)==null?void 0:S.call(C,void 0,t,e,this.state.context,n))}catch(e){Promise.reject(e)}throw A(dt,this,pt).call(this,{type:`error`,error:t}),t}finally{j(ut,this)===r&&M(ut,this,void 0),j(lt,this).runNext(this)}}});function pt(e){this.state=(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,isPaused:!1,status:`error`}}})(this.state),Me.batch(()=>{j(ct,this).forEach(t=>{t.onMutationUpdate(e)}),j(lt,this).notify({mutation:this,type:`updated`,action:e})})}function mt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var ht,gt,_t,vt=(ht=new WeakMap,gt=new WeakMap,_t=new WeakMap,class extends Te{constructor(e={}){super(),k(this,ht,void 0),k(this,gt,void 0),k(this,_t,void 0),this.config=e,M(ht,this,new Set),M(gt,this,new Map),M(_t,this,0)}build(e,t,n){var r;let i=new ft({client:e,mutationCache:this,mutationId:M(_t,this,(r=j(_t,this),++r)),options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){j(ht,this).add(e);let t=yt(e);if(typeof t==`string`){let n=j(gt,this).get(t);n?n.push(e):j(gt,this).set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(j(ht,this).delete(e)){let t=yt(e);if(typeof t==`string`){let n=j(gt,this).get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&j(gt,this).delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=yt(e);if(typeof t==`string`){var n;let r=(n=j(gt,this).get(t))==null?void 0:n.find(e=>e.state.status===`pending`);return!r||r===e}else return!0}runNext(e){var t;let n=yt(e);return typeof n==`string`?((t=j(gt,this).get(n))==null||(t=t.find(t=>t!==e&&t.state.isPaused))==null?void 0:t.continue())??Promise.resolve():Promise.resolve()}clear(){Me.batch(()=>{let e=this.getAll();j(ht,this).clear(),j(gt,this).clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(j(ht,this))}find(e){let t={exact:!0,...e};return this.getAll().find(e=>L(t,e))}findAll(e={}){return this.getAll().filter(t=>L(e,t))}notify(e){Me.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Me.batch(()=>Promise.all(e.map(e=>e.continue().catch(ne))))}});function yt(e){var t;return(t=e.options.scope)==null?void 0:t.id}var bt,xt,St,Ct,wt,Tt=(bt=new WeakMap,xt=new WeakMap,St=new WeakMap,Ct=new WeakMap,wt=new WeakSet,class extends Te{constructor(e,t){super(),Ke(this,wt),k(this,bt,void 0),k(this,xt,void 0),k(this,St,void 0),k(this,Ct,void 0),M(bt,this,e),this.setOptions(t),this.bindMethods(),A(wt,this,Et).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let n=this.options;this.options=j(bt,this).defaultMutationOptions(e),R(this.options,n)||j(bt,this).getMutationCache().notify({type:`observerOptionsUpdated`,mutation:j(St,this),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&le(n.mutationKey)!==le(this.options.mutationKey)?this.reset():((t=j(St,this))==null?void 0:t.state.status)===`pending`&&j(St,this).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&j(St,this)&&(j(St,this).addObserver(this),A(wt,this,Et).call(this))}onUnsubscribe(){var e;this.hasListeners()||(e=j(St,this))==null||e.removeObserver(this)}onMutationUpdate(e){A(wt,this,Et).call(this),A(wt,this,Dt).call(this,e)}getCurrentResult(){return j(xt,this)}reset(){var e;(e=j(St,this))==null||e.removeObserver(this),M(St,this,void 0),A(wt,this,Et).call(this),A(wt,this,Dt).call(this)}mutate(e,t){var n;return M(Ct,this,t),(n=j(St,this))==null||n.removeObserver(this),M(St,this,j(bt,this).getMutationCache().build(j(bt,this),this.options)),j(St,this).addObserver(this),j(St,this).execute(e)}});function Et(){var e;let t=((e=j(St,this))==null?void 0:e.state)??mt();M(xt,this,{...t,isPending:t.status===`pending`,isSuccess:t.status===`success`,isError:t.status===`error`,isIdle:t.status===`idle`,mutate:this.mutate,reset:this.reset})}function Dt(e){Me.batch(()=>{let t=j(Ct,this);if(t&&this.hasListeners()){let o=j(xt,this).variables,s=j(xt,this).context,c={client:j(bt,this),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)===`success`){try{var n;(n=t.onSuccess)==null||n.call(t,e.data,o,s,c)}catch(e){Promise.reject(e)}try{var r;(r=t.onSettled)==null||r.call(t,e.data,null,o,s,c)}catch(e){Promise.reject(e)}}else if((e==null?void 0:e.type)===`error`){try{var i;(i=t.onError)==null||i.call(t,e.error,o,s,c)}catch(e){Promise.reject(e)}try{var a;(a=t.onSettled)==null||a.call(t,void 0,e.error,o,s,c)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(j(xt,this))})})}var Ot,kt=(Ot=new WeakMap,class extends Te{constructor(e={}){super(),k(this,Ot,void 0),this.config=e,M(Ot,this,new Map)}build(e,t,n){let r=t.queryKey,i=t.queryHash??ce(r,t),a=this.get(i);return a||(a=new nt({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){j(Ot,this).has(e.queryHash)||(j(Ot,this).set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){j(Ot,this).get(e.queryHash)===e&&(e.destroy(),j(Ot,this).delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Me.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(Ot,this).get(e)}getAll(){return[...j(Ot,this).values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>se(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>se(e,t)):t}notify(e){Me.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Me.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Me.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}),At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt=(At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,class{constructor(e={}){k(this,At,void 0),k(this,jt,void 0),k(this,Mt,void 0),k(this,Nt,void 0),k(this,Pt,void 0),k(this,Ft,void 0),k(this,It,void 0),k(this,Lt,void 0),M(At,this,e.queryCache||new kt),M(jt,this,e.mutationCache||new vt),M(Mt,this,e.defaultOptions||{}),M(Nt,this,new Map),M(Pt,this,new Map),M(Ft,this,0)}mount(){var e;M(Ft,this,(e=j(Ft,this),e++,e)),j(Ft,this)===1&&(M(It,this,ke.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(At,this).onFocus())})),M(Lt,this,Ie.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(At,this).onOnline())})))}unmount(){var e,t,n;M(Ft,this,(e=j(Ft,this),e--,e)),j(Ft,this)===0&&((t=j(It,this))==null||t.call(this),M(It,this,void 0),(n=j(Lt,this))==null||n.call(this),M(Lt,this,void 0))}isFetching(e){return j(At,this).findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return j(jt,this).findAll({...e,status:`pending`}).length}getQueryData(e){var t;let n=this.defaultQueryOptions({queryKey:e});return(t=j(At,this).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=j(At,this).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(oe(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return j(At,this).findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){var r;let i=this.defaultQueryOptions({queryKey:e}),a=re(t,(r=j(At,this).get(i.queryHash))==null?void 0:r.state.data);if(a!==void 0)return j(At,this).build(this,i).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Me.batch(()=>j(At,this).findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){var t;let n=this.defaultQueryOptions({queryKey:e});return(t=j(At,this).get(n.queryHash))==null?void 0:t.state}removeQueries(e){let t=j(At,this);Me.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=j(At,this);return Me.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Me.batch(()=>j(At,this).findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(ne).catch(ne)}invalidateQueries(e,t={}){return Me.batch(()=>(j(At,this).findAll(e).forEach(e=>{e.invalidate()}),(e==null?void 0:e.refetchType)===`none`?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Me.batch(()=>j(At,this).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ne)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(ne)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=j(At,this).build(this,t),r=n.isStaleByTime(oe(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=j(At,this).build(this,t);return n.isStaleByTime(oe(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ne).catch(ne)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ne).catch(ne)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Ie.isOnline()?j(jt,this).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(At,this)}getMutationCache(){return j(jt,this)}getDefaultOptions(){return j(Mt,this)}setDefaultOptions(e){M(Mt,this,e)}setQueryDefaults(e,t){j(Nt,this).set(le(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...j(Nt,this).values()],n={};return t.forEach(t=>{ue(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){j(Pt,this).set(le(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...j(Pt,this).values()],n={};return t.forEach(t=>{ue(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...j(Mt,this).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ce(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===ye&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(Mt,this).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(At,this).clear(),j(jt,this).clear()}});function zt(e,t){let n=E(t),[r]=C.useState(()=>new Tt(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);let i=C.useSyncExternalStore(C.useCallback(e=>r.subscribe(Me.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=C.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(ne)},[r]);if(i.error&&xe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Bt=!1,Vt=C.use,Ht=C.useLayoutEffect;function Ut(e){return e[e.length-1]}function Wt(e,t){return typeof e==`function`?e(t):e}var Gt=Object.prototype.hasOwnProperty;function Kt(e){for(let t in e)if(Gt.call(e,t))return!0;return!1}var qt=()=>Object.create(null),Jt=(e,t)=>Yt(e,t,!0);function Yt(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(Xt(e)&&Xt(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&Ut(a)!==`${o-1}`||c&&Ut(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;ll&&(u=t[f],u=d===u?d:typeof d==`object`?Yt(d,u,n,r):u),p[f]=o`{}]/g;function en(e){return e.replace($t,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function tn(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 en(t)}var nn=[`http:`,`https:`,`mailto:`,`tel:`];function rn(e){var t;if(e[0]!==`/`&&e.includes(`:`))return(t=/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e))==null||(t=t[1])==null?void 0:t.replace(/[\t\n\r]/g,``).toLowerCase()}var an=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function on(e,t){if(!e)return!1;if(an.test(e))return!0;let n=rn(e);return n?!t.has(n):!1}function sn(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=tn(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=tn(r?e.slice(r):e)}return t}function cn(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ln(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function mn(e){return pn(fn(e))}function hn(e,t){return e!=null&&e.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function gn(e,t,n=`never`,r){if(t.includes(`//`)&&(t=dn(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=dn(e)),o=e.split(`/`);o.length>1&&Ut(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(Ut(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?dn(s):s)||`/`;return a&&r&&r.set(a,c),c}function _n(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function vn(e){return e==null||e===``}function yn(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function bn(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(!(t===3&&f==null)){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&vn(f)){if(c===`/`&&!d)continue;f=``}o+=c+yn(s,f,r)+(d||``)}}return o+a||`/`}function xn(e){return(e==null?void 0:e.isNotFound)===!0}function Sn(){try{return sessionStorage}catch{return}}var Cn=Sn();function wn(){try{return JSON.parse((Cn==null?void 0:Cn.getItem(`tsr-scroll-restoration-v1_3`))||`{}`)}catch{return{}}}var Tn=wn(),En=`data-scroll-restoration-id`,Dn=e=>e.state.__TSR_key||e.href;function On(e){let t=e.getAttribute(En);if(t)return`[${En}="${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 kn=!1,An=`window`;function jn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Mn(e){let t=new Set;for(let n of e){if(n===An)continue;let e=jn(n);e&&t.add(e)}return t}function Nn(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Dn,a=new Set,o=e=>{let t=Tn[e]||={};for(let e of a)e===document?t[An]={scrollX,scrollY}:e.isConnected&&(t[On(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,kn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{kn||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{Cn==null||Cn.setItem(`tsr-scroll-restoration-v1_3`,JSON.stringify(Tn))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!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.e&&d&&d!==u){let e=Tn[d];if(e){let t=Tn[u];for(let n in e){if(n===An){if(s)continue}else{let e=jn(n);if(!e||s&&o&&(l??=Mn(o),l.has(e)))continue}t||=Tn[u]={},t[n]??=e[n]}}}kn=!0;try{var f;let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Mn(o));let t=e&&i&&c,s=r.e?Tn[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===An){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=jn(e);t&&(t.scrollLeft=r,t.scrollTop=i,l==null||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&&((f=document.getElementById(e))==null||f.scrollIntoView(i))}finally{kn=!1}}))}function Pn(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Fn(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function In(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]=Fn(r):Array.isArray(t)?t.push(Fn(r)):n[e]=[t,Fn(r)]}return n}var Ln=/^(?:\s|["[{\d-]|fa|nu|tr)/,Rn=Bn(JSON.parse),zn=Vn(JSON.stringify,JSON.parse);function Bn(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=In(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!Ln.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Vn(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&&!Ln.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Pn(e,r);return t?`?${t}`:``}}var Hn=`__root__`;function Un(e){e.statusCode=e.statusCode||e.code||307;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 Wn(e){return e instanceof Response&&!!e.options}function Gn(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n==null?void 0:n.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var Kn=4,qn=5;function Jn(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function Yn(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s!e.parse&&e.caseSensitive===_&&e.prefix===s&&e.suffix===u);if(y)o=y;else{let e=Qn(r,t,_,s,u);o=e,v.push(e),v.length===2&&(i==null||i.push(v))}}r=o}h&&g=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(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length=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.indexOf(r,e.length-r.length)=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.indexOf(r,e.length-r.length)=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;ee.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Kn)>(e.node.kind===Kn)||t.node.kind===Kn==(e.node.kind===Kn)&&t.node.depth>e.node.depth))):!0}function pr(e,t,n){let r=mn(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=dn(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>mr(n,s.input({url:e})),output:({url:e})=>s.output({url:hr(n,e)})}:s}function mr(e,t){var n;let r=e==null||(n=e.input)==null?void 0:n.call(e,{url:t});if(r){if(typeof r==`string`)return new URL(r);if(r instanceof URL)return r}return t}function hr(e,t){var n;let r=e==null||(n=e.output)==null?void 0:n.call(e,{url:t});if(r){if(typeof r==`string`)return new URL(r);if(r instanceof URL)return r}return t}function gr(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(()=>{ln(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 _r=`__TSR_index`,vr=`popstate`,yr=`beforeunload`,br=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function xr(e){let t=br.exec(e);return t?`/`+e.slice(t[0].length):e}function Sr(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>` \r`.includes(e)?``:encodeURIComponent(e))),xr(e)}function Cr(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 n=>{var r,i;let a=(r=n.navigateOpts)!=null&&r.ignoreBlocker||(i=e.getBlockers)==null?void 0:i.call(e);if(typeof document<`u`&&a!=null&&a.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let r of a){let i=Dr(n.path,n.state);if(await r.blockerFn({currentLocation:t,nextLocation:i,action:n.type})){var o;(o=e.onBlocked)==null||o.call(e);return}}n.task()};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[_r];i=wr(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[_r];i=wr(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,(n==null?void 0:n.ignoreBlocker)??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back((t==null?void 0:t.ignoreBlocker)??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward((t==null?void 0:t.ignoreBlocker)??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[_r]!==0,createHref:t=>e.createHref(t),block:t=>{var n;if(!e.setBlockers)return()=>{};let r=((n=e.getBlockers)==null?void 0:n.call(e))??[];return e.setBlockers([...r,t]),()=>{var n,r;let i=((n=e.getBlockers)==null?void 0:n.call(e))??[];(r=e.setBlockers)==null||r.call(e,i.filter(e=>e!==t))}},flush:()=>{var t;return(t=e.flush)==null?void 0:t.call(e)},destroy:()=>{var t;return(t=e.destroy)==null?void 0:t.call(e)},notify:r,_getBlockers:()=>{var t;return((t=e.getBlockers)==null?void 0:t.call(e))??[]}}}function wr(e,t){let n=Or();return{...t,key:n,__TSR_key:n,[_r]:e}}function Tr(e){var t,n;let r=(e==null?void 0:e.window)??(typeof document<`u`?window:void 0),i=r.history.pushState,a=r.history.replaceState,o=[],s=()=>o,c=e=>o=e,l=t=>Sr(e!=null&&e.createHref?e.createHref(t):t),u=(e==null?void 0:e.parseLocation)??(()=>Dr(`${r.location.pathname}${r.location.search}${r.location.hash}`,r.history.state));if(!((t=r.history.state)!=null&&t.__TSR_key)&&!((n=r.history.state)!=null&&n.key)){let e=Or();r.history.replaceState({[_r]:0,key:e,__TSR_key:e},``)}let d=u(),f,p=!1,m=!1,h=!1,g=!1,_=()=>d,v,y=()=>{v&&(w._ignoreSubscribers=!0,(v[2]?r.history.pushState:r.history.replaceState)(v[1],``,v[0]),w._ignoreSubscribers=!1,v=void 0,f=void 0)},b=(t,n,r)=>{let i=e!=null&&e.createHref?l(n):void 0,a=!!v;a||(f=d),d=Dr(n,r),v=[i??d.href,r,(v==null?void 0:v[2])||t],a||queueMicrotask(()=>y())},x=e=>{d=u(),w.notify({type:e})},S=async()=>{if(g=!1,m){m=!1;return}let e=u(),t=e.state[_r]-d.state[_r],n=t===1,i=t===-1,a=!n&&!i||p;p=!1;let o=a?`GO`:i?`BACK`:`FORWARD`,c=a?{type:`GO`,index:t}:{type:i?`BACK`:`FORWARD`};if(h)h=!1;else{let n=s();if(typeof document<`u`&&n.length){for(let i of n)if(await i.blockerFn({currentLocation:d,nextLocation:e,action:o})){m=!0,r.history.go(-t),w.notify(c);return}}}d=u(),w.notify(c)},C=e=>{if(g){g=!1;return}let t=!1,n=s();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=``},w=Cr({getLocation:_,getLength:()=>r.history.length,pushState:(e,t)=>b(!0,e,t),replaceState:(e,t)=>b(!1,e,t),back:e=>(e&&(h=!0,g=!0),r.history.back()),forward:e=>{e&&(h=!0,g=!0),r.history.forward()},go:(e,t)=>{p=!0,t&&(h=!0,g=!0),r.history.go(e)},createHref:l,flush:y,destroy:()=>{r.history.pushState=i,r.history.replaceState=a,r.removeEventListener(yr,C,{capture:!0}),r.removeEventListener(vr,S)},onBlocked:()=>{f&&d!==f&&(d=f)},getBlockers:s,setBlockers:c,notifyOnIndexChange:!1});return w._ignoreNextBeforeUnload=e=>{g=!1;try{e=new URL(e,r.document.baseURI).href,g=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==r.location.href.split(`#`)[0])}catch{}},r.addEventListener(yr,C,{capture:!0}),r.addEventListener(vr,S),r.history.pushState=function(...e){let t=i.apply(r.history,e);return w._ignoreSubscribers||x(`PUSH`),t},r.history.replaceState=function(...e){let t=a.apply(r.history,e);return w._ignoreSubscribers||x(`REPLACE`),t},w}function Er(e){let t=(e==null?void 0:e.window)??(typeof document<`u`?window:void 0);return Tr({window:t,parseLocation:()=>{let e=t.location.hash,n=e.indexOf(`#`,1);return n<0&&(n=e.length),Dr(`${e?e.slice(1,n):`/`}${t.location.search}${e.slice(n)}`,t.history.state)},createHref:e=>`${t.location.pathname}${t.location.search}#${e}`})}function Dr(e,t){let n=Sr(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Or();t={[_r]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Or(){return(Math.random()+1).toString(36).slice(7)}function kr(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Ar(e){return e.pathname+e.search+e.hash}function jr(e){var t,n;return e.options.loader||e.options.beforeLoad||e.lazyFn||((t=e.options.component)==null?void 0:t.preload)||((n=e.options.pendingComponent)==null?void 0:n.preload)}function Mr(e,t){return{fromLocation:t,toLocation:e,pathChanged:(t==null?void 0:t.pathname)!==e.pathname,hrefChanged:(t==null?void 0:t.href)!==e.href,hashChanged:(t==null?void 0:t.hash)!==e.hash}}function Nr({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Pr(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Fr(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){var o,s;if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||(o=(s=e.routesById[r.routeId].options).onLeave)==null||o.call(s,r)}for(let r of n){var c,l;if(a&&e._tx!==a)return;(c=(l=e.routesById[r.routeId].options)[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`])==null||c.call(l,r)}}var Ir=class{constructor(e,t){var n;this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Tr()),this.origin=this.options.origin,!this.origin){var n;(n=window)!=null&&n.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`}let r=this.options.basepath??`/`,i=this.options.rewrite,a=this.basepath!==r||(t==null?void 0:t.rewrite)!==i||(t==null?void 0:t.caseSensitive)!==this.options.caseSensitive;if(a&&(this.basepath=r,this.rewrite=r!==`/`&&mn(r)?pr(r,this.options.caseSensitive,i):i),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)a&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=gr(this.latestLocation,e),Nn(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=rr(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&$n(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Gn(1e3)}},this.subscribe=(e,t)=>{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},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:sn(e),external:!1,searchStr:o,search:Jt(t==null?void 0:t.search,i),hash:sn(r.slice(1)),state:Yt(t==null?void 0:t.state,a)}}let o=mr(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:sn(xr(o.pathname)),external:!!this.rewrite&&kr(o,this.origin),searchStr:c,search:Jt(t==null?void 0:t.search,s),hash:sn(o.hash.slice(1)),state:Yt(t==null?void 0:t.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},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=nr(pn(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[(n==null?void 0:n.branch)||[this.routesById.__root__],t,n==null?void 0:n.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Dr(n.href,{});n={...n,to:mr(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=gn(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[pn(c)],u=c.includes(`$`),d;if(l)d=l._branch??=or(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?(l==null?void 0:l._interpolation)??Xn(!1,{fullPath:c},0):void 0,p;for(let e of d){var m;let t=((m=e.options.params)==null?void 0:m.stringify)??e.options.stringifyParams;if(t){let e=o()[3];if(p??=Vr(n.params,e),!Kt(p))break;p===e&&(p=Object.assign(qt(),p));try{Object.assign(p,t(p))}catch{}}}p??=Vr(n.params,Hr(n.params,f)?o()[3]:Ur);let h=e.leaveParams?c:xr(sn(f?bn(c,f,p,this.pathParamsDecoder):c)),g=Wr(d,e._includeValidateSearch),_=()=>{var t;let n=o()[2];if(e._includeValidateSearch&&(t=this.options.search)!=null&&t.strict){let e={};d.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Br(t.options.validateSearch,{...e,...n}))}catch{}}),n=e}return n},v=g.length?Gr(g,_(),n):n.search===!0?_():typeof n.search==`function`?n.search(_()):n.search||Ur,y=this.options.stringifySearch(v),b=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,x=b?`#${b}`:``,S=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:Ur,C=`${h}${y}${x}`,w,T,E=!1;if(this.rewrite){let e=new URL(C,this.origin),t=e.origin,n=hr(this.rewrite,e);w=Ar(e),kr(n,t)?(T=n.href,E=!0):T=xr(Ar(n))}else w=cn(C),T=w;return{publicHref:T,href:w,pathname:h,search:v,searchStr:y,state:S,hash:b??``,external:E,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=er(r.pathname,this.processedTree);if(t){let i=Object.assign(qt(),t.rawParams),{from:a,params:o,...s}=t.route,c=Vr(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Lr(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=pn(this.latestLocation.href)===pn(n.href)&&Zt(Nr(n.state),Nr(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o==null||o.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.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={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?rn(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}return Lr(this,!a&&r?r:n,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e!=null&&e.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Ri(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){var n,r;let i;if(typeof t==`object`&&!((n=window.CSS)==null||(r=n.supports)==null)&&r.call(n,`selector(:active-view-transition-type(a))`)){let n=this.latestLocation,r=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Mr(n,r)):t.types;if(a===!1)return e();i={update:e,types:a}}else i=e;return document.startViewTransition(i).updateCallbackDone}return e()},this.invalidate=e=>{var t;let n=this._committed,r=e==null?void 0:e.filter,i=this._preloads,a=new Set,o=e=>{(!r||r(e))&&a.add(e.id)};n.forEach(o),this._cache.forEach(o),i==null||i.forEach(e=>e.forEach(o)),(t=this._tx)==null||t[3].forEach(o);let s=[];for(let[e,t]of i??[])t.some(e=>a.has(e.id))&&(i.delete(e),s.push(e));this._committed=n.map(t=>{if(a.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e!=null&&e.forcePending||t.status===`error`||t.status===`notFound`)&&jr(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t});for(let[t,n]of this._cache)a.has(t)&&(n.invalid=!0,e!=null&&e.forcePending&&(n.status=`pending`));for(let e of a){var c,l;let t=(c=this._flights)==null?void 0:c.get(e);(l=this._flights)==null||l.delete(e),t&&!t[2]&&s.push(t[1])}for(let e of s)e.abort();return this.shouldViewTransition=!1,this.load({sync:e==null?void 0:e.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(an.test(n)||(r=rn(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:kr(e,this.origin)||(n=Ar(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e==null?void 0: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;if(e._flight=void 0,t&&!--t[2]){var s;((s=this._flights)==null?void 0:s.get(e.id))===t&&this._flights.delete(e.id),o.push(t[1])}}for(let e of o)e.abort()},this.loadRouteChunk=Xr,this.preloadRoute=e=>zi(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?gn(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t!=null&&t.pending&&!i)return!1;let a=(t==null?void 0:t.pending)??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=tr(r.pathname,(t==null?void 0:t.caseSensitive)??!1,(t==null?void 0:t.fuzzy)??!1,a.pathname,this.processedTree);return!o||e.params&&!Zt(o.rawParams,e.params,!0)?!1:(t==null?void 0:t.includeSearch)??!0?Zt(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,(n=e.pathParamsAllowedCharacters)!=null&&n.length&&(this.pathParamsDecoder=_n(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??zn,parseSearch:e.parseSearch??Rn,protocolAllowlist:e.protocolAllowlist??nn}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Xn(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:pn(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Kr(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return(n==null?void 0:n.routeId)===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;ntypeof t!=`string`&&!Gt.call(e,t[1]))}var Ur=Object.freeze({});function Wr(e,t){let n=[];for(let i=0;i{let n=t(a.preSearchFilters?a.preSearchFilters.reduce((e,t)=>t(e),e):e);return a.postSearchFilters?a.postSearchFilters.reduce((e,t)=>t(e),n):n});let o=a.validateSearch;t&&o&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Br(o,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function Gr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=Wt(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Kr(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 Hn}function qr(e,t){var n;let r=((n=e.options.params)==null?void 0:n.parse)??e.options.parseParams;r&&Object.assign(t,r(t))}function Jr(e,t){var n,r;return(n=e.options[t])==null||(r=n.preload)==null?void 0:r.call(n)}function Yr(e,t){let n=Jr(e,`component`),r=Jr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Xr(e,t,n){let r=()=>t===!1?void 0:t?Jr(e,t):Yr(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 Zr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&te.routeId===t)}var $r=0,ei=1,ti=2,ni=3,ri=[4];function ii(e){return typeof e[0]==`number`}function ai(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).then(()=>t.removeEventListener(`abort`,i))})}function oi(e,t){return e.routesById[t.routeId]}function si(e,t,n){return Wn(e)?[ni,e]:xn(e)?(e.routeId||=n,[ti,e]):t?(typeof(e==null?void 0:e.then)==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[ei,e]):[$r,e]}function ci(e,t){let n=si(t,!0,e.id);if(n[0]!==ei)return n;try{var r,i;(r=(i=e.options).onError)==null||r.call(i,n[1])}catch(t){n=si(t,!0,e.id)}return n}function li(e,t,n,r,i){return i[0].signal.aborted?ri:Ti(e,t,n,ci(n,r),i)}async function ui(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;ie.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:f.id};try{let e=r._ctx||=f.options.context?f.options.context({...m,deps:r.loaderDeps,context:p})||{}:void 0;r.context={...p,...e}}catch(a){return fi(e,r),[i,li(e,t,f,a,n)]}if(c.aborted)return[i,ri];let h=r.paramsError??r.searchError;if(h!==void 0)return fi(e,r),[i,li(e,t,f,h,n)];let g=f.options.beforeLoad;if(!g)continue;let _=r.status;if(i>=a){var d;r.status=`pending`,(d=n[7])==null||d.call(n)}try{hi(e,r,`beforeLoad`,n[0]);let a=g({...m,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof(a==null?void 0:a.then)==`function`?ai(a,c):a);if(c.aborted)return[i,ri];let s=Ti(e,t,f,si(o,!1,f.id),n);if(s[0]!==$r)return fi(e,r),[i,s];r.context={...r.context,...o}}catch(a){return fi(e,r),[i,li(e,t,f,a,n)]}finally{r.status=_,hi(e,r,!1,n[0])}}i()}function di(e,t,n){var r;if(!(!n||--n[2])){if(((r=e._flights)==null?void 0:r.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 fi(e,t){var n;let r=t._flight;t._flight=void 0,(n=di(e,t,r))==null||n.abort()}function pi(e,t,n,r){let i=[];for(let o of t)if(!(n!=null&&n.includes(o))){var a;let t=o._flight;if(o._flight=void 0,r&&(t==null?void 0:t[2])===1&&((a=e._flights)==null?void 0:a.get(o.id))===t&&n!=null&&n.some(e=>e.id===o.id))t[2]=0;else{let n=di(e,o,t);n&&i.push(n)}}for(let e of i)e.abort()}function mi(e){for(let t of e){let e=t._flight;e&&e[2]++}}function hi(e,t,n,r){var i;if(t.isFetching=n,r&&((i=e._tx)==null?void 0:i[0])!==r)return;let a=e.stores.byRoute.get(t.routeId),o=a==null?void 0:a.get();(o==null?void 0:o.id)===t.id&&a.set({...o,isFetching:n})}function gi(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation: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 _i(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return ri;if(!i)return[$r,void 0];let l=n._flight;hi(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(gi(e,t,n,r,s,a,!!o[3]))).then(e=>si(e,!1,r.id),e=>si(e,!0,r.id)).then(t=>{var i;return t[0]!==$r&&((i=e._flights)==null?void 0:i.get(n.id))===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===ei&&l[2]?ci(r,t[1]):t}),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Ti(e,t,r,await ai(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return fi(e,n),ri}finally{hi(e,n,!1,s)}}function vi(e,t,n){t[0]!==ni&&(e.status=`success`,e.error=void 0,t[0]===$r?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function yi(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&&fi(e,r)}function bi(e,t){return t[0]===ei||t[0]===ti?{...e,status:t[0]===ei?`error`:`notFound`,error:t[1],_flight:void 0}:e}function xi(e,t,n,r,i,a,o){var s;let c=t[1][n],l=oi(e,c),u=!!a[3],d=e._cache.get(c.id),f,p=!1,m;try{if(c.status===`success`&&(f=l.options.shouldReload,typeof f==`function`&&(f=f(gi(e,t,c,l,a[0],i,u))),a[0].signal.aborted&&(m=ri)),!m)if(c.status!==`success`)p=!0;else{let t=u||c.preload?l.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.options.defaultStaleTime??0;p=!!(c.invalid||f||f===void 0&&Date.now()-c.updatedAt>=t&&(a[5]||c.cause===`enter`||a[2].some(e=>e.routeId===c.routeId&&e.id!==c.id)))}}catch(n){c.invalid=!0,fi(e,c),m=li(e,t,l,n,a)}let h=l.options.loader,g=typeof h==`function`,_=g?h:h==null?void 0:h.handler,v=!u||l.options.preload!==!1,y=v&&h?(s=e._flights)==null?void 0:s.get(c.id):void 0;y===c._flight||m?y=void 0:y&&!p&&!u&&f===void 0?p=!0:p||(y=void 0);let b=!!(h&&p&&c.status===`success`&&!u&&!a[4]&&((g?void 0:h.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),x=p&&v,S=x&&!b&&(c.status!==`success`||!!h),C=n>=o?a[7]:void 0,w=l.lazyFn&&l._lazy!==!0?C:void 0;if(x&&!h&&(c.invalid=!1,c.updatedAt=Date.now()),y&&y[2]++,S){var T;let t=c._flight;c._flight=y,(T=di(e,c,t))==null||T.abort(),n>=o&&(c.status=`pending`),C==null||C()}x||(c.isFetching=!1);let E=!m&&S?_i(e,t,c,l,_,i,a).then(t=>(vi(c,t,u),t[0]===$r&&(h&&!a[0].signal.aborted&&yi(e,c,d),n>=o&&(c.status=`pending`)),t)):Promise.resolve(m??[$r,c.loaderData]),D=(async()=>{try{let e=Xr(l,void 0,w);e&&await ai(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,li(e,t,l,r,a)]}let r=await E;S&&r[0]===$r&&c.status===`pending`&&!a[0].signal.aborted&&(c.status=`success`,C==null||C())})();if(r.push([n,E,D]),!b)return E.then(e=>bi(c,e));let O={...c,status:`pending`,preload:!1,_flight:y};c.invalid=!1,c.isFetching=`loader`;let k=_i(e,t,O,l,_,i,a).then(e=>(c.isFetching=!1,vi(O,e,!1),e));return(t[2]??=[]).push([n,k,D,O]),k.then(e=>bi(O,e))}async function Si(e,t,n,r,i=0){let a=n==null?void 0:n[1][1],o=a!=null&&a.routeId?t.findIndex(e=>e.routeId===a.routeId):(n==null?void 0:n[0])??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=oi(e,t[n]);try{let e=Xr(i,!1);e&&await ai(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a!=null&&a.routeId?o:i}function Ci(e,t){t[2]&&=(pi(e,t[2].map(e=>e[3])),void 0)}async function wi(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]>=ni)throw[a,t];!i&&t[0]!==$r&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===ni)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Ti(e,t,n,r,i,a){for(;r[0]===ni;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[ni,t]:[ni,t,a]}return[ni,o,n]}catch(e){r=a?[ei,e]:ci(n,e),a=!0}}return r}async function Ei(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===ti?Si(e,o,t,r.signal):t[0],d=l<0?o.length:l;if(((s==null?void 0:s[1][0])??0)>=ni)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==$r&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if(((s==null?void 0:s[1][0])??0)>=ni){let n=s[1];if(n[0]!==ni||n[1].options.reloadDocument||n[2])return Ci(e,t),n;c=!0,s=[0,[ei,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s==null?void 0:s[1],l=i==null?void 0:i[0],u=o[f],d=i==null?void 0:i[1],p=()=>{i&&(u._notFound=void 0,l===ei?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)};p(),i||a==null||a();let m=oi(e,u);try{await ai(i?Promise.resolve().then(()=>Xr(m,l===ei?`errorComponent`:`notFoundComponent`)):Promise.all([Xr(m),Xr(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Ci(e,t),ri}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Ci(e,t),pi(e,o),p()):u.status=`success`}return t}async function Di(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;te._notFound);if(e.options.notFoundMode!==`root`&&c>=0){let t=await Si(e,n,void 0,a,c);n[c]._notFound=void 0,n[t]._notFound=!0,c=t}let l=c<0?n.length:c+1,u=0;for(;u{for(let t=f;t=ni&&(l=0);m()}if(!a.aborted&&!r[3]){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 g=Ei(e,i,d,r[0],wi(d,h,i[2]),r[7]);(s=i[2])!=null&&s.length&&(i[3]=wi(i[2],void 0,void 0,g.then(e=>ii(e)?0:Zr(n).length,()=>0))),o=await g}catch(t){if(Ci(e,i),t===a&&a.aborted)return ri;throw t}return ii(o)?o:Di(e,o,a,r[6]===n.length?r[6]:0)}function ki(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let s=0;s0){i[3]=setTimeout(()=>ki(e,t),n);return}i[2]=0}let g=n.map(e=>({...e,_flight:void 0}));g[s].status=`pending`;let _=i[4]=e.startTransition(()=>e.stores.setMatches(g),g).then(t=>(t&&e._pending===i&&i[4]===_&&!i[2]&&(i[2]=Date.now()+m),t));return}}function Ai(e,t){var n;let r=e._pending;(e._tx===t||!((n=e._tx)!=null&&n[3].some(e=>e.id===(r==null?void 0:r[1]))))&&(clearTimeout(r==null?void 0:r[3]),e._pending=void 0)}async function ji(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Zr(t[3]).some(e=>e.id===n[1]))return;let i;try{await ai(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Mi(e,t){e._committed=t,e.stores.setMatches(t)}function Ni(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Zr(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Pr(n);Mi(e,n),pi(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Fr(e,i,n,a,l,t)}async function Pi(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Fi(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Ii(e,t,n,r,i){let a=n.map(e=>({...e}));mi(a);for(let t of r)fi(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Ei(e,o,r,t[0],i)}catch(t){throw pi(e,a),t}if(ii(s)){pi(e,a),s[0]===ni&&e._tx===t&&e._committed===n&&await Fi(e,t,s);return}if(await Di(e,s,t[0].signal),e._tx!==t||e._committed!==n){pi(e,a);return}for(let t of a){let n=e._cache.get(t.id);n!=null&&n._flight&&n._flight===t._flight&&(e._cache.delete(t.id),fi(e,n))}Mi(e,a),pi(e,n,a)}async function Li(e,t,n,r,i,a){let o=await Oi(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(ii(o)){let n=o[0]===ni&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Ai(e,t),pi(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Ai(e,t);return}await Fi(e,t,o);return}let s=o[1];if(e._tx===t&&await ji(e,t),e._tx!==t){Ai(e,t),pi(e,s),Ci(e,o);return}let c=t[2],l=Mr(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{var n;if(e._tx===t&&await ji(e,t),e._tx!==t){Ai(e,t),pi(e,s),Ci(e,o);return}let r=await e.startTransition(()=>{Ai(e,t),Ni(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Ci(e,o);return}u!=null&&u.length&&Ii(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),r&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&((n=e._commitPromise)==null||n.resolve(),e._commitPromise=void 0)})}async function Ri(e,t){var n;let r=e._tx,i=e.stores.resolvedLocation.get(),a=i??e.stores.location.get(),o=e.latestLocation,s=e._pendingLocation,c=(s==null?void 0:s.href)===o.href?s._redirects??0:0,l=e._handoff,u=l==null?void 0:l[0](),d=new AbortController,f=e._preflight;if(e._preflight=d,u||l==null||l[1](),f==null||f.abort(),!d.signal.aborted){let t=Mr(o,i);e.emit({type:`onBeforeNavigate`,...t}),d.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(d.signal.aborted){await Pi(e,r);return}let p=a.href===o.href,m=d,h=e.matchRoutes(o,{_controller:d});mi(h);let g=u?l[1](h):void 0;if(g?m=u:u==null||u.abort(),d.signal.aborted){pi(e,h),await Pi(e,r);return}e._preflight=void 0;let _,v=()=>Li(e,b,p,()=>ki(e,b),t==null?void 0:t.sync,g),y=t!=null&&t.sync?new Promise(e=>_=e):Promise.resolve().then(v),b=[m,c,o,h,Date.now(),y.then(()=>Pi(e,b))];if(e._tx=b,r){for(let t of e.stores.matches.get()){if(e._tx!==b)break;t.isFetching&&hi(e,t,!1)}r[0].abort(),pi(e,r[3],b[3],!0)}if(e._tx!==b){pi(e,b[3]),b[3]=[],_==null||_(),await Pi(e,b);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(o)}),(g||!e._committed.length&&((n=h[0])==null?void 0:n.status)!==`success`&&!h.some(e=>e._notFound))&&ki(e,b),_==null||_(v()),await b[5]}async function zi(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),mi(a),o=(e._preloads??=new Map).set(i,a),s=await Oi(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),pi(e,a)),i.abort()}if(!ii(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){xn(e)||console.error(e);return}}}var Bi=`Error preloading route! ☝️`,Vi=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=>{var t,n;this.originalIndex=e,this._branch=void 0;let r=this.options,i=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(t=(n=this.options).getParentRoute)==null?void 0:t.call(n),i?this._path=Hn:this.parentRoute||un();let a=i?Hn:r==null?void 0:r.path;a&&a!==`/`&&(a=fn(a));let o=(r==null?void 0:r.id)||a,s=i?Hn:dn((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(o??``));a===`__root__`&&(a=`/`);let c=s===`__root__`?`/`:a===void 0?this.parentRoute.fullPath:dn(this.parentRoute.fullPath+`/`+a);this._path=a,this._id=s,this._fullPath=c,this._to=pn(c)},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=>Un({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&e!=null&&e.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Hi=class extends Vi{constructor(e){super(e)}},Ui=class extends C.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){var n,r;(n=(r=this.props).onCatch)==null||n.call(r,e,t)}render(){let e=this.state.error;return e?C.createElement(this.props.errorComponent??Wi,{error:e[0],reset:this.reset}):this.props.children}};function Wi({error:e}){let[t,n]=C.useState(!1);return(0,w.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,w.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,w.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,w.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,w.jsx)(`div`,{children:(0,w.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e!=null&&e.message?(0,w.jsx)(`code`,{children:e.message}):null})}):null]})}var Gi=()=>!0,Ki=()=>!1;function qi({children:e,fallback:t=null}){return(0,w.jsx)(C.Fragment,{children:Ji()?e:t})}function Ji(e=!0){return C.useSyncExternalStore(Yi,Gi,e?Ki:Gi)}function Yi(){return()=>{}}var Xi=C.createContext(null);function Zi(e){return C.useContext(Xi)}function Qi(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{Qr(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var $i=C.createContext(void 0),ea=C.createContext(void 0);function ta({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 na(e,t,n){var r,i,a;let o=typeof e==`object`,s=o?e:void 0;return{next:(r=o?e.next:e)==null?void 0:r.bind(s),error:(i=o?e.error:t)==null?void 0:i.bind(s),complete:(a=o?e.complete:n)==null?void 0:a.bind(s)}}var ra=[],ia=0,{link:B,unlink:aa,propagate:oa,checkDirty:sa,shallowPropagate:ca}=ta({update(e){return e._update()},notify(e){ra[ua++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ma(e))}}),la=0,ua=0,da,fa=0;function pa(e){try{++fa,e()}finally{--fa||ha()}}function ma(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=aa(n,e)}function ha(){if(!(fa>0)){for(;la{if(i.get(),!n.current)n.current=!0;else{var e;da=void 0,(e=t.next)==null||e.call(t,i._snapshot)}});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=da,o=(t==null?void 0:t.compare)??Object.is;if(n)da=i,++ia,i.depsTail=void 0;else if(e===void 0)return!1;n&&(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{da=a,n&&(i.flags&=-5),ma(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&sa(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&ca(e)}}else e&32&&(i.flags=e&-33);return da!==void 0&&B(i,da,ia),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(oa(e),ca(e),ha())}},i}function _a(e){let t=()=>{let t=da;da=n,++ia,n.depsTail=void 0,n.flags=6;try{return e()}finally{da=t,n.flags&=-5,ma(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&&sa(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ma(this)}};return t(),n}var va=s((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})),ya=s(((e,t)=>{t.exports=va()})),ba=s((e=>{var t=m(),n=ya();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}})),xa=s(((e,t)=>{t.exports=ba()}))();function Sa(e,t){return e===t}function Ca(e,t=e=>e,n){let r=(n==null?void 0:n.compare)??Sa,i=(0,C.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,C.useCallback)(()=>e.get(),[e]);return(0,xa.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var wa={};function Ta(e,t){let n=C.useRef();return r=>{let i=e!=null&&e.select?e.select(r):r;return(e==null?void 0:e.structuralSharing)??t.options.defaultStructuralSharing?n.current=Yt(n.current,i):i}}function Ea(e){let t=Zi(),n=C.useContext(e.from?ea:$i),r=e.from??n,i=t.stores.getMatchStore(r),a=Ta(e,t),o=Ca(i,e=>e?a(e):wa);if(o!==wa)return o;(e.shouldThrow??!0)&&un()}function Da(e){return Ea({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Oa(e){let{select:t,...n}=e;return Ea({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function ka(e){return Ea({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 Ea({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ja(e){let t=Zi();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function Ma(e){let t=Zi(),n=ja(),r=C.useRef(null);return Ht(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function Na(e){return Ea({...e,select:t=>e.select?e.select(t.context):t.context})}function Pa(...e){let t=C.useRef(e),n=t.current;return e.forEach((e,t)=>{Zt(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Fa(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(Bi)})}function Ia(e,t){let n=typeof e==`string`&&rn(e);if(n)return t.has(n)?e:null}function La(e,t,n,r){let i=hn(e.pathname,r),a=hn(t.pathname,r);return(n!=null&&n.exact?i!==a:!(i.startsWith(a)&&(i.length===a.length||i[a.length]===`/`)))||((n==null?void 0:n.includeSearch)??!0)&&!Zt(e.search,t.search,!(n!=null&&n.exact),n==null?void 0:n.explicitUndefined)?!1:!(n!=null&&n.includeHash)||e.hash===t.hash}function Ra(e,t,n){let r=Zi(),i=C.useRef(null),a=C.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:_}=e,[v,y,b]=Pa(e.search,e.params,o),x=C.useContext($i),S=(r.stores._linkScopes??={})[x]??=Qi(r,x),[w,T,E]=C.useMemo(()=>{let t=Ia(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=S[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=Ka(t,r,u),s=u||o&&!rn(o)?La(e,t,b,r.basepath):void 0;(!a||a[0]!==o||a[1]!==s)&&(a=[o,s]),i=e}return a};return[n,c,(b==null?void 0:b.includeHash)&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,S,e.from,e.hash,e.href,s,v,y,e.state,e.mask,e.unsafeRelative,b,u]),[D,O]=C.useSyncExternalStore(S[1],T,E||T),k=O===void 0&&D,A=u||D===void 0,j=C.useRef(!1),M=e.reloadDocument||k||A?!1:c??r.options.defaultPreload,N=l??r.options.defaultPreloadDelay??0,P=C.useCallback(e=>{let t=e==null?void 0:e.isIntersecting;if(!(t??M===`intent`)){t===!1&&Wa(i);return}if(!N){Fa(r,w);return}i.t??=setTimeout(()=>{i.t=void 0,Fa(r,w)},N)},[r,w,i,M,N]);C.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,Fa(r,w));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&P(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t==null||t.disconnect(),Wa(i)}},[r,w,M,P,i]);let F=Ha(e,n);if(F.ref=t?a:i,k)return F.href=k,F;let I=t=>{let n=d??t.currentTarget.getAttribute(`target`);!A&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(!n||n===`_self`)&&t.button===0&&(t.preventDefault(),Wa(i),r.navigate({...e,_fromLocation:w._fromLocation}))},ee=()=>{M===`intent`&&Fa(r,w)},te=()=>{M===`intent`&&Wa(i)};return F.onClick=Ga(f,I),F.onBlur=Ga(p,te),F.onFocus=Ga(m,P),F.onMouseEnter=Ga(h,P),F.onMouseLeave=Ga(g,te),F.onTouchStart=Ga(_,ee),Ua(F,e,O,D,A,n)}var za={},Ba={className:`active`},Va=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function Ha(e,t){let n={};for(let r in e)Va.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function Ua(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=Wt(n?o:s,{})??(n?Ba:za);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var Wa=e=>{clearTimeout(e.t),e.t=void 0},Ga=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Ka(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!((r.external||i!==r.publicHref)&&on(i,t.protocolAllowlist)))return i}var qa=C.memo(C.forwardRef((e,t)=>{let n=e._asChild||`a`,r=Ra(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return C.createElement(n,r,i)}),Ja);function Ja(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Va.has(r)||!Zt(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var Ya=class extends Vi{constructor(e){super(e),this.useMatch=e=>Ea({...e,from:this.id}),this.useRouteContext=e=>Na({...e,from:this.id}),this.useSearch=e=>Aa({...e,from:this.id}),this.useParams=e=>ka({...e,from:this.id}),this.useLoaderDeps=e=>Oa({...e,from:this.id}),this.useLoaderData=e=>Da({...e,from:this.id}),this.useNavigate=()=>ja({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,w.jsx)(qa,{ref:t,from:this.fullPath,...e}))}};function Xa(e){return new Ya(e)}var Za=class extends Hi{constructor(e){super(e),this.useMatch=e=>Ea({...e,from:this.id}),this.useRouteContext=e=>Na({...e,from:this.id}),this.useSearch=e=>Aa({...e,from:this.id}),this.useParams=e=>ka({...e,from:this.id}),this.useLoaderDeps=e=>Oa({...e,from:this.id}),this.useLoaderData=e=>Da({...e,from:this.id}),this.useNavigate=()=>ja({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,w.jsx)(qa,{ref:t,from:this.fullPath,...e}))}};function Qa(e){return new Za(e)}function $a(e){return e=>{let t=Xa(e);return t.isRoot=!1,t}}function eo(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(Qt(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r)if(Vt)Vt(a());else throw a();return C.createElement(r,e)};return o.preload=a,o}function to(e){let t=Zi(),n=`not-found-${Ca(t.stores.location,e=>e.pathname)}-${Ca(t.stores.status)}`;return(0,w.jsx)(Ui,{getResetKey:()=>n,onCatch:(t,n)=>{var r;if(xn(t))(r=e.onCatch)==null||r.call(e,t,n);else throw t},errorComponent:({error:t})=>{var n;if(xn(t))return(n=e.fallback)==null?void 0:n.call(e,t);throw t},children:e.children})}function no(){return(0,w.jsx)(`p`,{children:`Not Found`})}function ro(e,t,n){return t.options.notFoundComponent?(0,w.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,w.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,w.jsx)(no,{})}function io(e,t){let n=(t==null?void 0:t.options.pendingComponent)??e.options.defaultPendingComponent;return n?(0,w.jsx)(n,{}):null}var ao=(e,t)=>e[0]===t[0]&&e[1]===t[1],oo=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,so=C.memo(function({routeId:e}){let t=Zi();return co(t,Ca(t.stores.getMatchStore(e)))});function co(e,t){var n,r;let i=e.routesById[t.routeId],a=io(e,i),o=i.options.errorComponent??e.options.defaultErrorComponent,s=i.options.onCatch??e.options.defaultOnCatch,c=i.isRoot?i.options.notFoundComponent??((n=e.options.notFoundRoute)==null?void 0:n.options.component):i.options.notFoundComponent,l=t.ssr===!1||t.ssr===`data-only`,u=oo(e,i,t.ssr)&&(i.options.wrapInSuspense??a??(((r=i.options.errorComponent)==null?void 0:r.preload)||l)),d=(0,w.jsx)(lo,{match:t});l&&(d=(0,w.jsx)(qi,{fallback:a,children:d})),c&&(d=(0,w.jsx)(to,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return C.createElement(c,e)},children:d})),o&&(d=(0,w.jsx)(Ui,{getResetKey:()=>t,errorComponent:o,onCatch:(e,n)=>{if(xn(e))throw e.routeId??=t.routeId,e;s==null||s(e,n)},children:d})),u&&(d=(0,w.jsx)(C.Suspense,{fallback:a,children:d}));let f=i.isRoot&&i.options.shellComponent;return f?(0,w.jsx)($i.Provider,{value:t.routeId,children:(0,w.jsxs)(f,{children:[d,null]})}):(0,w.jsxs)($i.Provider,{value:t.routeId,children:[d,null]})}var lo=C.memo(function({match:e}){let t=Zi(),n=e.routeId,r=t.routesById[n],i=C.useMemo(()=>{var i;let a=(i=r.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:i({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return a?JSON.stringify(a):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=C.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,w.jsx)(e,{},i):(0,w.jsx)(uo,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!oo(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return io(t,r)}if(e.status===`notFound`)return ro(t,r,e.error);if(e.status===`error`)throw e.error;return a}),uo=C.memo(function(){let e=Zi(),t=C.useContext($i),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Ca(a,e=>[!!e._notFound,e.error],{compare:ao}),i=Ca(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ro(e,e.routesById[t],r);if(!i)return null;let a=(0,w.jsx)(so,{routeId:i});return t===`__root__`?(0,w.jsx)(C.Suspense,{fallback:io(e),children:a}):a});function fo(e,t){let n=e[1];e.length=0,n==null||n(t)}function po({t:e}){let t=Zi(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{fo(n,!1),n.push(i,a),e(t),C.startTransition(r)}),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(pn(r.publicHref)!==pn(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return(a==null?void 0:a.href)===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Mr(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function mo(){let e=Zi(),t=e.routesById[Hn],n=io(e,t),r=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(po,{t:C.useState()[1]}),e.ssr?(0,w.jsx)(ho,{}):(0,w.jsx)(C.Suspense,{fallback:n,children:(0,w.jsx)(ho,{})})]});return e.options.InnerWrap?(0,w.jsx)(e.options.InnerWrap,{children:r}):r}function ho(){let e=Zi(),t=e._rendered,n=Ca(e.stores.matches,e=>t[0]??e),r=n[0],i=r==null?void 0:r.routeId;Ht(()=>{t[0]===n&&fo(t,!0)},[t,n]);let a=i?(0,w.jsx)(so,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,w.jsx)(Ui,{getResetKey:()=>r,onCatch:void 0,children:a})}var go=e=>({createMutableStore:ga,createReadonlyStore:ga,batch:pa}),_o=e=>new vo(e),vo=class extends Ir{constructor(e){super(e,go)}};function yo({router:e,children:t,...n}){Kt(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,w.jsx)(Xi.Provider,{value:e,children:t});return e.options.Wrap?(0,w.jsx)(e.options.Wrap,{children:r}):r}function bo({router:e,...t}){return(0,w.jsx)(yo,{router:e,...t,children:(0,w.jsx)(mo,{})})}var xo=b(),So=(0,C.createContext)({theme:`system`,setTheme:()=>null});function Co({children:e,defaultTheme:t=`system`,storageKey:n=`vite-ui-theme`,...r}){let[i,a]=(0,C.useState)(()=>localStorage.getItem(n)||t);(0,C.useEffect)(()=>{let e=window.document.documentElement;if(e.classList.remove(`light`,`dark`),i===`system`){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;e.classList.add(t);return}e.classList.add(i)},[i]);let o={theme:i,setTheme:e=>{localStorage.setItem(n,e),a(e)}};return(0,w.jsx)(So.Provider,{...r,value:o,children:e})}var wo=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),To=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Eo=e=>{let t=To(e);return t.charAt(0).toUpperCase()+t.slice(1)},Do=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Oo=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},ko={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`},Ao=(0,C.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,C.createElement)(`svg`,{ref:c,...ko,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Do(`lucide`,i),...!a&&!Oo(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,C.createElement)(e,t)),...Array.isArray(a)?a:[a]])),jo=(e,t)=>{let n=(0,C.forwardRef)(({className:n,...r},i)=>(0,C.createElement)(Ao,{ref:i,iconNode:t,className:Do(`lucide-${wo(Eo(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Eo(e),n},Mo=jo(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),No=jo(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Po=jo(`inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),Fo=jo(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Io=jo(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Lo=jo(`move-left`,[[`path`,{d:`M6 8L2 12L6 16`,key:`kyvwex`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]),Ro=jo(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),zo=jo(`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`}]]),Bo=(e,t,n,r,i,a,o,s)=>{let c=document.documentElement,l=[`light`,`dark`];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n=e===`class`,r=n&&a?i.map(e=>a[e]||e):i;n?(c.classList.remove(...r),c.classList.add(a&&a[t]?a[t]:t)):c.setAttribute(e,t)}),d(t)}function d(e){s&&l.includes(e)&&(c.style.colorScheme=e)}function f(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(o&&e===`system`?f():e)}catch{}},Vo=C.createContext(void 0),Ho={setTheme:e=>{},themes:[]},V=()=>C.useContext(Vo)??Ho;C.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:c,scriptProps:l})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return C.createElement(`script`,{...l,suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(${Bo.toString()})(${u})`}})});var Uo=u(v(),1);function Wo(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Go=e=>{switch(e){case`success`:return Jo;case`info`:return Xo;case`warning`:return Yo;case`error`:return Zo;default:return null}},Ko=Array(12).fill(0),qo=({visible:e,className:t})=>C.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},C.createElement(`div`,{className:`sonner-spinner`},Ko.map((e,t)=>C.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Jo=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Yo=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Xo=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Zo=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},C.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Qo=C.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},C.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),C.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),$o=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},es=1,ts=100,ns=e=>{var t;return typeof(e==null?void 0:e.id)==`number`||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:es++},rs=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-ts;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=ns(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0?!0:e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],C.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(as(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!C.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=ns(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},is=(e,t)=>rs.message(e,t),as=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,os=is,ss=Object.assign(os,{success:rs.success,info:rs.info,warning:rs.warning,error:rs.error,custom:rs.custom,message:rs.message,promise:rs.promise,dismiss:rs.dismiss,loading:rs.loading},{getHistory:()=>rs.toasts,getToasts:()=>rs.getActiveToasts()});Wo(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function cs(e){return e.label!==void 0}var ls=3,us=`24px`,ds=`16px`,fs=4e3,ps=356,ms=14,hs=45,gs=200;function _s(...e){return e.filter(Boolean).join(` `)}function vs(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ys=e=>{var t,n,r,i,a,o,s,c,l;let{invert:u,toast:d,unstyled:f,interacting:p,setHeights:m,visibleToasts:h,heights:g,index:_,toasts:v,expanded:y,removeToast:b,defaultRichColors:x,closeButton:S,style:w,cancelButtonStyle:T,actionButtonStyle:E,className:D=``,descriptionClassName:O=``,duration:k,position:A,gap:j,expandByDefault:M,classNames:N,icons:P,closeButtonAriaLabel:F=`Close toast`}=e,[I,ee]=C.useState(null),[te,ne]=C.useState(null),[re,ie]=C.useState(!1),[ae,oe]=C.useState(!1),[se,L]=C.useState(!1),[ce,le]=C.useState(!1),[ue,de]=C.useState(!1),[fe,R]=C.useState(0),[z,pe]=C.useState(0),me=C.useRef(d.duration||k||fs),he=C.useRef(null),ge=C.useRef(null),_e=_===0,ve=_+1<=h,ye=d.type,be=ye??`default`,xe=d.dismissible!==!1,Se=d.className||``,Ce=d.descriptionClassName||``,we=C.useMemo(()=>g.findIndex(e=>e.toastId===d.id)||0,[g,d.id]),Te=C.useMemo(()=>d.closeButton??S,[d.closeButton,S]),Ee=C.useMemo(()=>d.duration||k||fs,[d.duration,k]),De=C.useRef(0),Oe=C.useRef(0),ke=C.useRef(0),Ae=C.useRef(null),[je,Me]=A.split(`-`),Ne=C.useMemo(()=>g.reduce((e,t,n)=>n>=we?e:e+t.height,0),[g,we]),Pe=$o(),Fe=C.useMemo(()=>e.swipeDirections??vs(A),[e.swipeDirections,A]),Ie=d.invert||u,Le=ye===`loading`;Oe.current=C.useMemo(()=>we*j+Ne,[we,Ne]),C.useEffect(()=>{me.current=Ee},[Ee]),C.useEffect(()=>{ie(!0)},[]),C.useEffect(()=>{let e=ge.current;if(e){let t=e.getBoundingClientRect().height;return pe(t),m(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>m(e=>e.filter(e=>e.toastId!==d.id))}},[m,d.id]),C.useLayoutEffect(()=>{if(!re)return;let e=ge.current,t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,pe(n),m(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[re,d.title,d.description,m,d.id,d.jsx,d.action,d.cancel]);let Re=C.useCallback(()=>{oe(!0),R(Oe.current),m(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{b(d)},gs)},[d,b,m,Oe]);C.useEffect(()=>{if(d.promise&&ye===`loading`||d.duration===1/0||d.type===`loading`)return;let e;return y||p||Pe?(()=>{if(ke.current{d.onAutoClose==null||d.onAutoClose.call(d,d),Re()},me.current)),()=>clearTimeout(e)},[y,p,d,ye,Pe,Re]),C.useEffect(()=>{d.delete&&(Re(),d.onDismiss==null||d.onDismiss.call(d,d))},[Re,d.delete]);function ze(){var e;if(P!=null&&P.loading){var t;return C.createElement(`div`,{className:_s(N==null?void 0:N.loader,d==null||(t=d.classNames)==null?void 0:t.loader,`sonner-loader`),"data-visible":ye===`loading`},P.loading)}return C.createElement(qo,{className:_s(N==null?void 0:N.loader,d==null||(e=d.classNames)==null?void 0:e.loader),visible:ye===`loading`})}let Be=d.icon||(P==null?void 0:P[ye])||Go(ye);return C.createElement(`li`,{tabIndex:0,ref:ge,className:_s(D,Se,N==null?void 0:N.toast,d==null||(t=d.classNames)==null?void 0:t.toast,N==null?void 0:N[be],d==null||(n=d.classNames)==null?void 0:n[be]),"data-sonner-toast":``,"data-rich-colors":d.richColors??x,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":re,"data-promise":!!d.promise,"data-swiped":ue,"data-removed":ae,"data-visible":ve,"data-y-position":je,"data-x-position":Me,"data-index":_,"data-front":_e,"data-swiping":se,"data-dismissible":xe,"data-type":ye,"data-invert":Ie,"data-swipe-out":ce,"data-swipe-direction":te,"data-expanded":!!(y||M&&re),"data-testid":d.testId,style:{"--index":_,"--toasts-before":_,"--z-index":v.length-_,"--offset":`${ae?fe:Oe.current}px`,"--initial-height":M?`auto`:`${z}px`,...w,...d.style},onDragEnd:()=>{L(!1),ee(null),Ae.current=null},onPointerDown:e=>{e.button!==2&&(Le||!xe||(he.current=new Date,R(Oe.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(L(!0),Ae.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{var e,t,n;if(ce||!xe)return;Ae.current=null;let r=Number(((e=ge.current)==null?void 0:e.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``))||0),i=Number(((t=ge.current)==null?void 0:t.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``))||0),a=new Date().getTime()-((n=he.current)==null?void 0:n.getTime()),o=I===`x`?r:i,s=Math.abs(o)/a;if((I===`x`?Fe.includes(r>0?`right`:`left`):Fe.includes(i>0?`bottom`:`top`))&&(Math.abs(o)>=hs||s>.11)){R(Oe.current),d.onDismiss==null||d.onDismiss.call(d,d),ne(I===`x`?r>0?`right`:`left`:i>0?`down`:`up`),Re(),le(!0);return}else{var c,l;(c=ge.current)==null||c.style.setProperty(`--swipe-amount-x`,`0px`),(l=ge.current)==null||l.style.setProperty(`--swipe-amount-y`,`0px`)}de(!1),L(!1),ee(null)},onPointerMove:e=>{var t,n,r;if(!Ae.current||!xe||((t=window.getSelection())==null?void 0:t.toString().length)>0)return;let i=e.clientY-Ae.current.y,a=e.clientX-Ae.current.x;!I&&(Math.abs(a)>1||Math.abs(i)>1)&&ee(Math.abs(a)>Math.abs(i)?`x`:`y`);let o={x:0,y:0},s=e=>1/(1.5+Math.abs(e)/20);if(I===`y`){if(Fe.includes(`top`)||Fe.includes(`bottom`))if(Fe.includes(`top`)&&i<0||Fe.includes(`bottom`)&&i>0)o.y=i;else{let e=i*s(i);o.y=Math.abs(e)0)o.x=a;else{let e=a*s(a);o.x=Math.abs(e)0||Math.abs(o.y)>0)&&de(!0),(n=ge.current)==null||n.style.setProperty(`--swipe-amount-x`,`${o.x}px`),(r=ge.current)==null||r.style.setProperty(`--swipe-amount-y`,`${o.y}px`)}},Te&&!d.jsx&&ye!==`loading`?C.createElement(`button`,{"aria-label":F,"data-disabled":Le,"data-close-button":!0,onClick:Le||!xe?()=>{}:()=>{Re(),d.onDismiss==null||d.onDismiss.call(d,d)},className:_s(N==null?void 0:N.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(P==null?void 0:P.close)??Qo):null,(ye||d.icon||d.promise)&&d.icon!==null&&((P==null?void 0:P[ye])!==null||d.icon)?C.createElement(`div`,{"data-icon":``,className:_s(N==null?void 0:N.icon,d==null||(i=d.classNames)==null?void 0:i.icon)},ye===`loading`?d.icon||ze():d.promise?ze():null,ye===`loading`?null:Be):null,C.createElement(`div`,{"data-content":``,className:_s(N==null?void 0:N.content,d==null||(a=d.classNames)==null?void 0:a.content)},C.createElement(`div`,{"data-title":``,className:_s(N==null?void 0:N.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title==`function`?d.title():d.title),d.description?C.createElement(`div`,{"data-description":``,className:_s(O,Ce,N==null?void 0:N.description,d==null||(s=d.classNames)==null?void 0:s.description)},typeof d.description==`function`?d.description():d.description):null),C.isValidElement(d.cancel)?d.cancel:d.cancel&&cs(d.cancel)?C.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||T,onClick:e=>{cs(d.cancel)&&xe&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,e),Re())},className:_s(N==null?void 0:N.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,C.isValidElement(d.action)?d.action:d.action&&cs(d.action)?C.createElement(`button`,{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||E,onClick:e=>{cs(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,e),!e.defaultPrevented&&Re())},className:_s(N==null?void 0:N.actionButton,d==null||(l=d.classNames)==null?void 0:l.actionButton)},d.action.label):null)};function bs(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function xs(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ds:us;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Ss=C.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=ls,toastOptions:g,dir:_=bs(),gap:v=ms,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,w]=C.useState([]),T=C.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),E=C.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=C.useState([]),[k,A]=C.useState(!1),[j,M]=C.useState(!1),[N,P]=C.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),F=C.useRef(null),I=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),ee=C.useRef(null),te=C.useRef(!1),ne=C.useCallback(e=>{w(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||rs.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return C.useEffect(()=>rs.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{Uo.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),C.useEffect(()=>{if(d!==`system`){P(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),C.useEffect(()=>{S.length<=1&&A(!1)},[S]),C.useEffect(()=>{let e=e=>{var t;if(a.length>0&&a.every(t=>e[t]||e.code===t)){var n;A(!0),(n=F.current)==null||n.focus()}e.code===`Escape`&&(document.activeElement===F.current||(t=F.current)!=null&&t.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),C.useEffect(()=>{if(F.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,te.current=!1)}},[F.current]),C.createElement(`section`,{ref:t,"aria-label":b??`${x} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((t,n)=>{var i;let[a,d]=t.split(`-`);return T.length?C.createElement(`ol`,{key:t,dir:_===`auto`?bs():_,tabIndex:-1,ref:F,className:c,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":a,"data-x-position":d,style:{"--front-toast-height":`${((i=D[0])==null?void 0:i.height)||0}px`,"--width":`${ps}px`,"--gap":`${v}px`,...m,...xs(l,u)},onBlur:e=>{te.current&&!e.currentTarget.contains(e.relatedTarget)&&(te.current=!1,ee.current&&=(ee.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||te.current||(te.current=!0,ee.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>C.createElement(ys,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:(g==null?void 0:g.duration)??p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:h,closeButton:(g==null?void 0:g.closeButton)??s,interacting:j,position:t,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:ne,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:v,expanded:k,swipeDirections:e.swipeDirections}))):null}))}),Cs=({...e})=>{let{theme:t=`system`}=V();return(0,w.jsx)(Ss,{theme:t,className:`toaster group`,icons:{success:(0,w.jsx)(No,{className:`size-4`}),info:(0,w.jsx)(Fo,{className:`size-4`}),warning:(0,w.jsx)(zo,{className:`size-4`}),error:(0,w.jsx)(Ro,{className:`size-4`}),loading:(0,w.jsx)(Io,{className:`size-4 animate-spin`})},style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},...e})},ws=Object.defineProperty,Ts=(e,t)=>ws(e,`name`,{value:t,configurable:!0});function Es(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ts(Es,`setRef`);function Ds(...e){return t=>{let n=!1,r=e.map(e=>{let r=Es(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;tks(e,`name`,{value:t,configurable:!0});function js(e){let t=C.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=Hs(r),C.Children.forEach(r,e=>{if(Rs(e)){var t;o=!0;let n=e,r=`child`in n.props?n.props.child:n.props.children;for(;Bs(r)&&typeof Ks==`function`;)r=Ks(r._payload);a=Fs(n,r),s.push(a==null||(t=a.props)==null?void 0:t.children)}else s.push(e)}),a?a=C.cloneElement(a,void 0,s):!o&&C.Children.count(r)===1&&C.isValidElement(r)&&(a=r);let c=a?Ls(a):void 0,l=Os(n,c);if(!a){if(r||r===0)throw Error(o?Gs(e):Ws(e));return r}let u=Is(i,a.props??{});return a.type!==C.Fragment&&(u.ref=n?l:c),C.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}As(js,`createSlot`);var Ms=js(`Slot`),Ns=Symbol.for(`radix.slottable`);function Ps(e){let t=As(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ns,t}As(Ps,`createSlottable`);var Fs=As((e,t)=>`child`in e.props?C.isValidElement(t)?C.cloneElement(t,void 0,e.props.children(t.props.children)):null:C.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function Is(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(` `):r===`aria-describedby`&&(n[r]=Us(a,i))}return{...e,...n}}As(Is,`mergeProps`);function Ls(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}As(Ls,`getElementRef`);function Rs(e){return C.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ns}As(Rs,`isSlottable`);var zs=Symbol.for(`react.lazy`);function Bs(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===zs&&`_payload`in e&&Vs(e._payload)}As(Bs,`isLazyComponent`);function Vs(e){return typeof e==`object`&&!!e&&`then`in e}As(Vs,`isPromiseLike`);function Hs(e){let t=e;for(;Bs(t)&&typeof Ks==`function`;)t=Ks(t._payload);return t}As(Hs,`useUnwrappedLazy`);function Us(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}As(Us,`concatAriaDescribedby`);var Ws=As(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Gs=As(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Ks=C.use;function qs(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;ttypeof e==`boolean`?`${e}`:e===0?`0`:e;const Zs=Js,Qs=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zs(e,n==null?void 0:n.class,n==null?void 0:n.className);let{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{let t=n==null?void 0:n[e],r=a==null?void 0:a[e];if(t===null)return null;let o=Xs(t)||Xs(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Zs(e,o,t==null||(r=t.compoundVariants)==null?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]),n==null?void 0:n.class,n==null?void 0:n.className)};var $s=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t({classGroupId:e,validator:t}),tc=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),nc=`-`,rc=[],ic=`arbitrary..`,ac=e=>{let t=cc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return sc(e);let n=e.split(nc);return oc(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?$s(i,t):t:i||rc}return n[e]||rc}}},oc=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=oc(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(nc):e.slice(t).join(nc),s=a.length;for(let e=0;ee.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?ic+r:void 0})(),cc=e=>{let{theme:t,classGroups:n}=e;return lc(n,t)},lc=(e,t)=>{let n=tc();for(let r in e){let i=e[r];uc(i,n,r,t)}return n},uc=(e,t,n,r)=>{let i=e.length;for(let a=0;a{if(typeof e==`string`){fc(e,t,n);return}if(typeof e==`function`){pc(e,t,n,r);return}mc(e,t,n,r)},fc=(e,t,n)=>{let r=e===``?t:hc(t,e);r.classGroupId=n},pc=(e,t,n,r)=>{if(gc(e)){uc(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ec(n,e))},mc=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e{let n=e,r=t.split(nc),i=r.length;for(let e=0;e`isThemeGetter`in e&&e.isThemeGetter===!0,_c=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)}}},vc=`!`,yc=`:`,bc=[],xc=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Sc=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;si?a-i:void 0;return xc(t,l,c,u)};if(t){let e=t+yc,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):xc(bc,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Cc=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},wc=e=>({cache:_c(e.cacheSize),parseClassName:Sc(e),sortModifiers:Cc(e),postfixLookupClassGroupIds:Tc(e),...ac(e)}),Tc=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Ec),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?_+vc:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e0?` `+l:l)}return l},Oc=(...e)=>{let t=0,n,r,i=``;for(;t{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r{let n,r,i,a,o=o=>(n=wc(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=Dc(e,n);return i(e,a),a};return a=o,(...e)=>a(Oc(...e))},jc=[],Mc=e=>{let t=t=>t[e]||jc;return t.isThemeGetter=!0,t.themeKey=e,t},Nc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fc=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ic=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lc=/\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$/,Rc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,zc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vc=e=>Fc.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),Hc=e=>!!e&&Number.isInteger(Number(e)),Uc=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),Wc=e=>Ic.test(e),Gc=()=>!0,Kc=e=>Lc.test(e)&&!Rc.test(e),qc=()=>!1,Jc=e=>zc.test(e),Yc=e=>Bc.test(e),Xc=e=>!U(e)&&!W(e),Zc=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)),Qc=e=>pl(e,_l,qc),U=e=>Nc.test(e),$c=e=>pl(e,vl,Kc),el=e=>pl(e,yl,H),tl=e=>pl(e,xl,Gc),nl=e=>pl(e,bl,qc),rl=e=>pl(e,hl,qc),il=e=>pl(e,gl,Yc),al=e=>pl(e,Sl,Jc),W=e=>Pc.test(e),ol=e=>ml(e,vl),sl=e=>ml(e,bl),cl=e=>ml(e,hl),ll=e=>ml(e,_l),ul=e=>ml(e,gl),dl=e=>ml(e,Sl,!0),fl=e=>ml(e,xl,!0),pl=(e,t,n)=>{let r=Nc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ml=(e,t,n=!1)=>{let r=Pc.exec(e);return r?r[1]?t(r[1]):n:!1},hl=e=>e===`position`||e===`percentage`,gl=e=>e===`image`||e===`url`,_l=e=>e===`length`||e===`size`||e===`bg-size`,vl=e=>e===`length`,yl=e=>e===`number`,bl=e=>e===`family-name`,xl=e=>e===`number`||e===`weight`,Sl=e=>e===`shadow`,Cl=Ac(()=>{let e=Mc(`color`),t=Mc(`font`),n=Mc(`text`),r=Mc(`font-weight`),i=Mc(`tracking`),a=Mc(`leading`),o=Mc(`breakpoint`),s=Mc(`container`),c=Mc(`spacing`),l=Mc(`radius`),u=Mc(`shadow`),d=Mc(`inset-shadow`),f=Mc(`text-shadow`),p=Mc(`drop-shadow`),m=Mc(`blur`),h=Mc(`perspective`),g=Mc(`aspect`),_=Mc(`ease`),v=Mc(`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(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[Vc,`full`,`auto`,...w()],E=()=>[Hc,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,Hc,W,U]},Hc,W,U],O=()=>[Hc,`auto`,W,U],k=()=>[`auto`,`min`,`max`,`fr`,W,U],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Vc,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,Vc,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Vc,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,W,U],ee=()=>[...b(),cl,rl,{position:[W,U]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,ll,Qc,{size:[W,U]}],re=()=>[Uc,ol,$c],ie=()=>[``,`none`,`full`,l,W,U],ae=()=>[``,H,ol,$c],oe=()=>[`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`],L=()=>[H,Uc,cl,rl],ce=()=>[``,`none`,m,W,U],le=()=>[`none`,H,W,U],ue=()=>[`none`,H,W,U],de=()=>[H,W,U],fe=()=>[Vc,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Wc],breakpoint:[Wc],color:[Gc],container:[Wc],"drop-shadow":[Wc],ease:[`in`,`out`,`in-out`],font:[Xc],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Wc],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Wc],shadow:[Wc],spacing:[`px`,H],text:[Wc],"text-shadow":[Wc],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Vc,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[Zc],columns:[{columns:[H,`auto`,U,W,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:[Hc,`auto`,W,U]}],basis:[{basis:[Vc,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,Vc,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[Hc,`first`,`last`,`none`,W,U]}],"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:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],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:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,ol,$c]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,fl,tl]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Uc,U]}],"font-family":[{font:[sl,nl,t]}],"font-features":[{"font-features":[U]}],"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,W,U]}],"line-clamp":[{"line-clamp":[H,`none`,W,el]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,W,$c]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[H,`auto`,W,U]}],"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:[Hc,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],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`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Hc,W,U],radial:[``,W,U],conic:[``,Hc,W,U]},ul,il]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,ol,$c]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,dl,al]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,dl,al]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ae()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[H,$c]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,dl,al]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[H,W,U]}],"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":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:ce()}],brightness:[{brightness:[H,W,U]}],contrast:[{contrast:[H,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,dl,al]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,H,W,U]}],"hue-rotate":[{"hue-rotate":[H,W,U]}],invert:[{invert:[``,H,W,U]}],saturate:[{saturate:[H,W,U]}],sepia:[{sepia:[``,H,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[H,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[H,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,H,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[H,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[H,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,W,U]}],"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`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[H,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],zoom:[{zoom:[Hc,W,U]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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-in`,`zoom-out`,W,U]}],"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":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"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`]}],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`,W,U]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[H,ol,$c,el]}],stroke:[{stroke:[`none`,...I()]}],"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":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`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-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`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-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`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-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`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 wl(...e){return Cl(Js(e))}function Tl(e){if(e==null)return`-`;if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**+r).toFixed(2))} ${n[r]}`}var El=Qs(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{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:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input 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`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Dl({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,w.jsx)(r?Ms:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:wl(El({variant:t,size:n,className:e})),...i})}function Ol(){return(0,w.jsx)(`div`,{className:`min-h-screen p-4 box-border bg-gray-50 flex flex-col justify-center items-center`,children:(0,w.jsxs)(`div`,{className:`p-4 flex flex-col justify-center items-center`,children:[(0,w.jsx)(zo,{size:80,className:`text-red-500`}),(0,w.jsx)(`div`,{className:`text-2xl mt-8`,children:`系统错误`}),(0,w.jsx)(`div`,{className:`text-sm text-black/50 mt-2`,children:`请您稍后再试,或者联系管理员`}),(0,w.jsx)(`div`,{className:`mt-4`,children:(0,w.jsxs)(Dl,{className:`!px-8 rounded-full`,onClick:()=>{fP.history.canGoBack()?fP.history.back():fP.navigate({to:`/`})},children:[(0,w.jsx)(Lo,{}),`返回首页`]})})]})})}function kl(){return(0,w.jsx)(`div`,{className:`min-h-screen p-4 box-border bg-gray-50 flex flex-col justify-center items-center`,children:(0,w.jsxs)(`div`,{className:`p-4 flex flex-col justify-center items-center`,children:[(0,w.jsx)(Po,{size:80,className:`text-gary-500`}),(0,w.jsx)(`div`,{className:`text-2xl mt-8`,children:`页面不存在`}),(0,w.jsx)(`div`,{className:`text-sm text-black/50 mt-2`,children:`请您稍后再试,或者联系管理员`}),(0,w.jsx)(`div`,{className:`mt-4`,children:(0,w.jsxs)(Dl,{className:`px-8! rounded-full`,onClick:()=>{fP.history.canGoBack()?fP.history.back():fP.navigate({to:`/`})},children:[(0,w.jsx)(Lo,{}),`返回首页`]})})]})})}function Al({className:e,...t}){return(0,w.jsx)(Io,{role:`status`,"aria-label":`Loading`,className:wl(`size-4 animate-spin`,e),...t})}function jl(){return(0,w.jsx)(`div`,{className:`min-h-full h-full flex flex-col justify-center items-center p-4 gap-2`,children:(0,w.jsx)(Al,{className:`text-primary h-6 w-6`})})}function Ml(e,t){return function(){return e.apply(t,arguments)}}var{toString:Nl}=Object.prototype,{getPrototypeOf:Pl}=Object,{iterator:Fl,toStringTag:Il}=Symbol,Ll=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Rl=e=>typeof e==`string`&&(e===`__proto__`||e===`constructor`||e===`prototype`),zl=(e,t,n)=>e===Object.prototype||!n&&t===null,Bl=e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(Rl(t))return!1;let n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&n.writable===!0})},Vl=(e,t)=>{let n=e,r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);let i=Pl(n);if(zl(n,i,n===e))return!1;if(Ll(n,t))return!0;n=i}return!1},Hl=(e,t)=>e!=null&&Vl(e,t)?e[t]:void 0,Ul=e=>{if(e==null||typeof e!=`object`&&typeof e!=`function`)return e;let t=Pl(e);if(t===null&&Bl(e))return e;let n=Object.create(null),r=Object.create(null),i=[],a=e;for(;a!=null&&i.indexOf(a)===-1;){i.push(a);let o=a===e?t:Pl(a);if(zl(a,o,a===e))break;let s=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(a));for(let t of s)Rl(t)||Ll(r,t)||(n[t]=e[t],r[t]=!0);a=o}return n},Wl=(e=>t=>{let n=Nl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gl=e=>(e=e.toLowerCase(),t=>Wl(t)===e),Kl=e=>t=>typeof t===e,{isArray:ql}=Array,Jl=Kl(`undefined`);function Yl(e){return e!==null&&!Jl(e)&&e.constructor!==null&&!Jl(e.constructor)&&$l(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Xl=Gl(`ArrayBuffer`);function Zl(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Xl(e.buffer),t}var Ql=Kl(`string`),$l=Kl(`function`),eu=Kl(`number`),tu=e=>typeof e==`object`&&!!e,nu=e=>e===!0||e===!1,ru=e=>{if(!tu(e))return!1;let t=Pl(e);return(t===null||t===Object.prototype||Pl(t)===null)&&(zl(e,t,!0)||!Ll(e,Il)&&!Ll(e,Fl))},iu=e=>{if(!tu(e)||Yl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},au=Gl(`Date`),ou=Gl(`File`),su=e=>!!(e&&e.uri!==void 0),cu=e=>e&&e.getParts!==void 0,lu=Gl(`Blob`),uu=Gl(`FileList`),du=Gl(`Set`),fu=e=>tu(e)&&$l(e.pipe);function pu(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var mu=pu(),hu=mu.FormData===void 0?void 0:mu.FormData,gu=e=>{if(!e)return!1;if(hu&&e instanceof hu)return!0;let t=Pl(e);if(!t||t===Object.prototype||!$l(e.append))return!1;let n=Wl(e);return n===`formdata`||n===`object`&&$l(e.toString)&&e.toString()===`[object FormData]`},_u=Gl(`URLSearchParams`),[vu,yu,bu,xu]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Gl),Su=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Cu(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),ql(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Tu=(()=>typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global)(),Eu=e=>!Jl(e)&&e!==Tu;function Du(...e){let{caseless:t,skipUndefined:n}=Eu(this)&&this||{},r={},i=t?Object.create(null):null,a=(e,t)=>{if(t===`__proto__`||t===`constructor`||t===`prototype`)return;let a=t;if(i&&typeof t==`string`){let e=t.toLowerCase(),n=i[e];n!==void 0&&Ll(r,n)?a=n:i[e]=t}let o=Ll(r,a)?r[a]:void 0;ru(o)&&ru(e)?r[a]=Du(o,e):ru(e)?r[a]=Du({},e):ql(e)?r[a]=e.slice():(!n||!Jl(e))&&(r[a]=e)};for(let t=0,n=e.length;t(Cu(t,(t,r)=>{n&&$l(t)?Object.defineProperty(e,r,{__proto__:null,value:Ml(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ku=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Au=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},ju=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Pl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mu=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Nu=e=>{if(!e)return null;if(ql(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;let n=new Set,r=new Set,i=e;for(;i!=null&&n.size{let r=+e;Number.isInteger(r)&&r>=0&&r0;)a[t]=e[t];return a},Pu=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Pl(Uint8Array)),Fu=(e,t)=>{let n=(e&&e[Fl]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Iu=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Lu=Gl(`HTMLFormElement`),Ru=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:zu}=Object.prototype,Bu=Gl(`RegExp`),Vu=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Cu(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Hu=e=>{Vu(e,(t,n)=>{if($l(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if($l(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Uu=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return ql(e)?r(e):r(String(e).split(t)),n},Wu=()=>{},Gu=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ku(e){return!!(e&&$l(e.append)&&e[Il]===`FormData`&&e[Fl])}var qu=e=>{let t=new WeakSet,n=e=>{if(tu(e)){if(t.has(e))return;if(Yl(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(du(e)){r=[];for(let t of e){let e=n(t);!Jl(e)&&r.push(e)}}else r=ql(e)?[]:{},Cu(e,(e,t)=>{let i=n(e);!Jl(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},Ju=Gl(`AsyncFunction`),Yu=e=>e&&(tu(e)||$l(e))&&$l(e.then)&&$l(e.catch),Xu=((e,t)=>e?setImmediate:t?((e,t)=>(Tu.addEventListener(`message`,({source:n,data:r})=>{n===Tu&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Tu.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,$l(Tu.postMessage)),Zu=typeof queueMicrotask<`u`?queueMicrotask.bind(Tu):typeof process<`u`&&process.nextTick||Xu,Qu=e=>e!=null&&$l(e[Fl]),G={isArray:ql,isArrayBuffer:Xl,isBuffer:Yl,isFormData:gu,isArrayBufferView:Zl,isString:Ql,isNumber:eu,isBoolean:nu,isObject:tu,isPlainObject:ru,isEmptyObject:iu,isReadableStream:vu,isRequest:yu,isResponse:bu,isHeaders:xu,isUndefined:Jl,isDate:au,isFile:ou,isReactNativeBlob:su,isReactNative:cu,isBlob:lu,isRegExp:Bu,isFunction:$l,isStream:fu,isURLSearchParams:_u,isTypedArray:Pu,isFileList:uu,forEach:Cu,merge:Du,extend:Ou,trim:Su,stripBOM:ku,inherits:Au,toFlatObject:ju,kindOf:Wl,kindOfTest:Gl,endsWith:Mu,toArray:Nu,forEachEntry:Fu,matchAll:Iu,isHTMLForm:Lu,hasOwnProperty:Ll,hasOwnProp:Ll,hasOwnInPrototypeChain:Vl,getSafeProp:Hl,toSafeFlatObject:Ul,reduceDescriptors:Vu,freezeMethods:Hu,toObjectSet:Uu,toCamelCase:Ru,noop:Wu,toFiniteNumber:Gu,findKey:wu,global:Tu,isContextDefined:Eu,isSpecCompliantForm:Ku,toJSONObject:qu,isAsyncFn:Ju,isThenable:Yu,setImmediate:Xu,asap:Zu,isIterable:Qu,isSafeIterable:e=>e!=null&&Vl(e,Fl)&&Qu(e)},$u=G.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),ed=e=>{let t=Object.create(null),n,r,i;return e&&e.split(` `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=G.hasOwnProp(t,n);!n||a&&G.hasOwnProp($u,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function td(e){let t=0,n=e.length;for(;tt;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var K=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),nd=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function rd(e,t){return G.isArray(e)?e.map(e=>rd(e,t)):td(String(e).replace(t,``))}const id=e=>rd(e,K),ad=e=>rd(e,nd);function od(e){let t=Object.create(null);return G.forEach(e.toJSON(),(e,n)=>{t[n]=ad(e)}),t}var sd=Symbol(`internals`);function cd(e){return e&&String(e).trim().toLowerCase()}function ld(e){return e===!1||e==null?e:G.isArray(e)?e.map(ld):id(String(e))}function ud(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var dd=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function fd(e){let t=0,n=e.length;for(;tt;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function pd(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r=t))return e;n+=e[r]}return n}function md(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=fd(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=fd(i.slice(0,a));if(!dd.test(o))return;let s=o.toLowerCase();s===`__proto__`||s===`constructor`||s===`prototype`||(t[s]=pd(fd(i.slice(a+1))))}for(let e=0;e/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),gd=`__Proto__`,_d=e=>e===`__proto__`?gd:e;function vd(e,t,n,r,i){if(G.isFunction(r))return r.call(e,t,n);if(i&&(t=n),G.isString(t)){if(G.isString(r))return t.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(t)}}function yd(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function bd(e,t){let n=G.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var xd=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=cd(t);if(!i)return;let a=G.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[_d(a||t)]=ld(e))}let a=(e,t)=>G.forEach(e,(e,n)=>i(e,n,t));if(G.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(G.isString(e)&&(e=e.trim())&&!hd(e))a(ed(e),t);else if(G.isObject(e)&&G.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!G.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],G.hasOwnProp(n,i)?(r=n[i],n[i]=G.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=cd(e),e){let n=G.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return ud(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=cd(e),e){let n=G.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||vd(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=cd(e),e){let i=G.findKey(n,e);i&&(!t||vd(n,n[i],i,t))&&(delete n[i],r=!0)}}return G.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||vd(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n=Object.create(null);return G.forEach(this,(r,i)=>{let a=G.findKey(n,i);if(a){t[a]=ld(r),delete t[i];return}let o=_d(e?yd(i):String(i).trim());o!==i&&delete t[i],t[o]=ld(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return G.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&G.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` `)}getSetCookie(){let e=this.get(`set-cookie`);return G.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return md(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[sd]=this[sd]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=cd(e);t[r]||(bd(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}};xd.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),G.reduceDescriptors(xd.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),G.freezeMethods(xd);var Sd=xd;const Cd=`[REDACTED ****]`;function wd(e){if(G.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(G.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function Td(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||G.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof Sd&&(e=e.toJSON()),r.push(e);let t;if(G.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);G.isUndefined(r)||(t[n]=r)});else{if(!G.isPlainObject(e)&&wd(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?Cd:i(a);G.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function Ed(e){try{return String(e)}catch{return``}}function Dd(e){return e.errors.map(e=>{try{return e&&e.message?Ed(e.message):Ed(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var Od=Symbol(`causeStack`);function kd(e,t){let n=G.hasOwnProp(e,Od)&&e[Od];return n&&t.endsWith(n)?t.length-n.length:-1}function Ad(e,t){try{let n=t&&t.stack;if(typeof n!=`string`||!n)return;let r=e.stack;if(typeof r!=`string`||!r)return;let i=` Caused by: `+n;e.stack=r+i,Object.defineProperty(e,Od,{__proto__:null,value:i})}catch{}}var jd=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&G.isArray(t.errors)&&t.errors.length&&(s=Dd(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,`cause`,{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,Ad(c,t),t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&G.hasOwnProp(e,`redact`)?e.redact:void 0,n=G.isArray(t)&&t.length>0?Td(e,t):G.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};jd.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,jd.ERR_BAD_OPTION=`ERR_BAD_OPTION`,jd.ECONNABORTED=`ECONNABORTED`,jd.ETIMEDOUT=`ETIMEDOUT`,jd.ECONNREFUSED=`ECONNREFUSED`,jd.ERR_NETWORK=`ERR_NETWORK`,jd.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,jd.ERR_DEPRECATED=`ERR_DEPRECATED`,jd.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,jd.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,jd.ERR_CANCELED=`ERR_CANCELED`,jd.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,jd.ERR_INVALID_URL=`ERR_INVALID_URL`,jd.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;var q=jd;function Md(e){return G.isPlainObject(e)||G.isArray(e)}function Nd(e){return G.endsWith(e,`[]`)?e.slice(0,-2):e}function Pd(e,t,n){return e?e.concat(t).map(function(e,t){return e=Nd(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Fd(e){return G.isArray(e)&&!e.some(Md)}var Id=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)});function Ld(e,t,n){if(!G.isObject(e))throw TypeError(`target must be an object`);t||=new FormData;let r=(e,t)=>{let r=G.getSafeProp(n,e);return G.isUndefined(r)?t:r},i=r(`metaTokens`,!0),a=r(`visitor`)||h,o=r(`dots`,!1),s=r(`indexes`,!1),c=r(`Blob`)||typeof Blob<`u`&&Blob,l=r(`maxDepth`,100),u=c&&G.isSpecCompliantForm(t),d=[];if(!G.isFunction(a))throw TypeError(`visitor must be a function`);function f(e){if(e===null)return``;if(G.isDate(e))return e.toISOString();if(G.isBoolean(e))return e.toString();if(!u&&G.isBlob(e))throw new q(`Blob is not supported. Use a Buffer instead.`);if(G.isArrayBuffer(e)||G.isTypedArray(e)){if(u&&typeof c==`function`)return new c([e]);throw new q(`Blob is not supported. Use a Buffer instead.`,q.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new q(`Object is too deeply nested (`+e+` levels). Max depth: `+l,q.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(e,t){if(l===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!G.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}function h(e,n,r){let a=e;if(G.isReactNative(t)&&G.isReactNativeBlob(e))return t.append(Pd(r,n,o),f(e)),!1;if(e&&!r&&typeof e==`object`){if(G.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=m(e,1);else if(G.isArray(e)&&Fd(e)||(G.isFileList(e)||G.endsWith(n,`[]`))&&(a=G.toArray(e)))return n=Nd(n),a.forEach(function(e,r){!(G.isUndefined(e)||e===null)&&t.append(s===!0?Pd([n],r,o):s===null?n:n+`[]`,f(e))}),!1}return Md(e)?!0:(t.append(Pd(r,n,o),f(e)),!1)}let g=Object.assign(Id,{defaultVisitor:h,convertValue:f,isVisitable:Md});function _(e,n,r=0){if(!G.isUndefined(e)){if(p(r),d.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));d.push(e),G.forEach(e,function(e,i){(!(G.isUndefined(e)||e===null)&&a.call(t,e,G.isString(i)?i.trim():i,n,g))===!0&&_(e,n?n.concat(i):[i],r+1)}),d.pop()}}if(!G.isObject(e))throw TypeError(`data must be an object`);return _(e),t}var Rd=Ld;function zd(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Bd(e,t){this._pairs=[],e&&Rd(e,this,t)}var Vd=Bd.prototype;Vd.append=function(e,t){this._pairs.push([e,t])},Vd.toString=function(e){let t=e?t=>e.call(this,t,zd):zd;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};var Hd=Bd;function Ud(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Wd(e,t,n){if(!t)return e;e||=``;let r=G.isFunction(n)?{serialize:n}:n,i=G.getSafeProp(r,`encode`)||Ud,a=G.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):G.isURLSearchParams(t)?t.toString():new Hd(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Gd=Symbol(`internals`);function Kd(e){return e?e.length:0}function qd(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Jd(e){return typeof e==`string`&&e!==``&&String(Number(e))===e?Number(e):e}function Yd(e,t){let n=e.handlers,r=Kd(n);n===t.handlersRef?r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()):(t.handlersRef=n,t.handlerEntries.clear()),t.handlersLength=r}var Xd=class{constructor(){this.handlers=[],this[Gd]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){let r={fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},i=this[Gd];this.handlers??=[],Yd(this,i);let a=i.nextId++;return this.handlers.push(r),i.handlerEntries.set(a,{handler:r,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,a}eject(e){let t=this[Gd];Yd(this,t);let n=Jd(e),r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(qd(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Yd(this,this[Gd]))}forEach(e){let t=this[Gd];Yd(this,t),t.iterationDepth++;try{G.forEach(this.handlers,function(t){t!==null&&e(t)})}finally{--t.iterationDepth||(Yd(this,t),qd(this.handlers),t.handlersLength=Kd(this.handlers))}}},Zd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},Qd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:Hd,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},$d=c({hasBrowserEnv:()=>ef,hasStandardBrowserEnv:()=>nf,hasStandardBrowserWebWorkerEnv:()=>rf,navigator:()=>tf,origin:()=>af},1),ef=typeof window<`u`&&typeof document<`u`,tf=typeof navigator==`object`&&navigator||void 0,nf=ef&&(!tf||[`ReactNative`,`NativeScript`,`NS`].indexOf(tf.product)<0),rf=(()=>typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`)(),af=ef&&window.location.href||`http://localhost`,of={...$d,...Qd};function sf(e,t){return Rd(e,new of.classes.URLSearchParams,{visitor:function(e,t,n,r){return of.isNode&&G.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var cf=100;function lf(e){if(e>cf)throw new q(`FormData field is too deeply nested (`+e+` levels). Max depth: `+cf,q.ERR_FORM_DATA_DEPTH_EXCEEDED)}function uf(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)lf(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function df(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;re!==String(t))?df(e):e}function pf(e){let t=[e];for(;t.length;){let e=t.pop();Object.keys(e).forEach(n=>{let r=e[n]=ff(e[n]);(G.isArray(r)||G.isPlainObject(r))&&t.push(r)})}return e}function mf(e){function t(e,n,r,i){lf(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&G.isArray(r)?r.length:a,s?(G.hasOwnProp(r,a)?(r[a]=ff(r[a]),r[a]=G.isArray(r[a])?r[a].concat(n):[r[a],n]):r[a]=n,!o):((!G.hasOwnProp(r,a)||!G.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&G.isArray(r[a])&&(r[a]=df(r[a])),!o)}if(G.isFormData(e)&&G.isFunction(e.entries)){let n={};return G.forEachEntry(e,(e,r)=>{t(uf(e),r,n,0)}),pf(n)}return null}var hf=mf,gf=Object.freeze([`get`,`delete`,`head`,`options`,`post`,`put`,`patch`,`purge`,`link`,`unlink`,`query`]),_f=(e,t)=>e!=null&&G.hasOwnProp(e,t)?e[t]:void 0;function vf(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var yf={transitional:Zd,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=G.isObject(e);if(i&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return r?JSON.stringify(hf(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=_f(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return sf(e,t).toString();if((a=G.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=_f(this,`env`),r=n&&n.FormData;return Rd(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),vf(e)):e}],transformResponse:[function(e){let t=_f(this,`transitional`)||yf.transitional,n=t&&t.forcedJSONParsing,r=_f(this,`responseType`),i=r===`json`;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,_f(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?q.from(e,q.ERR_BAD_RESPONSE,this,null,_f(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:of.classes.FormData,Blob:of.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};G.forEach(gf,e=>{yf.headers[e]={}});var bf=yf;function xf(e,t){let n=this||bf,r=t||n,i=Sd.from(r.headers),a=r.data;return G.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Sf(e){return!!(e&&e.__CANCEL__)}var Cf=class extends q{constructor(e,t,n){super(e??`canceled`,q.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function wf(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q(`Request failed with status code `+n.status,n.status>=400&&n.status<500?q.ERR_BAD_REQUEST:q.ERR_BAD_RESPONSE,n.config,n.request,n))}var Tf=/[\t\n\r]/g;function Ef(e){if(typeof e!=`string`)return e;let t=0;for(;t{try{return decodeURIComponent(e)}catch{return e}},kf=of.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];G.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),G.isString(r)&&s.push(`path=${r}`),G.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),G.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie;if(!t)return null;let n=t.split(`;`);for(let t=0;t{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i),(...e)=>o(e)]}var Nf=Mf;const Pf=(e,t,n=3)=>{let r=0,i=jf(50,250);return Nf(n=>{if(!n||!G.isNumber(n.loaded))return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Ff=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},If=(e,t=G.asap)=>(...n)=>t(()=>e(...n));var Lf=of.hasStandardBrowserEnv?(e=>t=>(t=new URL(t,document.baseURI||of.origin),e.protocol===t.protocol&&e.host===t.host&&e.port===t.port))(new URL(of.origin)):()=>!0;function Rf(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function zf(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var Bf=/^https?:(?!\/\/)/i;function Vf(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${Cd}`)}function Hf(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Cd}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Cd}`);return n===-1?r:`${r}#${Vf(t.slice(n+1))}`}function Uf(e,t){if(typeof e==`string`){let n=Ef(e);if(Bf.test(n))throw new q(`Invalid URL ${JSON.stringify(Hf(n))}: missing "//" after protocol`,q.ERR_INVALID_URL,t)}}function Wf(e,t,n,r){Uf(t,r);let i=!Rf(t);return e&&(i||n===!1)?(Uf(e,r),zf(e,t)):t}function Gf(e){let t=[{value:e}],n=new WeakSet,r=new WeakSet;for(;t.length;){let{value:e,done:i}=t.pop();if(!G.isPlainObject(e)&&!G.isArray(e))continue;if(i){n.delete(e);continue}if(n.has(e))throw new q(`Circular reference detected in params`,q.ERR_BAD_OPTION_VALUE);if(r.has(e))continue;r.add(e),n.add(e),t.push({value:e,done:!0});let a=Object.keys(e);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(e).forEach(t=>{let n=Object.getOwnPropertyDescriptor(e,t);n&&n.enumerable&&a.push(t)}),a.forEach(n=>{if(n===`__proto__`||n===`constructor`||n===`prototype`){let r=Object.getOwnPropertyDescriptor(e,n);r&&G.hasOwnProp(r,`value`)&&t.push({value:r.value})}else t.push({value:e[n]})})}}var J=e=>e instanceof Sd?{...e}:e,Kf=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{let n=Object.getOwnPropertyDescriptor(e,t);return n&&n.enumerable})):Object.keys(e);function qf(e,t){let n=[],r=new WeakMap,i={};function a(e,t){if(!G.isPlainObject(t))return G.isArray(t)?t.slice():t;let a=G.isPlainObject(e)?e:i,o=r.get(t);if(o||(o=new WeakMap,r.set(t,o)),o.has(a))return o.get(a);let s={};return o.set(a,s),n.push({base:a,source:t,result:s}),s}let o=G.isUndefined(t)?a(void 0,e):a(e,t);for(;n.length;){let{base:e,source:t,result:r}=n.pop(),i=new Set(Kf(e)),o=new Set(Kf(t));new Set([...i,...o]).forEach(n=>{if(n===`__proto__`||n===`constructor`||n===`prototype`)return;let s=o.has(n),c=s?t[n]:void 0,l=(!s||G.isPlainObject(c))&&i.has(n)?e[n]:void 0;r[n]=s?a(l,c):a(void 0,l)})}return Gf(o),o}function Jf(e,t,n,r){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:r},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function Yf(e,t,n,r){if(G.isUndefined(t)){if(!G.isUndefined(e))return Jf(void 0,e,n,r)}else return Jf(e,t,n,r)}function Xf(e,t){if(!G.isUndefined(t))return Jf(void 0,t)}function Zf(e,t){if(G.isUndefined(t)){if(!G.isUndefined(e))return Jf(void 0,e)}else return Jf(void 0,t)}function Qf(e,t,n){let r=G.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!G.isUndefined(r))if(G.isPlainObject(r)){if(G.hasOwnProp(r,n))return r[n]}else return;let i=G.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(G.isPlainObject(i)&&G.hasOwnProp(i,n))return i[n]}function $f(e,t,n,r,i){if(G.hasOwnProp(i,n))return Jf(e,t);if(G.hasOwnProp(r,n))return Jf(void 0,e)}function ep(e,t,n){return Yf(J(e),J(t),n,!0)}var tp=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),np={url:Xf,method:Xf,data:Xf,baseURL:Zf,transformRequest:Zf,transformResponse:Zf,params:qf,paramsSerializer:Zf,timeout:Zf,timeoutErrorMessage:Zf,withCredentials:Zf,withXSRFToken:Zf,adapter:Zf,responseType:Zf,xsrfCookieName:Zf,xsrfHeaderName:Zf,onUploadProgress:Zf,onDownloadProgress:Zf,decompress:Zf,maxContentLength:Zf,maxBodyLength:Zf,beforeRedirect:Zf,transport:Zf,httpAgent:Zf,httpsAgent:Zf,cancelToken:Zf,socketPath:Zf,allowedSocketPaths:Zf,responseEncoding:Zf,validateStatus:$f,headers:ep};function rp(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,`hasOwnProperty`,tp);let r=Kf({...e,...t});for(let i=0,a=r.length;i{ip.includes(t.toLowerCase())&&e.set(t,n)})}var op=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),sp=e=>kf.read(e);function cp(e,t=sp){let n=rp({},e),r=e=>G.hasOwnProp(n,e)?n[e]:void 0,i=r(`data`),a=r(`withXSRFToken`),o=r(`xsrfHeaderName`),s=r(`xsrfCookieName`),c=r(`headers`),l=r(`auth`),u=r(`baseURL`),d=r(`allowAbsoluteUrls`),f=r(`url`);if(n.headers=c=Sd.from(c),n.url=Wd(Wf(u,f,d,n),r(`params`),r(`paramsSerializer`)),l){let t=G.getSafeProp(l,`username`)||``,n=G.getSafeProp(l,`password`)||``,i=r(`transitional`),a=i&&G.hasOwnProp(i,`encodeBasicAuthUsername`)&&i.encodeBasicAuthUsername===!0;try{c.set(`Authorization`,`Basic `+btoa((a?op(t):t)+`:`+(n?op(n):``)))}catch(t){throw q.from(t,q.ERR_BAD_OPTION_VALUE,e)}}if(G.isFormData(i)){let e=G.getSafeProp(i,`getHeaders`);of.hasStandardBrowserEnv||of.hasStandardBrowserWebWorkerEnv||G.isReactNative(i)?c.setContentType(void 0):G.isFunction(e)&&ap(c,e.call(i),r(`formDataHeaderPolicy`))}if(of.hasStandardBrowserEnv&&(G.isFunction(a)&&(a=a(n)),a===!0||a==null&&Lf(n.url))){let e=o&&s&&t(s);e&&c.set(o,e)}return n}var lp=cp,up=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r;try{let e=of.hasStandardBrowserEnv&&typeof window<`u`&&window.cookieStore;r=e&&G.isFunction(e.get)}catch{}let i,a=lp(e,r?e=>(i=e,null):void 0),o=a.data,s=Sd.from(a.headers).normalize(),{responseType:c,onUploadProgress:l,onDownloadProgress:u}=a,d,f,p,m,h,g,_;function v(){clearTimeout(f);try{h&&h()}catch(e){setTimeout(()=>{throw e})}try{g&&g()}catch(e){setTimeout(()=>{throw e})}y&&(m&&y.removeEventListener(`progress`,m),y.upload&&(p&&y.upload.removeEventListener(`progress`,p),h&&y.upload.removeEventListener(`loadend`,h))),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener(`abort`,d)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function b(r){if(!y)return;if(y.status===0&&(Df(Ef(a.url))||Df(of.origin))!==`file`&&!(y.responseURL&&y.responseURL.startsWith(`file:`))){n(new q(`Request aborted`,q.ECONNABORTED,e,y)),v(),y=null;return}try{r?_&&_(r):g&&g()}catch(e){setTimeout(()=>{throw e})}if(!y)return;let i=Sd.from(`getAllResponseHeaders`in y&&y.getAllResponseHeaders());wf(function(e){t(e),v()},function(e){n(e),v()},{data:!c||c===`text`||c===`json`?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:i,config:e,request:y}),y=null}if(`onloadend`in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith(`file:`))||setTimeout(b)},y.onabort=function(){y&&=(n(new q(`Request aborted`,q.ECONNABORTED,e,y)),v(),null)},y.onerror=function(t){let r=new q(t&&t.message?t.message:`Network Error`,q.ERR_NETWORK,e,y);r.event=t||null,n(r),v(),y=null},y.ontimeout=function(){if(!y)return;let t=a.timeout?`timeout of `+a.timeout+`ms exceeded`:`timeout exceeded`,r=a.transitional||Zd;a.timeoutErrorMessage&&(t=a.timeoutErrorMessage),n(new q(t,r.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,y)),v(),y=null},o===void 0&&s.setContentType(null),G.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),c&&c!==`json`&&(y.responseType=a.responseType),u&&([m,g,_]=Pf(u,!0),y.addEventListener(`progress`,m)),l&&y.upload&&([p,h]=Pf(l),y.upload.addEventListener(`progress`,p),y.upload.addEventListener(`loadend`,h)),a.cancelToken||a.signal){if(d=t=>{if(!y)return;n(!t||t.type?new Cf(null,e,y):t);let r=y;v(),y=null,r.abort()},a.cancelToken&&a.cancelToken.subscribe(d),!y)return;a.signal&&(a.signal.aborted?d():a.signal.addEventListener(`abort`,d))}if(!y)return;let x=Df(a.url);if(x&&!of.protocols.includes(x)){n(new q(`Unsupported protocol `+x+`:`,q.ERR_BAD_REQUEST,e)),v();return}let S=()=>{y&&(`setRequestHeader`in y&&G.forEach(od(s),function(e,t){y.setRequestHeader(t,e)}),y.send(o||null))};if(i){let t=typeof performance<`u`&&G.isFunction(performance.now)?()=>performance.now():Date.now,r=y.timeout>0?t()+Number(y.timeout):void 0,o=()=>{if(!y)return;let e=y;e.ontimeout(),e.abort()};if(r!==void 0){let e=()=>{let n=r-t();n>0?f=setTimeout(e,Math.min(n,2147483647)):o()};e()}kf.readAsync(i).then(e=>{if(y){if(r!==void 0&&t()>=r){o();return}if(e){let t=G.hasOwnProp(a,`xsrfHeaderName`)&&a.xsrfHeaderName;s.set(t,e)}S()}}).catch(t=>{y&&=(n(q.from(t,null,e,y)),v(),null)})}else S()})},dp=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof q?t:new Cf(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new q(`timeout of ${t}ms exceeded`,q.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{let t=G.getSafeProp(e,`unsubscribe`);G.isFunction(t)?t.call(e,i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{if(!r){if(e.aborted){i.call(e);return}e.addEventListener(`abort`,i,{once:!0})}});let{signal:s}=n;return s.unsubscribe=()=>G.asap(o),s};const fp=function*(e,t){let n=e.byteLength;if(!t||n{let i=pp(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})};var gp=`\r `,_p=e=>String(e).replace(/\r\n|\r|\n/g,gp),vp=e=>String(e).replace(/[\r\n"]/g,e=>e===`\r`?`%0D`:e===` `?`%0A`:`%22`),yp=(e,t)=>{let n=0;for(let r=0;r=55296&&i<=56319&&e.charCodeAt(r+1)>=56320&&e.charCodeAt(r+1)<=57343?(n+=4,r++):n+=3}return n},bp=class extends TypeError{constructor(e,t){super(e),this.name=`FormDataError`,this.reason=t}};function xp(e,t,n,r,i){if(!G.isFunction(t))throw new bp(`Blob is not supported`,`blob`);if(!G.isString(i)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(i)||/ $/.test(i))throw new bp(`Invalid multipart boundary`,`boundary`);let a=`--`+i+`--\r `,o=a.length,s=[],c=e=>{if(o+e>n)throw r()};c(0);for(let[t,n]of e){let e=G.isString(n),r=e?yp(n,!0):n.size;if(!Number.isFinite(r)||r<0)throw new bp(`Unsupported FormData part size`,`part`);c(r+yp(t,!0)+(!e&&n.name?yp(n.name,!1):0)+(!e&&n.type?yp(n.type,!1):0));let a=`--`+i+gp+`Content-Disposition: form-data; name="`+vp(_p(t))+`"`;e||(a+=`; filename="`+vp(G.isString(n.name)?n.name:`blob`)+`"\r Content-Type: `+String(n.type||`application/octet-stream`).replace(/[\r\n]/g,``)),a+=gp+gp;let l=yp(a,!1)+r+2;c(l),o+=l,s.push({header:a,value:n,isString:e})}let l=[];for(let e of s)l.push(e.header,e.isString?_p(e.value):e.value,gp);return l.push(a),new t(l,{type:`multipart/form-data; boundary=`+i})}function Sp(e,t,n,r,i){if(!G.isFunction(t))throw new q(`Blob is not supported`,q.ERR_NOT_SUPPORT);if(i===void 0)if(G.isFunction(of.generateString))i=`axios-`+of.generateString(36,`0123456789abcdef`);else{let e=G.global.crypto;if(!e||!G.isFunction(e.getRandomValues))throw new q(`Random byte generation is not supported`,q.ERR_NOT_SUPPORT);let t=new Uint8Array(18);e.getRandomValues(t),i=`axios-`+Array.from(t,e=>(`0`+e.toString(16)).slice(-2)).join(``)}try{return xp(e,t,n,r,i)}catch(e){if(e instanceof bp){let t=e.reason===`boundary`?q.ERR_BAD_OPTION_VALUE:q.ERR_BAD_REQUEST;throw new q(e.message,t)}throw e}}var Cp=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,wp=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,Ep=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Dp=e=>e===9||e===10||e===12||e===13||e===32,Op=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},kp=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Ap=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?kp(e):Op(n)},jp=(e,t,n)=>{if(!e||typeof e!=`string`||!/^data:/i.test(e))return 0;let r=e.indexOf(`,`);if(r<0)return 0;let i=e.slice(5,r),a=e.slice(r+1);if(n.test(i))return t(a);let o=0;for(let e=0,t=a.length;e=55296&&n<=56319&&e+1=56320&&t<=57343?(o+=4,e++):o+=3}else o+=3}return o};function Mp(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return jp(t===-1?e:e.slice(0,t),Ap,/; *base64[\t\n\f\r ]*$/i)}const Np=`1.21.0`;var Pp=64*1024,Fp={cache:`default`,redirect:`follow`,referrer:`about:client`,referrerPolicy:``,mode:`cors`,integrity:``,keepalive:!1,priority:`auto`,window:null},{isFunction:Ip}=G,Lp=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Rp=e=>{if(!G.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},zp=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Bp=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Vp=e=>{let t=G.global!==void 0&&G.global!==null?G.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=G.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response,Blob:t.Blob},e);let i=G.hasOwnProp(e,`fetch`)?e.fetch:void 0,{Request:a,Response:o,Blob:s}=e,c=i?Ip(i):typeof fetch==`function`,l=Ip(a),u=Ip(o);if(!c)return!1;let d=c&&Ip(n),f=c&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),p=l&&d&&zp(()=>{let e=!1,t=new a(of.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),m=u&&d&&zp(()=>G.isReadableStream(new o(``).body)),h=Object.assign(Object.create(null),Fp);l&&!zp(()=>new a(of.origin,h))&&(delete h.cache,zp(()=>new a(of.origin,h))||(h.cache=Fp.cache));let g={stream:m&&(e=>e.body)};c&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!g[e]&&(g[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new q(`Response type '${e}' is not supported`,q.ERR_NOT_SUPPORT,n)})});let _=async e=>{if(e==null)return 0;if(G.isBlob(e))return e.size;if(G.isArrayBufferView(e)||G.isArrayBuffer(e))return e.byteLength;if(G.isURLSearchParams(e)&&(e+=``),G.isString(e))return(await f(e)).byteLength},v=async(e,t)=>G.toFiniteNumber(e.getContentLength())??_(t);return async e=>{let{url:t,method:n,data:c,signal:u,cancelToken:f,timeout:y,onDownloadProgress:b,onUploadProgress:x,responseType:S,headers:C,withCredentials:w=`same-origin`,fetchOptions:T,maxContentLength:E,maxBodyLength:D,maxRedirects:O}=lp(e),k=G.isNumber(E)&&E>-1,A=G.isNumber(D)&&D>-1,j=t=>G.hasOwnProp(e,t)?e[t]:void 0,M=i||fetch;S=S?(S+``).toLowerCase():`text`;let N=dp([u,f&&f.toAbortSignal()],y),P=null,F=N&&N.unsubscribe&&(()=>{N.unsubscribe()}),I,ee=null,te=null,ne=()=>new q(`Request body larger than maxBodyLength limit`,q.ERR_BAD_REQUEST,e,P);try{let i,u=j(`auth`);u&&(i={username:G.getSafeProp(u,`username`)||``,password:G.getSafeProp(u,`password`)||``});let f;if(Bp(t)&&(f=new URL(t,of.origin),!i&&(f.username||f.password)&&(i={username:Rp(f.username),password:Rp(f.password)}),(f.username||f.password)&&(f.username=``,f.password=``,t=f.href)),i&&(C.delete(`authorization`),C.set(`Authorization`,`Basic `+btoa(Lp((i.username||``)+`:`+(i.password||``))))),k&&f&&f.protocol===`data:`&&Mp(f.href)>E)throw new q(`maxContentLength size of `+E+` exceeded`,q.ERR_BAD_RESPONSE,e,P);let y=G.isSpecCompliantForm(c)&&Sd.from(j(`headers`)).getContentType(),re;if(G.isString(y)&&/^multipart\/form-data(?:\s*;|$)/i.test(y.trim())){let e=Sd.parseParameters(y);G.hasOwnProp(e,`boundary`)&&(re=e.boundary)}if(G.isSpecCompliantForm(c)&&n!==`get`&&n!==`head`&&(A||x&&p||re!==void 0)&&(c=Sp(c,s,A?D:1/0,ne,re),C.setContentType(re===void 0?c.type:y),I=c.size),A&&n!==`get`&&n!==`head`){let e=await _(c);if(typeof e==`number`&&isFinite(e)&&(I=e,e>D))throw ne()}let ie=A&&(G.isReadableStream(c)||G.isStream(c)),ae=(e,t,n)=>hp(e,Pp,e=>{if(A&&e>D)throw ee=ne();t&&t(e)},n);if(p&&n!==`get`&&n!==`head`&&(x||ie)){if(I??=await v(C,c),I!==0||ie){let e=new a(t,{method:`POST`,body:c,duplex:`half`}),n;if(G.isFormData(c)&&(n=e.headers.get(`content-type`))&&C.setContentType(n),e.body){let[t,n]=x&&Ff(I,Pf(If(x)))||[];c=ae(e.body,t,n)}}}else if(ie&&!l&&d&&n!==`get`&&n!==`head`)c=ae(c);else if(ie&&l&&!p&&n!==`get`&&n!==`head`)throw new q(`Stream request bodies are not supported by the current fetch implementation`,q.ERR_NOT_SUPPORT,e,P);G.isString(w)||(w=w?`include`:`omit`);let oe=l&&`credentials`in a.prototype;if(G.isFormData(c)){let e=C.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&C.delete(`content-type`)}C.set(`User-Agent`,`axios/`+Np,!1);let se=T==null?T:Object.assign(Object.create(null),T);se&&(delete se.body,delete se.headers,delete se.method,delete se.signal,delete se.duplex,delete se.credentials);let L=Object.assign(Object.create(null),se,{signal:N,method:n.toUpperCase(),headers:od(C.normalize()),body:c,duplex:`half`,credentials:oe?w:void 0});l&&(G.forEach(h,(e,t)=>{L[t]===void 0&&(L[t]=e)}),L.signal===void 0&&(L.signal=null),L.body===void 0&&(L.body=null)),O===0&&(L.redirect=`manual`,se&&(se.redirect=`manual`)),P=l&&new a(t,L);let ce=await(l?M(P,se):M(t,L)),le=Sd.from(ce.headers);if(k){let t=G.toFiniteNumber(le.getContentLength());if(t!=null&&t>E)throw new q(`maxContentLength size of `+E+` exceeded`,q.ERR_BAD_RESPONSE,e,P)}let ue=m&&(S===`stream`||S===`response`);if(m&&ce.body&&(b||k||ue&&F)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=ce[e]});let n=G.toFiniteNumber(le.getContentLength()),[r,i]=b&&Ff(n,Pf(If(b),!0))||[],a=0;ce=new o(hp(ce.body,Pp,t=>{if(k&&(a=t,a>E))throw te=new q(`maxContentLength size of `+E+` exceeded`,q.ERR_BAD_RESPONSE,e,P);r&&r(t)},()=>{i&&i(),F&&F()}),t)}S||=`text`;let de=await g[G.findKey(g,S)||`text`](ce,e);if(k&&!m&&!ue){let t;if(de!=null&&(typeof de.byteLength==`number`?t=de.byteLength:typeof de.size==`number`?t=de.size:typeof de==`string`&&(t=typeof r==`function`?new r().encode(de).byteLength:de.length)),typeof t==`number`&&t>E)throw new q(`maxContentLength size of `+E+` exceeded`,q.ERR_BAD_RESPONSE,e,P)}return!ue&&F&&F(),await new Promise((t,n)=>{wf(t,n,{data:de,headers:Sd.from(ce.headers),status:ce.status,statusText:ce.statusText,config:e,request:P})})}catch(t){if(F&&F(),N&&N.aborted&&N.reason instanceof q){let n=N.reason;throw n.config=e,P&&(n.request=P),t!==n&&Object.defineProperty(n,`cause`,{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(ee)throw P&&!ee.request&&(ee.request=P),ee;if(te)throw te;if(t instanceof q)throw P&&!t.request&&(t.request=P),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new q(`Network Error`,q.ERR_NETWORK,e,P,t&&t.response);throw Object.defineProperty(n,`cause`,{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw q.from(t,t&&t.code,e,P,t&&t.response)}}},Hp=new Map;const Up=e=>{let t=Object.create(null),n=e&&G.hasOwnProp(e,`env`)&&e.env;[`fetch`,`Request`,`Response`,`Blob`].forEach(e=>{n&&G.hasOwnProp(n,e)&&(t[e]=n[e])});let{fetch:r,Request:i,Response:a,Blob:o}=t,s=[i,a,r,o],c=s.length,l,u,d=Hp;for(;c--;)l=s[c],u=d.get(l),u===void 0&&d.set(l,u=c?new Map:Vp(t)),d=u;return u};Up();var Wp={http:null,xhr:up,fetch:{get:Up}};G.forEach(Wp,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{__proto__:null,value:t})}catch{}Object.defineProperty(e,`adapterName`,{__proto__:null,value:t})}});var Gp=e=>`- ${e}`,Kp=e=>G.isFunction(e)||e===null||e===!1;function qp(e,t){e=G.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new q(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : `+e.map(Gp).join(` `):` `+Gp(e[0]):`as no adapter specified`),q.ERR_NOT_SUPPORT)}return i}var Jp={getAdapter:qp,adapters:Wp};function Yp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Cf(null,e)}function Xp(e){return Math.max(0,Date.now()-e)}function Zp(e){let t=G.toSafeFlatObject(e);Yp(t),t.headers=Sd.from(G.getSafeProp(t,`headers`)),t.data=xf.call(t,t.transformRequest),[`post`,`put`,`patch`].indexOf(t.method)!==-1&&t.headers.setContentType(`application/x-www-form-urlencoded`,!1);let n=Jp.getAdapter(t.adapter||bf.adapter,t),r=Date.now();return n(t).then(function(e){Yp(t),e.duration=Xp(r),t.response=e;try{e.data=xf.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=Sd.from(e.headers),e},function(e){if(!Sf(e)&&(Yp(t),e&&e.response)){e.response.duration=Xp(r),t.response=e.response;try{e.response.data=xf.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=Sd.from(e.response.headers)}return Promise.reject(e)})}var Qp={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Qp[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var $p={};Qp.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Np+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new q(r(i,` has been removed`+(t?` in `+t:``)),q.ERR_DEPRECATED);return t&&!$p[i]&&($p[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},Qp.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function em(e,t,n){if(typeof e!=`object`||!e)throw new q(`options must be an object`,q.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new q(`option `+a+` must be `+n,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q(`Unknown option `+a,q.ERR_BAD_OPTION)}}var tm={assertOptions:em,validators:Qp},nm=tm.validators,rm=e=>{if(e==null||G.isPlainObject(e)||e instanceof Sd)return!0;try{return G.isObject(e)&&G.getSafeProp(e,Symbol.toStringTag)===`AxiosHeaders`&&[`toJSON`,`set`,`get`,`has`,`delete`,`clear`,`normalize`,`concat`,`toString`,Symbol.iterator].every(t=>G.isFunction(G.getSafeProp(e,t)))}catch{return!1}},im=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Xd,response:new Xd}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack,r=``;if(typeof n==`string`){let e=n.indexOf(` `);r=e===-1?``:n.slice(e+1)}if(!e.stack)e.stack=r;else if(r){let t=r.indexOf(` `),n=t===-1?-1:r.indexOf(` `,t+1),i=n===-1?r:r.slice(n+1),a=String(e.stack),o=kd(e,a),s=o===-1?a:a.slice(0,o),c=o===-1?``:a.slice(o);s.endsWith(i)||(e.stack=s+` `+r+c)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=rp(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&tm.assertOptions(n,{silentJSONParsing:nm.transitional(nm.boolean),forcedJSONParsing:nm.transitional(nm.boolean),clarifyTimeoutError:nm.transitional(nm.boolean),legacyInterceptorReqResOrdering:nm.transitional(nm.boolean),advertiseZstdAcceptEncoding:nm.transitional(nm.boolean),validateStatusUndefinedResolves:nm.transitional(nm.boolean),encodeBasicAuthUsername:nm.transitional(nm.boolean)},!1),r!=null&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:tm.assertOptions(r,{encode:nm.function,serialize:nm.function},!0)),t.allowAbsoluteUrls!==void 0||(G.hasOwnProp(this.defaults,`allowAbsoluteUrls`)&&this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tm.assertOptions(t,{baseUrl:nm.spelling(`baseURL`),withXsrfToken:nm.spelling(`withXSRFToken`)},!0),t.method=(G.getSafeProp(t,`method`)||G.getSafeProp(this.defaults,`method`)||`get`).toLowerCase();let a=G.getSafeProp(i,`common`),o=G.getSafeProp(i,t.method),s=i&&G.merge(rm(a)?a:void 0,rm(o)?o:void 0);i&&G.forEach(gf.concat(`common`),e=>{rm(G.getSafeProp(i,e))&&delete i[e]}),t.headers=Sd.concat(s,i);let c=[],l=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;l&&=e.synchronous;let n=t.transitional||Zd;n&&n.legacyInterceptorReqResOrdering?c.unshift(e.fulfilled,e.rejected):c.push(e.fulfilled,e.rejected)});let u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let d,f=0,p;if(!l){let e=[Zp.bind(this),void 0];for(e.unshift(...c),e.push(...u),p=e.length,d=Promise.resolve(t);fZp.call(this,m)))}catch(e){d=Promise.reject(e)}break}}if(!d)try{d=Zp.call(this,m)}catch(e){d=Promise.reject(e)}for(f=0,p=u.length;f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Cf(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function sm(e){return function(t){return e.apply(null,t)}}function cm(e){return G.isObject(e)&&e.isAxiosError===!0}var lm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(lm).forEach(([e,t])=>{lm[t]===void 0&&(lm[t]=e)});var um=lm;function dm(e){let t=new am(e),n=Ml(am.prototype.request,t);return G.extend(n,am.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return dm(rp(e,t))},n}var fm=dm(bf);fm.Axios=am,fm.CanceledError=Cf,fm.CancelToken=om,fm.isCancel=Sf,fm.VERSION=Np,fm.toFormData=Rd,fm.AxiosError=q,fm.Cancel=fm.CanceledError,fm.all=function(e){return Promise.all(e)},fm.spread=sm,fm.isAxiosError=cm,fm.mergeConfig=rp,fm.AxiosHeaders=Sd,fm.formToJSON=e=>hf(G.isHTMLForm(e)?new FormData(e):e),fm.getAdapter=Jp.getAdapter,fm.HttpStatusCode=um,fm.default=fm;var pm=fm;const mm={MULTIPART_FORM_DATA:`multipart/form-data`,APPLICATION_FORM_URLENCODED:`application/x-www-form-urlencoded`,APPLICATION_JSON:`application/json`},hm=()=>{let e=document.cookie.match(/(?:^|; )XSRF-TOKEN=([^;]*)/);return e?decodeURIComponent(e[1]):null},gm=e=>{var t;let[,n]=((t=e.headers)==null||(t=t[`content-disposition`])==null?void 0:t.split(`;`))||[],r=document.createElement(`a`);r.download=decodeURIComponent((n==null?void 0:n.replace(`filename=`,``).replace(/\"/g,``).trim())||``),r.style.display=`none`,r.href=URL.createObjectURL(e.data),document.body.appendChild(r),r.click(),URL.revokeObjectURL(r.href),document.body.removeChild(r)},_m=e=>(e.interceptors.request.use(e=>{console.info(`%c request ------>%o`,`background:#4f46e5;color:#fff;`,e);let t=hm();return e.headers={...e.headers,Authorization:`Bearer ${Sh.getState().token}`,"X-XSRF-TOKEN":t||``},e},e=>(console.error(`%c request ------>%o`,`background:#dc2626;color:#fff;`,e),Promise.reject(e))),e.interceptors.response.use(e=>{var t,n;console.info(`%c response ------>%o`,`background:#059669;color:#fff;`,e);let r=((t=e.config)==null?void 0:t.silent)===!0;if(e.status!==200){var i;return r||ss.error((e==null||(i=e.data)==null?void 0:i.msg)||`请求失败,请稍后再试`),Promise.reject(e.data)}if(!((n=e.headers[`content-type`])!=null&&n.startsWith(`application/json`)))return gm(e),Promise.resolve();let{code:a,msg:o,errorData:s}=e.data;return[`200`].includes(a)||e.headers.code===200?Promise.resolve(e.data):[`401`,`402`].includes(a)&&fP.state.location.pathname!==`/login`?(r||ss.error(o||`未登录/无权限`),Sh.setState({token:null}),fP.navigate({to:`/login?redirect=`+encodeURIComponent(encodeURIComponent(fP.state.location.href)),replace:!0}),Promise.reject()):a===`603`?(Sh.setState({token:s.token}),Promise.resolve()):([`555`,`666`,`999`,`401`,`402`,`700`].includes(a)&&(r||ss.error(o||`系统错误,请稍后再试`)),Promise.reject(e.data))},e=>(console.error(`%c response ------>%o`,`background:#dc2626;color:#fff;`,e),Promise.reject(e))),e);var vm=pm.create({timeout:6e5,headers:{"X-Requested-With":`XMLHttpRequest`,"Content-Type":mm.APPLICATION_JSON},baseURL:`/api`,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`});_m(vm);var Y=vm;const ym=(e={})=>Y.post(`/login`,e,{headers:{"content-type":mm.APPLICATION_FORM_URLENCODED}}),bm=(e,t)=>Y.post(`/login_token_user`,{tempToken:e,orgId:t},{headers:{"content-type":mm.APPLICATION_FORM_URLENCODED}}),xm=()=>Y.post(`/logout`),Sm=()=>Y.get(`/user/info`),Cm=(e,t)=>Y.post(`/user/create_org_user`,e,t),wm=e=>Y.post(`/user/batch_create_org_user`,e),Tm=()=>Y.get(`/uc/org/find`),Em=e=>Y.post(`/user/cancel`,{userId:e}),Dm=e=>Y.post(`/user/modify_org_user_info`,e),Om=e=>Y.post(`/user/reset_org_user_pwd`,e),km=e=>Y.post(`/unac/user/init_user_password`,e),Am=e=>Y.post(`/unac/user/modify_password`,e),jm=e=>Y.post(`/user/enable`,{userId:e}),Mm=e=>Y.post(`/user/disable`,{userId:e}),Nm=e=>Y.post(`/user/admin_cancel`,{userId:e}),Pm=e=>Y.get(`/user/page/org_account`,{params:e});var Fm=`/api`;const Im={MY:`1`,INSIDE:`2`,OUTSIDE:`3`,SHARE:`4`},Lm={VALID:`1`,INVALID:`2`,PARSING:`11`,AUDITING:`12`,TRANSFERING:`13`,FAILED:`14`},Rm={FILE:`1`,DIRECTORY:`2`},zm=(e,t=!0)=>{if(!e)return;let n=`/file/download/${e}?time=`+Date.now();return t&&Fm!=`/`?Fm+n:n},Bm=({url:e,code:t,...n})=>{let r=e??zm(t,!1);if(r)return Y.get(r,{responseType:`blob`,...n})},Vm=e=>{let t=new FormData;t.append(`file`,e);let n={"content-type":mm.MULTIPART_FORM_DATA};return Y.post(`/file/upload`,t,{headers:n})},Hm=e=>Y.post(`/share_user_file/create`,e),Um=e=>Y.put(`/user_file/invalid/${e}`),Wm=e=>Y.post(`/user_file/modify`,e),Gm=e=>Y.get(`/user_file/page`,{params:e}),Km=e=>Y.delete(`/user_file/remove/${e}`),qm=e=>Y.delete(`/user_file/remove_by_ids`,{data:e}),Jm=e=>Y.post(`/normal_user_file/create`,e),Ym=e=>Y.put(`/normal_user_file/recover/${e}`),Xm=e=>Y.post(`/transfer_user_file/create`,e),Zm=()=>Y.get(`/user_file/statistics/category`),Qm=e=>Y.get(`/file_risk/min_audit_risk_level`,{params:e}),$m=e=>Y.post(`/file_risk/min_audit_risk_level`,e),eh=e=>Y.get(`/file_risk/rule`,{params:e}),th=e=>Y.post(`/file_risk/rule`,e),nh=e=>Y.get(`/user_file/page_super`,{params:e}),rh=e=>Y.get(`/user_file/record/page_by_phone`,{params:e}),ih=e=>Y.put(`/user_file/modify_status`,e),ah=({shareId:e,...t})=>Y.get(`/share_user_file/${e}`,{params:t}),oh=e=>Y.get(`/file_risk/dify_risk_rule`,{params:{fileCode:e}}),sh={SCANNING:`1`,PASSED:`2`,REJECTED:`3`,FAILED:`4`},ch=e=>Y.post(`/file_security/review`,e),lh=e=>Y.post(`/file_security/rescan`,null,{params:{fileCode:e}}),uh=e=>Y.get(`/file_security/share_check`,{params:{userFileId:e}});var dh=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},fh=(e=>e?dh(e):dh),ph=e=>e;function mh(e,t=ph){let n=C.useSyncExternalStore(e.subscribe,C.useCallback(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return C.useDebugValue(n),n}var hh=e=>{let t=fh(e),n=e=>mh(t,e);return Object.assign(n,t),n},gh=(e=>e?hh(e):hh),_h=e=>(t,n,r)=>{let i=r.subscribe;return r.subscribe=((e,t,n)=>{let a=e;if(t){let i=(n==null?void 0:n.equalityFn)||Object.is,o=e(r.getState());a=n=>{let r=e(n);if(!i(o,r)){let e=o;t(o=r,e)}},n!=null&&n.fireImmediately&&t(o,o)}return i(a)}),e(t,n,r)};function vh(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t==null?void 0:t.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t==null?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}var yh=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return yh(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return yh(t)(e)}}}},bh=(e,t)=>(n,r,i)=>{let a={storage:vh(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(...e)=>(f(...e),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{var e;if(!u)return;let t=++s;o=!1,c.forEach(e=>e(r()??p));let i=((e=a.onRehydrateStorage)==null?void 0:e.call(a,r()??p))||void 0;return yh(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(e=>{if(t!==s)return;let[i,o]=e;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{t===s&&(i==null||i(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(e=>{t===s&&(i==null||i(void 0,e))})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{++s,u==null||u.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p};function xh(e){let t=new Set,n=new Map,r,i,a=!0,o=()=>{a||(a=!0,t.forEach(e=>e(r,r)))},s=()=>{if(!a)return r;if(!i||Array.from(i).some(([e,t])=>!Object.is(e.getState(),t))){let t=new Map;r=e(e=>{if(!e)return r;let n=e.getState();return t.set(e,n),n}),i=t}if(t.size){let e=new Set(i.keys());n.forEach((t,r)=>{e.has(r)?e.delete(r):(t(),n.delete(r))}),e.forEach(e=>{n.set(e,e.subscribe(o))}),a=!1}return r},c,l=!1;return{getState:s,subscribe:e=>(t.add(e),()=>{t.delete(e),t.size||(n.forEach(e=>e()),n.clear(),a=!0)}),getInitialState:()=>(l||=(c=e(e=>{if(e)return e.getInitialState()}),!0),c),setState:()=>{throw Error(`setState is not available in derived store`)},destroy:()=>{throw Error(`destory is not available in derived store`)}}}const Sh=gh()(bh(_h(e=>({token:null,user:null,org:null,reset(){e({token:null,user:null,org:null})},async fetchUser(){try{let t=await Sm();t!=null&&t.data&&e({user:{...t.data,avatarUrl:zm(t.data.avatar)}})}catch(e){console.error(`获取用户信息失败`,e)}},async fetchUserOrg(){try{let t=await Tm();t!=null&&t.data&&e({org:t.data})}catch(e){console.error(`获取单位信息失败`,e)}}})),{name:`senmeshzc_user`})),Ch=()=>mh(xh(e=>!!e(Sh).token)),wh=()=>mh(xh(e=>{var t;return((t=e(Sh).org)==null?void 0:t.id)==1})),Th=()=>mh(xh(e=>{var t,n;return((t=e(Sh).org)==null?void 0:t.phone)===((n=e(Sh).user)==null?void 0:n.phone)})),Eh=()=>mh(xh(e=>{var t;return((t=e(Sh).user)==null?void 0:t.originPassword)??!1}));Sh.subscribe(e=>e.token,async e=>{e?(Sh.getState().fetchUser(),Sh.getState().fetchUserOrg()):Sh.setState({user:null,org:null})},{});var Dh=`modulepreload`,Oh=function(e){return`/`+e},kh={};const Ah=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==null?void 0:i.nonce)||(i==null?void 0: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}))))}r=o(t.map(t=>{if(t=Oh(t,n),t in kh)return;kh[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Dh,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.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)})};var jh=e=>e.type===`checkbox`,Mh=e=>e.type===`file`,Nh=e=>e instanceof Date,Ph=e=>e==null,Fh=e=>typeof e==`object`,Ih=e=>!Ph(e)&&!Array.isArray(e)&&Fh(e)&&!Nh(e),Lh=e=>Ih(e)&&e.target?jh(e.target)?e.target.checked:Mh(e.target)?e.target.files:e.target.value:e,Rh=/[.[\]'"]/,zh=e=>e.split(Rh).filter(Boolean);function Bh(e,t){let n=zh(t),r=e._formValues,i=e._defaultValues;for(let e=0;et.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),Hh=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function Uh(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e);let t=typeof Blob<`u`&&e instanceof Blob,n=typeof FileList<`u`&&e instanceof FileList;if(Hh&&(t||n))return e;let r=Array.isArray(e),i=Object.getPrototypeOf(e);if(!r&&i&&i.constructor!==Object)return e;let a=r?Array(e.length):Object.create(i);for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=Uh(e[t]));return a}var Wh={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},Gh={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},Kh={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},qh=[Kh.required,Kh.min,Kh.max,Kh.minLength,Kh.maxLength,Kh.pattern,Kh.validate],Jh=`form`,Yh=`root`,Xh=[`__proto__`,`constructor`,`prototype`],Zh=/^\w*$/,Qh=e=>Zh.test(e),X=e=>e===void 0,Z=(e,t,n)=>{if(!t||!Ih(e))return n;let r=Qh(t)?[t]:zh(t);if(r.some(e=>Xh.includes(e)))return n;let i=r.reduce((e,t)=>Ph(e)?void 0:e[t],e);return X(i)||i===e?X(e[t])?n:e[t]:i},$h=e=>typeof e==`boolean`,eg=e=>typeof e==`function`,tg=(e,t,n)=>{let r=-1,i=Qh(t)?[t]:zh(t),a=i.length,o=a-1;for(;++rC.useContext(ng),ig=(e,t,n,r=!0)=>{let i={};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==Gh.all&&(t._proxyFormState[i]=!r||Gh.all),n&&(n[i]=!0),e[i]}});return i},ag=Hh?C.useLayoutEffect:C.useEffect,og=e=>{let t=e.constructor&&e.constructor.prototype;return Ih(t)&&t.hasOwnProperty(`isPrototypeOf`)},sg=e=>Ph(e)||!Fh(e),cg=(e,t)=>t.length===0&&!Array.isArray(e)&&Object.getPrototypeOf(e)!==null&&!og(e);function lg(e,t,n=!1,r=new WeakMap){if(e===t)return!0;if(sg(e)||sg(t))return Object.is(e,t);if(Nh(e)&&Nh(t))return Object.is(e.getTime(),t.getTime());if(Array.isArray(e)&&Array.isArray(t)&&e.length!==t.length)return!1;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;if(cg(e,i)||cg(t,a))return Object.is(e,t);if(!i.length&&Array.isArray(e)!==Array.isArray(t))return!1;let o=r.get(e);if(o&&o.has(t))return!0;if(o)o.add(t);else{let n=new WeakSet;n.add(t),r.set(e,n)}for(let a of i){let i=e[a];if(!Object.prototype.hasOwnProperty.call(t,a))return!1;if(!n||a!==`ref`){let e=t[a];if(Nh(i)&&Nh(e)||(Ih(i)||Array.isArray(i))&&(Ih(e)||Array.isArray(e))?!lg(i,e,n,r):!Object.is(i,e))return!1}}return!0}function ug(e){let t=C.useRef(!1),n=C.useRef(!1),r=C.useRef(void 0),i=C.useRef(0);return i.current++,!n.current&&e&&(n.current=!0,r.current=Uh(e())),{resyncIfNeeded:C.useCallback((e,a,o)=>{if(e&&(t.current||n.current&&i.current>1)){let e=a();lg(r.current,e)||o(e)}t.current=!0},[]),snapshot:C.useCallback((e,t)=>{e&&(r.current=Uh(t()))},[])}}function dg(e){let t=rg(),{control:n=t,disabled:r,name:i,exact:a}=e||{},o=()=>({...n._formState,defaultValues:n._defaultValues}),[s,c]=C.useState(o),l=C.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:u,snapshot:d}=ug(o);return ag(()=>{u(!r,o,c);let e=n._subscribe({name:i,formState:l.current,exact:a,callback:e=>{!r&&c({...n._formState,...e,defaultValues:n._defaultValues})}});return()=>{e(),d(!r,o)}},[n,i,r,a,u,d]),C.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),C.useMemo(()=>ig(s,n,l.current,!1),[s,n])}var fg=e=>typeof e==`string`,pg=(e,t,n,r,i)=>fg(e)?(r&&t.watch.add(e),Z(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Z(n,e,Z(i,e)))):(r&&(t.watchAll=!0),n);function mg(e){let t=rg(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=C.useRef(i),l=C.useRef(s),u=C.useRef(n),d=C.useRef(r);l.current=s;let f=()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e},[p,m]=C.useState(f),h=C.useRef(p),g=C.useCallback(e=>{let t=pg(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),_=C.useCallback(e=>{if(!a){let t=pg(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);lg(e,h.current)||(m(e),h.current=e)}else m(t)}},[n._formValues,n._names,a,r]),{resyncIfNeeded:v,snapshot:y}=ug(f),b=C.useRef(_);b.current=_;let x=C.useRef(g);x.current=g,ag(()=>{u.current!==n||!lg(d.current,r)?(u.current=n,d.current=r,b.current()):v(!a,()=>x.current(),e=>{let t=Uh(e);m(t),h.current=t});let e=n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{b.current(e.values)}});return()=>{e(),y(!a,()=>x.current())}},[n,o,r,a,v,y]),C.useEffect(()=>n._removeUnmounted());let S=u.current!==n,w=d.current,T=C.useMemo(()=>!S&&!lg(w,r),[S,r,w]);return(S||T)&&(c.current=i),!a&&(S||T)?g():p}function hg(e){let t=rg(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=Vh(i._names.array,n),l=mg({control:i,name:n,defaultValue:C.useMemo(()=>{let e=Z(i._formValues,n,Z(i._defaultValues,n,o));return X(e)?Bh(i,n):e},[i,n,o]),exact:s}),u=dg({control:i,name:n,exact:s}),d=C.useRef(e),f=C.useRef(null),p=C.useRef(i.register(n,{...e.rules,value:l,...$h(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;let m=C.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Z(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Z(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Z(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Z(u.validatingFields,n)},error:{enumerable:!0,get:()=>Z(u.errors,n)}}),[u,n]),h=C.useCallback(e=>{let t=Lh(e);return Z(i._fields,n)||(p.current=i.register(n,{...d.current.rules,value:t})),p.current.onChange({target:{value:Lh(e),name:n},type:Wh.CHANGE})},[n,i]),g=C.useCallback(()=>{let e=Z(i._formValues,n);return Z(i._fields,n)||(p.current=i.register(n,{...d.current.rules,value:e})),p.current.onBlur({target:{value:e,name:n},type:Wh.BLUR})},[n,i]),_=C.useCallback(e=>{e&&(f.current={focus:()=>eg(e.focus)&&e.focus(),select:()=>eg(e.select)&&e.select(),setCustomValidity:t=>eg(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>eg(e.reportValidity)&&e.reportValidity()});let t=Z(i._fields,n);t&&t._f&&e&&(t._f.ref=f.current,t._f._c=!0)},[i._fields,n]),v=C.useMemo(()=>({name:n,value:l,...$h(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h,onBlur:g,ref:_}),[n,r,u.disabled,h,g,_,l]);return C.useEffect(()=>{let e=i._options.shouldUnregister||a;p.current=i.register(n,{...d.current.rules,...$h(d.current.disabled)?{disabled:d.current.disabled}:{}});let t=(e,t)=>{let n=Z(i._fields,e);n&&n._f&&(n._f.mount=t,n._f._c=t)};if(t(n,!0),e){let e=Uh(Z(a?i._defaultValues:i._options.values||i._defaultValues,n,Z(i._options.defaultValues,n,d.current.defaultValue)));tg(i._defaultValues,n,e),X(Z(i._formValues,n))&&tg(i._formValues,n,e)}if(!c&&i.register(n,{...d.current.rules,...$h(d.current.disabled)?{disabled:d.current.disabled}:{}}),f.current){let e=Z(i._fields,n);e&&e._f&&(e._f.ref=f.current)}return()=>{(c?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,c,a]),C.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),C.useMemo(()=>({field:v,formState:u,fieldState:m}),[v,u,m])}var gg=e=>e.render(hg(e)),_g=e=>({isOnSubmit:!e||e===Gh.onSubmit,isOnBlur:e===Gh.onBlur,isOnChange:e===Gh.onChange,isOnAll:e===Gh.all,isOnTouch:e===Gh.onTouched}),vg=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(let n of t.watch)if(e.startsWith(n)&&e.charAt(n.length)===`.`)return!0;return!1},yg=(e,t,n)=>{for(let r of n||Object.keys(e)){if(r===`_f`)continue;let i=n?Z(e,r):e[r];if(i){let{_f:e}=i;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],e.name)||e.ref&&t(e.ref,e.name)||yg(i,t))return!0}else if((Ih(i)||Array.isArray(i))&&yg(i,t))return!0}}},bg=(e,t,n)=>{let r=Z(e,n),i=Array.isArray(r)?r:[];return tg(i,Yh,t[n]),tg(e,n,i),e},xg=e=>Ih(e)&&!Object.keys(e).length,Sg=e=>{if(!Hh)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Cg=e=>e.type===`radio`,wg=e=>e instanceof RegExp,Tg=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Eg={value:!1,isValid:!1},Dg={value:!0,isValid:!0},Og=e=>{if(!Array.isArray(e))return Eg;if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}let t=e[0];return!t||!t.checked||t.disabled?Eg:!t.attributes||!(`value`in t.attributes)||X(t.value)||t.value===``?Dg:{value:t.value,isValid:!0}},kg={isValid:!1,value:null},Ag=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,kg):kg;function jg(e,t,n=`validate`){if(fg(e)||Array.isArray(e)&&e.length&&e.every(fg)||$h(e)&&!e)return{type:n,message:fg(e)?e:``,ref:t}}var Mg=e=>Ih(e)&&!wg(e)?e:{value:e,message:``},Ng=async(e,t,n,r,i,a)=>{let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_,_c:v}=e._f,y=Z(n,h);if(!_||t.has(h))return{};let b=s?s[0]:o,x=e=>{if(i&&b.reportValidity){let t=$h(e)?``:e||``;s?s.forEach(e=>eg(e.setCustomValidity)&&e.setCustomValidity(t)):b.setCustomValidity(t),b.reportValidity()}},S={},C=!v&&Cg(o),w=!v&&jh(o),T=C||w,E=(g||Mh(o))&&X(o.value)&&X(y)||Sg(o)&&o.value===``&&!v||y===``||Array.isArray(y)&&!y.length,D=Tg.bind(null,h,r,S),O=(e,t,n,r=Kh.maxLength,i=Kh.minLength)=>{let a=e?t:n;S[h]={type:e?r:i,message:a,ref:o,...D(e?r:i,a)}};if(a?!Array.isArray(y)||!y.length:c&&(!T&&(E||Ph(y))||$h(y)&&!y||w&&!Og(s).isValid||C&&!Ag(s).isValid)){let{value:e,message:t}=fg(c)?{value:!!c,message:c}:Mg(c);if(e&&(S[h]={type:Kh.required,message:t,ref:b,...D(Kh.required,t)},!r))return x(t),S}if(!E&&(!Ph(d)||!Ph(f))){let e,t,n=Mg(f),i=Mg(d);if(!Ph(y)&&!Nh(y)&&!isNaN(y)){let r=!v&&o.valueAsNumber||y&&+y;Ph(n.value)||(e=r>n.value),Ph(i.value)||(t=rnew Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;fg(n.value)&&y&&(e=s?a(y)>a(n.value):c?y>n.value:r>new Date(n.value)),fg(i.value)&&y&&(t=s?a(y)+e.value,i=!Ph(t.value)&&y.length<+t.value;if((n||i)&&(O(n,e.message,t.message),!r))return x(S[h].message),S}if(p&&!E&&fg(y)){let{value:e,message:t}=Mg(p);if(wg(e)&&!y.match(e)&&(S[h]={type:Kh.pattern,message:t,ref:o,...D(Kh.pattern,t)},!r))return x(t),S}if(m){if(eg(m)){let e=jg(await m(y,n),b);if(e&&(S[h]={...e,...D(Kh.validate,e.message)},!r))return x(e.message),S}else if(Ih(m)){let e={};for(let t in m){if(!xg(e)&&!r)break;let i=jg(await m[t](y,n),b,t);i&&(e={...i,...D(t,i.message)},r||x(i.message),r&&(S[h]=e))}if(!xg(e)&&(S[h]={ref:b,...e},!r))return S}}let k=S[h];return x(k?k.message:!0),S},Pg=e=>Array.isArray(e)?e:[e],Fg=e=>Array.isArray(e)?e.filter(Boolean):[];function Ig(e,t){let n=t.length-1,r=0;for(;rXh.includes(String(e))))return e;let r=n.length===1?e:Ig(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(Ih(r)&&xg(r)||Array.isArray(r)&&Lg(r))&&Rg(e,n.slice(0,-1)),e}var zg=()=>{let e=new Set,t=0;return{get observers(){return Array.from(e)},next:n=>{let r=e;t++;for(let e of r)e.next&&e.next(n);r===e&&t--},subscribe:n=>(e.add(n),{unsubscribe:()=>{t&&=(e=new Set(e),0),e.delete(n)}}),unsubscribe:()=>{e=new Set,t=0}}};function Bg(e,t){let n=Array.isArray(e)?[]:{};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let i=e[r],a=t[r];i&&(Ih(i)||Array.isArray(i))&&a?n[r]=Bg(i,a):e[r]&&(n[r]=a)}return n}var Vg=(e,t)=>e!==null&&Fh(e)&&Object.prototype.hasOwnProperty.call(e,t),Hg=(e,t)=>{if(!t)return!1;let n=e;for(let r of Qh(t)?[t]:zh(t)){if(!Vg(n,r))return Vg(e,t);n=n[r]}return!0},Ug=e=>e.type===`select-multiple`,Wg=e=>{let t=[...e.options];return!e.multiple&&e.size<2&&!t.some(e=>e.defaultSelected)?e.selectedIndex!==t.findIndex(e=>!e.disabled):t.some(e=>e.selected!==e.defaultSelected)},Gg=e=>jh(e)?e.checked!==e.defaultChecked:e.type===`select-one`||Ug(e)?Wg(e):!Cg(e)&&`defaultValue`in e&&e.value!==e.defaultValue,Kg=e=>Cg(e)||jh(e),qg=e=>Sg(e)&&e.isConnected;function Jg(e){return Array.isArray(e)||Ih(e)}function Yg(e,t,n=``,r=[]){for(let i in e){let a=n?`${n}.${i}`:i,o=e[i];Jg(o)&&Jg(Z(t,a))?Yg(o,t,a,r):r.push(a)}return r}var Xg=e=>{for(let t in e)if(eg(e[t]))return!0;return!1};function Zg(e){return Array.isArray(e)||Ih(e)&&!Xg(e)}function Qg(e){return!!(e&&`_f`in e)}function $g(e){return Array.isArray(e)?!e.some(e=>!X(e)):!Object.keys(e).length}function e_(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function t_(e,t={},n){for(let r in e){let i=e[r],a=n&&n[r];Zg(i)&&(!Array.isArray(i)||!Qg(a))?(t[r]=Array.isArray(i)?[]:{},t_(i,t[r],a),$g(t[r])&&e_(t,r)):X(i)||(t[r]=!0)}return t}function n_(e,t,n,r){for(let i in n||=t_(t,Array.isArray(Ph(t)?e:t)?[]:{},r),e){let a=e[i],o=r&&r[i];Zg(a)&&(!Array.isArray(a)||!Qg(o))?(X(t)||sg(n[i])?n[i]=t_(a,Array.isArray(a)?[]:{},o):n_(a,Ph(t)?{}:t[i],n[i],o),$g(n[i])&&e_(n,i)):lg(a,Ph(t)?void 0:t[i])?e_(n,i):n[i]=!0}return n}var r_=(e,t)=>{let n=t.split(`.`),r=[],i=n[0];for(let t=1;tX(e)?e:t?e===``?NaN:e&&+e:n&&fg(e)?new Date(e):r?r(e):e;function a_(e){let t=e.ref;return Mh(t)?t.files:Cg(t)?Ag(e.refs).value:Ug(t)?[...t.selectedOptions].map(({value:e})=>e):jh(t)?Og(e.refs).value:i_(t.value,e)}var o_=(e,t,n,r)=>{let i={};for(let n of e){let e=Z(t,n);e&&tg(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},s_=e=>X(e)?e:wg(e)?e.source:Ih(e)?wg(e.value)?e.value.source:e.value:e,c_=`AsyncFunction`,l_=e=>{if(!e||!e.validate)return!1;if(eg(e.validate))return e.validate.constructor.name===c_;if(Ih(e.validate)){for(let t in e.validate)if(e.validate[t].constructor.name===c_)return!0}return!1},u_=e=>e.mount&&(e.required||!X(e.required)&&e.required!==!1||!X(e.min)||!X(e.max)||!X(e.maxLength)||!X(e.minLength)||e.pattern||e.validate);function d_(e,t,n){let r=Z(e,n);if(r&&(r.type||r.message)||Array.isArray(r))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=Z(t,r),o=Z(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var f_=(e,t,n)=>{let r=Object.keys(e).filter(e=>e!==`name`);return!r.length||n&&r.length>=Object.keys(t).length||r.find(e=>t[e]===(!n||Gh.all))},p_=(e,t,n)=>n?e===t||e.startsWith(t+`.`):e.startsWith(t)||t.startsWith(e),m_=(e,t,n)=>{if(!e||!t||e===t)return!0;if(!Array.isArray(e))return p_(e,t,n);for(let r of e)if(r&&p_(r,t,n))return!0;return!1},h_=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,g_=(e,t)=>{let n=Z(e,t);!Fg(n).length&&!(n&&n.root)&&Rg(e,t)},__={mode:Gh.onSubmit,reValidateMode:Gh.onChange,shouldFocusError:!0},v_=(e,t)=>{for(let t in e)delete e[t];Object.assign(e,t)},y_={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function b_(e={}){let t={...__,...e},n={...Uh(y_),isLoading:eg(t.defaultValues),errors:Uh(t.errors)||{},disabled:t.disabled||!1},r={},i=(Ih(t.defaultValues)||Ih(t.values))&&Uh(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:Uh(i),o={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},s=!1,c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},l={},u={},d=new Set,f=_g(t.mode),p=_g(t.reValidateMode),m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...m},g={},_=(...e)=>e.some(e=>h[e]||g[e]),v=e=>{for(let t of d)if(m_(t.name,e,t.exact))return!0;return!1},y={array:zg(),state:zg()},b=0,x=0,S=0,C={},w=t.criteriaMode===Gh.all,T=(e,t)=>n=>{clearTimeout(u[e]),u[e]=setTimeout(t,n)},E=e=>{clearTimeout(u[e]),delete u[e],delete l[e]},D=e=>{E(e);let t=`${e}.`;for(let e of Object.keys(l))e.startsWith(t)&&E(e)},O=async e=>{if(!o.keepIsValid&&!t.disabled&&(_(`isValid`)||e)){let e=++b,i;t.resolver?(i=xg((await ae()).errors),e===b&&A()):i=await L({fields:r,onlyCheckValid:!0,eventType:Wh.VALID}),e===b&&i!==n.isValid&&y.state.next({isValid:i})}},k=(e,t)=>{let r=[...e];if(!r.some(e=>e&&(t?Z(n.validatingFields,e)!==!0:Hg(n.validatingFields,e))))return;let i=Uh(n.validatingFields);for(let e of r)e&&(t?tg(i,e,!0):Rg(i,e));lg(n.validatingFields,i)||(n.validatingFields=i)},A=(e,r)=>{!t.disabled&&_(`isValidating`,`validatingFields`)&&(k(e||c.mount,r),y.state.next({validatingFields:n.validatingFields,isValidating:!xg(n.validatingFields)}))},j=()=>{n.dirtyFields=n_(i,a,void 0,r)},M=(e,i=[],c,l,u=!0,d=!0)=>{if(l&&c&&!t.disabled){o.action=!0,o.keepIsValid=!1;let t=Z(r,e),a=t&&t._f,f=a?Object.assign([],t):t;if(o.actionArrayLengths.has(e)||o.actionArrayLengths.set(e,Array.isArray(f)?f.length:0),d&&Array.isArray(f)){let t=c(f,l.argA,l.argB)||f;a?tg(r,e,{...t,_f:a}):u&&tg(r,e,t)}let p=Z(n.errors,e);if(d&&Array.isArray(p)){let t=p.root,r=c(p,l.argA,l.argB)||p;t&&(r.root=t),u&&tg(n.errors,e,r),g_(n.errors,e),n.errors={...n.errors}}let m=Z(n.touchedFields,e),h=d&&Array.isArray(m);if(h){let t=c(m,l.argA,l.argB);u&&tg(n.touchedFields,e,t)}let g=Z(n.dirtyFields,e);if(d&&Array.isArray(g)){let t=c(g,l.argA,l.argB)||g;u&&tg(n.dirtyFields,e,t)}_(`dirtyFields`)?j():s=!0,y.state.next({name:e,isDirty:le(e,i),dirtyFields:n.dirtyFields,...h&&{touchedFields:n.touchedFields},errors:n.errors,isValid:n.isValid})}else tg(a,e,i)},N=(e,t)=>{tg(n.errors,e,t),n.errors={...n.errors},y.state.next({errors:n.errors})},P=e=>{Object.keys(l).forEach(E);let t=!xg(e);n.errors=Uh(e),y.state.next({errors:n.errors,...t?{isValid:!1}:{}}),!t&&o.mount&&O()},F=e=>Qh(e)?[e]:zh(e),I=e=>{let t=F(e),n=a,r=i;for(let e=0;e{if(!o.actionArrayLengths.size)return!1;let t=F(e),n=a,r=``,i=-1,s=0;for(let e=0;e=n.length)return i===-1?!1:e===i?+ai&&+t[i]{let t=a;for(let n of F(e)){if(Array.isArray(t)&&+n>=t.length)return!0;t&&=t[n]}return!1},ne=(e,l,u,d)=>{let f=Z(r,e);if(f){if(I(e)||ee(e))return;let r=X(Z(a,e)),p=Z(a,e,X(u)?Z(i,e):u),m=!!d&&!n.isReady&&Gg(d);if(X(p)||d&&d.defaultChecked||m||l){let t=l?p:a_(f._f);(!X(t)||!te(e))&&(_(`dirtyFields`)&&!lg(Z(a,e),t)&&(s=!0),tg(a,e,t),m&&re(e,t))}else fe(e,p);o.mount&&!o.action&&(t.resolver&&_(`isValidating`,`validatingFields`)?Promise.resolve().then(()=>O()):O(),r&&n.isDirty&&_(`isDirty`)&&(le()||(n.isDirty=!1,y.state.next({...n}))),t.shouldUnregister&&r&&!X(Z(a,e))&&vg(e,c)&&(o.watch=!0))}},re=(e,o,c,l,u)=>{let d=!1,f=!1,p={name:e};if(!t.disabled||l===!0){if(!c||l){let t=lg(Z(i,e),o);if(_(`isDirty`)&&(f=n.isDirty,n.isDirty=p.isDirty=!t||le(),d=f!==p.isDirty),f=!!Z(n.dirtyFields,e),t)Rg(n.dirtyFields,e);else{let t=Z(i,e),a=Z(r,e),s=!(a&&a._f)&&(Ih(t)||Array.isArray(t))?n_(t,o,void 0,a):!0;tg(n.dirtyFields,e,s)}let c=!1;if(s||t&&(_(`isDirty`)?n.isDirty:le())){s=!1;let e=n_(i,a,void 0,r);lg(n.dirtyFields,e)||(c=!0,v_(n.dirtyFields,e))}p.dirtyFields=n.dirtyFields,d||=_(`dirtyFields`)&&(c||f!==!t)}if(c){let t=Hg(n.touchedFields,e)?Z(n.touchedFields,e):void 0;t||(tg(n.touchedFields,e,c),p.touchedFields=n.touchedFields,d||=_(`touchedFields`)&&t!==c)}d&&u&&y.state.next(p)}return d?p:{}},ie=(e,r,i,a)=>{let o=Z(n.errors,e),s=_(`isValid`)&&$h(r)&&n.isValid!==r;if(t.delayError&&i?(l[e]=T(e,()=>N(e,i)),l[e](t.delayError)):(E(e),i?tg(n.errors,e,i):Rg(n.errors,e),n.errors={...n.errors}),(i?!lg(o,i,!0):o)||!xg(a)||s){let t={...a,...s&&$h(r)?{isValid:r}:{},errors:n.errors,name:e};y.state.next(t)}},ae=async e=>(A(e,!0),await t.resolver(a,t.context,o_(e||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),oe=async e=>{let t=x,i=S,a=e?e.filter(e=>Z(r,e)):[],{errors:o}=await ae(e);if(t!==x)return o;if(A(e),e){for(let t of e){if(a.includes(t)&&(!Z(r,t)||C[t]>i)){Rg(o,t);continue}let e=Z(o,t);D(t);let s=c.array.has(t)&&Ih(e)&&!Object.keys(e).some(e=>!Number.isNaN(Number(e))),l=Z(r,t),u=Ih(l)&&Object.keys(l).some(e=>e!==`_f`);s?bg(n.errors,{[t]:e},t):e&&(e.type||e.message)||Array.isArray(e)||Ih(e)&&u?tg(n.errors,t,e):Rg(n.errors,t)}n.errors={...n.errors}}else Object.keys(l).forEach(E),n.errors=o;return o},se=async({name:e,eventType:r})=>{if(t.validate){let i=x,o=await t.validate({formValues:a,formState:n,name:e,eventType:r});if(i!==x)return!0;if(Ih(o)){let e=!0;for(let t in xe(Jh),o){let n=o[t];n&&(e=!1,Se(`${Jh}.${t}`,{message:fg(n.message)?n.message:``,type:n.type||Kh.validate}))}return e}else if(fg(o)||!o)return Se(Jh,{message:o||``,type:Kh.validate}),!1;else return xe(Jh),!0}return!0},L=async({fields:e,onlyCheckValid:i,name:o,eventType:s,context:l={valid:!0,runRootValidation:!1}})=>{let u=x;if(t.validate&&!l.runRootValidation&&(l.runRootValidation=!0,!await se({name:o,eventType:s})&&(l.valid=!1,i)))return l.valid;for(let o in e){let d=e[o];if(d){let{_f:e,...f}=d;if(e){let o=c.array.has(e.name),s=d._f&&l_(d._f),f=_(`isValidating`,`validatingFields`);s&&f&&A([e.name],!0);let p=S,m=await Ng(d,c.disabled,a,w,t.shouldUseNativeValidation&&!i,o);if(u!==x)return l.valid;if(s&&f&&A([e.name]),!Z(r,e.name)||C[e.name]>p)continue;if(m[e.name]&&(l.valid=!1,i)||(i||(E(e.name),Z(m,e.name)?o?bg(n.errors,m,e.name):tg(n.errors,e.name,m[e.name]):Rg(n.errors,e.name)),t.shouldUseNativeValidation&&m[e.name]))break}!xg(f)&&await L({context:l,onlyCheckValid:i,fields:f,name:o,eventType:s})}}return l.valid},ce=()=>{for(let e of c.unMount){let t=Z(r,e);t&&(t._f.refs?t._f.refs.every(e=>!qg(e)):!qg(t._f.ref))&&Ee(e)}c.unMount=new Set},le=(e,t)=>(e&&!X(t)&&tg(a,e,t),!lg(o.mount?a:i,i)),ue=(e,t,n)=>{let r=o.mount?a:X(t)||!X(e)?i:t;return pg(e,c,X(e)?{...r}:r,n,t)},de=e=>Fg(Z(o.mount?a:i,e,t.shouldUnregister?Z(i,e,[]):[])),fe=(e,t,n={},i=!1,o=!1,s=!1)=>{let c=Z(r,e),l=t;if(c){let n=c._f;n&&(!n.disabled&&tg(a,e,i_(t,n)),l=Sg(n.ref)&&Ph(t)?``:t,Ug(n.ref)?[...n.ref.options].forEach(e=>e.selected=l.includes(e.value)):n.refs?jh(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(Array.isArray(l)?e.checked=!!l.find(t=>t===e.value):e.checked=l===e.value||!!l)}):n.refs.forEach(e=>e.checked=e.value===l):Mh(n.ref)?n.ref.value=``:(n.ref.value=l,!n.ref.type&&!o&&!s&&y.state.next({name:e,values:i?a:v(e)?Uh(a):void 0})))}(n.shouldDirty||n.shouldTouch)&&re(e,c&&c._f&&!c._f.disabled&&(c._f.valueAsNumber||c._f.valueAsDate||c._f.setValueAs)?i_(t,c._f):l,n.shouldTouch,n.shouldDirty,!o),n.shouldValidate&&_e(e,{delayError:n.delayError}),n.shouldValidate&&c&&c._f&&c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&_e(c._f.deps)},R=(e,t,n,i=!1,o=!1,s=!1)=>{for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;let u=t[l],d=e+`.`+l,f=Z(r,d);c.array.has(d)&&y.array.next({name:d,values:i?a:Uh(a)}),(c.array.has(e)||Ih(u)||f&&!f._f)&&!Nh(u)?R(d,u,n,i,o,s):fe(d,u,n,i,o,s)}},z=(e,t,i,s,l=!1)=>{let u=Z(r,e),d=c.array.has(e),f=s?t:Uh(t),p=lg(Z(a,e),f);if(p||tg(a,e,f),d)y.array.next({name:e,values:s?a:Uh(a)}),_(`isDirty`,`dirtyFields`)&&i.shouldDirty&&(j(),n.isDirty=le(e,f),l||y.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:n.isDirty})),i.shouldValidate&&_e(e,{delayError:i.delayError});else{let t=Array.isArray(f)&&!f.length||xg(f),n=!p&&!l;!u||u._f||Ph(f)||t?fe(e,f,i,s,l,n):R(e,f,i,s,l,n)}if(!p&&!l){let t=vg(e,c),r=o.mount||t?e:void 0,i=d?[]:r_(c.array,e),l=s?a:v(r)||i.some(v)?Uh(a):void 0;y.state.next({...t&&n,name:r,values:l});for(let e of i)y.state.next({name:e,values:l})}},pe=(e,t,n={})=>z(e,t,n,!1),me=(e,t={})=>{let r=eg(e)?e(a):e;if(!lg(a,r)){a={...a,...r};for(let e of new Set([...c.mount,...c.array]))Hg(r,e)&&z(e,Z(r,e),t,!0,!0);y.state.next({...n,name:void 0,type:void 0,...d.size?{values:a}:{}}),t.shouldValidate&&O()}},he=async e=>{o.mount=!0;let i=e.target,s=i.name,u=!0,d=Z(r,s),m=S,h=e=>{u=!!Z(r,s)&&!(C[s]>m)&&lg(e,Z(a,s,e))};if(d){o.keepIsValid=!1;let m,g,S=!1,C=i.type?a_(d._f):Lh(e),T=e.type===Wh.BLUR||e.type===Wh.FOCUS_OUT,E=!u_(d._f)&&!t.validate&&!t.resolver&&!Z(n.errors,s)&&!d._f.deps,D=E||h_(T,Z(n.touchedFields,s),n.isSubmitted,p,f),k=vg(s,c,T);tg(a,s,Uh(C)),T?(!i||!i.readOnly)&&(d._f.onBlur&&d._f.onBlur(e),Object.prototype.hasOwnProperty.call(l,s)&&(S=!0,l[s](0))):d._f.onChange&&d._f.onChange(e);let j=re(s,C,T),M=!xg(j)||k;if(!T&&y.state.next({name:s,type:e.type,...v(s)?{values:Uh(a)}:{}}),D)return(!E||!n.isValid)&&_(`isValid`)&&(t.mode===`onBlur`?T&&O():T||O()),M&&y.state.next({name:s,...k?{}:j});if(!t.resolver&&t.validate&&await se({name:s,eventType:e.type}),!T&&k&&y.state.next({...n}),t.resolver){let e=x,{errors:t}=await ae([s]);if(e!==x)return;if(A([s]),h(C),!u){!xg(j)&&y.state.next(j);return}let i=d_(n.errors,r,s),a=d_(t,r,i.name||s);m=a.error,s=a.name,g=xg(t)}else{let n=x,i=++b;if(A([s],!0),m=(await Ng(d,c.disabled,a,w,t.shouldUseNativeValidation))[s],n!==x)return;if(A([s]),h(C),u){if(m)g=!1;else if(_(`isValid`)){if(g=await L({fields:r,onlyCheckValid:!0,name:s,eventType:e.type}),n!==x)return;h(C),i!==b&&(g=void 0)}}}u&&(d._f.deps&&(!Array.isArray(d._f.deps)||d._f.deps.length>0)&&_e(d._f.deps),ie(s,g,m,j),S&&Object.prototype.hasOwnProperty.call(l,s)&&l[s](0))}},ge=(e,t)=>{if(Z(n.errors,t)&&e.focus)return e.focus(),1},_e=async(e,i={})=>{o.keepIsValid=!1;let a,s,u=Pg(e),d=x;if(t.resolver){let t=await oe(X(e)?e:u);a=xg(t),s=e?!u.some(e=>Z(t,e)):a}else e?(s=(await Promise.all(u.map(async e=>{let t=Z(r,e);return await L({fields:t&&t._f?{[e]:t}:t,eventType:Wh.TRIGGER})}))).every(Boolean),!(!s&&!n.isValid)&&O()):s=a=await L({fields:r,name:e,eventType:Wh.TRIGGER});if(d!==x)return s;if(i.delayError&&t.delayError&&fg(e)){let r=Z(n.errors,e);r?(Rg(n.errors,e),l[e]=T(e,()=>N(e,r)),l[e](t.delayError)):E(e)}if(i.shouldTouch)for(let t of e?u:c.mount)!c.array.has(t)&&tg(n.touchedFields,t,!0);return n.errors={...n.errors},y.state.next({...!fg(e)||_(`isValid`)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},...i.shouldTouch&&_(`touchedFields`)?{touchedFields:n.touchedFields}:{},errors:n.errors}),i.shouldFocus&&!s&&yg(r,ge,e?u:c.mount),s},ve=((e,t)=>{let r=X(e)&&!t?{...o.mount?a:i}:o.mount?a:i;return t&&(r=Bg(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),X(e)?r:fg(e)?Z(r,e):e.map(e=>Z(r,e))}),ye=(e=>X(e)?{...n.errors}:fg(e)?Z(n.errors,e):e.map(e=>Z(n.errors,e))),be=(e,t)=>{let r=t||n,i=Z(r.errors,e);return{invalid:!!i,isDirty:!!Z(r.dirtyFields,e),error:i,isValidating:!!Z(r.validatingFields,e),isTouched:!!Z(r.touchedFields,e)}},xe=e=>{let t=e?Pg(e):void 0;t?t.forEach(e=>{D(e),Rg(n.errors,e),n.errors={...n.errors},y.state.next({name:e,errors:n.errors})}):(Object.keys(l).forEach(E),n.errors={},y.state.next({errors:n.errors}))},Se=(e,t,i)=>{D(e);let a=Z(r,e,{_f:{}}),o=a._f&&a._f.ref,{ref:s,message:c,type:l,types:u,...d}=Z(n.errors,e)||{};tg(n.errors,e,{...d,...t,ref:o}),n.errors={...n.errors},y.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&o&&o.focus&&o.focus()},Ce=(e,t)=>{if(eg(e)){let n={};d.add(n);let{unsubscribe:r}=y.state.subscribe({next:n=>`values`in n&&e(n.values||ue(void 0,t),n)});return{unsubscribe:()=>{d.delete(n),r()}}}return ue(e,t,!0)},we=e=>{let t={name:e.name,exact:e.exact};e.formState&&e.formState.values&&d.add(t);let{unsubscribe:r}=y.state.subscribe({next:t=>{if(m_(e.name,t.name,e.exact)&&f_(t,e.formState||h,e.reRenderRoot)){let r=t.values||{...a};e.callback({...n,...t,validatingFields:n.validatingFields,isValidating:n.isValidating,values:r,defaultValues:i})}}});return()=>{d.delete(t),r()}},Te=e=>{o.mount=!0;let t=Object.keys(e.formState||{}).filter(t=>e.formState&&e.formState[t]);for(let e of t)g[e]=(g[e]||0)+1;let n=we({...e,formState:{...m,...e.formState}});return()=>{for(let e of t.splice(0))g[e]--;n()}},Ee=(e,o={})=>{let s=e?Pg(e):c.mount;o.keepIsValidating||k(s);for(let e of s)c.mount.delete(e),c.array.delete(e),c.disabled.delete(e),Rg(r,e),!o.keepValue&&Rg(a,e),o.keepError||(D(e),Rg(n.errors,e)),!o.keepDirty&&Rg(n.dirtyFields,e),!o.keepTouched&&Rg(n.touchedFields,e),!t.shouldUnregister&&!o.keepDefaultValue&&Rg(i,e);o.keepError||(n.errors={...n.errors}),d.size&&y.state.next({values:Uh(a)}),y.state.next({...n,...o.keepDirty?{}:{isDirty:le()},...o.keepIsValidating?{}:{isValidating:!xg(n.validatingFields)}}),!o.keepIsValid&&O()},De=({disabled:e,name:t})=>{if($h(e)&&o.mount||e||c.disabled.has(t)){let n=c.disabled.has(t)!==!!e;e?c.disabled.add(t):c.disabled.delete(t),n&&o.mount&&!o.action&&O()}},Oe=(e,n={})=>{let a=Z(r,e),s=$h(n.disabled)||$h(t.disabled),l=!c.registerName.has(e)&&a&&a._f&&!a._f.mount;if((!a||!a._f)&&(C[e]=++S),tg(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),c.mount.add(e),a&&a._f){let t=Z(r,e);for(let e of qh)e in n||delete t._f[e]}return a&&!l?De({disabled:$h(n.disabled)?n.disabled:t.disabled,name:e}):ne(e,!0,n.value),{...s?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!s_(n.required),min:s_(n.min),max:s_(n.max),minLength:s_(n.minLength),maxLength:s_(n.maxLength),pattern:s_(n.pattern)}:{},name:e,onChange:he,onBlur:he,ref:s=>{if(s){c.registerName.add(e),Oe(e,n),c.registerName.delete(e),a=Z(r,e);let t=X(s.value)&&s.querySelectorAll&&s.querySelectorAll(`input,select,textarea`)[0]||s,o=Kg(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;let u={...a._f};o?(u.refs=[...l.filter(qg),t,...Array.isArray(Z(i,e))?[{}]:[]],u.ref={type:t.type,name:e}):(u.ref=t,delete u.refs),tg(r,e,{_f:u}),ne(e,!1,void 0,t)}else a=Z(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(Vh(c.array,e)&&o.action)&&c.unMount.add(e)}}},ke=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&yg(r,ge,c.mount),Ae=e=>{$h(e)&&(y.state.next({disabled:e}),yg(r,(t,n)=>{let i=Z(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0))},je=(e,i)=>async o=>{let s,u;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let d=Uh(a);y.state.next({isSubmitting:!0});let f=x,p=e=>{throw f===x&&y.state.next({isSubmitting:!1}),e};if(t.resolver){let e;try{e=await ae()}catch(e){p(e)}let{errors:t,values:r}=e;if(f!==x)return;A(),Object.keys(l).forEach(E),n.errors=t,d=Uh(r)}else{try{await L({fields:r,eventType:Wh.SUBMIT})}catch(e){p(e)}if(f!==x)return;Rg(n.errors,Yh),n.errors={...n.errors}}if(c.disabled.size)for(let e of c.disabled)Rg(d,e);if(xg(n.errors)){y.state.next({errors:{}});try{s=await e(d,o)}catch(e){u=e}}else{if(i)try{await i({...n.errors},o)}catch(e){p(e)}ke(),setTimeout(ke)}if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xg(n.errors)&&!u,submitCount:n.submitCount+1,errors:n.errors}),u)throw u;return s},Me=(e,t={})=>{Z(r,e)&&(k([e]),X(t.defaultValue)?pe(e,Uh(Z(i,e))):(pe(e,t.defaultValue),tg(i,e,Uh(t.defaultValue))),t.keepTouched||Rg(n.touchedFields,e),t.keepDirty||(Rg(n.dirtyFields,e),n.isDirty=X(t.defaultValue)?le():le(e,Uh(Z(i,e)))),t.keepError||(D(e),Rg(n.errors,e),n.errors={...n.errors},O()),y.state.next({...n,isValidating:!xg(n.validatingFields)}))},Ne=(e,u={})=>{x++,b++;let d=e?Uh(e):i,f=Uh(d),p=xg(e),m=f,g=r;if(Object.keys(l).forEach(E),u.keepDefaultValues||(i=d),!u.keepValues){if(u.keepDirtyValues){let e=new Set([...c.mount,...Yg(n_(i,a,void 0,g),n.dirtyFields)]);for(let t of e){let e=Z(n.dirtyFields,t),r=Z(a,t),i=Z(m,t);e&&!X(r)?tg(m,t,r):!e&&!X(i)&&pe(t,i)}}else{if(Hh&&X(e))for(let e of c.mount){let t=Z(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Sg(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(u.keepFieldsRef)for(let e of c.mount)pe(e,Z(m,e));else r={}}if(t.shouldUnregister){if(a=u.keepDefaultValues?Uh(i):{},u.keepFieldsRef)for(let e of c.mount)tg(a,e,Z(m,e))}else a=Uh(m);y.array.next({values:{...m}}),y.state.next({name:void 0,type:void 0,values:{...m}})}c={mount:u.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:u.keepValues||u.keepDirtyValues||u.keepFieldsRef?new Set([...c.disabled].filter(e=>Z(r,e))):new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!h.isValid||!!u.keepIsValid||!!u.keepDirtyValues||!t.shouldUnregister&&!xg(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!u.keepIsValid,o.action=!1,o.actionArrayLengths.clear(),s=!1,u.keepErrors||(n.errors={}),y.state.next({submitCount:u.keepSubmitCount?n.submitCount:0,isDirty:p?!1:u.keepDirty?n.isDirty:u.keepValues?le():!!(u.keepDefaultValues&&e&&!lg(e,i)),isSubmitted:u.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:p?{}:u.keepDirtyValues?u.keepDefaultValues&&a?n_(i,a,void 0,g):n.dirtyFields:u.keepDefaultValues&&e?n_(i,e,void 0,g):u.keepDirty?n.dirtyFields:u.keepValues?n_(i,a,void 0,g):{},touchedFields:u.keepTouched?n.touchedFields:{},...!u.keepIsValidating&&(n.isValidating||!xg(n.validatingFields))?{validatingFields:{},isValidating:!1}:null,errors:u.keepErrors?n.errors:{},isSubmitSuccessful:u.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Pe=(e,n)=>Ne(eg(e)?e(a):e,{...t.resetOptions,...n}),Fe=(e,t={})=>{let n=Z(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&eg(e.select)&&e.select()})}};y.state.subscribe({next:e=>{let{name:t,type:r,values:i,...a}=e;Object.keys(a).length&&(n={...n,...a})}});let Ie={control:{register:Oe,unregister:Ee,getFieldState:be,handleSubmit:je,setError:Se,_subscribe:we,_runSchema:ae,_updateIsValidating:A,_focusError:ke,_getWatch:ue,_getDirty:le,_setValid:O,_setFieldArray:M,_setDisabledField:De,_setErrors:P,_getFieldArray:de,_reset:Ne,_resetDefaultValues:()=>eg(t.defaultValues)&&t.defaultValues().then(e=>{Pe(e,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:ce,_disableForm:Ae,_subjects:y,_proxyFormState:h,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return c},set _names(e){c=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e},f=_g(t.mode),p=_g(t.reValidateMode),w=t.criteriaMode===Gh.all}},subscribe:Te,trigger:_e,register:Oe,handleSubmit:je,watch:Ce,setValue:pe,setValues:me,getValues:ve,getErrors:ye,reset:Pe,resetField:Me,resetDefaultValues:(e,t={})=>{if(i=Uh(e),!t.keepDirty){let e=n_(i,a,void 0,r);n.dirtyFields=e,n.isDirty=!xg(e)}t.keepIsValid||O(),y.state.next({...n,defaultValues:i})},clearErrors:xe,unregister:Ee,setError:Se,setFocus:Fe,getFieldState:be};return{...Ie,formControl:Ie}}var x_={mode:__.mode,reValidateMode:__.reValidateMode,shouldFocusError:__.shouldFocusError,resolver:void 0,criteriaMode:void 0,delayError:void 0,shouldUnregister:void 0,shouldUseNativeValidation:void 0,context:void 0,progressive:void 0,resetOptions:void 0};function S_(e={}){let t=C.useRef(void 0),n=C.useRef(void 0),r=C.useRef(e.formControl),i=C.useRef(!1),a=C.useRef(!!e.validate),o=C.useRef(!!e.errors),s=C.useRef(!1),[c,l]=C.useState(()=>({...Uh(y_),isLoading:eg(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:eg(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,i.current=!1,e.formControl)t.current={...e.formControl,formState:c},e.defaultValues&&!eg(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...r}=b_(e);t.current={...r,formState:c}}let u=t.current.control,d=u._options,f={};for(let t in x_)t in d&&!(t in e)&&(f[t]=x_[t]);i.current&&!e.disabled&&(f.disabled=!1),u._options={...f,...e,validate:e.validate};let p=()=>({...u._formState,defaultValues:u._defaultValues}),{resyncIfNeeded:m,snapshot:h}=ug(p);return ag(()=>{m(!0,p,l);let e=u._subscribe({formState:u._proxyFormState,callback:()=>l({...u._formState,defaultValues:u._defaultValues}),reRenderRoot:!0});return l(e=>({...e,isReady:!0})),u._formState.isReady=!0,u._subjects.state.next({isReady:!0}),()=>{e(),h(!0,p)}},[u,m,h]),C.useEffect(()=>{u._disableForm(i.current&&!e.disabled?!1:e.disabled),i.current=!!e.disabled},[u,e.disabled]),C.useEffect(()=>{e.mode&&(u._options.mode=e.mode),e.reValidateMode&&(u._options.reValidateMode=e.reValidateMode)},[u,e.mode,e.reValidateMode]),C.useEffect(()=>{e.errors?(u._setErrors(e.errors),u._focusError()):o.current&&u._setErrors({}),o.current=!!e.errors},[u,e.errors]),C.useEffect(()=>{a.current&&!e.validate&&t.current&&t.current.clearErrors(Jh),a.current=!!e.validate},[e.validate]),C.useEffect(()=>{e.shouldUnregister&&u._subjects.state.next({values:u._getWatch()})},[u,e.shouldUnregister]),C.useEffect(()=>{if(u._proxyFormState.isDirty){let e=u._getDirty();e!==c.isDirty&&u._subjects.state.next({isDirty:e})}},[u,c.isDirty]),C.useEffect(()=>{e.values&&!lg(e.values,n.current)?(u._reset(e.values,{keepFieldsRef:!0,...u._options.resetOptions}),u._options.resetOptions&&u._options.resetOptions.keepIsValid||u._setValid(),n.current=e.values,l(e=>({...e}))):u._resetDefaultValues()},[u,e.values]),C.useEffect(()=>{(!u._state.mount||!s.current&&!e.values)&&(u._setValid(),u._state.mount=!0),s.current=!0,u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),t.current.formState=C.useMemo(()=>ig(c,u),[u,c]),t.current}var C_=C.createContext(null);C_.displayName=`HookFormContext`;var w_=()=>C.useContext(C_),T_=({children:e,watch:t,getValues:n,getErrors:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,setValues:c,trigger:l,formState:u,resetField:d,reset:f,resetDefaultValues:p,handleSubmit:m,unregister:h,control:g,register:_,setFocus:v,subscribe:y})=>{let b=C.useMemo(()=>({watch:t,getValues:n,getErrors:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,setValues:c,trigger:l,formState:u,resetField:d,reset:f,resetDefaultValues:p,handleSubmit:m,unregister:h,control:g,register:_,setFocus:v,subscribe:y}),[o,g,u,r,i,n,m,_,f,p,d,a,v,s,c,y,l,h,t]);return C.createElement(C_.Provider,{value:b},C.createElement(ng.Provider,{value:b.control},e))},E_=(e,t,n)=>{if(e&&`reportValidity`in e){let r=Z(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},D_=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?E_(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>E_(t,n,e))}},O_=(e,t)=>{t.shouldUseNativeValidation&&D_(e,t);let n={};for(let r in e){let i=Z(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.refs?i.refs[0]:i&&i.ref});if(k_(t.names||Object.keys(e),r)){let e=Object.assign({},Z(n,r));tg(e,`root`,a),tg(n,r,e)}else tg(n,r,a)}return n},k_=(e,t)=>{let n=A_(t).replace(/[.*+?^${}()|\\]/g,`\\$&`);return e.some(e=>A_(e).match(`^${n}\\.\\d+`))};function A_(e){return e.replace(/\[(\d+)]/g,`.$1`).replace(/[[\]]/g,``)}function j_(){return j_=Object.assign?Object.assign.bind():function(e){for(var t=1;t0){var s=r.errors.reduce(function(e,t){return t.lengthtypeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function L_(e,t=`|`){return e.map(e=>cv(e)).join(t)}function R_(e,t){return typeof t==`bigint`?t.toString():t}var z_=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function B_(e){return new z_(e)}function V_(e){return e==null}function H_(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function U_(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r){let e=t._zod.def.shape[a];return r?r(e,a):e}):J_(e,a,r?r(n.value,a):n.value))}}function X_(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?q_(e,n,()=>t[n]):J_(e,n,r.value))}}function Z_(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Q_(e){return JSON.stringify(e)}function $_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const ev=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function tv(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const nv=B_(()=>{var e;if(Zv.jitless||typeof navigator<`u`&&!((e=navigator)==null||(e=e.userAgent)==null)&&e.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function rv(e){if(tv(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(tv(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function iv(e){return rv(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const av=new Set([`string`,`number`,`symbol`]);function ov(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function sv(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function Q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0: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 cv(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function lv(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}const uv=(()=>({safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}))(),dv={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function fv(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`);let i={};return Y_(i,e,pv(e,t)),sv(e,Z_(n,{shape:i,checks:[]}))}function pv(e,t){let n=K_(e),r=[];for(let e of Reflect.ownKeys(t)){var i;if(!((i=Object.getOwnPropertyDescriptor(n,e))!=null&&i.enumerable))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function mv(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`);let i=new Set(pv(e,t)),a={};return Y_(a,e,Reflect.ownKeys(K_(e)).filter(e=>!i.has(e))),sv(e,Z_(n,{shape:a,checks:[]}))}function hv(e,t){if(!rv(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=K_(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return sv(e,Z_(e._zod.def,{shape:gv(e,t)}))}function gv(e,t){let n={};return Y_(n,e,Reflect.ownKeys(K_(e))),X_(n,t),n}function _v(e,t){if(!rv(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return sv(e,Z_(e._zod.def,{shape:gv(e,t)}))}function vv(e,t){var n,r;if(!(!(t==null||(n=t._zod)==null)&&n.def))throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if((r=e._zod.def.checks)!=null&&r.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let i={};return Y_(i,e,Reflect.ownKeys(K_(e))),Y_(i,t,Reflect.ownKeys(K_(t))),sv(e,Z_(e._zod.def,{shape:i,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function yv(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(pv(t,n)):void 0,o={};return Y_(o,t,Reflect.ownKeys(K_(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),sv(t,Z_(t._zod.def,{shape:o,checks:[]}))}function bv(e,t,n){let r=n?new Set(pv(t,n)):void 0,i={};return Y_(i,t,Reflect.ownKeys(K_(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),sv(t,Z_(t._zod.def,{shape:i}))}function xv(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function wv(e){return typeof e==`string`?e:e==null?void 0:e.message}function Tv(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Ev(e,t,n){var r;for(let i=t;ie;return t[`~constantCatch`]=!0,t}var Gv,Kv={value:void 0,enumerable:!1},qv=`captureStackTrace`in Error?Error:null;function Jv(e){let t=qv;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return qv=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function $(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(n._zod){if(n._zod.traits.has(e))return}else{Kv.value=new a(r);try{Object.defineProperty(n,`_zod`,Kv)}finally{Kv.value=void 0}}if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Nv(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=(r==null?void 0:r.Parent)??Object;class u extends l{}Object.defineProperty(u,`name`,{value:e});function d(e){var t;let n=r!=null&&r.Parent?Jv(u):this;c(n,e);let i=n._zod.deferred;if(i){for(let e of i)e();n._zod.deferred=void 0}let a=(t=globalThis.__zod_globalConfig)==null?void 0:t.postProcessor;return a&&a(n),n}return Object.defineProperty(d,`init`,{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>{var n;return r!=null&&r.Parent&&t instanceof r.Parent?!0:t==null||(n=t._zod)==null||(n=n.traits)==null?void 0:n.has(e)}}),Object.defineProperty(d,`name`,{value:e}),d}var Yv=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Xv=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Gv=globalThis).__zod_globalConfig??(Gv.__zod_globalConfig={});const Zv=globalThis.__zod_globalConfig;function Qv(e){return e&&Object.assign(Zv,e),Zv}function $v(){let e=this._zod;return e.message??=JSON.stringify(e.def,R_,2),e.message}function ey(e){this._zod.message=e}var ty={get:$v,set:ey,enumerable:!0,configurable:!0},ny={value:void 0,enumerable:!1},ry=new WeakSet([Object.prototype,Error.prototype]),iy=(e,t)=>{e.name=`$ZodError`,ny.value=t,Object.defineProperty(e,`issues`,ny),ny.value=void 0,Object.defineProperty(e,`message`,ty);let n=Object.getPrototypeOf(e);ry.has(n)||(ry.add(n),Object.defineProperty(n,`toString`,{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,`toString`,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,`toString`,{value:e,configurable:!0,writable:!0})}}))};const ay=$(`$ZodError`,iy);$(`$ZodError`,iy,void 0,{Parent:Error});function oy(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function sy(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?oy(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function cy(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{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Yv;if(s.issues.length){let n=new((a==null?void 0:a.Err)??e)(s.issues.map(e=>Dv(e,o,Qv())));throw ev(n,(a==null?void 0:a.callee)??t),n}return s.value};return t},dy=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a==null?void 0:a.Err)??e)(s.issues.map(e=>Dv(e,o,Qv())));throw ev(n,(a==null?void 0:a.callee)??t),n}return s.value};return t},fy=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 Yv;return a.issues.length?py(e,a.issues,i):{success:!0,data:a.value}};function py(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Dv(e,n,Qv()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}const my=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?py(e,a.issues,i):{success:!0,data:a.value}};var hy=Symbol.for(`zod.compile.invalid`),gy=Symbol.for(`zod.compile.fallback`);const _y=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==hy)return!0;if(r.definite===!0&&n===void 0)return!1}return vy(e,t,n)});function vy(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[gy]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Yv;return a.issues.length===0}const yy=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},by=e=>{let t=uy(e),n=(e,r,i,a)=>t(e,r,i?{...i,direction:`backward`}:{direction:`backward`},ly(n,a));return n},xy=e=>{let t=uy(e),n=(e,r,i,a)=>t(e,r,i,ly(n,a));return n},Sy=e=>{let t=dy(e),n=async(e,r,i,a)=>await t(e,r,i?{...i,direction:`backward`}:{direction:`backward`},ly(n,a));return n},Cy=e=>{let t=dy(e),n=async(e,r,i,a)=>await t(e,r,i,ly(n,a));return n},wy=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return fy(e)(t,n,i)},Ty=e=>(t,n,r)=>fy(e)(t,n,r),Ey=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return my(e)(t,n,i)},Dy=e=>async(t,n,r)=>my(e)(t,n,r),Oy=/^[cC][0-9a-z]{6,}$/,ky=/^[0-9a-z]+$/,Ay=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,jy=/^[0-9a-vA-V]{20}$/,My=/^[A-Za-z0-9]{27}$/,Ny=/^[a-zA-Z0-9_-]{21}$/;function Py(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const Fy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Iy=/^([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})$/,Ly=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)$/,Ry=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var zy=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function By(){return new RegExp(zy,`u`)}const Vy=/^(?:(?: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])$/,Hy=/^(([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}|:))$/,Uy=/^((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])$/,Wy=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Gy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ky=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,qy=/^https?$/,Jy=/^\+[1-9]\d{6,14}$/;var Yy=`(?:(?:\\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])))`;function Xy(e){return RegExp(`^${e}$`)}const Zy=Xy(Yy);function Qy(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $y(e){return RegExp(`^${Qy(e)}$`)}function eb(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Qy({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Qy({precision:e.precision})}`:n;return RegExp(`^${Yy}T(?:${r})$`)}const tb=/^[\s\S]{0,}$/,nb=/^-?\d+(?:\.\d+)?$/,rb=/^[^A-Z]*$/,ib=/^[^a-z]*$/,ab=$(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])});var ob=e=>{let t=e.value;return!V_(t)&&t.length!==void 0},sb={number:`number`,bigint:`bigint`,object:`date`};const cb=$(`$ZodCheckLessThan`,(e,t)=>{ab.init(e,t);let n=sb[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value{ab.init(e,t);let n=sb[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:sb[typeof r.value]??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})}}),ub=$(`$ZodCheckMultipleOf`,(e,t)=>{ab.init(e,t),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`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):U_(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})}}),db=$(`$ZodCheckNumberFormat`,(e,t)=>{var n;ab.init(e,t),t.format=t.format||`float64`;let r=(n=t.format)==null?void 0:n.includes(`int`),i=r?`int`:`number`,[a,o]=uv[t.format];e._zod.check=n=>{let s=n.value;if(r){if(!Number.isInteger(s)){n.issues.push({expected:i,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?n.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:i,inclusive:!0,continue:!t.abort}):n.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}so&&n.issues.push({origin:`number`,input:s,code:`too_big`,maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),fb=$(`$ZodCheckMaxLength`,(e,t)=>{var n;ab.init(e,t),(n=e._zod.def).when??(n.when=ob),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?kv(r):i)<=t.maximum)return;let a=Av(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pb=$(`$ZodCheckMinLength`,(e,t)=>{var n;ab.init(e,t),(n=e._zod.def).when??(n.when=ob),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=Av(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mb=$(`$ZodCheckLengthEquals`,(e,t)=>{var n;ab.init(e,t),(n=e._zod.def).when??(n.when=ob),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?kv(r):i;if(a===t.length)return;let o=Av(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),hb=$(`$ZodCheckStringFormat`,(e,t)=>{var n,r;ab.init(e,t),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=()=>{})}),gb=$(`$ZodCheckRegex`,(e,t)=>{hb.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})}}),_b=$(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=rb,hb.init(e,t)}),vb=$(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ib,hb.init(e,t)}),yb=$(`$ZodCheckIncludes`,(e,t)=>{ab.init(e,t);let n=ov(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),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})}}),bb=$(`$ZodCheckStartsWith`,(e,t)=>{ab.init(e,t);let n=RegExp(`^${ov(t.prefix)}.*`);t.pattern??=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})}}),xb=$(`$ZodCheckEndsWith`,(e,t)=>{ab.init(e,t);let n=RegExp(`.*${ov(t.suffix)}$`);t.pattern??=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})}}),Sb=$(`$ZodCheckOverwrite`,(e,t)=>{ab.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var Cb=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).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(){var e;let t=Function,n=((e=this)==null?void 0:e.content)??[``];return new t(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${n.join(` `)}\n};`)(...Object.values(this.closed))}};const wb={major:4,minor:6,patch:7},Tb=$(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wb;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r!=null&&r.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0){var a;(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse})}else{let t=(t,n,r)=>{if(t.memo)return t;let i=xv(t),a;for(let o of n){if(o._zod.def.when){if(Sv(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&(r==null?void 0:r.async)===!1)throw new Yv;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ev(t.issues,n,e),i||=xv(t,n))});else{if(t.issues.length===n)continue;Ev(t.issues,n,e),i||=xv(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(xv(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Yv;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Yv;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Fv(this,`~standard`,Ob(this))},set"~standard"(e){Pv(this,`~standard`,e)}});var Eb=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Dv(e,t,Qv()))}:{value:e.value};async function Db(e,t){let n={async:!0};return Eb(await e._zod.run({value:t,issues:[]},n),n)}function Ob(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Eb(r,n)}catch{}return Db(e,t)},vendor:`zod`,version:1}}const kb=$(`$ZodString`,(e,t)=>{Tb.init(e,t),e._zod.pattern=t.pattern??tb,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}}),Ab=$(`$ZodStringFormat`,(e,t)=>{hb.init(e,t),kb.init(e,t)}),jb=$(`$ZodGUID`,(e,t)=>{t.pattern??=Iy,Ab.init(e,t)}),Mb=$(`$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??=Ly(e)}else t.pattern??=Ly();Ab.init(e,t)}),Nb=$(`$ZodEmail`,(e,t)=>{t.pattern??=Ry,Ab.init(e,t)});function Pb(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Fb(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Pb(e)||2:Ib(e,t)}function Ib(e,t){var n;if(!t.normalize&&((n=t.protocol)==null?void 0:n.source)===qy.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Lb=/[\t\n\r]/g;function Rb(e){return e.replace(Lb,``)}function zb(e,t){return t.lastIndex=0,t.test(e.hostname)}function Bb(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}const Vb=$(`$ZodURL`,(e,t)=>{Ab.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Fb(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Rb(r);return}t.hostname&&!zb(i,t.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&&!Bb(i,t.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:Rb(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Hb=$(`$ZodEmoji`,(e,t)=>{t.pattern??=By(),Ab.init(e,t)}),Ub=$(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Ny:Py(t.length),Ab.init(e,t)}),Wb=$(`$ZodCUID`,(e,t)=>{t.pattern??=Oy,Ab.init(e,t)}),Gb=$(`$ZodCUID2`,(e,t)=>{t.pattern??=ky,Ab.init(e,t)}),Kb=$(`$ZodULID`,(e,t)=>{t.pattern??=Ay,Ab.init(e,t)}),qb=$(`$ZodXID`,(e,t)=>{t.pattern??=jy,Ab.init(e,t)}),Jb=$(`$ZodKSUID`,(e,t)=>{t.pattern??=My,Ab.init(e,t)}),Yb=$(`$ZodISODateTime`,(e,t)=>{t.pattern??=eb(t),Ab.init(e,t)}),Xb=$(`$ZodISODate`,(e,t)=>{t.pattern??=Zy,Ab.init(e,t)}),Zb=$(`$ZodISOTime`,(e,t)=>{t.pattern??=$y(t),Ab.init(e,t)}),Qb=$(`$ZodISODuration`,(e,t)=>{t.pattern??=Fy,Ab.init(e,t)}),$b=$(`$ZodIPv4`,(e,t)=>{t.pattern??=Vy,Ab.init(e,t)});var ex=/^[0-9a-fA-F:.]+$/;function tx(e){return ex.test(e)?Pb(`http://[${e}]`):!1}const nx=$(`$ZodIPv6`,(e,t)=>{t.pattern??=Hy,Ab.init(e,t),e._zod.check=n=>{tx(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),rx=$(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Uy,Ab.init(e,t)});function ix(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:tx(n)}const ax=$(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Wy,Ab.init(e,t),e._zod.check=n=>{ix(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function ox(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const sx=/^[0-9a-zA-Z+/]*={0,2}$/,cx=$(`$ZodBase64`,(e,t)=>{t.pattern??=sx,Ab.init(e,t),e._zod.check=n=>{ox(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),lx=/^[A-Za-z0-9_-]*$/;function ux(e){if(!lx.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return ox(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const dx=$(`$ZodBase64URL`,(e,t)=>{t.pattern??=lx,Ab.init(e,t),e._zod.check=n=>{ux(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),fx=$(`$ZodE164`,(e,t)=>{t.pattern??=Jy,Ab.init(e,t)});function px(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==null?void 0:i.typ)!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const mx=$(`$ZodJWT`,(e,t)=>{Ab.init(e,t),e._zod.check=n=>{px(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),hx=$(`$ZodNumber`,(e,t)=>{Tb.init(e,t),e._zod.pattern=nb,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:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),gx=$(`$ZodNumberFormat`,(e,t)=>{db.init(e,t),hx.init(e,t)}),_x=$(`$ZodUnknown`,(e,t)=>{Tb.init(e,t),e._zod.parse=e=>e}),vx=$(`$ZodNever`,(e,t)=>{Tb.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function yx(e,t){let n=Tv(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!(a!=null&&a.skipChecks)&&(a==null?void 0:a.direction)!==`backward`){for(let[t,r]of Tv(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Ev(n.issues,t,e),n}}return i(n,a)}}var bx=e=>Array.isArray(e)?e.length:-1;function xx(e,t,n){e.issues.length&&t.issues.push(...Cv(n,e.issues)),t.value[n]=e.value}const Sx=$(`$ZodArray`,(e,t)=>{Tb.init(e,t);let n=Zv.memoizer;n==null||n.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i==null?void 0:i.abortEarly;for(let e=0;exx(t,r,e)));else if(xx(c,r,e),s&&c.issues.length!==0&&xv(c))break}return o.length?Promise.all(o).then(()=>r):r},yx(e,bx)});function Cx(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Cv(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var wx=[];function Tx(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:wx,i=r.length?[...t,...r]:t;for(let t of i){var a;if(!(!((a=e.shape)==null||(a=a[t])==null||(a=a._zod)==null||(a=a.traits)==null)&&a.has(`$ZodType`)))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`)}let o=lv(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function Ex(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(xv(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Cx(e,n,i,t,d,f))):Cx(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const Dx=$(`$ZodObject`,(e,t)=>{Tb.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n!=null&&n.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,`shape`,{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,`shape`,{get:e})}let i=B_(()=>Tx(t));Hv(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||W_(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=tv,o=t.catchall,s,c=Zv.memoizer;c==null||c.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n==null?void 0:n.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(xv(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Cx(n,t,e,r,a,o))):Cx(s,t,e,r,a,o)}return o?Ex(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Ox=$(`$ZodObjectJIT`,(e,t)=>{Dx.init(e,t);let n=e._zod.parse,r=B_(()=>Tx(t)),i=Zv.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Cb([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` let ${e}_ab = false; for (let i = 0; i < ${e}.issues.length; i++) { const iss = ${e}.issues[i]; iss.path = iss.path ? [${t}, ...iss.path] : [${t}]; payload.issues.push(iss); if (iss.continue !== true) ${e}_ab = true; } if (${e}_ab && ctx && ctx.abortEarly) { payload.value = newResult; return payload; }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){var d,f;if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Q_(e),i=`${r} in input`,u=t[e],p=u==null||(d=u._zod)==null?void 0:d.optin,m=p!==void 0,h=(u==null||(f=u._zod)==null?void 0:f.optout)===`optional`;if(o.write(`const ${n} = ${s(r)};`),m&&h){let e=p===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` const ${n}_present = ${i}; if (!${n}.issues.length || ${n}_present) { if (${n}.issues.length) {${c(n,r)} } if (${e}) { newResult[${r}] = ${n}.value; } } `)}else m?(o.write(` if (${n}.issues.length) {${c(n,r)} } `),p===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(` if (${n}.value !== undefined || ${i}) { newResult[${r}] = ${n}.value; } `)):o.write(` const ${n}_present = ${i}; if (${n}.issues.length) {${c(n,r)} } if (!${n}_present && !${n}.issues.length) { payload.issues.push({ code: "invalid_type", expected: "nonoptional", input: undefined, path: [${r}] }); if (ctx && ctx.abortEarly) { payload.value = newResult; return payload; } } if (${n}_present) { newResult[${r}] = ${n}.value; } `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=tv,c=!Zv.jitless,l=c&&nv.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Ex([],p,i,f,d,e,(f==null?void 0:f.abortEarly)===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function kx(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=>!xv(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=>Dv(e,r,Qv())))}),t)}const Ax=$(`$ZodUnion`,(e,t)=>{Tb.init(e,t),Hv(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),Hv(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Hv(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),Hv(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>H_(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=>kx(t,r,e,i)):kx(o,r,e,i)}}),jx=$(`$ZodIntersection`,(e,t)=>{Tb.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])=>Nx(e,t,n)):Nx(e,i,a)}});function Mx(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(rv(e)&&rv(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Mx(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{var n,o;let s;if(e.code===`unrecognized_keys`&&!((n=e.path)!=null&&n.length))i??=e,s=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&((o=e.path)==null?void 0:o.length)===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),s=[t]}else return!1;for(let e of s)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Mx(t.value,n.value);if(!c.valid){if(xv(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}const Px=$(`$ZodEnum`,(e,t)=>{Tb.init(e,t);let n=I_(t.entries),r=new Set(n);e._zod.values=r,Hv(e,`pattern`,e=>{let t=I_(e.def.entries).filter(e=>av.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ov(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),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}}),Fx=$(`$ZodTransform`,(e,t)=>{var n;Tb.init(e,t),e._zod.optin=`optional`,(n=Zv.memoizer)==null||n.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Xv(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));if(i instanceof Promise)throw new Yv;return n.value=i,n}});function Ix(e,t){return e.value=t.issues.length?void 0:t.value,e}const Lx=$(`$ZodOptional`,(e,t)=>{Tb.init(e,t),Hv(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,Hv(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),Hv(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${H_(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Ix(e,t)):Ix(e,r)}return t.innerType._zod.run(e,n)}}),Rx=$(`$ZodExactOptional`,(e,t)=>{Lx.init(e,t),Hv(e,`values`,e=>e.def.innerType._zod.values),Hv(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),zx=$(`$ZodNullable`,(e,t)=>{Tb.init(e,t),Hv(e,`optin`,e=>e.def.innerType._zod.optin),Hv(e,`optout`,e=>e.def.innerType._zod.optout),Hv(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${H_(t.source)}|null)$`):void 0}),Hv(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Bx=$(`$ZodDefault`,(e,t)=>{Tb.init(e,t),e._zod.optin=`defaulted`,Hv(e,`values`,e=>e.def.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=>Vx(e,t)):Vx(r,t)}});function Vx(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Hx=$(`$ZodPrefault`,(e,t)=>{Tb.init(e,t),e._zod.optin=`defaulted`,Hv(e,`values`,e=>e.def.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))}),Ux=$(`$ZodNonOptional`,(e,t)=>{Tb.init(e,t),Hv(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].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=>Wx(t,e)):Wx(i,e)}});function Wx(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Gx(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Dv(e,r,Qv()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Kx=$(`$ZodCatch`,(e,t)=>{Tb.init(e,t),Hv(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),Hv(e,`optout`,e=>e.def.innerType._zod.optout),Hv(e,`values`,e=>e.def.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({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Gx(e,r,t,n)):Gx(e,r,t,n)}}),qx=$(`$ZodPipe`,(e,t)=>{Tb.init(e,t),Hv(e,`values`,e=>e.def.in._zod.values),Hv(e,`optin`,e=>e.def.in._zod.optin),Hv(e,`optout`,e=>e.def.out._zod.optout),Hv(e,`propValues`,e=>e.def.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=>Jx(e,t.in,n)):Jx(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Jx(e,t.out,n)):Jx(r,t.out,n)}});function Jx(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Yx=$(`$ZodReadonly`,(e,t)=>{Tb.init(e,t),Hv(e,`propValues`,e=>e.def.innerType._zod.propValues),Hv(e,`values`,e=>e.def.innerType._zod.values),Hv(e,`optin`,e=>{var t;return(t=e.def.innerType)==null||(t=t._zod)==null?void 0:t.optin}),Hv(e,`optout`,e=>{var t;return(t=e.def.innerType)==null||(t=t._zod)==null?void 0:t.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(Xx):Xx(r)}});function Xx(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Zx=$(`$ZodCustom`,(e,t)=>{ab.init(e,t),Tb.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=>Qx(t,n,r,e));Qx(i,n,r,e)}});function Qx(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(Mv(e))}}var $x=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},eS=`~memo`,tS=[];function nS(e){return typeof e==`object`&&!!e}function rS(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var iS=new WeakMap,aS=0,oS=1,sS=2;function cS(e,t,n){let r=iS.get(e);if(r!==void 0)return r?sS:aS;if(t.has(e))return sS;t.add(e);let i=aS,a=e=>{if(i!==sS&&e!=null&&e._zod){let r=cS(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=aS;for(let o of Reflect.ownKeys(e)){var a;let s=Object.getOwnPropertyDescriptor(e,o);if(r&&!s.enumerable)continue;let c=s.get?oS:(a=s.value)!=null&&a._zod?cS(s.value,t,n):aS;c>i&&(i=c)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=G_(c);s(e?o(e,!0):oS),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?cS(r,t,!1):oS);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),lS(e,i)}function lS(e,t){return t!==oS&&iS.set(e,t===sS),t}function uS(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var dS,fS=[],pS={alloc(e,t,n){let r=dS;if(!r)return n;dS=void 0;let i={value:n,issues:null};return r.set(t.value,i),fS.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&hS(n,e.value))throw new $x;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=cS(e,new Set,!1);if(i===aS)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===sS||r?n=!0:r=!0}let l=s.value;if(!nS(l))return t(s,c);let u=c[eS];u||(u={buckets:new WeakMap,backEdges:void 0},c[eS]=u);let d;i===c?d=a:(d=uS(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...rS(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;dS=d;let p=fS.length,m=t(s,c);dS=void 0;let h=fS.length>p?fS.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?rS(e.issues):tS),e)):(h&&(h.issues=m.issues.length?rS(m.issues):tS),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function mS(){return pS}function hS(e,t){var n;let r=(n=e[eS])==null?void 0:n.backEdges;return r!==void 0&&nS(t)&&r.has(t)}var gS=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(jv(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${cv(e.values[0])}`:`Invalid option: expected one of ${L_(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${L_(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function _S(){return{localeError:gS()}}var vS,yS=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 bS(){return new yS}(vS=globalThis).__zod_globalRegistry??(vS.__zod_globalRegistry=bS());const xS=globalThis.__zod_globalRegistry;function SS(e){return e.checks&&=[...e.checks],e}function CS(e,t){return new e(SS({type:`string`,...Q(t)}))}function wS(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Q(t)})}function TS(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Q(t)})}function ES(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Q(t)})}function DS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Q(t)})}function OS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Q(t)})}function kS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Q(t)})}function AS(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Q(t)})}function jS(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Q(t)})}function MS(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Q(t)})}function NS(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Q(t)})}function PS(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Q(t)})}function FS(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Q(t)})}function IS(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Q(t)})}function LS(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Q(t)})}function RS(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Q(t)})}function zS(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Q(t)})}function BS(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Q(t)})}function VS(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Q(t)})}function HS(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Q(t)})}function US(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Q(t)})}function WS(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Q(t)})}function GS(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Q(t)})}function KS(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Q(t)})}function qS(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Q(t)})}function JS(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Q(t)})}function YS(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Q(t)})}function XS(e,t){return new e(SS({type:`number`,checks:[],...Q(t)}))}function ZS(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Q(t)})}function QS(e){return new e({type:`unknown`})}function $S(e,t){return new e({type:`never`,...Q(t)})}function eC(e,t){return new cb({check:`less_than`,...Q(t),value:e,inclusive:!1})}function tC(e,t){return new cb({check:`less_than`,...Q(t),value:e,inclusive:!0})}function nC(e,t){return new lb({check:`greater_than`,...Q(t),value:e,inclusive:!1})}function rC(e,t){return new lb({check:`greater_than`,...Q(t),value:e,inclusive:!0})}function iC(e,t){return new ub({check:`multiple_of`,...Q(t),value:e})}function aC(e,t){return new fb({check:`max_length`,...Q(t),maximum:e})}function oC(e,t){return new pb({check:`min_length`,...Q(t),minimum:e})}function sC(e,t){return new mb({check:`length_equals`,...Q(t),length:e})}function cC(e,t){return new gb({check:`string_format`,format:`regex`,...Q(t),pattern:e})}function lC(e){return new _b({check:`string_format`,format:`lowercase`,...Q(e)})}function uC(e){return new vb({check:`string_format`,format:`uppercase`,...Q(e)})}function dC(e,t){return new yb({check:`string_format`,format:`includes`,...Q(t),includes:e})}function fC(e,t){return new bb({check:`string_format`,format:`starts_with`,...Q(t),prefix:e})}function pC(e,t){return new xb({check:`string_format`,format:`ends_with`,...Q(t),suffix:e})}function mC(e){return new Sb({check:`overwrite`,tx:e})}function hC(e){return mC(t=>t.normalize(e))}function gC(){return mC(e=>e.trim())}function _C(){return mC(e=>e.toLowerCase())}function vC(){return mC(e=>e.toUpperCase())}function yC(){return mC(e=>$_(e))}function bC(e,t,n){return new e({type:`array`,element:t,...Q(n)})}function xC(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Q(n)})}function SC(e,t){let n=CC(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Mv(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Mv(r))}},e(t.value,t)),t);return n}function CC(e,t){let n=new ab({check:`custom`,...Q(t)});return n._zod.check=e,n}function wC(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&W_(e,t,n[t]);return e}function TC(e){let t=(e==null?void 0:e.target)??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??xS,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??`throw`,override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:(e==null?void 0:e.cycles)??`ref`,reused:(e==null?void 0:e.reused)??`inline`,intersections:[],deferred:[],external:(e==null?void 0:e.external)??void 0}}function EC(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function DC(e,t,n={path:[],schemaPath:[]}){var r,i,a;let o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;let c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let l=(r=(i=e._zod).toJSONSchema)==null?void 0:r.call(i);if(l)c.schema=l;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,r);else{let n=c.schema,i=t.processors[o.type];if(!i)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}let i=e._zod.parent;i&&(c.ref||=i,DC(i,t,r),t.seen.get(i).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&wC(c.schema,u),t.io===`input`&&LC(e)&&(delete c.schema.examples,delete c.schema.default),t.io===`input`&&`_prefault`in c.schema&&((a=c.schema).default??(a.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function OC(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function kC(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){var i;let n=(i=e.metadataRegistry.get(t[0]))==null?void 0:i.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 a=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){var i;let n=(i=e.external.registry.get(t[0]))==null?void 0:i.id,a=e.external.uri??(e=>e);if(n)return{ref:a(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${a(`__shared`)}#/${r}/${OC(o)}`}}let a=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:a+OC(o)}},o=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=a(e);t.def={...t.schema},r&&(t.defId=r);let i=t.schema;for(let e in i)delete i[e];i.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle){var s;throw Error(`Cycle detected: #/${(s=e.cycle)==null?void 0:s.join(`/`)}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}}for(let n of e.seen.entries()){var c;let r=n[1];if(t===n[0]){o(n);continue}if(e.external){var l;let r=(l=e.external.registry.get(n[0]))==null?void 0:l.id;if(t!==n[0]&&r){o(n);continue}}if((c=e.metadataRegistry.get(n[0]))!=null&&c.id){o(n);continue}if(r.cycle){o(n);continue}r.count>1&&e.reused===`ref`&&o(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function AC(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;AC(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var jC=new Set([`type`,`properties`,`required`,`additionalProperties`]),MC=[`oneOf`,`anyOf`];function NC(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function PC(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!jC.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){var i;let t=((i=n.properties)==null?void 0:i[r])??NC(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}W_(n,r,e.length===1?e[0]:PC(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let a={type:`object`,properties:n};if(r.size&&(a.required=[...r]),t.every(e=>e.additionalProperties===!1))a.additionalProperties=!1;else{let e=[];for(let n of t){let t=NC(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?a.additionalProperties=e[0]:e.length>1&&(a.additionalProperties={allOf:e})}return a}function FC(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of jC)if(t in e)return;let n=t.filter(e=>MC.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=PC(t);else{let e=n[0],i=MC.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>PC([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,wC(e,r))}function IC(e,t){var n,r,i;let a=e.seen.get(t);if(!a)throw Error(`Unprocessed schema. This is a bug in Zod.`);let o=t=>{let n=e.seen.get(t);if(n.ref===null)return;let r=n.def??n.schema,i={...r},a=n.ref;if(n.ref=null,a){o(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(r.allOf=r.allOf??[],r.allOf.push(s)):wC(r,s),wC(r,i),t._zod.parent===a)for(let e in r)e===`$ref`||e===`allOf`||e in i||delete r[e];if(s.$ref&&n.def)for(let e in r)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}let s=t._zod.parent;if(s&&s!==a){o(s);let t=e.seen.get(s);if(t!=null&&t.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(let e in r)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())o(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())AC(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e==null?void 0:e.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])FC(e)}}let s={};if(e.target===`draft-2020-12`?s.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?s.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?s.$schema=`http://json-schema.org/draft-04/schema#`:e.target,(n=e.external)!=null&&n.uri){var c;let n=(c=e.external.registry.get(t))==null?void 0:c.id;if(!n)throw Error("Schema is missing an `id` property");s.$id=e.external.uri(n)}wC(s,a.defId?a.schema:a.def??a.schema);let l=(r=e.metadataRegistry.get(t))==null?void 0:r.id;l!==void 0&&s.id===l&&delete s.id;let u=((i=e.external)==null?void 0:i.defs)??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,W_(u,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(u).length>0&&(e.target===`draft-2020-12`?s.$defs=u:s.definitions=u);try{let n=JSON.parse(JSON.stringify(s));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:zC(t,`input`,e.processors),output:zC(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function LC(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 LC(r.element,n);if(r.type===`set`)return LC(r.valueType,n);if(r.type===`lazy`)return LC(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`||r.type===`catch`)return LC(r.innerType,n);if(r.type===`intersection`)return LC(r.left,n)||LC(r.right,n);if(r.type===`record`||r.type===`map`)return LC(r.keyType,n)||LC(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:LC(r.in,n)||LC(r.out,n);if(r.type===`object`){for(let e in r.shape)if(LC(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(LC(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(LC(e,n))return!0;return!!(r.rest&&LC(r.rest,n))}return!1}const RC=(e,t={})=>n=>{let r=TC({...n,processors:t});return DC(e,r),kC(r,e),IC(r,e)},zC=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=TC({...i??{},target:a,io:t,processors:n});return DC(e,o),kC(o,e),IC(o,e)};var BC=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},VC=(e,t,n)=>{(e[t]===void 0||n{BC(e,`minimum`,t),VC(e,`maximum`,t)},UC=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},WC=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},GC=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},KC=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},qC=(e,t)=>BC(e,`minimum`,t.minimum),JC=(e,t)=>VC(e,`maximum`,t.maximum),YC=e=>(t,n)=>{KC(t,n.format);let[r,i]=e[n.format];BC(t,`minimum`,r),VC(t,`maximum`,i)},XC={greater_than:(e,t)=>BC(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>VC(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>UC(e,t.value),number_format:YC(uv),bigint_format:YC(dv),min_length:qC,max_length:JC,length_equals:(e,t)=>HC(e,t.length),min_size:qC,max_size:JC,size_equals:(e,t)=>HC(e,t.size),string_format:(e,t)=>{KC(e,t.format),t.pattern&&WC(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>GC(e,t.mime)};function ZC(e){var t;let n={},r=e._zod.def,i=e._zod.traits.has(`$ZodCheck`)?[e,...r.checks??[]]:r.checks??[];for(let e of i)(t=XC[e._zod.def.check])==null||t.call(XC,n,e._zod.def);let a=e._zod.bag;a.minimum!==void 0&&BC(n,`minimum`,a.minimum),a.exclusiveMinimum!==void 0&&BC(n,`exclusiveMinimum`,a.exclusiveMinimum),a.maximum!==void 0&&VC(n,`maximum`,a.maximum),a.exclusiveMaximum!==void 0&&VC(n,`exclusiveMaximum`,a.exclusiveMaximum),a.multipleOf!==void 0&&UC(n,a.multipleOf),a.format!==void 0&&(n.format??=a.format,a.format.includes(`int`)&&(n.isInt=!0)),a.mime&&GC(n,a.mime);for(let e of a.patterns??[])WC(n,e);return n}var QC={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},$C=new Map([[sx,Gy],[lx,Ky]]),ew=e=>$C.get(e)??e;const tw=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=ZC(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=QC[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(ew);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}))])}},nw=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=ZC(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):EC(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},rw=(e,t,n,r)=>{n.not={}},iw=(e,t,n,r)=>{let i=e._zod.def,a=I_(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},aw=(e,t,n,r)=>{EC(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ow=(e,t,n,r)=>{EC(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},sw=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=ZC(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=DC(a.element,t,{...r,path:[...r.path,`items`]})};function cw(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?cw(t.out):t.type===`catch`?cw(t.innerType):e._zod.optin}const lw=(e,t,n,r)=>{var i;let a=n,o=e._zod.def,s=o.shape;if(Object.getOwnPropertySymbols(s).length&&EC(e,t,a,r,`Symbol keys cannot be represented in JSON Schema`))return;for(let e in a.type=`object`,a.properties={},s)W_(a.properties,e,DC(s[e],t,{...r,path:[...r.path,`properties`,e]}));let c=[];for(let e of Object.keys(s)){let n=o.shape[e];(t.io===`input`?cw(n)===void 0:n._zod.optout===void 0)&&c.push(e)}c.length>0&&(a.required=c),((i=o.catchall)==null?void 0:i._zod.def.type)===`never`?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=DC(o.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(a.additionalProperties=!1)},uw=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>DC(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},dw=(e,t,n,r)=>{let i=e._zod.def,a=DC(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=DC(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},fw=(e,t,n,r)=>{let i=e._zod.def,a=DC(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`}]},pw=(e,t,n,r)=>{let i=e._zod.def;DC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType};var mw=Symbol();function hw(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(EC(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),mw):JSON.parse(o)}const gw=(e,t,n,r)=>{let i=e._zod.def;DC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=hw(i.defaultValue,e,t,n,r);o!==mw&&(n.default=o)},_w=(e,t,n,r)=>{let i=e._zod.def;DC(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=hw(i.defaultValue,e,t,n,r);o!==mw&&(n._prefault=o)},vw=(e,t,n,r)=>{let i=e._zod.def;DC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{EC(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},yw=(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;DC(o,t,r);let s=t.seen.get(e);s.ref=o},bw=(e,t,n,r)=>{let i=e._zod.def;DC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},xw=(e,t,n,r)=>{let i=e._zod.def;DC(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType};var Sw=new WeakSet([Object.prototype,Error.prototype]);function Cw(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}const ww=$(`ZodError`,(e,t)=>{ay.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Sw.has(n)||(Sw.add(n),Cw(n,`format`,e=>t=>cy(e,t)),Cw(n,`flatten`,e=>t=>sy(e,t)),Cw(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,R_,2)}),Cw(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,R_,2)}),Object.defineProperty(n,`isEmpty`,{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Tw=uy(ww),Ew=dy(ww),Dw=fy(ww),Ow=my(ww),kw=by(ww),Aw=xy(ww),jw=Sy(ww),Mw=Cy(ww),Nw=wy(ww),Pw=Ty(ww),Fw=Ey(ww),Iw=Dy(ww);function Lw(){Zv.localeError||Qv(_S())}function Rw(){Zv.memoizer||Qv({memoizer:mS()})}const zw=$(`ZodType`,(e,t)=>(Lw(),Tb.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Z_(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 sv(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(QT(e,t))},superRefine(e,t){return this.check($T(e,t))},overwrite(e){return this.check(mC(e))},optional(){return PT(this)},exactOptional(){return IT(this)},nullable(){return RT(this)},nullish(){return PT(RT(this))},nonoptional(e){return WT(this,e)},array(){return ST(this)},or(e){return ET([this,e])},and(e){return OT(this,e)},transform(e){return JT(this,MT(e))},default(e){return BT(this,e)},prefault(e){return HT(this,e)},catch(e){return KT(this,e)},pipe(e){return JT(this,e)},readonly(){return XT(this)},describe(e){let t=this.clone();return xS.add(t,{description:e}),t},meta(...e){if(e.length===0)return xS.get(this);let t=this.clone();return xS.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Fv(this,`~standard`,{...Ob(this),jsonSchema:{input:zC(this,`input`),output:zC(this,`output`)}})},set"~standard"(e){Pv(this,`~standard`,e)},parse:function e(t,n){return Tw(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Ew(this,t,n,{callee:e})},safeParse(e,t){return Dw(this,e,t)},async safeParseAsync(e,t){return Ow(this,e,t)},get spa(){var e;return(e=this)==null?void 0:e.safeParseAsync},set spa(e){Pv(this,`spa`,e)},validate(e,t){return _y(this,e,t)},validateAsync(e,t){return yy(this,e,t)},encode:function e(t,n){return kw(this,t,n,{callee:e})},decode:function e(t,n){return Aw(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await jw(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Mw(this,t,n,{callee:e})},safeEncode(e,t){return Nw(this,e,t)},safeDecode(e,t){return Pw(this,e,t)},async safeEncodeAsync(e,t){return Fw(this,e,t)},async safeDecodeAsync(e,t){return Iw(this,e,t)},toJSONSchema(e){return RC(this,{})(e)},get description(){var e;return(e=xS.get(this))==null?void 0:e.description},get _def(){return this._zod.def}}),Bw=$(`_ZodString`,(e,t)=>{kb.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tw(e,t,n,r)},Iv({format:e=>ZC(e).format??null,minLength:e=>ZC(e).minimum??null,maxLength:e=>ZC(e).maximum??null},{regex(...e){return this.check(cC(...e))},includes(...e){return this.check(dC(...e))},startsWith(...e){return this.check(fC(...e))},endsWith(...e){return this.check(pC(...e))},min(...e){return this.check(oC(...e))},max(...e){return this.check(aC(...e))},length(...e){return this.check(sC(...e))},nonempty(...e){return this.check(oC(1,...e))},lowercase(e){return this.check(lC(e))},uppercase(e){return this.check(uC(e))},trim(){return this.check(gC())},normalize(...e){return this.check(hC(...e))},toLowerCase(){return this.check(_C())},toUpperCase(){return this.check(vC())},slugify(){return this.check(yC())}})),Vw=$(`ZodString`,(e,t)=>{kb.init(e,t),Bw.init(e,t)},{email(e){return this.check(wS(Jw,e))},url(e){return this.check(AS(Zw,e))},jwt(e){return this.check(GS(fT,e))},emoji(e){return this.check(jS(Qw,e))},guid(e){return this.check(TS(Yw,e))},uuid(e){return this.check(ES(Xw,e))},uuidv4(e){return this.check(DS(Xw,e))},uuidv6(e){return this.check(OS(Xw,e))},uuidv7(e){return this.check(kS(Xw,e))},nanoid(e){return this.check(MS($w,e))},cuid(e){return this.check(NS(eT,e))},cuid2(e){return this.check(PS(tT,e))},ulid(e){return this.check(FS(nT,e))},base64(e){return this.check(HS(lT,e))},base64url(e){return this.check(US(uT,e))},xid(e){return this.check(IS(rT,e))},ksuid(e){return this.check(LS(iT,e))},ipv4(e){return this.check(RS(aT,e))},ipv6(e){return this.check(zS(oT,e))},cidrv4(e){return this.check(BS(sT,e))},cidrv6(e){return this.check(VS(cT,e))},e164(e){return this.check(WS(dT,e))},datetime(e){return this.check(KS(Ww,e))},date(e){return this.check(qS(Gw,e))},time(e){return this.check(JS(Kw,e))},duration(e){return this.check(YS(qw,e))}});function Hw(e){return CS(Vw,e)}const Uw=$(`ZodStringFormat`,(e,t)=>{Ab.init(e,t),Bw.init(e,t)}),Ww=$(`ZodISODateTime`,(e,t)=>{Yb.init(e,t),Uw.init(e,t)}),Gw=$(`ZodISODate`,(e,t)=>{Xb.init(e,t),Uw.init(e,t)}),Kw=$(`ZodISOTime`,(e,t)=>{Zb.init(e,t),Uw.init(e,t)}),qw=$(`ZodISODuration`,(e,t)=>{Qb.init(e,t),Uw.init(e,t)}),Jw=$(`ZodEmail`,(e,t)=>{Nb.init(e,t),Uw.init(e,t)}),Yw=$(`ZodGUID`,(e,t)=>{jb.init(e,t),Uw.init(e,t)}),Xw=$(`ZodUUID`,(e,t)=>{Mb.init(e,t),Uw.init(e,t)}),Zw=$(`ZodURL`,(e,t)=>{Vb.init(e,t),Uw.init(e,t)}),Qw=$(`ZodEmoji`,(e,t)=>{Hb.init(e,t),Uw.init(e,t)}),$w=$(`ZodNanoID`,(e,t)=>{Ub.init(e,t),Uw.init(e,t)}),eT=$(`ZodCUID`,(e,t)=>{Wb.init(e,t),Uw.init(e,t)}),tT=$(`ZodCUID2`,(e,t)=>{Gb.init(e,t),Uw.init(e,t)}),nT=$(`ZodULID`,(e,t)=>{Kb.init(e,t),Uw.init(e,t)}),rT=$(`ZodXID`,(e,t)=>{qb.init(e,t),Uw.init(e,t)}),iT=$(`ZodKSUID`,(e,t)=>{Jb.init(e,t),Uw.init(e,t)}),aT=$(`ZodIPv4`,(e,t)=>{$b.init(e,t),Uw.init(e,t)}),oT=$(`ZodIPv6`,(e,t)=>{nx.init(e,t),Uw.init(e,t)}),sT=$(`ZodCIDRv4`,(e,t)=>{rx.init(e,t),Uw.init(e,t)}),cT=$(`ZodCIDRv6`,(e,t)=>{ax.init(e,t),Uw.init(e,t)}),lT=$(`ZodBase64`,(e,t)=>{cx.init(e,t),Uw.init(e,t)}),uT=$(`ZodBase64URL`,(e,t)=>{dx.init(e,t),Uw.init(e,t)}),dT=$(`ZodE164`,(e,t)=>{fx.init(e,t),Uw.init(e,t)}),fT=$(`ZodJWT`,(e,t)=>{mx.init(e,t),Uw.init(e,t)}),pT=$(`ZodNumber`,(e,t)=>{hx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nw(e,t,n,r),e.isFinite=!0},Iv({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=ZC(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=ZC(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=ZC(e);return!!t||!!(n!=null&&n.some(Number.isSafeInteger))},format:e=>ZC(e).format??null},{gt(e,t){return this.check(nC(e,t))},gte(e,t){return this.check(rC(e,t))},min(e,t){return this.check(rC(e,t))},lt(e,t){return this.check(eC(e,t))},lte(e,t){return this.check(tC(e,t))},max(e,t){return this.check(tC(e,t))},int(e){return this.check(gT(e))},safe(e){return this.check(gT(e))},positive(e){return this.check(nC(0,e))},nonnegative(e){return this.check(rC(0,e))},negative(e){return this.check(eC(0,e))},nonpositive(e){return this.check(tC(0,e))},multipleOf(e,t){return this.check(iC(e,t))},step(e,t){return this.check(iC(e,t))},finite(){return this}}));function mT(e){return XS(pT,e)}const hT=$(`ZodNumberFormat`,(e,t)=>{gx.init(e,t),pT.init(e,t)});function gT(e){return ZS(hT,e)}const _T=$(`ZodUnknown`,(e,t)=>{_x.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function vT(){return QS(_T)}const yT=$(`ZodNever`,(e,t)=>{vx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rw(e,t,n,r)});function bT(e){return $S(yT,e)}const xT=$(`ZodArray`,(e,t)=>{Rw(),Sx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sw(e,t,n,r),e.element=t.element},{min(e,t){return this.check(oC(e,t))},nonempty(e){return this.check(oC(1,e))},max(e,t){return this.check(aC(e,t))},length(e,t){return this.check(sC(e,t))},unwrap(){return this.element}});function ST(e,t){return bC(xT,e,t)}const CT=$(`ZodObject`,(e,t)=>{Rw(),Ox.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lw(e,t,n,r),Uv(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return AT(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Z_(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Z_(this._zod.def,{catchall:vT()}))},loose(){return this.clone(Z_(this._zod.def,{catchall:vT()}))},strict(){return this.clone(Z_(this._zod.def,{catchall:bT()}))},strip(){return this.clone(Z_(this._zod.def,{catchall:void 0}))},extend(e){return hv(this,e)},safeExtend(e){return _v(this,e)},merge(e){return vv(this,e)},pick(e){return fv(this,e)},omit(e){return mv(this,e)},partial(...e){return yv(NT,this,e[0])},exactPartial(...e){return yv(FT,this,e[0],`exactPartial`)},required(...e){return bv(UT,this,e[0])}});function wT(e,t){return new CT({type:`object`,shape:e??{},...Q(t)})}const TT=$(`ZodUnion`,(e,t)=>{Ax.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uw(e,t,n,r),e.options=t.options});function ET(e,t){return new TT({type:`union`,options:e,...Q(t)})}const DT=$(`ZodIntersection`,(e,t)=>{jx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dw(e,t,n,r)});function OT(e,t){return new DT({type:`intersection`,left:e,right:t})}const kT=$(`ZodEnum`,(e,t)=>{Px.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iw(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];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 kT({...t,checks:[],...Q(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 kT({...t,checks:[],...Q(r),entries:i})}});function AT(e,t){return new kT({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}const jT=$(`ZodTransform`,(e,t)=>{Rw(),Fx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ow(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Xv(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Mv(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Mv(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function MT(e){return new jT({type:`transform`,transform:e})}const NT=$(`ZodOptional`,(e,t)=>{Lx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function PT(e){return new NT({type:`optional`,innerType:e})}const FT=$(`ZodExactOptional`,(e,t)=>{Rx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function IT(e){return new FT({type:`optional`,innerType:e})}const LT=$(`ZodNullable`,(e,t)=>{zx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function RT(e){return new LT({type:`nullable`,innerType:e})}const zT=$(`ZodDefault`,(e,t)=>{Bx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function BT(e,t){return new zT({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():iv(t)}})}const VT=$(`ZodPrefault`,(e,t)=>{Hx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_w(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function HT(e,t){return new VT({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():iv(t)}})}const UT=$(`ZodNonOptional`,(e,t)=>{Ux.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function WT(e,t){return new UT({type:`nonoptional`,innerType:e,...Q(t)})}const GT=$(`ZodCatch`,(e,t)=>{Kx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function KT(e,t){return new GT({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Wv(t)})}const qT=$(`ZodPipe`,(e,t)=>{qx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yw(e,t,n,r),e.in=t.in,e.out=t.out});function JT(e,t){return new qT({type:`pipe`,in:e,out:t})}const YT=$(`ZodReadonly`,(e,t)=>{Yx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function XT(e){return new YT({type:`readonly`,innerType:e})}const ZT=$(`ZodCustom`,(e,t)=>{Zx.init(e,t),zw.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aw(e,t,n,r)});function QT(e,t={}){return xC(ZT,e,t)}function $T(e,t){return SC(e,t)}var eE=u(v(),1),tE=Object.defineProperty,nE=(e,t)=>tE(e,`name`,{value:t,configurable:!0}),rE=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=js(`Primitive.${t}`),r=C.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,w.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function iE(e,t){e&&eE.flushSync(()=>e.dispatchEvent(t))}nE(iE,`dispatchDiscreteCustomEvent`);var aE=Object.defineProperty,oE=C.forwardRef(((e,t)=>aE(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,w.jsx)(rE.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest(`button, input, select, textarea`)||((n=e.onMouseDown)==null||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`));function sE({className:e,...t}){return(0,w.jsx)(oE,{"data-slot":`label`,className:wl(`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})}var cE=T_,lE=C.createContext({}),uE=({...e})=>(0,w.jsx)(lE.Provider,{value:{name:e.name},children:(0,w.jsx)(gg,{...e})}),dE=()=>{let e=C.useContext(lE),t=C.useContext(fE),{getFieldState:n}=w_(),r=dg({name:e.name}),i=n(e.name,r);if(!e)throw Error(`useFormField should be used within `);let{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},fE=C.createContext({});function pE({className:e,...t}){let n=C.useId();return(0,w.jsx)(fE.Provider,{value:{id:n},children:(0,w.jsx)(`div`,{"data-slot":`form-item`,className:wl(`grid gap-2`,e),...t})})}function mE({className:e,...t}){let{error:n,formItemId:r}=dE();return(0,w.jsx)(sE,{"data-slot":`form-label`,"data-error":!!n,className:wl(`data-[error=true]:text-destructive`,e),htmlFor:r,...t})}function hE({...e}){let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=dE();return(0,w.jsx)(Ms,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})}function gE({className:e,...t}){let{error:n,formMessageId:r}=dE(),i=n?String((n==null?void 0:n.message)??``):t.children;return i?(0,w.jsx)(`p`,{"data-slot":`form-message`,id:r,className:wl(`text-destructive text-sm`,e),...t,children:i}):null}function _E({className:e,type:t,...n}){return(0,w.jsx)(`input`,{type:t,"data-slot":`input`,className:wl(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...n})}var vE=Qs(`relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90`,warning:`text-amber-600 bg-amber-500/10 border-amber-500/30 [&>svg]:text-current *:data-[slot=alert-description]:text-amber-600/90`}},defaultVariants:{variant:`default`}});function yE({className:e,variant:t,...n}){return(0,w.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:wl(vE({variant:t}),e),...n})}function bE({className:e,...t}){return(0,w.jsx)(`div`,{"data-slot":`alert-title`,className:wl(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function xE({className:e,...t}){return(0,w.jsx)(`div`,{"data-slot":`alert-description`,className:wl(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}var SE=`/assets/logo-CE4fGrmK.png`,CE=wT({rePassword:Hw().nonempty({message:`确认密码不能为空`}),password:Hw().nonempty({message:`密码不能为空`})}),wE=`森睿智传`;function TE(){let e=Zi(),t=Sh(e=>e.user),n=S_({resolver:F_(CE),defaultValues:{password:``,rePassword:``}}),{mutateAsync:r,isPending:i}=zt({mutationFn:km,onSuccess(){e.navigate({to:`/`,replace:!0})}}),a=e=>{ss.promise(r({...e,username:t==null?void 0:t.username}),{loading:`提交中...`,success:`设置成功`})};return(0,w.jsx)(`div`,{className:`flex items-center justify-center min-h-screen box-border`,children:(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`flex justify-center items-center mb-4 gap-2`,children:[(0,w.jsx)(`img`,{src:SE,alt:``,className:`size-12 object-contain rounded-full bg-white overflow-hidden`}),(0,w.jsx)(`div`,{className:`text-3xl`,children:wE})]}),(0,w.jsxs)(`div`,{className:`w-[480px] p-10 bg-white rounded-xl`,children:[(0,w.jsx)(`div`,{className:`text-center text-2xl`,children:`设置密码`}),(0,w.jsxs)(yE,{variant:`warning`,className:`mt-4`,children:[(0,w.jsx)(zo,{}),(0,w.jsx)(bE,{children:`首次登录请设置新密码`}),(0,w.jsx)(xE,{children:`设置成功后即可正常使用系统。密码长度 6-32 位,支持字母、数字和特殊字符`})]}),(0,w.jsx)(cE,{...n,children:(0,w.jsxs)(`form`,{onSubmit:n.handleSubmit(a),className:`space-y-8 mt-6`,children:[(0,w.jsx)(uE,{control:n.control,name:`password`,render:({field:e})=>(0,w.jsxs)(pE,{children:[(0,w.jsx)(mE,{children:`密码`}),(0,w.jsx)(hE,{children:(0,w.jsx)(_E,{type:`password`,placeholder:`密码`,...e})}),(0,w.jsx)(gE,{})]})}),(0,w.jsx)(uE,{control:n.control,name:`rePassword`,render:({field:e})=>(0,w.jsxs)(pE,{children:[(0,w.jsx)(mE,{children:`确认密码`}),(0,w.jsx)(hE,{children:(0,w.jsx)(_E,{type:`password`,placeholder:`确认密码`,...e})}),(0,w.jsx)(gE,{})]})}),(0,w.jsxs)(Dl,{type:`submit`,className:`w-full`,disabled:i,children:[i&&(0,w.jsx)(Al,{}),`提交`]})]})})]})]})})}var EE=`/assets/bg-CBsBX9E3.png`;const DE=Qa({component:OE});function OE(){let e=Eh(),t=Ch();return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`min-h-screen`,style:{backgroundImage:`url("${EE}")`},children:t&&e?(0,w.jsx)(TE,{}):(0,w.jsx)(uo,{})}),!1]})}const kE=$a(`/(user)`)({component:eo(()=>Ah(()=>import(`./route-yMj8live.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),`component`)}),AE=$a(`/admin`)({component:eo(()=>Ah(()=>import(`./route-C-dN6SG2.js`),__vite__mapDeps([11,1,2,3,4,5,6,7,8,12])),`component`)}),jE=$a(`/login`)({component:eo(()=>Ah(()=>import(`./login-AXVtM6Py.js`),__vite__mapDeps([13,14,2,5])),`component`)}),ME=$a(`/(user)/`)({component:eo(()=>Ah(()=>import(`./(user)-ByN4Axee.js`),__vite__mapDeps([15,16,17,18,19])),`component`)}),NE=$a(`/admin/`)({component:eo(()=>Ah(()=>import(`./admin-V-3Z0PVJ.js`),[]),`component`)}),PE=$a(`/extract/`)({component:eo(()=>Ah(()=>import(`./extract-sa8PNFSm.js`),__vite__mapDeps([20,7])),`component`)});var FE=[{value:`image`,name:`图片`},{value:`video`,name:`视频`},{value:`document`,name:`文档`},{value:`other`,name:`其他`},{value:`unknown`,name:`未知`}];const IE=e=>{var t;return((t=FE.find(t=>t.value===e))==null?void 0:t.name)||`未知`},LE=$a(`/extract/list`)({component:eo(()=>Ah(()=>import(`./list-DFASxSFf.js`),__vite__mapDeps([21,3,4,22,2,5,16,23,17,24,25,18,9,10,26,27])),`component`)});var RE=Qs(`inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function zE({className:e,variant:t,asChild:n=!1,...r}){return(0,w.jsx)(n?Ms:`span`,{"data-slot":`badge`,className:wl(RE({variant:t}),e),...r})}const BE={1:{text:`正常`,color:`bg-primary/10 text-primary`},2:{text:`失效`,color:`bg-gray-500/10 text-gray-500`},11:{text:`解析中`,color:`bg-emerald-500/10 text-emerald-500`},12:{text:`待审核`,color:`bg-violet-500/10 text-violet-500`},13:{text:`传输中`,color:`bg-amber-500/10 text-amber-500`},14:{text:`失败`,color:`bg-red-500/10 text-red-500`}};function VE({status:e}){let t=(0,C.useMemo)(()=>BE[Number(e)],[e]);return(0,w.jsx)(zE,{className:Ys(t==null?void 0:t.color),children:t==null?void 0:t.text})}const HE=$a(`/(user)/inside/`)({component:eo(()=>Ah(()=>import(`./inside-BDK478rm.js`),__vite__mapDeps([28,3,4,22,2,5,16,23,17,24,29,25,18,9,10,30,26,27,31])),`component`)});var UE,WE=(UE=globalThis)!=null&&UE.document?C.useLayoutEffect:()=>{},GE=Object.defineProperty,KE=(e,t)=>GE(e,`name`,{value:t,configurable:!0}),qE=!!(typeof window<`u`&&window.document&&window.document.createElement);function JE(e,t,{checkForDefaultPrevented:n=!0}={}){return KE(function(r){if(e==null||e(r),n===!1||!r||!r.defaultPrevented)return t==null?void 0:t(r)},`handleEvent`)}KE(JE,`composeEventHandlers`);function YE(e){var t;if(!qE)throw Error(`Cannot access window outside of the DOM`);return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)??window}KE(YE,`getOwnerWindow`);function XE(e){if(!qE)throw Error(`Cannot access document outside of the DOM`);return(e==null?void 0:e.ownerDocument)??document}KE(XE,`getOwnerDocument`);function ZE(e,t=!1){let{activeElement:n}=XE(e);if(!(n!=null&&n.nodeName))return null;if(QE(n)&&n.contentDocument)return ZE(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=XE(n).getElementById(e);if(t)return t}}return n}KE(ZE,`getActiveElement`);function QE(e){return e.tagName===`IFRAME`}KE(QE,`isFrame`);var $E=Object.defineProperty,eD=(e,t)=>$E(e,`name`,{value:t,configurable:!0});function tD(e,t){let n=C.createContext(t);n.displayName=e+`Context`;let r=eD(e=>{let{children:t,...r}=e,i=C.useMemo(()=>r,Object.values(r));return(0,w.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=C.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return eD(i,`useContext`),[r,i]}eD(tD,`createContext`);function nD(e,t=[]){let n=[];function r(t,r){let i=C.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=eD(t=>{var n;let{scope:r,children:o,...s}=t,c=(r==null||(n=r[e])==null?void 0:n[a])||i,l=C.useMemo(()=>s,Object.values(s));return(0,w.jsx)(c.Provider,{value:l,children:o})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){var c;let{optional:l=!1}=s,u=(o==null||(c=o[e])==null?void 0:c[a])||i,d=C.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return eD(s,`useContext`),[o,s]}eD(r,`createContext`);let i=eD(()=>{let t=n.map(e=>C.createContext(e));return eD(function(n){let r=(n==null?void 0:n[e])||t;return C.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,rD(i,...t)]}eD(nD,`createContextScope`);function rD(...e){let t=e[0];if(e.length===1)return t;let n=eD(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return eD(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}eD(rD,`composeContextScopes`);var iD=Object.defineProperty,aD=(e,t)=>iD(e,`name`,{value:t,configurable:!0}),oD=C.useInsertionEffect;function sD(e){let t=C.useRef(e);return typeof oD==`function`?oD(()=>{t.current=e}):WE(()=>{t.current=e}),C.useMemo(()=>((...e)=>{var n;return(n=t.current)==null?void 0:n.call(t,...e)}),[])}aD(sD,`useCallbackRef`);var cD=Object.defineProperty,lD=(e,t)=>cD(e,`name`,{value:t,configurable:!0}),uD=`dismissableLayer.update`,dD=`dismissableLayer.pointerDownOutside`,fD=`dismissableLayer.focusOutside`,pD,mD=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),hD=C.forwardRef(lD(function(e,t){var n;let{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,d=C.useContext(mD),[f,p]=C.useState(null),m=(f==null?void 0:f.ownerDocument)??((n=globalThis)==null?void 0:n.document),[,h]=C.useState({}),g=Os(t,p),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,T=C.useRef(!1),E=vD(e=>{o==null||o(e),c==null||c(e),e.defaultPrevented||l==null||l()},{ownerDocument:m,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:C.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...d.branches].some(t=>t.contains(e));return S&&!t},[d.branches,S])}),D=yD(e=>{if(i&&T.current)return;let t=e.target;[...d.branches].some(e=>e.contains(t))||(s==null||s(e),c==null||c(e),e.defaultPrevented||l==null||l())},m),O=f?b===_.length-1:!1,k=sD(e=>{e.key===`Escape`&&(a==null||a(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return C.useEffect(()=>{if(O)return m.addEventListener(`keydown`,k,{capture:!0}),()=>m.removeEventListener(`keydown`,k,{capture:!0})},[m,O,k]),C.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(pD=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),bD(),()=>{r&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=pD))}},[f,m,r,d]),C.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),bD())},[f,d]),C.useEffect(()=>{let e=lD(()=>h({}),`handleUpdate`);return document.addEventListener(uD,e),()=>document.removeEventListener(uD,e)},[]),(0,w.jsx)(rE.div,{...u,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:JE(e.onFocusCapture,D.onFocusCapture),onBlurCapture:JE(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:JE(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function gD(){let e=C.useContext(mD),[t,n]=C.useState(null);return C.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}lD(gD,`useDismissableLayerSurface`);var _D=lD(()=>!0,`IS_TRUE`);function vD(e,t){var n;let{ownerDocument:r=(n=globalThis)==null?void 0:n.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:s=_D}=t,c=sD(e),l=C.useRef(!1),u=C.useRef(!1),d=C.useRef(new Map),f=C.useRef(()=>{});return C.useEffect(()=>{function e(){u.current=!1,a.current=!1,d.current.clear()}lD(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}lD(t,`isOutsideInteractionIntercepted`);function n(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}lD(n,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}lD(p,`handleInteractionBubble`);let m=lD(n=>{if(n.target&&!l.current){let o=function(){r.removeEventListener(`click`,f.current);let n=t();e(),n||xD(dD,c,p,{discrete:!0})};if(lD(o,`handleAndDispatchPointerDownOutsideEvent`),!s(n.target)){r.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:n};u.current=!0,a.current=i&&n.button===0,d.current.clear(),!i||n.button!==0?o():(r.removeEventListener(`click`,f.current),f.current=o,r.addEventListener(`click`,f.current,{once:!0}))}else r.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)r.addEventListener(e,n,!0),r.addEventListener(e,p);let g=window.setTimeout(()=>{r.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),r.removeEventListener(`pointerdown`,m),r.removeEventListener(`click`,f.current);for(let e of h)r.removeEventListener(e,n,!0),r.removeEventListener(e,p)}},[r,c,i,a,o,s]),{onPointerDownCapture:lD(()=>l.current=!0,`onPointerDownCapture`)}}lD(vD,`usePointerDownOutside`);function yD(e,t=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let n=sD(e),r=C.useRef(!1);return C.useEffect(()=>{let e=lD(e=>{e.target&&!r.current&&xD(fD,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:lD(()=>r.current=!0,`onFocusCapture`),onBlurCapture:lD(()=>r.current=!1,`onBlurCapture`)}}lD(yD,`useFocusOutside`);function bD(){let e=new CustomEvent(uD);document.dispatchEvent(e)}lD(bD,`dispatchUpdate`);function xD(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?iE(i,a):i.dispatchEvent(a)}lD(xD,`handleAndDispatchCustomEvent`);var SD=Object.defineProperty,CD=(e,t)=>SD(e,`name`,{value:t,configurable:!0}),wD=0,TD=null;function ED(e){return DD(),e.children}CD(ED,`FocusGuards`);function DD(){C.useEffect(()=>{TD||={start:OD(),end:OD()};let{start:e,end:t}=TD;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),wD++,()=>{wD===1&&(TD==null||TD.start.remove(),TD==null||TD.end.remove(),TD=null),wD=Math.max(0,wD-1)}},[])}CD(DD,`useFocusGuards`);function OD(){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}CD(OD,`createFocusGuard`);var kD=Object.defineProperty,AD=(e,t)=>kD(e,`name`,{value:t,configurable:!0}),jD=`focusScope.autoFocusOnMount`,MD=`focusScope.autoFocusOnUnmount`,ND={bubbles:!1,cancelable:!0},PD=C.forwardRef(AD(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=C.useState(null),u=sD(a),d=sD(o),f=C.useRef(null),p=Os(t,l),m=C.useRef(i);C.useEffect(()=>{m.current=i});let h=C.useCallback(e=>{var t;return e?c!=null&&c.contains(e)?!0:!!((t=m.current)!=null&&t.some(t=>t.contains(e))):!1},[c]),g=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;h(t)?f.current=t:GD(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||GD(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&GD(c)};AD(e,`handleFocusIn`),AD(t,`handleFocusOut`),AD(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused,h]),C.useEffect(()=>{if(c){KD.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(jD,ND);c.addEventListener(jD,u),c.dispatchEvent(t),t.defaultPrevented||(zD(YD(VD(c)),{select:!0}),document.activeElement===e&&GD(c))}return()=>{c.removeEventListener(jD,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(MD,ND);c.addEventListener(MD,d),c.dispatchEvent(r),r.defaultPrevented||GD(e??t.body,{select:!0}),c.removeEventListener(MD,d),KD.remove(g)},0)}}},[c,u,d,g]);let _=C.useCallback(e=>{if(!n&&!r||g.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]=BD(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&GD(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&GD(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,w.jsx)(rE.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),FD=C.createContext(null);function ID({registry:e,children:t}){return e?(0,w.jsx)(FD.Provider,{value:e,children:t}):t}AD(ID,`FocusScopeBranchProvider`);function LD(){let[e,t]=C.useState([]);return{nodes:e,registry:C.useMemo(()=>({add:AD(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:AD(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}AD(LD,`useFocusScopeBranchRegistry`);function RD(e){let t=C.useContext(FD);C.useEffect(()=>{if(!(!e||!t))return t.add(e),()=>t.remove(e)},[e,t])}AD(RD,`useFocusScopeBranch`);function zD(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(GD(r,{select:t}),document.activeElement!==n)return}AD(zD,`focusFirst`);function BD(e){let t=VD(e);return[HD(t,e),HD(t.reverse(),e)]}AD(BD,`getTabbableEdges`);function VD(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:AD(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}AD(VD,`getTabbableCandidates`);function HD(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):UD(r,{upTo:t})))return r}AD(HD,`findVisible`);function UD(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}AD(UD,`isHidden`);function WD(e){return e.tagName===`INPUT`&&typeof e.select==`function`}AD(WD,`isSelectableInput`);function GD(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&WD(e)&&t&&e.select()}}AD(GD,`focus`);var KD=qD();function qD(){let e=[];return{add(t){let n=e[0];t!==n&&(n==null||n.pause()),e=JD(e,t),e.unshift(t)},remove(t){var n;e=JD(e,t),(n=e[0])==null||n.resume()}}}AD(qD,`createFocusScopesStack`);function JD(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}AD(JD,`arrayRemove`);function YD(e){return e.filter(e=>e.tagName!==`A`)}AD(YD,`removeLinks`);var XD=Object.defineProperty,ZD=(e,t)=>XD(e,`name`,{value:t,configurable:!0}),QD=C.useId||(()=>void 0),$D=0;function eO(e){let[t,n]=C.useState(QD());return WE(()=>{e||n(e=>e??String($D++))},[e]),e||(t?`radix-${t}`:``)}ZD(eO,`useId`);var tO=[`top`,`right`,`bottom`,`left`],nO=Math.min,rO=Math.max,iO=Math.round,aO=Math.floor,oO=e=>({x:e,y:e}),sO={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function cO(e,t,n){return rO(e,nO(t,n))}function lO(e,t){return typeof e==`function`?e(t):e}function uO(e){return e.split(`-`)[0]}function dO(e){return e.split(`-`)[1]}function fO(e){return e===`x`?`y`:`x`}function pO(e){return e===`y`?`height`:`width`}function mO(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function hO(e){return fO(mO(e))}function gO(e,t,n){n===void 0&&(n=!1);let r=dO(e),i=hO(e),a=pO(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=TO(o)),[o,TO(o)]}function _O(e){let t=TO(e);return[vO(e),t,vO(t)]}function vO(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var yO=[`left`,`right`],bO=[`right`,`left`],xO=[`top`,`bottom`],SO=[`bottom`,`top`];function CO(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bO:yO:t?yO:bO;case`left`:case`right`:return t?xO:SO;default:return[]}}function wO(e,t,n,r){let i=dO(e),a=CO(uO(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vO)))),a}function TO(e){let t=uO(e);return sO[t]+e.slice(t.length)}function EO(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function DO(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:EO(e)}function OO(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 kO(e,t,n){let{reference:r,floating:i}=e,a=mO(t),o=hO(t),s=pO(o),c=uO(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=dO(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function AO(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}=lO(t,e),p=DO(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=OO(await i.getClippingRect({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=OO(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 jO=50,MO=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:AO},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=kO(l,r,c),f=r,p=0,m={};for(let n=0;n({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}=lO(e,t)||{};if(l==null)return{};let d=DO(u),f={x:n,y:r},p=hO(i),m=pO(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=nO(d[_],T),D=nO(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=cO(E,k,O),j=!c.arrow&&dO(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){var D,O;let e=(((D=a.flip)==null?void 0:D.index)||0)+1,t=C[e];if(t&&(!(d===`alignment`&&v!==mO(t))||E.every(e=>mO(e.placement)===v?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=(O=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])==null?void 0:O.placement;if(!n)switch(p){case`bestFit`:{var k;let e=(k=E.filter(e=>{if(S){let t=mO(e.placement);return t===v||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])==null?void 0:k[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function FO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function IO(e){return tO.some(t=>e[t]>=0)}var LO=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=lO(e,t);switch(i){case`referenceHidden`:{let e=FO(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:IO(e)}}}case`escaped`:{let e=FO(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:IO(e)}}}default:return{}}}}},RO=new Set([`left`,`top`]);async function zO(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=uO(n),s=dO(n),c=mO(n)===`y`,l=RO.has(o)?-1:1,u=a&&c?-1:1,d=lO(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{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 BO=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await zO(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},VO=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}=lO(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=mO(i),p=fO(f),m=u[p],h=u[f],g=(e,t)=>cO(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}}}}}},HO=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}=lO(e,t),u={x:n,y:r},d=mO(i),f=fO(d),p=u[f],m=u[d],h=lO(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;pn&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=RO.has(uO(i)),n=a.reference[d]-a.floating[e]+(t&&((_=o.offset)==null?void 0:_[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:((v=o.offset)==null?void 0:v[d])||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},UO=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}=lO(e,t),c=await i.detectOverflow(t,s),l=uO(n),u=dO(n),d=mO(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=nO(p-c[m],g),y=nO(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*rO(c.left,c.right):S=p-2*rO(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 WO(){return typeof window<`u`}function GO(e){return JO(e)?(e.nodeName||``).toLowerCase():`#document`}function KO(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qO(e){var t;return(t=(JO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function JO(e){return WO()?e instanceof Node||e instanceof KO(e).Node:!1}function YO(e){return WO()?e instanceof Element||e instanceof KO(e).Element:!1}function XO(e){return WO()?e instanceof HTMLElement||e instanceof KO(e).HTMLElement:!1}function ZO(e){return!WO()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof KO(e).ShadowRoot}function QO(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=lk(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function $O(e){return/^(table|td|th)$/.test(GO(e))}function ek(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var tk=/transform|translate|scale|rotate|perspective|filter/,nk=/paint|layout|strict|content/,rk=e=>!!e&&e!==`none`,ik;function ak(e){let t=YO(e)?lk(e):e;return rk(t.transform)||rk(t.translate)||rk(t.scale)||rk(t.rotate)||rk(t.perspective)||!sk()&&(rk(t.backdropFilter)||rk(t.filter))||tk.test(t.willChange||``)||nk.test(t.contain||``)}function ok(e){let t=dk(e);for(;XO(t)&&!ck(t);){if(ak(t))return t;if(ek(t))return null;t=dk(t)}return null}function sk(){return ik??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ik}function ck(e){return/^(html|body|#document)$/.test(GO(e))}function lk(e){return KO(e).getComputedStyle(e)}function uk(e){return YO(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dk(e){if(GO(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ZO(e)&&e.host||qO(e);return ZO(t)?t.host:t}function fk(e){let t=dk(e);return ck(t)?(e.ownerDocument||e).body:XO(t)&&QO(t)?t:fk(t)}function pk(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=fk(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=KO(i);if(a){let e=mk(o);return t.concat(o,o.visualViewport||[],QO(i)?i:[],e&&n?pk(e):[])}else return t.concat(i,pk(i,[],n))}function mk(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hk(e){let t=lk(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=XO(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=iO(n)!==a||iO(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function gk(e){return YO(e)?e:e.contextElement}function _k(e){let t=gk(e);if(!XO(t))return oO(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=hk(t),o=(a?iO(n.width):n.width)/r,s=(a?iO(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var vk=oO(0);function yk(e){let t=KO(e);return!sk()||!t.visualViewport?vk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bk(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===KO(e)}function xk(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=gk(e),o=oO(1);t&&(r?YO(r)&&(o=_k(r)):o=_k(e));let s=bk(a,n,r)?yk(a):oO(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=KO(a),t=YO(r)?KO(r):r,n=e,i=mk(n);for(;i&&t!==n;){let e=_k(i),t=i.getBoundingClientRect(),r=lk(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=KO(i),i=mk(n)}}return OO({width:u,height:d,x:c,y:l})}function Sk(e,t){let n=uk(e).scrollLeft;return t?t.left+n:xk(qO(e)).left+n}function Ck(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Sk(e,n),y:n.top+t.scrollTop}}function wk(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=qO(r),s=t?ek(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=oO(1),u=oO(0),d=XO(r);if((d||!a)&&((GO(r)!==`body`||QO(o))&&(c=uk(r)),d)){let e=xk(r);l=_k(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ck(o,c):oO(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 Tk(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ek(e){let t=uk(e),n=e.ownerDocument.body,r=rO(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=rO(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Sk(e),o=-t.scrollTop;return lk(n).direction===`rtl`&&(a+=rO(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Dk=25;function Ok(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=KO(e),a=qO(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!sk()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Sk(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<=Dk&&(s-=o)}return{width:s,height:c,x:l,y:u}}function kk(e,t){let n=xk(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=_k(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ak(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ok(e,n,t);else if(t===`document`)r=Ek(qO(e));else if(YO(t))r=kk(t,n);else{let n=yk(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return OO(r)}function jk(e,t){let n=t.get(e);if(n)return n;let r=pk(e,[],!1).filter(e=>YO(e)&&GO(e)!==`body`),i=null,a=lk(e).position===`fixed`,o=a?dk(e):e;for(;YO(o)&&!ck(o);){let e=lk(o),t=ak(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=dk(o)}return t.set(e,r),r}function Mk(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ek(t)?[]:jk(t,this._c):[].concat(n),r],o=Ak(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{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=KO(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Uk(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=gk(e),u=i||a?[...l?pk(l):[],...t?pk(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hk(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?xk(e):null;c&&g();function g(){let t=xk(e);h&&!Vk(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==null||d(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Wk=BO,Gk=VO,Kk=PO,qk=UO,Jk=LO,Yk=NO,Xk=HO,Zk=(e,t,n)=>{let r=new Map,i=n??{},a={...Bk,...i.platform,_c:r};return MO(e,t,{...i,platform:a})},Qk=u(v(),1),$k=typeof document<`u`?C.useLayoutEffect:function(){};function eA(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(!eA(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)&&!eA(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function tA(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nA(e,t){let n=tA(e);return Math.round(t*n)/n}function rA(e){let t=C.useRef(e);return $k(()=>{t.current=e}),t}function iA(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]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);eA(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=rA(c),O=rA(i),k=rA(l),A=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Zk(S.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!eA(T.current,t)&&(T.current=t,Qk.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);$k(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=C.useRef(!1);$k(()=>(j.current=!0,()=>{j.current=!1}),[]),$k(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),N=C.useMemo(()=>({reference:b,floating:x}),[b,x]),P=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=nA(N.floating,u.x),r=nA(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...tA(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var aA=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?{}:Yk({element:r.current,padding:i}).fn(n):r?Yk({element:r,padding:i}).fn(n):{}}}},oA=(e,t)=>{let n=Wk(e);return{name:n.name,fn:n.fn,options:[e,t]}},sA=(e,t)=>{let n=Gk(e);return{name:n.name,fn:n.fn,options:[e,t]}},cA=(e,t)=>({fn:Xk(e).fn,options:[e,t]}),lA=(e,t)=>{let n=Kk(e);return{name:n.name,fn:n.fn,options:[e,t]}},uA=(e,t)=>{let n=qk(e);return{name:n.name,fn:n.fn,options:[e,t]}},dA=(e,t)=>{let n=Jk(e);return{name:n.name,fn:n.fn,options:[e,t]}},fA=(e,t)=>{let n=aA(e);return{name:n.name,fn:n.fn,options:[e,t]}},pA=Object.defineProperty,mA=C.forwardRef(((e,t)=>pA(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,w.jsx)(rE.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,w.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),hA=Object.defineProperty,gA=(e,t)=>hA(e,`name`,{value:t,configurable:!0});function _A(e){let[t,n]=C.useState(void 0);return WE(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}else n(void 0)},[e]),t}gA(_A,`useSize`);var vA=Object.defineProperty,yA=(e,t)=>vA(e,`name`,{value:t,configurable:!0}),bA={Partial:`partial`,Always:`always`},xA={Optimized:`optimized`,Always:`always`},SA=`Popper`,[CA,wA]=nD(SA),[TA,EA]=CA(SA),DA=yA(e=>{let{__scopePopper:t,children:n}=e,[r,i]=C.useState(null),[a,o]=C.useState(void 0);return(0,w.jsx)(TA,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),OA=`PopperAnchor`,kA=C.forwardRef(yA(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=EA(OA,n),o=C.useRef(null),s=a.onAnchorChange,c=Os(t,C.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=C.useRef(null);C.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&zA(a.placementState),d=u==null?void 0:u[0],f=u==null?void 0:u[1];return r?null:(0,w.jsx)(rE.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),AA=`PopperContent`,[jA,MA]=CA(AA),NA=C.forwardRef(yA(function(e,t){var n,r,i,a,o,s,c;let{__scopePopper:l,side:u=`bottom`,sideOffset:d=0,align:f=`center`,alignOffset:p=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:_=0,sticky:v=bA.Partial,hideWhenDetached:y=!1,updatePositionStrategy:b=xA.Optimized,onPlaced:x,...S}=e,T=EA(AA,l),[E,D]=C.useState(null),O=Os(t,D),[k,A]=C.useState(null),j=_A(k),M=(j==null?void 0:j.width)??0,N=(j==null?void 0:j.height)??0,P=u+(f===`center`?``:`-`+f),F=typeof _==`number`?_:{top:0,right:0,bottom:0,left:0,..._},I=Array.isArray(g)?g:[g],ee=I.length>0,te={padding:F,boundary:I.filter(LA),altBoundary:ee},{refs:ne,floatingStyles:re,placement:ie,isPositioned:ae,middlewareData:oe}=iA({strategy:`fixed`,placement:P,whileElementsMounted:yA((...e)=>Uk(...e,{animationFrame:b===xA.Always}),`whileElementsMounted`),elements:{reference:T.anchor},middleware:[oA({mainAxis:d+N,alignmentAxis:p}),h&&sA({mainAxis:!0,crossAxis:!1,...v===bA.Partial?{limiter:cA()}:{},...te}),h&&lA({...te}),uA({...te,apply:yA(({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`)}),k&&fA({element:k,padding:m}),RA({arrowWidth:M,arrowHeight:N}),y&&dA(ee?{strategy:`referenceHidden`,...te}:{strategy:`referenceHidden`,padding:te.padding,altBoundary:te.altBoundary})]}),se=T.setPlacementState;WE(()=>(se(ie),()=>{se(void 0)}),[ie,se]);let[L,ce]=zA(ie),le=sD(x);WE(()=>{ae&&(le==null||le())},[ae,le]);let ue=(n=oe.arrow)==null?void 0:n.x,de=(r=oe.arrow)==null?void 0:r.y,fe=((i=oe.arrow)==null?void 0:i.centerOffset)!==0,[R,z]=C.useState();return WE(()=>{E&&z(window.getComputedStyle(E).zIndex)},[E]),(0,w.jsx)(`div`,{ref:ne.setFloating,"data-radix-popper-content-wrapper":``,style:{...re,transform:ae?re.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:R,"--radix-popper-transform-origin":[(a=oe.transformOrigin)==null?void 0:a.x,(o=oe.transformOrigin)==null?void 0:o.y].join(` `),...((s=oe.hide)==null?void 0:s.referenceHidden)&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,w.jsx)(jA,{scope:l,placedSide:L,placedAlign:ce,onArrowChange:A,arrowX:ue,arrowY:de,shouldHideArrow:fe,children:(0,w.jsx)(rE.div,{"data-side":L,"data-align":ce,...S,ref:O,style:{...S.style,animation:ae?(c=S.style)==null?void 0:c.animation:`none`}})})})},`PopperContent`)),PA=`PopperArrow`,FA={top:`bottom`,right:`left`,bottom:`top`,left:`right`},IA=C.forwardRef(yA(function(e,t){let{__scopePopper:n,...r}=e,i=MA(PA,n),a=FA[i.placedSide];return(0,w.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,w.jsx)(mA,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function LA(e){return e!==null}yA(LA,`isNotNull`);var RA=yA(e=>({name:`transformOrigin`,options:e,fn(t){var n,r,i;let{placement:a,rects:o,middlewareData:s}=t,c=((n=s.arrow)==null?void 0:n.centerOffset)!==0,l=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[d,f]=zA(a),p={start:`0%`,center:`50%`,end:`100%`}[f],m=(((r=s.arrow)==null?void 0:r.x)??0)+l/2,h=(((i=s.arrow)==null?void 0:i.y)??0)+u/2,g=``,_=``;return d===`bottom`?(g=c?p:`${m}px`,_=`${-u}px`):d===`top`?(g=c?p:`${m}px`,_=`${o.floating.height+u}px`):d===`right`?(g=`${-u}px`,_=c?p:`${h}px`):d===`left`&&(g=`${o.floating.width+u}px`,_=c?p:`${h}px`),{data:{x:g,y:_}}}}),`transformOrigin`);function zA(e){let[t,n=`center`]=e.split(`-`);return[t,n]}yA(zA,`getSideAndAlignFromPlacement`);var BA=u(v(),1),VA=Object.defineProperty,HA=C.forwardRef(((e,t)=>VA(e,`name`,{value:t,configurable:!0}))(function(e,t){var n;let{container:r,...i}=e,[a,o]=C.useState(!1);WE(()=>o(!0),[]);let s=r||a&&((n=globalThis)==null||(n=n.document)==null?void 0:n.body);return s?BA.createPortal((0,w.jsx)(rE.div,{...i,ref:t}),s):null},`Portal`)),UA=Object.defineProperty,WA=(e,t)=>UA(e,`name`,{value:t,configurable:!0});function GA(e,t){return C.useReducer((e,n)=>t[e][n]??e,e)}WA(GA,`useStateMachine`);var KA=WA(e=>{let{present:t,children:n}=e,r=qA(t),i=typeof n==`function`?n({present:r.isPresent}):C.Children.only(n),a=YA(r.ref,ZA(i));return typeof n==`function`||r.isPresent?C.cloneElement(i,{ref:a}):null},`Presence`);function qA(e){let[t,n]=C.useState(),r=C.useRef(null),i=C.useRef(e),a=C.useRef(`none`),o=C.useRef(void 0),[s,c]=GA(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return C.useEffect(()=>{s===`mounted`?(a.current=o.current??XA(r.current),o.current=void 0):a.current=`none`},[s]),WE(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=XA(t);e?(o.current=s,c(`MOUNT`)):s===`none`||(t==null?void 0:t.display)===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),WE(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=WA(a=>{let o=XA(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=WA(e=>{e.target===t&&(a.current=XA(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)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:C.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=XA(t)}else r.current=null;n(e)},[])}}WA(qA,`usePresence`);function JA(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}WA(JA,`setRef`);function YA(...e){let t=C.useRef(e);return t.current=e,C.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=JA(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e$A(e,`name`,{value:t,configurable:!0}),tj=C.useEffectEvent,nj=C.useInsertionEffect;function rj(e){if(typeof tj==`function`)return tj(e);let t=C.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof nj==`function`?nj(()=>{t.current=e}):WE(()=>{t.current=e}),C.useMemo(()=>((...e)=>{var n;return(n=t.current)==null?void 0:n.call(t,...e)}),[])}ej(rj,`useEffectEvent`);var ij=Object.defineProperty,aj=(e,t)=>ij(e,`name`,{value:t,configurable:!0}),oj=C.useInsertionEffect||WE;function sj({prop:e,defaultProp:t,onChange:n=aj(()=>{},`onChange`),caller:r}){let[i,a,o]=cj({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,C.useCallback(t=>{if(s){let r=lj(t)?t(e):t;if(r!==e){var n;(n=o.current)==null||n.call(o,r)}}else a(t)},[s,e,a,o])]}aj(sj,`useControllableState`);function cj({defaultProp:e,onChange:t}){let[n,r]=C.useState(e),i=C.useRef(n),a=C.useRef(t);return oj(()=>{a.current=t},[t]),C.useEffect(()=>{if(i.current!==n){var e;(e=a.current)==null||e.call(a,n),i.current=n}},[n,i]),[n,r,a]}aj(cj,`useUncontrolledState`);function lj(e){return typeof e==`function`}aj(lj,`isFunction`);var uj=Symbol(`RADIX:SYNC_STATE`);function dj(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=rj(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=C.useReducer((t,n)=>{if(n.type===uj)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=C.useRef(p);C.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=C.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return C.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:uj,state:i})},[i,d.state,c]),[h,f]}aj(dj,`useControllableStateReducer`);var fj=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},pj=new WeakMap,mj=new WeakMap,hj={},gj=0,_j=function(e){return e&&(e.host||_j(e.parentNode))},vj=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=_j(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})},yj=function(e,t,n,r){var i=vj(t,Array.isArray(e)?e:[e]);hj[n]||(hj[n]=new WeakMap);var a=hj[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=(pj.get(e)||0)+1,l=(a.get(e)||0)+1;pj.set(e,c),a.set(e,l),o.push(e),c===1&&i&&mj.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(),gj++,function(){o.forEach(function(e){var t=pj.get(e)-1,i=a.get(e)-1;pj.set(e,t),a.set(e,i),t||(mj.has(e)||e.removeAttribute(r),mj.delete(e)),i||e.removeAttribute(n)}),gj--,gj||(pj=new WeakMap,pj=new WeakMap,mj=new WeakMap,hj={})}},bj=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||fj(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),yj(r,i,n,`aria-hidden`)):function(){return null}},xj=function(){return xj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`u`)return Xj;var t=Qj(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])}},eM=Yj(),tM=`data-scroll-locked`,nM=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` .${Dj} { overflow: hidden ${r}; padding-right: ${s}px ${r}; } body[${tM}] { overflow: hidden ${r}; overscroll-behavior: contain; ${[t&&`position: relative ${r};`,n===`margin`&&` padding-left: ${i}px; padding-top: ${a}px; padding-right: ${o}px; margin-left:0; margin-top:0; margin-right: ${s}px ${r}; `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} } .${Tj} { right: ${s}px ${r}; } .${Ej} { margin-right: ${s}px ${r}; } .${Tj} .${Tj} { right: 0 ${r}; } .${Ej} .${Ej} { margin-right: 0 ${r}; } body[${tM}] { ${Oj}: ${s}px; } `},rM=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},iM=function(){C.useEffect(function(){return document.body.setAttribute(tM,(rM()+1).toString()),function(){var e=rM()-1;e<=0?document.body.removeAttribute(tM):document.body.setAttribute(tM,e.toString())}},[])},aM=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;iM();var a=C.useMemo(function(){return $j(i)},[i]);return C.createElement(eM,{styles:nM(a,!t,i,n?``:`!important`)})},oM=!1;if(typeof window<`u`)try{var sM=Object.defineProperty({},`passive`,{get:function(){return oM=!0,!0}});window.addEventListener(`test`,sM,sM),window.removeEventListener(`test`,sM,sM)}catch{oM=!1}var cM=oM?{passive:!1}:!1,lM=function(e){return e.tagName===`TEXTAREA`},uM=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!lM(e)&&n[t]===`visible`)},dM=function(e){return uM(e,`overflowY`)},fM=function(e){return uM(e,`overflowX`)},pM=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),gM(e,r)){var i=_M(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mM=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},hM=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},gM=function(e,t){return e===`v`?dM(t):fM(t)},_M=function(e,t){return e===`v`?mM(t):hM(t)},vM=function(e,t){return e===`h`&&t===`rtl`?-1:1},yM=function(e,t,n,r,i){var a=vM(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=_M(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&gM(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},bM=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xM=function(e){return[e.deltaX,e.deltaY]},SM=function(e){return e&&`current`in e?e.current:e},CM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wM=function(e){return` .block-interactivity-${e} {pointer-events: none;} .allow-interactivity-${e} {pointer-events: all;} `},TM=0,EM=[];function DM(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(TM++)[0],a=C.useState(Yj)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=wj([e.lockRef.current],(e.shards||[]).map(SM),!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=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=bM(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=pM(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=pM(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 yM(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(!(!EM.length||EM[EM.length-1]!==a)){var r=`deltaY`in n?xM(n):bM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&CM(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(SM).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=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:OM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=bM(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,xM(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,bM(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return EM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,cM),document.addEventListener(`touchmove`,c,cM),document.addEventListener(`touchstart`,u,cM),function(){EM=EM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,cM),document.removeEventListener(`touchmove`,c,cM),document.removeEventListener(`touchstart`,u,cM)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:wM(i)}):null,p?C.createElement(aM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function OM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var kM=Rj(zj,DM),AM=C.forwardRef(function(e,t){return C.createElement(Vj,xj({},e,{ref:t,sideCar:kM}))});AM.classNames=Vj.classNames;var jM=AM,MM=Object.defineProperty,NM=(e,t)=>MM(e,`name`,{value:t,configurable:!0}),PM=`Popover`,[FM,IM]=nD(PM,[wA]),LM=wA(),[RM,zM]=FM(PM),BM=NM(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=LM(t),c=C.useRef(null),[l,u]=C.useState(!1),[d,f]=C.useState(0),[p,m]=C.useState(0),[h,g]=sj({prop:r,defaultProp:i??!1,onChange:a,caller:PM});return(0,w.jsx)(DA,{...s,children:(0,w.jsx)(RM,{scope:t,contentId:eO(),titleId:eO(),descriptionId:eO(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,triggerRef:c,open:h,onOpenChange:g,onOpenToggle:C.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:l,onCustomAnchorAdd:C.useCallback(()=>u(!0),[]),onCustomAnchorRemove:C.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),VM=`PopoverTrigger`,HM=C.forwardRef(NM(function(e,t){let{__scopePopover:n,...r}=e,i=zM(VM,n),a=LM(n),o=Os(t,i.triggerRef),s=(0,w.jsx)(rE.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":$M(i.open),...r,ref:o,onClick:JE(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,w.jsx)(kA,{asChild:!0,...a,children:s})},`PopoverTrigger`)),UM=`PopoverPortal`,[WM,GM]=FM(UM,{forceMount:void 0}),KM=NM(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=zM(UM,t);return(0,w.jsx)(WM,{scope:t,forceMount:n,children:(0,w.jsx)(KA,{present:n||a.open,children:(0,w.jsx)(HA,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),qM=`PopoverContent`,JM=C.forwardRef(NM(function(e,t){let n=GM(qM,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=zM(qM,e.__scopePopover);return(0,w.jsx)(KA,{present:r||a.open,children:a.modal?(0,w.jsx)(XM,{...i,ref:t}):(0,w.jsx)(ZM,{...i,ref:t})})},`PopoverContent`)),YM=js(`PopoverContent.RemoveScroll`),XM=C.forwardRef(NM(function(e,t){let n=zM(qM,e.__scopePopover),r=C.useRef(null),i=Os(t,r),a=C.useRef(!1),{nodes:o,registry:s}=LD();return C.useEffect(()=>{let e=r.current;if(e)return bj(e)},[]),(0,w.jsx)(jM,{as:YM,allowPinchZoom:!0,shards:C.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,w.jsx)(QM,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:JE(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),a.current||(t=n.triggerRef.current)==null||t.focus()}),onPointerDownOutside:JE(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:JE(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),ZM=C.forwardRef(NM(function(e,t){let n=zM(qM,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return(0,w.jsx)(QM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a;if((a=e.onCloseAutoFocus)==null||a.call(e,t),!t.defaultPrevented){var o;r.current||(o=n.triggerRef.current)==null||o.focus(),t.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:t=>{var a,o;(a=e.onInteractOutside)==null||a.call(e,t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let s=t.target;(o=n.triggerRef.current)!=null&&o.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),QM=C.forwardRef(NM(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,"aria-describedby":d,branchNodes:f,branchRegistry:p,...m}=e,h=zM(qM,n),g=LM(n),[_,v]=C.useState(null),y=Os(t,v);return RD(_),DD(),(0,w.jsx)(ID,{registry:p,children:(0,w.jsx)(PD,{asChild:!0,loop:!0,trapped:r,branches:f,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(hD,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,w.jsx)(NA,{"data-state":$M(h.open),role:`dialog`,id:h.contentId,"aria-labelledby":h.titlePresent?h.titleId:void 0,"aria-describedby":h.descriptionPresent?eN(d,h.descriptionId):d,...g,...m,ref:y,style:{...m.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 $M(e){return e?`open`:`closed`}NM($M,`getState`);function eN(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}NM(eN,`concatAriaDescribedby`);function tN({...e}){return(0,w.jsx)(BM,{"data-slot":`popover`,...e})}function nN({...e}){return(0,w.jsx)(HM,{"data-slot":`popover-trigger`,...e})}function rN({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,w.jsx)(KM,{children:(0,w.jsx)(JM,{"data-slot":`popover-content`,align:t,sideOffset:n,className:wl(`bg-popover text-popover-foreground 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-[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 z-50 w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-md border p-4 shadow-md outline-none`,e),...r})})}var iN=Object.defineProperty,aN=(e,t)=>iN(e,`name`,{value:t,configurable:!0}),oN={Horizontal:`horizontal`,Vertical:`vertical`},sN=oN.Horizontal,cN=Object.values(oN),lN=C.forwardRef(aN(function(e,t){let{decorative:n,orientation:r=sN,...i}=e,a=uN(r)?r:sN,o=a===oN.Vertical?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,w.jsx)(rE.div,{"data-orientation":a,...s,...i,ref:t})},`Separator`));function uN(e){return cN.includes(e)}aN(uN,`isValidOrientation`);function dN({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,w.jsx)(lN,{"data-slot":`separator`,decorative:n,orientation:t,className:wl(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}const fN={[sh.SCANNING]:{text:`检测中`,color:`bg-amber-500/10 text-amber-500`},[sh.PASSED]:{text:`检测通过`,color:`bg-emerald-500/10 text-emerald-500`},[sh.REJECTED]:{text:`检测不通过`,color:`bg-red-500/10 text-red-500`},[sh.FAILED]:{text:`检测失败`,color:`bg-gray-500/10 text-gray-500`}};var pN={pass:`机器判定:通过`,manual_review:`人工复核改判`,reject:`机器判定:不通过`};function mN({status:e,reason:t,action:n,reviewComment:r,time:i,fileType:a}){let[o,s]=(0,C.useState)(!1),c=(0,C.useRef)(null),l=()=>{window.clearTimeout(c.current),s(!0)},u=()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s(!1),150)},d=(0,C.useMemo)(()=>fN[String(e)],[e]);if(a===Rm.DIRECTORY)return(0,w.jsx)(`div`,{children:`-`});if(!d)return(0,w.jsx)(`div`,{className:`text-black/40`,children:`未检测`});let f=r||t,p=!!(t||n||r||i),m=(0,w.jsxs)(`div`,{className:`max-w-[200px] space-y-1 cursor-default overflow-hidden`,children:[(0,w.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,w.jsx)(zE,{className:Ys(d.color),children:d.text})}),f&&(0,w.jsx)(`div`,{className:`text-xs text-black/50 truncate`,children:f})]});return p?(0,w.jsxs)(tN,{open:o,onOpenChange:s,children:[(0,w.jsx)(nN,{asChild:!0,children:(0,w.jsx)(`div`,{onMouseEnter:l,onMouseLeave:u,children:m})}),(0,w.jsx)(rN,{side:`left`,align:`center`,className:`w-80 p-0`,onOpenAutoFocus:e=>e.preventDefault(),onMouseEnter:l,onMouseLeave:u,children:(0,w.jsxs)(`div`,{className:`p-4 space-y-3`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,w.jsx)(zE,{className:Ys(d.color),children:d.text}),n&&(0,w.jsx)(`span`,{className:`text-xs text-black/45`,children:pN[n]||n})]}),t&&(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`text-xs text-black/40 mb-1`,children:`结论说明`}),(0,w.jsx)(`div`,{className:`text-sm leading-relaxed break-all whitespace-pre-wrap`,children:t})]}),r&&(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`text-xs text-black/40 mb-1`,children:`人工复核说明`}),(0,w.jsx)(`div`,{className:`text-sm leading-relaxed break-all`,children:r})]}),i&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(dN,{}),(0,w.jsxs)(`div`,{className:`text-xs text-black/40`,children:[`检测时间:`,i]})]})]})})]}):m}const hN=$a(`/(user)/my/`)({component:eo(()=>Ah(()=>import(`./my-C6gzFuIT.js`),__vite__mapDeps([32,33,2,6,3,4,22,5,16,23,17,24,29,25,34,19,18,9,10,30,26,27,12,35,36,31,37])),`component`)}),gN=$a(`/(user)/outside/`)({component:eo(()=>Ah(()=>import(`./outside-DtRMqIkz.js`),__vite__mapDeps([38,3,4,22,2,5,16,23,17,24,29,25,18,9,10,30,26,27,31])),`component`)});var _N=Object.defineProperty,vN=(e,t)=>_N(e,`name`,{value:t,configurable:!0}),yN=`Checkbox`,[bN,xN]=nD(yN),[SN,CN]=bN(yN);function wN(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]=sj({prop:n,defaultProp:i??!1,onChange:c,caller:yN}),[m,h]=C.useState(null),[g,_]=C.useState(null),[v,y]=C.useState(null),b=m?!!o||!!m.closest(`form`):!0,x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,userClick:v,onUserClick:y,required:l,defaultChecked:NN(i)?!1:i,isFormControl:b,bubbleInput:g,setBubbleInput:_};return(0,w.jsx)(SN,{scope:t,...x,children:MN(d)?d(x):r})}vN(wN,`CheckboxProvider`);var TN=`CheckboxTrigger`,EN=C.forwardRef(vN(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=CN(TN,e),h=Os(i,u),g=C.useRef(c);return C.useEffect(()=>{let e=a==null?void 0:a.form;if(e){let t=vN(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,w.jsx)(rE.button,{type:`button`,role:`checkbox`,"aria-checked":NN(c)?`mixed`:c,"aria-required":l,"data-state":PN(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:JE(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:JE(n,e=>{let t=e.isPropagationStopped();f({requestedChecked:NN(c)?!0:!c,hasConsumerStoppedPropagation:t}),d(e=>NN(e)?!0:!e),m&&p&&(t||e.stopPropagation())})})},`CheckboxTrigger`)),DN=C.forwardRef(vN(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,w.jsx)(wN,{__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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(EN,{...d,ref:t,__scopeCheckbox:n}),e&&(0,w.jsx)(jN,{__scopeCheckbox:n})]})})},`Checkbox`)),ON=`CheckboxIndicator`,kN=C.forwardRef(vN(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=CN(ON,n);return(0,w.jsx)(KA,{present:r||NN(a.checked)||a.checked===!0,children:(0,w.jsx)(rE.span,{"data-state":PN(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),AN=`CheckboxBubbleInput`,jN=C.forwardRef(vN(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=CN(AN,e),h=Os(r,m),g=_A(i),_=C.useRef(!1),v=C.useRef(o),y=C.useRef(a),b=C.useRef(null);C.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=v.current!==o;v.current=o;let i=a!==null&&a!==y.current;if(y.current=a,i)b.current=r?null:a,r&&(e.indeterminate=NN(o),n.call(e,NN(o)?!1:o)),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=b.current;b.current=null;let r=(t==null?void 0:t.requestedChecked)===o;_.current=!0,e.indeterminate=NN(o),n.call(e,NN(o)?!1:o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let x=C.useRef(NN(o)?!1:o);return(0,w.jsx)(rE.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??x.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:JE(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function MN(e){return typeof e==`function`}vN(MN,`isFunction`);function NN(e){return e===`indeterminate`}vN(NN,`isIndeterminate`);function PN(e){return NN(e)?`indeterminate`:e?`checked`:`unchecked`}vN(PN,`getState`);function FN({className:e,...t}){return(0,w.jsx)(DN,{"data-slot":`checkbox`,className:wl(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,w.jsx)(kN,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,w.jsx)(Mo,{className:`size-3.5`})})})}const IN=$a(`/(user)/recycle/`)({component:eo(()=>Ah(()=>import(`./recycle-CSeB7_Hw.js`),__vite__mapDeps([39,3,4,22,2,5,16,23,17,24,29,25,18,9,10,26,27])),`component`)}),LN=$a(`/(user)/share/`)({component:eo(()=>Ah(()=>import(`./share-D-HlQYDW.js`),__vite__mapDeps([40,3,4,22,2,5,16,23,17,24,29,25,18,9,10,26,27,41,31])),`component`)}),RN=$a(`/admin/console/`)({component:eo(()=>Ah(()=>import(`./console-nn2bY2CJ.js`),__vite__mapDeps([42,33,2,6,3,4,43,5,29,16,25,34,19,18,9,10,44,35,26,27,41])),`component`)}),zN=$a(`/admin/file-record/`)({component:eo(()=>Ah(()=>import(`./file-record-xAA0hSRQ.js`),__vite__mapDeps([45,46,6,8,27,4,33,2,3,29,16,25,18,10,47,41,37])),`component`)}),BN=$a(`/admin/org-account/`)({component:eo(()=>Ah(()=>import(`./org-account-BvqGo47r.js`),__vite__mapDeps([48,46,6,8,27,4,33,2,3,29,16,25,47,49])),`component`)}),VN=$a(`/admin/tenant/`)({component:eo(()=>Ah(()=>import(`./tenant-DS3zyWsK.js`),__vite__mapDeps([50,3,4,29,16,25,44,51])),`component`)}),HN=$a(`/admin/upload-config/`)({component:eo(()=>Ah(()=>import(`./upload-config-D_24SNBe.js`),__vite__mapDeps([52,14,2,5,4,36,16])),`component`)}),UN=$a(`/admin/user/`)({component:eo(()=>Ah(()=>import(`./user-CwyiWp7E.js`),__vite__mapDeps([53,33,2,6,3,4,43,5,29,16,25,23,44,47,35,51,49,41])),`component`)});var WN=kE.update({id:`/(user)`,getParentRoute:()=>DE}),GN=AE.update({id:`/admin`,path:`/admin`,getParentRoute:()=>DE}),KN=jE.update({id:`/login`,path:`/login`,getParentRoute:()=>DE}),qN=ME.update({id:`/`,path:`/`,getParentRoute:()=>WN}),JN=NE.update({id:`/`,path:`/`,getParentRoute:()=>GN}),YN=PE.update({id:`/extract/`,path:`/extract/`,getParentRoute:()=>DE}),XN=LE.update({id:`/extract/list`,path:`/extract/list`,getParentRoute:()=>DE}),ZN=HE.update({id:`/inside/`,path:`/inside/`,getParentRoute:()=>WN}),QN=hN.update({id:`/my/`,path:`/my/`,getParentRoute:()=>WN}),$N=gN.update({id:`/outside/`,path:`/outside/`,getParentRoute:()=>WN}),eP=IN.update({id:`/recycle/`,path:`/recycle/`,getParentRoute:()=>WN}),tP=LN.update({id:`/share/`,path:`/share/`,getParentRoute:()=>WN}),nP=RN.update({id:`/console/`,path:`/console/`,getParentRoute:()=>GN}),rP=zN.update({id:`/file-record/`,path:`/file-record/`,getParentRoute:()=>GN}),iP=BN.update({id:`/org-account/`,path:`/org-account/`,getParentRoute:()=>GN}),aP=VN.update({id:`/tenant/`,path:`/tenant/`,getParentRoute:()=>GN}),oP=HN.update({id:`/upload-config/`,path:`/upload-config/`,getParentRoute:()=>GN}),sP=UN.update({id:`/user/`,path:`/user/`,getParentRoute:()=>GN}),cP={userIndexRoute:qN,userInsideIndexRoute:ZN,userMyIndexRoute:QN,userOutsideIndexRoute:$N,userRecycleIndexRoute:eP,userShareIndexRoute:tP},lP=WN._addFileChildren(cP),uP={AdminIndexRoute:JN,AdminConsoleIndexRoute:nP,AdminFileRecordIndexRoute:rP,AdminOrgAccountIndexRoute:iP,AdminTenantIndexRoute:aP,AdminUploadConfigIndexRoute:oP,AdminUserIndexRoute:sP},dP={userRouteRoute:lP,AdminRouteRoute:GN._addFileChildren(uP),LoginRoute:KN,ExtractListRoute:XN,ExtractIndexRoute:YN},fP=_o({routeTree:DE._addFileChildren(dP)._addFileTypes(),history:Er(),basepath:``,defaultNotFoundComponent:kl,defaultErrorComponent:Ol,defaultPendingComponent:jl}),pP=new Rt({defaultOptions:{queries:{retry:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1}}});(0,xo.createRoot)(document.getElementById(`root`)).render((0,w.jsx)(C.StrictMode,{children:(0,w.jsx)(D,{client:pP,children:(0,w.jsxs)(Co,{defaultTheme:`light`,storageKey:`react-flow-theme`,children:[(0,w.jsx)(bo,{router:fP}),(0,w.jsx)(Cs,{position:`top-center`,richColors:!0,theme:`light`}),!1]})})}));export{Hw as $,El as $t,JE as A,R as An,ch as At,bE as B,v as Bn,Mm as Bt,RD as C,ke as Cn,Um as Ct,gD as D,ne as Dn,Km as Dt,hD as E,ie as En,Ym as Et,IE as F,j as Fn,Vm as Ft,pE as G,f as Gn,xm as Gt,cE as H,s as Hn,Pm as Ht,PE as I,A as In,Nm as It,sE as J,Om as Jt,mE as K,d as Kn,Am as Kt,SE as L,k as Ln,wm as Lt,VE as M,ae as Mn,th as Mt,zE as N,I as Nn,uh as Nt,sD as O,ge as On,qm as Ot,LE as P,M as Pn,Xm as Pt,wT as Q,Dl as Qt,yE as R,E as Rn,Em as Rt,ID as S,Me as Sn,Zm as St,DD as T,we as Tn,ih as Tt,hE as U,o as Un,ym as Ut,_E as V,m as Vn,jm as Vt,uE as W,c as Wn,bm as Wt,iE as X,pm as Xt,rE as Y,Y as Yt,mT as Z,Al as Zt,NA as _,Zi as _n,rh as _t,rN as a,js as an,wh as at,eO as b,it as bn,eh as bt,Cj as c,Ss as cn,Rm as ct,QA as d,Mo as dn,Jm as dt,wl as en,F_ as et,KA as f,jo as fn,Hm as ft,IA as g,Ca as gn,nh as gt,kA as h,Ta as hn,Gm as ht,tN as i,Ms as in,Th as it,WE as j,xe as jn,$m as jt,nD as k,oe as kn,lh as kt,bj as l,ss as ln,Im as lt,DA as m,Ma as mn,oh as mt,mN as n,Qs as nn,Ah as nt,nN as o,Ps as on,Sh as ot,HA as p,uo as pn,Bm as pt,gE as q,u as qn,Dm as qt,dN as r,Ys as rn,Ch as rt,jM as s,Os as sn,Lm as st,FN as t,Tl as tn,S_ as tt,sj as u,zo as un,sh as ut,wA as v,Bt as vn,zm as vt,LD as w,Te as wn,Wm as wt,PD as x,Ke as xn,ah as xt,_A as y,zt as yn,Qm as yt,xE as z,S as zn,Cm as zt};