@promptowl/contextnest-community 1.24.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +177 -14
- package/CONFIGURATION.md +577 -116
- package/README.md +4 -3
- package/STEWARDSHIP.md +24 -0
- package/dist/{chunk-XUIWAWDO.js → chunk-2QOJE7A5.js} +4 -4
- package/dist/{chunk-2TPQTN4Y.js → chunk-DGPTJXIV.js} +47 -15
- package/dist/chunk-I5EDEZBQ.js +523 -0
- package/dist/{chunk-ZTT4U4NE.js → chunk-IEAWRHMV.js} +99 -12
- package/dist/{chunk-YVMSM7LS.js → chunk-LHWOJPFE.js} +7 -0
- package/dist/{chunk-5EZOPA47.js → chunk-M6PGYMBD.js} +20 -11
- package/dist/{chunk-F66VCBLA.js → chunk-PICUHQEM.js} +51 -2
- package/dist/{chunk-I3CSD6CK.js → chunk-RPGFHESR.js} +2 -2
- package/dist/{chunk-KIAAEHWL.js → chunk-SWA5M5XX.js} +88 -546
- package/dist/{chunk-LA3VTQ22.js → chunk-TRSGPS27.js} +81 -14
- package/dist/{engine-S3QBQ7LH.js → engine-QNMFDIBV.js} +4 -3
- package/dist/{external-edit-service-6FNFPOJJ.js → external-edit-service-4MEGPT4D.js} +5 -4
- package/dist/{grants-service-UT3EQ3R7.js → grants-service-24GLUBY4.js} +3 -3
- package/dist/index.js +1739 -583
- package/dist/invited-user-AM6A3WGO.js +12 -0
- package/dist/{migrations.postgres-AIQ7WSU7.js → migrations.postgres-HGSQ7IA5.js} +16 -2
- package/dist/{review-service-HHGOTO6P.js → review-service-2EWN7WWO.js} +8 -7
- package/dist/{stewardship-service-4DHNRULG.js → stewardship-service-TDZUC2Q6.js} +7 -4
- package/dist/{version-service-KIOQME6U.js → version-service-C3JTZLJH.js} +5 -4
- package/dist/web3/assets/ActivityTracePage-DzwWIjjx.js +1 -0
- package/dist/web3/assets/{AgentDocsPage-CIiaBqMy.js → AgentDocsPage-ixP2UdAE.js} +1 -1
- package/dist/web3/assets/CollaboratorManager-C9VAXZ0h.js +1 -0
- package/dist/web3/assets/CollaboratorsTab-tq4ZTexH.js +1 -0
- package/dist/web3/assets/DocumentEditor-C2CP2fiE.js +36 -0
- package/dist/web3/assets/DocumentsTab-Mh7KxUoB.js +6 -0
- package/dist/web3/assets/ExternalEditsTab-B_CWKXZ_.js +1 -0
- package/dist/web3/assets/MarkdownEditor-CKh4WSn-.js +653 -0
- package/dist/web3/assets/MarkdownEditor-ndtIx5x0.css +1 -0
- package/dist/web3/assets/NestPageHeader-Cizo8nUi.js +1 -0
- package/dist/web3/assets/NestView-EW-sraEb.js +73 -0
- package/dist/web3/assets/OverviewTab-CjidsMX_.js +6 -0
- package/dist/web3/assets/PersonCombobox-BKI7dff4.js +1 -0
- package/dist/web3/assets/{ReviewActions-OfOdqzCn.js → ReviewActions-CS8JXgXF.js} +2 -2
- package/dist/web3/assets/ReviewTab-CwVrXzw5.js +1 -0
- package/dist/web3/assets/StewardsTab-C-iP6gnh.js +1 -0
- package/dist/web3/assets/SubmitForReviewModal-Biq3m79i.js +1 -0
- package/dist/web3/assets/{alert-dialog-DTozKlmV.js → alert-dialog-BvF3NFr7.js} +2 -2
- package/dist/web3/assets/{arrow-left-BCKt4CwQ.js → arrow-left-CWIsv-sG.js} +1 -1
- package/dist/web3/assets/backlinks-Cqcn7n1J.js +19 -0
- package/dist/web3/assets/boxes-ClbgQqG2.js +6 -0
- package/dist/web3/assets/{chevron-left-BPwUT9DS.js → chevron-left-CK_ZPFm9.js} +1 -1
- package/dist/web3/assets/{circle-check-DI8IBGeo.js → circle-check-Bw_aTXiH.js} +1 -1
- package/dist/web3/assets/{circle-x-VKVhC88W.js → circle-x-DkIG68H7.js} +1 -1
- package/dist/web3/assets/client-attribution-BraarYaP.js +1 -0
- package/dist/web3/assets/{code-xml-CMabYZvH.js → code-xml-BlR7EN6l.js} +1 -1
- package/dist/web3/assets/{corner-down-right-BGxwK6wH.js → corner-down-right-DSVxK3tf.js} +1 -1
- package/dist/web3/assets/count-skeleton-DToLM74B.js +1 -0
- package/dist/web3/assets/{earth-BEp1EKTo.js → earth-BXhVPvCR.js} +1 -1
- package/dist/web3/assets/{file-exclamation-point-r8qZGIjP.js → file-exclamation-point-BevGZgtj.js} +1 -1
- package/dist/web3/assets/{folder-input-Cmtx1Jhk.js → folder-input-m8UBV4fA.js} +1 -1
- package/dist/web3/assets/{index-C1wTSjfP.js → index-BOVYgMvj.js} +1 -1
- package/dist/web3/assets/index-DVnaYqj9.css +1 -0
- package/dist/web3/assets/index-WYDmEOfO.js +404 -0
- package/dist/web3/assets/page-B6pkc9cd.js +2 -0
- package/dist/web3/assets/page-BJrFCKXB.js +1 -0
- package/dist/web3/assets/page-Bgy9Ng9p.js +1 -0
- package/dist/web3/assets/page-C2zoxumw.js +1 -0
- package/dist/web3/assets/page-CJWO06dN.js +1 -0
- package/dist/web3/assets/page-CptuAPJc.js +6 -0
- package/dist/web3/assets/page-DPY01SOj.js +1 -0
- package/dist/web3/assets/page-Dea2SblF.js +9 -0
- package/dist/web3/assets/page-Deq6IKiN.js +6 -0
- package/dist/web3/assets/page-Dfjg8p7Z.js +1 -0
- package/dist/web3/assets/{page-ByyVLDVo.js → page-Dh57L0RG.js} +5 -5
- package/dist/web3/assets/page-Dwbp4Seu.js +6 -0
- package/dist/web3/assets/{page-CHb0F5hV.js → page-DzKwP5Ds.js} +3 -3
- package/dist/web3/assets/page-YxjrE5b5.js +45 -0
- package/dist/web3/assets/{page-title-ClvvBsIo.js → page-title-DVq4qvMR.js} +1 -1
- package/dist/web3/assets/{play-C5YNKpAH.js → play-CXhS6Pgq.js} +1 -1
- package/dist/web3/assets/{send-0CHvmluT.js → send-DdfwnIrj.js} +1 -1
- package/dist/web3/assets/{settings-CeeF4LEb.js → settings-DKX0Q4gO.js} +1 -1
- package/dist/web3/assets/{share-2-CMnOlOt-.js → share-2-CxmXRt58.js} +1 -1
- package/dist/web3/assets/{tag-DQ_6J5Gv.js → tag-DeYC_mRv.js} +1 -1
- package/dist/web3/assets/{trash-2-HBi-Pslz.js → trash-2-B0HyPTnI.js} +1 -1
- package/dist/web3/assets/{user-plus-CvBNcpn4.js → user-plus-Ckm_Isyc.js} +1 -1
- package/dist/web3/assets/{x-By7piikG.js → x-mNtADYHc.js} +1 -1
- package/dist/web3/assets/zap-D2ifcnYb.js +16 -0
- package/dist/web3/index.html +2 -2
- package/package.json +3 -2
- package/dist/client-KEY4PYJH.js +0 -11
- package/dist/keys-CTOGAG3W.js +0 -20
- package/dist/web3/assets/ActivityTracePage-BOZHgJ8S.js +0 -1
- package/dist/web3/assets/CollaboratorManager-By91wrIr.js +0 -1
- package/dist/web3/assets/CollaboratorsTab-D1EE64Fs.js +0 -1
- package/dist/web3/assets/DocumentEditor-DrQfrW3d.js +0 -36
- package/dist/web3/assets/DocumentsTab-Vba-AzBv.js +0 -6
- package/dist/web3/assets/ExternalEditsTab-BSzAQIGM.js +0 -1
- package/dist/web3/assets/MarkdownEditor-74N_naNQ.css +0 -1
- package/dist/web3/assets/MarkdownEditor-C9zqZjC5.js +0 -643
- package/dist/web3/assets/NestPageHeader-CoLUV1Oz.js +0 -1
- package/dist/web3/assets/NestView-CTZ55tXD.js +0 -63
- package/dist/web3/assets/OverviewTab-Dxi-Hu-N.js +0 -1
- package/dist/web3/assets/PersonCombobox-CPOlNs6G.js +0 -1
- package/dist/web3/assets/ReasonDialog-DgLxfRWv.js +0 -1
- package/dist/web3/assets/ReviewTab-CyX8yxd3.js +0 -1
- package/dist/web3/assets/StewardsTab-DBEEfAQI.js +0 -1
- package/dist/web3/assets/SubmitForReviewModal-Ci2DdWs0.js +0 -1
- package/dist/web3/assets/backlinks-CYd4xENL.js +0 -24
- package/dist/web3/assets/card-XG2dP5Xf.js +0 -1
- package/dist/web3/assets/count-skeleton-DMbdpscX.js +0 -1
- package/dist/web3/assets/dates-BCxbm4_q.js +0 -1
- package/dist/web3/assets/index-BM-h3DwI.css +0 -1
- package/dist/web3/assets/index-EaX2yql0.js +0 -389
- package/dist/web3/assets/page-B3yvQvHy.js +0 -1
- package/dist/web3/assets/page-BExMvttJ.js +0 -1
- package/dist/web3/assets/page-BUOADv2X.js +0 -1
- package/dist/web3/assets/page-BYUFhYWZ.js +0 -1
- package/dist/web3/assets/page-Bicf02Cz.js +0 -1
- package/dist/web3/assets/page-BsPMDm5d.js +0 -45
- package/dist/web3/assets/page-CC0NJi8v.js +0 -1
- package/dist/web3/assets/page-CPjWQNKx.js +0 -11
- package/dist/web3/assets/page-CQt3ZGbf.js +0 -2
- package/dist/web3/assets/page-Cj1NetQ-.js +0 -1
- package/dist/web3/assets/page-CtaW65El.js +0 -1
- package/dist/web3/assets/page-DGOL9l8i.js +0 -6
- package/dist/web3/assets/refresh-cw-BhHzSH9m.js +0 -6
- package/dist/web3/assets/scroll-area-dRWncRqa.css +0 -1
- package/dist/web3/assets/scroll-area-hz-xtayP.js +0 -1
- package/dist/web3/assets/select-DBFTrUmI.js +0 -6
- package/dist/web3/assets/triangle-alert-CDy8-7sv.js +0 -6
- package/dist/web3/assets/zap-C2T8riBp.js +0 -11
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-BUOADv2X.js","assets/NestPageHeader-CoLUV1Oz.js","assets/arrow-left-BCKt4CwQ.js","assets/folder-target-CUSWqImF.js","assets/refresh-cw-BhHzSH9m.js","assets/x-By7piikG.js","assets/zap-C2T8riBp.js","assets/page-CQt3ZGbf.js","assets/trash-2-HBi-Pslz.js","assets/triangle-alert-CDy8-7sv.js","assets/page-CHb0F5hV.js","assets/tag-DQ_6J5Gv.js","assets/page-ByyVLDVo.js","assets/dates-BCxbm4_q.js","assets/MarkdownEditor-C9zqZjC5.js","assets/scroll-area-hz-xtayP.js","assets/select-DBFTrUmI.js","assets/scroll-area-dRWncRqa.css","assets/index-C1wTSjfP.js","assets/MarkdownEditor-74N_naNQ.css","assets/NestView-CTZ55tXD.js","assets/chevron-left-BPwUT9DS.js","assets/alert-dialog-DTozKlmV.js","assets/count-skeleton-DMbdpscX.js","assets/folder-input-Cmtx1Jhk.js","assets/card-XG2dP5Xf.js","assets/PersonCombobox-CPOlNs6G.js","assets/user-plus-CvBNcpn4.js","assets/ReviewActions-OfOdqzCn.js","assets/circle-check-DI8IBGeo.js","assets/circle-x-VKVhC88W.js","assets/ReasonDialog-DgLxfRWv.js","assets/settings-CeeF4LEb.js","assets/play-C5YNKpAH.js","assets/corner-down-right-BGxwK6wH.js","assets/page-CC0NJi8v.js","assets/page-title-ClvvBsIo.js","assets/page-Bicf02Cz.js","assets/page-CPjWQNKx.js","assets/page-BExMvttJ.js","assets/SubmitForReviewModal-Ci2DdWs0.js","assets/send-0CHvmluT.js","assets/page-BYUFhYWZ.js","assets/page-BsPMDm5d.js","assets/earth-BEp1EKTo.js","assets/page-B3yvQvHy.js","assets/page-DGOL9l8i.js","assets/page-CtaW65El.js","assets/page-Cj1NetQ-.js","assets/ActivityTracePage-BOZHgJ8S.js","assets/DocumentEditor-DrQfrW3d.js","assets/CollaboratorManager-By91wrIr.js","assets/share-2-CMnOlOt-.js","assets/backlinks-CYd4xENL.js","assets/code-xml-CMabYZvH.js","assets/file-exclamation-point-r8qZGIjP.js","assets/AgentDocsPage-CIiaBqMy.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var $S=Object.defineProperty;var Tg=e=>{throw TypeError(e)};var IS=(e,t,r)=>t in e?$S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Rg=(e,t,r)=>IS(e,typeof t!="symbol"?t+"":t,r),Pd=(e,t,r)=>t.has(e)||Tg("Cannot "+r);var P=(e,t,r)=>(Pd(e,t,"read from private field"),r?r.call(e):t.get(e)),ke=(e,t,r)=>t.has(e)?Tg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ue=(e,t,r,o)=>(Pd(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r),$e=(e,t,r)=>(Pd(e,t,"access private method"),r);var Ll=(e,t,r,o)=>({set _(a){ue(e,t,a,r)},get _(){return P(e,t,o)}});function DS(e,t){for(var r=0;r<t.length;r++){const o=t[r];if(typeof o!="string"&&!Array.isArray(o)){for(const a in o)if(a!=="default"&&!(a in e)){const c=Object.getOwnPropertyDescriptor(o,a);c&&Object.defineProperty(e,a,c.get?c:{enumerable:!0,get:()=>o[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const c of a)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function r(a){const c={};return a.integrity&&(c.integrity=a.integrity),a.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?c.credentials="include":a.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(a){if(a.ep)return;a.ep=!0;const c=r(a);fetch(a.href,c)}})();var lI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jd={exports:{}},Xi={},Td={exports:{}},Fe={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Ag;function LS(){if(Ag)return Fe;Ag=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),f=Symbol.iterator;function x(O){return O===null||typeof O!="object"?null:(O=f&&O[f]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function C(O,z,Z){this.props=O,this.context=z,this.refs=k,this.updater=Z||S}C.prototype.isReactComponent={},C.prototype.setState=function(O,z){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,z,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function _(){}_.prototype=C.prototype;function R(O,z,Z){this.props=O,this.context=z,this.refs=k,this.updater=Z||S}var D=R.prototype=new _;D.constructor=R,N(D,C.prototype),D.isPureReactComponent=!0;var T=Array.isArray,G=Object.prototype.hasOwnProperty,q={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function M(O,z,Z){var se,ie={},pe=null,je=null;if(z!=null)for(se in z.ref!==void 0&&(je=z.ref),z.key!==void 0&&(pe=""+z.key),z)G.call(z,se)&&!A.hasOwnProperty(se)&&(ie[se]=z[se]);var ve=arguments.length-2;if(ve===1)ie.children=Z;else if(1<ve){for(var me=Array(ve),We=0;We<ve;We++)me[We]=arguments[We+2];ie.children=me}if(O&&O.defaultProps)for(se in ve=O.defaultProps,ve)ie[se]===void 0&&(ie[se]=ve[se]);return{$$typeof:e,type:O,key:pe,ref:je,props:ie,_owner:q.current}}function Y(O,z){return{$$typeof:e,type:O.type,key:z,ref:O.ref,props:O.props,_owner:O._owner}}function W(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function oe(O){var z={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(Z){return z[Z]})}var ge=/\/+/g;function de(O,z){return typeof O=="object"&&O!==null&&O.key!=null?oe(""+O.key):z.toString(36)}function ce(O,z,Z,se,ie){var pe=typeof O;(pe==="undefined"||pe==="boolean")&&(O=null);var je=!1;if(O===null)je=!0;else switch(pe){case"string":case"number":je=!0;break;case"object":switch(O.$$typeof){case e:case t:je=!0}}if(je)return je=O,ie=ie(je),O=se===""?"."+de(je,0):se,T(ie)?(Z="",O!=null&&(Z=O.replace(ge,"$&/")+"/"),ce(ie,z,Z,"",function(We){return We})):ie!=null&&(W(ie)&&(ie=Y(ie,Z+(!ie.key||je&&je.key===ie.key?"":(""+ie.key).replace(ge,"$&/")+"/")+O)),z.push(ie)),1;if(je=0,se=se===""?".":se+":",T(O))for(var ve=0;ve<O.length;ve++){pe=O[ve];var me=se+de(pe,ve);je+=ce(pe,z,Z,me,ie)}else if(me=x(O),typeof me=="function")for(O=me.call(O),ve=0;!(pe=O.next()).done;)pe=pe.value,me=se+de(pe,ve++),je+=ce(pe,z,Z,me,ie);else if(pe==="object")throw z=String(O),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return je}function fe(O,z,Z){if(O==null)return O;var se=[],ie=0;return ce(O,se,"","",function(pe){return z.call(Z,pe,ie++)}),se}function J(O){if(O._status===-1){var z=O._result;z=z(),z.then(function(Z){(O._status===0||O._status===-1)&&(O._status=1,O._result=Z)},function(Z){(O._status===0||O._status===-1)&&(O._status=2,O._result=Z)}),O._status===-1&&(O._status=0,O._result=z)}if(O._status===1)return O._result.default;throw O._result}var re={current:null},K={transition:null},Q={ReactCurrentDispatcher:re,ReactCurrentBatchConfig:K,ReactCurrentOwner:q};function I(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:fe,forEach:function(O,z,Z){fe(O,function(){z.apply(this,arguments)},Z)},count:function(O){var z=0;return fe(O,function(){z++}),z},toArray:function(O){return fe(O,function(z){return z})||[]},only:function(O){if(!W(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Fe.Component=C,Fe.Fragment=r,Fe.Profiler=a,Fe.PureComponent=R,Fe.StrictMode=o,Fe.Suspense=g,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q,Fe.act=I,Fe.cloneElement=function(O,z,Z){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var se=N({},O.props),ie=O.key,pe=O.ref,je=O._owner;if(z!=null){if(z.ref!==void 0&&(pe=z.ref,je=q.current),z.key!==void 0&&(ie=""+z.key),O.type&&O.type.defaultProps)var ve=O.type.defaultProps;for(me in z)G.call(z,me)&&!A.hasOwnProperty(me)&&(se[me]=z[me]===void 0&&ve!==void 0?ve[me]:z[me])}var me=arguments.length-2;if(me===1)se.children=Z;else if(1<me){ve=Array(me);for(var We=0;We<me;We++)ve[We]=arguments[We+2];se.children=ve}return{$$typeof:e,type:O.type,key:ie,ref:pe,props:se,_owner:je}},Fe.createContext=function(O){return O={$$typeof:d,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:c,_context:O},O.Consumer=O},Fe.createElement=M,Fe.createFactory=function(O){var z=M.bind(null,O);return z.type=O,z},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(O){return{$$typeof:p,render:O}},Fe.isValidElement=W,Fe.lazy=function(O){return{$$typeof:w,_payload:{_status:-1,_result:O},_init:J}},Fe.memo=function(O,z){return{$$typeof:v,type:O,compare:z===void 0?null:z}},Fe.startTransition=function(O){var z=K.transition;K.transition={};try{O()}finally{K.transition=z}},Fe.unstable_act=I,Fe.useCallback=function(O,z){return re.current.useCallback(O,z)},Fe.useContext=function(O){return re.current.useContext(O)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(O){return re.current.useDeferredValue(O)},Fe.useEffect=function(O,z){return re.current.useEffect(O,z)},Fe.useId=function(){return re.current.useId()},Fe.useImperativeHandle=function(O,z,Z){return re.current.useImperativeHandle(O,z,Z)},Fe.useInsertionEffect=function(O,z){return re.current.useInsertionEffect(O,z)},Fe.useLayoutEffect=function(O,z){return re.current.useLayoutEffect(O,z)},Fe.useMemo=function(O,z){return re.current.useMemo(O,z)},Fe.useReducer=function(O,z,Z){return re.current.useReducer(O,z,Z)},Fe.useRef=function(O){return re.current.useRef(O)},Fe.useState=function(O){return re.current.useState(O)},Fe.useSyncExternalStore=function(O,z,Z){return re.current.useSyncExternalStore(O,z,Z)},Fe.useTransition=function(){return re.current.useTransition()},Fe.version="18.3.1",Fe}var Mg;function _c(){return Mg||(Mg=1,Td.exports=LS()),Td.exports}/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var $g;function zS(){if($g)return Xi;$g=1;var e=_c(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function d(p,g,v){var w,f={},x=null,S=null;v!==void 0&&(x=""+v),g.key!==void 0&&(x=""+g.key),g.ref!==void 0&&(S=g.ref);for(w in g)o.call(g,w)&&!c.hasOwnProperty(w)&&(f[w]=g[w]);if(p&&p.defaultProps)for(w in g=p.defaultProps,g)f[w]===void 0&&(f[w]=g[w]);return{$$typeof:t,type:p,key:x,ref:S,props:f,_owner:a.current}}return Xi.Fragment=r,Xi.jsx=d,Xi.jsxs=d,Xi}var Ig;function FS(){return Ig||(Ig=1,jd.exports=zS()),jd.exports}var u=FS(),y=_c();const ae=Qf(y),Gf=DS({__proto__:null,default:ae},[y]);var zl={},Rd={exports:{}},cn={},Ad={exports:{}},Md={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Dg;function US(){return Dg||(Dg=1,(function(e){function t(K,Q){var I=K.length;K.push(Q);e:for(;0<I;){var O=I-1>>>1,z=K[O];if(0<a(z,Q))K[O]=Q,K[I]=z,I=O;else break e}}function r(K){return K.length===0?null:K[0]}function o(K){if(K.length===0)return null;var Q=K[0],I=K.pop();if(I!==Q){K[0]=I;e:for(var O=0,z=K.length,Z=z>>>1;O<Z;){var se=2*(O+1)-1,ie=K[se],pe=se+1,je=K[pe];if(0>a(ie,I))pe<z&&0>a(je,ie)?(K[O]=je,K[pe]=I,O=pe):(K[O]=ie,K[se]=I,O=se);else if(pe<z&&0>a(je,I))K[O]=je,K[pe]=I,O=pe;else break e}}return Q}function a(K,Q){var I=K.sortIndex-Q.sortIndex;return I!==0?I:K.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,p=d.now();e.unstable_now=function(){return d.now()-p}}var g=[],v=[],w=1,f=null,x=3,S=!1,N=!1,k=!1,C=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(K){for(var Q=r(v);Q!==null;){if(Q.callback===null)o(v);else if(Q.startTime<=K)o(v),Q.sortIndex=Q.expirationTime,t(g,Q);else break;Q=r(v)}}function T(K){if(k=!1,D(K),!N)if(r(g)!==null)N=!0,J(G);else{var Q=r(v);Q!==null&&re(T,Q.startTime-K)}}function G(K,Q){N=!1,k&&(k=!1,_(M),M=-1),S=!0;var I=x;try{for(D(Q),f=r(g);f!==null&&(!(f.expirationTime>Q)||K&&!oe());){var O=f.callback;if(typeof O=="function"){f.callback=null,x=f.priorityLevel;var z=O(f.expirationTime<=Q);Q=e.unstable_now(),typeof z=="function"?f.callback=z:f===r(g)&&o(g),D(Q)}else o(g);f=r(g)}if(f!==null)var Z=!0;else{var se=r(v);se!==null&&re(T,se.startTime-Q),Z=!1}return Z}finally{f=null,x=I,S=!1}}var q=!1,A=null,M=-1,Y=5,W=-1;function oe(){return!(e.unstable_now()-W<Y)}function ge(){if(A!==null){var K=e.unstable_now();W=K;var Q=!0;try{Q=A(!0,K)}finally{Q?de():(q=!1,A=null)}}else q=!1}var de;if(typeof R=="function")de=function(){R(ge)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,fe=ce.port2;ce.port1.onmessage=ge,de=function(){fe.postMessage(null)}}else de=function(){C(ge,0)};function J(K){A=K,q||(q=!0,de())}function re(K,Q){M=C(function(){K(e.unstable_now())},Q)}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(K){K.callback=null},e.unstable_continueExecution=function(){N||S||(N=!0,J(G))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(g)},e.unstable_next=function(K){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var I=x;x=Q;try{return K()}finally{x=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,Q){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var I=x;x=K;try{return Q()}finally{x=I}},e.unstable_scheduleCallback=function(K,Q,I){var O=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?O+I:O):I=O,K){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=I+z,K={id:w++,callback:Q,priorityLevel:K,startTime:I,expirationTime:z,sortIndex:-1},I>O?(K.sortIndex=I,t(v,K),r(g)===null&&K===r(v)&&(k?(_(M),M=-1):k=!0,re(T,I-O))):(K.sortIndex=z,t(g,K),N||S||(N=!0,J(G))),K},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(K){var Q=x;return function(){var I=x;x=Q;try{return K.apply(this,arguments)}finally{x=I}}}})(Md)),Md}var Lg;function VS(){return Lg||(Lg=1,Ad.exports=US()),Ad.exports}/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.min.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var zg;function BS(){if(zg)return cn;zg=1;var e=_c(),t=VS();function r(n){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+n,i=1;i<arguments.length;i++)s+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function c(n,s){d(n,s),d(n+"Capture",s)}function d(n,s){for(a[n]=s,n=0;n<s.length;n++)o.add(s[n])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,v=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},f={};function x(n){return g.call(f,n)?!0:g.call(w,n)?!1:v.test(n)?f[n]=!0:(w[n]=!0,!1)}function S(n,s,i,l){if(i!==null&&i.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return l?!1:i!==null?!i.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function N(n,s,i,l){if(s===null||typeof s>"u"||S(n,s,i,l))return!0;if(l)return!1;if(i!==null)switch(i.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(n,s,i,l,h,m,b){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=l,this.attributeNamespace=h,this.mustUseProperty=i,this.propertyName=n,this.type=s,this.sanitizeURL=m,this.removeEmptyString=b}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){C[n]=new k(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var s=n[0];C[s]=new k(s,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){C[n]=new k(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){C[n]=new k(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){C[n]=new k(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){C[n]=new k(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){C[n]=new k(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){C[n]=new k(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){C[n]=new k(n,5,!1,n.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function R(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var s=n.replace(_,R);C[s]=new k(s,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var s=n.replace(_,R);C[s]=new k(s,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var s=n.replace(_,R);C[s]=new k(s,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){C[n]=new k(n,1,!1,n.toLowerCase(),null,!1,!1)}),C.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){C[n]=new k(n,1,!1,n.toLowerCase(),null,!0,!0)});function D(n,s,i,l){var h=C.hasOwnProperty(s)?C[s]:null;(h!==null?h.type!==0:l||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(N(s,i,h,l)&&(i=null),l||h===null?x(s)&&(i===null?n.removeAttribute(s):n.setAttribute(s,""+i)):h.mustUseProperty?n[h.propertyName]=i===null?h.type===3?!1:"":i:(s=h.attributeName,l=h.attributeNamespace,i===null?n.removeAttribute(s):(h=h.type,i=h===3||h===4&&i===!0?"":""+i,l?n.setAttributeNS(l,s,i):n.setAttribute(s,i))))}var T=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=Symbol.for("react.element"),q=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),oe=Symbol.for("react.context"),ge=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),re=Symbol.for("react.offscreen"),K=Symbol.iterator;function Q(n){return n===null||typeof n!="object"?null:(n=K&&n[K]||n["@@iterator"],typeof n=="function"?n:null)}var I=Object.assign,O;function z(n){if(O===void 0)try{throw Error()}catch(i){var s=i.stack.trim().match(/\n( *(at )?)/);O=s&&s[1]||""}return`
|
|
35
|
-
`+O+n}var Z=!1;function se(n,s){if(!n||Z)return"";Z=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(H){var l=H}Reflect.construct(n,[],s)}else{try{s.call()}catch(H){l=H}n.call(s.prototype)}else{try{throw Error()}catch(H){l=H}n()}}catch(H){if(H&&l&&typeof H.stack=="string"){for(var h=H.stack.split(`
|
|
36
|
-
`),m=l.stack.split(`
|
|
37
|
-
`),b=h.length-1,E=m.length-1;1<=b&&0<=E&&h[b]!==m[E];)E--;for(;1<=b&&0<=E;b--,E--)if(h[b]!==m[E]){if(b!==1||E!==1)do if(b--,E--,0>E||h[b]!==m[E]){var j=`
|
|
38
|
-
`+h[b].replace(" at new "," at ");return n.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",n.displayName)),j}while(1<=b&&0<=E);break}}}finally{Z=!1,Error.prepareStackTrace=i}return(n=n?n.displayName||n.name:"")?z(n):""}function ie(n){switch(n.tag){case 5:return z(n.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return n=se(n.type,!1),n;case 11:return n=se(n.type.render,!1),n;case 1:return n=se(n.type,!0),n;default:return""}}function pe(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case q:return"Portal";case Y:return"Profiler";case M:return"StrictMode";case de:return"Suspense";case ce:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case oe:return(n.displayName||"Context")+".Consumer";case W:return(n._context.displayName||"Context")+".Provider";case ge:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case fe:return s=n.displayName||null,s!==null?s:pe(n.type)||"Memo";case J:s=n._payload,n=n._init;try{return pe(n(s))}catch{}}return null}function je(n){var s=n.type;switch(n.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=s.render,n=n.displayName||n.name||"",s.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(s);case 8:return s===M?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function ve(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function me(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function We(n){var s=me(n)?"checked":"value",i=Object.getOwnPropertyDescriptor(n.constructor.prototype,s),l=""+n[s];if(!n.hasOwnProperty(s)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var h=i.get,m=i.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return h.call(this)},set:function(b){l=""+b,m.call(this,b)}}),Object.defineProperty(n,s,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function ft(n){n._valueTracker||(n._valueTracker=We(n))}function ot(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var i=s.getValue(),l="";return n&&(l=me(n)?n.checked?"true":"false":n.value),n=l,n!==i?(s.setValue(n),!0):!1}function pt(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function nt(n,s){var i=s.checked;return I({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??n._wrapperState.initialChecked})}function er(n,s){var i=s.defaultValue==null?"":s.defaultValue,l=s.checked!=null?s.checked:s.defaultChecked;i=ve(s.value!=null?s.value:i),n._wrapperState={initialChecked:l,initialValue:i,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function wr(n,s){s=s.checked,s!=null&&D(n,"checked",s,!1)}function nn(n,s){wr(n,s);var i=ve(s.value),l=s.type;if(i!=null)l==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+i):n.value!==""+i&&(n.value=""+i);else if(l==="submit"||l==="reset"){n.removeAttribute("value");return}s.hasOwnProperty("value")?it(n,s.type,i):s.hasOwnProperty("defaultValue")&&it(n,s.type,ve(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(n.defaultChecked=!!s.defaultChecked)}function Cn(n,s,i){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var l=s.type;if(!(l!=="submit"&&l!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+n._wrapperState.initialValue,i||s===n.value||(n.value=s),n.defaultValue=s}i=n.name,i!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,i!==""&&(n.name=i)}function it(n,s,i){(s!=="number"||pt(n.ownerDocument)!==n)&&(i==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+i&&(n.defaultValue=""+i))}var tr=Array.isArray;function nr(n,s,i,l){if(n=n.options,s){s={};for(var h=0;h<i.length;h++)s["$"+i[h]]=!0;for(i=0;i<n.length;i++)h=s.hasOwnProperty("$"+n[i].value),n[i].selected!==h&&(n[i].selected=h),h&&l&&(n[i].defaultSelected=!0)}else{for(i=""+ve(i),s=null,h=0;h<n.length;h++){if(n[h].value===i){n[h].selected=!0,l&&(n[h].defaultSelected=!0);return}s!==null||n[h].disabled||(s=n[h])}s!==null&&(s.selected=!0)}}function Ct(n,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return I({},s,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function ht(n,s){var i=s.value;if(i==null){if(i=s.children,s=s.defaultValue,i!=null){if(s!=null)throw Error(r(92));if(tr(i)){if(1<i.length)throw Error(r(93));i=i[0]}s=i}s==null&&(s=""),i=s}n._wrapperState={initialValue:ve(i)}}function xr(n,s){var i=ve(s.value),l=ve(s.defaultValue);i!=null&&(i=""+i,i!==n.value&&(n.value=i),s.defaultValue==null&&n.defaultValue!==i&&(n.defaultValue=i)),l!=null&&(n.defaultValue=""+l)}function mo(n){var s=n.textContent;s===n._wrapperState.initialValue&&s!==""&&s!==null&&(n.value=s)}function Nn(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zr(n,s){return n==null||n==="http://www.w3.org/1999/xhtml"?Nn(s):n==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var rr,F=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,i,l,h){MSApp.execUnsafeLocalFunction(function(){return n(s,i,l,h)})}:n})(function(n,s){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=s;else{for(rr=rr||document.createElement("div"),rr.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=rr.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;s.firstChild;)n.appendChild(s.firstChild)}});function X(n,s){if(s){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=s;return}}n.textContent=s}var we={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];Object.keys(we).forEach(function(n){he.forEach(function(s){s=s+n.charAt(0).toUpperCase()+n.substring(1),we[s]=we[n]})});function Ee(n,s,i){return s==null||typeof s=="boolean"||s===""?"":i||typeof s!="number"||s===0||we.hasOwnProperty(n)&&we[n]?(""+s).trim():s+"px"}function et(n,s){n=n.style;for(var i in s)if(s.hasOwnProperty(i)){var l=i.indexOf("--")===0,h=Ee(i,s[i],l);i==="float"&&(i="cssFloat"),l?n.setProperty(i,h):n[i]=h}}var $t=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Je(n,s){if(s){if($t[n]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Ht(n,s){if(n.indexOf("-")===-1)return typeof s.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var It=null;function Nt(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var sr=null,pn=null,br=null;function vi(n){if(n=Li(n)){if(typeof sr!="function")throw Error(r(280));var s=n.stateNode;s&&(s=Xa(s),sr(n.stateNode,n.type,s))}}function Ie(n){pn?br?br.push(n):br=[n]:pn=n}function ct(){if(pn){var n=pn,s=br;if(br=pn=null,vi(n),s)for(n=0;n<s.length;n++)vi(s[n])}}function vt(n,s){return n(s)}function Dt(){}var Fr=!1;function mt(n,s,i){if(Fr)return n(s,i);Fr=!0;try{return vt(n,s,i)}finally{Fr=!1,(pn!==null||br!==null)&&(Dt(),ct())}}function Et(n,s){var i=n.stateNode;if(i===null)return null;var l=Xa(i);if(l===null)return null;i=l[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(i&&typeof i!="function")throw Error(r(231,s,typeof i));return i}var Ur=!1;if(p)try{var Rt={};Object.defineProperty(Rt,"passive",{get:function(){Ur=!0}}),window.addEventListener("test",Rt,Rt),window.removeEventListener("test",Rt,Rt)}catch{Ur=!1}function hn(n,s,i,l,h,m,b,E,j){var H=Array.prototype.slice.call(arguments,3);try{s.apply(i,H)}catch(te){this.onError(te)}}var Vr=!1,En=null,wi=!1,Qc=null,Vb={onError:function(n){Vr=!0,En=n}};function Bb(n,s,i,l,h,m,b,E,j){Vr=!1,En=null,hn.apply(Vb,arguments)}function Wb(n,s,i,l,h,m,b,E,j){if(Bb.apply(this,arguments),Vr){if(Vr){var H=En;Vr=!1,En=null}else throw Error(r(198));wi||(wi=!0,Qc=H)}}function Ns(n){var s=n,i=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(i=s.return),n=s.return;while(n)}return s.tag===3?i:null}function eh(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function th(n){if(Ns(n)!==n)throw Error(r(188))}function Hb(n){var s=n.alternate;if(!s){if(s=Ns(n),s===null)throw Error(r(188));return s!==n?null:n}for(var i=n,l=s;;){var h=i.return;if(h===null)break;var m=h.alternate;if(m===null){if(l=h.return,l!==null){i=l;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===i)return th(h),n;if(m===l)return th(h),s;m=m.sibling}throw Error(r(188))}if(i.return!==l.return)i=h,l=m;else{for(var b=!1,E=h.child;E;){if(E===i){b=!0,i=h,l=m;break}if(E===l){b=!0,l=h,i=m;break}E=E.sibling}if(!b){for(E=m.child;E;){if(E===i){b=!0,i=m,l=h;break}if(E===l){b=!0,l=m,i=h;break}E=E.sibling}if(!b)throw Error(r(189))}}if(i.alternate!==l)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?n:s}function nh(n){return n=Hb(n),n!==null?rh(n):null}function rh(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var s=rh(n);if(s!==null)return s;n=n.sibling}return null}var sh=t.unstable_scheduleCallback,oh=t.unstable_cancelCallback,qb=t.unstable_shouldYield,Kb=t.unstable_requestPaint,ut=t.unstable_now,Qb=t.unstable_getCurrentPriorityLevel,Gc=t.unstable_ImmediatePriority,ih=t.unstable_UserBlockingPriority,Aa=t.unstable_NormalPriority,Gb=t.unstable_LowPriority,ah=t.unstable_IdlePriority,Ma=null,or=null;function Zb(n){if(or&&typeof or.onCommitFiberRoot=="function")try{or.onCommitFiberRoot(Ma,n,void 0,(n.current.flags&128)===128)}catch{}}var Ln=Math.clz32?Math.clz32:Xb,Jb=Math.log,Yb=Math.LN2;function Xb(n){return n>>>=0,n===0?32:31-(Jb(n)/Yb|0)|0}var $a=64,Ia=4194304;function xi(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Da(n,s){var i=n.pendingLanes;if(i===0)return 0;var l=0,h=n.suspendedLanes,m=n.pingedLanes,b=i&268435455;if(b!==0){var E=b&~h;E!==0?l=xi(E):(m&=b,m!==0&&(l=xi(m)))}else b=i&~h,b!==0?l=xi(b):m!==0&&(l=xi(m));if(l===0)return 0;if(s!==0&&s!==l&&(s&h)===0&&(h=l&-l,m=s&-s,h>=m||h===16&&(m&4194240)!==0))return s;if((l&4)!==0&&(l|=i&16),s=n.entangledLanes,s!==0)for(n=n.entanglements,s&=l;0<s;)i=31-Ln(s),h=1<<i,l|=n[i],s&=~h;return l}function e1(n,s){switch(n){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function t1(n,s){for(var i=n.suspendedLanes,l=n.pingedLanes,h=n.expirationTimes,m=n.pendingLanes;0<m;){var b=31-Ln(m),E=1<<b,j=h[b];j===-1?((E&i)===0||(E&l)!==0)&&(h[b]=e1(E,s)):j<=s&&(n.expiredLanes|=E),m&=~E}}function Zc(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function lh(){var n=$a;return $a<<=1,($a&4194240)===0&&($a=64),n}function Jc(n){for(var s=[],i=0;31>i;i++)s.push(n);return s}function bi(n,s,i){n.pendingLanes|=s,s!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,s=31-Ln(s),n[s]=i}function n1(n,s){var i=n.pendingLanes&~s;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=s,n.mutableReadLanes&=s,n.entangledLanes&=s,s=n.entanglements;var l=n.eventTimes;for(n=n.expirationTimes;0<i;){var h=31-Ln(i),m=1<<h;s[h]=0,l[h]=-1,n[h]=-1,i&=~m}}function Yc(n,s){var i=n.entangledLanes|=s;for(n=n.entanglements;i;){var l=31-Ln(i),h=1<<l;h&s|n[l]&s&&(n[l]|=s),i&=~h}}var qe=0;function ch(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var uh,Xc,dh,fh,ph,eu=!1,La=[],Br=null,Wr=null,Hr=null,Si=new Map,ki=new Map,qr=[],r1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function hh(n,s){switch(n){case"focusin":case"focusout":Br=null;break;case"dragenter":case"dragleave":Wr=null;break;case"mouseover":case"mouseout":Hr=null;break;case"pointerover":case"pointerout":Si.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ki.delete(s.pointerId)}}function _i(n,s,i,l,h,m){return n===null||n.nativeEvent!==m?(n={blockedOn:s,domEventName:i,eventSystemFlags:l,nativeEvent:m,targetContainers:[h]},s!==null&&(s=Li(s),s!==null&&Xc(s)),n):(n.eventSystemFlags|=l,s=n.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),n)}function s1(n,s,i,l,h){switch(s){case"focusin":return Br=_i(Br,n,s,i,l,h),!0;case"dragenter":return Wr=_i(Wr,n,s,i,l,h),!0;case"mouseover":return Hr=_i(Hr,n,s,i,l,h),!0;case"pointerover":var m=h.pointerId;return Si.set(m,_i(Si.get(m)||null,n,s,i,l,h)),!0;case"gotpointercapture":return m=h.pointerId,ki.set(m,_i(ki.get(m)||null,n,s,i,l,h)),!0}return!1}function mh(n){var s=Es(n.target);if(s!==null){var i=Ns(s);if(i!==null){if(s=i.tag,s===13){if(s=eh(i),s!==null){n.blockedOn=s,ph(n.priority,function(){dh(i)});return}}else if(s===3&&i.stateNode.current.memoizedState.isDehydrated){n.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}n.blockedOn=null}function za(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var i=nu(n.domEventName,n.eventSystemFlags,s[0],n.nativeEvent);if(i===null){i=n.nativeEvent;var l=new i.constructor(i.type,i);It=l,i.target.dispatchEvent(l),It=null}else return s=Li(i),s!==null&&Xc(s),n.blockedOn=i,!1;s.shift()}return!0}function gh(n,s,i){za(n)&&i.delete(s)}function o1(){eu=!1,Br!==null&&za(Br)&&(Br=null),Wr!==null&&za(Wr)&&(Wr=null),Hr!==null&&za(Hr)&&(Hr=null),Si.forEach(gh),ki.forEach(gh)}function Ci(n,s){n.blockedOn===s&&(n.blockedOn=null,eu||(eu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,o1)))}function Ni(n){function s(h){return Ci(h,n)}if(0<La.length){Ci(La[0],n);for(var i=1;i<La.length;i++){var l=La[i];l.blockedOn===n&&(l.blockedOn=null)}}for(Br!==null&&Ci(Br,n),Wr!==null&&Ci(Wr,n),Hr!==null&&Ci(Hr,n),Si.forEach(s),ki.forEach(s),i=0;i<qr.length;i++)l=qr[i],l.blockedOn===n&&(l.blockedOn=null);for(;0<qr.length&&(i=qr[0],i.blockedOn===null);)mh(i),i.blockedOn===null&&qr.shift()}var go=T.ReactCurrentBatchConfig,Fa=!0;function i1(n,s,i,l){var h=qe,m=go.transition;go.transition=null;try{qe=1,tu(n,s,i,l)}finally{qe=h,go.transition=m}}function a1(n,s,i,l){var h=qe,m=go.transition;go.transition=null;try{qe=4,tu(n,s,i,l)}finally{qe=h,go.transition=m}}function tu(n,s,i,l){if(Fa){var h=nu(n,s,i,l);if(h===null)wu(n,s,l,Ua,i),hh(n,l);else if(s1(h,n,s,i,l))l.stopPropagation();else if(hh(n,l),s&4&&-1<r1.indexOf(n)){for(;h!==null;){var m=Li(h);if(m!==null&&uh(m),m=nu(n,s,i,l),m===null&&wu(n,s,l,Ua,i),m===h)break;h=m}h!==null&&l.stopPropagation()}else wu(n,s,l,null,i)}}var Ua=null;function nu(n,s,i,l){if(Ua=null,n=Nt(l),n=Es(n),n!==null)if(s=Ns(n),s===null)n=null;else if(i=s.tag,i===13){if(n=eh(s),n!==null)return n;n=null}else if(i===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null);return Ua=n,null}function yh(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qb()){case Gc:return 1;case ih:return 4;case Aa:case Gb:return 16;case ah:return 536870912;default:return 16}default:return 16}}var Kr=null,ru=null,Va=null;function vh(){if(Va)return Va;var n,s=ru,i=s.length,l,h="value"in Kr?Kr.value:Kr.textContent,m=h.length;for(n=0;n<i&&s[n]===h[n];n++);var b=i-n;for(l=1;l<=b&&s[i-l]===h[m-l];l++);return Va=h.slice(n,1<l?1-l:void 0)}function Ba(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Wa(){return!0}function wh(){return!1}function mn(n){function s(i,l,h,m,b){this._reactName=i,this._targetInst=h,this.type=l,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(i=n[E],this[E]=i?i(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Wa:wh,this.isPropagationStopped=wh,this}return I(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Wa)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Wa)},persist:function(){},isPersistent:Wa}),s}var yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},su=mn(yo),Ei=I({},yo,{view:0,detail:0}),l1=mn(Ei),ou,iu,Oi,Ha=I({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Oi&&(Oi&&n.type==="mousemove"?(ou=n.screenX-Oi.screenX,iu=n.screenY-Oi.screenY):iu=ou=0,Oi=n),ou)},movementY:function(n){return"movementY"in n?n.movementY:iu}}),xh=mn(Ha),c1=I({},Ha,{dataTransfer:0}),u1=mn(c1),d1=I({},Ei,{relatedTarget:0}),au=mn(d1),f1=I({},yo,{animationName:0,elapsedTime:0,pseudoElement:0}),p1=mn(f1),h1=I({},yo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),m1=mn(h1),g1=I({},yo,{data:0}),bh=mn(g1),y1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},w1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x1(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=w1[n])?!!s[n]:!1}function lu(){return x1}var b1=I({},Ei,{key:function(n){if(n.key){var s=y1[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Ba(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?v1[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lu,charCode:function(n){return n.type==="keypress"?Ba(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ba(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),S1=mn(b1),k1=I({},Ha,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sh=mn(k1),_1=I({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lu}),C1=mn(_1),N1=I({},yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),E1=mn(N1),O1=I({},Ha,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),P1=mn(O1),j1=[9,13,27,32],cu=p&&"CompositionEvent"in window,Pi=null;p&&"documentMode"in document&&(Pi=document.documentMode);var T1=p&&"TextEvent"in window&&!Pi,kh=p&&(!cu||Pi&&8<Pi&&11>=Pi),_h=" ",Ch=!1;function Nh(n,s){switch(n){case"keyup":return j1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var vo=!1;function R1(n,s){switch(n){case"compositionend":return Eh(s);case"keypress":return s.which!==32?null:(Ch=!0,_h);case"textInput":return n=s.data,n===_h&&Ch?null:n;default:return null}}function A1(n,s){if(vo)return n==="compositionend"||!cu&&Nh(n,s)?(n=vh(),Va=ru=Kr=null,vo=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return kh&&s.locale!=="ko"?null:s.data;default:return null}}var M1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Oh(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!M1[n.type]:s==="textarea"}function Ph(n,s,i,l){Ie(l),s=Za(s,"onChange"),0<s.length&&(i=new su("onChange","change",null,i,l),n.push({event:i,listeners:s}))}var ji=null,Ti=null;function $1(n){Kh(n,0)}function qa(n){var s=ko(n);if(ot(s))return n}function I1(n,s){if(n==="change")return s}var jh=!1;if(p){var uu;if(p){var du="oninput"in document;if(!du){var Th=document.createElement("div");Th.setAttribute("oninput","return;"),du=typeof Th.oninput=="function"}uu=du}else uu=!1;jh=uu&&(!document.documentMode||9<document.documentMode)}function Rh(){ji&&(ji.detachEvent("onpropertychange",Ah),Ti=ji=null)}function Ah(n){if(n.propertyName==="value"&&qa(Ti)){var s=[];Ph(s,Ti,n,Nt(n)),mt($1,s)}}function D1(n,s,i){n==="focusin"?(Rh(),ji=s,Ti=i,ji.attachEvent("onpropertychange",Ah)):n==="focusout"&&Rh()}function L1(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return qa(Ti)}function z1(n,s){if(n==="click")return qa(s)}function F1(n,s){if(n==="input"||n==="change")return qa(s)}function U1(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var zn=typeof Object.is=="function"?Object.is:U1;function Ri(n,s){if(zn(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var i=Object.keys(n),l=Object.keys(s);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var h=i[l];if(!g.call(s,h)||!zn(n[h],s[h]))return!1}return!0}function Mh(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function $h(n,s){var i=Mh(n);n=0;for(var l;i;){if(i.nodeType===3){if(l=n+i.textContent.length,n<=s&&l>=s)return{node:i,offset:s-n};n=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Mh(i)}}function Ih(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?Ih(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function Dh(){for(var n=window,s=pt();s instanceof n.HTMLIFrameElement;){try{var i=typeof s.contentWindow.location.href=="string"}catch{i=!1}if(i)n=s.contentWindow;else break;s=pt(n.document)}return s}function fu(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}function V1(n){var s=Dh(),i=n.focusedElem,l=n.selectionRange;if(s!==i&&i&&i.ownerDocument&&Ih(i.ownerDocument.documentElement,i)){if(l!==null&&fu(i)){if(s=l.start,n=l.end,n===void 0&&(n=s),"selectionStart"in i)i.selectionStart=s,i.selectionEnd=Math.min(n,i.value.length);else if(n=(s=i.ownerDocument||document)&&s.defaultView||window,n.getSelection){n=n.getSelection();var h=i.textContent.length,m=Math.min(l.start,h);l=l.end===void 0?m:Math.min(l.end,h),!n.extend&&m>l&&(h=l,l=m,m=h),h=$h(i,m);var b=$h(i,l);h&&b&&(n.rangeCount!==1||n.anchorNode!==h.node||n.anchorOffset!==h.offset||n.focusNode!==b.node||n.focusOffset!==b.offset)&&(s=s.createRange(),s.setStart(h.node,h.offset),n.removeAllRanges(),m>l?(n.addRange(s),n.extend(b.node,b.offset)):(s.setEnd(b.node,b.offset),n.addRange(s)))}}for(s=[],n=i;n=n.parentNode;)n.nodeType===1&&s.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<s.length;i++)n=s[i],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var B1=p&&"documentMode"in document&&11>=document.documentMode,wo=null,pu=null,Ai=null,hu=!1;function Lh(n,s,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;hu||wo==null||wo!==pt(l)||(l=wo,"selectionStart"in l&&fu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ai&&Ri(Ai,l)||(Ai=l,l=Za(pu,"onSelect"),0<l.length&&(s=new su("onSelect","select",null,s,i),n.push({event:s,listeners:l}),s.target=wo)))}function Ka(n,s){var i={};return i[n.toLowerCase()]=s.toLowerCase(),i["Webkit"+n]="webkit"+s,i["Moz"+n]="moz"+s,i}var xo={animationend:Ka("Animation","AnimationEnd"),animationiteration:Ka("Animation","AnimationIteration"),animationstart:Ka("Animation","AnimationStart"),transitionend:Ka("Transition","TransitionEnd")},mu={},zh={};p&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete xo.animationend.animation,delete xo.animationiteration.animation,delete xo.animationstart.animation),"TransitionEvent"in window||delete xo.transitionend.transition);function Qa(n){if(mu[n])return mu[n];if(!xo[n])return n;var s=xo[n],i;for(i in s)if(s.hasOwnProperty(i)&&i in zh)return mu[n]=s[i];return n}var Fh=Qa("animationend"),Uh=Qa("animationiteration"),Vh=Qa("animationstart"),Bh=Qa("transitionend"),Wh=new Map,Hh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qr(n,s){Wh.set(n,s),c(s,[n])}for(var gu=0;gu<Hh.length;gu++){var yu=Hh[gu],W1=yu.toLowerCase(),H1=yu[0].toUpperCase()+yu.slice(1);Qr(W1,"on"+H1)}Qr(Fh,"onAnimationEnd"),Qr(Uh,"onAnimationIteration"),Qr(Vh,"onAnimationStart"),Qr("dblclick","onDoubleClick"),Qr("focusin","onFocus"),Qr("focusout","onBlur"),Qr(Bh,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),q1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mi));function qh(n,s,i){var l=n.type||"unknown-event";n.currentTarget=i,Wb(l,s,void 0,n),n.currentTarget=null}function Kh(n,s){s=(s&4)!==0;for(var i=0;i<n.length;i++){var l=n[i],h=l.event;l=l.listeners;e:{var m=void 0;if(s)for(var b=l.length-1;0<=b;b--){var E=l[b],j=E.instance,H=E.currentTarget;if(E=E.listener,j!==m&&h.isPropagationStopped())break e;qh(h,E,H),m=j}else for(b=0;b<l.length;b++){if(E=l[b],j=E.instance,H=E.currentTarget,E=E.listener,j!==m&&h.isPropagationStopped())break e;qh(h,E,H),m=j}}}if(wi)throw n=Qc,wi=!1,Qc=null,n}function Ye(n,s){var i=s[Cu];i===void 0&&(i=s[Cu]=new Set);var l=n+"__bubble";i.has(l)||(Qh(s,n,2,!1),i.add(l))}function vu(n,s,i){var l=0;s&&(l|=4),Qh(i,n,l,s)}var Ga="_reactListening"+Math.random().toString(36).slice(2);function $i(n){if(!n[Ga]){n[Ga]=!0,o.forEach(function(i){i!=="selectionchange"&&(q1.has(i)||vu(i,!1,n),vu(i,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[Ga]||(s[Ga]=!0,vu("selectionchange",!1,s))}}function Qh(n,s,i,l){switch(yh(s)){case 1:var h=i1;break;case 4:h=a1;break;default:h=tu}i=h.bind(null,s,i,n),h=void 0,!Ur||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),l?h!==void 0?n.addEventListener(s,i,{capture:!0,passive:h}):n.addEventListener(s,i,!0):h!==void 0?n.addEventListener(s,i,{passive:h}):n.addEventListener(s,i,!1)}function wu(n,s,i,l,h){var m=l;if((s&1)===0&&(s&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var E=l.stateNode.containerInfo;if(E===h||E.nodeType===8&&E.parentNode===h)break;if(b===4)for(b=l.return;b!==null;){var j=b.tag;if((j===3||j===4)&&(j=b.stateNode.containerInfo,j===h||j.nodeType===8&&j.parentNode===h))return;b=b.return}for(;E!==null;){if(b=Es(E),b===null)return;if(j=b.tag,j===5||j===6){l=m=b;continue e}E=E.parentNode}}l=l.return}mt(function(){var H=m,te=Nt(i),ne=[];e:{var ee=Wh.get(n);if(ee!==void 0){var ye=su,be=n;switch(n){case"keypress":if(Ba(i)===0)break e;case"keydown":case"keyup":ye=S1;break;case"focusin":be="focus",ye=au;break;case"focusout":be="blur",ye=au;break;case"beforeblur":case"afterblur":ye=au;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=xh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=u1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=C1;break;case Fh:case Uh:case Vh:ye=p1;break;case Bh:ye=E1;break;case"scroll":ye=l1;break;case"wheel":ye=P1;break;case"copy":case"cut":case"paste":ye=m1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=Sh}var Ce=(s&4)!==0,dt=!Ce&&n==="scroll",V=Ce?ee!==null?ee+"Capture":null:ee;Ce=[];for(var $=H,B;$!==null;){B=$;var le=B.stateNode;if(B.tag===5&&le!==null&&(B=le,V!==null&&(le=Et($,V),le!=null&&Ce.push(Ii($,le,B)))),dt)break;$=$.return}0<Ce.length&&(ee=new ye(ee,be,null,i,te),ne.push({event:ee,listeners:Ce}))}}if((s&7)===0){e:{if(ee=n==="mouseover"||n==="pointerover",ye=n==="mouseout"||n==="pointerout",ee&&i!==It&&(be=i.relatedTarget||i.fromElement)&&(Es(be)||be[Sr]))break e;if((ye||ee)&&(ee=te.window===te?te:(ee=te.ownerDocument)?ee.defaultView||ee.parentWindow:window,ye?(be=i.relatedTarget||i.toElement,ye=H,be=be?Es(be):null,be!==null&&(dt=Ns(be),be!==dt||be.tag!==5&&be.tag!==6)&&(be=null)):(ye=null,be=H),ye!==be)){if(Ce=xh,le="onMouseLeave",V="onMouseEnter",$="mouse",(n==="pointerout"||n==="pointerover")&&(Ce=Sh,le="onPointerLeave",V="onPointerEnter",$="pointer"),dt=ye==null?ee:ko(ye),B=be==null?ee:ko(be),ee=new Ce(le,$+"leave",ye,i,te),ee.target=dt,ee.relatedTarget=B,le=null,Es(te)===H&&(Ce=new Ce(V,$+"enter",be,i,te),Ce.target=B,Ce.relatedTarget=dt,le=Ce),dt=le,ye&&be)t:{for(Ce=ye,V=be,$=0,B=Ce;B;B=bo(B))$++;for(B=0,le=V;le;le=bo(le))B++;for(;0<$-B;)Ce=bo(Ce),$--;for(;0<B-$;)V=bo(V),B--;for(;$--;){if(Ce===V||V!==null&&Ce===V.alternate)break t;Ce=bo(Ce),V=bo(V)}Ce=null}else Ce=null;ye!==null&&Gh(ne,ee,ye,Ce,!1),be!==null&&dt!==null&&Gh(ne,dt,be,Ce,!0)}}e:{if(ee=H?ko(H):window,ye=ee.nodeName&&ee.nodeName.toLowerCase(),ye==="select"||ye==="input"&&ee.type==="file")var Ne=I1;else if(Oh(ee))if(jh)Ne=F1;else{Ne=L1;var Oe=D1}else(ye=ee.nodeName)&&ye.toLowerCase()==="input"&&(ee.type==="checkbox"||ee.type==="radio")&&(Ne=z1);if(Ne&&(Ne=Ne(n,H))){Ph(ne,Ne,i,te);break e}Oe&&Oe(n,ee,H),n==="focusout"&&(Oe=ee._wrapperState)&&Oe.controlled&&ee.type==="number"&&it(ee,"number",ee.value)}switch(Oe=H?ko(H):window,n){case"focusin":(Oh(Oe)||Oe.contentEditable==="true")&&(wo=Oe,pu=H,Ai=null);break;case"focusout":Ai=pu=wo=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,Lh(ne,i,te);break;case"selectionchange":if(B1)break;case"keydown":case"keyup":Lh(ne,i,te)}var Pe;if(cu)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else vo?Nh(n,i)&&(Me="onCompositionEnd"):n==="keydown"&&i.keyCode===229&&(Me="onCompositionStart");Me&&(kh&&i.locale!=="ko"&&(vo||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&vo&&(Pe=vh()):(Kr=te,ru="value"in Kr?Kr.value:Kr.textContent,vo=!0)),Oe=Za(H,Me),0<Oe.length&&(Me=new bh(Me,n,null,i,te),ne.push({event:Me,listeners:Oe}),Pe?Me.data=Pe:(Pe=Eh(i),Pe!==null&&(Me.data=Pe)))),(Pe=T1?R1(n,i):A1(n,i))&&(H=Za(H,"onBeforeInput"),0<H.length&&(te=new bh("onBeforeInput","beforeinput",null,i,te),ne.push({event:te,listeners:H}),te.data=Pe))}Kh(ne,s)})}function Ii(n,s,i){return{instance:n,listener:s,currentTarget:i}}function Za(n,s){for(var i=s+"Capture",l=[];n!==null;){var h=n,m=h.stateNode;h.tag===5&&m!==null&&(h=m,m=Et(n,i),m!=null&&l.unshift(Ii(n,m,h)),m=Et(n,s),m!=null&&l.push(Ii(n,m,h))),n=n.return}return l}function bo(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Gh(n,s,i,l,h){for(var m=s._reactName,b=[];i!==null&&i!==l;){var E=i,j=E.alternate,H=E.stateNode;if(j!==null&&j===l)break;E.tag===5&&H!==null&&(E=H,h?(j=Et(i,m),j!=null&&b.unshift(Ii(i,j,E))):h||(j=Et(i,m),j!=null&&b.push(Ii(i,j,E)))),i=i.return}b.length!==0&&n.push({event:s,listeners:b})}var K1=/\r\n?/g,Q1=/\u0000|\uFFFD/g;function Zh(n){return(typeof n=="string"?n:""+n).replace(K1,`
|
|
39
|
-
`).replace(Q1,"")}function Ja(n,s,i){if(s=Zh(s),Zh(n)!==s&&i)throw Error(r(425))}function Ya(){}var xu=null,bu=null;function Su(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ku=typeof setTimeout=="function"?setTimeout:void 0,G1=typeof clearTimeout=="function"?clearTimeout:void 0,Jh=typeof Promise=="function"?Promise:void 0,Z1=typeof queueMicrotask=="function"?queueMicrotask:typeof Jh<"u"?function(n){return Jh.resolve(null).then(n).catch(J1)}:ku;function J1(n){setTimeout(function(){throw n})}function _u(n,s){var i=s,l=0;do{var h=i.nextSibling;if(n.removeChild(i),h&&h.nodeType===8)if(i=h.data,i==="/$"){if(l===0){n.removeChild(h),Ni(s);return}l--}else i!=="$"&&i!=="$?"&&i!=="$!"||l++;i=h}while(i);Ni(s)}function Gr(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return n}function Yh(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="$"||i==="$!"||i==="$?"){if(s===0)return n;s--}else i==="/$"&&s++}n=n.previousSibling}return null}var So=Math.random().toString(36).slice(2),ir="__reactFiber$"+So,Di="__reactProps$"+So,Sr="__reactContainer$"+So,Cu="__reactEvents$"+So,Y1="__reactListeners$"+So,X1="__reactHandles$"+So;function Es(n){var s=n[ir];if(s)return s;for(var i=n.parentNode;i;){if(s=i[Sr]||i[ir]){if(i=s.alternate,s.child!==null||i!==null&&i.child!==null)for(n=Yh(n);n!==null;){if(i=n[ir])return i;n=Yh(n)}return s}n=i,i=n.parentNode}return null}function Li(n){return n=n[ir]||n[Sr],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function ko(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function Xa(n){return n[Di]||null}var Nu=[],_o=-1;function Zr(n){return{current:n}}function Xe(n){0>_o||(n.current=Nu[_o],Nu[_o]=null,_o--)}function Ke(n,s){_o++,Nu[_o]=n.current,n.current=s}var Jr={},Lt=Zr(Jr),rn=Zr(!1),Os=Jr;function Co(n,s){var i=n.type.contextTypes;if(!i)return Jr;var l=n.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===s)return l.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in i)h[m]=s[m];return l&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=s,n.__reactInternalMemoizedMaskedChildContext=h),h}function sn(n){return n=n.childContextTypes,n!=null}function el(){Xe(rn),Xe(Lt)}function Xh(n,s,i){if(Lt.current!==Jr)throw Error(r(168));Ke(Lt,s),Ke(rn,i)}function em(n,s,i){var l=n.stateNode;if(s=s.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var h in l)if(!(h in s))throw Error(r(108,je(n)||"Unknown",h));return I({},i,l)}function tl(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Jr,Os=Lt.current,Ke(Lt,n),Ke(rn,rn.current),!0}function tm(n,s,i){var l=n.stateNode;if(!l)throw Error(r(169));i?(n=em(n,s,Os),l.__reactInternalMemoizedMergedChildContext=n,Xe(rn),Xe(Lt),Ke(Lt,n)):Xe(rn),Ke(rn,i)}var kr=null,nl=!1,Eu=!1;function nm(n){kr===null?kr=[n]:kr.push(n)}function eS(n){nl=!0,nm(n)}function Yr(){if(!Eu&&kr!==null){Eu=!0;var n=0,s=qe;try{var i=kr;for(qe=1;n<i.length;n++){var l=i[n];do l=l(!0);while(l!==null)}kr=null,nl=!1}catch(h){throw kr!==null&&(kr=kr.slice(n+1)),sh(Gc,Yr),h}finally{qe=s,Eu=!1}}return null}var No=[],Eo=0,rl=null,sl=0,On=[],Pn=0,Ps=null,_r=1,Cr="";function js(n,s){No[Eo++]=sl,No[Eo++]=rl,rl=n,sl=s}function rm(n,s,i){On[Pn++]=_r,On[Pn++]=Cr,On[Pn++]=Ps,Ps=n;var l=_r;n=Cr;var h=32-Ln(l)-1;l&=~(1<<h),i+=1;var m=32-Ln(s)+h;if(30<m){var b=h-h%5;m=(l&(1<<b)-1).toString(32),l>>=b,h-=b,_r=1<<32-Ln(s)+h|i<<h|l,Cr=m+n}else _r=1<<m|i<<h|l,Cr=n}function Ou(n){n.return!==null&&(js(n,1),rm(n,1,0))}function Pu(n){for(;n===rl;)rl=No[--Eo],No[Eo]=null,sl=No[--Eo],No[Eo]=null;for(;n===Ps;)Ps=On[--Pn],On[Pn]=null,Cr=On[--Pn],On[Pn]=null,_r=On[--Pn],On[Pn]=null}var gn=null,yn=null,tt=!1,Fn=null;function sm(n,s){var i=An(5,null,null,0);i.elementType="DELETED",i.stateNode=s,i.return=n,s=n.deletions,s===null?(n.deletions=[i],n.flags|=16):s.push(i)}function om(n,s){switch(n.tag){case 5:var i=n.type;return s=s.nodeType!==1||i.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(n.stateNode=s,gn=n,yn=Gr(s.firstChild),!0):!1;case 6:return s=n.pendingProps===""||s.nodeType!==3?null:s,s!==null?(n.stateNode=s,gn=n,yn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(i=Ps!==null?{id:_r,overflow:Cr}:null,n.memoizedState={dehydrated:s,treeContext:i,retryLane:1073741824},i=An(18,null,null,0),i.stateNode=s,i.return=n,n.child=i,gn=n,yn=null,!0):!1;default:return!1}}function ju(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Tu(n){if(tt){var s=yn;if(s){var i=s;if(!om(n,s)){if(ju(n))throw Error(r(418));s=Gr(i.nextSibling);var l=gn;s&&om(n,s)?sm(l,i):(n.flags=n.flags&-4097|2,tt=!1,gn=n)}}else{if(ju(n))throw Error(r(418));n.flags=n.flags&-4097|2,tt=!1,gn=n}}}function im(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;gn=n}function ol(n){if(n!==gn)return!1;if(!tt)return im(n),tt=!0,!1;var s;if((s=n.tag!==3)&&!(s=n.tag!==5)&&(s=n.type,s=s!=="head"&&s!=="body"&&!Su(n.type,n.memoizedProps)),s&&(s=yn)){if(ju(n))throw am(),Error(r(418));for(;s;)sm(n,s),s=Gr(s.nextSibling)}if(im(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,s=0;n;){if(n.nodeType===8){var i=n.data;if(i==="/$"){if(s===0){yn=Gr(n.nextSibling);break e}s--}else i!=="$"&&i!=="$!"&&i!=="$?"||s++}n=n.nextSibling}yn=null}}else yn=gn?Gr(n.stateNode.nextSibling):null;return!0}function am(){for(var n=yn;n;)n=Gr(n.nextSibling)}function Oo(){yn=gn=null,tt=!1}function Ru(n){Fn===null?Fn=[n]:Fn.push(n)}var tS=T.ReactCurrentBatchConfig;function zi(n,s,i){if(n=i.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(r(309));var l=i.stateNode}if(!l)throw Error(r(147,n));var h=l,m=""+n;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===m?s.ref:(s=function(b){var E=h.refs;b===null?delete E[m]:E[m]=b},s._stringRef=m,s)}if(typeof n!="string")throw Error(r(284));if(!i._owner)throw Error(r(290,n))}return n}function il(n,s){throw n=Object.prototype.toString.call(s),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n))}function lm(n){var s=n._init;return s(n._payload)}function cm(n){function s(V,$){if(n){var B=V.deletions;B===null?(V.deletions=[$],V.flags|=16):B.push($)}}function i(V,$){if(!n)return null;for(;$!==null;)s(V,$),$=$.sibling;return null}function l(V,$){for(V=new Map;$!==null;)$.key!==null?V.set($.key,$):V.set($.index,$),$=$.sibling;return V}function h(V,$){return V=is(V,$),V.index=0,V.sibling=null,V}function m(V,$,B){return V.index=B,n?(B=V.alternate,B!==null?(B=B.index,B<$?(V.flags|=2,$):B):(V.flags|=2,$)):(V.flags|=1048576,$)}function b(V){return n&&V.alternate===null&&(V.flags|=2),V}function E(V,$,B,le){return $===null||$.tag!==6?($=kd(B,V.mode,le),$.return=V,$):($=h($,B),$.return=V,$)}function j(V,$,B,le){var Ne=B.type;return Ne===A?te(V,$,B.props.children,le,B.key):$!==null&&($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===J&&lm(Ne)===$.type)?(le=h($,B.props),le.ref=zi(V,$,B),le.return=V,le):(le=jl(B.type,B.key,B.props,null,V.mode,le),le.ref=zi(V,$,B),le.return=V,le)}function H(V,$,B,le){return $===null||$.tag!==4||$.stateNode.containerInfo!==B.containerInfo||$.stateNode.implementation!==B.implementation?($=_d(B,V.mode,le),$.return=V,$):($=h($,B.children||[]),$.return=V,$)}function te(V,$,B,le,Ne){return $===null||$.tag!==7?($=Ls(B,V.mode,le,Ne),$.return=V,$):($=h($,B),$.return=V,$)}function ne(V,$,B){if(typeof $=="string"&&$!==""||typeof $=="number")return $=kd(""+$,V.mode,B),$.return=V,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case G:return B=jl($.type,$.key,$.props,null,V.mode,B),B.ref=zi(V,null,$),B.return=V,B;case q:return $=_d($,V.mode,B),$.return=V,$;case J:var le=$._init;return ne(V,le($._payload),B)}if(tr($)||Q($))return $=Ls($,V.mode,B,null),$.return=V,$;il(V,$)}return null}function ee(V,$,B,le){var Ne=$!==null?$.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return Ne!==null?null:E(V,$,""+B,le);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case G:return B.key===Ne?j(V,$,B,le):null;case q:return B.key===Ne?H(V,$,B,le):null;case J:return Ne=B._init,ee(V,$,Ne(B._payload),le)}if(tr(B)||Q(B))return Ne!==null?null:te(V,$,B,le,null);il(V,B)}return null}function ye(V,$,B,le,Ne){if(typeof le=="string"&&le!==""||typeof le=="number")return V=V.get(B)||null,E($,V,""+le,Ne);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case G:return V=V.get(le.key===null?B:le.key)||null,j($,V,le,Ne);case q:return V=V.get(le.key===null?B:le.key)||null,H($,V,le,Ne);case J:var Oe=le._init;return ye(V,$,B,Oe(le._payload),Ne)}if(tr(le)||Q(le))return V=V.get(B)||null,te($,V,le,Ne,null);il($,le)}return null}function be(V,$,B,le){for(var Ne=null,Oe=null,Pe=$,Me=$=0,jt=null;Pe!==null&&Me<B.length;Me++){Pe.index>Me?(jt=Pe,Pe=null):jt=Pe.sibling;var Be=ee(V,Pe,B[Me],le);if(Be===null){Pe===null&&(Pe=jt);break}n&&Pe&&Be.alternate===null&&s(V,Pe),$=m(Be,$,Me),Oe===null?Ne=Be:Oe.sibling=Be,Oe=Be,Pe=jt}if(Me===B.length)return i(V,Pe),tt&&js(V,Me),Ne;if(Pe===null){for(;Me<B.length;Me++)Pe=ne(V,B[Me],le),Pe!==null&&($=m(Pe,$,Me),Oe===null?Ne=Pe:Oe.sibling=Pe,Oe=Pe);return tt&&js(V,Me),Ne}for(Pe=l(V,Pe);Me<B.length;Me++)jt=ye(Pe,V,Me,B[Me],le),jt!==null&&(n&&jt.alternate!==null&&Pe.delete(jt.key===null?Me:jt.key),$=m(jt,$,Me),Oe===null?Ne=jt:Oe.sibling=jt,Oe=jt);return n&&Pe.forEach(function(as){return s(V,as)}),tt&&js(V,Me),Ne}function Ce(V,$,B,le){var Ne=Q(B);if(typeof Ne!="function")throw Error(r(150));if(B=Ne.call(B),B==null)throw Error(r(151));for(var Oe=Ne=null,Pe=$,Me=$=0,jt=null,Be=B.next();Pe!==null&&!Be.done;Me++,Be=B.next()){Pe.index>Me?(jt=Pe,Pe=null):jt=Pe.sibling;var as=ee(V,Pe,Be.value,le);if(as===null){Pe===null&&(Pe=jt);break}n&&Pe&&as.alternate===null&&s(V,Pe),$=m(as,$,Me),Oe===null?Ne=as:Oe.sibling=as,Oe=as,Pe=jt}if(Be.done)return i(V,Pe),tt&&js(V,Me),Ne;if(Pe===null){for(;!Be.done;Me++,Be=B.next())Be=ne(V,Be.value,le),Be!==null&&($=m(Be,$,Me),Oe===null?Ne=Be:Oe.sibling=Be,Oe=Be);return tt&&js(V,Me),Ne}for(Pe=l(V,Pe);!Be.done;Me++,Be=B.next())Be=ye(Pe,V,Me,Be.value,le),Be!==null&&(n&&Be.alternate!==null&&Pe.delete(Be.key===null?Me:Be.key),$=m(Be,$,Me),Oe===null?Ne=Be:Oe.sibling=Be,Oe=Be);return n&&Pe.forEach(function(MS){return s(V,MS)}),tt&&js(V,Me),Ne}function dt(V,$,B,le){if(typeof B=="object"&&B!==null&&B.type===A&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case G:e:{for(var Ne=B.key,Oe=$;Oe!==null;){if(Oe.key===Ne){if(Ne=B.type,Ne===A){if(Oe.tag===7){i(V,Oe.sibling),$=h(Oe,B.props.children),$.return=V,V=$;break e}}else if(Oe.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===J&&lm(Ne)===Oe.type){i(V,Oe.sibling),$=h(Oe,B.props),$.ref=zi(V,Oe,B),$.return=V,V=$;break e}i(V,Oe);break}else s(V,Oe);Oe=Oe.sibling}B.type===A?($=Ls(B.props.children,V.mode,le,B.key),$.return=V,V=$):(le=jl(B.type,B.key,B.props,null,V.mode,le),le.ref=zi(V,$,B),le.return=V,V=le)}return b(V);case q:e:{for(Oe=B.key;$!==null;){if($.key===Oe)if($.tag===4&&$.stateNode.containerInfo===B.containerInfo&&$.stateNode.implementation===B.implementation){i(V,$.sibling),$=h($,B.children||[]),$.return=V,V=$;break e}else{i(V,$);break}else s(V,$);$=$.sibling}$=_d(B,V.mode,le),$.return=V,V=$}return b(V);case J:return Oe=B._init,dt(V,$,Oe(B._payload),le)}if(tr(B))return be(V,$,B,le);if(Q(B))return Ce(V,$,B,le);il(V,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,$!==null&&$.tag===6?(i(V,$.sibling),$=h($,B),$.return=V,V=$):(i(V,$),$=kd(B,V.mode,le),$.return=V,V=$),b(V)):i(V,$)}return dt}var Po=cm(!0),um=cm(!1),al=Zr(null),ll=null,jo=null,Au=null;function Mu(){Au=jo=ll=null}function $u(n){var s=al.current;Xe(al),n._currentValue=s}function Iu(n,s,i){for(;n!==null;){var l=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,l!==null&&(l.childLanes|=s)):l!==null&&(l.childLanes&s)!==s&&(l.childLanes|=s),n===i)break;n=n.return}}function To(n,s){ll=n,Au=jo=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&s)!==0&&(on=!0),n.firstContext=null)}function jn(n){var s=n._currentValue;if(Au!==n)if(n={context:n,memoizedValue:s,next:null},jo===null){if(ll===null)throw Error(r(308));jo=n,ll.dependencies={lanes:0,firstContext:n}}else jo=jo.next=n;return s}var Ts=null;function Du(n){Ts===null?Ts=[n]:Ts.push(n)}function dm(n,s,i,l){var h=s.interleaved;return h===null?(i.next=i,Du(s)):(i.next=h.next,h.next=i),s.interleaved=i,Nr(n,l)}function Nr(n,s){n.lanes|=s;var i=n.alternate;for(i!==null&&(i.lanes|=s),i=n,n=n.return;n!==null;)n.childLanes|=s,i=n.alternate,i!==null&&(i.childLanes|=s),i=n,n=n.return;return i.tag===3?i.stateNode:null}var Xr=!1;function Lu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fm(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Er(n,s){return{eventTime:n,lane:s,tag:0,payload:null,callback:null,next:null}}function es(n,s,i){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ve&2)!==0){var h=l.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),l.pending=s,Nr(n,i)}return h=l.interleaved,h===null?(s.next=s,Du(l)):(s.next=h.next,h.next=s),l.interleaved=s,Nr(n,i)}function cl(n,s,i){if(s=s.updateQueue,s!==null&&(s=s.shared,(i&4194240)!==0)){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,Yc(n,i)}}function pm(n,s){var i=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var h=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var b={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};m===null?h=m=b:m=m.next=b,i=i.next}while(i!==null);m===null?h=m=s:m=m.next=s}else h=m=s;i={baseState:l.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:l.shared,effects:l.effects},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=s:n.next=s,i.lastBaseUpdate=s}function ul(n,s,i,l){var h=n.updateQueue;Xr=!1;var m=h.firstBaseUpdate,b=h.lastBaseUpdate,E=h.shared.pending;if(E!==null){h.shared.pending=null;var j=E,H=j.next;j.next=null,b===null?m=H:b.next=H,b=j;var te=n.alternate;te!==null&&(te=te.updateQueue,E=te.lastBaseUpdate,E!==b&&(E===null?te.firstBaseUpdate=H:E.next=H,te.lastBaseUpdate=j))}if(m!==null){var ne=h.baseState;b=0,te=H=j=null,E=m;do{var ee=E.lane,ye=E.eventTime;if((l&ee)===ee){te!==null&&(te=te.next={eventTime:ye,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var be=n,Ce=E;switch(ee=s,ye=i,Ce.tag){case 1:if(be=Ce.payload,typeof be=="function"){ne=be.call(ye,ne,ee);break e}ne=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ce.payload,ee=typeof be=="function"?be.call(ye,ne,ee):be,ee==null)break e;ne=I({},ne,ee);break e;case 2:Xr=!0}}E.callback!==null&&E.lane!==0&&(n.flags|=64,ee=h.effects,ee===null?h.effects=[E]:ee.push(E))}else ye={eventTime:ye,lane:ee,tag:E.tag,payload:E.payload,callback:E.callback,next:null},te===null?(H=te=ye,j=ne):te=te.next=ye,b|=ee;if(E=E.next,E===null){if(E=h.shared.pending,E===null)break;ee=E,E=ee.next,ee.next=null,h.lastBaseUpdate=ee,h.shared.pending=null}}while(!0);if(te===null&&(j=ne),h.baseState=j,h.firstBaseUpdate=H,h.lastBaseUpdate=te,s=h.shared.interleaved,s!==null){h=s;do b|=h.lane,h=h.next;while(h!==s)}else m===null&&(h.shared.lanes=0);Ms|=b,n.lanes=b,n.memoizedState=ne}}function hm(n,s,i){if(n=s.effects,s.effects=null,n!==null)for(s=0;s<n.length;s++){var l=n[s],h=l.callback;if(h!==null){if(l.callback=null,l=i,typeof h!="function")throw Error(r(191,h));h.call(l)}}}var Fi={},ar=Zr(Fi),Ui=Zr(Fi),Vi=Zr(Fi);function Rs(n){if(n===Fi)throw Error(r(174));return n}function zu(n,s){switch(Ke(Vi,s),Ke(Ui,n),Ke(ar,Fi),n=s.nodeType,n){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:zr(null,"");break;default:n=n===8?s.parentNode:s,s=n.namespaceURI||null,n=n.tagName,s=zr(s,n)}Xe(ar),Ke(ar,s)}function Ro(){Xe(ar),Xe(Ui),Xe(Vi)}function mm(n){Rs(Vi.current);var s=Rs(ar.current),i=zr(s,n.type);s!==i&&(Ke(Ui,n),Ke(ar,i))}function Fu(n){Ui.current===n&&(Xe(ar),Xe(Ui))}var rt=Zr(0);function dl(n){for(var s=n;s!==null;){if(s.tag===13){var i=s.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Uu=[];function Vu(){for(var n=0;n<Uu.length;n++)Uu[n]._workInProgressVersionPrimary=null;Uu.length=0}var fl=T.ReactCurrentDispatcher,Bu=T.ReactCurrentBatchConfig,As=0,st=null,wt=null,Ot=null,pl=!1,Bi=!1,Wi=0,nS=0;function zt(){throw Error(r(321))}function Wu(n,s){if(s===null)return!1;for(var i=0;i<s.length&&i<n.length;i++)if(!zn(n[i],s[i]))return!1;return!0}function Hu(n,s,i,l,h,m){if(As=m,st=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,fl.current=n===null||n.memoizedState===null?iS:aS,n=i(l,h),Bi){m=0;do{if(Bi=!1,Wi=0,25<=m)throw Error(r(301));m+=1,Ot=wt=null,s.updateQueue=null,fl.current=lS,n=i(l,h)}while(Bi)}if(fl.current=gl,s=wt!==null&&wt.next!==null,As=0,Ot=wt=st=null,pl=!1,s)throw Error(r(300));return n}function qu(){var n=Wi!==0;return Wi=0,n}function lr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?st.memoizedState=Ot=n:Ot=Ot.next=n,Ot}function Tn(){if(wt===null){var n=st.alternate;n=n!==null?n.memoizedState:null}else n=wt.next;var s=Ot===null?st.memoizedState:Ot.next;if(s!==null)Ot=s,wt=n;else{if(n===null)throw Error(r(310));wt=n,n={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Ot===null?st.memoizedState=Ot=n:Ot=Ot.next=n}return Ot}function Hi(n,s){return typeof s=="function"?s(n):s}function Ku(n){var s=Tn(),i=s.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=n;var l=wt,h=l.baseQueue,m=i.pending;if(m!==null){if(h!==null){var b=h.next;h.next=m.next,m.next=b}l.baseQueue=h=m,i.pending=null}if(h!==null){m=h.next,l=l.baseState;var E=b=null,j=null,H=m;do{var te=H.lane;if((As&te)===te)j!==null&&(j=j.next={lane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),l=H.hasEagerState?H.eagerState:n(l,H.action);else{var ne={lane:te,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null};j===null?(E=j=ne,b=l):j=j.next=ne,st.lanes|=te,Ms|=te}H=H.next}while(H!==null&&H!==m);j===null?b=l:j.next=E,zn(l,s.memoizedState)||(on=!0),s.memoizedState=l,s.baseState=b,s.baseQueue=j,i.lastRenderedState=l}if(n=i.interleaved,n!==null){h=n;do m=h.lane,st.lanes|=m,Ms|=m,h=h.next;while(h!==n)}else h===null&&(i.lanes=0);return[s.memoizedState,i.dispatch]}function Qu(n){var s=Tn(),i=s.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=n;var l=i.dispatch,h=i.pending,m=s.memoizedState;if(h!==null){i.pending=null;var b=h=h.next;do m=n(m,b.action),b=b.next;while(b!==h);zn(m,s.memoizedState)||(on=!0),s.memoizedState=m,s.baseQueue===null&&(s.baseState=m),i.lastRenderedState=m}return[m,l]}function gm(){}function ym(n,s){var i=st,l=Tn(),h=s(),m=!zn(l.memoizedState,h);if(m&&(l.memoizedState=h,on=!0),l=l.queue,Gu(xm.bind(null,i,l,n),[n]),l.getSnapshot!==s||m||Ot!==null&&Ot.memoizedState.tag&1){if(i.flags|=2048,qi(9,wm.bind(null,i,l,h,s),void 0,null),Pt===null)throw Error(r(349));(As&30)!==0||vm(i,s,h)}return h}function vm(n,s,i){n.flags|=16384,n={getSnapshot:s,value:i},s=st.updateQueue,s===null?(s={lastEffect:null,stores:null},st.updateQueue=s,s.stores=[n]):(i=s.stores,i===null?s.stores=[n]:i.push(n))}function wm(n,s,i,l){s.value=i,s.getSnapshot=l,bm(s)&&Sm(n)}function xm(n,s,i){return i(function(){bm(s)&&Sm(n)})}function bm(n){var s=n.getSnapshot;n=n.value;try{var i=s();return!zn(n,i)}catch{return!0}}function Sm(n){var s=Nr(n,1);s!==null&&Wn(s,n,1,-1)}function km(n){var s=lr();return typeof n=="function"&&(n=n()),s.memoizedState=s.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:n},s.queue=n,n=n.dispatch=oS.bind(null,st,n),[s.memoizedState,n]}function qi(n,s,i,l){return n={tag:n,create:s,destroy:i,deps:l,next:null},s=st.updateQueue,s===null?(s={lastEffect:null,stores:null},st.updateQueue=s,s.lastEffect=n.next=n):(i=s.lastEffect,i===null?s.lastEffect=n.next=n:(l=i.next,i.next=n,n.next=l,s.lastEffect=n)),n}function _m(){return Tn().memoizedState}function hl(n,s,i,l){var h=lr();st.flags|=n,h.memoizedState=qi(1|s,i,void 0,l===void 0?null:l)}function ml(n,s,i,l){var h=Tn();l=l===void 0?null:l;var m=void 0;if(wt!==null){var b=wt.memoizedState;if(m=b.destroy,l!==null&&Wu(l,b.deps)){h.memoizedState=qi(s,i,m,l);return}}st.flags|=n,h.memoizedState=qi(1|s,i,m,l)}function Cm(n,s){return hl(8390656,8,n,s)}function Gu(n,s){return ml(2048,8,n,s)}function Nm(n,s){return ml(4,2,n,s)}function Em(n,s){return ml(4,4,n,s)}function Om(n,s){if(typeof s=="function")return n=n(),s(n),function(){s(null)};if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function Pm(n,s,i){return i=i!=null?i.concat([n]):null,ml(4,4,Om.bind(null,s,n),i)}function Zu(){}function jm(n,s){var i=Tn();s=s===void 0?null:s;var l=i.memoizedState;return l!==null&&s!==null&&Wu(s,l[1])?l[0]:(i.memoizedState=[n,s],n)}function Tm(n,s){var i=Tn();s=s===void 0?null:s;var l=i.memoizedState;return l!==null&&s!==null&&Wu(s,l[1])?l[0]:(n=n(),i.memoizedState=[n,s],n)}function Rm(n,s,i){return(As&21)===0?(n.baseState&&(n.baseState=!1,on=!0),n.memoizedState=i):(zn(i,s)||(i=lh(),st.lanes|=i,Ms|=i,n.baseState=!0),s)}function rS(n,s){var i=qe;qe=i!==0&&4>i?i:4,n(!0);var l=Bu.transition;Bu.transition={};try{n(!1),s()}finally{qe=i,Bu.transition=l}}function Am(){return Tn().memoizedState}function sS(n,s,i){var l=ss(n);if(i={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null},Mm(n))$m(s,i);else if(i=dm(n,s,i,l),i!==null){var h=Kt();Wn(i,n,l,h),Im(i,s,l)}}function oS(n,s,i){var l=ss(n),h={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null};if(Mm(n))$m(s,h);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=s.lastRenderedReducer,m!==null))try{var b=s.lastRenderedState,E=m(b,i);if(h.hasEagerState=!0,h.eagerState=E,zn(E,b)){var j=s.interleaved;j===null?(h.next=h,Du(s)):(h.next=j.next,j.next=h),s.interleaved=h;return}}catch{}finally{}i=dm(n,s,h,l),i!==null&&(h=Kt(),Wn(i,n,l,h),Im(i,s,l))}}function Mm(n){var s=n.alternate;return n===st||s!==null&&s===st}function $m(n,s){Bi=pl=!0;var i=n.pending;i===null?s.next=s:(s.next=i.next,i.next=s),n.pending=s}function Im(n,s,i){if((i&4194240)!==0){var l=s.lanes;l&=n.pendingLanes,i|=l,s.lanes=i,Yc(n,i)}}var gl={readContext:jn,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},iS={readContext:jn,useCallback:function(n,s){return lr().memoizedState=[n,s===void 0?null:s],n},useContext:jn,useEffect:Cm,useImperativeHandle:function(n,s,i){return i=i!=null?i.concat([n]):null,hl(4194308,4,Om.bind(null,s,n),i)},useLayoutEffect:function(n,s){return hl(4194308,4,n,s)},useInsertionEffect:function(n,s){return hl(4,2,n,s)},useMemo:function(n,s){var i=lr();return s=s===void 0?null:s,n=n(),i.memoizedState=[n,s],n},useReducer:function(n,s,i){var l=lr();return s=i!==void 0?i(s):s,l.memoizedState=l.baseState=s,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:s},l.queue=n,n=n.dispatch=sS.bind(null,st,n),[l.memoizedState,n]},useRef:function(n){var s=lr();return n={current:n},s.memoizedState=n},useState:km,useDebugValue:Zu,useDeferredValue:function(n){return lr().memoizedState=n},useTransition:function(){var n=km(!1),s=n[0];return n=rS.bind(null,n[1]),lr().memoizedState=n,[s,n]},useMutableSource:function(){},useSyncExternalStore:function(n,s,i){var l=st,h=lr();if(tt){if(i===void 0)throw Error(r(407));i=i()}else{if(i=s(),Pt===null)throw Error(r(349));(As&30)!==0||vm(l,s,i)}h.memoizedState=i;var m={value:i,getSnapshot:s};return h.queue=m,Cm(xm.bind(null,l,m,n),[n]),l.flags|=2048,qi(9,wm.bind(null,l,m,i,s),void 0,null),i},useId:function(){var n=lr(),s=Pt.identifierPrefix;if(tt){var i=Cr,l=_r;i=(l&~(1<<32-Ln(l)-1)).toString(32)+i,s=":"+s+"R"+i,i=Wi++,0<i&&(s+="H"+i.toString(32)),s+=":"}else i=nS++,s=":"+s+"r"+i.toString(32)+":";return n.memoizedState=s},unstable_isNewReconciler:!1},aS={readContext:jn,useCallback:jm,useContext:jn,useEffect:Gu,useImperativeHandle:Pm,useInsertionEffect:Nm,useLayoutEffect:Em,useMemo:Tm,useReducer:Ku,useRef:_m,useState:function(){return Ku(Hi)},useDebugValue:Zu,useDeferredValue:function(n){var s=Tn();return Rm(s,wt.memoizedState,n)},useTransition:function(){var n=Ku(Hi)[0],s=Tn().memoizedState;return[n,s]},useMutableSource:gm,useSyncExternalStore:ym,useId:Am,unstable_isNewReconciler:!1},lS={readContext:jn,useCallback:jm,useContext:jn,useEffect:Gu,useImperativeHandle:Pm,useInsertionEffect:Nm,useLayoutEffect:Em,useMemo:Tm,useReducer:Qu,useRef:_m,useState:function(){return Qu(Hi)},useDebugValue:Zu,useDeferredValue:function(n){var s=Tn();return wt===null?s.memoizedState=n:Rm(s,wt.memoizedState,n)},useTransition:function(){var n=Qu(Hi)[0],s=Tn().memoizedState;return[n,s]},useMutableSource:gm,useSyncExternalStore:ym,useId:Am,unstable_isNewReconciler:!1};function Un(n,s){if(n&&n.defaultProps){s=I({},s),n=n.defaultProps;for(var i in n)s[i]===void 0&&(s[i]=n[i]);return s}return s}function Ju(n,s,i,l){s=n.memoizedState,i=i(l,s),i=i==null?s:I({},s,i),n.memoizedState=i,n.lanes===0&&(n.updateQueue.baseState=i)}var yl={isMounted:function(n){return(n=n._reactInternals)?Ns(n)===n:!1},enqueueSetState:function(n,s,i){n=n._reactInternals;var l=Kt(),h=ss(n),m=Er(l,h);m.payload=s,i!=null&&(m.callback=i),s=es(n,m,h),s!==null&&(Wn(s,n,h,l),cl(s,n,h))},enqueueReplaceState:function(n,s,i){n=n._reactInternals;var l=Kt(),h=ss(n),m=Er(l,h);m.tag=1,m.payload=s,i!=null&&(m.callback=i),s=es(n,m,h),s!==null&&(Wn(s,n,h,l),cl(s,n,h))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var i=Kt(),l=ss(n),h=Er(i,l);h.tag=2,s!=null&&(h.callback=s),s=es(n,h,l),s!==null&&(Wn(s,n,l,i),cl(s,n,l))}};function Dm(n,s,i,l,h,m,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,m,b):s.prototype&&s.prototype.isPureReactComponent?!Ri(i,l)||!Ri(h,m):!0}function Lm(n,s,i){var l=!1,h=Jr,m=s.contextType;return typeof m=="object"&&m!==null?m=jn(m):(h=sn(s)?Os:Lt.current,l=s.contextTypes,m=(l=l!=null)?Co(n,h):Jr),s=new s(i,m),n.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=yl,n.stateNode=s,s._reactInternals=n,l&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=h,n.__reactInternalMemoizedMaskedChildContext=m),s}function zm(n,s,i,l){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(i,l),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(i,l),s.state!==n&&yl.enqueueReplaceState(s,s.state,null)}function Yu(n,s,i,l){var h=n.stateNode;h.props=i,h.state=n.memoizedState,h.refs={},Lu(n);var m=s.contextType;typeof m=="object"&&m!==null?h.context=jn(m):(m=sn(s)?Os:Lt.current,h.context=Co(n,m)),h.state=n.memoizedState,m=s.getDerivedStateFromProps,typeof m=="function"&&(Ju(n,s,m,i),h.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(s=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),s!==h.state&&yl.enqueueReplaceState(h,h.state,null),ul(n,i,h,l),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308)}function Ao(n,s){try{var i="",l=s;do i+=ie(l),l=l.return;while(l);var h=i}catch(m){h=`
|
|
40
|
-
Error generating stack: `+m.message+`
|
|
41
|
-
`+m.stack}return{value:n,source:s,stack:h,digest:null}}function Xu(n,s,i){return{value:n,source:null,stack:i??null,digest:s??null}}function ed(n,s){try{console.error(s.value)}catch(i){setTimeout(function(){throw i})}}var cS=typeof WeakMap=="function"?WeakMap:Map;function Fm(n,s,i){i=Er(-1,i),i.tag=3,i.payload={element:null};var l=s.value;return i.callback=function(){_l||(_l=!0,md=l),ed(n,s)},i}function Um(n,s,i){i=Er(-1,i),i.tag=3;var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var h=s.value;i.payload=function(){return l(h)},i.callback=function(){ed(n,s)}}var m=n.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(i.callback=function(){ed(n,s),typeof l!="function"&&(ns===null?ns=new Set([this]):ns.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})}),i}function Vm(n,s,i){var l=n.pingCache;if(l===null){l=n.pingCache=new cS;var h=new Set;l.set(s,h)}else h=l.get(s),h===void 0&&(h=new Set,l.set(s,h));h.has(i)||(h.add(i),n=kS.bind(null,n,s,i),s.then(n,n))}function Bm(n){do{var s;if((s=n.tag===13)&&(s=n.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return n;n=n.return}while(n!==null);return null}function Wm(n,s,i,l,h){return(n.mode&1)===0?(n===s?n.flags|=65536:(n.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(s=Er(-1,1),s.tag=2,es(i,s,1))),i.lanes|=1),n):(n.flags|=65536,n.lanes=h,n)}var uS=T.ReactCurrentOwner,on=!1;function qt(n,s,i,l){s.child=n===null?um(s,null,i,l):Po(s,n.child,i,l)}function Hm(n,s,i,l,h){i=i.render;var m=s.ref;return To(s,h),l=Hu(n,s,i,l,m,h),i=qu(),n!==null&&!on?(s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~h,Or(n,s,h)):(tt&&i&&Ou(s),s.flags|=1,qt(n,s,l,h),s.child)}function qm(n,s,i,l,h){if(n===null){var m=i.type;return typeof m=="function"&&!Sd(m)&&m.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(s.tag=15,s.type=m,Km(n,s,m,l,h)):(n=jl(i.type,null,l,s,s.mode,h),n.ref=s.ref,n.return=s,s.child=n)}if(m=n.child,(n.lanes&h)===0){var b=m.memoizedProps;if(i=i.compare,i=i!==null?i:Ri,i(b,l)&&n.ref===s.ref)return Or(n,s,h)}return s.flags|=1,n=is(m,l),n.ref=s.ref,n.return=s,s.child=n}function Km(n,s,i,l,h){if(n!==null){var m=n.memoizedProps;if(Ri(m,l)&&n.ref===s.ref)if(on=!1,s.pendingProps=l=m,(n.lanes&h)!==0)(n.flags&131072)!==0&&(on=!0);else return s.lanes=n.lanes,Or(n,s,h)}return td(n,s,i,l,h)}function Qm(n,s,i){var l=s.pendingProps,h=l.children,m=n!==null?n.memoizedState:null;if(l.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ke($o,vn),vn|=i;else{if((i&1073741824)===0)return n=m!==null?m.baseLanes|i:i,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:n,cachePool:null,transitions:null},s.updateQueue=null,Ke($o,vn),vn|=n,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=m!==null?m.baseLanes:i,Ke($o,vn),vn|=l}else m!==null?(l=m.baseLanes|i,s.memoizedState=null):l=i,Ke($o,vn),vn|=l;return qt(n,s,h,i),s.child}function Gm(n,s){var i=s.ref;(n===null&&i!==null||n!==null&&n.ref!==i)&&(s.flags|=512,s.flags|=2097152)}function td(n,s,i,l,h){var m=sn(i)?Os:Lt.current;return m=Co(s,m),To(s,h),i=Hu(n,s,i,l,m,h),l=qu(),n!==null&&!on?(s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~h,Or(n,s,h)):(tt&&l&&Ou(s),s.flags|=1,qt(n,s,i,h),s.child)}function Zm(n,s,i,l,h){if(sn(i)){var m=!0;tl(s)}else m=!1;if(To(s,h),s.stateNode===null)wl(n,s),Lm(s,i,l),Yu(s,i,l,h),l=!0;else if(n===null){var b=s.stateNode,E=s.memoizedProps;b.props=E;var j=b.context,H=i.contextType;typeof H=="object"&&H!==null?H=jn(H):(H=sn(i)?Os:Lt.current,H=Co(s,H));var te=i.getDerivedStateFromProps,ne=typeof te=="function"||typeof b.getSnapshotBeforeUpdate=="function";ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==l||j!==H)&&zm(s,b,l,H),Xr=!1;var ee=s.memoizedState;b.state=ee,ul(s,l,b,h),j=s.memoizedState,E!==l||ee!==j||rn.current||Xr?(typeof te=="function"&&(Ju(s,i,te,l),j=s.memoizedState),(E=Xr||Dm(s,i,E,l,ee,j,H))?(ne||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(s.flags|=4194308)):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=l,s.memoizedState=j),b.props=l,b.state=j,b.context=H,l=E):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),l=!1)}else{b=s.stateNode,fm(n,s),E=s.memoizedProps,H=s.type===s.elementType?E:Un(s.type,E),b.props=H,ne=s.pendingProps,ee=b.context,j=i.contextType,typeof j=="object"&&j!==null?j=jn(j):(j=sn(i)?Os:Lt.current,j=Co(s,j));var ye=i.getDerivedStateFromProps;(te=typeof ye=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==ne||ee!==j)&&zm(s,b,l,j),Xr=!1,ee=s.memoizedState,b.state=ee,ul(s,l,b,h);var be=s.memoizedState;E!==ne||ee!==be||rn.current||Xr?(typeof ye=="function"&&(Ju(s,i,ye,l),be=s.memoizedState),(H=Xr||Dm(s,i,H,l,ee,be,j)||!1)?(te||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(l,be,j),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(l,be,j)),typeof b.componentDidUpdate=="function"&&(s.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===n.memoizedProps&&ee===n.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===n.memoizedProps&&ee===n.memoizedState||(s.flags|=1024),s.memoizedProps=l,s.memoizedState=be),b.props=l,b.state=be,b.context=j,l=H):(typeof b.componentDidUpdate!="function"||E===n.memoizedProps&&ee===n.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===n.memoizedProps&&ee===n.memoizedState||(s.flags|=1024),l=!1)}return nd(n,s,i,l,m,h)}function nd(n,s,i,l,h,m){Gm(n,s);var b=(s.flags&128)!==0;if(!l&&!b)return h&&tm(s,i,!1),Or(n,s,m);l=s.stateNode,uS.current=s;var E=b&&typeof i.getDerivedStateFromError!="function"?null:l.render();return s.flags|=1,n!==null&&b?(s.child=Po(s,n.child,null,m),s.child=Po(s,null,E,m)):qt(n,s,E,m),s.memoizedState=l.state,h&&tm(s,i,!0),s.child}function Jm(n){var s=n.stateNode;s.pendingContext?Xh(n,s.pendingContext,s.pendingContext!==s.context):s.context&&Xh(n,s.context,!1),zu(n,s.containerInfo)}function Ym(n,s,i,l,h){return Oo(),Ru(h),s.flags|=256,qt(n,s,i,l),s.child}var rd={dehydrated:null,treeContext:null,retryLane:0};function sd(n){return{baseLanes:n,cachePool:null,transitions:null}}function Xm(n,s,i){var l=s.pendingProps,h=rt.current,m=!1,b=(s.flags&128)!==0,E;if((E=b)||(E=n!==null&&n.memoizedState===null?!1:(h&2)!==0),E?(m=!0,s.flags&=-129):(n===null||n.memoizedState!==null)&&(h|=1),Ke(rt,h&1),n===null)return Tu(s),n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((s.mode&1)===0?s.lanes=1:n.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(b=l.children,n=l.fallback,m?(l=s.mode,m=s.child,b={mode:"hidden",children:b},(l&1)===0&&m!==null?(m.childLanes=0,m.pendingProps=b):m=Tl(b,l,0,null),n=Ls(n,l,i,null),m.return=s,n.return=s,m.sibling=n,s.child=m,s.child.memoizedState=sd(i),s.memoizedState=rd,n):od(s,b));if(h=n.memoizedState,h!==null&&(E=h.dehydrated,E!==null))return dS(n,s,b,l,E,h,i);if(m){m=l.fallback,b=s.mode,h=n.child,E=h.sibling;var j={mode:"hidden",children:l.children};return(b&1)===0&&s.child!==h?(l=s.child,l.childLanes=0,l.pendingProps=j,s.deletions=null):(l=is(h,j),l.subtreeFlags=h.subtreeFlags&14680064),E!==null?m=is(E,m):(m=Ls(m,b,i,null),m.flags|=2),m.return=s,l.return=s,l.sibling=m,s.child=l,l=m,m=s.child,b=n.child.memoizedState,b=b===null?sd(i):{baseLanes:b.baseLanes|i,cachePool:null,transitions:b.transitions},m.memoizedState=b,m.childLanes=n.childLanes&~i,s.memoizedState=rd,l}return m=n.child,n=m.sibling,l=is(m,{mode:"visible",children:l.children}),(s.mode&1)===0&&(l.lanes=i),l.return=s,l.sibling=null,n!==null&&(i=s.deletions,i===null?(s.deletions=[n],s.flags|=16):i.push(n)),s.child=l,s.memoizedState=null,l}function od(n,s){return s=Tl({mode:"visible",children:s},n.mode,0,null),s.return=n,n.child=s}function vl(n,s,i,l){return l!==null&&Ru(l),Po(s,n.child,null,i),n=od(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function dS(n,s,i,l,h,m,b){if(i)return s.flags&256?(s.flags&=-257,l=Xu(Error(r(422))),vl(n,s,b,l)):s.memoizedState!==null?(s.child=n.child,s.flags|=128,null):(m=l.fallback,h=s.mode,l=Tl({mode:"visible",children:l.children},h,0,null),m=Ls(m,h,b,null),m.flags|=2,l.return=s,m.return=s,l.sibling=m,s.child=l,(s.mode&1)!==0&&Po(s,n.child,null,b),s.child.memoizedState=sd(b),s.memoizedState=rd,m);if((s.mode&1)===0)return vl(n,s,b,null);if(h.data==="$!"){if(l=h.nextSibling&&h.nextSibling.dataset,l)var E=l.dgst;return l=E,m=Error(r(419)),l=Xu(m,l,void 0),vl(n,s,b,l)}if(E=(b&n.childLanes)!==0,on||E){if(l=Pt,l!==null){switch(b&-b){case 4:h=2;break;case 16:h=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(l.suspendedLanes|b))!==0?0:h,h!==0&&h!==m.retryLane&&(m.retryLane=h,Nr(n,h),Wn(l,n,h,-1))}return bd(),l=Xu(Error(r(421))),vl(n,s,b,l)}return h.data==="$?"?(s.flags|=128,s.child=n.child,s=_S.bind(null,n),h._reactRetry=s,null):(n=m.treeContext,yn=Gr(h.nextSibling),gn=s,tt=!0,Fn=null,n!==null&&(On[Pn++]=_r,On[Pn++]=Cr,On[Pn++]=Ps,_r=n.id,Cr=n.overflow,Ps=s),s=od(s,l.children),s.flags|=4096,s)}function eg(n,s,i){n.lanes|=s;var l=n.alternate;l!==null&&(l.lanes|=s),Iu(n.return,s,i)}function id(n,s,i,l,h){var m=n.memoizedState;m===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:h}:(m.isBackwards=s,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=i,m.tailMode=h)}function tg(n,s,i){var l=s.pendingProps,h=l.revealOrder,m=l.tail;if(qt(n,s,l.children,i),l=rt.current,(l&2)!==0)l=l&1|2,s.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&eg(n,i,s);else if(n.tag===19)eg(n,i,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}l&=1}if(Ke(rt,l),(s.mode&1)===0)s.memoizedState=null;else switch(h){case"forwards":for(i=s.child,h=null;i!==null;)n=i.alternate,n!==null&&dl(n)===null&&(h=i),i=i.sibling;i=h,i===null?(h=s.child,s.child=null):(h=i.sibling,i.sibling=null),id(s,!1,h,i,m);break;case"backwards":for(i=null,h=s.child,s.child=null;h!==null;){if(n=h.alternate,n!==null&&dl(n)===null){s.child=h;break}n=h.sibling,h.sibling=i,i=h,h=n}id(s,!0,i,null,m);break;case"together":id(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function wl(n,s){(s.mode&1)===0&&n!==null&&(n.alternate=null,s.alternate=null,s.flags|=2)}function Or(n,s,i){if(n!==null&&(s.dependencies=n.dependencies),Ms|=s.lanes,(i&s.childLanes)===0)return null;if(n!==null&&s.child!==n.child)throw Error(r(153));if(s.child!==null){for(n=s.child,i=is(n,n.pendingProps),s.child=i,i.return=s;n.sibling!==null;)n=n.sibling,i=i.sibling=is(n,n.pendingProps),i.return=s;i.sibling=null}return s.child}function fS(n,s,i){switch(s.tag){case 3:Jm(s),Oo();break;case 5:mm(s);break;case 1:sn(s.type)&&tl(s);break;case 4:zu(s,s.stateNode.containerInfo);break;case 10:var l=s.type._context,h=s.memoizedProps.value;Ke(al,l._currentValue),l._currentValue=h;break;case 13:if(l=s.memoizedState,l!==null)return l.dehydrated!==null?(Ke(rt,rt.current&1),s.flags|=128,null):(i&s.child.childLanes)!==0?Xm(n,s,i):(Ke(rt,rt.current&1),n=Or(n,s,i),n!==null?n.sibling:null);Ke(rt,rt.current&1);break;case 19:if(l=(i&s.childLanes)!==0,(n.flags&128)!==0){if(l)return tg(n,s,i);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Ke(rt,rt.current),l)break;return null;case 22:case 23:return s.lanes=0,Qm(n,s,i)}return Or(n,s,i)}var ng,ad,rg,sg;ng=function(n,s){for(var i=s.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},ad=function(){},rg=function(n,s,i,l){var h=n.memoizedProps;if(h!==l){n=s.stateNode,Rs(ar.current);var m=null;switch(i){case"input":h=nt(n,h),l=nt(n,l),m=[];break;case"select":h=I({},h,{value:void 0}),l=I({},l,{value:void 0}),m=[];break;case"textarea":h=Ct(n,h),l=Ct(n,l),m=[];break;default:typeof h.onClick!="function"&&typeof l.onClick=="function"&&(n.onclick=Ya)}Je(i,l);var b;i=null;for(H in h)if(!l.hasOwnProperty(H)&&h.hasOwnProperty(H)&&h[H]!=null)if(H==="style"){var E=h[H];for(b in E)E.hasOwnProperty(b)&&(i||(i={}),i[b]="")}else H!=="dangerouslySetInnerHTML"&&H!=="children"&&H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&H!=="autoFocus"&&(a.hasOwnProperty(H)?m||(m=[]):(m=m||[]).push(H,null));for(H in l){var j=l[H];if(E=h!=null?h[H]:void 0,l.hasOwnProperty(H)&&j!==E&&(j!=null||E!=null))if(H==="style")if(E){for(b in E)!E.hasOwnProperty(b)||j&&j.hasOwnProperty(b)||(i||(i={}),i[b]="");for(b in j)j.hasOwnProperty(b)&&E[b]!==j[b]&&(i||(i={}),i[b]=j[b])}else i||(m||(m=[]),m.push(H,i)),i=j;else H==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,E=E?E.__html:void 0,j!=null&&E!==j&&(m=m||[]).push(H,j)):H==="children"?typeof j!="string"&&typeof j!="number"||(m=m||[]).push(H,""+j):H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&(a.hasOwnProperty(H)?(j!=null&&H==="onScroll"&&Ye("scroll",n),m||E===j||(m=[])):(m=m||[]).push(H,j))}i&&(m=m||[]).push("style",i);var H=m;(s.updateQueue=H)&&(s.flags|=4)}},sg=function(n,s,i,l){i!==l&&(s.flags|=4)};function Ki(n,s){if(!tt)switch(n.tailMode){case"hidden":s=n.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?n.tail=null:i.sibling=null;break;case"collapsed":i=n.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function Ft(n){var s=n.alternate!==null&&n.alternate.child===n.child,i=0,l=0;if(s)for(var h=n.child;h!==null;)i|=h.lanes|h.childLanes,l|=h.subtreeFlags&14680064,l|=h.flags&14680064,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)i|=h.lanes|h.childLanes,l|=h.subtreeFlags,l|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=l,n.childLanes=i,s}function pS(n,s,i){var l=s.pendingProps;switch(Pu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ft(s),null;case 1:return sn(s.type)&&el(),Ft(s),null;case 3:return l=s.stateNode,Ro(),Xe(rn),Xe(Lt),Vu(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(ol(s)?s.flags|=4:n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Fn!==null&&(vd(Fn),Fn=null))),ad(n,s),Ft(s),null;case 5:Fu(s);var h=Rs(Vi.current);if(i=s.type,n!==null&&s.stateNode!=null)rg(n,s,i,l,h),n.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!l){if(s.stateNode===null)throw Error(r(166));return Ft(s),null}if(n=Rs(ar.current),ol(s)){l=s.stateNode,i=s.type;var m=s.memoizedProps;switch(l[ir]=s,l[Di]=m,n=(s.mode&1)!==0,i){case"dialog":Ye("cancel",l),Ye("close",l);break;case"iframe":case"object":case"embed":Ye("load",l);break;case"video":case"audio":for(h=0;h<Mi.length;h++)Ye(Mi[h],l);break;case"source":Ye("error",l);break;case"img":case"image":case"link":Ye("error",l),Ye("load",l);break;case"details":Ye("toggle",l);break;case"input":er(l,m),Ye("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!m.multiple},Ye("invalid",l);break;case"textarea":ht(l,m),Ye("invalid",l)}Je(i,m),h=null;for(var b in m)if(m.hasOwnProperty(b)){var E=m[b];b==="children"?typeof E=="string"?l.textContent!==E&&(m.suppressHydrationWarning!==!0&&Ja(l.textContent,E,n),h=["children",E]):typeof E=="number"&&l.textContent!==""+E&&(m.suppressHydrationWarning!==!0&&Ja(l.textContent,E,n),h=["children",""+E]):a.hasOwnProperty(b)&&E!=null&&b==="onScroll"&&Ye("scroll",l)}switch(i){case"input":ft(l),Cn(l,m,!0);break;case"textarea":ft(l),mo(l);break;case"select":case"option":break;default:typeof m.onClick=="function"&&(l.onclick=Ya)}l=h,s.updateQueue=l,l!==null&&(s.flags|=4)}else{b=h.nodeType===9?h:h.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=Nn(i)),n==="http://www.w3.org/1999/xhtml"?i==="script"?(n=b.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof l.is=="string"?n=b.createElement(i,{is:l.is}):(n=b.createElement(i),i==="select"&&(b=n,l.multiple?b.multiple=!0:l.size&&(b.size=l.size))):n=b.createElementNS(n,i),n[ir]=s,n[Di]=l,ng(n,s,!1,!1),s.stateNode=n;e:{switch(b=Ht(i,l),i){case"dialog":Ye("cancel",n),Ye("close",n),h=l;break;case"iframe":case"object":case"embed":Ye("load",n),h=l;break;case"video":case"audio":for(h=0;h<Mi.length;h++)Ye(Mi[h],n);h=l;break;case"source":Ye("error",n),h=l;break;case"img":case"image":case"link":Ye("error",n),Ye("load",n),h=l;break;case"details":Ye("toggle",n),h=l;break;case"input":er(n,l),h=nt(n,l),Ye("invalid",n);break;case"option":h=l;break;case"select":n._wrapperState={wasMultiple:!!l.multiple},h=I({},l,{value:void 0}),Ye("invalid",n);break;case"textarea":ht(n,l),h=Ct(n,l),Ye("invalid",n);break;default:h=l}Je(i,h),E=h;for(m in E)if(E.hasOwnProperty(m)){var j=E[m];m==="style"?et(n,j):m==="dangerouslySetInnerHTML"?(j=j?j.__html:void 0,j!=null&&F(n,j)):m==="children"?typeof j=="string"?(i!=="textarea"||j!=="")&&X(n,j):typeof j=="number"&&X(n,""+j):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(a.hasOwnProperty(m)?j!=null&&m==="onScroll"&&Ye("scroll",n):j!=null&&D(n,m,j,b))}switch(i){case"input":ft(n),Cn(n,l,!1);break;case"textarea":ft(n),mo(n);break;case"option":l.value!=null&&n.setAttribute("value",""+ve(l.value));break;case"select":n.multiple=!!l.multiple,m=l.value,m!=null?nr(n,!!l.multiple,m,!1):l.defaultValue!=null&&nr(n,!!l.multiple,l.defaultValue,!0);break;default:typeof h.onClick=="function"&&(n.onclick=Ya)}switch(i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Ft(s),null;case 6:if(n&&s.stateNode!=null)sg(n,s,n.memoizedProps,l);else{if(typeof l!="string"&&s.stateNode===null)throw Error(r(166));if(i=Rs(Vi.current),Rs(ar.current),ol(s)){if(l=s.stateNode,i=s.memoizedProps,l[ir]=s,(m=l.nodeValue!==i)&&(n=gn,n!==null))switch(n.tag){case 3:Ja(l.nodeValue,i,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Ja(l.nodeValue,i,(n.mode&1)!==0)}m&&(s.flags|=4)}else l=(i.nodeType===9?i:i.ownerDocument).createTextNode(l),l[ir]=s,s.stateNode=l}return Ft(s),null;case 13:if(Xe(rt),l=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(tt&&yn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)am(),Oo(),s.flags|=98560,m=!1;else if(m=ol(s),l!==null&&l.dehydrated!==null){if(n===null){if(!m)throw Error(r(318));if(m=s.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(r(317));m[ir]=s}else Oo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ft(s),m=!1}else Fn!==null&&(vd(Fn),Fn=null),m=!0;if(!m)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=i,s):(l=l!==null,l!==(n!==null&&n.memoizedState!==null)&&l&&(s.child.flags|=8192,(s.mode&1)!==0&&(n===null||(rt.current&1)!==0?xt===0&&(xt=3):bd())),s.updateQueue!==null&&(s.flags|=4),Ft(s),null);case 4:return Ro(),ad(n,s),n===null&&$i(s.stateNode.containerInfo),Ft(s),null;case 10:return $u(s.type._context),Ft(s),null;case 17:return sn(s.type)&&el(),Ft(s),null;case 19:if(Xe(rt),m=s.memoizedState,m===null)return Ft(s),null;if(l=(s.flags&128)!==0,b=m.rendering,b===null)if(l)Ki(m,!1);else{if(xt!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(b=dl(n),b!==null){for(s.flags|=128,Ki(m,!1),l=b.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),s.subtreeFlags=0,l=i,i=s.child;i!==null;)m=i,n=l,m.flags&=14680066,b=m.alternate,b===null?(m.childLanes=0,m.lanes=n,m.child=null,m.subtreeFlags=0,m.memoizedProps=null,m.memoizedState=null,m.updateQueue=null,m.dependencies=null,m.stateNode=null):(m.childLanes=b.childLanes,m.lanes=b.lanes,m.child=b.child,m.subtreeFlags=0,m.deletions=null,m.memoizedProps=b.memoizedProps,m.memoizedState=b.memoizedState,m.updateQueue=b.updateQueue,m.type=b.type,n=b.dependencies,m.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),i=i.sibling;return Ke(rt,rt.current&1|2),s.child}n=n.sibling}m.tail!==null&&ut()>Io&&(s.flags|=128,l=!0,Ki(m,!1),s.lanes=4194304)}else{if(!l)if(n=dl(b),n!==null){if(s.flags|=128,l=!0,i=n.updateQueue,i!==null&&(s.updateQueue=i,s.flags|=4),Ki(m,!0),m.tail===null&&m.tailMode==="hidden"&&!b.alternate&&!tt)return Ft(s),null}else 2*ut()-m.renderingStartTime>Io&&i!==1073741824&&(s.flags|=128,l=!0,Ki(m,!1),s.lanes=4194304);m.isBackwards?(b.sibling=s.child,s.child=b):(i=m.last,i!==null?i.sibling=b:s.child=b,m.last=b)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=ut(),s.sibling=null,i=rt.current,Ke(rt,l?i&1|2:i&1),s):(Ft(s),null);case 22:case 23:return xd(),l=s.memoizedState!==null,n!==null&&n.memoizedState!==null!==l&&(s.flags|=8192),l&&(s.mode&1)!==0?(vn&1073741824)!==0&&(Ft(s),s.subtreeFlags&6&&(s.flags|=8192)):Ft(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function hS(n,s){switch(Pu(s),s.tag){case 1:return sn(s.type)&&el(),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return Ro(),Xe(rn),Xe(Lt),Vu(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 5:return Fu(s),null;case 13:if(Xe(rt),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Oo()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return Xe(rt),null;case 4:return Ro(),null;case 10:return $u(s.type._context),null;case 22:case 23:return xd(),null;case 24:return null;default:return null}}var xl=!1,Ut=!1,mS=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Mo(n,s){var i=n.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(l){at(n,s,l)}else i.current=null}function ld(n,s,i){try{i()}catch(l){at(n,s,l)}}var og=!1;function gS(n,s){if(xu=Fa,n=Dh(),fu(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var h=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var b=0,E=-1,j=-1,H=0,te=0,ne=n,ee=null;t:for(;;){for(var ye;ne!==i||h!==0&&ne.nodeType!==3||(E=b+h),ne!==m||l!==0&&ne.nodeType!==3||(j=b+l),ne.nodeType===3&&(b+=ne.nodeValue.length),(ye=ne.firstChild)!==null;)ee=ne,ne=ye;for(;;){if(ne===n)break t;if(ee===i&&++H===h&&(E=b),ee===m&&++te===l&&(j=b),(ye=ne.nextSibling)!==null)break;ne=ee,ee=ne.parentNode}ne=ye}i=E===-1||j===-1?null:{start:E,end:j}}else i=null}i=i||{start:0,end:0}}else i=null;for(bu={focusedElem:n,selectionRange:i},Fa=!1,xe=s;xe!==null;)if(s=xe,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,xe=n;else for(;xe!==null;){s=xe;try{var be=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(be!==null){var Ce=be.memoizedProps,dt=be.memoizedState,V=s.stateNode,$=V.getSnapshotBeforeUpdate(s.elementType===s.type?Ce:Un(s.type,Ce),dt);V.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var B=s.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(le){at(s,s.return,le)}if(n=s.sibling,n!==null){n.return=s.return,xe=n;break}xe=s.return}return be=og,og=!1,be}function Qi(n,s,i){var l=s.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var h=l=l.next;do{if((h.tag&n)===n){var m=h.destroy;h.destroy=void 0,m!==void 0&&ld(s,i,m)}h=h.next}while(h!==l)}}function bl(n,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var i=s=s.next;do{if((i.tag&n)===n){var l=i.create;i.destroy=l()}i=i.next}while(i!==s)}}function cd(n){var s=n.ref;if(s!==null){var i=n.stateNode;switch(n.tag){case 5:n=i;break;default:n=i}typeof s=="function"?s(n):s.current=n}}function ig(n){var s=n.alternate;s!==null&&(n.alternate=null,ig(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&(delete s[ir],delete s[Di],delete s[Cu],delete s[Y1],delete s[X1])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function ag(n){return n.tag===5||n.tag===3||n.tag===4}function lg(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||ag(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function ud(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?i.nodeType===8?i.parentNode.insertBefore(n,s):i.insertBefore(n,s):(i.nodeType===8?(s=i.parentNode,s.insertBefore(n,i)):(s=i,s.appendChild(n)),i=i._reactRootContainer,i!=null||s.onclick!==null||(s.onclick=Ya));else if(l!==4&&(n=n.child,n!==null))for(ud(n,s,i),n=n.sibling;n!==null;)ud(n,s,i),n=n.sibling}function dd(n,s,i){var l=n.tag;if(l===5||l===6)n=n.stateNode,s?i.insertBefore(n,s):i.appendChild(n);else if(l!==4&&(n=n.child,n!==null))for(dd(n,s,i),n=n.sibling;n!==null;)dd(n,s,i),n=n.sibling}var At=null,Vn=!1;function ts(n,s,i){for(i=i.child;i!==null;)cg(n,s,i),i=i.sibling}function cg(n,s,i){if(or&&typeof or.onCommitFiberUnmount=="function")try{or.onCommitFiberUnmount(Ma,i)}catch{}switch(i.tag){case 5:Ut||Mo(i,s);case 6:var l=At,h=Vn;At=null,ts(n,s,i),At=l,Vn=h,At!==null&&(Vn?(n=At,i=i.stateNode,n.nodeType===8?n.parentNode.removeChild(i):n.removeChild(i)):At.removeChild(i.stateNode));break;case 18:At!==null&&(Vn?(n=At,i=i.stateNode,n.nodeType===8?_u(n.parentNode,i):n.nodeType===1&&_u(n,i),Ni(n)):_u(At,i.stateNode));break;case 4:l=At,h=Vn,At=i.stateNode.containerInfo,Vn=!0,ts(n,s,i),At=l,Vn=h;break;case 0:case 11:case 14:case 15:if(!Ut&&(l=i.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){h=l=l.next;do{var m=h,b=m.destroy;m=m.tag,b!==void 0&&((m&2)!==0||(m&4)!==0)&&ld(i,s,b),h=h.next}while(h!==l)}ts(n,s,i);break;case 1:if(!Ut&&(Mo(i,s),l=i.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=i.memoizedProps,l.state=i.memoizedState,l.componentWillUnmount()}catch(E){at(i,s,E)}ts(n,s,i);break;case 21:ts(n,s,i);break;case 22:i.mode&1?(Ut=(l=Ut)||i.memoizedState!==null,ts(n,s,i),Ut=l):ts(n,s,i);break;default:ts(n,s,i)}}function ug(n){var s=n.updateQueue;if(s!==null){n.updateQueue=null;var i=n.stateNode;i===null&&(i=n.stateNode=new mS),s.forEach(function(l){var h=CS.bind(null,n,l);i.has(l)||(i.add(l),l.then(h,h))})}}function Bn(n,s){var i=s.deletions;if(i!==null)for(var l=0;l<i.length;l++){var h=i[l];try{var m=n,b=s,E=b;e:for(;E!==null;){switch(E.tag){case 5:At=E.stateNode,Vn=!1;break e;case 3:At=E.stateNode.containerInfo,Vn=!0;break e;case 4:At=E.stateNode.containerInfo,Vn=!0;break e}E=E.return}if(At===null)throw Error(r(160));cg(m,b,h),At=null,Vn=!1;var j=h.alternate;j!==null&&(j.return=null),h.return=null}catch(H){at(h,s,H)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)dg(s,n),s=s.sibling}function dg(n,s){var i=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(Bn(s,n),cr(n),l&4){try{Qi(3,n,n.return),bl(3,n)}catch(Ce){at(n,n.return,Ce)}try{Qi(5,n,n.return)}catch(Ce){at(n,n.return,Ce)}}break;case 1:Bn(s,n),cr(n),l&512&&i!==null&&Mo(i,i.return);break;case 5:if(Bn(s,n),cr(n),l&512&&i!==null&&Mo(i,i.return),n.flags&32){var h=n.stateNode;try{X(h,"")}catch(Ce){at(n,n.return,Ce)}}if(l&4&&(h=n.stateNode,h!=null)){var m=n.memoizedProps,b=i!==null?i.memoizedProps:m,E=n.type,j=n.updateQueue;if(n.updateQueue=null,j!==null)try{E==="input"&&m.type==="radio"&&m.name!=null&&wr(h,m),Ht(E,b);var H=Ht(E,m);for(b=0;b<j.length;b+=2){var te=j[b],ne=j[b+1];te==="style"?et(h,ne):te==="dangerouslySetInnerHTML"?F(h,ne):te==="children"?X(h,ne):D(h,te,ne,H)}switch(E){case"input":nn(h,m);break;case"textarea":xr(h,m);break;case"select":var ee=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!m.multiple;var ye=m.value;ye!=null?nr(h,!!m.multiple,ye,!1):ee!==!!m.multiple&&(m.defaultValue!=null?nr(h,!!m.multiple,m.defaultValue,!0):nr(h,!!m.multiple,m.multiple?[]:"",!1))}h[Di]=m}catch(Ce){at(n,n.return,Ce)}}break;case 6:if(Bn(s,n),cr(n),l&4){if(n.stateNode===null)throw Error(r(162));h=n.stateNode,m=n.memoizedProps;try{h.nodeValue=m}catch(Ce){at(n,n.return,Ce)}}break;case 3:if(Bn(s,n),cr(n),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Ni(s.containerInfo)}catch(Ce){at(n,n.return,Ce)}break;case 4:Bn(s,n),cr(n);break;case 13:Bn(s,n),cr(n),h=n.child,h.flags&8192&&(m=h.memoizedState!==null,h.stateNode.isHidden=m,!m||h.alternate!==null&&h.alternate.memoizedState!==null||(hd=ut())),l&4&&ug(n);break;case 22:if(te=i!==null&&i.memoizedState!==null,n.mode&1?(Ut=(H=Ut)||te,Bn(s,n),Ut=H):Bn(s,n),cr(n),l&8192){if(H=n.memoizedState!==null,(n.stateNode.isHidden=H)&&!te&&(n.mode&1)!==0)for(xe=n,te=n.child;te!==null;){for(ne=xe=te;xe!==null;){switch(ee=xe,ye=ee.child,ee.tag){case 0:case 11:case 14:case 15:Qi(4,ee,ee.return);break;case 1:Mo(ee,ee.return);var be=ee.stateNode;if(typeof be.componentWillUnmount=="function"){l=ee,i=ee.return;try{s=l,be.props=s.memoizedProps,be.state=s.memoizedState,be.componentWillUnmount()}catch(Ce){at(l,i,Ce)}}break;case 5:Mo(ee,ee.return);break;case 22:if(ee.memoizedState!==null){hg(ne);continue}}ye!==null?(ye.return=ee,xe=ye):hg(ne)}te=te.sibling}e:for(te=null,ne=n;;){if(ne.tag===5){if(te===null){te=ne;try{h=ne.stateNode,H?(m=h.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none"):(E=ne.stateNode,j=ne.memoizedProps.style,b=j!=null&&j.hasOwnProperty("display")?j.display:null,E.style.display=Ee("display",b))}catch(Ce){at(n,n.return,Ce)}}}else if(ne.tag===6){if(te===null)try{ne.stateNode.nodeValue=H?"":ne.memoizedProps}catch(Ce){at(n,n.return,Ce)}}else if((ne.tag!==22&&ne.tag!==23||ne.memoizedState===null||ne===n)&&ne.child!==null){ne.child.return=ne,ne=ne.child;continue}if(ne===n)break e;for(;ne.sibling===null;){if(ne.return===null||ne.return===n)break e;te===ne&&(te=null),ne=ne.return}te===ne&&(te=null),ne.sibling.return=ne.return,ne=ne.sibling}}break;case 19:Bn(s,n),cr(n),l&4&&ug(n);break;case 21:break;default:Bn(s,n),cr(n)}}function cr(n){var s=n.flags;if(s&2){try{e:{for(var i=n.return;i!==null;){if(ag(i)){var l=i;break e}i=i.return}throw Error(r(160))}switch(l.tag){case 5:var h=l.stateNode;l.flags&32&&(X(h,""),l.flags&=-33);var m=lg(n);dd(n,m,h);break;case 3:case 4:var b=l.stateNode.containerInfo,E=lg(n);ud(n,E,b);break;default:throw Error(r(161))}}catch(j){at(n,n.return,j)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function yS(n,s,i){xe=n,fg(n)}function fg(n,s,i){for(var l=(n.mode&1)!==0;xe!==null;){var h=xe,m=h.child;if(h.tag===22&&l){var b=h.memoizedState!==null||xl;if(!b){var E=h.alternate,j=E!==null&&E.memoizedState!==null||Ut;E=xl;var H=Ut;if(xl=b,(Ut=j)&&!H)for(xe=h;xe!==null;)b=xe,j=b.child,b.tag===22&&b.memoizedState!==null?mg(h):j!==null?(j.return=b,xe=j):mg(h);for(;m!==null;)xe=m,fg(m),m=m.sibling;xe=h,xl=E,Ut=H}pg(n)}else(h.subtreeFlags&8772)!==0&&m!==null?(m.return=h,xe=m):pg(n)}}function pg(n){for(;xe!==null;){var s=xe;if((s.flags&8772)!==0){var i=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Ut||bl(5,s);break;case 1:var l=s.stateNode;if(s.flags&4&&!Ut)if(i===null)l.componentDidMount();else{var h=s.elementType===s.type?i.memoizedProps:Un(s.type,i.memoizedProps);l.componentDidUpdate(h,i.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var m=s.updateQueue;m!==null&&hm(s,m,l);break;case 3:var b=s.updateQueue;if(b!==null){if(i=null,s.child!==null)switch(s.child.tag){case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}hm(s,b,i)}break;case 5:var E=s.stateNode;if(i===null&&s.flags&4){i=E;var j=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":j.autoFocus&&i.focus();break;case"img":j.src&&(i.src=j.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var H=s.alternate;if(H!==null){var te=H.memoizedState;if(te!==null){var ne=te.dehydrated;ne!==null&&Ni(ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Ut||s.flags&512&&cd(s)}catch(ee){at(s,s.return,ee)}}if(s===n){xe=null;break}if(i=s.sibling,i!==null){i.return=s.return,xe=i;break}xe=s.return}}function hg(n){for(;xe!==null;){var s=xe;if(s===n){xe=null;break}var i=s.sibling;if(i!==null){i.return=s.return,xe=i;break}xe=s.return}}function mg(n){for(;xe!==null;){var s=xe;try{switch(s.tag){case 0:case 11:case 15:var i=s.return;try{bl(4,s)}catch(j){at(s,i,j)}break;case 1:var l=s.stateNode;if(typeof l.componentDidMount=="function"){var h=s.return;try{l.componentDidMount()}catch(j){at(s,h,j)}}var m=s.return;try{cd(s)}catch(j){at(s,m,j)}break;case 5:var b=s.return;try{cd(s)}catch(j){at(s,b,j)}}}catch(j){at(s,s.return,j)}if(s===n){xe=null;break}var E=s.sibling;if(E!==null){E.return=s.return,xe=E;break}xe=s.return}}var vS=Math.ceil,Sl=T.ReactCurrentDispatcher,fd=T.ReactCurrentOwner,Rn=T.ReactCurrentBatchConfig,Ve=0,Pt=null,gt=null,Mt=0,vn=0,$o=Zr(0),xt=0,Gi=null,Ms=0,kl=0,pd=0,Zi=null,an=null,hd=0,Io=1/0,Pr=null,_l=!1,md=null,ns=null,Cl=!1,rs=null,Nl=0,Ji=0,gd=null,El=-1,Ol=0;function Kt(){return(Ve&6)!==0?ut():El!==-1?El:El=ut()}function ss(n){return(n.mode&1)===0?1:(Ve&2)!==0&&Mt!==0?Mt&-Mt:tS.transition!==null?(Ol===0&&(Ol=lh()),Ol):(n=qe,n!==0||(n=window.event,n=n===void 0?16:yh(n.type)),n)}function Wn(n,s,i,l){if(50<Ji)throw Ji=0,gd=null,Error(r(185));bi(n,i,l),((Ve&2)===0||n!==Pt)&&(n===Pt&&((Ve&2)===0&&(kl|=i),xt===4&&os(n,Mt)),ln(n,l),i===1&&Ve===0&&(s.mode&1)===0&&(Io=ut()+500,nl&&Yr()))}function ln(n,s){var i=n.callbackNode;t1(n,s);var l=Da(n,n===Pt?Mt:0);if(l===0)i!==null&&oh(i),n.callbackNode=null,n.callbackPriority=0;else if(s=l&-l,n.callbackPriority!==s){if(i!=null&&oh(i),s===1)n.tag===0?eS(yg.bind(null,n)):nm(yg.bind(null,n)),Z1(function(){(Ve&6)===0&&Yr()}),i=null;else{switch(ch(l)){case 1:i=Gc;break;case 4:i=ih;break;case 16:i=Aa;break;case 536870912:i=ah;break;default:i=Aa}i=Cg(i,gg.bind(null,n))}n.callbackPriority=s,n.callbackNode=i}}function gg(n,s){if(El=-1,Ol=0,(Ve&6)!==0)throw Error(r(327));var i=n.callbackNode;if(Do()&&n.callbackNode!==i)return null;var l=Da(n,n===Pt?Mt:0);if(l===0)return null;if((l&30)!==0||(l&n.expiredLanes)!==0||s)s=Pl(n,l);else{s=l;var h=Ve;Ve|=2;var m=wg();(Pt!==n||Mt!==s)&&(Pr=null,Io=ut()+500,Is(n,s));do try{bS();break}catch(E){vg(n,E)}while(!0);Mu(),Sl.current=m,Ve=h,gt!==null?s=0:(Pt=null,Mt=0,s=xt)}if(s!==0){if(s===2&&(h=Zc(n),h!==0&&(l=h,s=yd(n,h))),s===1)throw i=Gi,Is(n,0),os(n,l),ln(n,ut()),i;if(s===6)os(n,l);else{if(h=n.current.alternate,(l&30)===0&&!wS(h)&&(s=Pl(n,l),s===2&&(m=Zc(n),m!==0&&(l=m,s=yd(n,m))),s===1))throw i=Gi,Is(n,0),os(n,l),ln(n,ut()),i;switch(n.finishedWork=h,n.finishedLanes=l,s){case 0:case 1:throw Error(r(345));case 2:Ds(n,an,Pr);break;case 3:if(os(n,l),(l&130023424)===l&&(s=hd+500-ut(),10<s)){if(Da(n,0)!==0)break;if(h=n.suspendedLanes,(h&l)!==l){Kt(),n.pingedLanes|=n.suspendedLanes&h;break}n.timeoutHandle=ku(Ds.bind(null,n,an,Pr),s);break}Ds(n,an,Pr);break;case 4:if(os(n,l),(l&4194240)===l)break;for(s=n.eventTimes,h=-1;0<l;){var b=31-Ln(l);m=1<<b,b=s[b],b>h&&(h=b),l&=~m}if(l=h,l=ut()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*vS(l/1960))-l,10<l){n.timeoutHandle=ku(Ds.bind(null,n,an,Pr),l);break}Ds(n,an,Pr);break;case 5:Ds(n,an,Pr);break;default:throw Error(r(329))}}}return ln(n,ut()),n.callbackNode===i?gg.bind(null,n):null}function yd(n,s){var i=Zi;return n.current.memoizedState.isDehydrated&&(Is(n,s).flags|=256),n=Pl(n,s),n!==2&&(s=an,an=i,s!==null&&vd(s)),n}function vd(n){an===null?an=n:an.push.apply(an,n)}function wS(n){for(var s=n;;){if(s.flags&16384){var i=s.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var l=0;l<i.length;l++){var h=i[l],m=h.getSnapshot;h=h.value;try{if(!zn(m(),h))return!1}catch{return!1}}}if(i=s.child,s.subtreeFlags&16384&&i!==null)i.return=s,s=i;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function os(n,s){for(s&=~pd,s&=~kl,n.suspendedLanes|=s,n.pingedLanes&=~s,n=n.expirationTimes;0<s;){var i=31-Ln(s),l=1<<i;n[i]=-1,s&=~l}}function yg(n){if((Ve&6)!==0)throw Error(r(327));Do();var s=Da(n,0);if((s&1)===0)return ln(n,ut()),null;var i=Pl(n,s);if(n.tag!==0&&i===2){var l=Zc(n);l!==0&&(s=l,i=yd(n,l))}if(i===1)throw i=Gi,Is(n,0),os(n,s),ln(n,ut()),i;if(i===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=s,Ds(n,an,Pr),ln(n,ut()),null}function wd(n,s){var i=Ve;Ve|=1;try{return n(s)}finally{Ve=i,Ve===0&&(Io=ut()+500,nl&&Yr())}}function $s(n){rs!==null&&rs.tag===0&&(Ve&6)===0&&Do();var s=Ve;Ve|=1;var i=Rn.transition,l=qe;try{if(Rn.transition=null,qe=1,n)return n()}finally{qe=l,Rn.transition=i,Ve=s,(Ve&6)===0&&Yr()}}function xd(){vn=$o.current,Xe($o)}function Is(n,s){n.finishedWork=null,n.finishedLanes=0;var i=n.timeoutHandle;if(i!==-1&&(n.timeoutHandle=-1,G1(i)),gt!==null)for(i=gt.return;i!==null;){var l=i;switch(Pu(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&el();break;case 3:Ro(),Xe(rn),Xe(Lt),Vu();break;case 5:Fu(l);break;case 4:Ro();break;case 13:Xe(rt);break;case 19:Xe(rt);break;case 10:$u(l.type._context);break;case 22:case 23:xd()}i=i.return}if(Pt=n,gt=n=is(n.current,null),Mt=vn=s,xt=0,Gi=null,pd=kl=Ms=0,an=Zi=null,Ts!==null){for(s=0;s<Ts.length;s++)if(i=Ts[s],l=i.interleaved,l!==null){i.interleaved=null;var h=l.next,m=i.pending;if(m!==null){var b=m.next;m.next=h,l.next=b}i.pending=l}Ts=null}return n}function vg(n,s){do{var i=gt;try{if(Mu(),fl.current=gl,pl){for(var l=st.memoizedState;l!==null;){var h=l.queue;h!==null&&(h.pending=null),l=l.next}pl=!1}if(As=0,Ot=wt=st=null,Bi=!1,Wi=0,fd.current=null,i===null||i.return===null){xt=1,Gi=s,gt=null;break}e:{var m=n,b=i.return,E=i,j=s;if(s=Mt,E.flags|=32768,j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=j,te=E,ne=te.tag;if((te.mode&1)===0&&(ne===0||ne===11||ne===15)){var ee=te.alternate;ee?(te.updateQueue=ee.updateQueue,te.memoizedState=ee.memoizedState,te.lanes=ee.lanes):(te.updateQueue=null,te.memoizedState=null)}var ye=Bm(b);if(ye!==null){ye.flags&=-257,Wm(ye,b,E,m,s),ye.mode&1&&Vm(m,H,s),s=ye,j=H;var be=s.updateQueue;if(be===null){var Ce=new Set;Ce.add(j),s.updateQueue=Ce}else be.add(j);break e}else{if((s&1)===0){Vm(m,H,s),bd();break e}j=Error(r(426))}}else if(tt&&E.mode&1){var dt=Bm(b);if(dt!==null){(dt.flags&65536)===0&&(dt.flags|=256),Wm(dt,b,E,m,s),Ru(Ao(j,E));break e}}m=j=Ao(j,E),xt!==4&&(xt=2),Zi===null?Zi=[m]:Zi.push(m),m=b;do{switch(m.tag){case 3:m.flags|=65536,s&=-s,m.lanes|=s;var V=Fm(m,j,s);pm(m,V);break e;case 1:E=j;var $=m.type,B=m.stateNode;if((m.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(ns===null||!ns.has(B)))){m.flags|=65536,s&=-s,m.lanes|=s;var le=Um(m,E,s);pm(m,le);break e}}m=m.return}while(m!==null)}bg(i)}catch(Ne){s=Ne,gt===i&&i!==null&&(gt=i=i.return);continue}break}while(!0)}function wg(){var n=Sl.current;return Sl.current=gl,n===null?gl:n}function bd(){(xt===0||xt===3||xt===2)&&(xt=4),Pt===null||(Ms&268435455)===0&&(kl&268435455)===0||os(Pt,Mt)}function Pl(n,s){var i=Ve;Ve|=2;var l=wg();(Pt!==n||Mt!==s)&&(Pr=null,Is(n,s));do try{xS();break}catch(h){vg(n,h)}while(!0);if(Mu(),Ve=i,Sl.current=l,gt!==null)throw Error(r(261));return Pt=null,Mt=0,xt}function xS(){for(;gt!==null;)xg(gt)}function bS(){for(;gt!==null&&!qb();)xg(gt)}function xg(n){var s=_g(n.alternate,n,vn);n.memoizedProps=n.pendingProps,s===null?bg(n):gt=s,fd.current=null}function bg(n){var s=n;do{var i=s.alternate;if(n=s.return,(s.flags&32768)===0){if(i=pS(i,s,vn),i!==null){gt=i;return}}else{if(i=hS(i,s),i!==null){i.flags&=32767,gt=i;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{xt=6,gt=null;return}}if(s=s.sibling,s!==null){gt=s;return}gt=s=n}while(s!==null);xt===0&&(xt=5)}function Ds(n,s,i){var l=qe,h=Rn.transition;try{Rn.transition=null,qe=1,SS(n,s,i,l)}finally{Rn.transition=h,qe=l}return null}function SS(n,s,i,l){do Do();while(rs!==null);if((Ve&6)!==0)throw Error(r(327));i=n.finishedWork;var h=n.finishedLanes;if(i===null)return null;if(n.finishedWork=null,n.finishedLanes=0,i===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var m=i.lanes|i.childLanes;if(n1(n,m),n===Pt&&(gt=Pt=null,Mt=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||Cl||(Cl=!0,Cg(Aa,function(){return Do(),null})),m=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||m){m=Rn.transition,Rn.transition=null;var b=qe;qe=1;var E=Ve;Ve|=4,fd.current=null,gS(n,i),dg(i,n),V1(bu),Fa=!!xu,bu=xu=null,n.current=i,yS(i),Kb(),Ve=E,qe=b,Rn.transition=m}else n.current=i;if(Cl&&(Cl=!1,rs=n,Nl=h),m=n.pendingLanes,m===0&&(ns=null),Zb(i.stateNode),ln(n,ut()),s!==null)for(l=n.onRecoverableError,i=0;i<s.length;i++)h=s[i],l(h.value,{componentStack:h.stack,digest:h.digest});if(_l)throw _l=!1,n=md,md=null,n;return(Nl&1)!==0&&n.tag!==0&&Do(),m=n.pendingLanes,(m&1)!==0?n===gd?Ji++:(Ji=0,gd=n):Ji=0,Yr(),null}function Do(){if(rs!==null){var n=ch(Nl),s=Rn.transition,i=qe;try{if(Rn.transition=null,qe=16>n?16:n,rs===null)var l=!1;else{if(n=rs,rs=null,Nl=0,(Ve&6)!==0)throw Error(r(331));var h=Ve;for(Ve|=4,xe=n.current;xe!==null;){var m=xe,b=m.child;if((xe.flags&16)!==0){var E=m.deletions;if(E!==null){for(var j=0;j<E.length;j++){var H=E[j];for(xe=H;xe!==null;){var te=xe;switch(te.tag){case 0:case 11:case 15:Qi(8,te,m)}var ne=te.child;if(ne!==null)ne.return=te,xe=ne;else for(;xe!==null;){te=xe;var ee=te.sibling,ye=te.return;if(ig(te),te===H){xe=null;break}if(ee!==null){ee.return=ye,xe=ee;break}xe=ye}}}var be=m.alternate;if(be!==null){var Ce=be.child;if(Ce!==null){be.child=null;do{var dt=Ce.sibling;Ce.sibling=null,Ce=dt}while(Ce!==null)}}xe=m}}if((m.subtreeFlags&2064)!==0&&b!==null)b.return=m,xe=b;else e:for(;xe!==null;){if(m=xe,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:Qi(9,m,m.return)}var V=m.sibling;if(V!==null){V.return=m.return,xe=V;break e}xe=m.return}}var $=n.current;for(xe=$;xe!==null;){b=xe;var B=b.child;if((b.subtreeFlags&2064)!==0&&B!==null)B.return=b,xe=B;else e:for(b=$;xe!==null;){if(E=xe,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:bl(9,E)}}catch(Ne){at(E,E.return,Ne)}if(E===b){xe=null;break e}var le=E.sibling;if(le!==null){le.return=E.return,xe=le;break e}xe=E.return}}if(Ve=h,Yr(),or&&typeof or.onPostCommitFiberRoot=="function")try{or.onPostCommitFiberRoot(Ma,n)}catch{}l=!0}return l}finally{qe=i,Rn.transition=s}}return!1}function Sg(n,s,i){s=Ao(i,s),s=Fm(n,s,1),n=es(n,s,1),s=Kt(),n!==null&&(bi(n,1,s),ln(n,s))}function at(n,s,i){if(n.tag===3)Sg(n,n,i);else for(;s!==null;){if(s.tag===3){Sg(s,n,i);break}else if(s.tag===1){var l=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ns===null||!ns.has(l))){n=Ao(i,n),n=Um(s,n,1),s=es(s,n,1),n=Kt(),s!==null&&(bi(s,1,n),ln(s,n));break}}s=s.return}}function kS(n,s,i){var l=n.pingCache;l!==null&&l.delete(s),s=Kt(),n.pingedLanes|=n.suspendedLanes&i,Pt===n&&(Mt&i)===i&&(xt===4||xt===3&&(Mt&130023424)===Mt&&500>ut()-hd?Is(n,0):pd|=i),ln(n,s)}function kg(n,s){s===0&&((n.mode&1)===0?s=1:(s=Ia,Ia<<=1,(Ia&130023424)===0&&(Ia=4194304)));var i=Kt();n=Nr(n,s),n!==null&&(bi(n,s,i),ln(n,i))}function _S(n){var s=n.memoizedState,i=0;s!==null&&(i=s.retryLane),kg(n,i)}function CS(n,s){var i=0;switch(n.tag){case 13:var l=n.stateNode,h=n.memoizedState;h!==null&&(i=h.retryLane);break;case 19:l=n.stateNode;break;default:throw Error(r(314))}l!==null&&l.delete(s),kg(n,i)}var _g;_g=function(n,s,i){if(n!==null)if(n.memoizedProps!==s.pendingProps||rn.current)on=!0;else{if((n.lanes&i)===0&&(s.flags&128)===0)return on=!1,fS(n,s,i);on=(n.flags&131072)!==0}else on=!1,tt&&(s.flags&1048576)!==0&&rm(s,sl,s.index);switch(s.lanes=0,s.tag){case 2:var l=s.type;wl(n,s),n=s.pendingProps;var h=Co(s,Lt.current);To(s,i),h=Hu(null,s,l,n,h,i);var m=qu();return s.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,sn(l)?(m=!0,tl(s)):m=!1,s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Lu(s),h.updater=yl,s.stateNode=h,h._reactInternals=s,Yu(s,l,n,i),s=nd(null,s,l,!0,m,i)):(s.tag=0,tt&&m&&Ou(s),qt(null,s,h,i),s=s.child),s;case 16:l=s.elementType;e:{switch(wl(n,s),n=s.pendingProps,h=l._init,l=h(l._payload),s.type=l,h=s.tag=ES(l),n=Un(l,n),h){case 0:s=td(null,s,l,n,i);break e;case 1:s=Zm(null,s,l,n,i);break e;case 11:s=Hm(null,s,l,n,i);break e;case 14:s=qm(null,s,l,Un(l.type,n),i);break e}throw Error(r(306,l,""))}return s;case 0:return l=s.type,h=s.pendingProps,h=s.elementType===l?h:Un(l,h),td(n,s,l,h,i);case 1:return l=s.type,h=s.pendingProps,h=s.elementType===l?h:Un(l,h),Zm(n,s,l,h,i);case 3:e:{if(Jm(s),n===null)throw Error(r(387));l=s.pendingProps,m=s.memoizedState,h=m.element,fm(n,s),ul(s,l,null,i);var b=s.memoizedState;if(l=b.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},s.updateQueue.baseState=m,s.memoizedState=m,s.flags&256){h=Ao(Error(r(423)),s),s=Ym(n,s,l,i,h);break e}else if(l!==h){h=Ao(Error(r(424)),s),s=Ym(n,s,l,i,h);break e}else for(yn=Gr(s.stateNode.containerInfo.firstChild),gn=s,tt=!0,Fn=null,i=um(s,null,l,i),s.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Oo(),l===h){s=Or(n,s,i);break e}qt(n,s,l,i)}s=s.child}return s;case 5:return mm(s),n===null&&Tu(s),l=s.type,h=s.pendingProps,m=n!==null?n.memoizedProps:null,b=h.children,Su(l,h)?b=null:m!==null&&Su(l,m)&&(s.flags|=32),Gm(n,s),qt(n,s,b,i),s.child;case 6:return n===null&&Tu(s),null;case 13:return Xm(n,s,i);case 4:return zu(s,s.stateNode.containerInfo),l=s.pendingProps,n===null?s.child=Po(s,null,l,i):qt(n,s,l,i),s.child;case 11:return l=s.type,h=s.pendingProps,h=s.elementType===l?h:Un(l,h),Hm(n,s,l,h,i);case 7:return qt(n,s,s.pendingProps,i),s.child;case 8:return qt(n,s,s.pendingProps.children,i),s.child;case 12:return qt(n,s,s.pendingProps.children,i),s.child;case 10:e:{if(l=s.type._context,h=s.pendingProps,m=s.memoizedProps,b=h.value,Ke(al,l._currentValue),l._currentValue=b,m!==null)if(zn(m.value,b)){if(m.children===h.children&&!rn.current){s=Or(n,s,i);break e}}else for(m=s.child,m!==null&&(m.return=s);m!==null;){var E=m.dependencies;if(E!==null){b=m.child;for(var j=E.firstContext;j!==null;){if(j.context===l){if(m.tag===1){j=Er(-1,i&-i),j.tag=2;var H=m.updateQueue;if(H!==null){H=H.shared;var te=H.pending;te===null?j.next=j:(j.next=te.next,te.next=j),H.pending=j}}m.lanes|=i,j=m.alternate,j!==null&&(j.lanes|=i),Iu(m.return,i,s),E.lanes|=i;break}j=j.next}}else if(m.tag===10)b=m.type===s.type?null:m.child;else if(m.tag===18){if(b=m.return,b===null)throw Error(r(341));b.lanes|=i,E=b.alternate,E!==null&&(E.lanes|=i),Iu(b,i,s),b=m.sibling}else b=m.child;if(b!==null)b.return=m;else for(b=m;b!==null;){if(b===s){b=null;break}if(m=b.sibling,m!==null){m.return=b.return,b=m;break}b=b.return}m=b}qt(n,s,h.children,i),s=s.child}return s;case 9:return h=s.type,l=s.pendingProps.children,To(s,i),h=jn(h),l=l(h),s.flags|=1,qt(n,s,l,i),s.child;case 14:return l=s.type,h=Un(l,s.pendingProps),h=Un(l.type,h),qm(n,s,l,h,i);case 15:return Km(n,s,s.type,s.pendingProps,i);case 17:return l=s.type,h=s.pendingProps,h=s.elementType===l?h:Un(l,h),wl(n,s),s.tag=1,sn(l)?(n=!0,tl(s)):n=!1,To(s,i),Lm(s,l,h),Yu(s,l,h,i),nd(null,s,l,!0,n,i);case 19:return tg(n,s,i);case 22:return Qm(n,s,i)}throw Error(r(156,s.tag))};function Cg(n,s){return sh(n,s)}function NS(n,s,i,l){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(n,s,i,l){return new NS(n,s,i,l)}function Sd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function ES(n){if(typeof n=="function")return Sd(n)?1:0;if(n!=null){if(n=n.$$typeof,n===ge)return 11;if(n===fe)return 14}return 2}function is(n,s){var i=n.alternate;return i===null?(i=An(n.tag,s,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=s,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&14680064,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,s=n.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i}function jl(n,s,i,l,h,m){var b=2;if(l=n,typeof n=="function")Sd(n)&&(b=1);else if(typeof n=="string")b=5;else e:switch(n){case A:return Ls(i.children,h,m,s);case M:b=8,h|=8;break;case Y:return n=An(12,i,s,h|2),n.elementType=Y,n.lanes=m,n;case de:return n=An(13,i,s,h),n.elementType=de,n.lanes=m,n;case ce:return n=An(19,i,s,h),n.elementType=ce,n.lanes=m,n;case re:return Tl(i,h,m,s);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case W:b=10;break e;case oe:b=9;break e;case ge:b=11;break e;case fe:b=14;break e;case J:b=16,l=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return s=An(b,i,s,h),s.elementType=n,s.type=l,s.lanes=m,s}function Ls(n,s,i,l){return n=An(7,n,l,s),n.lanes=i,n}function Tl(n,s,i,l){return n=An(22,n,l,s),n.elementType=re,n.lanes=i,n.stateNode={isHidden:!1},n}function kd(n,s,i){return n=An(6,n,null,s),n.lanes=i,n}function _d(n,s,i){return s=An(4,n.children!==null?n.children:[],n.key,s),s.lanes=i,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}function OS(n,s,i,l,h){this.tag=s,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jc(0),this.expirationTimes=Jc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jc(0),this.identifierPrefix=l,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function Cd(n,s,i,l,h,m,b,E,j){return n=new OS(n,s,i,E,j),s===1?(s=1,m===!0&&(s|=8)):s=0,m=An(3,null,null,s),n.current=m,m.stateNode=n,m.memoizedState={element:l,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lu(m),n}function PS(n,s,i){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:q,key:l==null?null:""+l,children:n,containerInfo:s,implementation:i}}function Ng(n){if(!n)return Jr;n=n._reactInternals;e:{if(Ns(n)!==n||n.tag!==1)throw Error(r(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(sn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(n.tag===1){var i=n.type;if(sn(i))return em(n,i,s)}return s}function Eg(n,s,i,l,h,m,b,E,j){return n=Cd(i,l,!0,n,h,m,b,E,j),n.context=Ng(null),i=n.current,l=Kt(),h=ss(i),m=Er(l,h),m.callback=s??null,es(i,m,h),n.current.lanes=h,bi(n,h,l),ln(n,l),n}function Rl(n,s,i,l){var h=s.current,m=Kt(),b=ss(h);return i=Ng(i),s.context===null?s.context=i:s.pendingContext=i,s=Er(m,b),s.payload={element:n},l=l===void 0?null:l,l!==null&&(s.callback=l),n=es(h,s,b),n!==null&&(Wn(n,h,b,m),cl(n,h,b)),b}function Al(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Og(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var i=n.retryLane;n.retryLane=i!==0&&i<s?i:s}}function Nd(n,s){Og(n,s),(n=n.alternate)&&Og(n,s)}function jS(){return null}var Pg=typeof reportError=="function"?reportError:function(n){console.error(n)};function Ed(n){this._internalRoot=n}Ml.prototype.render=Ed.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(r(409));Rl(n,s,null,null)},Ml.prototype.unmount=Ed.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;$s(function(){Rl(null,n,null,null)}),s[Sr]=null}};function Ml(n){this._internalRoot=n}Ml.prototype.unstable_scheduleHydration=function(n){if(n){var s=fh();n={blockedOn:null,target:n,priority:s};for(var i=0;i<qr.length&&s!==0&&s<qr[i].priority;i++);qr.splice(i,0,n),i===0&&mh(n)}};function Od(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function $l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function jg(){}function TS(n,s,i,l,h){if(h){if(typeof l=="function"){var m=l;l=function(){var H=Al(b);m.call(H)}}var b=Eg(s,l,n,0,null,!1,!1,"",jg);return n._reactRootContainer=b,n[Sr]=b.current,$i(n.nodeType===8?n.parentNode:n),$s(),b}for(;h=n.lastChild;)n.removeChild(h);if(typeof l=="function"){var E=l;l=function(){var H=Al(j);E.call(H)}}var j=Cd(n,0,!1,null,null,!1,!1,"",jg);return n._reactRootContainer=j,n[Sr]=j.current,$i(n.nodeType===8?n.parentNode:n),$s(function(){Rl(s,j,i,l)}),j}function Il(n,s,i,l,h){var m=i._reactRootContainer;if(m){var b=m;if(typeof h=="function"){var E=h;h=function(){var j=Al(b);E.call(j)}}Rl(s,b,n,h)}else b=TS(i,s,n,h,l);return Al(b)}uh=function(n){switch(n.tag){case 3:var s=n.stateNode;if(s.current.memoizedState.isDehydrated){var i=xi(s.pendingLanes);i!==0&&(Yc(s,i|1),ln(s,ut()),(Ve&6)===0&&(Io=ut()+500,Yr()))}break;case 13:$s(function(){var l=Nr(n,1);if(l!==null){var h=Kt();Wn(l,n,1,h)}}),Nd(n,1)}},Xc=function(n){if(n.tag===13){var s=Nr(n,134217728);if(s!==null){var i=Kt();Wn(s,n,134217728,i)}Nd(n,134217728)}},dh=function(n){if(n.tag===13){var s=ss(n),i=Nr(n,s);if(i!==null){var l=Kt();Wn(i,n,s,l)}Nd(n,s)}},fh=function(){return qe},ph=function(n,s){var i=qe;try{return qe=n,s()}finally{qe=i}},sr=function(n,s,i){switch(s){case"input":if(nn(n,i),s=i.name,i.type==="radio"&&s!=null){for(i=n;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<i.length;s++){var l=i[s];if(l!==n&&l.form===n.form){var h=Xa(l);if(!h)throw Error(r(90));ot(l),nn(l,h)}}}break;case"textarea":xr(n,i);break;case"select":s=i.value,s!=null&&nr(n,!!i.multiple,s,!1)}},vt=wd,Dt=$s;var RS={usingClientEntryPoint:!1,Events:[Li,ko,Xa,Ie,ct,wd]},Yi={findFiberByHostInstance:Es,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},AS={bundleType:Yi.bundleType,version:Yi.version,rendererPackageName:Yi.rendererPackageName,rendererConfig:Yi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=nh(n),n===null?null:n.stateNode},findFiberByHostInstance:Yi.findFiberByHostInstance||jS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dl.isDisabled&&Dl.supportsFiber)try{Ma=Dl.inject(AS),or=Dl}catch{}}return cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RS,cn.createPortal=function(n,s){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Od(s))throw Error(r(200));return PS(n,s,null,i)},cn.createRoot=function(n,s){if(!Od(n))throw Error(r(299));var i=!1,l="",h=Pg;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onRecoverableError!==void 0&&(h=s.onRecoverableError)),s=Cd(n,1,!1,null,null,i,!1,l,h),n[Sr]=s.current,$i(n.nodeType===8?n.parentNode:n),new Ed(s)},cn.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=nh(s),n=n===null?null:n.stateNode,n},cn.flushSync=function(n){return $s(n)},cn.hydrate=function(n,s,i){if(!$l(s))throw Error(r(200));return Il(null,n,s,!0,i)},cn.hydrateRoot=function(n,s,i){if(!Od(n))throw Error(r(405));var l=i!=null&&i.hydratedSources||null,h=!1,m="",b=Pg;if(i!=null&&(i.unstable_strictMode===!0&&(h=!0),i.identifierPrefix!==void 0&&(m=i.identifierPrefix),i.onRecoverableError!==void 0&&(b=i.onRecoverableError)),s=Eg(s,null,n,1,i??null,h,!1,m,b),n[Sr]=s.current,$i(n),l)for(n=0;n<l.length;n++)i=l[n],h=i._getVersion,h=h(i._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[i,h]:s.mutableSourceEagerHydrationData.push(i,h);return new Ml(s)},cn.render=function(n,s,i){if(!$l(s))throw Error(r(200));return Il(null,n,s,!1,i)},cn.unmountComponentAtNode=function(n){if(!$l(n))throw Error(r(40));return n._reactRootContainer?($s(function(){Il(null,null,n,!1,function(){n._reactRootContainer=null,n[Sr]=null})}),!0):!1},cn.unstable_batchedUpdates=wd,cn.unstable_renderSubtreeIntoContainer=function(n,s,i,l){if(!$l(i))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return Il(n,s,i,!1,l)},cn.version="18.3.1-next-f1338f8080-20240426",cn}var Fg;function Cv(){if(Fg)return Rd.exports;Fg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rd.exports=BS(),Rd.exports}var Ug;function WS(){if(Ug)return zl;Ug=1;var e=Cv();return zl.createRoot=e.createRoot,zl.hydrateRoot=e.hydrateRoot,zl}var HS=WS();const qS=Qf(HS);var Zf=Cv();const Nv=Qf(Zf);function KS(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const QS=e=>{switch(e){case"success":return JS;case"info":return XS;case"warning":return YS;case"error":return ek;default:return null}},GS=Array(12).fill(0),ZS=({visible:e,className:t})=>ae.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ae.createElement("div",{className:"sonner-spinner"},GS.map((r,o)=>ae.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),JS=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),YS=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ae.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"})),XS=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),ek=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.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"})),tk=ae.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"},ae.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ae.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),nk=()=>{const[e,t]=ae.useState(document.hidden);return ae.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let rf=1;class rk{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:o,...a}=t,c=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:rf++,d=this.toasts.find(g=>g.id===c),p=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),d?this.toasts=this.toasts.map(g=>g.id===c?(this.publish({...g,...t,id:c,title:o}),{...g,...t,id:c,dismissible:p,title:o}):g):this.addToast({title:o,...a,dismissible:p,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let c=o!==void 0,d;const p=a.then(async v=>{if(d=["resolve",v],ae.isValidElement(v))c=!1,this.create({id:o,type:"default",message:v});else if(ok(v)&&!v.ok){c=!1;const f=typeof r.error=="function"?await r.error(`HTTP error! status: ${v.status}`):r.error,x=typeof r.description=="function"?await r.description(`HTTP error! status: ${v.status}`):r.description,N=typeof f=="object"&&!ae.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:x,...N})}else if(v instanceof Error){c=!1;const f=typeof r.error=="function"?await r.error(v):r.error,x=typeof r.description=="function"?await r.description(v):r.description,N=typeof f=="object"&&!ae.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:x,...N})}else if(r.success!==void 0){c=!1;const f=typeof r.success=="function"?await r.success(v):r.success,x=typeof r.description=="function"?await r.description(v):r.description,N=typeof f=="object"&&!ae.isValidElement(f)?f:{message:f};this.create({id:o,type:"success",description:x,...N})}}).catch(async v=>{if(d=["reject",v],r.error!==void 0){c=!1;const w=typeof r.error=="function"?await r.error(v):r.error,f=typeof r.description=="function"?await r.description(v):r.description,S=typeof w=="object"&&!ae.isValidElement(w)?w:{message:w};this.create({id:o,type:"error",description:f,...S})}}).finally(()=>{c&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((v,w)=>p.then(()=>d[0]==="reject"?w(d[1]):v(d[1])).catch(w));return typeof o!="string"&&typeof o!="number"?{unwrap:g}:Object.assign(o,{unwrap:g})},this.custom=(t,r)=>{const o=(r==null?void 0:r.id)||rf++;return this.create({jsx:t(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const fn=new rk,sk=(e,t)=>{const r=(t==null?void 0:t.id)||rf++;return fn.addToast({title:e,...t,id:r}),r},ok=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ik=sk,ak=()=>fn.toasts,lk=()=>fn.getActiveToasts(),ac=Object.assign(ik,{success:fn.success,info:fn.info,warning:fn.warning,error:fn.error,custom:fn.custom,message:fn.message,promise:fn.promise,dismiss:fn.dismiss,loading:fn.loading},{getHistory:ak,getToasts:lk});KS("[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}[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(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);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]{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 Fl(e){return e.label!==void 0}const ck=3,uk="24px",dk="16px",Vg=4e3,fk=356,pk=14,hk=45,mk=200;function ur(...e){return e.filter(Boolean).join(" ")}function gk(e){const[t,r]=e.split("-"),o=[];return t&&o.push(t),r&&o.push(r),o}const yk=e=>{var t,r,o,a,c,d,p,g,v;const{invert:w,toast:f,unstyled:x,interacting:S,setHeights:N,visibleToasts:k,heights:C,index:_,toasts:R,expanded:D,removeToast:T,defaultRichColors:G,closeButton:q,style:A,cancelButtonStyle:M,actionButtonStyle:Y,className:W="",descriptionClassName:oe="",duration:ge,position:de,gap:ce,expandByDefault:fe,classNames:J,icons:re,closeButtonAriaLabel:K="Close toast"}=e,[Q,I]=ae.useState(null),[O,z]=ae.useState(null),[Z,se]=ae.useState(!1),[ie,pe]=ae.useState(!1),[je,ve]=ae.useState(!1),[me,We]=ae.useState(!1),[ft,ot]=ae.useState(!1),[pt,nt]=ae.useState(0),[er,wr]=ae.useState(0),nn=ae.useRef(f.duration||ge||Vg),Cn=ae.useRef(null),it=ae.useRef(null),tr=_===0,nr=_+1<=k,Ct=f.type,ht=f.dismissible!==!1,xr=f.className||"",mo=f.descriptionClassName||"",Nn=ae.useMemo(()=>C.findIndex(Ie=>Ie.toastId===f.id)||0,[C,f.id]),zr=ae.useMemo(()=>{var Ie;return(Ie=f.closeButton)!=null?Ie:q},[f.closeButton,q]),rr=ae.useMemo(()=>f.duration||ge||Vg,[f.duration,ge]),F=ae.useRef(0),X=ae.useRef(0),we=ae.useRef(0),he=ae.useRef(null),[Ee,et]=de.split("-"),$t=ae.useMemo(()=>C.reduce((Ie,ct,vt)=>vt>=Nn?Ie:Ie+ct.height,0),[C,Nn]),Je=nk(),Ht=f.invert||w,It=Ct==="loading";X.current=ae.useMemo(()=>Nn*ce+$t,[Nn,$t]),ae.useEffect(()=>{nn.current=rr},[rr]),ae.useEffect(()=>{se(!0)},[]),ae.useEffect(()=>{const Ie=it.current;if(Ie){const ct=Ie.getBoundingClientRect().height;return wr(ct),N(vt=>[{toastId:f.id,height:ct,position:f.position},...vt]),()=>N(vt=>vt.filter(Dt=>Dt.toastId!==f.id))}},[N,f.id]),ae.useLayoutEffect(()=>{if(!Z)return;const Ie=it.current,ct=Ie.style.height;Ie.style.height="auto";const vt=Ie.getBoundingClientRect().height;Ie.style.height=ct,wr(vt),N(Dt=>Dt.find(mt=>mt.toastId===f.id)?Dt.map(mt=>mt.toastId===f.id?{...mt,height:vt}:mt):[{toastId:f.id,height:vt,position:f.position},...Dt])},[Z,f.title,f.description,N,f.id,f.jsx,f.action,f.cancel]);const Nt=ae.useCallback(()=>{pe(!0),nt(X.current),N(Ie=>Ie.filter(ct=>ct.toastId!==f.id)),setTimeout(()=>{T(f)},mk)},[f,T,N,X]);ae.useEffect(()=>{if(f.promise&&Ct==="loading"||f.duration===1/0||f.type==="loading")return;let Ie;return D||S||Je?(()=>{if(we.current<F.current){const Dt=new Date().getTime()-F.current;nn.current=nn.current-Dt}we.current=new Date().getTime()})():(()=>{nn.current!==1/0&&(F.current=new Date().getTime(),Ie=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Nt()},nn.current))})(),()=>clearTimeout(Ie)},[D,S,f,Ct,Je,Nt]),ae.useEffect(()=>{f.delete&&(Nt(),f.onDismiss==null||f.onDismiss.call(f,f))},[Nt,f.delete]);function sr(){var Ie;if(re!=null&&re.loading){var ct;return ae.createElement("div",{className:ur(J==null?void 0:J.loader,f==null||(ct=f.classNames)==null?void 0:ct.loader,"sonner-loader"),"data-visible":Ct==="loading"},re.loading)}return ae.createElement(ZS,{className:ur(J==null?void 0:J.loader,f==null||(Ie=f.classNames)==null?void 0:Ie.loader),visible:Ct==="loading"})}const pn=f.icon||(re==null?void 0:re[Ct])||QS(Ct);var br,vi;return ae.createElement("li",{tabIndex:0,ref:it,className:ur(W,xr,J==null?void 0:J.toast,f==null||(t=f.classNames)==null?void 0:t.toast,J==null?void 0:J.default,J==null?void 0:J[Ct],f==null||(r=f.classNames)==null?void 0:r[Ct]),"data-sonner-toast":"","data-rich-colors":(br=f.richColors)!=null?br:G,"data-styled":!(f.jsx||f.unstyled||x),"data-mounted":Z,"data-promise":!!f.promise,"data-swiped":ft,"data-removed":ie,"data-visible":nr,"data-y-position":Ee,"data-x-position":et,"data-index":_,"data-front":tr,"data-swiping":je,"data-dismissible":ht,"data-type":Ct,"data-invert":Ht,"data-swipe-out":me,"data-swipe-direction":O,"data-expanded":!!(D||fe&&Z),"data-testid":f.testId,style:{"--index":_,"--toasts-before":_,"--z-index":R.length-_,"--offset":`${ie?pt:X.current}px`,"--initial-height":fe?"auto":`${er}px`,...A,...f.style},onDragEnd:()=>{ve(!1),I(null),he.current=null},onPointerDown:Ie=>{Ie.button!==2&&(It||!ht||(Cn.current=new Date,nt(X.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(ve(!0),he.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,ct,vt;if(me||!ht)return;he.current=null;const Dt=Number(((Ie=it.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fr=Number(((ct=it.current)==null?void 0:ct.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),mt=new Date().getTime()-((vt=Cn.current)==null?void 0:vt.getTime()),Et=Q==="x"?Dt:Fr,Ur=Math.abs(Et)/mt;if(Math.abs(Et)>=hk||Ur>.11){nt(X.current),f.onDismiss==null||f.onDismiss.call(f,f),z(Q==="x"?Dt>0?"right":"left":Fr>0?"down":"up"),Nt(),We(!0);return}else{var Rt,hn;(Rt=it.current)==null||Rt.style.setProperty("--swipe-amount-x","0px"),(hn=it.current)==null||hn.style.setProperty("--swipe-amount-y","0px")}ot(!1),ve(!1),I(null)},onPointerMove:Ie=>{var ct,vt,Dt;if(!he.current||!ht||((ct=window.getSelection())==null?void 0:ct.toString().length)>0)return;const mt=Ie.clientY-he.current.y,Et=Ie.clientX-he.current.x;var Ur;const Rt=(Ur=e.swipeDirections)!=null?Ur:gk(de);!Q&&(Math.abs(Et)>1||Math.abs(mt)>1)&&I(Math.abs(Et)>Math.abs(mt)?"x":"y");let hn={x:0,y:0};const Vr=En=>1/(1.5+Math.abs(En)/20);if(Q==="y"){if(Rt.includes("top")||Rt.includes("bottom"))if(Rt.includes("top")&&mt<0||Rt.includes("bottom")&&mt>0)hn.y=mt;else{const En=mt*Vr(mt);hn.y=Math.abs(En)<Math.abs(mt)?En:mt}}else if(Q==="x"&&(Rt.includes("left")||Rt.includes("right")))if(Rt.includes("left")&&Et<0||Rt.includes("right")&&Et>0)hn.x=Et;else{const En=Et*Vr(Et);hn.x=Math.abs(En)<Math.abs(Et)?En:Et}(Math.abs(hn.x)>0||Math.abs(hn.y)>0)&&ot(!0),(vt=it.current)==null||vt.style.setProperty("--swipe-amount-x",`${hn.x}px`),(Dt=it.current)==null||Dt.style.setProperty("--swipe-amount-y",`${hn.y}px`)}},zr&&!f.jsx&&Ct!=="loading"?ae.createElement("button",{"aria-label":K,"data-disabled":It,"data-close-button":!0,onClick:It||!ht?()=>{}:()=>{Nt(),f.onDismiss==null||f.onDismiss.call(f,f)},className:ur(J==null?void 0:J.closeButton,f==null||(o=f.classNames)==null?void 0:o.closeButton)},(vi=re==null?void 0:re.close)!=null?vi:tk):null,(Ct||f.icon||f.promise)&&f.icon!==null&&((re==null?void 0:re[Ct])!==null||f.icon)?ae.createElement("div",{"data-icon":"",className:ur(J==null?void 0:J.icon,f==null||(a=f.classNames)==null?void 0:a.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||sr():null,f.type!=="loading"?pn:null):null,ae.createElement("div",{"data-content":"",className:ur(J==null?void 0:J.content,f==null||(c=f.classNames)==null?void 0:c.content)},ae.createElement("div",{"data-title":"",className:ur(J==null?void 0:J.title,f==null||(d=f.classNames)==null?void 0:d.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?ae.createElement("div",{"data-description":"",className:ur(oe,mo,J==null?void 0:J.description,f==null||(p=f.classNames)==null?void 0:p.description)},typeof f.description=="function"?f.description():f.description):null),ae.isValidElement(f.cancel)?f.cancel:f.cancel&&Fl(f.cancel)?ae.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||M,onClick:Ie=>{Fl(f.cancel)&&ht&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,Ie),Nt())},className:ur(J==null?void 0:J.cancelButton,f==null||(g=f.classNames)==null?void 0:g.cancelButton)},f.cancel.label):null,ae.isValidElement(f.action)?f.action:f.action&&Fl(f.action)?ae.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||Y,onClick:Ie=>{Fl(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,Ie),!Ie.defaultPrevented&&Nt())},className:ur(J==null?void 0:J.actionButton,f==null||(v=f.classNames)==null?void 0:v.actionButton)},f.action.label):null)};function Bg(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function vk(e,t){const r={};return[e,t].forEach((o,a)=>{const c=a===1,d=c?"--mobile-offset":"--offset",p=c?dk:uk;function g(v){["top","right","bottom","left"].forEach(w=>{r[`${d}-${w}`]=typeof v=="number"?`${v}px`:v})}typeof o=="number"||typeof o=="string"?g(o):typeof o=="object"?["top","right","bottom","left"].forEach(v=>{o[v]===void 0?r[`${d}-${v}`]=p:r[`${d}-${v}`]=typeof o[v]=="number"?`${o[v]}px`:o[v]}):g(p)}),r}const wk=ae.forwardRef(function(t,r){const{id:o,invert:a,position:c="bottom-right",hotkey:d=["altKey","KeyT"],expand:p,closeButton:g,className:v,offset:w,mobileOffset:f,theme:x="light",richColors:S,duration:N,style:k,visibleToasts:C=ck,toastOptions:_,dir:R=Bg(),gap:D=pk,icons:T,containerAriaLabel:G="Notifications"}=t,[q,A]=ae.useState([]),M=ae.useMemo(()=>o?q.filter(Z=>Z.toasterId===o):q.filter(Z=>!Z.toasterId),[q,o]),Y=ae.useMemo(()=>Array.from(new Set([c].concat(M.filter(Z=>Z.position).map(Z=>Z.position)))),[M,c]),[W,oe]=ae.useState([]),[ge,de]=ae.useState(!1),[ce,fe]=ae.useState(!1),[J,re]=ae.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),K=ae.useRef(null),Q=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=ae.useRef(null),O=ae.useRef(!1),z=ae.useCallback(Z=>{A(se=>{var ie;return(ie=se.find(pe=>pe.id===Z.id))!=null&&ie.delete||fn.dismiss(Z.id),se.filter(({id:pe})=>pe!==Z.id)})},[]);return ae.useEffect(()=>fn.subscribe(Z=>{if(Z.dismiss){requestAnimationFrame(()=>{A(se=>se.map(ie=>ie.id===Z.id?{...ie,delete:!0}:ie))});return}setTimeout(()=>{Nv.flushSync(()=>{A(se=>{const ie=se.findIndex(pe=>pe.id===Z.id);return ie!==-1?[...se.slice(0,ie),{...se[ie],...Z},...se.slice(ie+1)]:[Z,...se]})})})}),[q]),ae.useEffect(()=>{if(x!=="system"){re(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?re("dark"):re("light")),typeof window>"u")return;const Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:se})=>{re(se?"dark":"light")})}catch{Z.addListener(({matches:ie})=>{try{re(ie?"dark":"light")}catch(pe){console.error(pe)}})}},[x]),ae.useEffect(()=>{q.length<=1&&de(!1)},[q]),ae.useEffect(()=>{const Z=se=>{var ie;if(d.every(ve=>se[ve]||se.code===ve)){var je;de(!0),(je=K.current)==null||je.focus()}se.code==="Escape"&&(document.activeElement===K.current||(ie=K.current)!=null&&ie.contains(document.activeElement))&&de(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[d]),ae.useEffect(()=>{if(K.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,O.current=!1)}},[K.current]),ae.createElement("section",{ref:r,"aria-label":`${G} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Y.map((Z,se)=>{var ie;const[pe,je]=Z.split("-");return M.length?ae.createElement("ol",{key:Z,dir:R==="auto"?Bg():R,tabIndex:-1,ref:K,className:v,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":pe,"data-x-position":je,style:{"--front-toast-height":`${((ie=W[0])==null?void 0:ie.height)||0}px`,"--width":`${fk}px`,"--gap":`${D}px`,...k,...vk(w,f)},onBlur:ve=>{O.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(O.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||O.current||(O.current=!0,I.current=ve.relatedTarget)},onMouseEnter:()=>de(!0),onMouseMove:()=>de(!0),onMouseLeave:()=>{ce||de(!1)},onDragEnd:()=>de(!1),onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||fe(!0)},onPointerUp:()=>fe(!1)},M.filter(ve=>!ve.position&&se===0||ve.position===Z).map((ve,me)=>{var We,ft;return ae.createElement(yk,{key:ve.id,icons:T,index:me,toast:ve,defaultRichColors:S,duration:(We=_==null?void 0:_.duration)!=null?We:N,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:a,visibleToasts:C,closeButton:(ft=_==null?void 0:_.closeButton)!=null?ft:g,interacting:ce,position:Z,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:z,toasts:M.filter(ot=>ot.position==ve.position),heights:W.filter(ot=>ot.position==ve.position),setHeights:oe,expandByDefault:p,gap:D,expanded:ge,swipeDirections:t.swipeDirections})})):null}))}),xk="modulepreload",bk=function(e){return"/"+e},Wg={},St=function(t,r,o){let a=Promise.resolve();if(r&&r.length>0){let d=function(v){return Promise.all(v.map(w=>Promise.resolve(w).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),g=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));a=d(r.map(v=>{if(v=bk(v),v in Wg)return;Wg[v]=!0;const w=v.endsWith(".css"),f=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${f}`))return;const x=document.createElement("link");if(x.rel=w?"stylesheet":xk,w||(x.as="script"),x.crossOrigin="",x.href=v,g&&x.setAttribute("nonce",g),document.head.appendChild(x),w)return new Promise((S,N)=>{x.addEventListener("load",S),x.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${v}`)))})}))}function c(d){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=d,window.dispatchEvent(p),!p.defaultPrevented)throw d}return a.then(d=>{for(const p of d||[])p.status==="rejected"&&c(p.reason);return t().catch(c)})},$d="chunk-reload";function Jf(e){return y.lazy(()=>e().then(t=>{try{sessionStorage.removeItem($d)}catch{}return t},t=>{if(!Sk(t))throw t;let r=!1;try{r=sessionStorage.getItem($d)==="1",r||sessionStorage.setItem($d,"1")}catch{}if(r)throw t;return window.location.reload(),new Promise(()=>{})}))}function Sk(e){const t=String((e==null?void 0:e.message)??e??"");return/Failed to fetch dynamically imported module/i.test(t)||/Importing a module script failed/i.test(t)||/error loading dynamically imported module/i.test(t)||/Loading chunk .* failed/i.test(t)}/**
|
|
42
|
-
* @license lucide-react v0.577.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Ev=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim();/**
|
|
47
|
-
* @license lucide-react v0.577.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const kk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
52
|
-
* @license lucide-react v0.577.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const _k=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase());/**
|
|
57
|
-
* @license lucide-react v0.577.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const Hg=e=>{const t=_k(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
62
|
-
* @license lucide-react v0.577.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/var Ck={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"};/**
|
|
67
|
-
* @license lucide-react v0.577.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Nk=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
72
|
-
* @license lucide-react v0.577.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const Ek=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:a="",children:c,iconNode:d,...p},g)=>y.createElement("svg",{ref:g,...Ck,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Ev("lucide",a),...!c&&!Nk(p)&&{"aria-hidden":"true"},...p},[...d.map(([v,w])=>y.createElement(v,w)),...Array.isArray(c)?c:[c]]));/**
|
|
77
|
-
* @license lucide-react v0.577.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const Ae=(e,t)=>{const r=y.forwardRef(({className:o,...a},c)=>y.createElement(Ek,{ref:c,iconNode:t,className:Ev(`lucide-${kk(Hg(e))}`,`lucide-${e}`,o),...a}));return r.displayName=Hg(e),r};/**
|
|
82
|
-
* @license lucide-react v0.577.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Ok=[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],Pk=Ae("book-marked",Ok);/**
|
|
87
|
-
* @license lucide-react v0.577.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const jk=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Ov=Ae("book-open",jk);/**
|
|
92
|
-
* @license lucide-react v0.577.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const Tk=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Rk=Ae("bot",Tk);/**
|
|
97
|
-
* @license lucide-react v0.577.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const Ak=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Mk=Ae("building-2",Ak);/**
|
|
102
|
-
* @license lucide-react v0.577.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const $k=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cc=Ae("check",$k);/**
|
|
107
|
-
* @license lucide-react v0.577.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const Ik=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],li=Ae("chevron-down",Ik);/**
|
|
112
|
-
* @license lucide-react v0.577.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const Dk=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ca=Ae("chevron-right",Dk);/**
|
|
117
|
-
* @license lucide-react v0.577.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const Lk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],tc=Ae("circle-alert",Lk);/**
|
|
122
|
-
* @license lucide-react v0.577.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const zk=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fk=Ae("circle",zk);/**
|
|
127
|
-
* @license lucide-react v0.577.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const Uk=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],Vk=Ae("clipboard-check",Uk);/**
|
|
132
|
-
* @license lucide-react v0.577.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const Bk=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Yf=Ae("copy",Bk);/**
|
|
137
|
-
* @license lucide-react v0.577.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const Wk=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Pv=Ae("database",Wk);/**
|
|
142
|
-
* @license lucide-react v0.577.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const Hk=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],nc=Ae("download",Hk);/**
|
|
147
|
-
* @license lucide-react v0.577.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const qk=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],sf=Ae("external-link",qk);/**
|
|
152
|
-
* @license lucide-react v0.577.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const Kk=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],jv=Ae("eye-off",Kk);/**
|
|
157
|
-
* @license lucide-react v0.577.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const Qk=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Tv=Ae("eye",Qk);/**
|
|
162
|
-
* @license lucide-react v0.577.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const Gk=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Xf=Ae("file-text",Gk);/**
|
|
167
|
-
* @license lucide-react v0.577.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const Zk=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Jk=Ae("folder-open",Zk);/**
|
|
172
|
-
* @license lucide-react v0.577.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const Yk=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Xk=Ae("folder",Yk);/**
|
|
177
|
-
* @license lucide-react v0.577.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const e_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],t_=Ae("globe",e_);/**
|
|
182
|
-
* @license lucide-react v0.577.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const n_=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Rv=Ae("house",n_);/**
|
|
187
|
-
* @license lucide-react v0.577.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const r_=[["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"}]],s_=Ae("inbox",r_);/**
|
|
192
|
-
* @license lucide-react v0.577.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const o_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],qg=Ae("info",o_);/**
|
|
197
|
-
* @license lucide-react v0.577.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const i_=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],ep=Ae("key-round",i_);/**
|
|
202
|
-
* @license lucide-react v0.577.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const a_=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],l_=Ae("key",a_);/**
|
|
207
|
-
* @license lucide-react v0.577.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const c_=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],u_=Ae("keyboard",c_);/**
|
|
212
|
-
* @license lucide-react v0.577.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const d_=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Av=Ae("layout-grid",d_);/**
|
|
217
|
-
* @license lucide-react v0.577.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const f_=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ci=Ae("loader-circle",f_);/**
|
|
222
|
-
* @license lucide-react v0.577.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const p_=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],h_=Ae("lock",p_);/**
|
|
227
|
-
* @license lucide-react v0.577.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const m_=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Mv=Ae("log-out",m_);/**
|
|
232
|
-
* @license lucide-react v0.577.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const g_=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],y_=Ae("message-square-text",g_);/**
|
|
237
|
-
* @license lucide-react v0.577.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const v_=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Kg=Ae("monitor",v_);/**
|
|
242
|
-
* @license lucide-react v0.577.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const w_=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],x_=Ae("network",w_);/**
|
|
247
|
-
* @license lucide-react v0.577.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const b_=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Ul=Ae("package",b_);/**
|
|
252
|
-
* @license lucide-react v0.577.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const S_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],k_=Ae("panel-left-close",S_);/**
|
|
257
|
-
* @license lucide-react v0.577.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const __=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],C_=Ae("panel-left",__);/**
|
|
262
|
-
* @license lucide-react v0.577.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const N_=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],E_=Ae("pencil",N_);/**
|
|
267
|
-
* @license lucide-react v0.577.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const O_=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],P_=Ae("plug",O_);/**
|
|
272
|
-
* @license lucide-react v0.577.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const j_=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],$v=Ae("plus",j_);/**
|
|
277
|
-
* @license lucide-react v0.577.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const T_=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],R_=Ae("scroll-text",T_);/**
|
|
282
|
-
* @license lucide-react v0.577.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const A_=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],tp=Ae("search",A_);/**
|
|
287
|
-
* @license lucide-react v0.577.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const M_=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],$_=Ae("shield-alert",M_);/**
|
|
292
|
-
* @license lucide-react v0.577.0 - ISC
|
|
293
|
-
*
|
|
294
|
-
* This source code is licensed under the ISC license.
|
|
295
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/const I_=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],D_=Ae("shield-check",I_);/**
|
|
297
|
-
* @license lucide-react v0.577.0 - ISC
|
|
298
|
-
*
|
|
299
|
-
* This source code is licensed under the ISC license.
|
|
300
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
-
*/const L_=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Nc=Ae("shield",L_);/**
|
|
302
|
-
* @license lucide-react v0.577.0 - ISC
|
|
303
|
-
*
|
|
304
|
-
* This source code is licensed under the ISC license.
|
|
305
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
-
*/const z_=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],F_=Ae("sparkles",z_);/**
|
|
307
|
-
* @license lucide-react v0.577.0 - ISC
|
|
308
|
-
*
|
|
309
|
-
* This source code is licensed under the ISC license.
|
|
310
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
-
*/const U_=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Qg=Ae("terminal",U_);/**
|
|
312
|
-
* @license lucide-react v0.577.0 - ISC
|
|
313
|
-
*
|
|
314
|
-
* This source code is licensed under the ISC license.
|
|
315
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
-
*/const V_=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Iv=Ae("user-round",V_);/**
|
|
317
|
-
* @license lucide-react v0.577.0 - ISC
|
|
318
|
-
*
|
|
319
|
-
* This source code is licensed under the ISC license.
|
|
320
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
-
*/const B_=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Dv=Ae("users",B_);/**
|
|
322
|
-
* @license lucide-react v0.577.0 - ISC
|
|
323
|
-
*
|
|
324
|
-
* This source code is licensed under the ISC license.
|
|
325
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
-
*/const W_=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],H_=Ae("workflow",W_),Lv="contextnest:draft:",np=(e,t)=>`${Lv}${e}:${t}`;function cI(e,t){try{const r=localStorage.getItem(np(e,t));return r?JSON.parse(r):null}catch{return null}}function q_(e){let t=null,r=1/0;for(let o=0;o<localStorage.length;o++){const a=localStorage.key(o);if(!a||a===e||!a.startsWith(Lv))continue;let c=0;try{c=Number(JSON.parse(localStorage.getItem(a)||"{}").savedAt)||0}catch{c=0}c<r&&(r=c,t=a)}return t?(localStorage.removeItem(t),!0):!1}function uI(e,t,r){const o=np(e,t),a=JSON.stringify({...r,savedAt:Date.now()});for(;;)try{return localStorage.setItem(o,a),!0}catch{let c=!1;try{c=q_(o)}catch{c=!1}if(!c)return!1}}function K_(e,t){try{localStorage.removeItem(np(e,t))}catch{}}const Ec="",Q_="cnst_token";function zv(){try{localStorage.removeItem(Q_)}catch{}}async function U(e,t={}){const r={"Content-Type":"application/json",...t.headers},o=await fetch(`${Ec}${e}`,{...t,headers:r,credentials:"include"}),a=await o.text();let c;try{c=a?JSON.parse(a):{}}catch{c={error:a.slice(0,200)}}if(!o.ok){o.status===401&&(zv(),typeof window<"u"&&window.dispatchEvent(new Event("auth:unauthorized")));const p=new Error(c.error||`Request failed: ${o.status}`);throw p.status=o.status,p.body=c,p}return(t.method??"GET").toUpperCase()!=="GET"&&(Xs==null||Xs.invalidatePath(e)),c}let Xs=null;function G_(e){Xs=e}function Id(e){{Xs==null||Xs.clear();return}}async function Fv(e,t){return U("/auth/login",{method:"POST",body:JSON.stringify({email:e,password:t})})}async function Z_(e,t,r){return U("/auth/register",{method:"POST",body:JSON.stringify({email:e,password:t,name:r})})}async function J_(){return U("/auth/logout",{method:"POST"})}async function Uv(){return U("/auth/device",{method:"POST",body:JSON.stringify({})})}async function Vv(e,t){return U(`/auth/device/poll?code=${encodeURIComponent(e)}&client_secret=${encodeURIComponent(t)}`)}async function Bv(e){return U("/auth/promptowl",{method:"POST",body:JSON.stringify({token:e})})}async function la(){return U("/health")}async function Y_(){return U("/admin/settings")}async function dI(e){return U("/admin/settings",{method:"PATCH",body:JSON.stringify(e)})}async function fI(e){return U("/admin/settings/test-notification",{method:"POST",body:JSON.stringify({channel:e})})}async function Wv(){return U("/license/status")}async function X_(e){return U("/license/install",{method:"POST",body:JSON.stringify({key:e})})}async function Dd(){return U("/auth/admin-status")}async function eC(){return U("/auth/teammates")}async function pI(e){return U("/auth/invite",{method:"POST",body:JSON.stringify({email:e})})}async function tC(){return U("/admin/super-admins")}async function hI(e){return U("/admin/super-admins",{method:"POST",body:JSON.stringify({email:e})})}async function mI(e){return U(`/admin/super-admins/${encodeURIComponent(e)}`,{method:"DELETE"})}async function nC(){return U("/admin/community-sites")}async function gI(e){return U("/admin/community-sites",{method:"POST",body:JSON.stringify(e)})}async function yI(e,t){return U(`/admin/community-sites/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)})}async function vI(e){return U(`/admin/community-sites/${encodeURIComponent(e)}`,{method:"DELETE"})}async function wI(e){return U("/auth/profile",{method:"PATCH",body:JSON.stringify({name:e})})}async function xI(e,t){return U("/auth/password",{method:"POST",body:JSON.stringify({current:e,next:t})})}async function bI(e={}){const t=new URLSearchParams;e.kind&&t.set("kind",e.kind),e.user&&t.set("user",e.user),e.nest&&t.set("nest",e.nest),e.limit!=null&&t.set("limit",String(e.limit)),e.offset!=null&&t.set("offset",String(e.offset));const r=t.toString()?`?${t}`:"";return U(`/admin/trace${r}`)}async function SI(e,t={}){const r=new URLSearchParams;t.kind&&r.set("kind",t.kind),t.user&&r.set("user",t.user),t.limit!=null&&r.set("limit",String(t.limit)),t.offset!=null&&r.set("offset",String(t.offset));const o=r.toString()?`?${r}`:"";return U(`/nests/${encodeURIComponent(e)}/trace${o}`)}async function kI(e){return U(`/auth/users/${encodeURIComponent(e)}`,{method:"DELETE"})}async function _I(e,t){return U(`/auth/admin/reset-password/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify({})})}async function rC(){return U("/auth/keys")}async function CI(e){return U("/auth/keys",{method:"POST",body:JSON.stringify(e||{})})}async function NI(e){return U("/auth/keys/rotate",{method:"POST",body:JSON.stringify(e||{})})}async function EI(e){return U(`/auth/keys/${encodeURIComponent(e)}`,{method:"DELETE"})}async function sC(e){return U(`/nests/${e}/settings`)}async function OI(e,t){return U(`/nests/${e}/settings`,{method:"PATCH",body:JSON.stringify(t)})}function PI(e,t){if(typeof e.prime=="boolean")return e.prime;if(!t.length)return!1;const r=new Set(t);return(e.tags||[]).some(o=>r.has(o.trim().replace(/^#+/,"").toLowerCase()))}async function oC(e){return U(e!=null&&e.archived?"/nests?archived=1":"/nests")}async function jI(e,t){return U("/nests",{method:"POST",body:JSON.stringify({name:e,description:t})})}async function iC(e){return U("/nests/"+e,{method:"DELETE"})}async function TI(e){return U("/nests/"+e+"/archive",{method:"POST"})}async function RI(e){return U("/nests/"+e+"/restore",{method:"POST"})}async function AI(e,t){return U("/nests/"+e+"/pin",{method:t?"POST":"DELETE"})}async function MI(e,t){return U("/nests/"+e,{method:"PATCH",body:JSON.stringify(t)})}const aC=4*1024*1024,lC=8*1024*1024;async function $I(e,t,r){const o=new TextEncoder,a=[],c=[];let d=[],p=0;for(const x of t){const S=o.encode(x.path).length+o.encode(x.content??"").length;if(S>lC){c.push(x.path);continue}d.length&&p+S>aC&&(a.push(d),d=[],p=0),d.push(x),p+=S}(d.length||!a.length)&&a.push(d),r==null||r(0,t.length);const g=[...c],v=await U("/nests/import",{method:"POST",body:JSON.stringify({name:e,files:a[0],partial:a.length>1})});g.push(...v.rejected??[]);let w=a[0].length;if(r==null||r(w,t.length),a.length===1)return{nest:v.nest,documents:v.documents??0,rejected:g};const f=v.nest.id;try{for(const S of a.slice(1)){const N=await U("/nests/import",{method:"POST",body:JSON.stringify({nestId:f,files:S})});g.push(...N.rejected??[]),w+=S.length,r==null||r(w,t.length)}return{...await U("/nests/import",{method:"POST",body:JSON.stringify({nestId:f,finalize:!0})}),rejected:g}}catch(x){throw await iC(f).catch(()=>{}),x}}async function cC(){return U("/nests/unsynced")}async function II(e){return U("/nests/unsynced/sync",{method:"POST",body:JSON.stringify({name:e})})}async function DI(e){return U("/nests/unsynced/sync",{method:"DELETE",body:JSON.stringify({name:e})})}async function LI(e,t,r){return U(`/nests/${e}/visibility`,{method:"PATCH",body:JSON.stringify(r?{visibility:t,acknowledge_public:!0}:{visibility:t})})}async function zI(e,t){return U(`/nests/${e}/reader-mode`,{method:"PATCH",body:JSON.stringify(t)})}async function uC(e){return U(`/nests/${e}`)}async function dC(e){return U(`/nests/${e}/definitions`)}async function FI(e,t){return U(`/nests/${e}/definitions`,{method:"POST",body:JSON.stringify(t)})}async function UI(e,t){return U(`/nests/${e}/definitions/${encodeURIComponent(t)}`,{method:"DELETE"})}async function VI(e,t){const r=new FormData;r.append("file",t);const o=await fetch(`/nests/${e}/assets`,{method:"POST",body:r,credentials:"include"}),a=await o.json().catch(()=>({}));if(!o.ok)throw new Error(a.error||`Upload failed: ${o.status}`);return a}async function fC(e){return U(`/nests/${e}/nodes?content=1`)}async function pC(e,t){return U(`/nests/${e}/nodes?folder=${encodeURIComponent(t)}`)}async function hC(e,t=!1){return U(`/nests/${e}/nodes${t?"?approved_only=1":""}`)}async function mC(e){return U(`/nests/${e}/census`)}async function gC(e){return U(`/nests/${e}/comment-counts`)}async function yC(e,t,r=!1){return U(`/nests/${e}/nodes/${t}${r?"?approved_only=1":""}`)}async function BI(e,t){return U(`/nests/${e}/nodes`,{method:"POST",body:JSON.stringify(t)})}async function WI(e,t,r,o){const a={};return o!==void 0&&(a["X-Base-Version"]=String(o)),U(`/nests/${e}/nodes/${t}`,{method:"PATCH",headers:a,body:JSON.stringify(r)})}async function HI(e,t){return U(`/nests/${e}/nodes/${t}`,{method:"DELETE"})}async function qI(e,t,r){return U(`/nests/${e}/nodes/${t}/move`,{method:"POST",body:JSON.stringify({folder:r})})}async function vC(e,t){return U(`/nests/${e}/search?q=${encodeURIComponent(t)}`)}async function wC(e,t=20){return U(`/search?q=${encodeURIComponent(e)}&limit=${t}`)}async function xC(e){return U(`/nests/${e}/overview`)}async function bC(e,t={}){const r=new URLSearchParams({format:"markdown"});t.selector&&r.set("selector",t.selector),t.maxTokens&&r.set("max_tokens",String(t.maxTokens));const o=await fetch(`${Ec}/nests/${e}/export?${r.toString()}`,{credentials:"include"});if(!o.ok){const a=await o.text();let c=`Export failed (${o.status})`;try{c=JSON.parse(a).error||c}catch{}throw new Error(c)}return o.text()}async function SC(e,t={}){const r=new URLSearchParams({format:"bundle"});t.includeDrafts&&r.set("includeDrafts","1");const o=await fetch(`${Ec}/nests/${e}/export?${r.toString()}`,{credentials:"include"});if(!o.ok){const g=await o.text();let v=`Export failed (${o.status})`;try{v=JSON.parse(g).error||v}catch{}throw new Error(v)}const a=await o.blob(),c=URL.createObjectURL(a),d=document.createElement("a");d.href=c;const p=(t.nestName||"nest").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"nest";d.download=`${p}-bundle.zip`,document.body.appendChild(d),d.click(),d.remove(),URL.revokeObjectURL(c)}async function kC(e){const t=await U(`/nests/${e}/overview`),r=(t==null?void 0:t.tags)??{};return Object.keys(r).map(o=>o.replace(/^#+/,"")).filter(Boolean).sort((o,a)=>o.localeCompare(a))}async function _C(e){return U(`/nests/${e}/stewards`)}async function KI(e){return U(`/nests/${e}/stewards/sync`,{method:"POST",body:"{}"})}async function QI(e,t){return U(`/nests/${e}/stewards`,{method:"POST",body:JSON.stringify(t)})}async function GI(e,t){return U(`/nests/${e}/stewards/${t}`,{method:"DELETE"})}async function ZI(e,t,r){return U(`/nests/${e}/stewards/${t}`,{method:"PATCH",body:JSON.stringify(r)})}async function CC(e,t){return U(`/nests/${e}/nodes/${t}/stewards`)}async function JI(e,t,r){return U(`/nests/${e}/nodes/${t}/request-deletion`,{method:"POST",body:JSON.stringify({reason:r})})}async function YI(e,t){return U(`/nests/${e}/delete-folder`,{method:"POST",body:JSON.stringify({folder:t})})}async function XI(e,t,r,o){return U(`/nests/${e}/request-deletion`,{method:"POST",body:JSON.stringify({targetType:t,target:r,reason:o})})}async function NC(e,t="pending"){return U(`/nests/${e}/deletion-requests?status=${encodeURIComponent(t)}`)}async function eD(e,t){return U(`/nests/${e}/deletion-requests/${t}/delete`,{method:"POST"})}async function tD(e,t,r){return U(`/nests/${e}/deletion-requests/${t}/decline`,{method:"POST",body:JSON.stringify({note:r})})}async function nD(e,t){return U(`/nests/${e}/deletion-requests/${t}/withdraw`,{method:"POST"})}async function rD(e,t){return U(`/nests/${e}/folders`,{method:"POST",body:JSON.stringify({folder:t})})}async function sD(e,t){return U(`/nests/${e}/nodes/${t}/cancel-review`,{method:"POST"})}async function EC(e,t="pending"){return U(`/nests/${e}/review-queue?status=${encodeURIComponent(t)}`)}async function OC(e,t="all",r=50,o=0){const a=new URLSearchParams({filter:t,limit:String(r),offset:String(o)});return U(`/nests/${e}/feed?${a.toString()}`)}async function oD(e,t,r,o){return U(`/nests/${e}/nodes/${t}/submit-review`,{method:"POST",body:JSON.stringify({note:r,priority:o})})}async function iD(e,t,r){return U(`/nests/${e}/nodes/${t}/approve`,{method:"POST",body:JSON.stringify({note:r})})}async function aD(e,t,r){return U(`/nests/${e}/nodes/${t}/reject`,{method:"POST",body:JSON.stringify({note:r})})}async function lD(e,t,r,o){return U(`/nests/${e}/review-queue/bulk`,{method:"POST",body:JSON.stringify({action:t,nodeIds:r,note:o})})}async function cD(e,t,r){return U(`/nests/${e}/nodes/${t}/revert`,{method:"POST",body:JSON.stringify({targetVersion:r})})}async function PC(e,t){return U(`/nests/${e}/nodes/${t}/versions`)}async function uD(e,t,r){return U(`/nests/${e}/nodes/${t}/versions/${r}`)}async function jC(e,t){return U(`/nests/${e}/nodes/${t}/reviews`)}function TC(e,t,r,o){const a=new URLSearchParams;r!=null&&a.set("v",String(r)),o!=null&&a.set("_",String(o));const c=a.toString(),d=t.replace(/^nodes\//,"");return`${Ec}/nests/${e}/nodes/${d}/hosted${c?`?${c}`:""}`}async function dD(e,t,r,o){const a=await fetch(TC(e,t,r,o),{credentials:"include",cache:"no-store"});if(!a.ok)throw new Error(`Failed to load artifact (${a.status})`);const c=a.headers.get("X-Artifact-Snapshot"),d=c?Number(c):null;return{html:await a.text(),snapshot:Number.isFinite(d)?d:null}}async function RC(e,t){return U(`/nests/${e}/nodes/${t}/annotations`)}async function fD(e,t,r){return U(`/nests/${e}/nodes/${t}/annotations`,{method:"POST",body:JSON.stringify(r)})}async function pD(e,t,r,o){return U(`/nests/${e}/nodes/${t}/annotations/${r}/comments`,{method:"POST",body:JSON.stringify({body:o})})}async function hD(e,t,r){return U(`/nests/${e}/nodes/${t}/annotations/${r}/resolve`,{method:"POST",body:"{}"})}async function mD(e,t,r){return U(`/nests/${e}/nodes/${t}/annotations/${r}/reopen`,{method:"POST",body:"{}"})}async function AC(e,t,r){const o=r?`?status=${r}`:"";return U(`/nests/${e}/nodes/${t}/comments${o}`)}async function MC(e,t,r=100){return U(`/nests/${e}/nodes/${t}/activity?limit=${r}`)}async function $C(e,t=!1){return U(`/nests/${e}/external-edits${t?"?refresh=true":""}`)}async function IC(e){return U(`/nests/${e}/external-edits?count=1`)}async function gD(e){return U(`/nests/${e}/external-edits/scan`,{method:"POST",body:"{}"})}async function DC(e,t){return U(`/nests/${e}/nodes/${t}/external-edits`)}async function yD(e,t,r){return U(`/nests/${e}/nodes/${t}/external-edits/${r}`)}async function vD(e,t,r,o){return U(`/nests/${e}/nodes/${t}/external-edits/${r}/approve`,{method:"POST",body:JSON.stringify({comment:o})})}async function wD(e,t,r,o){return U(`/nests/${e}/nodes/${t}/external-edits/${r}/reject`,{method:"POST",body:JSON.stringify({reason:o})})}async function xD(e){return U(`/nests/${e}/publications`)}async function bD(e,t){return U(`/nests/${e}/publications`,{method:"POST",body:JSON.stringify(t)})}async function SD(e,t){return U(`/nests/${e}/publications/${t}/views`)}async function kD(e,t){return U(`/nests/${e}/publications/${t}`,{method:"DELETE"})}async function LC(e){return U(`/nests/${e}/collaborators`)}async function zC(e){return U(`/nests/${e}/mentionable`)}async function FC(e=""){const t=e.trim()?`?q=${encodeURIComponent(e.trim())}`:"";return U(`/people/suggest${t}`)}async function _D(e,t){return U(`/nests/${e}/collaborators`,{method:"POST",body:JSON.stringify(t)})}async function CD(e,t,r){return U(`/nests/${e}/collaborators/${t}`,{method:"PATCH",body:JSON.stringify({permission:r})})}async function ND(e,t){return U(`/nests/${e}/collaborators/${t}`,{method:"DELETE"})}async function ED(e){return U(`/nests/${e}/grants`)}async function OD(e,t){return U(`/nests/${e}/grants`,{method:"POST",body:JSON.stringify(t)})}async function PD(e,t){return U(`/nests/${e}/grants/${t}`,{method:"DELETE"})}const jD=[{value:"viewer",label:"Viewer",hint:"Read only"},{value:"editor",label:"Editor",hint:"Read and edit documents"},{value:"admin",label:"Admin",hint:"Full access except deleting the nest"}];async function UC(){return U("/teams")}async function VC(e){return U(`/teams/${e}`)}async function TD(e){return U("/teams",{method:"POST",body:JSON.stringify({name:e})})}async function RD(e,t){return U(`/teams/${e}`,{method:"PATCH",body:JSON.stringify({name:t})})}async function AD(e){return U(`/teams/${e}`,{method:"DELETE"})}async function MD(e,t){return U(`/teams/${e}/members`,{method:"POST",body:JSON.stringify(t)})}async function $D(e,t,r){return U(`/teams/${e}/members/${t}`,{method:"PATCH",body:JSON.stringify({role:r})})}async function ID(e,t){return U(`/teams/${e}/members/${t}`,{method:"DELETE"})}function DD(e){return["owner","editor"].includes((e.your_role||"").toLowerCase())}const BC="promptowl_connect_required";function LD(){return typeof document>"u"?!1:document.cookie.split(";").some(e=>e.trim().startsWith("cnst_po_session="))}function zD(e){var t;return((t=e==null?void 0:e.body)==null?void 0:t.code)===BC}async function WC(){return U("/teams/promptowl")}async function FD(e){return U("/teams/promptowl/sync",{method:"POST",body:JSON.stringify({team_ids:e})})}async function HC(e){return U(`/nests/${e}/teams`)}async function UD(e,t){return U(`/nests/${e}/teams`,{method:"POST",body:JSON.stringify({team_id:t})})}async function VD(e,t){return U(`/nests/${e}/teams/${t}`,{method:"DELETE"})}async function qC(e){return U(`/nests/${e}/graph`)}async function KC(e){const t=new URLSearchParams;(e==null?void 0:e.limit)!=null&&t.set("limit",String(e.limit)),(e==null?void 0:e.offset)!=null&&t.set("offset",String(e.offset));const r=t.toString();return U(`/me/work${r?`?${r}`:""}`)}async function QC(e){const t=new URLSearchParams;(e==null?void 0:e.limit)!=null&&t.set("limit",String(e.limit)),(e==null?void 0:e.offset)!=null&&t.set("offset",String(e.offset)),e!=null&&e.q&&t.set("q",e.q),e!=null&&e.sort&&e.sort!=="updated"&&t.set("sort",e.sort);const r=t.toString();return U(`/me/drafts${r?`?${r}`:""}`)}async function BD(e,t){const r=await U(`/nests/${e}/nodes/${t}/discard`,{method:"POST"});return K_(e,t),r}async function WD(e,t,r){return U(`/nests/${e}/nodes/${t}/approve`,{method:"POST",body:JSON.stringify({note:r})})}async function HD(e,t,r){return U(`/nests/${e}/nodes/${t}/reject`,{method:"POST",body:JSON.stringify({note:r})})}const qD=e=>e.status==="running"&&!e.claimed_by;async function GC(e){return(await U(`/nests/${e}/edge-types`)).edge_types}async function ZC(e){return(await U(`/nests/${e}/edges`)).edges}async function KD(e,t){return(await U(`/nests/${e}/edges`,{method:"POST",body:JSON.stringify(t)})).edge}async function QD(e,t,r){return(await U(`/nests/${e}/edges/${t}`,{method:"PATCH",body:JSON.stringify(r)})).edge}async function GD(e,t){return U(`/nests/${e}/edges/${t}`,{method:"DELETE"})}async function JC(e){return(await U(`/nests/${e}/schedules`)).schedules}async function ZD(e,t){return(await U(`/nests/${e}/schedules`,{method:"POST",body:JSON.stringify(t)})).schedule}async function JD(e,t,r){return(await U(`/nests/${e}/schedules/${t}`,{method:"PATCH",body:JSON.stringify(r)})).schedule}async function YD(e,t){return U(`/nests/${e}/schedules/${t}`,{method:"DELETE"})}async function YC(e,t){return(await U(`/nests/${e}/nodes/${t}/watchers`)).watchers}async function XD(e,t,r){return(await U(`/nests/${e}/nodes/${t}/watchers`,{method:"POST",body:JSON.stringify({email:r})})).watchers}async function e4(e,t,r){return(await U(`/nests/${e}/nodes/${t}/watchers?email=${encodeURIComponent(r)}`,{method:"DELETE"})).watchers}async function t4(e){return U("/me/notifications/read",{method:"POST",body:JSON.stringify({ids:e})})}async function XC(e){return(await U(`/nests/${e}/env`)).env}async function n4(e,t,r){return U(`/nests/${e}/env`,{method:"PUT",body:JSON.stringify({key:t,value:r})})}async function r4(e,t){return U(`/nests/${e}/env/${encodeURIComponent(t)}`,{method:"DELETE"})}async function eN(e,t){const r=t?`?agent=${encodeURIComponent(t)}`:"";return(await U(`/nests/${e}/hooks${r}`)).hooks}async function s4(e,t,r){return(await U(`/nests/${e}/hooks`,{method:"POST",body:JSON.stringify({agent_node:t,preset:r})})).hook}async function o4(e,t){return U(`/nests/${e}/hooks/${t}`,{method:"DELETE"})}async function tN(e){return(await U(`/nests/${e}/connectors`)).connectors}async function i4(e,t){return(await U(`/nests/${e}/connectors`,{method:"POST",body:JSON.stringify(t)})).connector}async function a4(e,t,r){return(await U(`/nests/${e}/connectors/${t}`,{method:"PATCH",body:JSON.stringify(r)})).connector}async function l4(e,t){return U(`/nests/${e}/connectors/${t}`,{method:"DELETE"})}async function c4(e,t,r){return U(`/nests/${e}/table-query`,{method:"POST",body:JSON.stringify({table:t,query:r,include_drafts:!0})})}async function u4(e,t,r,o=4e3){return U(`/nests/${e}/context`,{method:"POST",body:JSON.stringify({selector:t,hops:r,max_tokens:o})})}async function d4(e,t,r){const o=new URLSearchParams;o.set("limit",String(r));const a=o.toString();return(await U(`/nests/${e}/runs${a?`?${a}`:""}`)).runs}async function f4(e){const t=await U(`/runs/${e}`);return{...t.run,steps:t.steps}}async function p4(e,t){return U(`/runs/${e}`,{method:"PATCH",body:JSON.stringify({status:"cancelled",trace:{error:"Cancelled from the Runs page"}})})}async function h4(e,t,r,o){return U(`/nests/${e}/run/${t}`,{method:"POST",body:JSON.stringify({...r?{inputs:r}:{},...o?{parent_run_id:o}:{}})})}async function nN(e){try{return await navigator.clipboard.writeText(e),!0}catch{}try{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t);try{return t.select(),document.execCommand("copy")}finally{document.body.removeChild(t)}}catch{return!1}}async function ui(e,t){const r=await nN(e);return r?t&&ac.success(t):ac.error("Couldn't copy automatically — select the text and copy it manually."),r}let lc=null;const ia=[],rN=50;function sN(e,t){if(!e){ia.length=0;return}lc||(lc=St(async()=>{const{default:r}=await import("./module-uADzTImp.js");return{default:r}},[]).then(({default:r})=>{r.init(e,{api_host:t||"https://us.i.posthog.com",person_profiles:"identified_only"});for(const[o,a]of ia.splice(0))r.capture(o,a);return r}).catch(r=>(console.warn("[analytics] PostHog failed to load",r),ia.length=0,null)))}function oN(e,t){if(!lc){ia.length<rN&&ia.push([e,t]);return}lc.then(r=>r==null?void 0:r.capture(e,t))}const Hv=y.createContext(null);function iN({children:e}){var O;const[t,r]=y.useState(null),[o,a]=y.useState(null),[c,d]=y.useState(null),[p,g]=y.useState(!1),[v,w]=y.useState(!1),[f,x]=y.useState(!0),[S,N]=y.useState(!0),[k,C]=y.useState(!1),[_,R]=y.useState(8),[D,T]=y.useState(16),[G,q]=y.useState(null),[A,M]=y.useState(!1),[Y,W]=y.useState(!0),[oe,ge]=y.useState(null),de=y.useRef(0),ce=y.useCallback((z,Z)=>z==="open"?!0:!!Z,[]),fe=y.useCallback(async()=>{try{const z=await la();a(z.logo_url??null),g(!!z.workflow_plane_enabled),w(!!z.promptowl_teams_enabled),x(z.type_artifact_enabled!==!1),N(z.type_table_enabled!==!1),C(!!z.subagent_runs_enabled),typeof z.subagent_max_depth=="number"&&R(z.subagent_max_depth),typeof z.subagent_max_children=="number"&&T(z.subagent_max_children)}catch{}},[]),J=y.useCallback(async()=>{const z=++de.current;try{const Z=await Dd();if(de.current!==z)return;q(Z),M(t==="open"?!0:!!Z.me)}catch{}},[t]);y.useEffect(()=>{zv();let z=!1;return(async()=>{try{const Z=await la();if(z)return;const se=Z.auth_mode;r(se),a(Z.logo_url??null),d(Z.version??null),g(!!Z.workflow_plane_enabled),w(!!Z.promptowl_teams_enabled),x(Z.type_artifact_enabled!==!1),N(Z.type_table_enabled!==!1),C(!!Z.subagent_runs_enabled),sN(Z.posthog_key,Z.posthog_host),typeof Z.subagent_max_depth=="number"&&R(Z.subagent_max_depth),typeof Z.subagent_max_children=="number"&&T(Z.subagent_max_children);const ie=await Dd();if(z)return;q(ie),M(ce(se,ie.me))}catch{z||ge("Cannot connect to server")}finally{z||W(!1)}})(),()=>{z=!0}},[ce]),y.useEffect(()=>{if(!o)return;const z=document.querySelector('link[rel="icon"]');z&&(z.href=o)},[o]),y.useEffect(()=>{const z=()=>{++de.current,M(t==="open"),q(Z=>Z&&{...Z,me:null})};return window.addEventListener("auth:unauthorized",z),()=>window.removeEventListener("auth:unauthorized",z)},[t]),y.useEffect(()=>{const z="cnst_auth_tick",Z=ie=>{ie.key===z&&(Id(),J())},se=()=>{document.visibilityState==="visible"&&J()};return window.addEventListener("storage",Z),document.addEventListener("visibilitychange",se),()=>{window.removeEventListener("storage",Z),document.removeEventListener("visibilitychange",se)}},[J]);const re=y.useCallback(()=>{try{localStorage.setItem("cnst_auth_tick",String(Date.now()))}catch{}},[]),K=y.useCallback(z=>{const Z=++de.current;if(Id(),z){const se=z.name??null;q(ie=>({claimed:(ie==null?void 0:ie.claimed)??!0,admin:(ie==null?void 0:ie.admin)??{email:z.email,name:se},me:{email:z.email,name:se,is_admin:z.is_admin}})),M(!0)}re(),(async()=>{try{const se=await Dd();de.current===Z&&(q(se),M(ce(t,se.me)))}catch{}})()},[t,re,ce]),Q=y.useCallback(async()=>{if(++de.current,document.cookie.split(";").some(Z=>Z.trim().startsWith("cnst_sso_session="))){window.location.assign("/auth/oidc/logout");return}try{await J_()}catch{}Id(),M(t==="open"),q(Z=>Z&&{...Z,me:null}),re()},[t,re]),I=!!((O=G==null?void 0:G.me)!=null&&O.is_admin);return u.jsx(Hv.Provider,{value:{authMode:t,logoUrl:o,serverVersion:c,adminStatus:G,authenticated:A,isAdmin:I,workflowPlaneEnabled:p,promptowlTeamsEnabled:v,typeArtifactEnabled:f,typeTableEnabled:S,subagentRunsEnabled:k,subagentMaxDepth:_,subagentMaxChildren:D,loading:Y,error:oe,refresh:J,refreshHealth:fe,loginSuccess:K,logout:Q},children:e})}function Na(){const e=y.useContext(Hv);if(!e)throw new Error("useAuth must be used inside <AuthProvider>");return e}function aN(){const{loginSuccess:e,logoUrl:t}=Na(),[r,o]=y.useState("login"),[a,c]=y.useState(""),[d,p]=y.useState(""),[g,v]=y.useState(""),[w,f]=y.useState(null),[x,S]=y.useState(!1),[N,k]=y.useState(null),[C,_]=y.useState(null),[R,D]=y.useState(!1),[T,G]=y.useState(!1),[q,A]=y.useState("open"),[M,Y]=y.useState("open"),[W,oe]=y.useState({enabled:!1,issuer:""}),ge=typeof window<"u"&&new URLSearchParams(window.location.search).has("admin"),de=q==="open"||q==="admin-only"&&ge,ce=M!=="disabled",fe=M==="open",J=(()=>{try{const I=new URL(W.issuer).host;if(I==="login.microsoftonline.com")return"Sign in with Microsoft";if(I==="accounts.google.com")return"Sign in with Google"}catch{}return"Sign in with SSO"})();y.useEffect(()=>{let I=!1;return la().then(O=>{I||(A(O.promptowl_sign_in_gate??"open"),Y(O.manual_sign_in??"open"),oe({enabled:!!O.oidc_enabled,issuer:O.oidc_issuer??""}))}).catch(()=>{}),()=>{I=!0}},[]);const re=async()=>{C&&await ui(C)&&(D(!0),setTimeout(()=>D(!1),1500))},K=async I=>{I.preventDefault(),f(null),S(!0);try{const O=r==="register"?await Z_(a,d,g):await Fv(a,d);e(O.user?{email:O.user.email,name:O.user.name,is_admin:!!O.user.is_admin}:void 0)}catch(O){f(O.message)}finally{S(!1)}},Q=async()=>{f(null),S(!0);try{const I=await Uv();k(I.verificationUrl),_(I.deviceCode),window.open(I.verificationUrl,"_blank","noopener,noreferrer");for(let O=0;O<180;O++){await new Promise(se=>setTimeout(se,2e3));const z=await Vv(I.deviceCode,I.clientSecret);if(z.status==="approved"&&z.token){const se=await Bv(z.token);e(se.user?{email:se.user.email,name:se.user.name,is_admin:!!se.user.is_admin}:void 0);return}if(z.status==="pending")continue;const Z=z.status==="denied"||z.status==="rejected"?"Login request was denied. Please try again to create a new authentication request.":z.status==="expired"?"Login expired. Try again.":z.status==="cancelled"?"Login cancelled. Try again.":`Login failed (status: ${z.status}). Try again.`;f(Z),k(null),_(null),S(!1);return}f("Login timed out waiting for approval. Try again."),k(null),_(null),S(!1)}catch(I){f(I.message),k(null),_(null),S(!1)}};return u.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:u.jsxs("div",{className:"w-full max-w-sm space-y-6 p-6",children:[u.jsxs("div",{className:"text-center",children:[t?u.jsx("img",{src:t,alt:"",className:"h-12 w-12 mx-auto object-contain"}):u.jsx("span",{className:"text-4xl",children:"🪺"}),u.jsx("h1",{className:"text-xl font-semibold mt-2",children:"ContextNest"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Community Server"})]}),de&&u.jsx("button",{onClick:Q,disabled:x,className:"w-full flex items-center justify-center gap-2 py-2.5 px-4 rounded-lg border border-border bg-card hover:bg-secondary text-sm font-medium transition-colors",children:x&&N?"Waiting for approval...":"Login with PromptOwl"}),W.enabled&&!N&&u.jsx("a",{href:"/auth/oidc/login",className:"w-full flex items-center justify-center gap-2 py-2.5 px-4 rounded-lg border border-border bg-card hover:bg-secondary text-sm font-medium transition-colors",children:J}),N&&u.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 space-y-2",children:[u.jsxs("p",{className:"text-xs text-muted-foreground",children:["A new tab opened at"," ",u.jsx("a",{href:N,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"PromptOwl"}),". If it asks for a verification code, use this:"]}),C&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"flex-1 bg-background border rounded px-2 py-1.5 text-xs font-mono break-all",children:C}),u.jsx("button",{type:"button",onClick:re,className:"px-2 py-1.5 rounded border text-xs hover:bg-secondary",children:R?"Copied":"Copy"})]})]}),!N&&ce&&u.jsxs(u.Fragment,{children:[(de||W.enabled)&&u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 flex items-center",children:u.jsx("div",{className:"w-full border-t border-border"})}),u.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:u.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"or"})})]}),u.jsxs("form",{onSubmit:K,className:"space-y-3",children:[r==="register"&&u.jsx("input",{type:"text",placeholder:"Name",value:g,onChange:I=>v(I.target.value),className:"w-full px-3 py-2 rounded-md border border-input bg-background text-sm"}),u.jsx("input",{type:"email",placeholder:"Email",value:a,onChange:I=>c(I.target.value),required:!0,className:"w-full px-3 py-2 rounded-md border border-input bg-background text-sm"}),u.jsxs("div",{className:"relative",children:[u.jsx("input",{type:T?"text":"password",placeholder:"Password",value:d,onChange:I=>p(I.target.value),required:!0,className:"w-full px-3 py-2 pr-9 rounded-md border border-input bg-background text-sm"}),u.jsx("button",{type:"button",onClick:()=>G(I=>!I),"aria-label":T?"Hide password":"Show password",tabIndex:-1,className:"absolute inset-y-0 right-0 flex items-center px-2 text-muted-foreground hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-r-md",children:T?u.jsx(jv,{className:"h-4 w-4"}):u.jsx(Tv,{className:"h-4 w-4"})})]}),u.jsx("button",{type:"submit",disabled:x,className:"w-full py-2.5 px-4 rounded-lg bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 disabled:opacity-50",children:x?"...":r==="register"?"Create Account":"Login"})]})]}),w&&u.jsx("p",{className:"text-sm text-destructive text-center",children:w}),!N&&ce&&fe&&u.jsx("p",{className:"text-xs text-center text-muted-foreground",children:r==="login"?u.jsxs(u.Fragment,{children:["No account?"," ",u.jsx("button",{onClick:()=>o("register"),className:"text-primary underline",children:"Register"})]}):u.jsxs(u.Fragment,{children:["Have an account?"," ",u.jsx("button",{onClick:()=>o("login"),className:"text-primary underline",children:"Login"})]})}),!N&&!ce&&!de&&!W.enabled&&u.jsx("p",{className:"text-sm text-center text-muted-foreground",children:"Sign-in is restricted on this server. Contact your admin for access."}),q==="admin-only"&&!ge&&!N&&u.jsx("p",{className:"text-xs text-center text-muted-foreground",children:u.jsx("a",{href:"?admin=1",className:"text-primary underline",children:"Admin sign-in"})})]})})}var mi=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(){}},Bs,fs,Ko,hv,lN=(hv=class extends mi{constructor(){super();ke(this,Bs);ke(this,fs);ke(this,Ko);ue(this,Ko,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){P(this,fs)||this.setEventListener(P(this,Ko))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,fs))==null||t.call(this),ue(this,fs,void 0))}setEventListener(t){var r;ue(this,Ko,t),(r=P(this,fs))==null||r.call(this),ue(this,fs,t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(t){P(this,Bs)!==t&&(ue(this,Bs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof P(this,Bs)=="boolean"?P(this,Bs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Bs=new WeakMap,fs=new WeakMap,Ko=new WeakMap,hv),rp=new lN,cN={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ps,Kf,mv,uN=(mv=class{constructor(){ke(this,ps,cN);ke(this,Kf,!1)}setTimeoutProvider(e){ue(this,ps,e)}setTimeout(e,t){return P(this,ps).setTimeout(e,t)}clearTimeout(e){P(this,ps).clearTimeout(e)}setInterval(e,t){return P(this,ps).setInterval(e,t)}clearInterval(e){P(this,ps).clearInterval(e)}},ps=new WeakMap,Kf=new WeakMap,mv),Vs=new uN;function dN(e){setTimeout(e,0)}var fN=typeof window>"u"||"Deno"in globalThis;function Zt(){}function pN(e,t){return typeof e=="function"?e(t):e}function of(e){return typeof e=="number"&&e>=0&&e!==1/0}function qv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function bs(e,t){return typeof e=="function"?e(t):e}function bn(e,t){return typeof e=="function"?e(t):e}function Gg(e,t){const{type:r="all",exact:o,fetchStatus:a,predicate:c,queryKey:d,stale:p}=e;if(d){if(o){if(t.queryHash!==sp(d,t.options))return!1}else if(!di(t.queryKey,d))return!1}if(r!=="all"){const g=t.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof p=="boolean"&&t.isStale()!==p||a&&a!==t.state.fetchStatus||c&&!c(t))}function Zg(e,t){const{exact:r,status:o,predicate:a,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(r){if(ca(t.options.mutationKey)!==ca(c))return!1}else if(!di(t.options.mutationKey,c))return!1}return!(o&&t.state.status!==o||a&&!a(t))}function sp(e,t){return((t==null?void 0:t.queryKeyHashFn)||ca)(e)}function ca(e){return JSON.stringify(e,(t,r)=>af(r)?Object.keys(r).sort().reduce((o,a)=>(o[a]=r[a],o),{}):r)}function di(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let o=0;o<t.length;o++)if(!di(e[o],t[o]))return!1;return!0}const r=Object.keys(t);for(const o of r)if(!di(e[o],t[o]))return!1;return!0}return!1}var hN=Object.prototype.hasOwnProperty;function op(e,t,r=0){if(e===t)return e;if(r>500)return t;const o=Jg(e)&&Jg(t);if(!o&&!(af(e)&&af(t)))return t;const c=(o?e:Object.keys(e)).length,d=o?t:Object.keys(t),p=d.length,g=o?new Array(p):{};let v=0;for(let w=0;w<p;w++){const f=o?w:d[w],x=e[f],S=t[f];if(x===S){g[f]=x,(o?w<c:hN.call(e,f))&&v++;continue}if(x===null||S===null||typeof x!="object"||typeof S!="object"){g[f]=S;continue}const N=op(x,S,r+1);g[f]=N,N===x&&v++}return c===p&&v===c?e:g}function cc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Jg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function af(e){if(!Yg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Yg(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Yg(e){return Object.prototype.toString.call(e)==="[object Object]"}function mN(e){return new Promise(t=>{Vs.setTimeout(t,e)})}function lf(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?op(e,t):t}function gN(e,t,r=0){const o=[...e,t];return r&&o.length>r?o.slice(1):o}function yN(e,t,r=0){const o=[t,...e];return r&&o.length>r?o.slice(0,-1):o}var ip=Symbol();function Kv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ip?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Qv(e,t){return typeof e=="function"?e(...t):!!e}function vN(e,t,r){let o=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),o||(o=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var ua=(()=>{let e=()=>fN;return{isServer(){return e()},setIsServer(t){e=t}}})();function cf(){let e,t;const r=new Promise((a,c)=>{e=a,t=c});r.status="pending",r.catch(()=>{});function o(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{o({status:"fulfilled",value:a}),e(a)},r.reject=a=>{o({status:"rejected",reason:a}),t(a)},r}var wN=dN;function xN(){let e=[],t=0,r=p=>{p()},o=p=>{p()},a=wN;const c=p=>{t?e.push(p):a(()=>{r(p)})},d=()=>{const p=e;e=[],p.length&&a(()=>{o(()=>{p.forEach(g=>{r(g)})})})};return{batch:p=>{let g;t++;try{g=p()}finally{t--,t||d()}return g},batchCalls:p=>(...g)=>{c(()=>{p(...g)})},schedule:c,setNotifyFunction:p=>{r=p},setBatchNotifyFunction:p=>{o=p},setScheduler:p=>{a=p}}}var yt=xN(),Qo,hs,Go,gv,bN=(gv=class extends mi{constructor(){super();ke(this,Qo,!0);ke(this,hs);ke(this,Go);ue(this,Go,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}})}onSubscribe(){P(this,hs)||this.setEventListener(P(this,Go))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,hs))==null||t.call(this),ue(this,hs,void 0))}setEventListener(t){var r;ue(this,Go,t),(r=P(this,hs))==null||r.call(this),ue(this,hs,t(this.setOnline.bind(this)))}setOnline(t){P(this,Qo)!==t&&(ue(this,Qo,t),this.listeners.forEach(o=>{o(t)}))}isOnline(){return P(this,Qo)}},Qo=new WeakMap,hs=new WeakMap,Go=new WeakMap,gv),uc=new bN;function SN(e){return Math.min(1e3*2**e,3e4)}function Gv(e){return(e??"online")==="online"?uc.isOnline():!0}var uf=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Zv(e){let t=!1,r=0,o;const a=cf(),c=()=>a.status!=="pending",d=k=>{var C;if(!c()){const _=new uf(k);x(_),(C=e.onCancel)==null||C.call(e,_)}},p=()=>{t=!0},g=()=>{t=!1},v=()=>rp.isFocused()&&(e.networkMode==="always"||uc.isOnline())&&e.canRun(),w=()=>Gv(e.networkMode)&&e.canRun(),f=k=>{c()||(o==null||o(),a.resolve(k))},x=k=>{c()||(o==null||o(),a.reject(k))},S=()=>new Promise(k=>{var C;o=_=>{(c()||v())&&k(_)},(C=e.onPause)==null||C.call(e)}).then(()=>{var k;o=void 0,c()||(k=e.onContinue)==null||k.call(e)}),N=()=>{if(c())return;let k;const C=r===0?e.initialPromise:void 0;try{k=C??e.fn()}catch(_){k=Promise.reject(_)}Promise.resolve(k).then(f).catch(_=>{var q;if(c())return;const R=e.retry??(ua.isServer()?0:3),D=e.retryDelay??SN,T=typeof D=="function"?D(r,_):D,G=R===!0||typeof R=="number"&&r<R||typeof R=="function"&&R(r,_);if(t||!G){x(_);return}r++,(q=e.onFail)==null||q.call(e,r,_),mN(T).then(()=>v()?void 0:S()).then(()=>{t?x(_):N()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(o==null||o(),a),cancelRetry:p,continueRetry:g,canStart:w,start:()=>(w()?N():S().then(N),a)}}var Ws,yv,Jv=(yv=class{constructor(){ke(this,Ws)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),of(this.gcTime)&&ue(this,Ws,Vs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ua.isServer()?1/0:300*1e3))}clearGcTimeout(){P(this,Ws)!==void 0&&(Vs.clearTimeout(P(this,Ws)),ue(this,Ws,void 0))}},Ws=new WeakMap,yv);function kN(e){return{onFetch:(t,r)=>{var w,f,x,S,N;const o=t.options,a=(x=(f=(w=t.fetchOptions)==null?void 0:w.meta)==null?void 0:f.fetchMore)==null?void 0:x.direction,c=((S=t.state.data)==null?void 0:S.pages)||[],d=((N=t.state.data)==null?void 0:N.pageParams)||[];let p={pages:[],pageParams:[]},g=0;const v=async()=>{let k=!1;const C=D=>{vN(D,()=>t.signal,()=>k=!0)},_=Kv(t.options,t.fetchOptions),R=async(D,T,G)=>{if(k)return Promise.reject(t.signal.reason);if(T==null&&D.pages.length)return Promise.resolve(D);const A=(()=>{const oe={client:t.client,queryKey:t.queryKey,pageParam:T,direction:G?"backward":"forward",meta:t.options.meta};return C(oe),oe})(),M=await _(A),{maxPages:Y}=t.options,W=G?yN:gN;return{pages:W(D.pages,M,Y),pageParams:W(D.pageParams,T,Y)}};if(a&&c.length){const D=a==="backward",T=D?_N:Xg,G={pages:c,pageParams:d},q=T(o,G);p=await R(G,q,D)}else{const D=e??c.length;do{const T=g===0?d[0]??o.initialPageParam:Xg(o,p);if(g>0&&T==null)break;p=await R(p,T),g++}while(g<D)}return p};t.options.persister?t.fetchFn=()=>{var k,C;return(C=(k=t.options).persister)==null?void 0:C.call(k,v,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=v}}}function Xg(e,{pages:t,pageParams:r}){const o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,r[o],r):void 0}function _N(e,{pages:t,pageParams:r}){var o;return t.length>0?(o=e.getPreviousPageParam)==null?void 0:o.call(e,t[0],t,r[0],r):void 0}var Zo,Hs,Jo,$n,qs,Tt,ga,Ks,xn,Yv,Tr,vv,CN=(vv=class extends Jv{constructor(t){super();ke(this,xn);ke(this,Zo);ke(this,Hs);ke(this,Jo);ke(this,$n);ke(this,qs);ke(this,Tt);ke(this,ga);ke(this,Ks);ue(this,Ks,!1),ue(this,ga,t.defaultOptions),this.setOptions(t.options),this.observers=[],ue(this,qs,t.client),ue(this,$n,P(this,qs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ue(this,Hs,ty(this.options)),this.state=t.state??P(this,Hs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return P(this,Zo)}get promise(){var t;return(t=P(this,Tt))==null?void 0:t.promise}setOptions(t){if(this.options={...P(this,ga),...t},t!=null&&t._type&&ue(this,Zo,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=ty(this.options);r.data!==void 0&&(this.setState(ey(r.data,r.dataUpdatedAt)),ue(this,Hs,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,$n).remove(this)}setData(t,r){const o=lf(this.state.data,t,this.options);return $e(this,xn,Tr).call(this,{data:o,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),o}setState(t){$e(this,xn,Tr).call(this,{type:"setState",state:t})}cancel(t){var o,a;const r=(o=P(this,Tt))==null?void 0:o.promise;return(a=P(this,Tt))==null||a.cancel(t),r?r.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return P(this,Hs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>bn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ip||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>bs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!qv(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(o=>o.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=P(this,Tt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(o=>o.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=P(this,Tt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,$n).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(P(this,Tt)&&(P(this,Ks)||$e(this,xn,Yv).call(this)?P(this,Tt).cancel({revert:!0}):P(this,Tt).cancelRetry()),this.scheduleGc()),P(this,$n).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,xn,Tr).call(this,{type:"invalidate"})}async fetch(t,r){var v,w,f,x,S,N,k,C,_,R,D;if(this.state.fetchStatus!=="idle"&&((v=P(this,Tt))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(P(this,Tt))return P(this,Tt).continueRetry(),P(this,Tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(G=>G.options.queryFn);T&&this.setOptions(T.options)}const o=new AbortController,a=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(ue(this,Ks,!0),o.signal)})},c=()=>{const T=Kv(this.options,r),q=(()=>{const A={client:P(this,qs),queryKey:this.queryKey,meta:this.meta};return a(A),A})();return ue(this,Ks,!1),this.options.persister?this.options.persister(T,q,this):T(q)},p=(()=>{const T={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:P(this,qs),state:this.state,fetchFn:c};return a(T),T})(),g=P(this,Zo)==="infinite"?kN(this.options.pages):this.options.behavior;g==null||g.onFetch(p,this),ue(this,Jo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=p.fetchOptions)==null?void 0:w.meta))&&$e(this,xn,Tr).call(this,{type:"fetch",meta:(f=p.fetchOptions)==null?void 0:f.meta}),ue(this,Tt,Zv({initialPromise:r==null?void 0:r.initialPromise,fn:p.fetchFn,onCancel:T=>{T instanceof uf&&T.revert&&this.setState({...P(this,Jo),fetchStatus:"idle"}),o.abort()},onFail:(T,G)=>{$e(this,xn,Tr).call(this,{type:"failed",failureCount:T,error:G})},onPause:()=>{$e(this,xn,Tr).call(this,{type:"pause"})},onContinue:()=>{$e(this,xn,Tr).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const T=await P(this,Tt).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(S=(x=P(this,$n).config).onSuccess)==null||S.call(x,T,this),(k=(N=P(this,$n).config).onSettled)==null||k.call(N,T,this.state.error,this),T}catch(T){if(T instanceof uf){if(T.silent)return P(this,Tt).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw $e(this,xn,Tr).call(this,{type:"error",error:T}),(_=(C=P(this,$n).config).onError)==null||_.call(C,T,this),(D=(R=P(this,$n).config).onSettled)==null||D.call(R,this.state.data,T,this),T}finally{this.scheduleGc()}}},Zo=new WeakMap,Hs=new WeakMap,Jo=new WeakMap,$n=new WeakMap,qs=new WeakMap,Tt=new WeakMap,ga=new WeakMap,Ks=new WeakMap,xn=new WeakSet,Yv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Tr=function(t){const r=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Xv(o.data,this.options),fetchMeta:t.meta??null};case"success":const a={...o,...ey(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ue(this,Jo,t.manual?a:void 0),a;case"error":const c=t.error;return{...o,error:c,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=r(this.state),yt.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),P(this,$n).notify({query:this,type:"updated",action:t})})},vv);function Xv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ey(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ty(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,o=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var un,Ue,ya,Gt,Qs,Yo,Ar,ms,va,Xo,ei,Gs,Zs,gs,ti,He,ra,df,ff,pf,hf,mf,gf,yf,ew,wv,ap=(wv=class extends mi{constructor(t,r){super();ke(this,He);ke(this,un);ke(this,Ue);ke(this,ya);ke(this,Gt);ke(this,Qs);ke(this,Yo);ke(this,Ar);ke(this,ms);ke(this,va);ke(this,Xo);ke(this,ei);ke(this,Gs);ke(this,Zs);ke(this,gs);ke(this,ti,new Set);this.options=r,ue(this,un,t),ue(this,ms,null),ue(this,Ar,cf()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,Ue).addObserver(this),ny(P(this,Ue),this.options)?$e(this,He,ra).call(this):this.updateResult(),$e(this,He,hf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vf(P(this,Ue),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vf(P(this,Ue),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,He,mf).call(this),$e(this,He,gf).call(this),P(this,Ue).removeObserver(this)}setOptions(t){const r=this.options,o=P(this,Ue);if(this.options=P(this,un).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bn(this.options.enabled,P(this,Ue))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,He,yf).call(this),P(this,Ue).setOptions(this.options),r._defaulted&&!cc(this.options,r)&&P(this,un).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,Ue),observer:this});const a=this.hasListeners();a&&ry(P(this,Ue),o,this.options,r)&&$e(this,He,ra).call(this),this.updateResult(),a&&(P(this,Ue)!==o||bn(this.options.enabled,P(this,Ue))!==bn(r.enabled,P(this,Ue))||bs(this.options.staleTime,P(this,Ue))!==bs(r.staleTime,P(this,Ue)))&&$e(this,He,df).call(this);const c=$e(this,He,ff).call(this);a&&(P(this,Ue)!==o||bn(this.options.enabled,P(this,Ue))!==bn(r.enabled,P(this,Ue))||c!==P(this,gs))&&$e(this,He,pf).call(this,c)}getOptimisticResult(t){const r=P(this,un).getQueryCache().build(P(this,un),t),o=this.createResult(r,t);return EN(this,o)&&(ue(this,Gt,o),ue(this,Yo,this.options),ue(this,Qs,P(this,Ue).state)),o}getCurrentResult(){return P(this,Gt)}trackResult(t,r){return new Proxy(t,{get:(o,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&P(this,Ar).status==="pending"&&P(this,Ar).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,a))})}trackProp(t){P(this,ti).add(t)}getCurrentQuery(){return P(this,Ue)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=P(this,un).defaultQueryOptions(t),o=P(this,un).getQueryCache().build(P(this,un),r);return o.fetch().then(()=>this.createResult(o,r))}fetch(t){return $e(this,He,ra).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Gt)))}createResult(t,r){var Y;const o=P(this,Ue),a=this.options,c=P(this,Gt),d=P(this,Qs),p=P(this,Yo),v=t!==o?t.state:P(this,ya),{state:w}=t;let f={...w},x=!1,S;if(r._optimisticResults){const W=this.hasListeners(),oe=!W&&ny(t,r),ge=W&&ry(t,o,r,a);(oe||ge)&&(f={...f,...Xv(w.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:N,errorUpdatedAt:k,status:C}=f;S=f.data;let _=!1;if(r.placeholderData!==void 0&&S===void 0&&C==="pending"){let W;c!=null&&c.isPlaceholderData&&r.placeholderData===(p==null?void 0:p.placeholderData)?(W=c.data,_=!0):W=typeof r.placeholderData=="function"?r.placeholderData((Y=P(this,ei))==null?void 0:Y.state.data,P(this,ei)):r.placeholderData,W!==void 0&&(C="success",S=lf(c==null?void 0:c.data,W,r),x=!0)}if(r.select&&S!==void 0&&!_)if(c&&S===(d==null?void 0:d.data)&&r.select===P(this,va))S=P(this,Xo);else try{ue(this,va,r.select),S=r.select(S),S=lf(c==null?void 0:c.data,S,r),ue(this,Xo,S),ue(this,ms,null)}catch(W){ue(this,ms,W)}P(this,ms)&&(N=P(this,ms),S=P(this,Xo),k=Date.now(),C="error");const R=f.fetchStatus==="fetching",D=C==="pending",T=C==="error",G=D&&R,q=S!==void 0,M={status:C,fetchStatus:f.fetchStatus,isPending:D,isSuccess:C==="success",isError:T,isInitialLoading:G,isLoading:G,data:S,dataUpdatedAt:f.dataUpdatedAt,error:N,errorUpdatedAt:k,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>v.dataUpdateCount||f.errorUpdateCount>v.errorUpdateCount,isFetching:R,isRefetching:R&&!D,isLoadingError:T&&!q,isPaused:f.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:T&&q,isStale:lp(t,r),refetch:this.refetch,promise:P(this,Ar),isEnabled:bn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const W=M.data!==void 0,oe=M.status==="error"&&!W,ge=fe=>{oe?fe.reject(M.error):W&&fe.resolve(M.data)},de=()=>{const fe=ue(this,Ar,M.promise=cf());ge(fe)},ce=P(this,Ar);switch(ce.status){case"pending":t.queryHash===o.queryHash&&ge(ce);break;case"fulfilled":(oe||M.data!==ce.value)&&de();break;case"rejected":(!oe||M.error!==ce.reason)&&de();break}}return M}updateResult(){const t=P(this,Gt),r=this.createResult(P(this,Ue),this.options);if(ue(this,Qs,P(this,Ue).state),ue(this,Yo,this.options),P(this,Qs).data!==void 0&&ue(this,ei,P(this,Ue)),cc(r,t))return;ue(this,Gt,r);const o=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,c=typeof a=="function"?a():a;if(c==="all"||!c&&!P(this,ti).size)return!0;const d=new Set(c??P(this,ti));return this.options.throwOnError&&d.add("error"),Object.keys(P(this,Gt)).some(p=>{const g=p;return P(this,Gt)[g]!==t[g]&&d.has(g)})};$e(this,He,ew).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,He,hf).call(this)}},un=new WeakMap,Ue=new WeakMap,ya=new WeakMap,Gt=new WeakMap,Qs=new WeakMap,Yo=new WeakMap,Ar=new WeakMap,ms=new WeakMap,va=new WeakMap,Xo=new WeakMap,ei=new WeakMap,Gs=new WeakMap,Zs=new WeakMap,gs=new WeakMap,ti=new WeakMap,He=new WeakSet,ra=function(t){$e(this,He,yf).call(this);let r=P(this,Ue).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Zt)),r},df=function(){$e(this,He,mf).call(this);const t=bs(this.options.staleTime,P(this,Ue));if(ua.isServer()||P(this,Gt).isStale||!of(t))return;const o=qv(P(this,Gt).dataUpdatedAt,t)+1;ue(this,Gs,Vs.setTimeout(()=>{P(this,Gt).isStale||this.updateResult()},o))},ff=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,Ue)):this.options.refetchInterval)??!1},pf=function(t){$e(this,He,gf).call(this),ue(this,gs,t),!(ua.isServer()||bn(this.options.enabled,P(this,Ue))===!1||!of(P(this,gs))||P(this,gs)===0)&&ue(this,Zs,Vs.setInterval(()=>{(this.options.refetchIntervalInBackground||rp.isFocused())&&$e(this,He,ra).call(this)},P(this,gs)))},hf=function(){$e(this,He,df).call(this),$e(this,He,pf).call(this,$e(this,He,ff).call(this))},mf=function(){P(this,Gs)!==void 0&&(Vs.clearTimeout(P(this,Gs)),ue(this,Gs,void 0))},gf=function(){P(this,Zs)!==void 0&&(Vs.clearInterval(P(this,Zs)),ue(this,Zs,void 0))},yf=function(){const t=P(this,un).getQueryCache().build(P(this,un),this.options);if(t===P(this,Ue))return;const r=P(this,Ue);ue(this,Ue,t),ue(this,ya,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},ew=function(t){yt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(P(this,Gt))}),P(this,un).getQueryCache().notify({query:P(this,Ue),type:"observerResultsUpdated"})})},wv);function NN(e,t){return bn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&bn(t.retryOnMount,e)===!1)}function ny(e,t){return NN(e,t)||e.state.data!==void 0&&vf(e,t,t.refetchOnMount)}function vf(e,t,r){if(bn(t.enabled,e)!==!1&&bs(t.staleTime,e)!=="static"){const o=typeof r=="function"?r(e):r;return o==="always"||o!==!1&&lp(e,t)}return!1}function ry(e,t,r,o){return(e!==t||bn(o.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&lp(e,r)}function lp(e,t){return bn(t.enabled,e)!==!1&&e.isStaleByTime(bs(t.staleTime,e))}function EN(e,t){return!cc(e.getCurrentResult(),t)}var wa,dr,Vt,Js,fr,us,xv,ON=(xv=class extends Jv{constructor(t){super();ke(this,fr);ke(this,wa);ke(this,dr);ke(this,Vt);ke(this,Js);ue(this,wa,t.client),this.mutationId=t.mutationId,ue(this,Vt,t.mutationCache),ue(this,dr,[]),this.state=t.state||PN(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,dr).includes(t)||(P(this,dr).push(t),this.clearGcTimeout(),P(this,Vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ue(this,dr,P(this,dr).filter(r=>r!==t)),this.scheduleGc(),P(this,Vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,dr).length||(this.state.status==="pending"?this.scheduleGc():P(this,Vt).remove(this))}continue(){var t;return((t=P(this,Js))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,p,g,v,w,f,x,S,N,k,C,_,R,D,T,G,q,A;const r=()=>{$e(this,fr,us).call(this,{type:"continue"})},o={client:P(this,wa),meta:this.options.meta,mutationKey:this.options.mutationKey};ue(this,Js,Zv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(M,Y)=>{$e(this,fr,us).call(this,{type:"failed",failureCount:M,error:Y})},onPause:()=>{$e(this,fr,us).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Vt).canRun(this)}));const a=this.state.status==="pending",c=!P(this,Js).canStart();try{if(a)r();else{$e(this,fr,us).call(this,{type:"pending",variables:t,isPaused:c}),P(this,Vt).config.onMutate&&await P(this,Vt).config.onMutate(t,this,o);const Y=await((p=(d=this.options).onMutate)==null?void 0:p.call(d,t,o));Y!==this.state.context&&$e(this,fr,us).call(this,{type:"pending",context:Y,variables:t,isPaused:c})}const M=await P(this,Js).start();return await((v=(g=P(this,Vt).config).onSuccess)==null?void 0:v.call(g,M,t,this.state.context,this,o)),await((f=(w=this.options).onSuccess)==null?void 0:f.call(w,M,t,this.state.context,o)),await((S=(x=P(this,Vt).config).onSettled)==null?void 0:S.call(x,M,null,this.state.variables,this.state.context,this,o)),await((k=(N=this.options).onSettled)==null?void 0:k.call(N,M,null,t,this.state.context,o)),$e(this,fr,us).call(this,{type:"success",data:M}),M}catch(M){try{await((_=(C=P(this,Vt).config).onError)==null?void 0:_.call(C,M,t,this.state.context,this,o))}catch(Y){Promise.reject(Y)}try{await((D=(R=this.options).onError)==null?void 0:D.call(R,M,t,this.state.context,o))}catch(Y){Promise.reject(Y)}try{await((G=(T=P(this,Vt).config).onSettled)==null?void 0:G.call(T,void 0,M,this.state.variables,this.state.context,this,o))}catch(Y){Promise.reject(Y)}try{await((A=(q=this.options).onSettled)==null?void 0:A.call(q,void 0,M,t,this.state.context,o))}catch(Y){Promise.reject(Y)}throw $e(this,fr,us).call(this,{type:"error",error:M}),M}finally{P(this,Vt).runNext(this)}}},wa=new WeakMap,dr=new WeakMap,Vt=new WeakMap,Js=new WeakMap,fr=new WeakSet,us=function(t){const r=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),yt.batch(()=>{P(this,dr).forEach(o=>{o.onMutationUpdate(t)}),P(this,Vt).notify({mutation:this,type:"updated",action:t})})},xv);function PN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mr,Hn,xa,bv,jN=(bv=class extends mi{constructor(t={}){super();ke(this,Mr);ke(this,Hn);ke(this,xa);this.config=t,ue(this,Mr,new Set),ue(this,Hn,new Map),ue(this,xa,0)}build(t,r,o){const a=new ON({client:t,mutationCache:this,mutationId:++Ll(this,xa)._,options:t.defaultMutationOptions(r),state:o});return this.add(a),a}add(t){P(this,Mr).add(t);const r=Vl(t);if(typeof r=="string"){const o=P(this,Hn).get(r);o?o.push(t):P(this,Hn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,Mr).delete(t)){const r=Vl(t);if(typeof r=="string"){const o=P(this,Hn).get(r);if(o)if(o.length>1){const a=o.indexOf(t);a!==-1&&o.splice(a,1)}else o[0]===t&&P(this,Hn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Vl(t);if(typeof r=="string"){const o=P(this,Hn).get(r),a=o==null?void 0:o.find(c=>c.state.status==="pending");return!a||a===t}else return!0}runNext(t){var o;const r=Vl(t);if(typeof r=="string"){const a=(o=P(this,Hn).get(r))==null?void 0:o.find(c=>c!==t&&c.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){yt.batch(()=>{P(this,Mr).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,Mr).clear(),P(this,Hn).clear()})}getAll(){return Array.from(P(this,Mr))}find(t){const r={exact:!0,...t};return this.getAll().find(o=>Zg(r,o))}findAll(t={}){return this.getAll().filter(r=>Zg(t,r))}notify(t){yt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return yt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Zt))))}},Mr=new WeakMap,Hn=new WeakMap,xa=new WeakMap,bv);function Vl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function sy(e,t){const r=new Set(t);return e.filter(o=>!r.has(o))}function TN(e,t,r){const o=e.slice(0);return o[t]=r,o}var ni,dn,ri,Ys,wn,ys,ba,Sa,ka,_a,_t,wf,xf,tw,bf,Sf,kf,Sv,RN=(Sv=class extends mi{constructor(t,r,o){super();ke(this,_t);ke(this,ni);ke(this,dn);ke(this,ri);ke(this,Ys);ke(this,wn);ke(this,ys);ke(this,ba);ke(this,Sa);ke(this,ka);ke(this,_a,[]);ue(this,ni,t),ue(this,Ys,o),ue(this,ri,[]),ue(this,wn,[]),ue(this,dn,[]),this.setQueries(r)}onSubscribe(){this.listeners.size===1&&P(this,wn).forEach(t=>{t.subscribe(r=>{$e(this,_t,Sf).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,P(this,wn).forEach(t=>{t.destroy()})}setQueries(t,r){ue(this,ri,t),ue(this,Ys,r),yt.batch(()=>{const o=P(this,wn),a=$e(this,_t,bf).call(this,P(this,ri));a.forEach(f=>f.observer.setOptions(f.defaultedQueryOptions));const c=a.map(f=>f.observer),d=c.map(f=>f.getCurrentResult()),p=o.length!==c.length,g=c.some((f,x)=>f!==o[x]),v=p||g,w=v?!0:d.some((f,x)=>{const S=P(this,dn)[x];return!S||!cc(f,S)});!v&&!w||(v&&(ue(this,_a,a),ue(this,wn,c)),ue(this,dn,d),this.hasListeners()&&(v&&(sy(o,c).forEach(f=>{f.destroy()}),sy(c,o).forEach(f=>{f.subscribe(x=>{$e(this,_t,Sf).call(this,f,x)})})),$e(this,_t,kf).call(this)))})}getCurrentResult(){return P(this,dn)}getQueries(){return P(this,wn).map(t=>t.getCurrentQuery())}getObservers(){return P(this,wn)}getOptimisticResult(t,r){const o=$e(this,_t,bf).call(this,t),a=o.map(d=>d.observer.getOptimisticResult(d.defaultedQueryOptions)),c=o.map(d=>d.defaultedQueryOptions.queryHash);return[a,d=>$e(this,_t,xf).call(this,d??a,r,c),()=>$e(this,_t,wf).call(this,a,o)]}},ni=new WeakMap,dn=new WeakMap,ri=new WeakMap,Ys=new WeakMap,wn=new WeakMap,ys=new WeakMap,ba=new WeakMap,Sa=new WeakMap,ka=new WeakMap,_a=new WeakMap,_t=new WeakSet,wf=function(t,r){return r.map((o,a)=>{const c=t[a];return o.defaultedQueryOptions.notifyOnChangeProps?c:o.observer.trackResult(c,d=>{r.forEach(p=>{p.observer.trackProp(d)})})})},xf=function(t,r,o){if(r){const a=P(this,ka),c=o!==void 0&&a!==void 0&&(a.length!==o.length||o.some((d,p)=>d!==a[p]));return(!P(this,ys)||P(this,dn)!==P(this,Sa)||c||r!==P(this,ba))&&(ue(this,ba,r),ue(this,Sa,P(this,dn)),o!==void 0&&ue(this,ka,o),ue(this,ys,op(P(this,ys),r(t)))),P(this,ys)}return t},tw=function(){var t;return((t=P(this,Ys))==null?void 0:t.combine)!==void 0&&P(this,wn).some((r,o)=>{var a;return r.options.suspense&&((a=P(this,dn)[o])==null?void 0:a.data)===void 0})},bf=function(t){const r=new Map;P(this,wn).forEach(a=>{const c=a.options.queryHash;if(!c)return;const d=r.get(c);d?d.push(a):r.set(c,[a])});const o=[];return t.forEach(a=>{var g;const c=P(this,ni).defaultQueryOptions(a),p=((g=r.get(c.queryHash))==null?void 0:g.shift())??new ap(P(this,ni),c);o.push({defaultedQueryOptions:c,observer:p})}),o},Sf=function(t,r){const o=P(this,wn).indexOf(t);o!==-1&&(ue(this,dn,TN(P(this,dn),o,r)),$e(this,_t,kf).call(this))},kf=function(){var t;if(this.hasListeners()){const r=$e(this,_t,wf).call(this,P(this,dn),P(this,_a)),o=$e(this,_t,tw).call(this),a=P(this,ys),c=o?a:$e(this,_t,xf).call(this,r,(t=P(this,Ys))==null?void 0:t.combine);(o||a!==c)&&yt.batch(()=>{this.listeners.forEach(d=>{d(P(this,dn))})})}},Sv),pr,kv,AN=(kv=class extends mi{constructor(t={}){super();ke(this,pr);this.config=t,ue(this,pr,new Map)}build(t,r,o){const a=r.queryKey,c=r.queryHash??sp(a,r);let d=this.get(c);return d||(d=new CN({client:t,queryKey:a,queryHash:c,options:t.defaultQueryOptions(r),state:o,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){P(this,pr).has(t.queryHash)||(P(this,pr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=P(this,pr).get(t.queryHash);r&&(t.destroy(),r===t&&P(this,pr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){yt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,pr).get(t)}getAll(){return[...P(this,pr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(o=>Gg(r,o))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(o=>Gg(t,o)):r}notify(t){yt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){yt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){yt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pr=new WeakMap,kv),lt,vs,ws,si,oi,xs,ii,ai,_v,MN=(_v=class{constructor(e={}){ke(this,lt);ke(this,vs);ke(this,ws);ke(this,si);ke(this,oi);ke(this,xs);ke(this,ii);ke(this,ai);ue(this,lt,e.queryCache||new AN),ue(this,vs,e.mutationCache||new jN),ue(this,ws,e.defaultOptions||{}),ue(this,si,new Map),ue(this,oi,new Map),ue(this,xs,0)}mount(){Ll(this,xs)._++,P(this,xs)===1&&(ue(this,ii,rp.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,lt).onFocus())})),ue(this,ai,uc.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,lt).onOnline())})))}unmount(){var e,t;Ll(this,xs)._--,P(this,xs)===0&&((e=P(this,ii))==null||e.call(this),ue(this,ii,void 0),(t=P(this,ai))==null||t.call(this),ue(this,ai,void 0))}isFetching(e){return P(this,lt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,vs).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=P(this,lt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=P(this,lt).build(this,t),o=r.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(bs(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return P(this,lt).findAll(e).map(({queryKey:t,state:r})=>{const o=r.data;return[t,o]})}setQueryData(e,t,r){const o=this.defaultQueryOptions({queryKey:e}),a=P(this,lt).get(o.queryHash),c=a==null?void 0:a.state.data,d=pN(t,c);if(d!==void 0)return P(this,lt).build(this,o).setData(d,{...r,manual:!0})}setQueriesData(e,t,r){return yt.batch(()=>P(this,lt).findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=P(this,lt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=P(this,lt);yt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=P(this,lt);return yt.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},o=yt.batch(()=>P(this,lt).findAll(e).map(a=>a.cancel(r)));return Promise.all(o).then(Zt).catch(Zt)}invalidateQueries(e,t={}){return yt.batch(()=>(P(this,lt).findAll(e).forEach(r=>{r.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={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},o=yt.batch(()=>P(this,lt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let c=a.fetch(void 0,r);return r.throwOnError||(c=c.catch(Zt)),a.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(o).then(Zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=P(this,lt).build(this,t);return r.isStaleByTime(bs(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zt).catch(Zt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zt).catch(Zt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return uc.isOnline()?P(this,vs).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,lt)}getMutationCache(){return P(this,vs)}getDefaultOptions(){return P(this,ws)}setDefaultOptions(e){ue(this,ws,e)}setQueryDefaults(e,t){P(this,si).set(ca(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,si).values()],r={};return t.forEach(o=>{di(e,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(e,t){P(this,oi).set(ca(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,oi).values()],r={};return t.forEach(o=>{di(e,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,ws).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sp(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===ip&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,ws).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,lt).clear(),P(this,vs).clear()}},lt=new WeakMap,vs=new WeakMap,ws=new WeakMap,si=new WeakMap,oi=new WeakMap,xs=new WeakMap,ii=new WeakMap,ai=new WeakMap,_v),nw=y.createContext(void 0),Oc=e=>{const t=y.useContext(nw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$N=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(nw.Provider,{value:e,children:t})),rw=y.createContext(!1),sw=()=>y.useContext(rw);rw.Provider;function IN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var DN=y.createContext(IN()),ow=()=>y.useContext(DN),iw=(e,t,r)=>{const o=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Qv(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(t.isReset()||(e.retryOnMount=!1))},aw=e=>{y.useEffect(()=>{e.clearReset()},[e])},lw=({result:e,errorResetBoundary:t,throwOnError:r,query:o,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(a&&e.data===void 0||Qv(r,[e.error,o])),cw=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...a)=>r(o(...a)):r(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},LN=(e,t)=>e.isLoading&&e.isFetching&&!t,_f=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Cf=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function zN({queries:e,...t},r){const o=Oc(),a=sw(),c=ow(),d=y.useMemo(()=>e.map(k=>{const C=o.defaultQueryOptions(k);return C._optimisticResults=a?"isRestoring":"optimistic",C}),[e,o,a]);d.forEach(k=>{cw(k);const C=o.getQueryCache().get(k.queryHash);iw(k,c,C)}),aw(c);const[p]=y.useState(()=>new RN(o,d,t)),[g,v,w]=p.getOptimisticResult(d,t.combine),f=!a&&t.subscribed!==!1;y.useSyncExternalStore(y.useCallback(k=>f?p.subscribe(yt.batchCalls(k)):Zt,[p,f]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),y.useEffect(()=>{p.setQueries(d,t)},[d,t,p]);const S=g.some((k,C)=>_f(d[C],k))?g.flatMap((k,C)=>{const _=d[C];if(_&&_f(_,k)){const R=new ap(o,_);return Cf(_,R,c)}return[]}):[];if(S.length>0)throw Promise.all(S);const N=g.find((k,C)=>{const _=d[C];return _&&lw({result:k,errorResetBoundary:c,throwOnError:_.throwOnError,query:o.getQueryCache().get(_.queryHash),suspense:_.suspense})});if(N!=null&&N.error)throw N.error;return v(w())}function FN(e,t,r){var S,N,k,C;const o=sw(),a=ow(),c=Oc(),d=c.defaultQueryOptions(e);(N=(S=c.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||N.call(S,d);const p=c.getQueryCache().get(d.queryHash),g=e.subscribed!==!1;d._optimisticResults=o?"isRestoring":g?"optimistic":void 0,cw(d),iw(d,a,p),aw(a);const v=!c.getQueryCache().get(d.queryHash),[w]=y.useState(()=>new t(c,d)),f=w.getOptimisticResult(d),x=!o&&g;if(y.useSyncExternalStore(y.useCallback(_=>{const R=x?w.subscribe(yt.batchCalls(_)):Zt;return w.updateResult(),R},[w,x]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),y.useEffect(()=>{w.setOptions(d)},[d,w]),_f(d,f))throw Cf(d,w,a);if(lw({result:f,errorResetBoundary:a,throwOnError:d.throwOnError,query:p,suspense:d.suspense}))throw f.error;if((C=(k=c.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||C.call(k,d,f),d.experimental_prefetchInRender&&!ua.isServer()&&LN(f,o)){const _=v?Cf(d,w,a):p==null?void 0:p.promise;_==null||_.catch(Zt).finally(()=>{w.updateResult()})}return d.notifyOnChangeProps?f:w.trackResult(f)}function Ir(e,t){return FN(e,ap)}const L={nests:["nests"],nestList:(e=!1)=>[...L.nestListAll(),e?"archived":"live"],nestListAll:()=>[...L.nests,"list"],unsynced:()=>[...L.nests,"unsynced"],nest:e=>[...L.nests,"detail",e],settings:e=>[...L.nest(e),"settings"],nodes:e=>[...L.nest(e),"nodes"],folderNodes:(e,t)=>[...L.nodes(e),"folder",t],nodesMeta:(e,t=!1)=>[...L.nodes(e),"meta",t?"approved":"all"],census:e=>[...L.nodes(e),"census"],stewards:e=>[...L.nest(e),"stewards"],collaborators:e=>[...L.nest(e),"collaborators"],mentionable:e=>[...L.nest(e),"mentionable"],definitions:e=>[...L.nest(e),"definitions"],commentCounts:e=>[...L.nest(e),"comment-counts"],overview:e=>[...L.nest(e),"overview"],tags:e=>[...L.nest(e),"tags"],graph:e=>[...L.nest(e),"graph"],edgeTypes:e=>[...L.nest(e),"edge-types"],edges:e=>[...L.nest(e),"edges"],schedules:e=>[...L.nest(e),"schedules"],env:e=>[...L.nest(e),"env"],connectors:e=>[...L.nest(e),"connectors"],nestTeams:e=>[...L.nest(e),"teams"],externalEdits:e=>[...L.nest(e),"external-edits"],externalEditCount:e=>[...L.externalEdits(e),"count"],hooks:(e,t)=>[...L.nest(e),"hooks",t??"all"],reviewQueue:(e,t)=>[...L.nest(e),"review-queue",t],deletionRequests:(e,t)=>[...L.nest(e),"deletion-requests",t],feed:(e,t,r,o)=>[...L.nest(e),"feed",t,r,o],node:(e,t)=>[...L.nodes(e),"node",t],nodeVersions:(e,t)=>[...L.node(e,t),"versions"],nodeReviews:(e,t)=>[...L.node(e,t),"reviews"],nodeStewards:(e,t)=>[...L.node(e,t),"stewards"],nodeWatchers:(e,t)=>[...L.node(e,t),"watchers"],nodeAnnotations:(e,t)=>[...L.node(e,t),"annotations"],nodePendingEdit:(e,t)=>[...L.node(e,t),"external-edit"],nodeComments:(e,t,r)=>[...L.node(e,t),"comments",r],nodeActivity:(e,t,r)=>[...L.node(e,t),"activity",r],people:["people"],peopleSuggest:e=>[...L.people,"suggest",e],teams:["teams"],teamList:()=>[...L.teams,"list"],team:e=>[...L.teams,"detail",e],promptowlTeams:()=>[...L.teams,"promptowl"],admin:["admin"],adminSettings:()=>[...L.admin,"settings"],superAdmins:()=>[...L.admin,"super-admins"],communitySites:()=>[...L.admin,"community-sites"],auth:["auth"],teammates:()=>[...L.auth,"teammates"],apiKeys:()=>[...L.auth,"keys"],license:["license"],licenseStatus:()=>[...L.license,"status"],me:["me"],myWork:(e,t)=>[...L.me,"work",e??null,t??null],myDrafts:(e,t,r,o)=>[...L.me,"drafts",e??null,t??null,r??null,o??null],health:["health"],search:["search"],globalSearch:(e,t)=>[...L.search,"global",e,t]},Te={reference:5*6e4,listing:3e4,governance:5e3,content:0};function UN(e,t){const r=t==null?void 0:t.status;return r===401||r===403||r===404?!1:e<2}function VN(){return new MN({defaultOptions:{queries:{retry:UN,gcTime:5*6e4,retryOnMount:!0}}})}const BN=[{match:/^\/nodes\/(.+)\/(?:comments|annotations)(?:\/|$)/,affects:(e,t)=>[L.node(e,t[1]),L.commentCounts(e),[...L.nest(e),"feed"]]},{match:/^\/nodes\/(.+)\/watchers(?:\/|$|\?)/,affects:(e,t)=>[L.nodeWatchers(e,t[1])]},{match:/^\/nodes\/(.+)\/(?:approve|reject|submit-review|revert|external-edits)(?:\/|$)/,affects:e=>[L.nodes(e),[...L.nest(e),"review-queue"],L.externalEdits(e),[...L.nest(e),"feed"],L.me]},{match:/^\/nodes\/(.+)\/request-deletion(?:\/|$)/,affects:e=>[[...L.nest(e),"deletion-requests"],L.me]},{match:/^\/nodes\/(.+)\/move(?:\/|$)/,affects:(e,t)=>[L.node(e,t[1]),L.nodes(e),L.nestListAll(),[...L.nest(e),"feed"]]},{match:/^\/nodes(?:\/)?$/,affects:e=>[L.nodes(e),L.nestListAll(),L.search,[...L.nest(e),"feed"]]},{match:/^\/nodes\/(.+)$/,affects:(e,t)=>[L.node(e,t[1]),L.nodes(e),L.nestListAll(),L.search,[...L.nest(e),"feed"]]},{match:/^\/stewards/,affects:e=>[L.stewards(e),L.mentionable(e),L.nest(e)]},{match:/^\/collaborators/,affects:e=>[L.collaborators(e),L.mentionable(e),L.nest(e)]},{match:/^\/teams/,affects:e=>[L.nestTeams(e),L.teams,L.collaborators(e),L.mentionable(e),L.nest(e)]},{match:/^\/settings/,affects:e=>[L.nest(e)]},{match:/^\/visibility/,affects:e=>[L.nest(e),L.nestListAll()]},{match:/^\/reader-mode/,affects:e=>[L.nest(e),L.nestListAll()]},{match:/^\/definitions/,affects:e=>[L.definitions(e)]},{match:/^\/edges/,affects:e=>[L.edges(e),L.graph(e)]},{match:/^\/edge-types/,affects:e=>[L.edgeTypes(e),L.edges(e)]},{match:/^\/env/,affects:e=>[L.env(e)]},{match:/^\/hooks/,affects:e=>[[...L.nest(e),"hooks"]]},{match:/^\/schedules/,affects:e=>[L.schedules(e)]},{match:/^\/connectors/,affects:e=>[L.connectors(e)]},{match:/^\/external-edits/,affects:e=>[L.externalEdits(e),L.nodes(e)]},{match:/^\/deletion-requests/,affects:e=>[[...L.nest(e),"deletion-requests"],L.nodes(e),L.nestListAll(),L.me]},{match:/^\/(delete-folder|request-deletion)/,affects:e=>[L.nodes(e),L.nestListAll()]},{match:/^\/(archive|restore)/,affects:e=>[L.nest(e),L.nestListAll(),L.me,L.search]},{match:/^\/pin/,affects:()=>[L.nestList()]}];function WN(e,t){var a;const r=c=>void e.invalidateQueries({queryKey:c}),o=(a=t.match(/^\/nests\/([^/?]+)/))==null?void 0:a[1];if(o&&o!=="import"&&o!=="unsynced"){const c=t.slice(`/nests/${o}`.length).split("?")[0];for(const d of BN){const p=c.match(d.match);if(p){for(const g of d.affects(o,p))r(g);return}}r(L.nest(o)),r(L.nestListAll());return}if(t.startsWith("/nests")){r(L.nestListAll()),r(L.unsynced());return}if(t.startsWith("/teams")){r(L.teams),r(L.nests);return}if(t.startsWith("/admin")){r(L.admin),r(L.auth),r(L.people),r(L.nests);return}if(t.startsWith("/auth")){r(L.auth);return}if(t.startsWith("/license")){r(L.license);return}t.startsWith("/me")&&r(L.me)}function HN(e){G_({clear:()=>e.clear(),invalidatePath:t=>WN(e,t)})}const Wt={nestList:(e=!1)=>({queryKey:L.nestList(e),queryFn:()=>oC({archived:e}),staleTime:Te.reference}),unsynced:()=>({queryKey:L.unsynced(),queryFn:()=>cC(),staleTime:Te.listing}),nest:e=>({queryKey:L.nest(e),queryFn:()=>uC(e),staleTime:Te.reference}),settings:e=>({queryKey:L.settings(e),queryFn:()=>sC(e),staleTime:Te.reference}),nodes:e=>({queryKey:L.nodes(e),queryFn:()=>fC(e),staleTime:Te.listing}),folderNodes:(e,t)=>({queryKey:L.folderNodes(e,t),queryFn:()=>pC(e,t),staleTime:Te.listing}),nodesMeta:(e,t=!1)=>({queryKey:L.nodesMeta(e,t),queryFn:()=>hC(e,t),staleTime:Te.listing}),census:e=>({queryKey:L.census(e),queryFn:()=>mC(e),staleTime:Te.listing}),stewards:e=>({queryKey:L.stewards(e),queryFn:()=>_C(e),staleTime:Te.reference}),collaborators:e=>({queryKey:L.collaborators(e),queryFn:()=>LC(e),staleTime:Te.reference}),mentionable:e=>({queryKey:L.mentionable(e),queryFn:()=>zC(e),staleTime:Te.reference}),peopleSuggest:e=>({queryKey:L.peopleSuggest(e),queryFn:()=>FC(e),staleTime:Te.reference}),definitions:e=>({queryKey:L.definitions(e),queryFn:()=>dC(e),staleTime:Te.reference}),commentCounts:e=>({queryKey:L.commentCounts(e),queryFn:()=>gC(e),staleTime:Te.listing}),overview:e=>({queryKey:L.overview(e),queryFn:()=>xC(e),staleTime:Te.listing}),globalSearch:(e,t)=>({queryKey:L.globalSearch(e,t),queryFn:()=>wC(e,t),staleTime:Te.listing}),tags:e=>({queryKey:L.tags(e),queryFn:()=>kC(e),staleTime:Te.reference}),graph:e=>({queryKey:L.graph(e),queryFn:()=>qC(e),staleTime:Te.listing}),edgeTypes:e=>({queryKey:L.edgeTypes(e),queryFn:()=>GC(e),staleTime:Te.reference}),edges:e=>({queryKey:L.edges(e),queryFn:()=>ZC(e),staleTime:Te.listing}),schedules:e=>({queryKey:L.schedules(e),queryFn:()=>JC(e),staleTime:Te.reference}),env:e=>({queryKey:L.env(e),queryFn:()=>XC(e),staleTime:Te.reference}),connectors:e=>({queryKey:L.connectors(e),queryFn:()=>tN(e),staleTime:Te.reference}),nestTeams:e=>({queryKey:L.nestTeams(e),queryFn:()=>HC(e),staleTime:Te.reference}),hooks:(e,t)=>({queryKey:L.hooks(e,t),queryFn:()=>eN(e,t),staleTime:Te.reference}),externalEdits:e=>({queryKey:L.externalEdits(e),queryFn:()=>$C(e),staleTime:Te.governance}),externalEditCount:e=>({queryKey:L.externalEditCount(e),queryFn:()=>IC(e),staleTime:Te.governance}),reviewQueue:(e,t="pending")=>({queryKey:L.reviewQueue(e,t),queryFn:()=>EC(e,t),staleTime:Te.governance}),deletionRequests:(e,t="pending")=>({queryKey:L.deletionRequests(e,t),queryFn:()=>NC(e,t),staleTime:Te.governance}),feed:(e,t="all",r=50,o=0)=>({queryKey:L.feed(e,t,r,o),queryFn:()=>OC(e,t,r,o),staleTime:Te.governance}),node:(e,t)=>({queryKey:L.node(e,t),queryFn:()=>yC(e,t),staleTime:Te.content,gcTime:6e4}),nodeVersions:(e,t)=>({queryKey:L.nodeVersions(e,t),queryFn:()=>PC(e,t),staleTime:Te.listing}),nodeReviews:(e,t)=>({queryKey:L.nodeReviews(e,t),queryFn:()=>jC(e,t),staleTime:Te.governance}),nodeStewards:(e,t)=>({queryKey:L.nodeStewards(e,t),queryFn:()=>CC(e,t),staleTime:Te.reference}),nodeWatchers:(e,t)=>({queryKey:L.nodeWatchers(e,t),queryFn:()=>YC(e,t),staleTime:Te.reference}),nodeAnnotations:(e,t)=>({queryKey:L.nodeAnnotations(e,t),queryFn:()=>RC(e,t),staleTime:Te.governance}),nodePendingEdit:(e,t)=>({queryKey:L.nodePendingEdit(e,t),queryFn:()=>DC(e,t),staleTime:Te.governance}),nodeComments:(e,t,r)=>({queryKey:L.nodeComments(e,t,r??"all"),queryFn:()=>AC(e,t,r),staleTime:Te.governance}),nodeActivity:(e,t,r=100)=>({queryKey:L.nodeActivity(e,t,r),queryFn:()=>MC(e,t,r),staleTime:Te.governance}),health:()=>({queryKey:L.health,queryFn:()=>la(),staleTime:Te.reference}),adminSettings:()=>({queryKey:L.adminSettings(),queryFn:()=>Y_(),staleTime:Te.reference}),superAdmins:()=>({queryKey:L.superAdmins(),queryFn:()=>tC(),staleTime:Te.reference}),communitySites:()=>({queryKey:L.communitySites(),queryFn:()=>nC(),staleTime:Te.reference}),teammates:()=>({queryKey:L.teammates(),queryFn:()=>eC(),staleTime:Te.reference}),apiKeys:()=>({queryKey:L.apiKeys(),queryFn:()=>rC(),staleTime:Te.reference}),licenseStatus:()=>({queryKey:L.licenseStatus(),queryFn:()=>Wv(),staleTime:Te.reference}),teamList:()=>({queryKey:L.teamList(),queryFn:()=>UC(),staleTime:Te.reference}),team:e=>({queryKey:L.team(e),queryFn:()=>VC(e),staleTime:Te.reference}),promptowlTeams:()=>({queryKey:L.promptowlTeams(),queryFn:()=>WC(),staleTime:Te.reference}),myWork:e=>({queryKey:L.myWork(e==null?void 0:e.limit,e==null?void 0:e.offset),queryFn:()=>KC(e),staleTime:Te.governance}),myDrafts:e=>({queryKey:L.myDrafts(e==null?void 0:e.limit,e==null?void 0:e.offset,e==null?void 0:e.q,e==null?void 0:e.sort),queryFn:()=>QC(e),staleTime:Te.governance})},m4=(e=!1)=>Ir(Wt.nestList(e)),qN=e=>Ir({...Wt.nest(e??""),enabled:!!e}),g4=e=>Ir({...Wt.settings(e??""),enabled:!!e}),y4=(e,t)=>Ir({...Wt.nodeStewards(e??"",t??""),enabled:!!e&&!!t}),v4=e=>Ir({...Wt.apiKeys(),...e}),uw="00000000-0000-0000-0000-000000000000",w4=8,x4=50;function KN(e){return!!(e!=null&&e.archived_at)}function Nf({roles:e,permission:t,myStewards:r,isOwner:o,isAdmin:a,readerMode:c,previewReader:d,isArchived:p}){if(p)return{canManage:!1,collabCanWrite:!1,canReviewDocs:!1,canEditDocs:!1,isReadOnly:!0,isReaderView:!!c};const v=o||a||((...k)=>e.some(C=>k.includes(C)))("owner","admin"),w=t==="owner"||t==="admin"||t==="write",f=v||r.some(k=>k.role==="reviewer"),x=v||w||r.some(k=>k.role==="editor"&&k.scope==="nest"),S=!x&&!f&&!v;return{canManage:v,collabCanWrite:w,canReviewDocs:f,canEditDocs:x,isReadOnly:S,isReaderView:!!c&&(S||!!d)}}function b4(e,t){return!t&&(e==="editor"||e==="admin")}function Ef(e){const t=e.startsWith("nodes/")?e.slice(6):e;return(t.includes("/")?t.slice(t.lastIndexOf("/")+1):t).toLowerCase()}function S4(e,t){return(e==null?void 0:e.id)===t||Ef((e==null?void 0:e.id)||"")===Ef(t)}function k4(e){return[Ef((e==null?void 0:e.id)||""),String((e==null?void 0:e.title)||"").toLowerCase()]}const QN=["board","ontology-graph","definitions"];function dw(e){return QN.includes(e)}function Ld(e,t){return!!t&&dw(e)}const Sn="__uncategorized__",GN=["draft","pending_review","approved","published","rejected","external_edit_pending"],ZN={draft:"Draft",pending_review:"Pending Review",approved:"Approved",published:"Published",rejected:"Rejected",external_edit_pending:"External Edit"};function cp(e){const t=e.startsWith("nodes/")?e.slice(6):e,r=t.lastIndexOf("/");return r===-1?"":t.slice(0,r)}function up(e){return(e.tagNamespace??"").trim().split(":")[0].trim()}const fw=e=>e.startsWith("#")?e.slice(1):e,oy=e=>e.startsWith("#")?e:`#${e}`;function JN(e){return e.dimension==="tag"?`tag:${up(e)}`:e.dimension}function _4(e,t){if(!e.startsWith("tag:"))return t;const r=o=>o&&[...new Set(o.map(fw))];return{columnOrder:r(t.columnOrder),hiddenColumns:r(t.hiddenColumns)}}function C4(e){const t=e.layouts[JN(e)]??{};return{dimension:e.dimension,tagNamespace:e.tagNamespace,columnOrder:t.columnOrder??(e.dimension==="status"?GN:void 0),hiddenColumns:t.hiddenColumns,explicitColumns:e.dimension==="tag"&&t.columnOrder!==void 0}}function pw(e,t){switch(t.dimension){case"folder":return[cp(e.id)];case"status":return[e.status||Sn];case"tag":{const r=up(t),o=e.tags.map(fw),a=r?o.filter(c=>c.startsWith(`${r}:`)).map(c=>c.slice(r.length+1)).filter(Boolean):o.filter(Boolean);return a.length>0?[...new Set(a)]:[Sn]}}}function YN(e,t){return pw(e,t)[0]}function hw(e,t,r){const o=pw(e,t).filter(a=>!r.has(a));if(t.explicitColumns){const a=new Set((t.columnOrder??[]).filter(c=>!r.has(c)));return o.filter(c=>a.has(c))}return o.length>0?o:[Sn]}function XN(e){const t=new Map(e.map(a=>[a,a.split("/")])),r=new Map(e.map(a=>[a,1])),o=a=>t.get(a).slice(-r.get(a)).join("/");for(;;){const a=new Map;for(const d of e){const p=o(d),g=a.get(p);g?g.push(d):a.set(p,[d])}let c=!1;for(const d of a.values())if(!(d.length<2))for(const p of d)r.get(p)<t.get(p).length&&(r.set(p,r.get(p)+1),c=!0);if(!c)break}return new Map(e.map(a=>[a,o(a)]))}function iy(e,t){return e===Sn?"Uncategorized":e===""&&t.dimension==="folder"?"(root)":t.dimension==="status"?ZN[e]??e.replace(/_/g," "):e}function N4(e){return e!=="tag"}function ay(e,t){return e===Sn?"Uncategorized":e===""&&t.dimension==="folder"?"(root)":e}function eE(e,t){const r=new Set(t.hiddenColumns??[]);if(t.explicitColumns){const w=new Set,f=[];for(const x of t.columnOrder??[])r.has(x)||x===Sn||w.has(x)||(w.add(x),f.push(x));return f.map(x=>({key:x,label:iy(x,t),title:ay(x,t)}))}const o=new Set;for(const w of e)for(const f of hw(w,t,r))o.add(f);const a=o.has(Sn);o.delete(Sn);const c=[],d=new Set;for(const w of t.columnOrder??[])r.has(w)||w===Sn||d.has(w)||(d.add(w),c.push(w),o.delete(w));const p=[...o].sort(),g=[...c,...p];a&&g.push(Sn);const v=t.dimension==="folder"?XN(g.filter(w=>w!==Sn&&w!=="")):null;return g.map(w=>({key:w,label:(v==null?void 0:v.get(w))??iy(w,t),title:ay(w,t)}))}function E4(e,t){const r=new Set(t.hiddenColumns??[]),o=eE(e,t),a={};for(const c of o)a[c.key]=[];for(const c of e)for(const d of hw(c,t,r))(a[d]??(a[d]=[])).push(c);return{columns:o,byColumn:a}}function O4(e,t,r,o){switch(r.dimension){case"folder":return YN(e,r)===t?{kind:"unsupported",reason:"Already in this column."}:{kind:"move-folder",folder:t};case"tag":{if(t===Sn)return{kind:"unsupported",reason:"Drop onto a tag column to add that tag."};if(o&&o===t)return{kind:"unsupported",reason:"Already in this column."};const a=up(r),c=v=>oy(a?`${a}:${v}`:v),d=o&&o!==Sn?c(o):null,p=c(t),g=new Set(e.tags.map(oy));return d&&g.delete(d),!d&&g.has(p)?{kind:"unsupported",reason:"Already in this column."}:(g.add(p),{kind:"retag",tags:[...g]})}case"status":return{kind:"unsupported",reason:"Status changes go through the review workflow, not the board — open the doc and submit for review."}}}const tE={path:"board",label:"Board",icon:Av,order:1,viewPage:"board"},nE=Object.freeze(Object.defineProperty({__proto__:null,meta:tE},Symbol.toStringTag,{value:"Module"})),rE={path:"definitions",label:"Definitions",icon:Pk,order:3,viewPage:"definitions"},sE=Object.freeze(Object.defineProperty({__proto__:null,meta:rE},Symbol.toStringTag,{value:"Module"})),oE={path:"graph",label:"Graph",icon:x_,order:2,viewPage:"ontology-graph"},iE=Object.freeze(Object.defineProperty({__proto__:null,meta:oE},Symbol.toStringTag,{value:"Module"})),aE={path:"workflows",label:"Workflows",icon:H_,order:4,viewPage:"workflows",beta:!0,visible:e=>e.workflowPlaneEnabled&&e.canEditDocs},lE=Object.freeze(Object.defineProperty({__proto__:null,meta:aE},Symbol.toStringTag,{value:"Module"})),cE=Object.assign({"../pages/nest/board/meta.ts":nE,"../pages/nest/definitions/meta.ts":sE,"../pages/nest/graph/meta.ts":iE,"../pages/nest/workflows/meta.ts":lE}),uE=Object.assign({"../pages/nest/board/page.tsx":()=>St(()=>import("./page-BUOADv2X.js"),__vite__mapDeps([0,1,2,3,4,5,6])),"../pages/nest/definitions/page.tsx":()=>St(()=>import("./page-CQt3ZGbf.js"),__vite__mapDeps([7,1,2,8,9])),"../pages/nest/graph/page.tsx":()=>St(()=>import("./page-CHb0F5hV.js"),__vite__mapDeps([10,1,2,11,9])),"../pages/nest/workflows/page.tsx":()=>St(()=>import("./page-ByyVLDVo.js"),__vite__mapDeps([12,13,14,15,16,17,18,2,8,5,6,19,20,9,21,22,1,23,24,25,26,11,4,27,28,29,30,31,32,33,34]))}),dE=e=>e.split("/").slice(-2,-1)[0],Pc=Object.entries(cE).map(([e,t])=>{const r=dE(e),o=uE[e.replace(/meta\.ts$/,"page.tsx")];if(!o)throw new Error(`pages/nest/${r}: meta.ts has no page.tsx beside it`);return{id:r,...t.meta,Component:Jf(o)}}).sort((e,t)=>e.order-t.order),ea=e=>Pc.find(t=>t.viewPage===e),fE=e=>e?Pc.find(t=>t.path===e):void 0,pE=e=>Pc.filter(t=>!t.visible||t.visible(e));function hE(e){if(e==="new")return[];const t=cp(e);if(!t)return[];const r=t.split("/");return r.map((o,a)=>r.slice(0,a+1).join("/"))}function mE(e){const t=new Map;for(const o of e){const a=cp(o.id),c=t.get(a);c?c.push(o):t.set(a,[o])}const r=new Intl.Collator(void 0,{sensitivity:"base"});return[...t.entries()].sort(([o],[a])=>r.compare(o,a)).map(([o,a])=>({folder:o,items:[...a].sort((c,d)=>r.compare(c.title??c.id,d.title??d.id))}))}function P4(e,t){return e||!!t.initialThreadId||!!t.commentMode||!!t.pendingAnchor||!!t.activeThreadId}const mw="contextnest:doc-page",Lo={sidebarCollapsed:!1,commentsOpen:!1,viewsOpen:!1,closedGroups:[]};function jc(e){try{const t=e.getItem(mw);if(!t)return{...Lo};const r=JSON.parse(t);return{sidebarCollapsed:typeof(r==null?void 0:r.sidebarCollapsed)=="boolean"?r.sidebarCollapsed:Lo.sidebarCollapsed,commentsOpen:typeof(r==null?void 0:r.commentsOpen)=="boolean"?r.commentsOpen:Lo.commentsOpen,viewsOpen:typeof(r==null?void 0:r.viewsOpen)=="boolean"?r.viewsOpen:Lo.viewsOpen,closedGroups:Array.isArray(r==null?void 0:r.closedGroups)?r.closedGroups.filter(o=>typeof o=="string"):[...Lo.closedGroups]}}catch{return{...Lo}}}function dp(e,t){try{const r={...jc(e),...t};e.setItem(mw,JSON.stringify(r))}catch{}}function gE(e,t){const r=[{id:"overview",label:"Overview",page:"nest",tab:"overview"}];if(e.isReaderView)return r;!e.isReadOnly&&(t.stewardshipEnabled||t.hasPending)&&r.push({id:"review",label:"Review queue",page:"nest",tab:"review"});for(const o of pE({...e,workflowPlaneEnabled:t.workflowPlaneEnabled}))r.push({id:o.id,label:o.label,icon:o.icon,page:o.viewPage,group:"views"});return r}function Of(e){return e==="Root"?"Root":e.split(/[-_]/).map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function j4(e){return e==="Root"?"Root":e.split("/").map(Of).join(" / ")}function yE(e,t="",r){const o={path:t,name:"",label:"",depth:-1,count:0,total:0,docs:[],children:[]},a=new Map([[t,o]]),c=v=>{const w=a.get(v);if(w)return w;const x=(t&&v.startsWith(`${t}/`)?v.slice(t.length+1):v).split("/"),S=x.length>1?`${t?`${t}/`:""}${x.slice(0,-1).join("/")}`:t,N=c(S),k={path:v,name:x[x.length-1],label:Of(x[x.length-1]),depth:N.depth+1,count:0,total:0,docs:[],children:[]};return N.children.push(k),a.set(v,k),k},d=new Map;for(const v of r??[])!v.path||v.path===t||t&&!v.path.startsWith(`${t}/`)||(c(v.path),d.set(v.path,v.total));for(const v of e){const w=v.folder;if(!w||w===t||w==="Root"){o.docs.push(...v.items);continue}c(w).docs.push(...v.items)}const p=v=>{v.count=v.docs.length,v.children.sort((f,x)=>f.name.localeCompare(x.name));let w=v.count;for(const f of v.children)w+=p(f);return v.total=Math.max(w,d.get(v.path)??0),v.total};p(o);const g=(v,w)=>{const f=[v.name];let x=v;for(;x.count===0&&x.children.length===1;)x=x.children[0],f.push(x.name);return{path:x.path,name:x.name,label:f.map(Of).join(" / "),depth:w,count:x.count,total:x.total,docs:x.docs,children:x.children.map(S=>g(S,w+1))}};return o.children=r?o.children:o.children.map(v=>g(v,0)),o}function vE({groups:e,baseFolder:t="",known:r,indentRem:o=1.25,isCollapsed:a,renderFolder:c,renderDoc:d,className:p}){const g=y.useMemo(()=>yE(e,t,r),[e,t,r]),v=[],w=x=>x>0?{marginLeft:`${x*o}rem`}:void 0,f=x=>{const S=x.depth+1;for(const N of x.docs)v.push(u.jsx("div",{style:w(S),children:d(N,{depth:S,parent:x})},`doc:${N.id}`));for(const N of x.children){const k=a?a(N.path):!1;v.push(u.jsx("div",{style:w(N.depth),children:c(N,{collapsed:k,depth:N.depth})},`folder:${N.path}`)),k||f(N)}};return f(g),u.jsx("div",{className:p,children:v})}const wE={path:"/account",label:"Account",icon:Iv,order:40,hidden:!0},xE=Object.freeze(Object.defineProperty({__proto__:null,meta:wE},Symbol.toStringTag,{value:"Module"})),bE={path:"/api-keys",label:"API keys",icon:ep,order:11,group:"workspace"},SE=Object.freeze(Object.defineProperty({__proto__:null,meta:bE},Symbol.toStringTag,{value:"Module"})),kE={path:"/guide",label:"How it works",icon:Ov,order:30,group:"help"},_E=Object.freeze(Object.defineProperty({__proto__:null,meta:kE},Symbol.toStringTag,{value:"Module"})),CE={path:"/my-drafts",label:"My Drafts",icon:E_,order:3,group:"work",badge:{options:()=>Wt.myDrafts({limit:1}),count:e=>{var t;return((t=e==null?void 0:e.pagination)==null?void 0:t.total)??0},tone:"muted"}},NE=Object.freeze(Object.defineProperty({__proto__:null,meta:CE},Symbol.toStringTag,{value:"Module"})),EE={path:"/my-work",label:"My Work",icon:s_,order:2,group:"work",badge:{options:()=>Wt.myWork({limit:1}),count:e=>{var t;return((t=e==null?void 0:e.pagination)==null?void 0:t.total)??0},tone:"primary"}},OE=Object.freeze(Object.defineProperty({__proto__:null,meta:EE},Symbol.toStringTag,{value:"Module"})),PE={path:"/",label:"Nests",icon:Pv,order:1},jE=Object.freeze(Object.defineProperty({__proto__:null,meta:PE},Symbol.toStringTag,{value:"Module"})),TE={path:"/settings",label:"Server settings",icon:Nc,order:21,group:"admin",visible:({isAdmin:e})=>e},RE=Object.freeze(Object.defineProperty({__proto__:null,meta:TE},Symbol.toStringTag,{value:"Module"})),AE={path:"/teammates",label:"Teammates",icon:Dv,order:20,group:"admin",visible:({isAdmin:e})=>e},ME=Object.freeze(Object.defineProperty({__proto__:null,meta:AE},Symbol.toStringTag,{value:"Module"})),$E={path:"/teams",label:"Teams",icon:Dv,order:10,group:"workspace"},IE=Object.freeze(Object.defineProperty({__proto__:null,meta:$E},Symbol.toStringTag,{value:"Module"})),DE={path:"/trace",label:"Activity trace",icon:R_,order:22,group:"admin",visible:({isAdmin:e})=>e},LE=Object.freeze(Object.defineProperty({__proto__:null,meta:DE},Symbol.toStringTag,{value:"Module"})),zE=[{id:"work",label:"Work"},{id:"workspace",label:"Workspace"},{id:"admin",label:"Admin"},{id:"help",label:"Help"}],FE=Object.assign({"../pages/app/account/meta.ts":xE,"../pages/app/api-keys/meta.ts":SE,"../pages/app/guide/meta.ts":_E,"../pages/app/my-drafts/meta.ts":NE,"../pages/app/my-work/meta.ts":OE,"../pages/app/nests/meta.ts":jE,"../pages/app/settings/meta.ts":RE,"../pages/app/teammates/meta.ts":ME,"../pages/app/teams/meta.ts":IE,"../pages/app/trace/meta.ts":LE}),UE=Object.assign({"../pages/app/account/page.tsx":()=>St(()=>import("./page-CC0NJi8v.js"),__vite__mapDeps([35,36])),"../pages/app/api-keys/page.tsx":()=>St(()=>import("./page-Bicf02Cz.js"),__vite__mapDeps([37,36,13,4,8])),"../pages/app/guide/page.tsx":()=>St(()=>import("./page-CPjWQNKx.js"),__vite__mapDeps([38,36,32])),"../pages/app/my-drafts/page.tsx":()=>St(()=>import("./page-BExMvttJ.js"),__vite__mapDeps([39,13,36,15,16,17,25,40,41,22,29,8,21])),"../pages/app/my-work/page.tsx":()=>St(()=>import("./page-BYUFhYWZ.js"),__vite__mapDeps([42,13,36,28,15,16,17,29,30,25,31,8,21])),"../pages/app/nests/page.tsx":()=>St(()=>import("./page-BsPMDm5d.js"),__vite__mapDeps([43,44,13,23,8,24,15,16,17,25,36,31,22,29])),"../pages/app/settings/page.tsx":()=>St(()=>import("./page-B3yvQvHy.js"),__vite__mapDeps([45,36,25,44,8])),"../pages/app/teammates/page.tsx":()=>St(()=>import("./page-DGOL9l8i.js"),__vite__mapDeps([46,13,36,25,27])),"../pages/app/teams/page.tsx":()=>St(()=>import("./page-CtaW65El.js"),__vite__mapDeps([47,36,26,25,16,4,9,8,29,30,5,27])),"../pages/app/trace/page.tsx":()=>St(()=>import("./page-Cj1NetQ-.js"),__vite__mapDeps([48,49,36,16,13,2,4,21]))}),VE=e=>e.split("/").slice(-2,-1)[0],aa=Object.entries(FE).map(([e,t])=>{const r=VE(e),o=UE[e.replace(/meta\.ts$/,"page.tsx")];if(!o)throw new Error(`pages/app/${r}: meta.ts has no page.tsx beside it`);return{id:r,...t.meta,Component:Jf(o)}}).sort((e,t)=>e.order-t.order),dc="nests";function Pf(e){return aa.find(t=>t.id===e)??aa.find(t=>t.id===dc)??aa[0]}function BE(e){return Pf(e).path}function WE(e){var r;const t=e.length>1?e.replace(/\/+$/,""):e;return((r=aa.find(o=>o.path===t))==null?void 0:r.id)??null}const gw=(e,t)=>!e.visible||e.visible(t);function zd(e,t){const r=Pf(e);return gw(r,t)?r:Pf(dc)}function HE(e){const t=aa.filter(r=>!r.hidden&&gw(r,e));return{top:t.filter(r=>!r.group),groups:zE.map(r=>({...r,pages:t.filter(o=>o.group===r.id)})).filter(r=>r.pages.length>0)}}function yw(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=yw(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function vw(){for(var e,t,r=0,o="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=yw(e))&&(o&&(o+=" "),o+=t);return o}const qE=(e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},KE=(e,t)=>({classGroupId:e,validator:t}),ww=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),fc="-",ly=[],QE="arbitrary..",GE=e=>{const t=JE(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return ZE(d);const p=d.split(fc),g=p[0]===""&&p.length>1?1:0;return xw(p,g,t)},getConflictingClassGroupIds:(d,p)=>{if(p){const g=o[d],v=r[d];return g?v?qE(v,g):g:v||ly}return r[d]||ly}}},xw=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],c=r.nextPart.get(a);if(c){const v=xw(e,t+1,c);if(v)return v}const d=r.validators;if(d===null)return;const p=t===0?e.join(fc):e.slice(t).join(fc),g=d.length;for(let v=0;v<g;v++){const w=d[v];if(w.validator(p))return w.classGroupId}},ZE=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?QE+o:void 0})(),JE=e=>{const{theme:t,classGroups:r}=e;return YE(r,t)},YE=(e,t)=>{const r=ww();for(const o in e){const a=e[o];fp(a,r,o,t)}return r},fp=(e,t,r,o)=>{const a=e.length;for(let c=0;c<a;c++){const d=e[c];XE(d,t,r,o)}},XE=(e,t,r,o)=>{if(typeof e=="string"){e2(e,t,r);return}if(typeof e=="function"){t2(e,t,r,o);return}n2(e,t,r,o)},e2=(e,t,r)=>{const o=e===""?t:bw(t,e);o.classGroupId=r},t2=(e,t,r,o)=>{if(r2(e)){fp(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(KE(r,e))},n2=(e,t,r,o)=>{const a=Object.entries(e),c=a.length;for(let d=0;d<c;d++){const[p,g]=a[d];fp(g,bw(t,p),r,o)}},bw=(e,t)=>{let r=e;const o=t.split(fc),a=o.length;for(let c=0;c<a;c++){const d=o[c];let p=r.nextPart.get(d);p||(p=ww(),r.nextPart.set(d,p)),r=p}return r},r2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,s2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const a=(c,d)=>{r[c]=d,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(c){let d=r[c];if(d!==void 0)return d;if((d=o[c])!==void 0)return a(c,d),d},set(c,d){c in r?r[c]=d:a(c,d)}}},jf="!",cy=":",o2=[],uy=(e,t,r,o,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:a}),i2=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=a=>{const c=[];let d=0,p=0,g=0,v;const w=a.length;for(let k=0;k<w;k++){const C=a[k];if(d===0&&p===0){if(C===cy){c.push(a.slice(g,k)),g=k+1;continue}if(C==="/"){v=k;continue}}C==="["?d++:C==="]"?d--:C==="("?p++:C===")"&&p--}const f=c.length===0?a:a.slice(g);let x=f,S=!1;f.endsWith(jf)?(x=f.slice(0,-1),S=!0):f.startsWith(jf)&&(x=f.slice(1),S=!0);const N=v&&v>g?v-g:void 0;return uy(c,S,x,N)};if(t){const a=t+cy,c=o;o=d=>d.startsWith(a)?c(d.slice(a.length)):uy(o2,!1,d,void 0,!0)}if(r){const a=o;o=c=>r({className:c,parseClassName:a})}return o},a2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{const o=[];let a=[];for(let c=0;c<r.length;c++){const d=r[c],p=d[0]==="[",g=t.has(d);p||g?(a.length>0&&(a.sort(),o.push(...a),a=[]),o.push(d)):a.push(d)}return a.length>0&&(a.sort(),o.push(...a)),o}},l2=e=>({cache:s2(e.cacheSize),parseClassName:i2(e),sortModifiers:a2(e),...GE(e)}),c2=/\s+/,u2=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:c}=t,d=[],p=e.trim().split(c2);let g="";for(let v=p.length-1;v>=0;v-=1){const w=p[v],{isExternal:f,modifiers:x,hasImportantModifier:S,baseClassName:N,maybePostfixModifierPosition:k}=r(w);if(f){g=w+(g.length>0?" "+g:g);continue}let C=!!k,_=o(C?N.substring(0,k):N);if(!_){if(!C){g=w+(g.length>0?" "+g:g);continue}if(_=o(N),!_){g=w+(g.length>0?" "+g:g);continue}C=!1}const R=x.length===0?"":x.length===1?x[0]:c(x).join(":"),D=S?R+jf:R,T=D+_;if(d.indexOf(T)>-1)continue;d.push(T);const G=a(_,C);for(let q=0;q<G.length;++q){const A=G[q];d.push(D+A)}g=w+(g.length>0?" "+g:g)}return g},d2=(...e)=>{let t=0,r,o,a="";for(;t<e.length;)(r=e[t++])&&(o=Sw(r))&&(a&&(a+=" "),a+=o);return a},Sw=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Sw(e[o]))&&(r&&(r+=" "),r+=t);return r},f2=(e,...t)=>{let r,o,a,c;const d=g=>{const v=t.reduce((w,f)=>f(w),e());return r=l2(v),o=r.cache.get,a=r.cache.set,c=p,p(g)},p=g=>{const v=o(g);if(v)return v;const w=u2(g,r);return a(g,w),w};return c=d,(...g)=>c(d2(...g))},p2=[],bt=e=>{const t=r=>r[e]||p2;return t.isThemeGetter=!0,t},kw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_w=/^\((?:(\w[\w-]*):)?(.+)\)$/i,h2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,m2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,g2=/\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$/,y2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,v2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,w2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ls=e=>h2.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),cs=e=>!!e&&Number.isInteger(Number(e)),Fd=e=>e.endsWith("%")&&ze(e.slice(0,-1)),jr=e=>m2.test(e),Cw=()=>!0,x2=e=>g2.test(e)&&!y2.test(e),pp=()=>!1,b2=e=>v2.test(e),S2=e=>w2.test(e),k2=e=>!Se(e)&&!_e(e),_2=e=>ks(e,Ow,pp),Se=e=>kw.test(e),zs=e=>ks(e,Pw,x2),dy=e=>ks(e,R2,ze),C2=e=>ks(e,Tw,Cw),N2=e=>ks(e,jw,pp),fy=e=>ks(e,Nw,pp),E2=e=>ks(e,Ew,S2),Bl=e=>ks(e,Rw,b2),_e=e=>_w.test(e),ta=e=>fo(e,Pw),O2=e=>fo(e,jw),py=e=>fo(e,Nw),P2=e=>fo(e,Ow),j2=e=>fo(e,Ew),Wl=e=>fo(e,Rw,!0),T2=e=>fo(e,Tw,!0),ks=(e,t,r)=>{const o=kw.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},fo=(e,t,r=!1)=>{const o=_w.exec(e);return o?o[1]?t(o[1]):r:!1},Nw=e=>e==="position"||e==="percentage",Ew=e=>e==="image"||e==="url",Ow=e=>e==="length"||e==="size"||e==="bg-size",Pw=e=>e==="length",R2=e=>e==="number",jw=e=>e==="family-name",Tw=e=>e==="number"||e==="weight",Rw=e=>e==="shadow",A2=()=>{const e=bt("color"),t=bt("font"),r=bt("text"),o=bt("font-weight"),a=bt("tracking"),c=bt("leading"),d=bt("breakpoint"),p=bt("container"),g=bt("spacing"),v=bt("radius"),w=bt("shadow"),f=bt("inset-shadow"),x=bt("text-shadow"),S=bt("drop-shadow"),N=bt("blur"),k=bt("perspective"),C=bt("aspect"),_=bt("ease"),R=bt("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...T(),_e,Se],q=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],M=()=>[_e,Se,g],Y=()=>[ls,"full","auto",...M()],W=()=>[cs,"none","subgrid",_e,Se],oe=()=>["auto",{span:["full",cs,_e,Se]},cs,_e,Se],ge=()=>[cs,"auto",_e,Se],de=()=>["auto","min","max","fr",_e,Se],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...M()],re=()=>[ls,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],K=()=>[ls,"screen","full","dvw","lvw","svw","min","max","fit",...M()],Q=()=>[ls,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],I=()=>[e,_e,Se],O=()=>[...T(),py,fy,{position:[_e,Se]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",P2,_2,{size:[_e,Se]}],se=()=>[Fd,ta,zs],ie=()=>["","none","full",v,_e,Se],pe=()=>["",ze,ta,zs],je=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[ze,Fd,py,fy],We=()=>["","none",N,_e,Se],ft=()=>["none",ze,_e,Se],ot=()=>["none",ze,_e,Se],pt=()=>[ze,_e,Se],nt=()=>[ls,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[jr],breakpoint:[jr],color:[Cw],container:[jr],"drop-shadow":[jr],ease:["in","out","in-out"],font:[k2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[jr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[jr],shadow:[jr],spacing:["px",ze],text:[jr],"text-shadow":[jr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ls,Se,_e,C]}],container:["container"],columns:[{columns:[ze,Se,_e,p]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:G()}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[cs,"auto",_e,Se]}],basis:[{basis:[ls,"full","auto",p,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,ls,"auto","initial","none",Se]}],grow:[{grow:["",ze,_e,Se]}],shrink:[{shrink:["",ze,_e,Se]}],order:[{order:[cs,"first","last","none",_e,Se]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":ge()}],"col-end":[{"col-end":ge()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":ge()}],"row-end":[{"row-end":ge()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[p,"screen",...re()]}],"min-w":[{"min-w":[p,"screen","none",...re()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[d]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",r,ta,zs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,T2,C2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fd,Se]}],"font-family":[{font:[O2,N2,t]}],"font-features":[{"font-features":[Se]}],"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:[a,_e,Se]}],"line-clamp":[{"line-clamp":[ze,"none",_e,dy]}],leading:[{leading:[c,...M()]}],"list-image":[{"list-image":["none",_e,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_e,Se]}],"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:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",_e,zs]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[ze,"auto",_e,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e,Se]}],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",_e,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cs,_e,Se],radial:["",_e,Se],conic:[cs,_e,Se]},j2,E2]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"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:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"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:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,_e,Se]}],"outline-w":[{outline:["",ze,ta,zs]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",w,Wl,Bl]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",f,Wl,Bl]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[ze,zs]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",x,Wl,Bl]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[ze,_e,Se]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"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":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"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":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"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":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"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":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"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":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"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":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"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":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[_e,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"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:O()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_e,Se]}],filter:[{filter:["","none",_e,Se]}],blur:[{blur:We()}],brightness:[{brightness:[ze,_e,Se]}],contrast:[{contrast:[ze,_e,Se]}],"drop-shadow":[{"drop-shadow":["","none",S,Wl,Bl]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",ze,_e,Se]}],"hue-rotate":[{"hue-rotate":[ze,_e,Se]}],invert:[{invert:["",ze,_e,Se]}],saturate:[{saturate:[ze,_e,Se]}],sepia:[{sepia:["",ze,_e,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",_e,Se]}],"backdrop-blur":[{"backdrop-blur":We()}],"backdrop-brightness":[{"backdrop-brightness":[ze,_e,Se]}],"backdrop-contrast":[{"backdrop-contrast":[ze,_e,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,_e,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,_e,Se]}],"backdrop-invert":[{"backdrop-invert":["",ze,_e,Se]}],"backdrop-opacity":[{"backdrop-opacity":[ze,_e,Se]}],"backdrop-saturate":[{"backdrop-saturate":[ze,_e,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,_e,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_e,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",_e,Se]}],ease:[{ease:["linear","initial",_,_e,Se]}],delay:[{delay:[ze,_e,Se]}],animate:[{animate:["none",R,_e,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,_e,Se]}],"perspective-origin":[{"perspective-origin":G()}],rotate:[{rotate:ft()}],"rotate-x":[{"rotate-x":ft()}],"rotate-y":[{"rotate-y":ft()}],"rotate-z":[{"rotate-z":ft()}],scale:[{scale:ot()}],"scale-x":[{"scale-x":ot()}],"scale-y":[{"scale-y":ot()}],"scale-z":[{"scale-z":ot()}],"scale-3d":["scale-3d"],skew:[{skew:pt()}],"skew-x":[{"skew-x":pt()}],"skew-y":[{"skew-y":pt()}],transform:[{transform:[_e,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:G()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nt()}],"translate-x":[{"translate-x":nt()}],"translate-y":[{"translate-y":nt()}],"translate-z":[{"translate-z":nt()}],"translate-none":["translate-none"],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",_e,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",_e,Se]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[ze,ta,zs,dy]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},M2=f2(A2);var hy;function Re(e,t,r){function o(p,g){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:g,constr:d,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),t(p,g);const v=d.prototype,w=Object.keys(v);for(let f=0;f<w.length;f++){const x=w[f];x in p||(p[x]=v[x].bind(p))}}const a=(r==null?void 0:r.Parent)??Object;class c extends a{}Object.defineProperty(c,"name",{value:e});function d(p){var g;const v=r!=null&&r.Parent?new c:this;o(v,p),(g=v._zod).deferred??(g.deferred=[]);for(const w of v._zod.deferred)w();return v}return Object.defineProperty(d,"init",{value:o}),Object.defineProperty(d,Symbol.hasInstance,{value:p=>{var g,v;return r!=null&&r.Parent&&p instanceof r.Parent?!0:(v=(g=p==null?void 0:p._zod)==null?void 0:g.traits)==null?void 0:v.has(e)}}),Object.defineProperty(d,"name",{value:e}),d}class Wo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Aw extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(hy=globalThis).__zod_globalConfig??(hy.__zod_globalConfig={});const $2=globalThis.__zod_globalConfig;function ro(e){return $2}function Tf(e,t){return typeof t=="bigint"?t.toString():t}function hp(e){return e==null}function mp(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}const my=Symbol("evaluating");function Ge(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==my)return o===void 0&&(o=my,o=r()),o},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function I2(...e){const t={};for(const r of e){const o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function D2(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Mw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function gy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Rf(e){if(gy(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(gy(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function $w(e){return Rf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function gp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L2(e,t,r){const o=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(o._zod.parent=e),o}function Yt(e){const 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 new 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 Bo(e,t=0){var r;if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(((r=e.issues[o])==null?void 0:r.continue)!==!0)return!0;return!1}function z2(e,t=0){var r;if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(((r=e.issues[o])==null?void 0:r.continue)===!1)return!0;return!1}function F2(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Hl(e){return typeof e=="string"?e:e==null?void 0:e.message}function so(e,t,r){var g,v,w,f,x,S;const o=e.message?e.message:Hl((w=(v=(g=e.inst)==null?void 0:g._zod.def)==null?void 0:v.error)==null?void 0:w.call(v,e))??Hl((f=t==null?void 0:t.error)==null?void 0:f.call(t,e))??Hl((x=r.customError)==null?void 0:x.call(r,e))??Hl((S=r.localeError)==null?void 0:S.call(r,e))??"Invalid input",{inst:a,continue:c,input:d,...p}=e;return p.path??(p.path=[]),p.message=o,t!=null&&t.reportInput&&(p.input=d),p}function yp(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function da(...e){const[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}const Iw=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Tf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Dw=Re("$ZodError",Iw),Lw=Re("$ZodError",Iw,{Parent:Error});function U2(e,t=r=>r.message){const r={},o=[];for(const a of e.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):o.push(t(a));return{formErrors:o,fieldErrors:r}}function V2(e,t=r=>r.message){const r={_errors:[]},o=(a,c=[])=>{for(const d of a.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>o({issues:p},[...c,...d.path]));else if(d.code==="invalid_key")o({issues:d.issues},[...c,...d.path]);else if(d.code==="invalid_element")o({issues:d.issues},[...c,...d.path]);else{const p=[...c,...d.path];if(p.length===0)r._errors.push(t(d));else{let g=r,v=0;for(;v<p.length;){const w=p[v];v===p.length-1?(g[w]=g[w]||{_errors:[]},g[w]._errors.push(t(d))):g[w]=g[w]||{_errors:[]},g=g[w],v++}}}};return o(e),r}const vp=e=>(t,r,o,a)=>{const c=o?{...o,async:!1}:{async:!1},d=t._zod.run({value:r,issues:[]},c);if(d instanceof Promise)throw new Wo;if(d.issues.length){const p=new((a==null?void 0:a.Err)??e)(d.issues.map(g=>so(g,c,ro())));throw Mw(p,a==null?void 0:a.callee),p}return d.value},wp=e=>async(t,r,o,a)=>{const c=o?{...o,async:!0}:{async:!0};let d=t._zod.run({value:r,issues:[]},c);if(d instanceof Promise&&(d=await d),d.issues.length){const p=new((a==null?void 0:a.Err)??e)(d.issues.map(g=>so(g,c,ro())));throw Mw(p,a==null?void 0:a.callee),p}return d.value},Tc=e=>(t,r,o)=>{const a=o?{...o,async:!1}:{async:!1},c=t._zod.run({value:r,issues:[]},a);if(c instanceof Promise)throw new Wo;return c.issues.length?{success:!1,error:new(e??Dw)(c.issues.map(d=>so(d,a,ro())))}:{success:!0,data:c.value}},B2=Tc(Lw),Rc=e=>async(t,r,o)=>{const a=o?{...o,async:!0}:{async:!0};let c=t._zod.run({value:r,issues:[]},a);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(d=>so(d,a,ro())))}:{success:!0,data:c.value}},W2=Rc(Lw),H2=e=>(t,r,o)=>{const a=o?{...o,direction:"backward"}:{direction:"backward"};return vp(e)(t,r,a)},q2=e=>(t,r,o)=>vp(e)(t,r,o),K2=e=>async(t,r,o)=>{const a=o?{...o,direction:"backward"}:{direction:"backward"};return wp(e)(t,r,a)},Q2=e=>async(t,r,o)=>wp(e)(t,r,o),G2=e=>(t,r,o)=>{const a=o?{...o,direction:"backward"}:{direction:"backward"};return Tc(e)(t,r,a)},Z2=e=>(t,r,o)=>Tc(e)(t,r,o),J2=e=>async(t,r,o)=>{const a=o?{...o,direction:"backward"}:{direction:"backward"};return Rc(e)(t,r,a)},Y2=e=>async(t,r,o)=>Rc(e)(t,r,o),X2=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eO=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},tO=/^[^A-Z]*$/,nO=/^[^a-z]*$/,yr=Re("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rO=Re("$ZodCheckMaxLength",(e,t)=>{var r;yr.init(e,t),(r=e._zod.def).when??(r.when=o=>{const a=o.value;return!hp(a)&&a.length!==void 0}),e._zod.onattach.push(o=>{const a=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const a=o.value;if(a.length<=t.maximum)return;const d=yp(a);o.issues.push({origin:d,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),sO=Re("$ZodCheckMinLength",(e,t)=>{var r;yr.init(e,t),(r=e._zod.def).when??(r.when=o=>{const a=o.value;return!hp(a)&&a.length!==void 0}),e._zod.onattach.push(o=>{const a=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const a=o.value;if(a.length>=t.minimum)return;const d=yp(a);o.issues.push({origin:d,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),oO=Re("$ZodCheckLengthEquals",(e,t)=>{var r;yr.init(e,t),(r=e._zod.def).when??(r.when=o=>{const a=o.value;return!hp(a)&&a.length!==void 0}),e._zod.onattach.push(o=>{const a=o._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=o=>{const a=o.value,c=a.length;if(c===t.length)return;const d=yp(a),p=c>t.length;o.issues.push({origin:d,...p?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Ac=Re("$ZodCheckStringFormat",(e,t)=>{var r,o;yr.init(e,t),e._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),iO=Re("$ZodCheckRegex",(e,t)=>{Ac.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),aO=Re("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tO),Ac.init(e,t)}),lO=Re("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=nO),Ac.init(e,t)}),cO=Re("$ZodCheckIncludes",(e,t)=>{yr.init(e,t);const r=gp(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(a=>{const c=a._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(o)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),uO=Re("$ZodCheckStartsWith",(e,t)=>{yr.init(e,t);const r=new RegExp(`^${gp(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{const a=o._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),dO=Re("$ZodCheckEndsWith",(e,t)=>{yr.init(e,t);const r=new RegExp(`.*${gp(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{const a=o._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),fO=Re("$ZodCheckOverwrite",(e,t)=>{yr.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),pO={major:4,minor:4,patch:3},Xt=Re("$ZodType",(e,t)=>{var a;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pO;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const c of o)for(const d of c._zod.onattach)d(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const c=(p,g,v)=>{let w=Bo(p),f;for(const x of g){if(x._zod.def.when){if(z2(p)||!x._zod.def.when(p))continue}else if(w)continue;const S=p.issues.length,N=x._zod.check(p);if(N instanceof Promise&&(v==null?void 0:v.async)===!1)throw new Wo;if(f||N instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await N,p.issues.length!==S&&(w||(w=Bo(p,S)))});else{if(p.issues.length===S)continue;w||(w=Bo(p,S))}}return f?f.then(()=>p):p},d=(p,g,v)=>{if(Bo(p))return p.aborted=!0,p;const w=c(g,o,v);if(w instanceof Promise){if(v.async===!1)throw new Wo;return w.then(f=>e._zod.parse(f,v))}return e._zod.parse(w,v)};e._zod.run=(p,g)=>{if(g.skipChecks)return e._zod.parse(p,g);if(g.direction==="backward"){const w=e._zod.parse({value:p.value,issues:[]},{...g,skipChecks:!0});return w instanceof Promise?w.then(f=>d(f,p,g)):d(w,p,g)}const v=e._zod.parse(p,g);if(v instanceof Promise){if(g.async===!1)throw new Wo;return v.then(w=>c(w,o,g))}return c(v,o,g)}}Ge(e,"~standard",()=>({validate:c=>{var d;try{const p=B2(e,c);return p.success?{value:p.data}:{issues:(d=p.error)==null?void 0:d.issues}}catch{return W2(e,c).then(g=>{var v;return g.success?{value:g.data}:{issues:(v=g.error)==null?void 0:v.issues}})}},vendor:"zod",version:1}))}),zw=Re("$ZodString",(e,t)=>{var r;Xt.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??eO(e._zod.bag),e._zod.parse=(o,a)=>{if(t.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),Fw=Re("$ZodStringFormat",(e,t)=>{Ac.init(e,t),zw.init(e,t)}),hO=Re("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=X2),Fw.init(e,t)});function yy(e,t,r){e.issues.length&&t.issues.push(...F2(r,e.issues)),t.value[r]=e.value}const mO=Re("$ZodArray",(e,t)=>{Xt.init(e,t),e._zod.parse=(r,o)=>{const a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=Array(a.length);const c=[];for(let d=0;d<a.length;d++){const p=a[d],g=t.element._zod.run({value:p,issues:[]},o);g instanceof Promise?c.push(g.then(v=>yy(v,r,d))):yy(g,r,d)}return c.length?Promise.all(c).then(()=>r):r}});function vy(e,t,r,o){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const a=e.filter(c=>!Bo(c));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(c=>c.issues.map(d=>so(d,o,ro())))}),t)}const gO=Re("$ZodUnion",(e,t)=>{Xt.init(e,t),Ge(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ge(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ge(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Ge(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>mp(a.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,a)=>{if(r)return r(o,a);let c=!1;const d=[];for(const p of t.options){const g=p._zod.run({value:o.value,issues:[]},a);if(g instanceof Promise)d.push(g),c=!0;else{if(g.issues.length===0)return g;d.push(g)}}return c?Promise.all(d).then(p=>vy(p,o,e,a)):vy(d,o,e,a)}}),yO=Re("$ZodIntersection",(e,t)=>{Xt.init(e,t),e._zod.parse=(r,o)=>{const a=r.value,c=t.left._zod.run({value:a,issues:[]},o),d=t.right._zod.run({value:a,issues:[]},o);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([g,v])=>wy(r,g,v)):wy(r,c,d)}});function Af(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Rf(e)&&Rf(t)){const r=Object.keys(t),o=Object.keys(e).filter(c=>r.indexOf(c)!==-1),a={...e,...t};for(const c of o){const d=Af(e[c],t[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};a[c]=d.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let o=0;o<e.length;o++){const a=e[o],c=t[o],d=Af(a,c);if(!d.valid)return{valid:!1,mergeErrorPath:[o,...d.mergeErrorPath]};r.push(d.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function wy(e,t,r){const o=new Map;let a;for(const p of t.issues)if(p.code==="unrecognized_keys"){a??(a=p);for(const g of p.keys)o.has(g)||o.set(g,{}),o.get(g).l=!0}else e.issues.push(p);for(const p of r.issues)if(p.code==="unrecognized_keys")for(const g of p.keys)o.has(g)||o.set(g,{}),o.get(g).r=!0;else e.issues.push(p);const c=[...o].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(c.length&&a&&e.issues.push({...a,keys:c}),Bo(e))return e;const d=Af(t.value,r.value);if(!d.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`);return e.value=d.data,e}const vO=Re("$ZodTransform",(e,t)=>{Xt.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Aw(e.constructor.name);const a=t.transform(r.value,r);if(o.async)return(a instanceof Promise?a:Promise.resolve(a)).then(d=>(r.value=d,r.fallback=!0,r));if(a instanceof Promise)throw new Wo;return r.value=a,r.fallback=!0,r}});function xy(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Uw=Re("$ZodOptional",(e,t)=>{Xt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ge(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${mp(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){const a=r.value,c=t.innerType._zod.run(r,o);return c instanceof Promise?c.then(d=>xy(d,a)):xy(c,a)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),wO=Re("$ZodExactOptional",(e,t)=>{Uw.init(e,t),Ge(e._zod,"values",()=>t.innerType._zod.values),Ge(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),xO=Re("$ZodNullable",(e,t)=>{Xt.init(e,t),Ge(e._zod,"optin",()=>t.innerType._zod.optin),Ge(e._zod,"optout",()=>t.innerType._zod.optout),Ge(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${mp(r.source)}|null)$`):void 0}),Ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),bO=Re("$ZodDefault",(e,t)=>{Xt.init(e,t),e._zod.optin="optional",Ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;const a=t.innerType._zod.run(r,o);return a instanceof Promise?a.then(c=>by(c,t)):by(a,t)}});function by(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const SO=Re("$ZodPrefault",(e,t)=>{Xt.init(e,t),e._zod.optin="optional",Ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),kO=Re("$ZodNonOptional",(e,t)=>{Xt.init(e,t),Ge(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{const a=t.innerType._zod.run(r,o);return a instanceof Promise?a.then(c=>Sy(c,e)):Sy(a,e)}});function Sy(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const _O=Re("$ZodCatch",(e,t)=>{Xt.init(e,t),e._zod.optin="optional",Ge(e._zod,"optout",()=>t.innerType._zod.optout),Ge(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);const a=t.innerType._zod.run(r,o);return a instanceof Promise?a.then(c=>(r.value=c.value,c.issues.length&&(r.value=t.catchValue({...r,error:{issues:c.issues.map(d=>so(d,o,ro()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(c=>so(c,o,ro()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),CO=Re("$ZodPipe",(e,t)=>{Xt.init(e,t),Ge(e._zod,"values",()=>t.in._zod.values),Ge(e._zod,"optin",()=>t.in._zod.optin),Ge(e._zod,"optout",()=>t.out._zod.optout),Ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){const c=t.out._zod.run(r,o);return c instanceof Promise?c.then(d=>ql(d,t.in,o)):ql(c,t.in,o)}const a=t.in._zod.run(r,o);return a instanceof Promise?a.then(c=>ql(c,t.out,o)):ql(a,t.out,o)}});function ql(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const NO=Re("$ZodReadonly",(e,t)=>{Xt.init(e,t),Ge(e._zod,"propValues",()=>t.innerType._zod.propValues),Ge(e._zod,"values",()=>t.innerType._zod.values),Ge(e._zod,"optin",()=>{var r,o;return(o=(r=t.innerType)==null?void 0:r._zod)==null?void 0:o.optin}),Ge(e._zod,"optout",()=>{var r,o;return(o=(r=t.innerType)==null?void 0:r._zod)==null?void 0:o.optout}),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);const a=t.innerType._zod.run(r,o);return a instanceof Promise?a.then(ky):ky(a)}});function ky(e){return e.value=Object.freeze(e.value),e}const EO=Re("$ZodCustom",(e,t)=>{yr.init(e,t),Xt.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{const o=r.value,a=t.fn(o);if(a instanceof Promise)return a.then(c=>_y(c,r,o,e));_y(a,r,o,e)}});function _y(e,t,r,o){if(!e){const a={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(a.params=o._zod.def.params),t.issues.push(da(a))}}var Cy;class OO{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const o={...this.get(r)??{}};delete o.id;const a={...o,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function PO(){return new OO}(Cy=globalThis).__zod_globalRegistry??(Cy.__zod_globalRegistry=PO());const sa=globalThis.__zod_globalRegistry;function jO(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Yt(t)})}function Vw(e,t){return new rO({check:"max_length",...Yt(t),maximum:e})}function pc(e,t){return new sO({check:"min_length",...Yt(t),minimum:e})}function Bw(e,t){return new oO({check:"length_equals",...Yt(t),length:e})}function TO(e,t){return new iO({check:"string_format",format:"regex",...Yt(t),pattern:e})}function RO(e){return new aO({check:"string_format",format:"lowercase",...Yt(e)})}function AO(e){return new lO({check:"string_format",format:"uppercase",...Yt(e)})}function MO(e,t){return new cO({check:"string_format",format:"includes",...Yt(t),includes:e})}function $O(e,t){return new uO({check:"string_format",format:"starts_with",...Yt(t),prefix:e})}function IO(e,t){return new dO({check:"string_format",format:"ends_with",...Yt(t),suffix:e})}function gi(e){return new fO({check:"overwrite",tx:e})}function DO(e){return gi(t=>t.normalize(e))}function LO(){return gi(e=>e.trim())}function zO(){return gi(e=>e.toLowerCase())}function FO(){return gi(e=>e.toUpperCase())}function UO(){return gi(e=>D2(e))}function VO(e,t,r){return new e({type:"array",element:t,...Yt(r)})}function BO(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Yt(r)})}function WO(e,t){const r=HO(o=>(o.addIssue=a=>{if(typeof a=="string")o.issues.push(da(a,o.value,r._zod.def));else{const c=a;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=o.value),c.inst??(c.inst=r),c.continue??(c.continue=!r._zod.def.abort),o.issues.push(da(c))}},e(o.value,o)),t);return r}function HO(e,t){const r=new yr({check:"custom",...Yt(t)});return r._zod.check=e,r}function Ww(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)??sa,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,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Jt(e,t,r={path:[],schemaPath:[]}){var w,f;var o;const a=e._zod.def,c=t.seen.get(e);if(c)return c.count++,r.schemaPath.includes(e)&&(c.cycle=r.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,d);const p=(f=(w=e._zod).toJSONSchema)==null?void 0:f.call(w);if(p)d.schema=p;else{const x={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,d.schema,x);else{const N=d.schema,k=t.processors[a.type];if(!k)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);k(e,t,N,x)}const S=e._zod.parent;S&&(d.ref||(d.ref=S),Jt(S,t,x),t.seen.get(S).isParent=!0)}const g=t.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),t.io==="input"&&Qt(e)&&(delete d.schema.examples,delete d.schema.default),t.io==="input"&&"_prefault"in d.schema&&((o=d.schema).default??(o.default=d.schema._prefault)),delete d.schema._prefault,t.seen.get(e).schema}function Hw(e,t){var d,p,g,v;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const w of e.seen.entries()){const f=(d=e.metadataRegistry.get(w[0]))==null?void 0:d.id;if(f){const x=o.get(f);if(x&&x!==w[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(f,w[0])}}const a=w=>{var k;const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const C=(k=e.external.registry.get(w[0]))==null?void 0:k.id,_=e.external.uri??(D=>D);if(C)return{ref:_(C)};const R=w[1].defId??w[1].schema.id??`schema${e.counter++}`;return w[1].defId=R,{defId:R,ref:`${_("__shared")}#/${f}/${R}`}}if(w[1]===r)return{ref:"#"};const S=`#/${f}/`,N=w[1].schema.id??`__schema${e.counter++}`;return{defId:N,ref:S+N}},c=w=>{if(w[1].schema.$ref)return;const f=w[1],{ref:x,defId:S}=a(w);f.def={...f.schema},S&&(f.defId=S);const N=f.schema;for(const k in N)delete N[k];N.$ref=x};if(e.cycles==="throw")for(const w of e.seen.entries()){const f=w[1];if(f.cycle)throw new Error(`Cycle detected: #/${(p=f.cycle)==null?void 0:p.join("/")}/<root>
|
|
327
|
-
|
|
328
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const w of e.seen.entries()){const f=w[1];if(t===w[0]){c(w);continue}if(e.external){const S=(g=e.external.registry.get(w[0]))==null?void 0:g.id;if(t!==w[0]&&S){c(w);continue}}if((v=e.metadataRegistry.get(w[0]))==null?void 0:v.id){c(w);continue}if(f.cycle){c(w);continue}if(f.count>1&&e.reused==="ref"){c(w);continue}}}function qw(e,t){var p,g,v,w;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=f=>{const x=e.seen.get(f);if(x.ref===null)return;const S=x.def??x.schema,N={...S},k=x.ref;if(x.ref=null,k){o(k);const _=e.seen.get(k),R=_.schema;if(R.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(S.allOf=S.allOf??[],S.allOf.push(R)):Object.assign(S,R),Object.assign(S,N),f._zod.parent===k)for(const T in S)T==="$ref"||T==="allOf"||T in N||delete S[T];if(R.$ref&&_.def)for(const T in S)T==="$ref"||T==="allOf"||T in _.def&&JSON.stringify(S[T])===JSON.stringify(_.def[T])&&delete S[T]}const C=f._zod.parent;if(C&&C!==k){o(C);const _=e.seen.get(C);if(_!=null&&_.schema.$ref&&(S.$ref=_.schema.$ref,_.def))for(const R in S)R==="$ref"||R==="allOf"||R in _.def&&JSON.stringify(S[R])===JSON.stringify(_.def[R])&&delete S[R]}e.override({zodSchema:f,jsonSchema:S,path:x.path??[]})};for(const f of[...e.seen.entries()].reverse())o(f[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,(p=e.external)!=null&&p.uri){const f=(g=e.external.registry.get(t))==null?void 0:g.id;if(!f)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(f)}Object.assign(a,r.def??r.schema);const c=(v=e.metadataRegistry.get(t))==null?void 0:v.id;c!==void 0&&a.id===c&&delete a.id;const d=((w=e.external)==null?void 0:w.defs)??{};for(const f of e.seen.entries()){const x=f[1];x.def&&x.defId&&(x.def.id===x.defId&&delete x.def.id,d[x.defId]=x.def)}e.external||Object.keys(d).length>0&&(e.target==="draft-2020-12"?a.$defs=d:a.definitions=d);try{const f=JSON.parse(JSON.stringify(a));return Object.defineProperty(f,"~standard",{value:{...t["~standard"],jsonSchema:{input:hc(t,"input",e.processors),output:hc(t,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function Qt(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Qt(o.element,r);if(o.type==="set")return Qt(o.valueType,r);if(o.type==="lazy")return Qt(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Qt(o.innerType,r);if(o.type==="intersection")return Qt(o.left,r)||Qt(o.right,r);if(o.type==="record"||o.type==="map")return Qt(o.keyType,r)||Qt(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Qt(o.in,r)||Qt(o.out,r);if(o.type==="object"){for(const a in o.shape)if(Qt(o.shape[a],r))return!0;return!1}if(o.type==="union"){for(const a of o.options)if(Qt(a,r))return!0;return!1}if(o.type==="tuple"){for(const a of o.items)if(Qt(a,r))return!0;return!!(o.rest&&Qt(o.rest,r))}return!1}const qO=(e,t={})=>r=>{const o=Ww({...r,processors:t});return Jt(e,o),Hw(o,e),qw(o,e)},hc=(e,t,r={})=>o=>{const{libraryOptions:a,target:c}=o??{},d=Ww({...a??{},target:c,io:t,processors:r});return Jt(e,d),Hw(d,e),qw(d,e)},KO={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},QO=(e,t,r,o)=>{const a=r;a.type="string";const{minimum:c,maximum:d,format:p,patterns:g,contentEncoding:v}=e._zod.bag;if(typeof c=="number"&&(a.minLength=c),typeof d=="number"&&(a.maxLength=d),p&&(a.format=KO[p]??p,a.format===""&&delete a.format,p==="time"&&delete a.format),v&&(a.contentEncoding=v),g&&g.size>0){const w=[...g];w.length===1?a.pattern=w[0].source:w.length>1&&(a.allOf=[...w.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},GO=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},ZO=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},JO=(e,t,r,o)=>{const a=r,c=e._zod.def,{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(a.minItems=d),typeof p=="number"&&(a.maxItems=p),a.type="array",a.items=Jt(c.element,t,{...o,path:[...o.path,"items"]})},YO=(e,t,r,o)=>{const a=e._zod.def,c=a.inclusive===!1,d=a.options.map((p,g)=>Jt(p,t,{...o,path:[...o.path,c?"oneOf":"anyOf",g]}));c?r.oneOf=d:r.anyOf=d},XO=(e,t,r,o)=>{const a=e._zod.def,c=Jt(a.left,t,{...o,path:[...o.path,"allOf",0]}),d=Jt(a.right,t,{...o,path:[...o.path,"allOf",1]}),p=v=>"allOf"in v&&Object.keys(v).length===1,g=[...p(c)?c.allOf:[c],...p(d)?d.allOf:[d]];r.allOf=g},eP=(e,t,r,o)=>{const a=e._zod.def,c=Jt(a.innerType,t,o),d=t.seen.get(e);t.target==="openapi-3.0"?(d.ref=a.innerType,r.nullable=!0):r.anyOf=[c,{type:"null"}]},tP=(e,t,r,o)=>{const a=e._zod.def;Jt(a.innerType,t,o);const c=t.seen.get(e);c.ref=a.innerType},nP=(e,t,r,o)=>{const a=e._zod.def;Jt(a.innerType,t,o);const c=t.seen.get(e);c.ref=a.innerType,r.default=JSON.parse(JSON.stringify(a.defaultValue))},rP=(e,t,r,o)=>{const a=e._zod.def;Jt(a.innerType,t,o);const c=t.seen.get(e);c.ref=a.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},sP=(e,t,r,o)=>{const a=e._zod.def;Jt(a.innerType,t,o);const c=t.seen.get(e);c.ref=a.innerType;let d;try{d=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=d},oP=(e,t,r,o)=>{const a=e._zod.def,c=a.in._zod.traits.has("$ZodTransform"),d=t.io==="input"?c?a.out:a.in:a.out;Jt(d,t,o);const p=t.seen.get(e);p.ref=d},iP=(e,t,r,o)=>{const a=e._zod.def;Jt(a.innerType,t,o);const c=t.seen.get(e);c.ref=a.innerType,r.readOnly=!0},Kw=(e,t,r,o)=>{const a=e._zod.def;Jt(a.innerType,t,o);const c=t.seen.get(e);c.ref=a.innerType},aP=(e,t)=>{Dw.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>V2(e,r)},flatten:{value:r=>U2(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Tf,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Tf,2)}},isEmpty:{get(){return e.issues.length===0}}})},Dn=Re("ZodError",aP,{Parent:Error}),lP=vp(Dn),cP=wp(Dn),uP=Tc(Dn),dP=Rc(Dn),fP=H2(Dn),pP=q2(Dn),hP=K2(Dn),mP=Q2(Dn),gP=G2(Dn),yP=Z2(Dn),vP=J2(Dn),wP=Y2(Dn),Ny=new WeakMap;function xp(e,t,r){const o=Object.getPrototypeOf(e);let a=Ny.get(o);if(a||(a=new Set,Ny.set(o,a)),!a.has(t)){a.add(t);for(const c in r){const d=r[c];Object.defineProperty(o,c,{configurable:!0,enumerable:!1,get(){const p=d.bind(this);return Object.defineProperty(this,c,{configurable:!0,writable:!0,enumerable:!0,value:p}),p},set(p){Object.defineProperty(this,c,{configurable:!0,writable:!0,enumerable:!0,value:p})}})}}}const en=Re("ZodType",(e,t)=>(Xt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:hc(e,"input"),output:hc(e,"output")}}),e.toJSONSchema=qO(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>lP(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>uP(e,r,o),e.parseAsync=async(r,o)=>cP(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>dP(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>fP(e,r,o),e.decode=(r,o)=>pP(e,r,o),e.encodeAsync=async(r,o)=>hP(e,r,o),e.decodeAsync=async(r,o)=>mP(e,r,o),e.safeEncode=(r,o)=>gP(e,r,o),e.safeDecode=(r,o)=>yP(e,r,o),e.safeEncodeAsync=async(r,o)=>vP(e,r,o),e.safeDecodeAsync=async(r,o)=>wP(e,r,o),xp(e,"ZodType",{check(...r){const o=this.def;return this.clone(I2(o,{checks:[...o.checks??[],...r.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return L2(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(QP(r,o))},superRefine(r,o){return this.check(GP(r,o))},overwrite(r){return this.check(gi(r))},optional(){return Ey(this)},exactOptional(){return MP(this)},nullable(){return Oy(this)},nullish(){return Ey(Oy(this))},nonoptional(r){return UP(this,r)},array(){return CP(this)},or(r){return EP([this,r])},and(r){return PP(this,r)},transform(r){return Py(this,TP(r))},default(r){return DP(this,r)},prefault(r){return zP(this,r)},catch(r){return BP(this,r)},pipe(r){return Py(this,r)},readonly(){return qP(this)},describe(r){const o=this.clone();return sa.add(o,{description:r}),o},meta(...r){if(r.length===0)return sa.get(this);const o=this.clone();return sa.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){var r;return(r=sa.get(e))==null?void 0:r.description},configurable:!0}),e)),xP=Re("_ZodString",(e,t)=>{zw.init(e,t),en.init(e,t),e._zod.processJSONSchema=(o,a,c)=>QO(e,o,a);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,xp(e,"_ZodString",{regex(...o){return this.check(TO(...o))},includes(...o){return this.check(MO(...o))},startsWith(...o){return this.check($O(...o))},endsWith(...o){return this.check(IO(...o))},min(...o){return this.check(pc(...o))},max(...o){return this.check(Vw(...o))},length(...o){return this.check(Bw(...o))},nonempty(...o){return this.check(pc(1,...o))},lowercase(o){return this.check(RO(o))},uppercase(o){return this.check(AO(o))},trim(){return this.check(LO())},normalize(...o){return this.check(DO(...o))},toLowerCase(){return this.check(zO())},toUpperCase(){return this.check(FO())},slugify(){return this.check(UO())}})}),bP=Re("ZodStringFormat",(e,t)=>{Fw.init(e,t),xP.init(e,t)}),SP=Re("ZodEmail",(e,t)=>{hO.init(e,t),bP.init(e,t)});function kP(e){return jO(SP,e)}const _P=Re("ZodArray",(e,t)=>{mO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>JO(e,r,o,a),e.element=t.element,xp(e,"ZodArray",{min(r,o){return this.check(pc(r,o))},nonempty(r){return this.check(pc(1,r))},max(r,o){return this.check(Vw(r,o))},length(r,o){return this.check(Bw(r,o))},unwrap(){return this.element}})});function CP(e,t){return VO(_P,e,t)}const NP=Re("ZodUnion",(e,t)=>{gO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>YO(e,r,o,a),e.options=t.options});function EP(e,t){return new NP({type:"union",options:e,...Yt(t)})}const OP=Re("ZodIntersection",(e,t)=>{yO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>XO(e,r,o,a)});function PP(e,t){return new OP({type:"intersection",left:e,right:t})}const jP=Re("ZodTransform",(e,t)=>{vO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>ZO(e,r),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Aw(e.constructor.name);r.addIssue=c=>{if(typeof c=="string")r.issues.push(da(c,r.value,t));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=r.value),d.inst??(d.inst=e),r.issues.push(da(d))}};const a=t.transform(r.value,r);return a instanceof Promise?a.then(c=>(r.value=c,r.fallback=!0,r)):(r.value=a,r.fallback=!0,r)}});function TP(e){return new jP({type:"transform",transform:e})}const RP=Re("ZodOptional",(e,t)=>{Uw.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>Kw(e,r,o,a),e.unwrap=()=>e._zod.def.innerType});function Ey(e){return new RP({type:"optional",innerType:e})}const AP=Re("ZodExactOptional",(e,t)=>{wO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>Kw(e,r,o,a),e.unwrap=()=>e._zod.def.innerType});function MP(e){return new AP({type:"optional",innerType:e})}const $P=Re("ZodNullable",(e,t)=>{xO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>eP(e,r,o,a),e.unwrap=()=>e._zod.def.innerType});function Oy(e){return new $P({type:"nullable",innerType:e})}const IP=Re("ZodDefault",(e,t)=>{bO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>nP(e,r,o,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function DP(e,t){return new IP({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():$w(t)}})}const LP=Re("ZodPrefault",(e,t)=>{SO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>rP(e,r,o,a),e.unwrap=()=>e._zod.def.innerType});function zP(e,t){return new LP({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():$w(t)}})}const FP=Re("ZodNonOptional",(e,t)=>{kO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>tP(e,r,o,a),e.unwrap=()=>e._zod.def.innerType});function UP(e,t){return new FP({type:"nonoptional",innerType:e,...Yt(t)})}const VP=Re("ZodCatch",(e,t)=>{_O.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>sP(e,r,o,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function BP(e,t){return new VP({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const WP=Re("ZodPipe",(e,t)=>{CO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>oP(e,r,o,a),e.in=t.in,e.out=t.out});function Py(e,t){return new WP({type:"pipe",in:e,out:t})}const HP=Re("ZodReadonly",(e,t)=>{NO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>iP(e,r,o,a),e.unwrap=()=>e._zod.def.innerType});function qP(e){return new HP({type:"readonly",innerType:e})}const KP=Re("ZodCustom",(e,t)=>{EO.init(e,t),en.init(e,t),e._zod.processJSONSchema=(r,o,a)=>GO(e,r)});function QP(e,t={}){return BO(KP,e,t)}function GP(e,t){return WO(e,t)}function Le(...e){return M2(vw(e))}const ZP=kP();function T4(e){return ZP.safeParse(e.trim()).success}const jy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ty=vw,Mc=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return Ty(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:c}=t,d=Object.keys(a).map(v=>{const w=r==null?void 0:r[v],f=c==null?void 0:c[v];if(w===null)return null;const x=jy(w)||jy(f);return a[v][x]}),p=r&&Object.entries(r).reduce((v,w)=>{let[f,x]=w;return x===void 0||(v[f]=x),v},{}),g=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((v,w)=>{let{class:f,className:x,...S}=w;return Object.entries(S).every(N=>{let[k,C]=N;return Array.isArray(C)?C.includes({...c,...p}[k]):{...c,...p}[k]===C})?[...v,f,x]:v},[]);return Ty(e,d,g,r==null?void 0:r.class,r==null?void 0:r.className)},JP=Mc("inline-flex items-center rounded-sm border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-muted text-foreground hover:bg-muted/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80 dark:text-destructive-foreground",outline:"text-foreground dark:text-foreground",success:"bg-green-100 text-green-700 border-green-200 dark:bg-green-900/50 dark:text-green-300 dark:border-green-700",warning:"bg-amber-100 text-amber-700 border-amber-200 dark:bg-amber-900/50 dark:text-amber-300 dark:border-amber-700",info:"bg-blue-100 text-blue-700 border-blue-200 dark:bg-blue-900/50 dark:text-blue-300 dark:border-blue-700",rejected:"bg-red-100 text-red-700 border-red-200 dark:bg-red-900/50 dark:text-red-300 dark:border-red-700",neutral:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-gray-700 dark:text-gray-200 dark:border-gray-600"}},defaultVariants:{variant:"default"}});function bp({className:e,variant:t,...r}){return u.jsx("div",{className:Le(JP({variant:t}),e),...r})}const eo="flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm hover:bg-muted",to="text-foreground/80 hover:text-foreground",Sp="bg-muted font-medium text-foreground",$r="h-4 w-4 shrink-0",YP="flex w-full items-center gap-1.5 rounded px-2.5 py-1 text-left text-xs font-semibold uppercase tracking-wide text-muted-foreground hover:text-foreground",Kl=e=>({nestId:e.id,nestName:e.name,isOwner:e.is_owner??e.permission==="owner",isAnonOwned:e.user_id===uw});function XP({nestId:e,nodeId:t,activeView:r=null,onCollapse:o,onOpenDocument:a,onOpenNest:c,onOpenView:d,onConnect:p,onOpenDashboard:g,logoUrl:v,dashboardTab:w=null,onOpenDashboardTab:f,onNewDocument:x}){var G,q;const S=Ir({...Wt.nestList(),enabled:e!==null}),{isAdmin:N,workflowPlaneEnabled:k}=Na(),[C,_]=y.useState(()=>new Set(e?[e]:[]));y.useEffect(()=>{e&&_(A=>A.has(e)?A:new Set([...A,e]))},[e]);const[R,D]=y.useState(""),T=y.useMemo(()=>{var Y;const A=((Y=S.data)==null?void 0:Y.nests)??[],M=R.trim().toLowerCase();return A.filter(W=>!M||W.id===e||String(W.name).toLowerCase().includes(M)).sort((W,oe)=>W.id===e?-1:oe.id===e?1:String(W.name).localeCompare(String(oe.name)))},[S.data,e,R]);return u.jsxs("nav",{"aria-label":"Nests and documents",className:"flex h-full flex-col bg-muted/30 text-sm","data-testid":"document-sidebar",children:[u.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between gap-1 border-b border-border px-4",children:[u.jsxs("button",{type:"button",onClick:g,className:"flex min-w-0 items-center gap-2 hover:opacity-80",title:"Dashboard","data-testid":"document-sidebar-brand",children:[u.jsx("img",{src:v,alt:"ContextNest",className:"h-7 w-7 object-contain"}),u.jsx("span",{className:"font-semibold",children:"ContextNest"}),u.jsx(bp,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:"Community"})]}),u.jsx("button",{type:"button",onClick:o,className:"rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Hide sidebar","aria-label":"Hide sidebar","data-testid":"document-sidebar-collapse",children:u.jsx(k_,{className:"h-4 w-4"})})]}),e!==null&&u.jsxs("button",{type:"button",onClick:g,className:Le(eo,to,"mx-2 mt-3 w-auto"),title:"All nests",children:[u.jsx(Av,{className:$r}),"All nests"]}),e!==null&&(((q=(G=S.data)==null?void 0:G.nests)==null?void 0:q.length)??0)>1&&u.jsxs("div",{className:"relative mx-2 mt-1 mb-2",children:[u.jsx(tp,{className:"pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),u.jsx("input",{type:"search",value:R,onChange:A=>D(A.target.value),placeholder:"Filter nests","aria-label":"Filter nests",className:"h-8 w-full rounded-md border border-border bg-background pl-7 pr-2 text-sm outline-none focus:ring-1 focus:ring-ring","data-testid":"document-sidebar-nest-filter"})]}),u.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-4",children:[e===null&&u.jsx(ej,{active:w,isAdmin:N,onOpen:f}),e!==null&&S.isLoading&&u.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"Loading…"}),e!==null&&T.map(A=>{const M=C.has(A.id),Y=A.id===e;return u.jsxs("div",{className:Le("mb-1",Y&&"mb-3"),children:[u.jsxs("div",{className:Le("group flex items-center gap-1 rounded px-1.5 py-1",Y?"text-foreground":"text-muted-foreground"),children:[u.jsx("button",{type:"button",onClick:()=>_(W=>{const oe=new Set(W);return oe.has(A.id)?oe.delete(A.id):oe.add(A.id),oe}),className:"rounded p-0.5 hover:bg-muted","aria-label":M?`Collapse ${A.name}`:`Expand ${A.name}`,"aria-expanded":M,children:M?u.jsx(li,{className:"h-3.5 w-3.5"}):u.jsx(Ca,{className:"h-3.5 w-3.5"})}),u.jsxs("button",{type:"button",onClick:()=>c(Kl(A)),className:"flex min-w-0 flex-1 items-center gap-1.5 truncate text-left text-xs font-semibold uppercase tracking-wide hover:text-foreground",title:`Open ${A.name}`,children:[u.jsx("span",{className:"truncate",children:A.name}),u.jsx(tj,{visibility:A.visibility})]}),Y&&x&&u.jsx("button",{type:"button",onClick:()=>x(),className:"rounded p-0.5 opacity-0 hover:bg-muted group-hover:opacity-100 focus:opacity-100",title:"New document","aria-label":"New document",children:u.jsx($v,{className:"h-3.5 w-3.5"})})]}),M&&Y&&u.jsx(rj,{nestId:A.id,isOwner:Kl(A).isOwner,isAdmin:N,workflowPlaneEnabled:k,activeView:r,onOpen:W=>d(Kl(A),W),onConnect:p}),M&&u.jsx(sj,{nestId:A.id,currentNodeId:Y?t:null,onOpen:W=>a({...Kl(A),nodeId:W}),onNewDocument:Y?x:void 0})]},A.id)})]})]})}function ej({active:e,isAdmin:t,onOpen:r}){const o=HE({isAdmin:t}),[a,c]=y.useState(()=>jc(localStorage).closedGroups),d=(p,g)=>{const v=g?a.filter(w=>w!==p):[...a,p];c(v),dp(localStorage,{closedGroups:v})};return u.jsxs("div",{className:"mt-3 space-y-0.5","data-testid":"document-sidebar-dashboard",children:[o.top.map(p=>u.jsx(Ry,{page:p,active:p.id===e,onOpen:r},p.id)),o.groups.map(p=>{const g=p.pages.some(w=>w.id===e),v=!a.includes(p.id)||g;return u.jsxs("div",{className:"pt-2",children:[u.jsxs("button",{type:"button",onClick:()=>d(p.id,!v),"aria-expanded":v,className:YP,"data-testid":`document-sidebar-group-${p.id}`,children:[v?u.jsx(li,{className:"h-3.5 w-3.5 shrink-0"}):u.jsx(Ca,{className:"h-3.5 w-3.5 shrink-0"}),u.jsx("span",{className:"truncate",children:p.label})]}),v&&u.jsx("div",{className:"space-y-0.5",children:p.pages.map(w=>u.jsx(Ry,{page:w,active:w.id===e,onOpen:r,indent:!0},w.id))})]},p.id)})]})}function Ry({page:e,active:t,indent:r=!1,onOpen:o}){var p,g;const a=Ir({...((p=e.badge)==null?void 0:p.options())??{queryKey:["page-badge",e.id,"none"],queryFn:async()=>null},enabled:!!e.badge}),c=e.badge?e.badge.count(a.data):0,d=e.icon;return u.jsxs("button",{type:"button",onClick:()=>o==null?void 0:o(e.id),"aria-current":t?"page":void 0,className:Le(eo,r&&"pl-7",t?Sp:to),"data-testid":`document-sidebar-dashboard-${e.id}`,children:[u.jsx(d,{className:$r}),u.jsx("span",{className:"truncate",children:e.label}),c>0&&u.jsx("span",{className:Le("ml-auto rounded-full px-2 py-0.5 text-[11px] font-semibold tabular-nums",((g=e.badge)==null?void 0:g.tone)==="primary"?"bg-primary text-primary-foreground":"bg-muted-foreground/15 text-muted-foreground"),children:c})]})}function tj({visibility:e}){return e==="public"?u.jsx(t_,{className:"h-3 w-3 shrink-0 text-green-600","aria-label":"Public"}):e==="org"?u.jsx(Mk,{className:"h-3 w-3 shrink-0 text-blue-600","aria-label":"Organization"}):u.jsx(h_,{className:"h-3 w-3 shrink-0 opacity-60","aria-label":"Private"})}const nj={overview:Rv,review:Vk};function rj({nestId:e,isOwner:t,isAdmin:r,workflowPlaneEnabled:o,activeView:a,onOpen:c,onConnect:d}){var G,q,A,M,Y;const p=qN(e),g=y.useMemo(()=>{var oe;const W=p.data;return W?Nf({roles:W.roles??[],permission:W.permission??null,myStewards:W.myStewards??[],isOwner:t,isAdmin:r,readerMode:!!((oe=W.nest)!=null&&oe.reader_mode),isArchived:KN(W.nest)}):null},[p.data,t,r]),v=Ir({...Wt.reviewQueue(e),enabled:!!g&&!g.isReadOnly&&!g.isReaderView}),w=((G=v.data)==null?void 0:G.total)??((A=(q=v.data)==null?void 0:q.requests)==null?void 0:A.length)??0,f=!!((Y=(M=p.data)==null?void 0:M.nest)!=null&&Y.stewardship_enabled),x=y.useMemo(()=>g?gE(g,{workflowPlaneEnabled:o,stewardshipEnabled:f,hasPending:w>0}):[],[g,o,f,w]),[S,N]=y.useState(()=>jc(localStorage).viewsOpen),k=W=>{N(W),dp(localStorage,{viewsOpen:W})},C=x.some(W=>W.group==="views"&&W.id===a),_=S||C,R=x.filter(W=>!W.group),D=x.filter(W=>W.group==="views");if(x.length===0)return null;const T=(W,oe=!1)=>{const ge=W.icon??nj[W.id]??Rv,de=W.id===a;return u.jsxs("button",{type:"button",onClick:()=>c(W),"aria-current":de?"page":void 0,className:Le(eo,oe&&"pl-7",de?Sp:to),"data-testid":`document-sidebar-view-${W.id}`,children:[u.jsx(ge,{className:$r}),u.jsx("span",{className:"truncate",children:W.label}),W.id==="review"&&w>0&&u.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 rounded-full bg-amber-100 px-1.5 py-px text-[10px] font-semibold tabular-nums text-amber-800 dark:bg-amber-950/40 dark:text-amber-300",title:`${w} awaiting review`,"data-testid":"document-sidebar-review-badge",children:[u.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-500","aria-hidden":!0}),w]})]},W.id)};return u.jsxs("div",{className:"mb-1 ml-2 pl-1","data-testid":"document-sidebar-views",children:[R.map(W=>T(W)),D.length>0&&u.jsxs(u.Fragment,{children:[u.jsxs("button",{type:"button",onClick:()=>k(!_),"aria-expanded":_,className:Le(eo,to),"data-testid":"document-sidebar-views-group",children:[_?u.jsx(li,{className:$r}):u.jsx(Ca,{className:$r}),u.jsx("span",{className:"truncate",children:"Views"})]}),_&&D.map(W=>T(W,!0))]}),d&&u.jsxs("button",{type:"button",onClick:d,className:Le(eo,to),title:"Connect a CLI, MCP client or API caller to this nest","data-testid":"document-sidebar-connect",children:[u.jsx(P_,{className:$r}),u.jsx("span",{className:"truncate",children:"Connect"})]})]})}function sj({nestId:e,currentNodeId:t,onOpen:r,onNewDocument:o}){var C;const[a,c]=y.useState(()=>new Map),d=y.useMemo(()=>new Set(t?hE(t):[]),[t]),p=_=>a.get(_)??!d.has(_),g=Ir(Wt.census(e)),v=y.useMemo(()=>{var _;return(((_=g.data)==null?void 0:_.census.folders)??[]).map(R=>({path:R.path,total:R.total??0}))},[g.data]),w=y.useMemo(()=>["",...v.map(R=>R.path).filter(R=>!p(R))],[v,a,d]),f=zN({queries:w.map(_=>Wt.folderNodes(e,_))}),x=f[0],S=f.flatMap(_=>{var R;return((R=_.data)==null?void 0:R.nodes)??[]}),N=S.map(_=>_.id).join("|"),k=y.useMemo(()=>mE(S),[N]);return x!=null&&x.isLoading&&g.isLoading?u.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"Loading…"}):x!=null&&x.isError?u.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"Couldn't load"}):!(x!=null&&x.isLoading)&&(((C=x==null?void 0:x.data)==null?void 0:C.nodes)??[]).length===0&&v.length===0?u.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"No documents yet"}):u.jsx(vE,{groups:k,known:v,indentRem:.75,isCollapsed:p,className:"ml-2 border-l border-border/60 pl-1",renderFolder:(_,{collapsed:R})=>u.jsxs("div",{className:"group flex items-center",children:[u.jsxs("button",{type:"button",onClick:()=>c(D=>new Map(D).set(_.path,!R)),className:Le(eo,to),"aria-expanded":!R,title:_.path,children:[R?u.jsx(Xk,{className:$r}):u.jsx(Jk,{className:$r}),u.jsx("span",{className:"truncate",children:_.label}),_.total>0&&u.jsx("span",{className:"ml-auto text-[10px] tabular-nums opacity-70",children:_.total})]}),o&&u.jsx("button",{type:"button",onClick:()=>o(_.path),className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 hover:bg-muted hover:text-foreground focus:opacity-100 group-hover:opacity-100",title:`New document in ${_.label}`,"aria-label":`New document in ${_.label}`,"data-testid":"document-sidebar-folder-new",children:u.jsx($v,{className:"h-3.5 w-3.5"})})]}),renderDoc:_=>{const R=_.id===t;return u.jsxs("button",{type:"button",onClick:()=>r(_.id),"aria-current":R?"page":void 0,className:Le(eo,R?Sp:to),title:_.title,"data-testid":"document-sidebar-doc",children:[u.jsx(Xf,{className:$r}),u.jsx("span",{className:"truncate",children:_.title||"Untitled"})]})}})}function De(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ay(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _s(...e){return t=>{let r=!1;const o=e.map(a=>{const c=Ay(a,t);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let a=0;a<o.length;a++){const c=o[a];typeof c=="function"?c():Ay(e[a],null)}}}}function kt(...e){return y.useCallback(_s(...e),e)}function oj(e,t){const r=y.createContext(t),o=c=>{const{children:d,...p}=c,g=y.useMemo(()=>p,Object.values(p));return u.jsx(r.Provider,{value:g,children:d})};o.displayName=e+"Provider";function a(c){const d=y.useContext(r);if(d)return d;if(t!==void 0)return t;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[o,a]}function Cs(e,t=[]){let r=[];function o(c,d){const p=y.createContext(d),g=r.length;r=[...r,d];const v=f=>{var _;const{scope:x,children:S,...N}=f,k=((_=x==null?void 0:x[e])==null?void 0:_[g])||p,C=y.useMemo(()=>N,Object.values(N));return u.jsx(k.Provider,{value:C,children:S})};v.displayName=c+"Provider";function w(f,x){var k;const S=((k=x==null?void 0:x[e])==null?void 0:k[g])||p,N=y.useContext(S);if(N)return N;if(d!==void 0)return d;throw new Error(`\`${f}\` must be used within \`${c}\``)}return[v,w]}const a=()=>{const c=r.map(d=>y.createContext(d));return function(p){const g=(p==null?void 0:p[e])||c;return y.useMemo(()=>({[`__scope${e}`]:{...p,[e]:g}}),[p,g])}};return a.scopeName=e,[o,ij(a,...t)]}function ij(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const d=o.reduce((p,{useScope:g,scopeName:v})=>{const f=g(c)[`__scope${v}`];return{...p,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return r.scopeName=t.scopeName,r}var Qn=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},aj=Gf[" useId ".trim().toString()]||(()=>{}),lj=0;function no(e){const[t,r]=y.useState(aj());return Qn(()=>{r(o=>o??String(lj++))},[e]),e||(t?`radix-${t}`:"")}var cj=Gf[" useInsertionEffect ".trim().toString()]||Qn;function Ea({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[a,c,d]=uj({defaultProp:t,onChange:r}),p=e!==void 0,g=p?e:a;{const w=y.useRef(e!==void 0);y.useEffect(()=>{const f=w.current;f!==p&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${p?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),w.current=p},[p,o])}const v=y.useCallback(w=>{var f;if(p){const x=dj(w)?w(e):w;x!==e&&((f=d.current)==null||f.call(d,x))}else c(w)},[p,e,c,d]);return[g,v]}function uj({defaultProp:e,onChange:t}){const[r,o]=y.useState(e),a=y.useRef(r),c=y.useRef(t);return cj(()=>{c.current=t},[t]),y.useEffect(()=>{var d;a.current!==r&&((d=c.current)==null||d.call(c,r),a.current=r)},[r,a]),[r,o,c]}function dj(e){return typeof e=="function"}function fj(e){const t=pj(e),r=y.forwardRef((o,a)=>{const{children:c,...d}=o,p=y.Children.toArray(c),g=p.find(mj);if(g){const v=g.props.children,w=p.map(f=>f===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:f);return u.jsx(t,{...d,ref:a,children:y.isValidElement(v)?y.cloneElement(v,void 0,w):null})}return u.jsx(t,{...d,ref:a,children:c})});return r.displayName=`${e}.Slot`,r}function pj(e){const t=y.forwardRef((r,o)=>{const{children:a,...c}=r;if(y.isValidElement(a)){const d=yj(a),p=gj(c,a.props);return a.type!==y.Fragment&&(p.ref=o?_s(o,d):d),y.cloneElement(a,p)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hj=Symbol("radix.slottable");function mj(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hj}function gj(e,t){const r={...t};for(const o in t){const a=e[o],c=t[o];/^on[A-Z]/.test(o)?a&&c?r[o]=(...p)=>{const g=c(...p);return a(...p),g}:a&&(r[o]=a):o==="style"?r[o]={...a,...c}:o==="className"&&(r[o]=[a,c].filter(Boolean).join(" "))}return{...e,...r}}function yj(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var vj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=vj.reduce((e,t)=>{const r=fj(`Primitive.${t}`),o=y.forwardRef((a,c)=>{const{asChild:d,...p}=a,g=d?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(g,{...p,ref:c})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Qw(e,t){e&&Zf.flushSync(()=>e.dispatchEvent(t))}function gr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function wj(e,t=globalThis==null?void 0:globalThis.document){const r=gr(e);y.useEffect(()=>{const o=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var xj="DismissableLayer",Mf="dismissableLayer.update",bj="dismissableLayer.pointerDownOutside",Sj="dismissableLayer.focusOutside",My,Gw=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kp=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:d,onDismiss:p,...g}=e,v=y.useContext(Gw),[w,f]=y.useState(null),x=(w==null?void 0:w.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=y.useState({}),N=kt(t,A=>f(A)),k=Array.from(v.layers),[C]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),_=k.indexOf(C),R=w?k.indexOf(w):-1,D=v.layersWithOutsidePointerEventsDisabled.size>0,T=R>=_,G=Cj(A=>{const M=A.target,Y=[...v.branches].some(W=>W.contains(M));!T||Y||(a==null||a(A),d==null||d(A),A.defaultPrevented||p==null||p())},x),q=Nj(A=>{const M=A.target;[...v.branches].some(W=>W.contains(M))||(c==null||c(A),d==null||d(A),A.defaultPrevented||p==null||p())},x);return wj(A=>{R===v.layers.size-1&&(o==null||o(A),!A.defaultPrevented&&p&&(A.preventDefault(),p()))},x),y.useEffect(()=>{if(w)return r&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(My=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(w)),v.layers.add(w),$y(),()=>{r&&v.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=My)}},[w,x,r,v]),y.useEffect(()=>()=>{w&&(v.layers.delete(w),v.layersWithOutsidePointerEventsDisabled.delete(w),$y())},[w,v]),y.useEffect(()=>{const A=()=>S({});return document.addEventListener(Mf,A),()=>document.removeEventListener(Mf,A)},[]),u.jsx(Ze.div,{...g,ref:N,style:{pointerEvents:D?T?"auto":"none":void 0,...e.style},onFocusCapture:De(e.onFocusCapture,q.onFocusCapture),onBlurCapture:De(e.onBlurCapture,q.onBlurCapture),onPointerDownCapture:De(e.onPointerDownCapture,G.onPointerDownCapture)})});kp.displayName=xj;var kj="DismissableLayerBranch",_j=y.forwardRef((e,t)=>{const r=y.useContext(Gw),o=y.useRef(null),a=kt(t,o);return y.useEffect(()=>{const c=o.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),u.jsx(Ze.div,{...e,ref:a})});_j.displayName=kj;function Cj(e,t=globalThis==null?void 0:globalThis.document){const r=gr(e),o=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const c=p=>{if(p.target&&!o.current){let g=function(){Zw(bj,r,v,{discrete:!0})};const v={originalEvent:p};p.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=g,t.addEventListener("click",a.current,{once:!0})):g()}else t.removeEventListener("click",a.current);o.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",c),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function Nj(e,t=globalThis==null?void 0:globalThis.document){const r=gr(e),o=y.useRef(!1);return y.useEffect(()=>{const a=c=>{c.target&&!o.current&&Zw(Sj,r,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function $y(){const e=new CustomEvent(Mf);document.dispatchEvent(e)}function Zw(e,t,r,{discrete:o}){const a=r.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),o?Qw(a,c):a.dispatchEvent(c)}var Ud="focusScope.autoFocusOnMount",Vd="focusScope.autoFocusOnUnmount",Iy={bubbles:!1,cancelable:!0},Ej="FocusScope",_p=y.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:c,...d}=e,[p,g]=y.useState(null),v=gr(a),w=gr(c),f=y.useRef(null),x=kt(t,k=>g(k)),S=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(o){let k=function(D){if(S.paused||!p)return;const T=D.target;p.contains(T)?f.current=T:ds(f.current,{select:!0})},C=function(D){if(S.paused||!p)return;const T=D.relatedTarget;T!==null&&(p.contains(T)||ds(f.current,{select:!0}))},_=function(D){if(document.activeElement===document.body)for(const G of D)G.removedNodes.length>0&&ds(p)};document.addEventListener("focusin",k),document.addEventListener("focusout",C);const R=new MutationObserver(_);return p&&R.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",C),R.disconnect()}}},[o,p,S.paused]),y.useEffect(()=>{if(p){Ly.add(S);const k=document.activeElement;if(!p.contains(k)){const _=new CustomEvent(Ud,Iy);p.addEventListener(Ud,v),p.dispatchEvent(_),_.defaultPrevented||(Oj(Aj(Jw(p)),{select:!0}),document.activeElement===k&&ds(p))}return()=>{p.removeEventListener(Ud,v),setTimeout(()=>{const _=new CustomEvent(Vd,Iy);p.addEventListener(Vd,w),p.dispatchEvent(_),_.defaultPrevented||ds(k??document.body,{select:!0}),p.removeEventListener(Vd,w),Ly.remove(S)},0)}}},[p,v,w,S]);const N=y.useCallback(k=>{if(!r&&!o||S.paused)return;const C=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,_=document.activeElement;if(C&&_){const R=k.currentTarget,[D,T]=Pj(R);D&&T?!k.shiftKey&&_===T?(k.preventDefault(),r&&ds(D,{select:!0})):k.shiftKey&&_===D&&(k.preventDefault(),r&&ds(T,{select:!0})):_===R&&k.preventDefault()}},[r,o,S.paused]);return u.jsx(Ze.div,{tabIndex:-1,...d,ref:x,onKeyDown:N})});_p.displayName=Ej;function Oj(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(ds(o,{select:t}),document.activeElement!==r)return}function Pj(e){const t=Jw(e),r=Dy(t,e),o=Dy(t.reverse(),e);return[r,o]}function Jw(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Dy(e,t){for(const r of e)if(!jj(r,{upTo:t}))return r}function jj(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}function Tj(e){return e instanceof HTMLInputElement&&"select"in e}function ds(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Tj(e)&&t&&e.select()}}var Ly=Rj();function Rj(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=zy(e,t),e.unshift(t)},remove(t){var r;e=zy(e,t),(r=e[0])==null||r.resume()}}}function zy(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function Aj(e){return e.filter(t=>t.tagName!=="A")}var Mj="Portal",Cp=y.forwardRef((e,t)=>{var p;const{container:r,...o}=e,[a,c]=y.useState(!1);Qn(()=>c(!0),[]);const d=r||a&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return d?Nv.createPortal(u.jsx(Ze.div,{...o,ref:t}),d):null});Cp.displayName=Mj;function $j(e,t){return y.useReducer((r,o)=>t[r][o]??r,e)}var Dr=e=>{const{present:t,children:r}=e,o=Ij(t),a=typeof r=="function"?r({present:o.isPresent}):y.Children.only(r),c=kt(o.ref,Dj(a));return typeof r=="function"||o.isPresent?y.cloneElement(a,{ref:c}):null};Dr.displayName="Presence";function Ij(e){const[t,r]=y.useState(),o=y.useRef(null),a=y.useRef(e),c=y.useRef("none"),d=e?"mounted":"unmounted",[p,g]=$j(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const v=Ql(o.current);c.current=p==="mounted"?v:"none"},[p]),Qn(()=>{const v=o.current,w=a.current;if(w!==e){const x=c.current,S=Ql(v);e?g("MOUNT"):S==="none"||(v==null?void 0:v.display)==="none"?g("UNMOUNT"):g(w&&x!==S?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,g]),Qn(()=>{if(t){let v;const w=t.ownerDocument.defaultView??window,f=S=>{const k=Ql(o.current).includes(CSS.escape(S.animationName));if(S.target===t&&k&&(g("ANIMATION_END"),!a.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",v=w.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},x=S=>{S.target===t&&(c.current=Ql(o.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{w.clearTimeout(v),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else g("ANIMATION_END")},[t,g]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:y.useCallback(v=>{o.current=v?getComputedStyle(v):null,r(v)},[])}}function Ql(e){return(e==null?void 0:e.animationName)||"none"}function Dj(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Bd=0;function Yw(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fy()),document.body.insertAdjacentElement("beforeend",e[1]??Fy()),Bd++,()=>{Bd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bd--}},[])}function Fy(){const 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}var hr=function(){return hr=Object.assign||function(t){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(t[c]=r[c])}return t},hr.apply(this,arguments)};function Xw(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(r[o[a]]=e[o[a]]);return r}function Lj(e,t,r){if(r||arguments.length===2)for(var o=0,a=t.length,c;o<a;o++)(c||!(o in t))&&(c||(c=Array.prototype.slice.call(t,0,o)),c[o]=t[o]);return e.concat(c||Array.prototype.slice.call(t))}var rc="right-scroll-bar-position",sc="width-before-scroll-bar",zj="with-scroll-bars-hidden",Fj="--removed-body-scroll-bar-size";function Wd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Uj(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var a=r.value;a!==o&&(r.value=o,r.callback(o,a))}}}})[0];return r.callback=t,r.facade}var Vj=typeof window<"u"?y.useLayoutEffect:y.useEffect,Uy=new WeakMap;function Bj(e,t){var r=Uj(null,function(o){return e.forEach(function(a){return Wd(a,o)})});return Vj(function(){var o=Uy.get(r);if(o){var a=new Set(o),c=new Set(e),d=r.current;a.forEach(function(p){c.has(p)||Wd(p,null)}),c.forEach(function(p){a.has(p)||Wd(p,d)})}Uy.set(r,e)},[e]),r}function Wj(e){return e}function Hj(e,t){t===void 0&&(t=Wj);var r=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(c){var d=t(c,o);return r.push(d),function(){r=r.filter(function(p){return p!==d})}},assignSyncMedium:function(c){for(o=!0;r.length;){var d=r;r=[],d.forEach(c)}r={push:function(p){return c(p)},filter:function(){return r}}},assignMedium:function(c){o=!0;var d=[];if(r.length){var p=r;r=[],p.forEach(c),d=r}var g=function(){var w=d;d=[],w.forEach(c)},v=function(){return Promise.resolve().then(g)};v(),r={push:function(w){d.push(w),v()},filter:function(w){return d=d.filter(w),r}}}};return a}function qj(e){e===void 0&&(e={});var t=Hj(null);return t.options=hr({async:!0,ssr:!1},e),t}var ex=function(e){var t=e.sideCar,r=Xw(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return y.createElement(o,hr({},r))};ex.isSideCarExport=!0;function Kj(e,t){return e.useMedium(t),ex}var tx=qj(),Hd=function(){},$c=y.forwardRef(function(e,t){var r=y.useRef(null),o=y.useState({onScrollCapture:Hd,onWheelCapture:Hd,onTouchMoveCapture:Hd}),a=o[0],c=o[1],d=e.forwardProps,p=e.children,g=e.className,v=e.removeScrollBar,w=e.enabled,f=e.shards,x=e.sideCar,S=e.noRelative,N=e.noIsolation,k=e.inert,C=e.allowPinchZoom,_=e.as,R=_===void 0?"div":_,D=e.gapMode,T=Xw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),G=x,q=Bj([r,t]),A=hr(hr({},T),a);return y.createElement(y.Fragment,null,w&&y.createElement(G,{sideCar:tx,removeScrollBar:v,shards:f,noRelative:S,noIsolation:N,inert:k,setCallbacks:c,allowPinchZoom:!!C,lockRef:r,gapMode:D}),d?y.cloneElement(y.Children.only(p),hr(hr({},A),{ref:q})):y.createElement(R,hr({},A,{className:g,ref:q}),p))});$c.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$c.classNames={fullWidth:sc,zeroRight:rc};var Qj=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Gj(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qj();return t&&e.setAttribute("nonce",t),e}function Zj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Jj(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yj=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Gj())&&(Zj(t,r),Jj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xj=function(){var e=Yj();return function(t,r){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},nx=function(){var e=Xj(),t=function(r){var o=r.styles,a=r.dynamic;return e(o,a),null};return t},eT={left:0,top:0,right:0,gap:0},qd=function(e){return parseInt(e||"",10)||0},tT=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[qd(r),qd(o),qd(a)]},nT=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return eT;var t=tT(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},rT=nx(),Ho="data-scroll-locked",sT=function(e,t,r,o){var a=e.left,c=e.top,d=e.right,p=e.gap;return r===void 0&&(r="margin"),`
|
|
329
|
-
.`.concat(zj,` {
|
|
330
|
-
overflow: hidden `).concat(o,`;
|
|
331
|
-
padding-right: `).concat(p,"px ").concat(o,`;
|
|
332
|
-
}
|
|
333
|
-
body[`).concat(Ho,`] {
|
|
334
|
-
overflow: hidden `).concat(o,`;
|
|
335
|
-
overscroll-behavior: contain;
|
|
336
|
-
`).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
337
|
-
padding-left: `.concat(a,`px;
|
|
338
|
-
padding-top: `).concat(c,`px;
|
|
339
|
-
padding-right: `).concat(d,`px;
|
|
340
|
-
margin-left:0;
|
|
341
|
-
margin-top:0;
|
|
342
|
-
margin-right: `).concat(p,"px ").concat(o,`;
|
|
343
|
-
`),r==="padding"&&"padding-right: ".concat(p,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.`).concat(rc,` {
|
|
347
|
-
right: `).concat(p,"px ").concat(o,`;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.`).concat(sc,` {
|
|
351
|
-
margin-right: `).concat(p,"px ").concat(o,`;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.`).concat(rc," .").concat(rc,` {
|
|
355
|
-
right: 0 `).concat(o,`;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.`).concat(sc," .").concat(sc,` {
|
|
359
|
-
margin-right: 0 `).concat(o,`;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
body[`).concat(Ho,`] {
|
|
363
|
-
`).concat(Fj,": ").concat(p,`px;
|
|
364
|
-
}
|
|
365
|
-
`)},Vy=function(){var e=parseInt(document.body.getAttribute(Ho)||"0",10);return isFinite(e)?e:0},oT=function(){y.useEffect(function(){return document.body.setAttribute(Ho,(Vy()+1).toString()),function(){var e=Vy()-1;e<=0?document.body.removeAttribute(Ho):document.body.setAttribute(Ho,e.toString())}},[])},iT=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;oT();var c=y.useMemo(function(){return nT(a)},[a]);return y.createElement(rT,{styles:sT(c,!t,a,r?"":"!important")})},$f=!1;if(typeof window<"u")try{var Gl=Object.defineProperty({},"passive",{get:function(){return $f=!0,!0}});window.addEventListener("test",Gl,Gl),window.removeEventListener("test",Gl,Gl)}catch{$f=!1}var zo=$f?{passive:!1}:!1,aT=function(e){return e.tagName==="TEXTAREA"},rx=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!aT(e)&&r[t]==="visible")},lT=function(e){return rx(e,"overflowY")},cT=function(e){return rx(e,"overflowX")},By=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=sx(e,o);if(a){var c=ox(e,o),d=c[1],p=c[2];if(d>p)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},uT=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},dT=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},sx=function(e,t){return e==="v"?lT(t):cT(t)},ox=function(e,t){return e==="v"?uT(t):dT(t)},fT=function(e,t){return e==="h"&&t==="rtl"?-1:1},pT=function(e,t,r,o,a){var c=fT(e,window.getComputedStyle(t).direction),d=c*o,p=r.target,g=t.contains(p),v=!1,w=d>0,f=0,x=0;do{if(!p)break;var S=ox(e,p),N=S[0],k=S[1],C=S[2],_=k-C-c*N;(N||_)&&sx(e,p)&&(f+=_,x+=N);var R=p.parentNode;p=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!g&&p!==document.body||g&&(t.contains(p)||t===p));return(w&&Math.abs(f)<1||!w&&Math.abs(x)<1)&&(v=!0),v},Zl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wy=function(e){return[e.deltaX,e.deltaY]},Hy=function(e){return e&&"current"in e?e.current:e},hT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mT=function(e){return`
|
|
366
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
367
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
368
|
-
`)},gT=0,Fo=[];function yT(e){var t=y.useRef([]),r=y.useRef([0,0]),o=y.useRef(),a=y.useState(gT++)[0],c=y.useState(nx)[0],d=y.useRef(e);y.useEffect(function(){d.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=Lj([e.lockRef.current],(e.shards||[]).map(Hy),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var p=y.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!d.current.allowPinchZoom;var _=Zl(k),R=r.current,D="deltaX"in k?k.deltaX:R[0]-_[0],T="deltaY"in k?k.deltaY:R[1]-_[1],G,q=k.target,A=Math.abs(D)>Math.abs(T)?"h":"v";if("touches"in k&&A==="h"&&q.type==="range")return!1;var M=window.getSelection(),Y=M&&M.anchorNode,W=Y?Y===q||Y.contains(q):!1;if(W)return!1;var oe=By(A,q);if(!oe)return!0;if(oe?G=A:(G=A==="v"?"h":"v",oe=By(A,q)),!oe)return!1;if(!o.current&&"changedTouches"in k&&(D||T)&&(o.current=G),!G)return!0;var ge=o.current||G;return pT(ge,C,k,ge==="h"?D:T)},[]),g=y.useCallback(function(k){var C=k;if(!(!Fo.length||Fo[Fo.length-1]!==c)){var _="deltaY"in C?Wy(C):Zl(C),R=t.current.filter(function(G){return G.name===C.type&&(G.target===C.target||C.target===G.shadowParent)&&hT(G.delta,_)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var D=(d.current.shards||[]).map(Hy).filter(Boolean).filter(function(G){return G.contains(C.target)}),T=D.length>0?p(C,D[0]):!d.current.noIsolation;T&&C.cancelable&&C.preventDefault()}}},[]),v=y.useCallback(function(k,C,_,R){var D={name:k,delta:C,target:_,should:R,shadowParent:vT(_)};t.current.push(D),setTimeout(function(){t.current=t.current.filter(function(T){return T!==D})},1)},[]),w=y.useCallback(function(k){r.current=Zl(k),o.current=void 0},[]),f=y.useCallback(function(k){v(k.type,Wy(k),k.target,p(k,e.lockRef.current))},[]),x=y.useCallback(function(k){v(k.type,Zl(k),k.target,p(k,e.lockRef.current))},[]);y.useEffect(function(){return Fo.push(c),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:x}),document.addEventListener("wheel",g,zo),document.addEventListener("touchmove",g,zo),document.addEventListener("touchstart",w,zo),function(){Fo=Fo.filter(function(k){return k!==c}),document.removeEventListener("wheel",g,zo),document.removeEventListener("touchmove",g,zo),document.removeEventListener("touchstart",w,zo)}},[]);var S=e.removeScrollBar,N=e.inert;return y.createElement(y.Fragment,null,N?y.createElement(c,{styles:mT(a)}):null,S?y.createElement(iT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wT=Kj(tx,yT);var Np=y.forwardRef(function(e,t){return y.createElement($c,hr({},e,{ref:t,sideCar:wT}))});Np.classNames=$c.classNames;var xT=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Uo=new WeakMap,Jl=new WeakMap,Yl={},Kd=0,ix=function(e){return e&&(e.host||ix(e.parentNode))},bT=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=ix(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},ST=function(e,t,r,o){var a=bT(t,Array.isArray(e)?e:[e]);Yl[r]||(Yl[r]=new WeakMap);var c=Yl[r],d=[],p=new Set,g=new Set(a),v=function(f){!f||p.has(f)||(p.add(f),v(f.parentNode))};a.forEach(v);var w=function(f){!f||g.has(f)||Array.prototype.forEach.call(f.children,function(x){if(p.has(x))w(x);else try{var S=x.getAttribute(o),N=S!==null&&S!=="false",k=(Uo.get(x)||0)+1,C=(c.get(x)||0)+1;Uo.set(x,k),c.set(x,C),d.push(x),k===1&&N&&Jl.set(x,!0),C===1&&x.setAttribute(r,"true"),N||x.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",x,_)}})};return w(t),p.clear(),Kd++,function(){d.forEach(function(f){var x=Uo.get(f)-1,S=c.get(f)-1;Uo.set(f,x),c.set(f,S),x||(Jl.has(f)||f.removeAttribute(o),Jl.delete(f)),S||f.removeAttribute(r)}),Kd--,Kd||(Uo=new WeakMap,Uo=new WeakMap,Jl=new WeakMap,Yl={})}},ax=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=xT(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live], script"))),ST(o,a,r,"aria-hidden")):function(){return null}};function kT(e){const t=_T(e),r=y.forwardRef((o,a)=>{const{children:c,...d}=o,p=y.Children.toArray(c),g=p.find(NT);if(g){const v=g.props.children,w=p.map(f=>f===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:f);return u.jsx(t,{...d,ref:a,children:y.isValidElement(v)?y.cloneElement(v,void 0,w):null})}return u.jsx(t,{...d,ref:a,children:c})});return r.displayName=`${e}.Slot`,r}function _T(e){const t=y.forwardRef((r,o)=>{const{children:a,...c}=r;if(y.isValidElement(a)){const d=OT(a),p=ET(c,a.props);return a.type!==y.Fragment&&(p.ref=o?_s(o,d):d),y.cloneElement(a,p)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CT=Symbol("radix.slottable");function NT(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CT}function ET(e,t){const r={...t};for(const o in t){const a=e[o],c=t[o];/^on[A-Z]/.test(o)?a&&c?r[o]=(...p)=>{const g=c(...p);return a(...p),g}:a&&(r[o]=a):o==="style"?r[o]={...a,...c}:o==="className"&&(r[o]=[a,c].filter(Boolean).join(" "))}return{...e,...r}}function OT(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ic="Dialog",[lx,R4]=Cs(Ic),[PT,Xn]=lx(Ic),cx=e=>{const{__scopeDialog:t,children:r,open:o,defaultOpen:a,onOpenChange:c,modal:d=!0}=e,p=y.useRef(null),g=y.useRef(null),[v,w]=Ea({prop:o,defaultProp:a??!1,onChange:c,caller:Ic});return u.jsx(PT,{scope:t,triggerRef:p,contentRef:g,contentId:no(),titleId:no(),descriptionId:no(),open:v,onOpenChange:w,onOpenToggle:y.useCallback(()=>w(f=>!f),[w]),modal:d,children:r})};cx.displayName=Ic;var ux="DialogTrigger",dx=y.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=Xn(ux,r),c=kt(t,a.triggerRef);return u.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Pp(a.open),...o,ref:c,onClick:De(e.onClick,a.onOpenToggle)})});dx.displayName=ux;var Ep="DialogPortal",[jT,fx]=lx(Ep,{forceMount:void 0}),px=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:a}=e,c=Xn(Ep,t);return u.jsx(jT,{scope:t,forceMount:r,children:y.Children.map(o,d=>u.jsx(Dr,{present:r||c.open,children:u.jsx(Cp,{asChild:!0,container:a,children:d})}))})};px.displayName=Ep;var mc="DialogOverlay",hx=y.forwardRef((e,t)=>{const r=fx(mc,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,c=Xn(mc,e.__scopeDialog);return c.modal?u.jsx(Dr,{present:o||c.open,children:u.jsx(RT,{...a,ref:t})}):null});hx.displayName=mc;var TT=kT("DialogOverlay.RemoveScroll"),RT=y.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=Xn(mc,r);return u.jsx(Np,{as:TT,allowPinchZoom:!0,shards:[a.contentRef],children:u.jsx(Ze.div,{"data-state":Pp(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),oo="DialogContent",mx=y.forwardRef((e,t)=>{const r=fx(oo,e.__scopeDialog),{forceMount:o=r.forceMount,...a}=e,c=Xn(oo,e.__scopeDialog);return u.jsx(Dr,{present:o||c.open,children:c.modal?u.jsx(AT,{...a,ref:t}):u.jsx(MT,{...a,ref:t})})});mx.displayName=oo;var AT=y.forwardRef((e,t)=>{const r=Xn(oo,e.__scopeDialog),o=y.useRef(null),a=kt(t,r.contentRef,o);return y.useEffect(()=>{const c=o.current;if(c)return ax(c)},[]),u.jsx(gx,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:De(e.onCloseAutoFocus,c=>{var d;c.preventDefault(),(d=r.triggerRef.current)==null||d.focus()}),onPointerDownOutside:De(e.onPointerDownOutside,c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&c.preventDefault()}),onFocusOutside:De(e.onFocusOutside,c=>c.preventDefault())})}),MT=y.forwardRef((e,t)=>{const r=Xn(oo,e.__scopeDialog),o=y.useRef(!1),a=y.useRef(!1);return u.jsx(gx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var d,p;(d=e.onCloseAutoFocus)==null||d.call(e,c),c.defaultPrevented||(o.current||(p=r.triggerRef.current)==null||p.focus(),c.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:c=>{var g,v;(g=e.onInteractOutside)==null||g.call(e,c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const d=c.target;((v=r.triggerRef.current)==null?void 0:v.contains(d))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.current&&c.preventDefault()}})}),gx=y.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:c,...d}=e,p=Xn(oo,r),g=y.useRef(null),v=kt(t,g);return Yw(),u.jsxs(u.Fragment,{children:[u.jsx(_p,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:c,children:u.jsx(kp,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":Pp(p.open),...d,ref:v,onDismiss:()=>p.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx($T,{titleId:p.titleId}),u.jsx(DT,{contentRef:g,descriptionId:p.descriptionId})]})]})}),Op="DialogTitle",yx=y.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=Xn(Op,r);return u.jsx(Ze.h2,{id:a.titleId,...o,ref:t})});yx.displayName=Op;var vx="DialogDescription",wx=y.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=Xn(vx,r);return u.jsx(Ze.p,{id:a.descriptionId,...o,ref:t})});wx.displayName=vx;var xx="DialogClose",bx=y.forwardRef((e,t)=>{const{__scopeDialog:r,...o}=e,a=Xn(xx,r);return u.jsx(Ze.button,{type:"button",...o,ref:t,onClick:De(e.onClick,()=>a.onOpenChange(!1))})});bx.displayName=xx;function Pp(e){return e?"open":"closed"}var Sx="DialogTitleWarning",[A4,kx]=oj(Sx,{contentName:oo,titleName:Op,docsSlug:"dialog"}),$T=({titleId:e})=>{const t=kx(Sx),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
369
|
-
|
|
370
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
371
|
-
|
|
372
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},IT="DialogDescriptionWarning",DT=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${kx(IT).contentName}}.`;return y.useEffect(()=>{var c;const a=(c=e.current)==null?void 0:c.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},LT=cx,M4=dx,zT=px,_x=hx,Cx=mx,Nx=yx,Ex=wx,FT=bx;function Ox(e,t){if(e==null)return{};var r={},o=Object.keys(e),a,c;for(c=0;c<o.length;c++)a=o[c],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var UT=["color"],VT=y.forwardRef(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,a=Ox(e,UT);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),BT=["color"],$4=y.forwardRef(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,a=Ox(e,BT);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});const fi=LT,WT=zT,Px=y.forwardRef(({className:e,...t},r)=>u.jsx(_x,{ref:r,className:Le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Px.displayName=_x.displayName;const io=y.forwardRef(({className:e,children:t,hideCloseButton:r,...o},a)=>u.jsxs(WT,{children:[u.jsx(Px,{}),u.jsxs(Cx,{ref:a,className:Le("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-4 sm:p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg [overflow-wrap:anywhere]",e),...o,children:[t,!r&&u.jsxs(FT,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[u.jsx(VT,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));io.displayName=Cx.displayName;const ao=({className:e,...t})=>u.jsx("div",{className:Le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ao.displayName="DialogHeader";const jp=({className:e,...t})=>u.jsx("div",{className:Le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jp.displayName="DialogFooter";const lo=y.forwardRef(({className:e,...t},r)=>u.jsx(Nx,{ref:r,className:Le("text-lg font-semibold leading-none tracking-tight",e),...t}));lo.displayName=Nx.displayName;const co=y.forwardRef(({className:e,...t},r)=>u.jsx(Ex,{ref:r,className:Le("text-sm text-muted-foreground",e),...t}));co.displayName=Ex.displayName;var HT=Symbol.for("react.lazy"),gc=Gf[" use ".trim().toString()];function qT(e){return typeof e=="object"&&e!==null&&"then"in e}function jx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===HT&&"_payload"in e&&qT(e._payload)}function Tp(e){const t=QT(e),r=y.forwardRef((o,a)=>{let{children:c,...d}=o;jx(c)&&typeof gc=="function"&&(c=gc(c._payload));const p=y.Children.toArray(c),g=p.find(ZT);if(g){const v=g.props.children,w=p.map(f=>f===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:f);return u.jsx(t,{...d,ref:a,children:y.isValidElement(v)?y.cloneElement(v,void 0,w):null})}return u.jsx(t,{...d,ref:a,children:c})});return r.displayName=`${e}.Slot`,r}var KT=Tp("Slot");function QT(e){const t=y.forwardRef((r,o)=>{let{children:a,...c}=r;if(jx(a)&&typeof gc=="function"&&(a=gc(a._payload)),y.isValidElement(a)){const d=YT(a),p=JT(c,a.props);return a.type!==y.Fragment&&(p.ref=o?_s(o,d):d),y.cloneElement(a,p)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var GT=Symbol("radix.slottable");function ZT(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GT}function JT(e,t){const r={...t};for(const o in t){const a=e[o],c=t[o];/^on[A-Z]/.test(o)?a&&c?r[o]=(...p)=>{const g=c(...p);return a(...p),g}:a&&(r[o]=a):o==="style"?r[o]={...a,...c}:o==="className"&&(r[o]=[a,c].filter(Boolean).join(" "))}return{...e,...r}}function YT(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const XT=Mc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Qe=y.forwardRef(({className:e,variant:t="default",size:r="default",asChild:o=!1,...a},c)=>{const d=o?KT:"button";return u.jsx(d,{className:Le(XT({variant:t,size:r,className:e})),ref:c,...a})});Qe.displayName="Button";function eR(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Tx(e){const[t,r]=y.useState(void 0);return Qn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const c=a[0];let d,p;if("borderBoxSize"in c){const g=c.borderBoxSize,v=Array.isArray(g)?g[0]:g;d=v.inlineSize,p=v.blockSize}else d=e.offsetWidth,p=e.offsetHeight;r({width:d,height:p})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var Dc="Switch",[tR]=Cs(Dc),[nR,rR]=tR(Dc),Rx=y.forwardRef((e,t)=>{const{__scopeSwitch:r,name:o,checked:a,defaultChecked:c,required:d,disabled:p,value:g="on",onCheckedChange:v,form:w,...f}=e,[x,S]=y.useState(null),N=kt(t,D=>S(D)),k=y.useRef(!1),C=x?w||!!x.closest("form"):!0,[_,R]=Ea({prop:a,defaultProp:c??!1,onChange:v,caller:Dc});return u.jsxs(nR,{scope:r,checked:_,disabled:p,children:[u.jsx(Ze.button,{type:"button",role:"switch","aria-checked":_,"aria-required":d,"data-state":Ix(_),"data-disabled":p?"":void 0,disabled:p,value:g,...f,ref:N,onClick:De(e.onClick,D=>{R(T=>!T),C&&(k.current=D.isPropagationStopped(),k.current||D.stopPropagation())})}),C&&u.jsx($x,{control:x,bubbles:!k.current,name:o,value:g,checked:_,required:d,disabled:p,form:w,style:{transform:"translateX(-100%)"}})]})});Rx.displayName=Dc;var Ax="SwitchThumb",Mx=y.forwardRef((e,t)=>{const{__scopeSwitch:r,...o}=e,a=rR(Ax,r);return u.jsx(Ze.span,{"data-state":Ix(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})});Mx.displayName=Ax;var sR="SwitchBubbleInput",$x=y.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...a},c)=>{const d=y.useRef(null),p=kt(d,c),g=eR(r),v=Tx(t);return y.useEffect(()=>{const w=d.current;if(!w)return;const f=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(f,"checked").set;if(g!==r&&S){const N=new Event("click",{bubbles:o});S.call(w,r),w.dispatchEvent(N)}},[g,r,o]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:p,style:{...a.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$x.displayName=sR;function Ix(e){return e?"checked":"unchecked"}var Dx=Rx,oR=Mx;const Lx=y.forwardRef(({className:e,...t},r)=>u.jsx(Dx,{className:Le("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-lg border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:u.jsx(oR,{className:Le("pointer-events-none block h-4 w-4 rounded-lg bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Lx.displayName=Dx.displayName;var iR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],aR=iR.reduce((e,t)=>{const r=Tp(`Primitive.${t}`),o=y.forwardRef((a,c)=>{const{asChild:d,...p}=a,g=d?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(g,{...p,ref:c})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),lR="Label",zx=y.forwardRef((e,t)=>u.jsx(aR.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));zx.displayName=lR;var Fx=zx;const cR=Mc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),fa=y.forwardRef(({className:e,...t},r)=>u.jsx(Fx,{ref:r,className:Le(cR(),e),...t}));fa.displayName=Fx.displayName;function qy(e){const t=uR(e),r=y.forwardRef((o,a)=>{const{children:c,...d}=o,p=y.Children.toArray(c),g=p.find(fR);if(g){const v=g.props.children,w=p.map(f=>f===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:f);return u.jsx(t,{...d,ref:a,children:y.isValidElement(v)?y.cloneElement(v,void 0,w):null})}return u.jsx(t,{...d,ref:a,children:c})});return r.displayName=`${e}.Slot`,r}function uR(e){const t=y.forwardRef((r,o)=>{const{children:a,...c}=r;if(y.isValidElement(a)){const d=hR(a),p=pR(c,a.props);return a.type!==y.Fragment&&(p.ref=o?_s(o,d):d),y.cloneElement(a,p)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dR=Symbol("radix.slottable");function fR(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dR}function pR(e,t){const r={...t};for(const o in t){const a=e[o],c=t[o];/^on[A-Z]/.test(o)?a&&c?r[o]=(...p)=>{const g=c(...p);return a(...p),g}:a&&(r[o]=a):o==="style"?r[o]={...a,...c}:o==="className"&&(r[o]=[a,c].filter(Boolean).join(" "))}return{...e,...r}}function hR(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Ux(e){const t=e+"CollectionProvider",[r,o]=Cs(t),[a,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),d=k=>{const{scope:C,children:_}=k,R=ae.useRef(null),D=ae.useRef(new Map).current;return u.jsx(a,{scope:C,itemMap:D,collectionRef:R,children:_})};d.displayName=t;const p=e+"CollectionSlot",g=qy(p),v=ae.forwardRef((k,C)=>{const{scope:_,children:R}=k,D=c(p,_),T=kt(C,D.collectionRef);return u.jsx(g,{ref:T,children:R})});v.displayName=p;const w=e+"CollectionItemSlot",f="data-radix-collection-item",x=qy(w),S=ae.forwardRef((k,C)=>{const{scope:_,children:R,...D}=k,T=ae.useRef(null),G=kt(C,T),q=c(w,_);return ae.useEffect(()=>(q.itemMap.set(T,{ref:T,...D}),()=>void q.itemMap.delete(T))),u.jsx(x,{[f]:"",ref:G,children:R})});S.displayName=w;function N(k){const C=c(e+"CollectionConsumer",k);return ae.useCallback(()=>{const R=C.collectionRef.current;if(!R)return[];const D=Array.from(R.querySelectorAll(`[${f}]`));return Array.from(C.itemMap.values()).sort((q,A)=>D.indexOf(q.ref.current)-D.indexOf(A.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:d,Slot:v,ItemSlot:S},N,o]}var mR=y.createContext(void 0);function Rp(e){const t=y.useContext(mR);return e||t||"ltr"}var Qd="rovingFocusGroup.onEntryFocus",gR={bubbles:!1,cancelable:!0},Oa="RovingFocusGroup",[If,Vx,yR]=Ux(Oa),[vR,Lc]=Cs(Oa,[yR]),[wR,xR]=vR(Oa),Bx=y.forwardRef((e,t)=>u.jsx(If.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(If.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(bR,{...e,ref:t})})}));Bx.displayName=Oa;var bR=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:g,onEntryFocus:v,preventScrollOnEntryFocus:w=!1,...f}=e,x=y.useRef(null),S=kt(t,x),N=Rp(c),[k,C]=Ea({prop:d,defaultProp:p??null,onChange:g,caller:Oa}),[_,R]=y.useState(!1),D=gr(v),T=Vx(r),G=y.useRef(!1),[q,A]=y.useState(0);return y.useEffect(()=>{const M=x.current;if(M)return M.addEventListener(Qd,D),()=>M.removeEventListener(Qd,D)},[D]),u.jsx(wR,{scope:r,orientation:o,dir:N,loop:a,currentTabStopId:k,onItemFocus:y.useCallback(M=>C(M),[C]),onItemShiftTab:y.useCallback(()=>R(!0),[]),onFocusableItemAdd:y.useCallback(()=>A(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>A(M=>M-1),[]),children:u.jsx(Ze.div,{tabIndex:_||q===0?-1:0,"data-orientation":o,...f,ref:S,style:{outline:"none",...e.style},onMouseDown:De(e.onMouseDown,()=>{G.current=!0}),onFocus:De(e.onFocus,M=>{const Y=!G.current;if(M.target===M.currentTarget&&Y&&!_){const W=new CustomEvent(Qd,gR);if(M.currentTarget.dispatchEvent(W),!W.defaultPrevented){const oe=T().filter(J=>J.focusable),ge=oe.find(J=>J.active),de=oe.find(J=>J.id===k),fe=[ge,de,...oe].filter(Boolean).map(J=>J.ref.current);qx(fe,w)}}G.current=!1}),onBlur:De(e.onBlur,()=>R(!1))})})}),Wx="RovingFocusGroupItem",Hx=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:c,children:d,...p}=e,g=no(),v=c||g,w=xR(Wx,r),f=w.currentTabStopId===v,x=Vx(r),{onFocusableItemAdd:S,onFocusableItemRemove:N,currentTabStopId:k}=w;return y.useEffect(()=>{if(o)return S(),()=>N()},[o,S,N]),u.jsx(If.ItemSlot,{scope:r,id:v,focusable:o,active:a,children:u.jsx(Ze.span,{tabIndex:f?0:-1,"data-orientation":w.orientation,...p,ref:t,onMouseDown:De(e.onMouseDown,C=>{o?w.onItemFocus(v):C.preventDefault()}),onFocus:De(e.onFocus,()=>w.onItemFocus(v)),onKeyDown:De(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){w.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const _=_R(C,w.orientation,w.dir);if(_!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let D=x().filter(T=>T.focusable).map(T=>T.ref.current);if(_==="last")D.reverse();else if(_==="prev"||_==="next"){_==="prev"&&D.reverse();const T=D.indexOf(C.currentTarget);D=w.loop?CR(D,T+1):D.slice(T+1)}setTimeout(()=>qx(D))}}),children:typeof d=="function"?d({isCurrentTabStop:f,hasTabStop:k!=null}):d})})});Hx.displayName=Wx;var SR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _R(e,t,r){const o=kR(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return SR[o]}function qx(e,t=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function CR(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Kx=Bx,Qx=Hx,zc="Tabs",[NR]=Cs(zc,[Lc]),Gx=Lc(),[ER,Ap]=NR(zc),Zx=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:a,defaultValue:c,orientation:d="horizontal",dir:p,activationMode:g="automatic",...v}=e,w=Rp(p),[f,x]=Ea({prop:o,onChange:a,defaultProp:c??"",caller:zc});return u.jsx(ER,{scope:r,baseId:no(),value:f,onValueChange:x,orientation:d,dir:w,activationMode:g,children:u.jsx(Ze.div,{dir:w,"data-orientation":d,...v,ref:t})})});Zx.displayName=zc;var Jx="TabsList",Yx=y.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...a}=e,c=Ap(Jx,r),d=Gx(r);return u.jsx(Kx,{asChild:!0,...d,orientation:c.orientation,dir:c.dir,loop:o,children:u.jsx(Ze.div,{role:"tablist","aria-orientation":c.orientation,...a,ref:t})})});Yx.displayName=Jx;var Xx="TabsTrigger",e0=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:a=!1,...c}=e,d=Ap(Xx,r),p=Gx(r),g=r0(d.baseId,o),v=s0(d.baseId,o),w=o===d.value;return u.jsx(Qx,{asChild:!0,...p,focusable:!a,active:w,children:u.jsx(Ze.button,{type:"button",role:"tab","aria-selected":w,"aria-controls":v,"data-state":w?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:g,...c,ref:t,onMouseDown:De(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?d.onValueChange(o):f.preventDefault()}),onKeyDown:De(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&d.onValueChange(o)}),onFocus:De(e.onFocus,()=>{const f=d.activationMode!=="manual";!w&&!a&&f&&d.onValueChange(o)})})})});e0.displayName=Xx;var t0="TabsContent",n0=y.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,forceMount:a,children:c,...d}=e,p=Ap(t0,r),g=r0(p.baseId,o),v=s0(p.baseId,o),w=o===p.value,f=y.useRef(w);return y.useEffect(()=>{const x=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(x)},[]),u.jsx(Dr,{present:a||w,children:({present:x})=>u.jsx(Ze.div,{"data-state":w?"active":"inactive","data-orientation":p.orientation,role:"tabpanel","aria-labelledby":g,hidden:!x,id:v,tabIndex:0,...d,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:x&&c})})});n0.displayName=t0;function r0(e,t){return`${e}-trigger-${t}`}function s0(e,t){return`${e}-content-${t}`}var OR=Zx,o0=Yx,i0=e0,a0=n0;const l0=OR,Mp=y.forwardRef(({className:e,...t},r)=>u.jsx(o0,{ref:r,className:Le("inline-flex min-h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Mp.displayName=o0.displayName;const Us=y.forwardRef(({className:e,...t},r)=>u.jsx(i0,{ref:r,className:Le("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Us.displayName=i0.displayName;const Vo=y.forwardRef(({className:e,...t},r)=>u.jsx(a0,{ref:r,className:Le("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Vo.displayName=a0.displayName;const Rr="<paste-your-api-key-here>";function I4(e){const t=e.reduce((r,o)=>{const a=Number(o.document_count??0);return r+(Number.isFinite(a)?a:0)},0);return{nestCount:e.length,documentCount:t}}function PR(e){return`${e.replace(/\/+$/,"")}/mcp`}function D4(e,t=!1){return["Connect to all my ContextNest nests and treat them as my source of truth.","",`Add one MCP server "contextnest" at: ${PR(e)}`,t?"This server needs no credential — connect directly.":"Authenticate with my ContextNest API key when your client asks for it — never print it back.","","Call nest_index first to see every nest (name, description, size).","","SEARCH/LIST: Omit `nest` to search across ALL nests at once, or specify a nest to target one.","READS: context_get/context_resolve need a `nest` argument — specify which nest.","WRITES: nest_create (no nest needed), context_create/update/delete/move/submit_review need a `nest`.","","Cite what you use as `nest:id`. Never write without asking me first."].join(`
|
|
373
|
-
`)}function jR(e){const{serverUrl:t,apiKey:r,nestId:o}=e;return["# ContextNest — keep this secret. Do not commit this file.",`CONTEXTNEST_SERVER=${t.replace(/\/+$/,"")}`,o?`CONTEXTNEST_NEST=${o}`:null,`CONTEXTNEST_API_KEY=${r}`,""].filter(Boolean).join(`
|
|
374
|
-
`)}function TR(e,t){return[`You are my assistant for the "${e}" nest — my governed knowledge base. Treat it as the source of truth.`,"","- When I ask something this nest could cover, SEARCH it first and answer from what you find; cite what you use as `nest:id`.","- If the nest doesn't cover it, say so plainly — don't invent. Offer to add it if it's worth remembering.","- If my question is ambiguous, ask one clarifying question first.","- Never publish or share anything publicly without asking me first.","",`Start by telling me what "${e}" covers, then ask what I want to dig into.`].join(`
|
|
375
|
-
`)}function Pa(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"nest"}function c0(e,t,r,o=!1){const a=e.replace(/\/+$/,""),c=Pa(r);return[`ctx vault add ${c} --url ${a}/nests/${t}/mcp${o?"":" --bearer-env CONTEXTNEST_API_KEY"}`,`ctx query "#tag" --vault ${c}`].join(`
|
|
376
|
-
`)}function RR(e,t,r,o=!1){const a=t.replace(/\/+$/,""),c=`${a}/nests/${r}/mcp`,d=o?"":'-H "Authorization: Bearer $CONTEXTNEST_API_KEY" ',p=o?"":` ${d.trimEnd()}`;return[`Connect to my ContextNest nest "${e}" and treat it as my source of truth.`,"",o?null:"KEY — it is in the environment variable CONTEXTNEST_API_KEY. If that variable is empty, ask me for it and stop: minting a key needs a credential you do not have yet.",o?null:"","RULE — do NOT claim you're connected until a call has returned real documents you can name. If nothing works, tell me which step failed and stop. Never guess, never summarise.","","STEP 1 — read the nest:",` curl -s -w '\\nHTTP_STATUS:%{http_code}\\n' -X POST ${a}/nests/${r}/context \\`,` ${d}-H "Content-Type: application/json" \\`,` -d '{"selector":"type:document","hops":1,"max_tokens":2000}'`,""," Documents back? You're connected. Name them, then read WHAT YOU CAN DO below.",""," Otherwise the status code tells you which problem you have:"," 503 the server has no PromptOwl license, which blocks that endpoint. This one is a"," GET, so it still works, and returns every document WITH its text in one call:",` curl -s -w '\\nHTTP_STATUS:%{http_code}\\n' "${a}/nests/${r}/export?format=markdown"${p}`," If the nest is too big to take in one go, list it and read what you need instead."," Append the id EXACTLY as the list returned it — for a nest created in the app that"," id already starts with `nodes/`, so the path looks doubled and that is correct; a"," nest imported from a folder has no such prefix. Do not add or strip one yourself:",` curl -s -w '\\nHTTP_STATUS:%{http_code}\\n' "${a}/nests/${r}/nodes"${p}`,` curl -s -w '\\nHTTP_STATUS:%{http_code}\\n' "${a}/nests/${r}/nodes/<id-from-the-list>"${p}`," Documents back from either call count as connected — the proof is real documents,"," not which endpoint served them. Tell me the server is unlicensed, and note the same"," gate covers every non-GET, so WRITES ARE ALSO UNAVAILABLE until a licence is installed.",o?null:" 401 the key is missing or wrong. Also check you did not send the literal text",o?null:" `$CONTEXTNEST_API_KEY`: that happens when the command runs without a shell to",o?null:" expand it, and you must substitute the value yourself. Otherwise ask me for the key."," 403 read the body. JSON with an `error` field is the server refusing you, and it says"," which: a `required_permission` field means my key lacks the tier for that action"," (a read-only key does this on any write); a scope message means the key belongs to"," a different nest. Tell me which one; neither is a network problem."," A 403 with NO JSON body came from something between you and the server, not from us."," that bodyless 403, or no response at all / connection refused / a timeout"," something between you and the server is blocking this — a sandbox or network egress"," policy. Either nothing answered, or a gateway answered instead of ContextNest."," Do not retry and do not tunnel around it. This one is mine to fix, not yours: ask me"," to add ContextNest as a custom connector in my client (Settings → Connectors), which"," is dialled server-side and is not subject to your egress rules.","","WHAT YOU CAN DO — if step 1 returned 503 this server is unlicensed: read it as above, and","do not attempt writes at all, they are blocked by the same gate. Otherwise this connection","reads, and writes IF my key carries write access — a read-only key reads perfectly well and","is refused on the first write. Assume nothing either way until you have my say-so to try.","Over MCP the write tools are","context_create, context_update, context_move and context_submit_review; over REST it is",`POST ${a}/nests/${r}/nodes to create, and PATCH that same path with the document's`,"id appended to update. Never write, publish or share without asking me first.","",`THEN — answer from the nest, cite what you use as \`${e}:nodes/<slug>\` (that is the id shape the server returns), and say plainly when something is not covered.`,"","LATER, optional, persists across sessions — ASK ME FIRST if setting either of these means","writing my key into a config file on this machine; that is my call, not a step you take in","passing. Both use the same credential:",` an MCP server "contextnest" at ${c}${o?"":" (Bearer header)"}`,...c0(a,r,e,o).split(`
|
|
377
|
-
`).map(g=>` ${g}`)," Both only take effect after you RESTART the session, so neither can prove anything now —"," and both go over MCP, which is POST, so on an unlicensed server (the 503 above) they are"," blocked by that same gate. On an unlicensed server the GET reads are all you have."].filter(g=>g!==null).join(`
|
|
378
|
-
`)}function AR(e,t,r=!1){return JSON.stringify({mcpServers:{[Pa(e)]:{command:"npx",args:["-y","mcp-remote",t,...r?[]:["--header",`Authorization: Bearer ${Rr}`]]}}},null,2)}function MR(e,t,r=!1){return`claude mcp add --transport http ${Pa(e)} ${t}${r?"":` --header "Authorization: Bearer ${Rr}"`}`}function $R(e,t,r=!1){return JSON.stringify({mcpServers:{[Pa(e)]:{url:t,...r?{}:{headers:{Authorization:`Bearer ${Rr}`}}}}},null,2)}function IR({isOpen:e,onClose:t,nestId:r,nestName:o,onManageKeys:a}){const{authenticated:c,authMode:d}=Na(),p=typeof window<"u"?window.location.origin:"http://localhost:3838",g=`${p}/nests/${r}/mcp`,v=`${p}/nests/${r}/export?format=markdown`,[w,f]=y.useState(!1),[x,S]=y.useState(!1),[N,k]=y.useState(!1),[C,_]=y.useState(!1),[R,D]=y.useState(!1),[T,G]=y.useState(!1),[q,A]=y.useState(null);y.useEffect(()=>{e||A(null)},[e]);const M=async()=>{A(null),S(!0);try{await SC(r,{nestName:o,includeDrafts:C}),k(!1)}catch(O){A((O==null?void 0:O.message)||"Bundle export failed")}finally{S(!1)}},Y=async()=>{A(null),f(!0);try{const O=await bC(r),z=URL.createObjectURL(new Blob([O],{type:"text/markdown"})),Z=document.createElement("a");Z.href=z,Z.download=`${Pa(o)}.md`,document.body.appendChild(Z),Z.click(),Z.remove(),URL.revokeObjectURL(z)}catch(O){A((O==null?void 0:O.message)||"Export failed")}finally{f(!1)}},W=d==="open",oe=AR(o,g,W),ge=MR(o,g,W),de=$R(o,g,W),ce=W,fe=!c&&d==="key",J=ce?"":` \\
|
|
379
|
-
-H "Authorization: Bearer ${Rr}"`,re=`curl -X POST ${p}/nests/${r}/context \\
|
|
380
|
-
-H "Content-Type: application/json"${J} \\
|
|
381
|
-
-d '{"selector": "#gtm", "hops": 2, "max_tokens": 4000}'`,K=`curl "${p}/nests/${r}/nodes/nodes/<slug>?format=markdown"${J}`,Q=c0(p,r,o,ce),I=ce?`ctx push --server ${p} --nest ${r}`:`CONTEXTNEST_API_KEY=${Rr} ctx push --server ${p} --nest ${r}`;return u.jsxs(u.Fragment,{children:[u.jsx(fi,{open:e,onOpenChange:t,children:u.jsxs(io,{className:"sm:max-w-[640px] max-h-[85vh] flex flex-col overflow-hidden [&>*]:min-w-0",children:[u.jsxs(ao,{children:[u.jsxs(lo,{children:["Connect to ",o]}),u.jsx(co,{children:"Use this nest in the app you already have. New to this? Start on the Hootie tab — it's the quickest way in."})]}),u.jsxs("div",{className:"flex-1 overflow-y-auto overflow-x-hidden min-w-0 space-y-4",children:[u.jsxs("div",{className:"rounded-lg border-2 border-primary/30 bg-primary/5 p-3.5",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Now paste into your AI agent or harness"}),u.jsx("p",{className:"mb-3 mt-0.5 text-xs text-muted-foreground",children:"Drop one of these into Claude, Cursor, Hootie, or any agent. It self-installs, connects, and asks you for your API key — one paste, all-purpose."}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsxs(Qe,{size:"sm",onClick:()=>ui(TR(o),"Chat prompt copied"),children:[u.jsx(y_,{className:"mr-1.5 h-3.5 w-3.5"}),"Chat with this nest"]}),u.jsxs(Qe,{size:"sm",onClick:()=>ui(RR(o,p,r,ce),"Setup prompt copied"),children:[u.jsx(F_,{className:"mr-1.5 h-3.5 w-3.5"}),"Set up an agent"]})]})]}),fe&&u.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:[u.jsx(tc,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),u.jsx("span",{children:"You're not logged in. Login from the header to generate an API key for external clients."})]}),ce&&u.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:[u.jsx(tc,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),u.jsxs("span",{children:["Server is in ",u.jsx("strong",{children:"open"})," mode — anyone on the network can read/write without a key. The snippets below omit the Authorization header."]})]}),q&&u.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-2 text-xs text-red-900",children:[u.jsx(tc,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),u.jsx("span",{children:q})]}),c&&!ce&&u.jsxs("div",{className:"rounded-md border bg-card p-3 space-y-2",children:[u.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[u.jsx(l_,{className:"h-3.5 w-3.5 shrink-0"}),u.jsx("span",{className:"font-medium truncate",children:"External-client API key"})]}),a&&u.jsx(Qe,{variant:"outline",size:"sm",className:"shrink-0",onClick:a,children:"Manage API keys"})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Use the key you already have — any of your keys works on every nest you can see. Need a new one, or lost the plaintext? Create or rotate it on the API keys page; keys are shown only once, when they're created."})]}),u.jsxs("button",{type:"button",onClick:()=>D(O=>!O),"aria-expanded":R,className:"flex w-full items-center justify-between rounded-lg border px-3 py-2.5 text-sm hover:bg-muted/40",children:[u.jsx("span",{className:"font-medium",children:"Configure a specific client"}),u.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:["Hootie · Claude · Cursor · CLI",u.jsx(li,{className:`h-4 w-4 transition-transform ${R?"rotate-180":""}`})]})]}),R&&u.jsxs(l0,{defaultValue:"hootie",className:"w-full min-w-0",children:[u.jsxs(Mp,{className:"grid w-full grid-cols-5 sticky top-0 z-10",children:[u.jsxs(Us,{value:"hootie",children:[u.jsx(Rk,{className:"h-3.5 w-3.5 mr-1"}),"Hootie"]}),u.jsxs(Us,{value:"claude",children:[u.jsx(Kg,{className:"h-3.5 w-3.5 mr-1"}),"Claude"]}),u.jsx(Us,{value:"mcp",children:"MCP"}),u.jsx(Us,{value:"api",children:"API"}),u.jsxs(Us,{value:"cli",children:[u.jsx(Qg,{className:"h-3.5 w-3.5 mr-1"}),"CLI"]})]}),u.jsxs(Vo,{value:"hootie",className:"space-y-4 pt-4",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm mb-3",children:["In Hootie, open"," ",u.jsx("strong",{children:"Settings → ContextNest Vault → Remote Server"})," ","and paste:"]}),u.jsx(Mn,{label:"Server URL",value:p}),!ce&&u.jsx(Mn,{label:"API Key (paste your generated key)",value:Rr})]}),u.jsxs("ol",{className:"text-xs text-muted-foreground space-y-1 list-decimal list-inside",children:[u.jsx("li",{children:"Open Hootie"}),u.jsx("li",{children:"Click the gear icon (Settings)"}),u.jsx("li",{children:"Scroll to ContextNest Vault"}),u.jsx("li",{children:'Switch tab to "Remote Server"'}),u.jsxs("li",{children:["Paste the URL",!ce&&" + your API Key"," ","above, click Test Vault"]})]})]}),u.jsxs(Vo,{value:"claude",className:"space-y-4 pt-4",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm mb-3",children:[u.jsx("strong",{children:"Claude Code"})," (the CLI) registers a server with one command — it persists the config itself, no file to find or edit.",!ce&&u.jsxs(u.Fragment,{children:[" ","Replace"," ",u.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:Rr})," ","with your generated key."]})]}),u.jsx(Mn,{label:"Run in your terminal (Claude Code CLI)",value:ge,multiline:!0}),u.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Takes effect on your next Claude Code session — the nest's context tools then appear in the tools panel."})]}),u.jsxs("div",{className:"border-t pt-3",children:[u.jsxs("p",{className:"text-sm mb-3",children:["Using ",u.jsx("strong",{children:"Claude Desktop"})," (the GUI app) instead? It has no CLI, so add this to your"," ",u.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"claude_desktop_config.json"}),!ce&&u.jsxs(u.Fragment,{children:[" ","(replace"," ",u.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:Rr})," ","with your generated key):"]})]}),u.jsx(Mn,{label:"Claude Desktop config (via mcp-remote bridge)",value:oe,multiline:!0}),u.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Location:"," ",u.jsx("code",{className:"text-[10px]",children:"%APPDATA%\\Claude\\claude_desktop_config.json"})," ","(Windows) or"," ",u.jsx("code",{className:"text-[10px]",children:"~/Library/Application Support/Claude/claude_desktop_config.json"})," ","(Mac)"]}),u.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Claude Desktop config runs a local command, so this uses"," ",u.jsx("code",{className:"text-[10px]",children:"mcp-remote"})," to bridge to the server's HTTP endpoint — you need"," ",u.jsx("a",{href:"https://nodejs.org",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Node.js"})," ","installed (it provides"," ",u.jsx("code",{className:"text-[10px]",children:"npx"}),"). Restart Claude Desktop after editing; the nest's context tools then appear in the tools panel."]})]})]}),u.jsxs(Vo,{value:"mcp",className:"space-y-4 pt-4",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm mb-3",children:["Streamable HTTP MCP endpoint with 21 tools (11 content + 7 governance + 3 admin/sync). Works with native HTTP MCP clients (Cursor, VS Code) as a JSON config; Claude Code has its own one-command setup and Claude Desktop needs a bridge — see the Claude tab for both.",!ce&&u.jsxs(u.Fragment,{children:[" ","Replace"," ",u.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:Rr})," ","with your generated key."]})]}),u.jsx(Mn,{label:"Direct HTTP config (Cursor, VS Code, Claude Code — not Claude Desktop)",value:de,multiline:!0}),u.jsx(Mn,{label:`From the ctx CLI (2.2+)${ce?"":" — export CONTEXTNEST_API_KEY first"}`,value:Q,multiline:!0})]}),u.jsxs("div",{className:"text-xs text-muted-foreground space-y-2",children:[u.jsx("p",{className:"font-medium",children:"Available tools:"}),u.jsxs("div",{className:"grid grid-cols-2 gap-x-4 font-mono text-[11px]",children:[u.jsx("span",{children:"context_init"}),u.jsx("span",{children:"context_resolve"}),u.jsx("span",{children:"context_overview"}),u.jsx("span",{children:"context_create"}),u.jsx("span",{children:"context_search"}),u.jsx("span",{children:"context_update"}),u.jsx("span",{children:"context_query"}),u.jsx("span",{children:"context_export"}),u.jsx("span",{children:"context_get"}),u.jsx("span",{children:"context_comments"}),u.jsx("span",{children:"context_list"}),u.jsx("span",{children:"context_stewards"}),u.jsx("span",{children:"context_review_queue"}),u.jsx("span",{children:"context_my_drafts"}),u.jsx("span",{children:"context_submit_review"}),u.jsx("span",{children:"context_approve"}),u.jsx("span",{children:"context_reject"}),u.jsx("span",{children:"context_versions"}),u.jsx("span",{children:"context_assign_steward"}),u.jsx("span",{children:"context_request_deletion"}),u.jsx("span",{children:"context_deletion_queue"}),u.jsx("span",{children:"context_resolve_deletion"}),u.jsx("span",{children:"context_share_nest"}),u.jsx("span",{children:"context_unsynced_list"}),u.jsx("span",{children:"context_sync_folder"})]})]})]}),u.jsxs(Vo,{value:"api",className:"space-y-4 pt-4",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm mb-3",children:["Deterministic retrieval over plain HTTP — the same selector and ",u.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:"hops"})," ","always assemble the same context. One call returns the matched nodes plus their graph neighborhood as ready-to-use markdown, with a trace (",u.jsx("code",{className:"text-[11px]",children:"hops_used"}),","," ",u.jsx("code",{className:"text-[11px]",children:"nodes_traversed"}),") so you can audit exactly what was pulled."]}),u.jsx(Mn,{label:"Query + N-hop graph context (POST /context)",value:re,multiline:!0}),u.jsx(Mn,{label:"Single document (GET, deterministic by id)",value:K,multiline:!0})]}),u.jsxs("div",{className:"text-xs text-muted-foreground space-y-2",children:[u.jsx("p",{className:"font-medium",children:"Selector grammar:"}),u.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-[11px]",children:[u.jsx("span",{children:"#tag"}),u.jsx("span",{className:"font-sans",children:"nodes carrying a tag"}),u.jsx("span",{children:"type:document"}),u.jsx("span",{className:"font-sans",children:"nodes of a type"}),u.jsx("span",{children:"[[Title]]"}),u.jsx("span",{className:"font-sans",children:"a node by title"}),u.jsx("span",{children:"scope:team"}),u.jsx("span",{className:"font-sans",children:"nodes by visibility scope"}),u.jsx("span",{children:"+AND · |OR · -NOT"}),u.jsx("span",{className:"font-sans",children:"combine selectors"})]}),u.jsxs("p",{className:"pt-1",children:[u.jsx("span",{className:"font-medium",children:"Hops"})," controls graph traversal from the matches:"," ",u.jsx("code",{className:"text-[11px]",children:"1"})," = matches + directly linked nodes (single hop),"," ",u.jsx("code",{className:"text-[11px]",children:"2"})," (default) and up follow wiki-links further out for multi-hop context."," ",u.jsx("code",{className:"text-[11px]",children:"max_tokens"})," caps the payload; the response reports what was truncated."]}),u.jsxs("p",{children:["Also useful:"," ",u.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:"POST /query"})," ","(matches + snippets, no bodies),"," ",u.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:"GET /overview"})," ","(types/tags map), and the export URL below for the whole nest. All under"," ",u.jsxs("code",{className:"text-[11px] bg-muted px-1 rounded",children:["/nests/","<nest-id>","/…"]})]})]})]}),u.jsxs(Vo,{value:"cli",className:"space-y-4 pt-4",children:[u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm mb-3",children:["Read this nest from the shell, or push a local vault into it, with the"," ",u.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"ctx"})," ","CLI",!ce&&u.jsxs(u.Fragment,{children:[" ","(export"," ",u.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:"CONTEXTNEST_API_KEY"})," ","first — the key never goes on the command line)"]}),":"]}),u.jsx(Mn,{label:"Install",value:"npm i -g @promptowl/contextnest-cli"}),u.jsx(Mn,{label:"Register this nest as a vault alias, then query it",value:Q,multiline:!0}),u.jsx(Mn,{label:"Push a local vault into this nest",value:I,multiline:!0})]}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.jsx("code",{className:"text-[10px]",children:"query"}),","," ",u.jsx("code",{className:"text-[10px]",children:"read"}),","," ",u.jsx("code",{className:"text-[10px]",children:"list"})," and"," ",u.jsx("code",{className:"text-[10px]",children:"search"})," accept"," ",u.jsx("code",{className:"text-[10px]",children:"--vault <alias>"})," ","once the alias exists (ctx 2.2+). Full CLI reference lives in the ContextNest docs."]})]})]}),R&&u.jsxs("div",{className:"border-t pt-3",children:[u.jsx("p",{className:"mb-2 text-sm font-medium",children:"Get the apps"}),u.jsxs("div",{className:"grid gap-2 sm:grid-cols-3",children:[u.jsxs("a",{href:"https://promptowl.ai/download",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 rounded-lg border px-3 py-2.5 text-sm hover:border-primary hover:bg-muted/40",children:[u.jsx(Kg,{className:"h-4 w-4 shrink-0"})," Desktop app"]}),u.jsxs("a",{href:"https://www.npmjs.com/package/@promptowl/contextnest-cli",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 rounded-lg border px-3 py-2.5 text-sm hover:border-primary hover:bg-muted/40",children:[u.jsx(Qg,{className:"h-4 w-4 shrink-0"})," ctx CLI"]}),u.jsxs("a",{href:"https://github.com/PromptOwl/ContextNest",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 rounded-lg border px-3 py-2.5 text-sm hover:border-primary hover:bg-muted/40",children:[u.jsx(Ul,{className:"h-4 w-4 shrink-0"})," Self-hosted"]})]})]}),u.jsxs("button",{type:"button",onClick:()=>G(O=>!O),"aria-expanded":T,className:"flex w-full items-center justify-between rounded-lg border px-3 py-2.5 text-sm hover:bg-muted/40",children:[u.jsx("span",{className:"font-medium",children:"Export & nest details"}),u.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:["Markdown · .zip · Nest ID",u.jsx(li,{className:`h-4 w-4 transition-transform ${T?"rotate-180":""}`})]})]}),T&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"border-t pt-3 space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[u.jsx(nc,{className:"h-3.5 w-3.5 shrink-0"}),u.jsx("span",{className:"font-medium truncate",children:"Export as markdown"})]}),u.jsx(Qe,{variant:"outline",size:"sm",className:"shrink-0",onClick:Y,disabled:w,"aria-label":"Download this nest as a single markdown file",children:w?u.jsx(ci,{className:"h-3.5 w-3.5 animate-spin"}):u.jsxs(u.Fragment,{children:[u.jsx(nc,{className:"h-3.5 w-3.5 mr-1"}),"Download .md"]})})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Frontmatter + body, one file. Approved versions only. Agents can fetch this URL directly."}),u.jsx(Mn,{label:"Export URL (text/markdown)",value:v})]}),u.jsxs("div",{className:"border-t pt-3 space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[u.jsx(Ul,{className:"h-3.5 w-3.5 shrink-0"}),u.jsx("span",{className:"font-medium truncate",children:"Portability bundle"})]}),u.jsxs(Qe,{variant:"outline",size:"sm",className:"shrink-0",onClick:()=>k(!0),"aria-label":"Export this nest as a portable .zip bundle",children:[u.jsx(Ul,{className:"h-3.5 w-3.5 mr-1"}),"Export .zip"]})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Whole nest — nodes, full version history, tags, definitions and edges — as one .zip. Import it on another ContextNest host to recreate the nest."})]}),u.jsx("div",{className:"border-t pt-3",children:u.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[u.jsx("span",{children:"Nest ID:"}),u.jsx("code",{className:"flex-1 bg-muted px-2 py-1 rounded text-[11px] font-mono truncate",children:r}),u.jsx(u0,{value:r})]})})]})]})]})}),u.jsx(fi,{open:N,onOpenChange:O=>!x&&k(O),children:u.jsxs(io,{className:"sm:max-w-[420px]",children:[u.jsxs(ao,{children:[u.jsxs(lo,{className:"flex items-center gap-2",children:[u.jsx(Ul,{className:"h-5 w-5"}),"Export portability bundle"]}),u.jsxs(co,{children:["Downloads a ",u.jsx("code",{children:".zip"})," of this nest's documents. On another ContextNest host, unzip it and bring it in with the existing"," ",u.jsx("strong",{children:"Import Folder"})," button."]})]}),u.jsxs("div",{className:"flex items-start justify-between gap-3 py-2",children:[u.jsxs("div",{className:"space-y-0.5",children:[u.jsx(fa,{htmlFor:"include-drafts",className:"text-sm font-medium",children:"Include draft documents"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Off: approved / published documents only. On: also export unapproved drafts."})]}),u.jsx(Lx,{id:"include-drafts",checked:C,onCheckedChange:_})]}),q&&u.jsx("p",{className:"text-sm text-destructive",children:q}),u.jsxs(jp,{children:[u.jsx(Qe,{variant:"outline",onClick:()=>k(!1),disabled:x,children:"Cancel"}),u.jsxs(Qe,{onClick:M,disabled:x,children:[x?u.jsx(ci,{className:"h-4 w-4 mr-2 animate-spin"}):u.jsx(nc,{className:"h-4 w-4 mr-2"}),"Download .zip"]})]})]})})]})}function L4({apiKey:e,kind:t,onClose:r,nestId:o}){const[a,c]=y.useState(!1),d=async()=>{await ui(e)&&(c(!0),setTimeout(()=>c(!1),1500))},p=()=>{const g=typeof window<"u"?window.location.origin:"http://localhost:3838",v=URL.createObjectURL(new Blob([jR({serverUrl:g,apiKey:e,nestId:o})],{type:"text/plain"})),w=document.createElement("a");w.href=v,w.download="contextnest.env",document.body.appendChild(w),w.click(),w.remove(),URL.revokeObjectURL(v)};return u.jsx(fi,{open:!0,onOpenChange:r,children:u.jsxs(io,{className:"sm:max-w-[480px]",children:[u.jsxs(ao,{children:[u.jsxs(lo,{className:"flex items-center gap-2",children:[u.jsx($_,{className:"h-4 w-4 text-amber-700"}),t==="generated"?"API key generated":"API key rotated"]}),u.jsxs(co,{children:["This key is shown ",u.jsx("strong",{children:"only once"}),". Copy it now and store it somewhere safe (password manager, secrets vault). It cannot be retrieved again — if you lose it, rotate to mint a new one.",t==="rotated"&&u.jsxs(u.Fragment,{children:[" ","Your previous key has been invalidated and will stop working immediately."]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"flex-1 bg-muted px-3 py-2 rounded text-xs font-mono break-all",children:e}),u.jsx(Qe,{size:"sm",variant:"outline",onClick:d,children:a?u.jsx(Cc,{className:"h-3.5 w-3.5 text-green-600"}):u.jsx(Yf,{className:"h-3.5 w-3.5"})})]}),u.jsxs(Qe,{variant:"outline",size:"sm",className:"w-full",onClick:p,children:[u.jsx(nc,{className:"mr-1.5 h-3.5 w-3.5"}),"Download .env"]}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Copy it, or download a ready"," ",u.jsx("code",{className:"text-[11px]",children:".env"})," (server URL + key) to hand your agent. Keep it secret — don't commit it."]})]}),u.jsx("div",{className:"flex justify-end pt-2",children:u.jsx(Qe,{onClick:r,children:"I've saved it — close"})})]})})}function Mn({label:e,value:t,multiline:r}){return u.jsxs("div",{className:"mb-3 min-w-0",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1 min-w-0",children:[u.jsx("span",{className:"text-xs font-medium text-muted-foreground truncate",children:e}),u.jsx(u0,{value:t})]}),u.jsx("pre",{className:`${r?"p-3":"px-3 py-2"} bg-muted rounded text-xs font-mono min-w-0 ${r?"whitespace-pre overflow-x-auto":"whitespace-pre-wrap break-all"}`,children:t})]})}function u0({value:e}){const[t,r]=y.useState(!1),o=async()=>{await ui(e)&&(r(!0),setTimeout(()=>r(!1),1500))};return u.jsx(Qe,{variant:"ghost",size:"sm",className:"h-6 px-2",onClick:o,children:t?u.jsx(Cc,{className:"h-3 w-3 text-green-600"}):u.jsx(Yf,{className:"h-3 w-3"})})}const yc=y.forwardRef(({className:e,type:t,...r},o)=>u.jsx("input",{type:t,className:Le("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));yc.displayName="Input";const DR=Mc("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",warning:"border-warning/50 text-warning dark:border-warning [&>svg]:text-warning"}},defaultVariants:{variant:"default"}}),Df=y.forwardRef(({className:e,variant:t,...r},o)=>u.jsx("div",{ref:o,role:"alert",className:Le(DR({variant:t}),e),...r}));Df.displayName="Alert";const LR=y.forwardRef(({className:e,...t},r)=>u.jsx("h5",{ref:r,className:Le("mb-1 font-medium leading-none tracking-tight",e),...t}));LR.displayName="AlertTitle";const Lf=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:Le("text-sm [&_p]:leading-relaxed",e),...t}));Lf.displayName="AlertDescription";function zR({existingAdmin:e,onClose:t}){const{loginSuccess:r}=Na(),[o,a]=y.useState("promptowl"),[c,d]=y.useState(""),[p,g]=y.useState(""),[v,w]=y.useState(!1),[f,x]=y.useState(null),[S,N]=y.useState(null),[k,C]=y.useState(null),[_,R]=y.useState(!1),[D,T]=y.useState(!1),[G,q]=y.useState(null),[A,M]=y.useState("open"),Y=typeof window<"u"&&new URLSearchParams(window.location.search).has("admin"),W=A==="open"||A==="admin-only"&&Y,oe=W?o:"password";y.useEffect(()=>{let fe=!1;return la().then(J=>{fe||M(J.promptowl_sign_in_gate??"open")}).catch(()=>{}),()=>{fe=!0}},[]);const ge=async()=>{k&&await ui(k)&&(R(!0),setTimeout(()=>R(!1),1500))},de=async()=>{x(null),w(!0);try{const fe=await Uv();N(fe.verificationUrl),C(fe.deviceCode),window.open(fe.verificationUrl,"_blank","noopener,noreferrer");for(let J=0;J<180;J++){await new Promise(Q=>setTimeout(Q,2e3));const re=await Vv(fe.deviceCode,fe.clientSecret);if(re.status==="approved"&&re.token){const Q=await Bv(re.token);if(r(Q.user?{email:Q.user.email,name:Q.user.name,is_admin:!!Q.user.is_admin}:void 0),Q.claim_blocked&&!Q.user.is_admin){q({info:Q.claim_blocked,attemptedEmail:Q.user.email}),N(null),C(null),w(!1);return}t();return}if(re.status==="pending")continue;const K=re.status==="denied"||re.status==="rejected"?"Login request was denied. Please try again to create a new authentication request.":re.status==="expired"?"Login expired. Try again.":re.status==="cancelled"?"Login cancelled. Try again.":`Login failed (status: ${re.status}). Try again.`;x(K),N(null),C(null),w(!1);return}x("Login timed out waiting for approval. Try again."),N(null),C(null),w(!1)}catch(fe){x(fe.message),N(null),C(null),w(!1)}},ce=async fe=>{fe.preventDefault(),x(null),w(!0);try{const J=await Fv(c,p);r(J.user?{email:J.user.email,name:J.user.name,is_admin:!!J.user.is_admin}:void 0),t()}catch(J){x(J.message),w(!1)}};return u.jsx(fi,{open:!0,onOpenChange:t,children:u.jsxs(io,{className:"sm:max-w-[420px]",children:[u.jsxs(ao,{children:[u.jsxs(lo,{className:"flex items-center gap-2",children:[u.jsx(Nc,{className:"h-4 w-4"}),"Login"]}),u.jsx(co,{children:e?`This server is administered by ${e}. Login to manage settings and teammates.`:"Login with your account."})]}),u.jsxs("div",{className:"space-y-4 pt-2",children:[f&&u.jsxs(Df,{variant:"destructive",children:[u.jsx(tc,{className:"h-4 w-4"}),u.jsx(Lf,{children:f})]}),G&&u.jsxs(Df,{variant:"destructive",children:[u.jsx(ep,{className:"h-4 w-4"}),u.jsx(Lf,{children:G.info.reason==="license_required"?u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"font-medium",children:"Admin claim blocked — no license installed."}),u.jsx("p",{className:"text-xs",children:"Generate a Community License key in PromptOwl, then paste it on the setup screen. Only the PromptOwl account that minted the key can claim admin on this server."}),u.jsxs("a",{href:"https://app.promptowl.ai/community-license",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs underline",children:["Open Community License page",u.jsx(sf,{className:"h-3 w-3"})]})]}):u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"font-medium",children:"Admin claim blocked — email does not match license owner."}),u.jsxs("p",{className:"text-xs",children:["License owner:"," ",u.jsx("code",{className:"font-mono",children:G.info.license_owner_email||"(unknown)"})]}),u.jsxs("p",{className:"text-xs",children:["You logged in as:"," ",u.jsx("code",{className:"font-mono",children:G.attemptedEmail})]}),u.jsx("p",{className:"text-xs",children:"Log in with the PromptOwl account that generated the installed license key, or install a different key belonging to this account."})]})})]}),oe==="promptowl"?u.jsxs(u.Fragment,{children:[u.jsx(Qe,{onClick:de,disabled:v,className:"w-full",children:v&&S?u.jsxs(u.Fragment,{children:[u.jsx(ci,{className:"h-4 w-4 mr-2 animate-spin"}),"Waiting for approval..."]}):"Login with PromptOwl"}),S&&u.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 space-y-2",children:[u.jsxs("p",{className:"text-xs text-muted-foreground",children:["A new tab opened at"," ",u.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary underline",children:["PromptOwl",u.jsx(sf,{className:"h-3 w-3"})]}),". If it asks for a verification code, use this:"]}),k&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"flex-1 bg-background border rounded px-2 py-1.5 text-xs font-mono break-all",children:k}),u.jsx(Qe,{size:"sm",variant:"outline",onClick:ge,children:_?u.jsx(Cc,{className:"h-3.5 w-3.5 text-green-600"}):u.jsx(Yf,{className:"h-3.5 w-3.5"})})]})]}),!S&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute inset-0 flex items-center",children:u.jsx("div",{className:"w-full border-t border-border"})}),u.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:u.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"or"})})]}),u.jsx(Qe,{variant:"outline",className:"w-full",onClick:()=>a("password"),children:"Use email + password"})]})]}):u.jsxs("form",{onSubmit:ce,className:"space-y-3",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx(fa,{children:"Email"}),u.jsx(yc,{type:"email",value:c,onChange:fe=>d(fe.target.value),required:!0,autoFocus:!0})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx(fa,{children:"Password"}),u.jsxs("div",{className:"relative",children:[u.jsx(yc,{type:D?"text":"password",value:p,onChange:fe=>g(fe.target.value),required:!0,className:"pr-9"}),u.jsx("button",{type:"button",onClick:()=>T(fe=>!fe),"aria-label":D?"Hide password":"Show password",tabIndex:-1,className:"absolute inset-y-0 right-0 flex items-center px-2 text-muted-foreground hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-r-md",children:D?u.jsx(jv,{className:"h-4 w-4"}):u.jsx(Tv,{className:"h-4 w-4"})})]})]}),u.jsx(Qe,{type:"submit",disabled:v,className:"w-full",children:v?u.jsx(ci,{className:"h-4 w-4 animate-spin"}):"Login"}),W&&u.jsx("button",{type:"button",onClick:()=>a("promptowl"),className:"w-full text-xs text-muted-foreground hover:text-foreground",children:"← Back to PromptOwl login"})]})]})]})})}function FR({onActivated:e}){const[t,r]=y.useState(""),[o,a]=y.useState(!1),[c,d]=y.useState(null),[p,g]=y.useState(null),v=async()=>{const w=t.trim();if(!w.startsWith("pk_")){d("License key must start with pk_");return}d(null),g(null),a(!0);try{const f=await X_(w);if(!f.valid){d(f.error||"PromptOwl rejected this key.");return}if(f.warning){g(f.warning);return}e()}catch(f){d(f instanceof Error?f.message:"Failed to install key")}finally{a(!1)}};return u.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:u.jsxs("div",{className:"w-full max-w-lg space-y-6",children:[u.jsxs("div",{className:"text-center space-y-2",children:[u.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-primary/10",children:u.jsx(D_,{className:"h-6 w-6 text-primary"})}),u.jsx("h1",{className:"text-2xl font-bold",children:"Activate ContextNest Community"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"This server is in setup mode. Paste a PromptOwl license key to unlock write access."})]}),u.jsxs("div",{className:"border rounded-lg p-6 space-y-4 bg-card",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(fa,{htmlFor:"license-key",children:"License key"}),u.jsx(yc,{id:"license-key","data-testid":"license-setup-key-input",placeholder:"pk_...",value:t,autoFocus:!0,onChange:w=>{r(w.target.value),c&&d(null)},onKeyDown:w=>{w.key==="Enter"&&!o&&v()},className:"font-mono"}),c&&u.jsx("p",{className:"text-sm text-destructive","data-testid":"license-setup-error",children:c}),p&&u.jsxs("div",{className:"text-sm rounded-md border border-amber-300 bg-amber-50 text-amber-800 p-3 space-y-1","data-testid":"license-setup-warning",children:[u.jsx("p",{className:"font-medium",children:"License not saved"}),u.jsx("p",{children:p})]})]}),p?u.jsx(Qe,{className:"w-full",variant:"outline",onClick:e,"data-testid":"license-setup-continue",children:"Continue anyway (key lost on restart)"}):u.jsx(Qe,{className:"w-full",onClick:v,disabled:o||!t.trim(),"data-testid":"license-setup-submit",children:o?u.jsxs(u.Fragment,{children:[u.jsx(ci,{className:"h-4 w-4 mr-2 animate-spin"}),"Validating..."]}):u.jsxs(u.Fragment,{children:[u.jsx(ep,{className:"h-4 w-4 mr-2"}),"Activate Server"]})})]}),u.jsxs("div",{className:"text-sm text-muted-foreground space-y-2 border rounded-lg p-4 bg-muted/30",children:[u.jsx("p",{className:"font-medium text-foreground",children:"Need a key?"}),u.jsxs("ol",{className:"list-decimal list-inside space-y-1",children:[u.jsxs("li",{children:["Sign up free at"," ",u.jsxs("a",{href:"https://app.promptowl.ai",target:"_blank",rel:"noreferrer",className:"text-primary underline inline-flex items-center gap-1",children:["app.promptowl.ai",u.jsx(sf,{className:"h-3 w-3"})]})]}),u.jsx("li",{children:"Open Overview > Community License"}),u.jsx("li",{children:"Generate a key and paste it above"})]}),u.jsx("p",{className:"text-xs pt-2",children:"Reads stay available without a license. Writes (nest/node create, update, delete) require activation."})]})]})})}function UR(e,t){const r=t.toLowerCase().split(/\s+/).filter(Boolean);return r.length===0?[]:e.filter(o=>{const a=`${o.name??""} ${o.description??""} ${o.id??""}`.toLowerCase();return r.every(c=>a.includes(c))}).sort((o,a)=>+!!a.pinned-+!!o.pinned).map(o=>({id:o.id,title:o.name??o.id,description:o.description??null}))}const Gd=20;function VR(e,t){const r=t.trim().split(/\s+/).filter(Boolean);if(r.length===0)return e;const o=new RegExp(`(${r.map(c=>c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})`,"gi"),a=r.map(c=>c.toLowerCase());return e.split(o).map((c,d)=>c&&a.includes(c.toLowerCase())?u.jsx("mark",{className:"bg-yellow-200 dark:bg-yellow-700/60 rounded-sm px-0.5",children:c},d):c)}function Ky({active:e,onClick:t,label:r}){return u.jsx("button",{type:"button",onClick:t,"aria-pressed":e,className:`max-w-[16rem] truncate rounded px-1.5 py-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${e?"bg-muted font-medium text-foreground":"hover:bg-muted/60"}`,children:r})}function BR({nestId:e,nestName:t,onSelect:r,onClose:o}){const[a,c]=y.useState(""),[d,p]=y.useState(!1),[g,v]=y.useState([]),[w,f]=y.useState(0),[x,S]=y.useState(!1),[N,k]=y.useState(0),C=y.useRef(null),_=y.useRef(null),R=Oc(),D=!e||d;y.useEffect(()=>{var A;(A=C.current)==null||A.focus()},[]),y.useEffect(()=>{const A=M=>{M.key==="Escape"&&o()};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[o]),y.useEffect(()=>(_.current&&clearTimeout(_.current),_.current=setTimeout(async()=>{const A=a.trim();if(!A){v([]),k(0);return}S(!0);try{if(D){const[M,Y]=await Promise.all([R.fetchQuery(Wt.nestList()).then(W=>UR((W==null?void 0:W.nests)??[],A).map(oe=>({...oe,kind:"nest"}))).catch(()=>[]),R.fetchQuery(Wt.globalSearch(A,Gd)).then(W=>(k(W.count),W.nodes.map(oe=>({...oe,kind:"node"})))).catch(()=>(k(0),[]))]);v([...M.slice(0,4),...Y.slice(0,Gd)])}else{const M=await vC(e,A);k(M.nodes.length),v(M.nodes.slice(0,Gd).map(Y=>({...Y,kind:"node",nest_id:Y.nest_id??e,nest_name:Y.nest_name??t})))}f(0)}catch{v([]),k(0)}finally{S(!1)}},a.trim()?250:0),()=>{_.current&&clearTimeout(_.current)}),[e,t,D,a,R]);const T=A=>{const M=g[A];M&&r(M.id,M)},G=g.filter(A=>A.kind==="node").length,q=()=>x?"Searching…":a.trim()?D?"No matches":u.jsxs(u.Fragment,{children:["No matches in ",t??"this nest","."," ",u.jsx("button",{type:"button",onClick:()=>p(!0),className:"font-medium text-foreground underline underline-offset-2 hover:no-underline","data-testid":"quick-open-widen-scope",children:"Search all nests"})]}):D?"Type to search nests and documents…":`Type to search ${t??"this nest"}…`;return u.jsx("div",{className:"fixed inset-0 z-50 bg-black/30 flex items-start justify-center pt-[15vh]",onClick:o,children:u.jsxs("div",{className:"w-full max-w-lg rounded-lg border bg-background shadow-xl overflow-hidden",onClick:A=>A.stopPropagation(),children:[u.jsxs("div",{className:"flex items-center gap-2 border-b px-3",children:[x?u.jsx(ci,{className:"h-4 w-4 text-muted-foreground animate-spin"}):u.jsx(tp,{className:"h-4 w-4 text-muted-foreground"}),u.jsx("input",{ref:C,value:a,onChange:A=>c(A.target.value),onKeyDown:A=>{A.key==="Tab"&&e&&(A.preventDefault(),p(M=>!M)),A.key==="ArrowDown"&&(A.preventDefault(),f(M=>Math.min(M+1,g.length-1))),A.key==="ArrowUp"&&(A.preventDefault(),f(M=>Math.max(M-1,0))),A.key==="Enter"&&(A.preventDefault(),T(w))},placeholder:D?"Search nests and documents…":"Search documents — title, tags, content…",className:"flex-1 bg-transparent py-3 text-sm outline-none","data-testid":"quick-open-input"}),u.jsx("kbd",{className:"text-[10px] text-muted-foreground border rounded px-1",children:"esc"})]}),u.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-1.5 text-xs text-muted-foreground",children:[u.jsx("span",{children:"Searching"}),e?u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(Ky,{active:!d,onClick:()=>p(!1),label:t?`This nest — ${t}`:"This nest"}),u.jsx(Ky,{active:d,onClick:()=>p(!0),label:"All nests"}),u.jsx("kbd",{className:"rounded border px-1 text-[10px]",children:"tab"})]}):u.jsx("span",{className:"font-medium text-foreground",children:"all nests"})]}),u.jsx("div",{className:"max-h-72 overflow-y-auto py-1",children:g.length===0?u.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:q()}):g.map((A,M)=>{var Y;return u.jsxs(y.Fragment,{children:[A.kind!==((Y=g[M-1])==null?void 0:Y.kind)&&u.jsx("div",{className:"px-3 pb-0.5 pt-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:A.kind==="nest"?"Nests":"Documents"}),u.jsxs("button",{type:"button",className:`flex w-full items-start gap-2 px-3 py-2 text-left text-sm ${M===w?"bg-muted":"hover:bg-muted/50"}`,onMouseEnter:()=>f(M),onClick:()=>T(M),children:[A.kind==="nest"?u.jsx(Pv,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"}):u.jsx(Xf,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"truncate font-medium",children:A.title}),A.kind==="nest"?u.jsx("span",{className:"ml-auto text-xs text-muted-foreground shrink-0",children:"Nest"}):D&&A.nest_name?u.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground shrink-0",children:A.nest_name}):A.tags&&A.tags.length>0&&u.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:A.tags.slice(0,3).join(" ")})]}),A.kind==="node"&&A.snippet&&a.trim()&&u.jsx("div",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:VR(A.snippet,a)})]})]})]},`${A.kind}:${A.nest_id??""}${A.id}`)})}),G>0&&N>G&&u.jsxs("div",{className:"border-t px-3 py-2 text-xs text-muted-foreground",children:["Showing ",G," of ",N," matching documents — keep typing to narrow."]})]})})}const na=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform)?"⌘":"Ctrl",WR=[{title:"Anywhere",items:[[`${na} K`,"Search nests and documents"],["?","Show this cheatsheet"],["Esc","Close a dialog or the search palette"]]},{title:"Search palette",items:[["↑ ↓","Move between results"],["Enter","Open the selected result"]]},{title:"Editing a document",items:[[`${na} B`,"Bold"],[`${na} I`,"Italic"],[`${na} Z`,"Undo"],[`${na} ⇧ Z`,"Redo"],["# / ## / ###","Heading, typed at the start of a line"],["[[","Link to another document"],["@","Mention a person"]]}];function HR({onClose:e}){return u.jsx(fi,{open:!0,onOpenChange:e,children:u.jsxs(io,{className:"sm:max-w-[480px]",children:[u.jsxs(ao,{children:[u.jsx(lo,{children:"Keyboard shortcuts"}),u.jsxs(co,{children:["Press ",u.jsx("kbd",{className:"rounded border px-1",children:"?"})," anywhere to bring this back."]})]}),u.jsx("div",{className:"space-y-4",children:WR.map(t=>u.jsxs("div",{children:[u.jsx("div",{className:"mb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:t.title}),u.jsx("dl",{className:"space-y-1",children:t.items.map(([r,o])=>u.jsxs("div",{className:"flex items-baseline gap-3 text-sm",children:[u.jsx("dt",{className:"w-32 shrink-0",children:u.jsx("kbd",{className:"rounded border bg-muted px-1.5 py-0.5 text-xs",children:r})}),u.jsx("dd",{className:"text-muted-foreground",children:o})]},r))})]},t.title))})]})})}let zf=null,Ff=!1;function z4(e){zf=e}function qR(e){!Ff&&zf&&zf(e)||e()}function F4(e){Ff=!0;try{e()}finally{Ff=!1}}const d0=/^\/nest\/([^/]+)(?:\/([^/]+))?\/?$/;function KR(e){try{return decodeURIComponent(e)}catch{return e}}function Zd(e=window.location){const t=e.pathname.match(d0);return t?KR(t[1]):new URLSearchParams(e.search).get("nest")}function Qy(e=window.location){const t=e.pathname.match(d0);return t!=null&&t[2]?t[2]:new URLSearchParams(e.search).get("view")}function Gy(e,t){if(!e)return"/";const r=`/nest/${encodeURIComponent(e)}`;return t?`${r}/${t}`:r}const f0=y.createContext(null),QR=f0.Provider;function U4(){const e=y.useContext(f0);if(!e)throw new Error("useNestPage: no NestPageProvider above this page");return e}const p0=y.createContext(null),GR=p0.Provider;function V4(){const e=y.useContext(p0);if(!e)throw new Error("useAppNav: no AppNavProvider above this page");return e}const $p=y.createContext(null);function ZR({children:e}){const[t,r]=y.useState([]);return u.jsx($p.Provider,{value:{tail:t,setTail:r},children:e})}function B4(e){const t=y.useContext($p),r=e.map(o=>o.label).join("\0");y.useEffect(()=>{if(t)return t.setTail(e),()=>t.setTail([])},[r])}function JR(){var e;return((e=y.useContext($p))==null?void 0:e.tail)??[]}const Jd="/assets/hootie-_U3ECslt.svg";function YR({className:e}){return u.jsx("span",{className:Le("inline-flex items-center rounded-sm border border-blue-200 bg-blue-100 px-1.5 py-0 text-[10px] font-semibold uppercase tracking-wide leading-4 text-blue-700 dark:border-blue-700 dark:bg-blue-900/50 dark:text-blue-300",e),children:"Beta"})}function XR(e,t=[]){let r=[];function o(c,d){const p=y.createContext(d);p.displayName=c+"Context";const g=r.length;r=[...r,d];const v=f=>{var _;const{scope:x,children:S,...N}=f,k=((_=x==null?void 0:x[e])==null?void 0:_[g])||p,C=y.useMemo(()=>N,Object.values(N));return u.jsx(k.Provider,{value:C,children:S})};v.displayName=c+"Provider";function w(f,x){var k;const S=((k=x==null?void 0:x[e])==null?void 0:k[g])||p,N=y.useContext(S);if(N)return N;if(d!==void 0)return d;throw new Error(`\`${f}\` must be used within \`${c}\``)}return[v,w]}const a=()=>{const c=r.map(d=>y.createContext(d));return function(p){const g=(p==null?void 0:p[e])||c;return y.useMemo(()=>({[`__scope${e}`]:{...p,[e]:g}}),[p,g])}};return a.scopeName=e,[o,eA(a,...t)]}function eA(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const d=o.reduce((p,{useScope:g,scopeName:v})=>{const f=g(c)[`__scope${v}`];return{...p,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return r.scopeName=t.scopeName,r}var tA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ip=tA.reduce((e,t)=>{const r=Tp(`Primitive.${t}`),o=y.forwardRef((a,c)=>{const{asChild:d,...p}=a,g=d?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(g,{...p,ref:c})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Yd={exports:{}},Xd={};/**
|
|
382
|
-
* @license React
|
|
383
|
-
* use-sync-external-store-shim.production.js
|
|
384
|
-
*
|
|
385
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
386
|
-
*
|
|
387
|
-
* This source code is licensed under the MIT license found in the
|
|
388
|
-
* LICENSE file in the root directory of this source tree.
|
|
389
|
-
*/var Zy;function nA(){if(Zy)return Xd;Zy=1;var e=_c();function t(f,x){return f===x&&(f!==0||1/f===1/x)||f!==f&&x!==x}var r=typeof Object.is=="function"?Object.is:t,o=e.useState,a=e.useEffect,c=e.useLayoutEffect,d=e.useDebugValue;function p(f,x){var S=x(),N=o({inst:{value:S,getSnapshot:x}}),k=N[0].inst,C=N[1];return c(function(){k.value=S,k.getSnapshot=x,g(k)&&C({inst:k})},[f,S,x]),a(function(){return g(k)&&C({inst:k}),f(function(){g(k)&&C({inst:k})})},[f]),d(S),S}function g(f){var x=f.getSnapshot;f=f.value;try{var S=x();return!r(f,S)}catch{return!0}}function v(f,x){return x()}var w=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:p;return Xd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:w,Xd}var Jy;function rA(){return Jy||(Jy=1,Yd.exports=nA()),Yd.exports}var sA=rA();function oA(){return sA.useSyncExternalStore(iA,()=>!0,()=>!1)}function iA(){return()=>{}}var Dp="Avatar",[aA]=XR(Dp),[lA,h0]=aA(Dp),m0=y.forwardRef((e,t)=>{const{__scopeAvatar:r,...o}=e,[a,c]=y.useState("idle");return u.jsx(lA,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:c,children:u.jsx(Ip.span,{...o,ref:t})})});m0.displayName=Dp;var g0="AvatarImage",y0=y.forwardRef((e,t)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:a=()=>{},...c}=e,d=h0(g0,r),p=cA(o,c),g=gr(v=>{a(v),d.onImageLoadingStatusChange(v)});return Qn(()=>{p!=="idle"&&g(p)},[p,g]),p==="loaded"?u.jsx(Ip.img,{...c,ref:t,src:o}):null});y0.displayName=g0;var v0="AvatarFallback",w0=y.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:o,...a}=e,c=h0(v0,r),[d,p]=y.useState(o===void 0);return y.useEffect(()=>{if(o!==void 0){const g=window.setTimeout(()=>p(!0),o);return()=>window.clearTimeout(g)}},[o]),d&&c.imageLoadingStatus!=="loaded"?u.jsx(Ip.span,{...a,ref:t}):null});w0.displayName=v0;function Yy(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function cA(e,{referrerPolicy:t,crossOrigin:r}){const o=oA(),a=y.useRef(null),c=o?(a.current||(a.current=new window.Image),a.current):null,[d,p]=y.useState(()=>Yy(c,e));return Qn(()=>{p(Yy(c,e))},[c,e]),Qn(()=>{const g=f=>()=>{p(f)};if(!c)return;const v=g("loaded"),w=g("error");return c.addEventListener("load",v),c.addEventListener("error",w),t&&(c.referrerPolicy=t),typeof r=="string"&&(c.crossOrigin=r),()=>{c.removeEventListener("load",v),c.removeEventListener("error",w)}},[c,r,t]),d}var x0=m0,b0=y0,S0=w0;const Uf=y.forwardRef(({className:e,...t},r)=>u.jsx(x0,{ref:r,className:Le("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Uf.displayName=x0.displayName;const uA=y.forwardRef(({className:e,...t},r)=>u.jsx(b0,{ref:r,className:Le("aspect-square h-full w-full",e),...t}));uA.displayName=b0.displayName;const Vf=y.forwardRef(({className:e,...t},r)=>u.jsx(S0,{ref:r,className:Le("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Vf.displayName=S0.displayName;const k0=["top","right","bottom","left"],Xy=["start","end"],ev=k0.reduce((e,t)=>e.concat(t,t+"-"+Xy[0],t+"-"+Xy[1]),[]),Gn=Math.min,Bt=Math.max,vc=Math.round,Xl=Math.floor,mr=e=>({x:e,y:e}),dA={left:"right",right:"left",bottom:"top",top:"bottom"};function Bf(e,t,r){return Bt(e,Gn(t,r))}function Zn(e,t){return typeof e=="function"?e(t):e}function _n(e){return e.split("-")[0]}function Kn(e){return e.split("-")[1]}function Lp(e){return e==="x"?"y":"x"}function zp(e){return e==="y"?"height":"width"}function qn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Fp(e){return Lp(qn(e))}function _0(e,t,r){r===void 0&&(r=!1);const o=Kn(e),a=Fp(e),c=zp(a);let d=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(d=xc(d)),[d,xc(d)]}function fA(e){const t=xc(e);return[wc(e),t,wc(t)]}function wc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const tv=["left","right"],nv=["right","left"],pA=["top","bottom"],hA=["bottom","top"];function mA(e,t,r){switch(e){case"top":case"bottom":return r?t?nv:tv:t?tv:nv;case"left":case"right":return t?pA:hA;default:return[]}}function gA(e,t,r,o){const a=Kn(e);let c=mA(_n(e),r==="start",o);return a&&(c=c.map(d=>d+"-"+a),t&&(c=c.concat(c.map(wc)))),c}function xc(e){const t=_n(e);return dA[t]+e.slice(t.length)}function yA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Up(e){return typeof e!="number"?yA(e):{top:e,right:e,bottom:e,left:e}}function pi(e){const{x:t,y:r,width:o,height:a}=e;return{width:o,height:a,top:r,left:t,right:t+o,bottom:r+a,x:t,y:r}}function rv(e,t,r){let{reference:o,floating:a}=e;const c=qn(t),d=Fp(t),p=zp(d),g=_n(t),v=c==="y",w=o.x+o.width/2-a.width/2,f=o.y+o.height/2-a.height/2,x=o[p]/2-a[p]/2;let S;switch(g){case"top":S={x:w,y:o.y-a.height};break;case"bottom":S={x:w,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:f};break;case"left":S={x:o.x-a.width,y:f};break;default:S={x:o.x,y:o.y}}switch(Kn(t)){case"start":S[d]-=x*(r&&v?-1:1);break;case"end":S[d]+=x*(r&&v?-1:1);break}return S}async function vA(e,t){var r;t===void 0&&(t={});const{x:o,y:a,platform:c,rects:d,elements:p,strategy:g}=e,{boundary:v="clippingAncestors",rootBoundary:w="viewport",elementContext:f="floating",altBoundary:x=!1,padding:S=0}=Zn(t,e),N=Up(S),C=p[x?f==="floating"?"reference":"floating":f],_=pi(await c.getClippingRect({element:(r=await(c.isElement==null?void 0:c.isElement(C)))==null||r?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(p.floating)),boundary:v,rootBoundary:w,strategy:g})),R=f==="floating"?{x:o,y:a,width:d.floating.width,height:d.floating.height}:d.reference,D=await(c.getOffsetParent==null?void 0:c.getOffsetParent(p.floating)),T=await(c.isElement==null?void 0:c.isElement(D))?await(c.getScale==null?void 0:c.getScale(D))||{x:1,y:1}:{x:1,y:1},G=pi(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:p,rect:R,offsetParent:D,strategy:g}):R);return{top:(_.top-G.top+N.top)/T.y,bottom:(G.bottom-_.bottom+N.bottom)/T.y,left:(_.left-G.left+N.left)/T.x,right:(G.right-_.right+N.right)/T.x}}const wA=50,xA=async(e,t,r)=>{const{placement:o="bottom",strategy:a="absolute",middleware:c=[],platform:d}=r,p=d.detectOverflow?d:{...d,detectOverflow:vA},g=await(d.isRTL==null?void 0:d.isRTL(t));let v=await d.getElementRects({reference:e,floating:t,strategy:a}),{x:w,y:f}=rv(v,o,g),x=o,S=0;const N={};for(let k=0;k<c.length;k++){const C=c[k];if(!C)continue;const{name:_,fn:R}=C,{x:D,y:T,data:G,reset:q}=await R({x:w,y:f,initialPlacement:o,placement:x,strategy:a,middlewareData:N,rects:v,platform:p,elements:{reference:e,floating:t}});w=D??w,f=T??f,N[_]={...N[_],...G},q&&S<wA&&(S++,typeof q=="object"&&(q.placement&&(x=q.placement),q.rects&&(v=q.rects===!0?await d.getElementRects({reference:e,floating:t,strategy:a}):q.rects),{x:w,y:f}=rv(v,x,g)),k=-1)}return{x:w,y:f,placement:x,strategy:a,middlewareData:N}},bA=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:a,rects:c,platform:d,elements:p,middlewareData:g}=t,{element:v,padding:w=0}=Zn(e,t)||{};if(v==null)return{};const f=Up(w),x={x:r,y:o},S=Fp(a),N=zp(S),k=await d.getDimensions(v),C=S==="y",_=C?"top":"left",R=C?"bottom":"right",D=C?"clientHeight":"clientWidth",T=c.reference[N]+c.reference[S]-x[S]-c.floating[N],G=x[S]-c.reference[S],q=await(d.getOffsetParent==null?void 0:d.getOffsetParent(v));let A=q?q[D]:0;(!A||!await(d.isElement==null?void 0:d.isElement(q)))&&(A=p.floating[D]||c.floating[N]);const M=T/2-G/2,Y=A/2-k[N]/2-1,W=Gn(f[_],Y),oe=Gn(f[R],Y),ge=W,de=A-k[N]-oe,ce=A/2-k[N]/2+M,fe=Bf(ge,ce,de),J=!g.arrow&&Kn(a)!=null&&ce!==fe&&c.reference[N]/2-(ce<ge?W:oe)-k[N]/2<0,re=J?ce<ge?ce-ge:ce-de:0;return{[S]:x[S]+re,data:{[S]:fe,centerOffset:ce-fe-re,...J&&{alignmentOffset:re}},reset:J}}});function SA(e,t,r){return(e?[...r.filter(a=>Kn(a)===e),...r.filter(a=>Kn(a)!==e)]:r.filter(a=>_n(a)===a)).filter(a=>e?Kn(a)===e||(t?wc(a)!==a:!1):!0)}const kA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,o,a;const{rects:c,middlewareData:d,placement:p,platform:g,elements:v}=t,{crossAxis:w=!1,alignment:f,allowedPlacements:x=ev,autoAlignment:S=!0,...N}=Zn(e,t),k=f!==void 0||x===ev?SA(f||null,S,x):x,C=await g.detectOverflow(t,N),_=((r=d.autoPlacement)==null?void 0:r.index)||0,R=k[_];if(R==null)return{};const D=_0(R,c,await(g.isRTL==null?void 0:g.isRTL(v.floating)));if(p!==R)return{reset:{placement:k[0]}};const T=[C[_n(R)],C[D[0]],C[D[1]]],G=[...((o=d.autoPlacement)==null?void 0:o.overflows)||[],{placement:R,overflows:T}],q=k[_+1];if(q)return{data:{index:_+1,overflows:G},reset:{placement:q}};const A=G.map(W=>{const oe=Kn(W.placement);return[W.placement,oe&&w?W.overflows.slice(0,2).reduce((ge,de)=>ge+de,0):W.overflows[0],W.overflows]}).sort((W,oe)=>W[1]-oe[1]),Y=((a=A.filter(W=>W[2].slice(0,Kn(W[0])?2:3).every(oe=>oe<=0))[0])==null?void 0:a[0])||A[0][0];return Y!==p?{data:{index:_+1,overflows:G},reset:{placement:Y}}:{}}}},_A=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:a,middlewareData:c,rects:d,initialPlacement:p,platform:g,elements:v}=t,{mainAxis:w=!0,crossAxis:f=!0,fallbackPlacements:x,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...C}=Zn(e,t);if((r=c.arrow)!=null&&r.alignmentOffset)return{};const _=_n(a),R=qn(p),D=_n(p)===p,T=await(g.isRTL==null?void 0:g.isRTL(v.floating)),G=x||(D||!k?[xc(p)]:fA(p)),q=N!=="none";!x&&q&&G.push(...gA(p,k,N,T));const A=[p,...G],M=await g.detectOverflow(t,C),Y=[];let W=((o=c.flip)==null?void 0:o.overflows)||[];if(w&&Y.push(M[_]),f){const ce=_0(a,d,T);Y.push(M[ce[0]],M[ce[1]])}if(W=[...W,{placement:a,overflows:Y}],!Y.every(ce=>ce<=0)){var oe,ge;const ce=(((oe=c.flip)==null?void 0:oe.index)||0)+1,fe=A[ce];if(fe&&(!(f==="alignment"?R!==qn(fe):!1)||W.every(K=>qn(K.placement)===R?K.overflows[0]>0:!0)))return{data:{index:ce,overflows:W},reset:{placement:fe}};let J=(ge=W.filter(re=>re.overflows[0]<=0).sort((re,K)=>re.overflows[1]-K.overflows[1])[0])==null?void 0:ge.placement;if(!J)switch(S){case"bestFit":{var de;const re=(de=W.filter(K=>{if(q){const Q=qn(K.placement);return Q===R||Q==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Q=>Q>0).reduce((Q,I)=>Q+I,0)]).sort((K,Q)=>K[1]-Q[1])[0])==null?void 0:de[0];re&&(J=re);break}case"initialPlacement":J=p;break}if(a!==J)return{reset:{placement:J}}}return{}}}};function sv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ov(e){return k0.some(t=>e[t]>=0)}const CA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:a="referenceHidden",...c}=Zn(e,t);switch(a){case"referenceHidden":{const d=await o.detectOverflow(t,{...c,elementContext:"reference"}),p=sv(d,r.reference);return{data:{referenceHiddenOffsets:p,referenceHidden:ov(p)}}}case"escaped":{const d=await o.detectOverflow(t,{...c,altBoundary:!0}),p=sv(d,r.floating);return{data:{escapedOffsets:p,escaped:ov(p)}}}default:return{}}}}};function C0(e){const t=Gn(...e.map(c=>c.left)),r=Gn(...e.map(c=>c.top)),o=Bt(...e.map(c=>c.right)),a=Bt(...e.map(c=>c.bottom));return{x:t,y:r,width:o-t,height:a-r}}function NA(e){const t=e.slice().sort((a,c)=>a.y-c.y),r=[];let o=null;for(let a=0;a<t.length;a++){const c=t[a];!o||c.y-o.y>o.height/2?r.push([c]):r[r.length-1].push(c),o=c}return r.map(a=>pi(C0(a)))}const EA=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:o,rects:a,platform:c,strategy:d}=t,{padding:p=2,x:g,y:v}=Zn(e,t),w=Array.from(await(c.getClientRects==null?void 0:c.getClientRects(o.reference))||[]),f=NA(w),x=pi(C0(w)),S=Up(p);function N(){if(f.length===2&&f[0].left>f[1].right&&g!=null&&v!=null)return f.find(C=>g>C.left-S.left&&g<C.right+S.right&&v>C.top-S.top&&v<C.bottom+S.bottom)||x;if(f.length>=2){if(qn(r)==="y"){const W=f[0],oe=f[f.length-1],ge=_n(r)==="top",de=W.top,ce=oe.bottom,fe=ge?W.left:oe.left,J=ge?W.right:oe.right,re=J-fe,K=ce-de;return{top:de,bottom:ce,left:fe,right:J,width:re,height:K,x:fe,y:de}}const C=_n(r)==="left",_=Bt(...f.map(W=>W.right)),R=Gn(...f.map(W=>W.left)),D=f.filter(W=>C?W.left===R:W.right===_),T=D[0].top,G=D[D.length-1].bottom,q=R,A=_,M=A-q,Y=G-T;return{top:T,bottom:G,left:q,right:A,width:M,height:Y,x:q,y:T}}return x}const k=await c.getElementRects({reference:{getBoundingClientRect:N},floating:o.floating,strategy:d});return a.reference.x!==k.reference.x||a.reference.y!==k.reference.y||a.reference.width!==k.reference.width||a.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}},N0=new Set(["left","top"]);async function OA(e,t){const{placement:r,platform:o,elements:a}=e,c=await(o.isRTL==null?void 0:o.isRTL(a.floating)),d=_n(r),p=Kn(r),g=qn(r)==="y",v=N0.has(d)?-1:1,w=c&&g?-1:1,f=Zn(t,e);let{mainAxis:x,crossAxis:S,alignmentAxis:N}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return p&&typeof N=="number"&&(S=p==="end"?N*-1:N),g?{x:S*w,y:x*v}:{x:x*v,y:S*w}}const PA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:a,y:c,placement:d,middlewareData:p}=t,g=await OA(t,e);return d===((r=p.offset)==null?void 0:r.placement)&&(o=p.arrow)!=null&&o.alignmentOffset?{}:{x:a+g.x,y:c+g.y,data:{...g,placement:d}}}}},jA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:a,platform:c}=t,{mainAxis:d=!0,crossAxis:p=!1,limiter:g={fn:_=>{let{x:R,y:D}=_;return{x:R,y:D}}},...v}=Zn(e,t),w={x:r,y:o},f=await c.detectOverflow(t,v),x=qn(_n(a)),S=Lp(x);let N=w[S],k=w[x];if(d){const _=S==="y"?"top":"left",R=S==="y"?"bottom":"right",D=N+f[_],T=N-f[R];N=Bf(D,N,T)}if(p){const _=x==="y"?"top":"left",R=x==="y"?"bottom":"right",D=k+f[_],T=k-f[R];k=Bf(D,k,T)}const C=g.fn({...t,[S]:N,[x]:k});return{...C,data:{x:C.x-r,y:C.y-o,enabled:{[S]:d,[x]:p}}}}}},TA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:o,placement:a,rects:c,middlewareData:d}=t,{offset:p=0,mainAxis:g=!0,crossAxis:v=!0}=Zn(e,t),w={x:r,y:o},f=qn(a),x=Lp(f);let S=w[x],N=w[f];const k=Zn(p,t),C=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(g){const D=x==="y"?"height":"width",T=c.reference[x]-c.floating[D]+C.mainAxis,G=c.reference[x]+c.reference[D]-C.mainAxis;S<T?S=T:S>G&&(S=G)}if(v){var _,R;const D=x==="y"?"width":"height",T=N0.has(_n(a)),G=c.reference[f]-c.floating[D]+(T&&((_=d.offset)==null?void 0:_[f])||0)+(T?0:C.crossAxis),q=c.reference[f]+c.reference[D]+(T?0:((R=d.offset)==null?void 0:R[f])||0)-(T?C.crossAxis:0);N<G?N=G:N>q&&(N=q)}return{[x]:S,[f]:N}}}},RA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:a,rects:c,platform:d,elements:p}=t,{apply:g=()=>{},...v}=Zn(e,t),w=await d.detectOverflow(t,v),f=_n(a),x=Kn(a),S=qn(a)==="y",{width:N,height:k}=c.floating;let C,_;f==="top"||f==="bottom"?(C=f,_=x===(await(d.isRTL==null?void 0:d.isRTL(p.floating))?"start":"end")?"left":"right"):(_=f,C=x==="end"?"top":"bottom");const R=k-w.top-w.bottom,D=N-w.left-w.right,T=Gn(k-w[C],R),G=Gn(N-w[_],D),q=!t.middlewareData.shift;let A=T,M=G;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(M=D),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(A=R),q&&!x){const W=Bt(w.left,0),oe=Bt(w.right,0),ge=Bt(w.top,0),de=Bt(w.bottom,0);S?M=N-2*(W!==0||oe!==0?W+oe:Bt(w.left,w.right)):A=k-2*(ge!==0||de!==0?ge+de:Bt(w.top,w.bottom))}await g({...t,availableWidth:M,availableHeight:A});const Y=await d.getDimensions(p.floating);return N!==Y.width||k!==Y.height?{reset:{rects:!0}}:{}}}};function Fc(){return typeof window<"u"}function yi(e){return E0(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vr(e){var t;return(t=(E0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function E0(e){return Fc()?e instanceof Node||e instanceof kn(e).Node:!1}function Jn(e){return Fc()?e instanceof Element||e instanceof kn(e).Element:!1}function Lr(e){return Fc()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function iv(e){return!Fc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function ja(e){const{overflow:t,overflowX:r,overflowY:o,display:a}=Yn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&a!=="inline"&&a!=="contents"}function AA(e){return/^(table|td|th)$/.test(yi(e))}function Uc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const MA=/transform|translate|scale|rotate|perspective|filter/,$A=/paint|layout|strict|content/,Fs=e=>!!e&&e!=="none";let ef;function Vp(e){const t=Jn(e)?Yn(e):e;return Fs(t.transform)||Fs(t.translate)||Fs(t.scale)||Fs(t.rotate)||Fs(t.perspective)||!Bp()&&(Fs(t.backdropFilter)||Fs(t.filter))||MA.test(t.willChange||"")||$A.test(t.contain||"")}function IA(e){let t=Ss(e);for(;Lr(t)&&!hi(t);){if(Vp(t))return t;if(Uc(t))return null;t=Ss(t)}return null}function Bp(){return ef==null&&(ef=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ef}function hi(e){return/^(html|body|#document)$/.test(yi(e))}function Yn(e){return kn(e).getComputedStyle(e)}function Vc(e){return Jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ss(e){if(yi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iv(e)&&e.host||vr(e);return iv(t)?t.host:t}function O0(e){const t=Ss(e);return hi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Lr(t)&&ja(t)?t:O0(t)}function pa(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=O0(e),c=a===((o=e.ownerDocument)==null?void 0:o.body),d=kn(a);if(c){const p=Wf(d);return t.concat(d,d.visualViewport||[],ja(a)?a:[],p&&r?pa(p):[])}else return t.concat(a,pa(a,[],r))}function Wf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function P0(e){const t=Yn(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const a=Lr(e),c=a?e.offsetWidth:r,d=a?e.offsetHeight:o,p=vc(r)!==c||vc(o)!==d;return p&&(r=c,o=d),{width:r,height:o,$:p}}function Wp(e){return Jn(e)?e:e.contextElement}function qo(e){const t=Wp(e);if(!Lr(t))return mr(1);const r=t.getBoundingClientRect(),{width:o,height:a,$:c}=P0(t);let d=(c?vc(r.width):r.width)/o,p=(c?vc(r.height):r.height)/a;return(!d||!Number.isFinite(d))&&(d=1),(!p||!Number.isFinite(p))&&(p=1),{x:d,y:p}}const DA=mr(0);function j0(e){const t=kn(e);return!Bp()||!t.visualViewport?DA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LA(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==kn(e)?!1:t}function uo(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),c=Wp(e);let d=mr(1);t&&(o?Jn(o)&&(d=qo(o)):d=qo(e));const p=LA(c,r,o)?j0(c):mr(0);let g=(a.left+p.x)/d.x,v=(a.top+p.y)/d.y,w=a.width/d.x,f=a.height/d.y;if(c){const x=kn(c),S=o&&Jn(o)?kn(o):o;let N=x,k=Wf(N);for(;k&&o&&S!==N;){const C=qo(k),_=k.getBoundingClientRect(),R=Yn(k),D=_.left+(k.clientLeft+parseFloat(R.paddingLeft))*C.x,T=_.top+(k.clientTop+parseFloat(R.paddingTop))*C.y;g*=C.x,v*=C.y,w*=C.x,f*=C.y,g+=D,v+=T,N=kn(k),k=Wf(N)}}return pi({width:w,height:f,x:g,y:v})}function Bc(e,t){const r=Vc(e).scrollLeft;return t?t.left+r:uo(vr(e)).left+r}function T0(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Bc(e,r),a=r.top+t.scrollTop;return{x:o,y:a}}function zA(e){let{elements:t,rect:r,offsetParent:o,strategy:a}=e;const c=a==="fixed",d=vr(o),p=t?Uc(t.floating):!1;if(o===d||p&&c)return r;let g={scrollLeft:0,scrollTop:0},v=mr(1);const w=mr(0),f=Lr(o);if((f||!f&&!c)&&((yi(o)!=="body"||ja(d))&&(g=Vc(o)),f)){const S=uo(o);v=qo(o),w.x=S.x+o.clientLeft,w.y=S.y+o.clientTop}const x=d&&!f&&!c?T0(d,g):mr(0);return{width:r.width*v.x,height:r.height*v.y,x:r.x*v.x-g.scrollLeft*v.x+w.x+x.x,y:r.y*v.y-g.scrollTop*v.y+w.y+x.y}}function FA(e){return Array.from(e.getClientRects())}function UA(e){const t=vr(e),r=Vc(e),o=e.ownerDocument.body,a=Bt(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),c=Bt(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let d=-r.scrollLeft+Bc(e);const p=-r.scrollTop;return Yn(o).direction==="rtl"&&(d+=Bt(t.clientWidth,o.clientWidth)-a),{width:a,height:c,x:d,y:p}}const av=25;function VA(e,t){const r=kn(e),o=vr(e),a=r.visualViewport;let c=o.clientWidth,d=o.clientHeight,p=0,g=0;if(a){c=a.width,d=a.height;const w=Bp();(!w||w&&t==="fixed")&&(p=a.offsetLeft,g=a.offsetTop)}const v=Bc(o);if(v<=0){const w=o.ownerDocument,f=w.body,x=getComputedStyle(f),S=w.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,N=Math.abs(o.clientWidth-f.clientWidth-S);N<=av&&(c-=N)}else v<=av&&(c+=v);return{width:c,height:d,x:p,y:g}}function BA(e,t){const r=uo(e,!0,t==="fixed"),o=r.top+e.clientTop,a=r.left+e.clientLeft,c=Lr(e)?qo(e):mr(1),d=e.clientWidth*c.x,p=e.clientHeight*c.y,g=a*c.x,v=o*c.y;return{width:d,height:p,x:g,y:v}}function lv(e,t,r){let o;if(t==="viewport")o=VA(e,r);else if(t==="document")o=UA(vr(e));else if(Jn(t))o=BA(t,r);else{const a=j0(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return pi(o)}function R0(e,t){const r=Ss(e);return r===t||!Jn(r)||hi(r)?!1:Yn(r).position==="fixed"||R0(r,t)}function WA(e,t){const r=t.get(e);if(r)return r;let o=pa(e,[],!1).filter(p=>Jn(p)&&yi(p)!=="body"),a=null;const c=Yn(e).position==="fixed";let d=c?Ss(e):e;for(;Jn(d)&&!hi(d);){const p=Yn(d),g=Vp(d);!g&&p.position==="fixed"&&(a=null),(c?!g&&!a:!g&&p.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||ja(d)&&!g&&R0(e,d))?o=o.filter(w=>w!==d):a=p,d=Ss(d)}return t.set(e,o),o}function HA(e){let{element:t,boundary:r,rootBoundary:o,strategy:a}=e;const d=[...r==="clippingAncestors"?Uc(t)?[]:WA(t,this._c):[].concat(r),o],p=lv(t,d[0],a);let g=p.top,v=p.right,w=p.bottom,f=p.left;for(let x=1;x<d.length;x++){const S=lv(t,d[x],a);g=Bt(S.top,g),v=Gn(S.right,v),w=Gn(S.bottom,w),f=Bt(S.left,f)}return{width:v-f,height:w-g,x:f,y:g}}function qA(e){const{width:t,height:r}=P0(e);return{width:t,height:r}}function KA(e,t,r){const o=Lr(t),a=vr(t),c=r==="fixed",d=uo(e,!0,c,t);let p={scrollLeft:0,scrollTop:0};const g=mr(0);function v(){g.x=Bc(a)}if(o||!o&&!c)if((yi(t)!=="body"||ja(a))&&(p=Vc(t)),o){const S=uo(t,!0,c,t);g.x=S.x+t.clientLeft,g.y=S.y+t.clientTop}else a&&v();c&&!o&&a&&v();const w=a&&!o&&!c?T0(a,p):mr(0),f=d.left+p.scrollLeft-g.x-w.x,x=d.top+p.scrollTop-g.y-w.y;return{x:f,y:x,width:d.width,height:d.height}}function tf(e){return Yn(e).position==="static"}function cv(e,t){if(!Lr(e)||Yn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return vr(e)===r&&(r=r.ownerDocument.body),r}function A0(e,t){const r=kn(e);if(Uc(e))return r;if(!Lr(e)){let a=Ss(e);for(;a&&!hi(a);){if(Jn(a)&&!tf(a))return a;a=Ss(a)}return r}let o=cv(e,t);for(;o&&AA(o)&&tf(o);)o=cv(o,t);return o&&hi(o)&&tf(o)&&!Vp(o)?r:o||IA(e)||r}const QA=async function(e){const t=this.getOffsetParent||A0,r=this.getDimensions,o=await r(e.floating);return{reference:KA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function GA(e){return Yn(e).direction==="rtl"}const ZA={convertOffsetParentRelativeRectToViewportRelativeRect:zA,getDocumentElement:vr,getClippingRect:HA,getOffsetParent:A0,getElementRects:QA,getClientRects:FA,getDimensions:qA,getScale:qo,isElement:Jn,isRTL:GA};function M0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function JA(e,t){let r=null,o;const a=vr(e);function c(){var p;clearTimeout(o),(p=r)==null||p.disconnect(),r=null}function d(p,g){p===void 0&&(p=!1),g===void 0&&(g=1),c();const v=e.getBoundingClientRect(),{left:w,top:f,width:x,height:S}=v;if(p||t(),!x||!S)return;const N=Xl(f),k=Xl(a.clientWidth-(w+x)),C=Xl(a.clientHeight-(f+S)),_=Xl(w),D={rootMargin:-N+"px "+-k+"px "+-C+"px "+-_+"px",threshold:Bt(0,Gn(1,g))||1};let T=!0;function G(q){const A=q[0].intersectionRatio;if(A!==g){if(!T)return d();A?d(!1,A):o=setTimeout(()=>{d(!1,1e-7)},1e3)}A===1&&!M0(v,e.getBoundingClientRect())&&d(),T=!1}try{r=new IntersectionObserver(G,{...D,root:a.ownerDocument})}catch{r=new IntersectionObserver(G,D)}r.observe(e)}return d(!0),c}function YA(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:a=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:p=typeof IntersectionObserver=="function",animationFrame:g=!1}=o,v=Wp(e),w=a||c?[...v?pa(v):[],...t?pa(t):[]]:[];w.forEach(_=>{a&&_.addEventListener("scroll",r,{passive:!0}),c&&_.addEventListener("resize",r)});const f=v&&p?JA(v,r):null;let x=-1,S=null;d&&(S=new ResizeObserver(_=>{let[R]=_;R&&R.target===v&&S&&t&&(S.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var D;(D=S)==null||D.observe(t)})),r()}),v&&!g&&S.observe(v),t&&S.observe(t));let N,k=g?uo(e):null;g&&C();function C(){const _=uo(e);k&&!M0(k,_)&&r(),k=_,N=requestAnimationFrame(C)}return r(),()=>{var _;w.forEach(R=>{a&&R.removeEventListener("scroll",r),c&&R.removeEventListener("resize",r)}),f==null||f(),(_=S)==null||_.disconnect(),S=null,g&&cancelAnimationFrame(N)}}const XA=PA,W4=kA,eM=jA,tM=_A,nM=RA,rM=CA,uv=bA,H4=EA,sM=TA,oM=(e,t,r)=>{const o=new Map,a={platform:ZA,...r},c={...a.platform,_c:o};return xA(e,t,{...a,platform:c})};var iM=typeof document<"u",aM=function(){},oc=iM?y.useLayoutEffect:aM;function bc(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 r,o,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!bc(e[o],t[o]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,a[o]))return!1;for(o=r;o--!==0;){const c=a[o];if(!(c==="_owner"&&e.$$typeof)&&!bc(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function $0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dv(e,t){const r=$0(e);return Math.round(t*r)/r}function nf(e){const t=y.useRef(e);return oc(()=>{t.current=e}),t}function lM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:a,elements:{reference:c,floating:d}={},transform:p=!0,whileElementsMounted:g,open:v}=e,[w,f]=y.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[x,S]=y.useState(o);bc(x,o)||S(o);const[N,k]=y.useState(null),[C,_]=y.useState(null),R=y.useCallback(K=>{K!==q.current&&(q.current=K,k(K))},[]),D=y.useCallback(K=>{K!==A.current&&(A.current=K,_(K))},[]),T=c||N,G=d||C,q=y.useRef(null),A=y.useRef(null),M=y.useRef(w),Y=g!=null,W=nf(g),oe=nf(a),ge=nf(v),de=y.useCallback(()=>{if(!q.current||!A.current)return;const K={placement:t,strategy:r,middleware:x};oe.current&&(K.platform=oe.current),oM(q.current,A.current,K).then(Q=>{const I={...Q,isPositioned:ge.current!==!1};ce.current&&!bc(M.current,I)&&(M.current=I,Zf.flushSync(()=>{f(I)}))})},[x,t,r,oe,ge]);oc(()=>{v===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(K=>({...K,isPositioned:!1})))},[v]);const ce=y.useRef(!1);oc(()=>(ce.current=!0,()=>{ce.current=!1}),[]),oc(()=>{if(T&&(q.current=T),G&&(A.current=G),T&&G){if(W.current)return W.current(T,G,de);de()}},[T,G,de,W,Y]);const fe=y.useMemo(()=>({reference:q,floating:A,setReference:R,setFloating:D}),[R,D]),J=y.useMemo(()=>({reference:T,floating:G}),[T,G]),re=y.useMemo(()=>{const K={position:r,left:0,top:0};if(!J.floating)return K;const Q=dv(J.floating,w.x),I=dv(J.floating,w.y);return p?{...K,transform:"translate("+Q+"px, "+I+"px)",...$0(J.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:I}},[r,p,J.floating,w.x,w.y]);return y.useMemo(()=>({...w,update:de,refs:fe,elements:J,floatingStyles:re}),[w,de,fe,J,re])}const cM=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:a}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?uv({element:o.current,padding:a}).fn(r):{}:o?uv({element:o,padding:a}).fn(r):{}}}},uM=(e,t)=>{const r=XA(e);return{name:r.name,fn:r.fn,options:[e,t]}},dM=(e,t)=>{const r=eM(e);return{name:r.name,fn:r.fn,options:[e,t]}},fM=(e,t)=>({fn:sM(e).fn,options:[e,t]}),pM=(e,t)=>{const r=tM(e);return{name:r.name,fn:r.fn,options:[e,t]}},hM=(e,t)=>{const r=nM(e);return{name:r.name,fn:r.fn,options:[e,t]}},mM=(e,t)=>{const r=rM(e);return{name:r.name,fn:r.fn,options:[e,t]}},gM=(e,t)=>{const r=cM(e);return{name:r.name,fn:r.fn,options:[e,t]}};var yM="Arrow",I0=y.forwardRef((e,t)=>{const{children:r,width:o=10,height:a=5,...c}=e;return u.jsx(Ze.svg,{...c,ref:t,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});I0.displayName=yM;var vM=I0,Hp="Popper",[D0,L0]=Cs(Hp),[wM,z0]=D0(Hp),F0=e=>{const{__scopePopper:t,children:r}=e,[o,a]=y.useState(null);return u.jsx(wM,{scope:t,anchor:o,onAnchorChange:a,children:r})};F0.displayName=Hp;var U0="PopperAnchor",V0=y.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:o,...a}=e,c=z0(U0,r),d=y.useRef(null),p=kt(t,d),g=y.useRef(null);return y.useEffect(()=>{const v=g.current;g.current=(o==null?void 0:o.current)||d.current,v!==g.current&&c.onAnchorChange(g.current)}),o?null:u.jsx(Ze.div,{...a,ref:p})});V0.displayName=U0;var qp="PopperContent",[xM,bM]=D0(qp),B0=y.forwardRef((e,t)=>{var je,ve,me,We,ft,ot;const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:c="center",alignOffset:d=0,arrowPadding:p=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:w=0,sticky:f="partial",hideWhenDetached:x=!1,updatePositionStrategy:S="optimized",onPlaced:N,...k}=e,C=z0(qp,r),[_,R]=y.useState(null),D=kt(t,pt=>R(pt)),[T,G]=y.useState(null),q=Tx(T),A=(q==null?void 0:q.width)??0,M=(q==null?void 0:q.height)??0,Y=o+(c!=="center"?"-"+c:""),W=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},oe=Array.isArray(v)?v:[v],ge=oe.length>0,de={padding:W,boundary:oe.filter(kM),altBoundary:ge},{refs:ce,floatingStyles:fe,placement:J,isPositioned:re,middlewareData:K}=lM({strategy:"fixed",placement:Y,whileElementsMounted:(...pt)=>YA(...pt,{animationFrame:S==="always"}),elements:{reference:C.anchor},middleware:[uM({mainAxis:a+M,alignmentAxis:d}),g&&dM({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?fM():void 0,...de}),g&&pM({...de}),hM({...de,apply:({elements:pt,rects:nt,availableWidth:er,availableHeight:wr})=>{const{width:nn,height:Cn}=nt.reference,it=pt.floating.style;it.setProperty("--radix-popper-available-width",`${er}px`),it.setProperty("--radix-popper-available-height",`${wr}px`),it.setProperty("--radix-popper-anchor-width",`${nn}px`),it.setProperty("--radix-popper-anchor-height",`${Cn}px`)}}),T&&gM({element:T,padding:p}),_M({arrowWidth:A,arrowHeight:M}),x&&mM({strategy:"referenceHidden",...de})]}),[Q,I]=q0(J),O=gr(N);Qn(()=>{re&&(O==null||O())},[re,O]);const z=(je=K.arrow)==null?void 0:je.x,Z=(ve=K.arrow)==null?void 0:ve.y,se=((me=K.arrow)==null?void 0:me.centerOffset)!==0,[ie,pe]=y.useState();return Qn(()=>{_&&pe(window.getComputedStyle(_).zIndex)},[_]),u.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...fe,transform:re?fe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(We=K.transformOrigin)==null?void 0:We.x,(ft=K.transformOrigin)==null?void 0:ft.y].join(" "),...((ot=K.hide)==null?void 0:ot.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(xM,{scope:r,placedSide:Q,onArrowChange:G,arrowX:z,arrowY:Z,shouldHideArrow:se,children:u.jsx(Ze.div,{"data-side":Q,"data-align":I,...k,ref:D,style:{...k.style,animation:re?void 0:"none"}})})})});B0.displayName=qp;var W0="PopperArrow",SM={top:"bottom",right:"left",bottom:"top",left:"right"},H0=y.forwardRef(function(t,r){const{__scopePopper:o,...a}=t,c=bM(W0,o),d=SM[c.placedSide];return u.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:u.jsx(vM,{...a,ref:r,style:{...a.style,display:"block"}})})});H0.displayName=W0;function kM(e){return e!==null}var _M=e=>({name:"transformOrigin",options:e,fn(t){var C,_,R;const{placement:r,rects:o,middlewareData:a}=t,d=((C=a.arrow)==null?void 0:C.centerOffset)!==0,p=d?0:e.arrowWidth,g=d?0:e.arrowHeight,[v,w]=q0(r),f={start:"0%",center:"50%",end:"100%"}[w],x=(((_=a.arrow)==null?void 0:_.x)??0)+p/2,S=(((R=a.arrow)==null?void 0:R.y)??0)+g/2;let N="",k="";return v==="bottom"?(N=d?f:`${x}px`,k=`${-g}px`):v==="top"?(N=d?f:`${x}px`,k=`${o.floating.height+g}px`):v==="right"?(N=`${-g}px`,k=d?f:`${S}px`):v==="left"&&(N=`${o.floating.width+g}px`,k=d?f:`${S}px`),{data:{x:N,y:k}}}});function q0(e){const[t,r="center"]=e.split("-");return[t,r]}var CM=F0,NM=V0,EM=B0,OM=H0;function PM(e){const t=jM(e),r=y.forwardRef((o,a)=>{const{children:c,...d}=o,p=y.Children.toArray(c),g=p.find(RM);if(g){const v=g.props.children,w=p.map(f=>f===g?y.Children.count(v)>1?y.Children.only(null):y.isValidElement(v)?v.props.children:null:f);return u.jsx(t,{...d,ref:a,children:y.isValidElement(v)?y.cloneElement(v,void 0,w):null})}return u.jsx(t,{...d,ref:a,children:c})});return r.displayName=`${e}.Slot`,r}function jM(e){const t=y.forwardRef((r,o)=>{const{children:a,...c}=r;if(y.isValidElement(a)){const d=MM(a),p=AM(c,a.props);return a.type!==y.Fragment&&(p.ref=o?_s(o,d):d),y.cloneElement(a,p)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TM=Symbol("radix.slottable");function RM(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TM}function AM(e,t){const r={...t};for(const o in t){const a=e[o],c=t[o];/^on[A-Z]/.test(o)?a&&c?r[o]=(...p)=>{const g=c(...p);return a(...p),g}:a&&(r[o]=a):o==="style"?r[o]={...a,...c}:o==="className"&&(r[o]=[a,c].filter(Boolean).join(" "))}return{...e,...r}}function MM(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Hf=["Enter"," "],$M=["ArrowDown","PageUp","Home"],K0=["ArrowUp","PageDown","End"],IM=[...$M,...K0],DM={ltr:[...Hf,"ArrowRight"],rtl:[...Hf,"ArrowLeft"]},LM={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ta="Menu",[ha,zM,FM]=Ux(Ta),[po,Q0]=Cs(Ta,[FM,L0,Lc]),Wc=L0(),G0=Lc(),[UM,ho]=po(Ta),[VM,Ra]=po(Ta),Z0=e=>{const{__scopeMenu:t,open:r=!1,children:o,dir:a,onOpenChange:c,modal:d=!0}=e,p=Wc(t),[g,v]=y.useState(null),w=y.useRef(!1),f=gr(c),x=Rp(a);return y.useEffect(()=>{const S=()=>{w.current=!0,document.addEventListener("pointerdown",N,{capture:!0,once:!0}),document.addEventListener("pointermove",N,{capture:!0,once:!0})},N=()=>w.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",N,{capture:!0}),document.removeEventListener("pointermove",N,{capture:!0})}},[]),u.jsx(CM,{...p,children:u.jsx(UM,{scope:t,open:r,onOpenChange:f,content:g,onContentChange:v,children:u.jsx(VM,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:w,dir:x,modal:d,children:o})})})};Z0.displayName=Ta;var BM="MenuAnchor",Kp=y.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e,a=Wc(r);return u.jsx(NM,{...a,...o,ref:t})});Kp.displayName=BM;var Qp="MenuPortal",[WM,J0]=po(Qp,{forceMount:void 0}),Y0=e=>{const{__scopeMenu:t,forceMount:r,children:o,container:a}=e,c=ho(Qp,t);return u.jsx(WM,{scope:t,forceMount:r,children:u.jsx(Dr,{present:r||c.open,children:u.jsx(Cp,{asChild:!0,container:a,children:o})})})};Y0.displayName=Qp;var In="MenuContent",[HM,Gp]=po(In),X0=y.forwardRef((e,t)=>{const r=J0(In,e.__scopeMenu),{forceMount:o=r.forceMount,...a}=e,c=ho(In,e.__scopeMenu),d=Ra(In,e.__scopeMenu);return u.jsx(ha.Provider,{scope:e.__scopeMenu,children:u.jsx(Dr,{present:o||c.open,children:u.jsx(ha.Slot,{scope:e.__scopeMenu,children:d.modal?u.jsx(qM,{...a,ref:t}):u.jsx(KM,{...a,ref:t})})})})}),qM=y.forwardRef((e,t)=>{const r=ho(In,e.__scopeMenu),o=y.useRef(null),a=kt(t,o);return y.useEffect(()=>{const c=o.current;if(c)return ax(c)},[]),u.jsx(Zp,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:De(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),KM=y.forwardRef((e,t)=>{const r=ho(In,e.__scopeMenu);return u.jsx(Zp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),QM=PM("MenuContent.ScrollLock"),Zp=y.forwardRef((e,t)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:p,onEntryFocus:g,onEscapeKeyDown:v,onPointerDownOutside:w,onFocusOutside:f,onInteractOutside:x,onDismiss:S,disableOutsideScroll:N,...k}=e,C=ho(In,r),_=Ra(In,r),R=Wc(r),D=G0(r),T=zM(r),[G,q]=y.useState(null),A=y.useRef(null),M=kt(t,A,C.onContentChange),Y=y.useRef(0),W=y.useRef(""),oe=y.useRef(0),ge=y.useRef(null),de=y.useRef("right"),ce=y.useRef(0),fe=N?Np:y.Fragment,J=N?{as:QM,allowPinchZoom:!0}:void 0,re=Q=>{var je,ve;const I=W.current+Q,O=T().filter(me=>!me.disabled),z=document.activeElement,Z=(je=O.find(me=>me.ref.current===z))==null?void 0:je.textValue,se=O.map(me=>me.textValue),ie=i$(se,I,Z),pe=(ve=O.find(me=>me.textValue===ie))==null?void 0:ve.ref.current;(function me(We){W.current=We,window.clearTimeout(Y.current),We!==""&&(Y.current=window.setTimeout(()=>me(""),1e3))})(I),pe&&setTimeout(()=>pe.focus())};y.useEffect(()=>()=>window.clearTimeout(Y.current),[]),Yw();const K=y.useCallback(Q=>{var O,z;return de.current===((O=ge.current)==null?void 0:O.side)&&l$(Q,(z=ge.current)==null?void 0:z.area)},[]);return u.jsx(HM,{scope:r,searchRef:W,onItemEnter:y.useCallback(Q=>{K(Q)&&Q.preventDefault()},[K]),onItemLeave:y.useCallback(Q=>{var I;K(Q)||((I=A.current)==null||I.focus(),q(null))},[K]),onTriggerLeave:y.useCallback(Q=>{K(Q)&&Q.preventDefault()},[K]),pointerGraceTimerRef:oe,onPointerGraceIntentChange:y.useCallback(Q=>{ge.current=Q},[]),children:u.jsx(fe,{...J,children:u.jsx(_p,{asChild:!0,trapped:a,onMountAutoFocus:De(c,Q=>{var I;Q.preventDefault(),(I=A.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:u.jsx(kp,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:v,onPointerDownOutside:w,onFocusOutside:f,onInteractOutside:x,onDismiss:S,children:u.jsx(Kx,{asChild:!0,...D,dir:_.dir,orientation:"vertical",loop:o,currentTabStopId:G,onCurrentTabStopIdChange:q,onEntryFocus:De(g,Q=>{_.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(EM,{role:"menu","aria-orientation":"vertical","data-state":mb(C.open),"data-radix-menu-content":"",dir:_.dir,...R,...k,ref:M,style:{outline:"none",...k.style},onKeyDown:De(k.onKeyDown,Q=>{const O=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,z=Q.ctrlKey||Q.altKey||Q.metaKey,Z=Q.key.length===1;O&&(Q.key==="Tab"&&Q.preventDefault(),!z&&Z&&re(Q.key));const se=A.current;if(Q.target!==se||!IM.includes(Q.key))return;Q.preventDefault();const pe=T().filter(je=>!je.disabled).map(je=>je.ref.current);K0.includes(Q.key)&&pe.reverse(),s$(pe)}),onBlur:De(e.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(Y.current),W.current="")}),onPointerMove:De(e.onPointerMove,ma(Q=>{const I=Q.target,O=ce.current!==Q.clientX;if(Q.currentTarget.contains(I)&&O){const z=Q.clientX>ce.current?"right":"left";de.current=z,ce.current=Q.clientX}}))})})})})})})});X0.displayName=In;var GM="MenuGroup",Jp=y.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return u.jsx(Ze.div,{role:"group",...o,ref:t})});Jp.displayName=GM;var ZM="MenuLabel",eb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return u.jsx(Ze.div,{...o,ref:t})});eb.displayName=ZM;var Sc="MenuItem",fv="menu.itemSelect",Hc=y.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:o,...a}=e,c=y.useRef(null),d=Ra(Sc,e.__scopeMenu),p=Gp(Sc,e.__scopeMenu),g=kt(t,c),v=y.useRef(!1),w=()=>{const f=c.current;if(!r&&f){const x=new CustomEvent(fv,{bubbles:!0,cancelable:!0});f.addEventListener(fv,S=>o==null?void 0:o(S),{once:!0}),Qw(f,x),x.defaultPrevented?v.current=!1:d.onClose()}};return u.jsx(tb,{...a,ref:g,disabled:r,onClick:De(e.onClick,w),onPointerDown:f=>{var x;(x=e.onPointerDown)==null||x.call(e,f),v.current=!0},onPointerUp:De(e.onPointerUp,f=>{var x;v.current||(x=f.currentTarget)==null||x.click()}),onKeyDown:De(e.onKeyDown,f=>{const x=p.searchRef.current!=="";r||x&&f.key===" "||Hf.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Hc.displayName=Sc;var tb=y.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:o=!1,textValue:a,...c}=e,d=Gp(Sc,r),p=G0(r),g=y.useRef(null),v=kt(t,g),[w,f]=y.useState(!1),[x,S]=y.useState("");return y.useEffect(()=>{const N=g.current;N&&S((N.textContent??"").trim())},[c.children]),u.jsx(ha.ItemSlot,{scope:r,disabled:o,textValue:a??x,children:u.jsx(Qx,{asChild:!0,...p,focusable:!o,children:u.jsx(Ze.div,{role:"menuitem","data-highlighted":w?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:v,onPointerMove:De(e.onPointerMove,ma(N=>{o?d.onItemLeave(N):(d.onItemEnter(N),N.defaultPrevented||N.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:De(e.onPointerLeave,ma(N=>d.onItemLeave(N))),onFocus:De(e.onFocus,()=>f(!0)),onBlur:De(e.onBlur,()=>f(!1))})})})}),JM="MenuCheckboxItem",nb=y.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:o,...a}=e;return u.jsx(ab,{scope:e.__scopeMenu,checked:r,children:u.jsx(Hc,{role:"menuitemcheckbox","aria-checked":kc(r)?"mixed":r,...a,ref:t,"data-state":Xp(r),onSelect:De(a.onSelect,()=>o==null?void 0:o(kc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});nb.displayName=JM;var rb="MenuRadioGroup",[YM,XM]=po(rb,{value:void 0,onValueChange:()=>{}}),sb=y.forwardRef((e,t)=>{const{value:r,onValueChange:o,...a}=e,c=gr(o);return u.jsx(YM,{scope:e.__scopeMenu,value:r,onValueChange:c,children:u.jsx(Jp,{...a,ref:t})})});sb.displayName=rb;var ob="MenuRadioItem",ib=y.forwardRef((e,t)=>{const{value:r,...o}=e,a=XM(ob,e.__scopeMenu),c=r===a.value;return u.jsx(ab,{scope:e.__scopeMenu,checked:c,children:u.jsx(Hc,{role:"menuitemradio","aria-checked":c,...o,ref:t,"data-state":Xp(c),onSelect:De(o.onSelect,()=>{var d;return(d=a.onValueChange)==null?void 0:d.call(a,r)},{checkForDefaultPrevented:!1})})})});ib.displayName=ob;var Yp="MenuItemIndicator",[ab,e$]=po(Yp,{checked:!1}),lb=y.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:o,...a}=e,c=e$(Yp,r);return u.jsx(Dr,{present:o||kc(c.checked)||c.checked===!0,children:u.jsx(Ze.span,{...a,ref:t,"data-state":Xp(c.checked)})})});lb.displayName=Yp;var t$="MenuSeparator",cb=y.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e;return u.jsx(Ze.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});cb.displayName=t$;var n$="MenuArrow",ub=y.forwardRef((e,t)=>{const{__scopeMenu:r,...o}=e,a=Wc(r);return u.jsx(OM,{...a,...o,ref:t})});ub.displayName=n$;var r$="MenuSub",[q4,db]=po(r$),oa="MenuSubTrigger",fb=y.forwardRef((e,t)=>{const r=ho(oa,e.__scopeMenu),o=Ra(oa,e.__scopeMenu),a=db(oa,e.__scopeMenu),c=Gp(oa,e.__scopeMenu),d=y.useRef(null),{pointerGraceTimerRef:p,onPointerGraceIntentChange:g}=c,v={__scopeMenu:e.__scopeMenu},w=y.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return y.useEffect(()=>w,[w]),y.useEffect(()=>{const f=p.current;return()=>{window.clearTimeout(f),g(null)}},[p,g]),u.jsx(Kp,{asChild:!0,...v,children:u.jsx(tb,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":mb(r.open),...e,ref:_s(t,a.onTriggerChange),onClick:f=>{var x;(x=e.onClick)==null||x.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:De(e.onPointerMove,ma(f=>{c.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{r.onOpenChange(!0),w()},100))})),onPointerLeave:De(e.onPointerLeave,ma(f=>{var S,N;w();const x=(S=r.content)==null?void 0:S.getBoundingClientRect();if(x){const k=(N=r.content)==null?void 0:N.dataset.side,C=k==="right",_=C?-5:5,R=x[C?"left":"right"],D=x[C?"right":"left"];c.onPointerGraceIntentChange({area:[{x:f.clientX+_,y:f.clientY},{x:R,y:x.top},{x:D,y:x.top},{x:D,y:x.bottom},{x:R,y:x.bottom}],side:k}),window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(f),f.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:De(e.onKeyDown,f=>{var S;const x=c.searchRef.current!=="";e.disabled||x&&f.key===" "||DM[o.dir].includes(f.key)&&(r.onOpenChange(!0),(S=r.content)==null||S.focus(),f.preventDefault())})})})});fb.displayName=oa;var pb="MenuSubContent",hb=y.forwardRef((e,t)=>{const r=J0(In,e.__scopeMenu),{forceMount:o=r.forceMount,...a}=e,c=ho(In,e.__scopeMenu),d=Ra(In,e.__scopeMenu),p=db(pb,e.__scopeMenu),g=y.useRef(null),v=kt(t,g);return u.jsx(ha.Provider,{scope:e.__scopeMenu,children:u.jsx(Dr,{present:o||c.open,children:u.jsx(ha.Slot,{scope:e.__scopeMenu,children:u.jsx(Zp,{id:p.contentId,"aria-labelledby":p.triggerId,...a,ref:v,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:w=>{var f;d.isUsingKeyboardRef.current&&((f=g.current)==null||f.focus()),w.preventDefault()},onCloseAutoFocus:w=>w.preventDefault(),onFocusOutside:De(e.onFocusOutside,w=>{w.target!==p.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:De(e.onEscapeKeyDown,w=>{d.onClose(),w.preventDefault()}),onKeyDown:De(e.onKeyDown,w=>{var S;const f=w.currentTarget.contains(w.target),x=LM[d.dir].includes(w.key);f&&x&&(c.onOpenChange(!1),(S=p.trigger)==null||S.focus(),w.preventDefault())})})})})})});hb.displayName=pb;function mb(e){return e?"open":"closed"}function kc(e){return e==="indeterminate"}function Xp(e){return kc(e)?"indeterminate":e?"checked":"unchecked"}function s$(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function o$(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function i$(e,t,r){const a=t.length>1&&Array.from(t).every(v=>v===t[0])?t[0]:t,c=r?e.indexOf(r):-1;let d=o$(e,Math.max(c,0));a.length===1&&(d=d.filter(v=>v!==r));const g=d.find(v=>v.toLowerCase().startsWith(a.toLowerCase()));return g!==r?g:void 0}function a$(e,t){const{x:r,y:o}=e;let a=!1;for(let c=0,d=t.length-1;c<t.length;d=c++){const p=t[c],g=t[d],v=p.x,w=p.y,f=g.x,x=g.y;w>o!=x>o&&r<(f-v)*(o-w)/(x-w)+v&&(a=!a)}return a}function l$(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return a$(r,t)}function ma(e){return t=>t.pointerType==="mouse"?e(t):void 0}var c$=Z0,u$=Kp,d$=Y0,f$=X0,p$=Jp,h$=eb,m$=Hc,g$=nb,y$=sb,v$=ib,w$=lb,x$=cb,b$=ub,S$=fb,k$=hb,qc="DropdownMenu",[_$]=Cs(qc,[Q0]),tn=Q0(),[C$,gb]=_$(qc),yb=e=>{const{__scopeDropdownMenu:t,children:r,dir:o,open:a,defaultOpen:c,onOpenChange:d,modal:p=!0}=e,g=tn(t),v=y.useRef(null),[w,f]=Ea({prop:a,defaultProp:c??!1,onChange:d,caller:qc});return u.jsx(C$,{scope:t,triggerId:no(),triggerRef:v,contentId:no(),open:w,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(x=>!x),[f]),modal:p,children:u.jsx(c$,{...g,open:w,onOpenChange:f,dir:o,modal:p,children:r})})};yb.displayName=qc;var vb="DropdownMenuTrigger",wb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...a}=e,c=gb(vb,r),d=tn(r);return u.jsx(u$,{asChild:!0,...d,children:u.jsx(Ze.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:_s(t,c.triggerRef),onPointerDown:De(e.onPointerDown,p=>{!o&&p.button===0&&p.ctrlKey===!1&&(c.onOpenToggle(),c.open||p.preventDefault())}),onKeyDown:De(e.onKeyDown,p=>{o||(["Enter"," "].includes(p.key)&&c.onOpenToggle(),p.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})});wb.displayName=vb;var N$="DropdownMenuPortal",xb=e=>{const{__scopeDropdownMenu:t,...r}=e,o=tn(t);return u.jsx(d$,{...o,...r})};xb.displayName=N$;var bb="DropdownMenuContent",Sb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=gb(bb,r),c=tn(r),d=y.useRef(!1);return u.jsx(f$,{id:a.contentId,"aria-labelledby":a.triggerId,...c,...o,ref:t,onCloseAutoFocus:De(e.onCloseAutoFocus,p=>{var g;d.current||(g=a.triggerRef.current)==null||g.focus(),d.current=!1,p.preventDefault()}),onInteractOutside:De(e.onInteractOutside,p=>{const g=p.detail.originalEvent,v=g.button===0&&g.ctrlKey===!0,w=g.button===2||v;(!a.modal||w)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Sb.displayName=bb;var E$="DropdownMenuGroup",O$=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(p$,{...a,...o,ref:t})});O$.displayName=E$;var P$="DropdownMenuLabel",kb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(h$,{...a,...o,ref:t})});kb.displayName=P$;var j$="DropdownMenuItem",_b=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(m$,{...a,...o,ref:t})});_b.displayName=j$;var T$="DropdownMenuCheckboxItem",Cb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(g$,{...a,...o,ref:t})});Cb.displayName=T$;var R$="DropdownMenuRadioGroup",A$=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(y$,{...a,...o,ref:t})});A$.displayName=R$;var M$="DropdownMenuRadioItem",Nb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(v$,{...a,...o,ref:t})});Nb.displayName=M$;var $$="DropdownMenuItemIndicator",Eb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(w$,{...a,...o,ref:t})});Eb.displayName=$$;var I$="DropdownMenuSeparator",Ob=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(x$,{...a,...o,ref:t})});Ob.displayName=I$;var D$="DropdownMenuArrow",L$=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(b$,{...a,...o,ref:t})});L$.displayName=D$;var z$="DropdownMenuSubTrigger",Pb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(S$,{...a,...o,ref:t})});Pb.displayName=z$;var F$="DropdownMenuSubContent",jb=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...o}=e,a=tn(r);return u.jsx(k$,{...a,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jb.displayName=F$;var U$=yb,V$=wb,B$=xb,Tb=Sb,Rb=kb,Ab=_b,Mb=Cb,$b=Nb,Ib=Eb,Db=Ob,Lb=Pb,zb=jb;const W$=U$,H$=V$,q$=y.forwardRef(({className:e,inset:t,children:r,...o},a)=>u.jsxs(Lb,{ref:a,className:Le("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[r,u.jsx(Ca,{className:"ml-auto h-4 w-4"})]}));q$.displayName=Lb.displayName;const K$=y.forwardRef(({className:e,...t},r)=>u.jsx(zb,{ref:r,className:Le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));K$.displayName=zb.displayName;const Fb=y.forwardRef(({className:e,sideOffset:t=4,...r},o)=>u.jsx(B$,{children:u.jsx(Tb,{ref:o,sideOffset:t,className:Le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",e),...r})}));Fb.displayName=Tb.displayName;const ic=y.forwardRef(({className:e,inset:t,...r},o)=>u.jsx(Ab,{ref:o,className:Le("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));ic.displayName=Ab.displayName;const Q$=y.forwardRef(({className:e,children:t,checked:r,...o},a)=>u.jsxs(Mb,{ref:a,className:Le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ib,{children:u.jsx(Cc,{className:"h-4 w-4"})})}),t]}));Q$.displayName=Mb.displayName;const G$=y.forwardRef(({className:e,children:t,...r},o)=>u.jsxs($b,{ref:o,className:Le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(Ib,{children:u.jsx(Fk,{className:"h-2 w-2 fill-current"})})}),t]}));G$.displayName=$b.displayName;const Z$=y.forwardRef(({className:e,inset:t,...r},o)=>u.jsx(Rb,{ref:o,className:Le("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Z$.displayName=Rb.displayName;const qf=y.forwardRef(({className:e,...t},r)=>u.jsx(Db,{ref:r,className:Le("-mx-1 my-1 h-px bg-muted",e),...t}));qf.displayName=Db.displayName;const Kc=(e,t)=>Jf(()=>e().then(r=>({default:r[t]}))),J$=Kc(()=>St(()=>import("./NestView-CTZ55tXD.js").then(e=>e.e),__vite__mapDeps([20,14,15,16,17,18,2,8,5,6,19,13,9,21,22,1,23,24,25,26,11,4,27,28,29,30,31,32])),"NestView"),Y$=Kc(()=>St(()=>import("./DocumentEditor-DrQfrW3d.js"),__vite__mapDeps([50,13,14,15,16,17,18,2,8,5,6,19,51,22,26,27,52,53,25,29,30,24,33,9,54,4,28,41,34,40,31,55])),"DocumentEditor"),X$=Kc(()=>St(()=>import("./AgentDocsPage-CIiaBqMy.js"),__vite__mapDeps([56,36,54,18])),"AgentDocsPage"),eI=Kc(()=>St(()=>import("./ActivityTracePage-BOZHgJ8S.js"),__vite__mapDeps([49,36,16,13,2,4,21])),"ActivityTracePage"),Ub=[{page:"nest",label:"Nest",icon:Xf,beta:!1},...Pc.map(e=>({page:e.viewPage,label:e.label,icon:e.icon,beta:!!e.beta}))],tI={overview:"Overview",documents:"Documents",review:"Review queue","external-edits":"External edits",stewards:"Stewards",collaborators:"Collaborators"},nI=["overview","documents","review","external-edits","stewards","collaborators"],ec=e=>Ub.some(t=>t.page===e.page);let pv=!1;function rI(){var zr,rr;const{authMode:e,logoUrl:t,serverVersion:r,adminStatus:o,authenticated:a,isAdmin:c,workflowPlaneEnabled:d,subagentRunsEnabled:p,loading:g,error:v,logout:w}=Na(),[f,x]=y.useState(()=>({page:"dashboard",...typeof window<"u"?{tab:WE(window.location.pathname)??dc}:{}})),S=y.useCallback(F=>qR(()=>x(F)),[]);y.useEffect(()=>{oN("$pageview",{page:f.page})},[f.page]);const[N,k]=y.useState(!1),[C,_]=y.useState(()=>typeof window>"u"?{status:"idle"}:Zd()?{status:"loading"}:{status:"idle"}),[R,D]=y.useState(null),[T,G]=y.useState(!0),[q,A]=y.useState(!1),[M,Y]=y.useState(!1),[W,oe]=y.useState(!1),[ge,de]=y.useState(()=>jc(localStorage).sidebarCollapsed),ce=F=>{de(F),dp(localStorage,{sidebarCollapsed:F})},[fe,J]=y.useState(!1);y.useEffect(()=>{J(!1)},[f]);const[re,K]=y.useState(!1),Q=y.useCallback(()=>A(!0),[]),I=Oc(),O=y.useCallback(async F=>{var $t;const X=await I.fetchQuery(Wt.nestList()).catch(()=>null),we=F.kind==="nest"?F.id:F.nest_id,he=($t=X==null?void 0:X.nests)==null?void 0:$t.find(Je=>Je.id===we),Ee={isOwner:(he==null?void 0:he.is_owner)??!1,isAnonOwned:(he==null?void 0:he.user_id)===uw},et=F.kind==="nest"?F.title:F.nest_name;S(F.kind==="nest"?{page:"nest",nestId:we,nestName:et,...Ee}:{page:"document",nestId:we,nestName:et,nodeId:F.id,...Ee})},[I]),z=f.page==="nest"||f.page==="document"||f.page==="dashboard";y.useEffect(()=>{if(!z){oe(!1);return}const F=X=>{(X.metaKey||X.ctrlKey)&&X.key.toLowerCase()==="k"&&(X.preventDefault(),oe(we=>!we))};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[z]);const[Z,se]=y.useState(!1);y.useEffect(()=>{const F=X=>{if(X.key!=="?"||X.metaKey||X.ctrlKey||X.altKey)return;const we=X.target;we!=null&&we.isContentEditable||(we==null?void 0:we.tagName)==="INPUT"||(we==null?void 0:we.tagName)==="TEXTAREA"||(we==null?void 0:we.tagName)==="SELECT"||(X.preventDefault(),se(!0))};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[]);const ie=y.useCallback(async()=>{Y(!0);try{await w(),A(!1),ac.success("Logged out successfully")}finally{Y(!1)}},[w]),pe=y.useCallback(async()=>{try{const F=await Wv();D(F)}catch{D(null)}finally{G(!1)}},[]);y.useEffect(()=>{if(C.status!=="loading")return;const F=new URLSearchParams(window.location.search),X=C.nestId??Zd();if(!X){_({status:"missing"});return}if(g&&Qy()==="workflows")return;let we=!1;return(async()=>{try{const{nest:he,permission:Ee,roles:et,myStewards:$t}=await I.fetchQuery(Wt.nest(X));if(we)return;const Je=Ee==="owner",Ht=Nf({roles:et??[],permission:Ee,myStewards:$t??[],isOwner:Je,isAdmin:c,readerMode:!!he.reader_mode}).isReaderView;_({status:"ok",nestId:he.id,nestName:he.name});const It=F.get("doc");if(It&&It!=="new"&&Ht){S({page:"nest",nestId:he.id,nestName:he.name,isOwner:Je,isAnonOwned:!1,readerMode:Ht,readerDoc:It});return}if(It&&It!=="new"){S({page:"document",nestId:he.id,nestName:he.name,nodeId:It,isOwner:Je,isAnonOwned:!1,initialThreadId:F.get("thread")||void 0});return}const Nt=Qy(),sr=fE(Nt),pn=sr?sr.visible&&!sr.visible({isReadOnly:!1,isReaderView:!1,canEditDocs:!0,workflowPlaneEnabled:d})?null:sr.viewPage:Nt==="trace"?"nest-trace":null;if(pn&&Ld(pn,Ht)){S({page:"nest",nestId:he.id,nestName:he.name,isOwner:Je,isAnonOwned:!1,readerMode:Ht});return}if(pn){S({page:pn,nestId:he.id,nestName:he.name,isOwner:Je,isAnonOwned:!1,readerMode:Ht});return}S({page:"nest",nestId:he.id,nestName:he.name,isOwner:Je,isAnonOwned:!1,readerMode:Ht,tab:nI.includes(F.get("tab")??"")?F.get("tab"):void 0})}catch{we||_({status:"unreachable",nestId:X})}})(),()=>{we=!0}},[C.status,d,g]),y.useEffect(()=>{var Je;if(typeof window>"u"||C.status==="loading")return;const F=new URLSearchParams(window.location.search);F.delete("nest");let X=null,we=null;f.page==="document"?(X=f.nestId,f.nodeId&&f.nodeId!=="new"?F.set("doc",f.nodeId):F.delete("doc"),f.initialThreadId?F.set("thread",f.initialThreadId):F.delete("thread"),F.delete("view"),F.delete("tab")):f.page==="nest"?(X=f.nestId,f.readerMode&&f.readerDoc?F.set("doc",f.readerDoc):F.delete("doc"),F.delete("thread"),F.delete("view"),f.tab&&f.tab!=="overview"?F.set("tab",f.tab):F.delete("tab")):f.page==="ontology-graph"||f.page==="workflows"||f.page==="definitions"||f.page==="board"||f.page==="nest-trace"?(X=f.nestId,we=f.page==="nest-trace"?"trace":((Je=ea(f.page))==null?void 0:Je.path)??null,F.delete("doc"),F.delete("thread"),F.delete("tab"),F.delete("view")):(F.delete("doc"),F.delete("thread"),F.delete("view"),F.delete("tab"));const he=F.toString(),et=(f.page==="dashboard"?BE(f.tab):Gy(X,we))+(he?`?${he}`:"")+window.location.hash,$t=window.location.pathname+window.location.search+window.location.hash;et!==$t&&window.history.replaceState({},"",et)},[f,C.status]);const[je,ve]=y.useState(null),me=ec(f)?je??f.readerMode??!1:!1;y.useEffect(()=>{ec(f)&&Ld(f.page,me)&&S({page:"nest",nestId:f.nestId,nestName:f.nestName,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned,readerMode:me})},[f,me]);const We="nestId"in f?f.nestId:null,ft="nestId"in f?f.isOwner:!1,[ot,pt]=y.useState(null);y.useEffect(()=>{if(pt(null),ve(null),!We)return;let F=!1;return I.fetchQuery(Wt.nest(We)).then(X=>{var he;if(F)return;const we=Nf({roles:(X==null?void 0:X.roles)??[],permission:(X==null?void 0:X.permission)??null,myStewards:(X==null?void 0:X.myStewards)??[],isOwner:ft,isAdmin:c,readerMode:!!((he=X==null?void 0:X.nest)!=null&&he.reader_mode)});pt(we.canEditDocs),ve(we.isReaderView)}).catch(()=>{F||(pt(!1),ve(!1))}),()=>{F=!0}},[We,ft,c]),y.useEffect(()=>{f.page==="workflows"&&ot===!1&&S({page:"nest",nestId:f.nestId,nestName:f.nestName,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned})},[f,ot]);const nt=JR(),er=y.useMemo(()=>{var X;const F={label:"Home",go:()=>S({page:"dashboard"})};if(f.page==="dashboard"){const we=zd(f.tab,{isAdmin:c});return nt.length?[F,...nt]:we.id===dc?[{label:we.label}]:[F,{label:we.label}]}if("nestId"in f){const we={label:f.nestName,go:()=>S({page:"nest",nestId:f.nestId,nestName:f.nestName,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned,tab:"overview"})};if(nt.length)return[F,we,...nt];const he=f.page==="nest"?tI[f.tab??"overview"]??"Overview":f.page==="document"?"Document":f.page==="nest-trace"?"Trace":((X=ea(f.page))==null?void 0:X.label)??"";return[F,we,{label:he}]}return f.page==="docs"?[F,{label:"Docs"}]:nt.length?[F,...nt]:[]},[f,S,nt]),wr=y.useMemo(()=>({openNest:(F,X,we,he,Ee)=>S({page:"nest",nestId:F,nestName:X,isOwner:we,isAnonOwned:he,isArchived:Ee}),openReview:(F,X,we)=>S({page:"document",nestId:F,nestName:X,nodeId:we,isOwner:!0,isAnonOwned:!0}),manageKeys:()=>S({page:"dashboard",tab:"api-keys"})}),[S]),nn=y.useCallback(()=>{if(typeof window<"u"&&Zd()){const F=new URLSearchParams(window.location.search);F.delete("nest");const X=F.toString();window.history.replaceState({},"",Gy(null)+(X?`?${X}`:"")+window.location.hash)}!a&&e==="key"&&_({status:"missing"}),S({page:"dashboard"})},[a,e]);y.useEffect(()=>{if(typeof window>"u"||pv)return;const F=new URLSearchParams(window.location.search),X=F.get("sso_error");if(!X)return;pv=!0,F.delete("sso_error");const we=F.toString();window.history.replaceState({},"",window.location.pathname+(we?`?${we}`:"")+window.location.hash);const Ee={not_supported:"One-click sign-in isn't available on this community.",missing_ticket:"The sign-in link was incomplete. Try again from PromptOwl.",invalid_ticket:"The sign-in link is invalid or has expired. Try again from PromptOwl.",bad_audience:"This sign-in link was issued for a different community.",ticket_used:"This sign-in link was already used. Start again from PromptOwl.",rate_limited:"Too many sign-in attempts. Wait a moment and try again.",sign_in_restricted:"Sign-in is restricted on this community. Contact an admin.",service_error:"Something went wrong signing you in. Please try again.",disabled:"Single sign-on is turned off on this server.",not_configured:"Single sign-on isn't fully configured. Contact your admin.",discovery_failed:"Couldn't reach the identity provider. Try again, or contact your admin.",provider_error:"Your identity provider declined the sign-in. Try again.",state_mismatch:"The sign-in attempt expired or didn't match this browser. Try again.",exchange_failed:"Sign-in couldn't be completed with the identity provider. Try again.",invalid_token:"The identity provider returned an invalid sign-in token. Try again.",domain_not_allowed:"Your email domain isn't allowed on this server. Contact your admin.",email_not_verified:"Your identity provider reports your email address as unverified. Verify it with your provider, then try again.",not_invited:"No account exists for your email on this server. Ask your admin for an invite."}[X]??"Sign-in failed. Please try again.";setTimeout(()=>ac.error(Ee),0)},[]),y.useEffect(()=>{pe();const F=setInterval(pe,900*1e3),X=()=>{pe()};return window.addEventListener("auth:unauthorized",X),()=>{clearInterval(F),window.removeEventListener("auth:unauthorized",X)}},[pe]);const Cn=((zr=o==null?void 0:o.me)==null?void 0:zr.email)??null,it=y.useRef(Cn);if(y.useEffect(()=>{if(it.current===Cn)return;const F=it.current!==null;it.current=Cn,F&&x({page:"dashboard"})},[Cn]),v)return u.jsx("div",{className:"min-h-screen flex items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"text-lg font-medium text-destructive",children:v}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Check that the community server is running."})]})});if(g||e===null||T||C.status==="loading")return u.jsx("div",{className:"min-h-screen flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center gap-3 animate-pulse",children:[u.jsx("img",{src:t??Jd,alt:"",className:"h-10 w-10"}),u.jsx("span",{className:"text-sm font-medium",children:"ContextNest"}),u.jsx("span",{className:"text-xs text-muted-foreground",children:"Loading your nests…"})]})});if(R&&!R.valid)return u.jsx(FR,{onActivated:pe});const tr=u.jsxs(u.Fragment,{children:[u.jsx(fi,{open:q,onOpenChange:F=>{!F&&!M&&A(!1)},children:u.jsxs(io,{className:"sm:max-w-[400px]",children:[u.jsxs(ao,{children:[u.jsxs(lo,{className:"flex items-center gap-2",children:[u.jsx(Mv,{className:"h-4 w-4 text-muted-foreground"}),"Log out?"]}),u.jsx(co,{children:"You'll be signed out of this browser. Any unsaved edits in other tabs may be lost — save your work first."})]}),u.jsxs(jp,{className:"gap-2",children:[u.jsx(Qe,{variant:"outline",onClick:()=>A(!1),disabled:M,children:"Cancel"}),u.jsx(Qe,{variant:"destructive",onClick:ie,disabled:M,children:M?"Logging out...":"Log out"})]})]})}),W&&z&&u.jsx(BR,{nestId:f.page==="nest"||f.page==="document"?f.nestId:void 0,nestName:f.page==="nest"||f.page==="document"?f.nestName:void 0,onClose:()=>oe(!1),onSelect:(F,X)=>{if(oe(!1),(f.page==="nest"||f.page==="document")&&X.kind==="node"&&(X.nest_id??f.nestId)===f.nestId){S({page:"document",nestId:f.nestId,nestName:f.nestName,nodeId:F,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned});return}O(X)}}),Z&&u.jsx(HR,{onClose:()=>se(!1)})]});if(!a&&e==="key"&&C.status!=="ok")return u.jsxs(u.Fragment,{children:[u.jsx(aN,{}),tr]});const nr=f.page==="document",ht="nestId"in f&&je!==!0||f.page==="dashboard"||f.page==="docs",xr=ht&&(!ge||fe),mo=f.page==="board"?"max-w-[1800px]":"max-w-6xl",Nn=ht?"w-full max-w-none":`${mo} mx-auto`;return u.jsxs("div",{className:ht?"flex min-h-screen items-stretch bg-background":"min-h-screen bg-background",children:[ht&&u.jsxs(u.Fragment,{children:[ht&&fe&&u.jsx("button",{type:"button",className:"fixed inset-0 z-40 bg-black/30 md:hidden","aria-label":"Close sidebar",onClick:()=>J(!1)}),xr&&(()=>{var we,he;const F=f,X=Ee=>"nestId"in Ee?Ee:null;return u.jsx("div",{className:fe?"fixed inset-y-0 left-0 z-50 w-72 max-w-[85vw] border-r bg-background shadow-xl md:static md:z-auto md:w-64 md:max-w-none md:shadow-none":"hidden w-64 shrink-0 border-r md:block",children:u.jsx("div",{className:"sticky top-0 h-screen max-h-screen",children:u.jsx(XP,{logoUrl:t??Jd,nestId:((we=X(F))==null?void 0:we.nestId)??null,nodeId:F.page==="document"?F.nodeId:null,activeView:F.page==="nest"?F.tab==="review"?"review":"overview":((he=ea(F.page))==null?void 0:he.id)??null,onCollapse:()=>fe?J(!1):ce(!0),onOpenDashboard:()=>S({page:"dashboard"}),dashboardTab:F.page==="dashboard"?zd(F.tab,{isAdmin:c}).id:null,onOpenDashboardTab:Ee=>S({page:"dashboard",tab:Ee}),onOpenNest:Ee=>S({page:"nest",nestId:Ee.nestId,nestName:Ee.nestName,isOwner:Ee.isOwner,isAnonOwned:Ee.isAnonOwned,tab:"documents"}),onOpenView:(Ee,et)=>S({page:et.page,nestId:Ee.nestId,nestName:Ee.nestName,isOwner:Ee.isOwner,isAnonOwned:Ee.isAnonOwned,readerMode:me,...et.page==="nest"&&et.tab?{tab:et.tab}:{}}),onConnect:()=>K(!0),onOpenDocument:Ee=>{F.page==="document"&&Ee.nestId===F.nestId&&Ee.nodeId===F.nodeId||S({page:"document",nestId:Ee.nestId,nestName:Ee.nestName,nodeId:Ee.nodeId,isOwner:Ee.isOwner,isAnonOwned:Ee.isAnonOwned})},onNewDocument:!("nestId"in F)||F.page==="document"&&F.nodeId==="new"?void 0:Ee=>S({page:"document",nestId:F.nestId,nestName:F.nestName,nodeId:"new",isOwner:F.isOwner,isAnonOwned:F.isAnonOwned,initialFolder:Ee})})})})})()]}),u.jsxs("div",{className:ht?"flex min-w-0 flex-1 flex-col":"",children:[u.jsxs("header",{className:"contents",children:[u.jsx("div",{className:"sticky top-0 z-40 border-b border-border bg-card",children:u.jsxs("div",{className:`${Nn} h-16 px-4 flex items-center justify-between`,children:[u.jsxs("div",{className:"flex items-center gap-1",children:[ht&&u.jsx(Qe,{variant:"ghost",size:"icon",className:`h-8 w-8 shrink-0${xr?" md:hidden":""}`,title:"Show sidebar","aria-label":"Show sidebar","data-testid":"nest-sidebar-expand",onClick:()=>{window.matchMedia("(max-width: 767px)").matches?J(!0):ce(!1)},children:u.jsx(C_,{className:"h-4 w-4"})}),u.jsxs("button",{onClick:()=>S({page:"dashboard"}),className:`flex items-center gap-2 hover:opacity-80${xr?" md:hidden":""}`,children:[u.jsx("img",{src:t??Jd,alt:"ContextNest",className:"h-7 w-7 object-contain"}),u.jsx("span",{className:"font-semibold",children:"ContextNest"}),u.jsx(bp,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:"Community"})]}),ht&&er.length>0&&u.jsx("nav",{"aria-label":"Breadcrumb",className:"ml-1 flex min-w-0 items-center gap-1 text-sm","data-testid":"header-breadcrumb",children:er.map((F,X)=>{const we=X===er.length-1;return u.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[X>0&&u.jsx(Ca,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60","aria-hidden":!0}),we||!F.go?u.jsx("span",{className:we?"truncate text-base font-semibold":"truncate text-muted-foreground","aria-current":we?"page":void 0,children:F.label}):u.jsx("button",{type:"button",onClick:F.go,className:"truncate text-muted-foreground hover:text-foreground",children:F.label})]},X)})})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[z&&u.jsxs("button",{onClick:()=>oe(!0),title:f.page==="dashboard"?"Search nests and documents (⌘K)":"Search this nest (⌘K)",className:"flex items-center gap-2 h-8 pl-2.5 pr-2 rounded-md border border-input bg-background text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","data-testid":"global-search-trigger",children:[u.jsx(tp,{className:"h-3.5 w-3.5"}),u.jsx("span",{children:"Search"}),u.jsx("kbd",{className:"ml-1 hidden sm:inline text-[10px] font-mono bg-muted text-muted-foreground px-1 py-0.5 rounded border border-border",children:"⌘K"})]}),e==="open"&&!(o!=null&&o.me)&&u.jsxs("span",{className:"hidden md:inline-flex items-center gap-1.5 text-xs text-amber-700 bg-amber-50 border border-amber-200 px-2 py-1 rounded",children:[u.jsx(qg,{className:"h-3 w-3"}),"Open mode"]}),e==="key"&&!a&&u.jsxs("span",{className:"hidden md:inline-flex items-center gap-1.5 text-xs text-blue-700 bg-blue-50 border border-blue-200 px-2 py-1 rounded",children:[u.jsx(qg,{className:"h-3 w-3"}),"Public read-only"]}),f.page!=="docs"&&u.jsxs(Qe,{variant:"ghost",size:"sm",onClick:()=>S({page:"docs"}),title:"API, MCP & CLI docs for agents",children:[u.jsx(Ov,{className:"h-3.5 w-3.5 mr-1"}),"Docs"]}),o!=null&&o.me?u.jsx(sI,{me:o.me,isAdmin:c,onShortcuts:()=>se(!0),onAccount:()=>S({page:"dashboard",tab:"account"}),onLogout:Q}):u.jsxs(Qe,{variant:"outline",size:"sm",onClick:()=>k(!0),children:[u.jsx(Nc,{className:"h-3.5 w-3.5 mr-1"}),"Login"]})]})]})}),ec(f)&&!me&&u.jsx("div",{className:`${Nn} px-4 py-2 overflow-x-auto flex items-center gap-2${xr?" md:hidden":""}`,children:u.jsx(l0,{value:f.page,onValueChange:F=>S({page:F,nestId:f.nestId,nestName:f.nestName,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned,readerMode:me,isArchived:f.isArchived}),children:u.jsx(Mp,{children:Ub.filter(F=>{const X=ea(F.page);return!(X!=null&&X.visible)||X.visible({isReadOnly:ot===!1,isReaderView:!!me,canEditDocs:ot===!0,workflowPlaneEnabled:d})}).filter(F=>!me||!dw(F.page)).map(F=>{const X=F.icon;return u.jsxs(Us,{value:F.page,className:"gap-1.5",children:[u.jsx(X,{className:"h-3.5 w-3.5"}),F.label,F.beta&&u.jsx(YR,{})]},F.page)})})})})]}),u.jsx("main",{className:`${Nn} min-w-0 overflow-x-clip${ht?"":" px-4 py-4"}`,children:C.status==="unreachable"?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"text-lg font-medium",children:"This nest doesn't exist or you don't have access."}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"It may have been deleted, the link may be out of date, or the request may simply have failed."}),u.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2",children:[u.jsx(Qe,{variant:"outline",onClick:()=>_({status:"loading",nestId:C.nestId}),children:"Try again"}),u.jsx(Qe,{onClick:()=>_({status:"missing"}),children:"Back to dashboard"})]})]}):u.jsx("div",{className:ht&&!nr?"px-8 py-6":"",children:u.jsxs(y.Suspense,{fallback:u.jsx("div",{className:"py-12 text-center text-muted-foreground",children:"Loading..."}),children:[f.page==="dashboard"&&(()=>{const F=zd(f.tab,{isAdmin:c}).Component;return u.jsx(GR,{value:wr,children:u.jsx(y.Suspense,{fallback:u.jsx("div",{className:"py-12 text-center text-muted-foreground",children:"Loading..."}),children:u.jsx(F,{})})})})(),f.page==="nest"&&u.jsx(J$,{nestId:f.nestId,nestName:f.nestName,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned,isArchived:f.isArchived,initialSearch:f.initialSearch,initialTags:f.initialTags,initialFolder:f.initialFolder,initialTab:f.tab,initialDoc:f.readerDoc??null,onReaderDocChange:F=>S({...f,readerDoc:F??void 0}),onManageKeys:()=>S({page:"dashboard",tab:"api-keys"}),onTabChange:F=>S({...f,tab:F}),onBack:nn,onOpenDocument:(F,X)=>S({page:"document",nestId:f.nestId,nestName:f.nestName,nodeId:F,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned,initialFolder:X==null?void 0:X.folder,initialThreadId:X==null?void 0:X.thread}),onOpenTrace:()=>S({page:"nest-trace",nestId:f.nestId,nestName:f.nestName,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned})}),f.page==="nest-trace"&&u.jsx(eI,{nestId:f.nestId,onBack:()=>S({page:"nest",nestId:f.nestId,nestName:f.nestName,isOwner:f.isOwner,isAnonOwned:f.isAnonOwned})}),f.page==="document"&&(()=>{const F=f,X=he=>S({page:"document",...he}),we=he=>S({page:"nest",nestId:F.nestId,nestName:F.nestName,isOwner:F.isOwner,isAnonOwned:F.isAnonOwned,...he});return u.jsx(Y$,{sidebarCollapsed:ge,onToggleSidebar:()=>{window.matchMedia("(max-width: 767px)").matches?J(!0):ce(!1)},nestId:F.nestId,nestName:F.nestName,nodeId:F.nodeId,initialFolder:F.initialFolder,initialThreadId:F.initialThreadId,isOwner:F.isOwner,breadcrumb:F.breadcrumb,onBack:()=>{const he=F.breadcrumb??[];if(he.length>0){const Ee=he[he.length-1];X({...Ee,breadcrumb:he.slice(0,-1)});return}we({tab:"documents"})},onJumpBreadcrumb:he=>{const Ee=F.breadcrumb??[],et=Ee[he];et&&X({...et,breadcrumb:Ee.slice(0,he)})},onSaved:()=>we(),onNavigateDocument:(he,Ee,et)=>{const $t=F.breadcrumb??[],Je=he===F.nestId;if(he===F.nestId&&Ee===F.nodeId)return;const Ht=$t.findIndex(Nt=>Nt.nestId===he&&Nt.nodeId===Ee);if(Ht!==-1){X({nestId:he,nestName:Je?F.nestName:"Document",nodeId:Ee,isOwner:Je?F.isOwner:!1,isAnonOwned:Je?F.isAnonOwned:!1,breadcrumb:$t.slice(0,Ht)});return}const It=F.nodeId!=="new"?[...$t,{nestId:F.nestId,nestName:F.nestName,nodeId:F.nodeId,title:(et==null?void 0:et.trim())||"Untitled",isOwner:F.isOwner,isAnonOwned:F.isAnonOwned}]:$t;X({nestId:he,nestName:Je?F.nestName:"Document",nodeId:Ee,isOwner:Je?F.isOwner:!1,isAnonOwned:Je?F.isAnonOwned:!1,breadcrumb:It})},onTagClick:he=>we({initialTags:[he]}),onOpenNest:()=>we(),onOpenFolder:he=>we({initialFolder:he}),onCreateDocument:(he,Ee)=>X({nestId:he,nestName:F.nestName,nodeId:"new",isOwner:F.isOwner,isAnonOwned:F.isAnonOwned,initialTitle:Ee}),initialTitle:F.initialTitle},`${F.nestId}/${F.nodeId}/${F.initialFolder??""}`)})(),ec(f)&&f.page!=="nest"&&(()=>{const F=ea(f.page);if(!F||Ld(f.page,me))return null;const X=f,we={nestId:X.nestId,nestName:X.nestName,isOwner:X.isOwner,isAnonOwned:X.isAnonOwned,isArchived:X.isArchived,openDocument:he=>S({page:"document",nestId:X.nestId,nestName:X.nestName,nodeId:he,isOwner:X.isOwner,isAnonOwned:X.isAnonOwned}),openNest:he=>S({page:"nest",nestId:X.nestId,nestName:X.nestName,isOwner:X.isOwner,isAnonOwned:X.isAnonOwned,...he!=null&&he.tags?{initialTags:he.tags}:{}}),leaveNest:nn};return u.jsx(QR,{value:we,children:u.jsx(y.Suspense,{fallback:u.jsx("div",{className:"py-12 text-center text-muted-foreground",children:"Loading..."}),children:u.jsx(F.Component,{})})})})(),f.page==="docs"&&u.jsx(X$,{onOpenGuide:()=>S({page:"dashboard",tab:"guide"})})]})})}),f.page!=="document"&&u.jsxs("footer",{className:`${Nn} px-4 py-4 text-xs text-muted-foreground text-center`,children:["ContextNest Community",r?` v${r}`:""]})]}),re&&"nestId"in f&&u.jsx(IR,{isOpen:!0,onClose:()=>K(!1),nestId:f.nestId,nestName:f.nestName,onManageKeys:()=>{K(!1),S({page:"dashboard",tab:"api-keys"})}}),N&&u.jsx(zR,{existingAdmin:((rr=o==null?void 0:o.admin)==null?void 0:rr.email)||null,onClose:()=>k(!1)}),tr]})}function sI({me:e,isAdmin:t,onShortcuts:r,onAccount:o,onLogout:a}){var p;const c=((p=e.name)==null?void 0:p.trim())||e.email,d=c.charAt(0);return u.jsxs(W$,{modal:!1,children:[u.jsx(H$,{asChild:!0,children:u.jsxs(Qe,{variant:"ghost",size:"sm",className:"group h-9 gap-2 px-2","data-testid":"user-menu-trigger",children:[u.jsx(Uf,{className:"h-[1.8rem] w-[1.8rem] rounded-sm shrink-0",children:u.jsx(Vf,{className:"rounded-sm",children:d})}),u.jsx("span",{className:"hidden sm:inline max-w-[140px] truncate text-sm font-medium",children:c}),u.jsx(li,{className:"h-3.5 w-3.5 text-muted-foreground"})]})}),u.jsxs(Fb,{align:"end",className:"min-w-56",children:[u.jsxs("div",{className:"flex items-center gap-2 p-2",children:[u.jsx(Uf,{className:"h-8 w-8 rounded-sm shrink-0",children:u.jsx(Vf,{className:"rounded-sm",children:d})}),u.jsxs("div",{className:"grid gap-0.5 leading-none min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-semibold truncate",children:c}),t&&u.jsxs(bp,{variant:"outline",className:"gap-1 border-blue-200 bg-blue-50 text-blue-700 text-[10px] px-1.5 py-0",children:[u.jsx(Nc,{className:"h-2.5 w-2.5"}),"Admin"]})]}),u.jsx("div",{className:"text-sm text-muted-foreground truncate",children:e.email})]})]}),u.jsx(qf,{}),u.jsxs(ic,{onSelect:o,className:"cursor-pointer","data-testid":"user-menu-account",children:[u.jsx(Iv,{className:"h-3.5 w-3.5 mr-2"}),"Account"]}),u.jsxs(ic,{onSelect:r,className:"cursor-pointer",children:[u.jsx(u_,{className:"h-3.5 w-3.5 mr-2"}),"Keyboard shortcuts"]}),u.jsx(qf,{}),u.jsxs(ic,{onSelect:a,className:"cursor-pointer text-red-600 focus:text-red-700","data-testid":"user-menu-logout",children:[u.jsx(Mv,{className:"h-3.5 w-3.5 mr-2"}),"Logout"]})]})]})}class oI extends y.Component{constructor(){super(...arguments);Rg(this,"state",{error:null,info:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,o){console.error("[ui] render crash:",r,o.componentStack),this.setState({info:o})}render(){const{error:r,info:o}=this.state;return r?u.jsx("div",{className:"min-h-screen flex items-center justify-center p-6",children:u.jsxs("div",{className:"max-w-2xl w-full space-y-4",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-lg font-semibold text-destructive",children:"Something broke while rendering this page"}),u.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"The error below was caught by the app instead of leaving a blank screen. Copy it when reporting the problem."})]}),u.jsx("pre",{className:"text-xs bg-muted rounded-md p-3 overflow-auto max-h-40 whitespace-pre-wrap",children:r.message}),(o==null?void 0:o.componentStack)&&u.jsxs("details",{className:"text-xs",children:[u.jsx("summary",{className:"cursor-pointer text-muted-foreground",children:"Component stack"}),u.jsx("pre",{className:"mt-2 bg-muted rounded-md p-3 overflow-auto max-h-60 whitespace-pre-wrap",children:o.componentStack})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{type:"button",onClick:()=>this.setState({error:null,info:null}),className:"px-3 py-1.5 rounded-md border text-sm hover:bg-muted",children:"Try again"}),u.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"px-3 py-1.5 rounded-md border text-sm hover:bg-muted",children:"Reload"})]})]})}):this.props.children}}function iI({children:e}){const[t]=y.useState(()=>{const r=VN();return HN(r),r});return u.jsx($N,{client:t,children:e})}qS.createRoot(document.getElementById("root")).render(u.jsx(ae.StrictMode,{children:u.jsx(oI,{children:u.jsx(iI,{children:u.jsxs(iN,{children:[u.jsx(ZR,{children:u.jsx(rI,{})}),u.jsx(wk,{richColors:!0,position:"bottom-right"})]})})})}));export{jc as $,Df as A,Qe as B,Cc as C,fi as D,Tv as E,Xf as F,co as G,jp as H,yc as I,fa as J,tc as K,ci as L,VD as M,UD as N,Na as O,Mp as P,Us as Q,Vo as R,Ir as S,l0 as T,Dv as U,Lx as V,qN as W,g4 as X,y4 as Y,B4 as Z,KN as _,Lf as a,JC as a$,P4 as a0,Of as a1,Rk as a2,cI as a3,K_ as a4,BD as a5,z4 as a6,uI as a7,WN as a8,C_ as a9,F4 as aA,BI as aB,nD as aC,Gy as aD,Ov as aE,P_ as aF,Qg as aG,uC as aH,Nf as aI,JN as aJ,C4 as aK,E4 as aL,O4 as aM,Sn as aN,pw as aO,$v as aP,N4 as aQ,_4 as aR,Pv as aS,U4 as aT,FI as aU,UI as aV,qC as aW,qg as aX,ZC as aY,GC as aZ,fC as a_,E_ as aa,L as ab,t_ as ac,Mk as ad,h_ as ae,W$ as af,H$ as ag,li as ah,Fb as ai,Z$ as aj,ic as ak,qf as al,Yf as am,VI as an,j4 as ao,qI as ap,aD as aq,iD as ar,dp as as,sD as at,w4 as au,Jk as av,ui as aw,oD as ax,HI as ay,JI as az,vD as b,W4 as b$,YC as b0,eN as b1,h4 as b2,JD as b3,YD as b4,ZD as b5,o4 as b6,s4 as b7,e4 as b8,XD as b9,Xk as bA,T4 as bB,MI as bC,IR as bD,KI as bE,XI as bF,Jf as bG,St as bH,rD as bI,zI as bJ,LI as bK,QI as bL,ZI as bM,GI as bN,eD as bO,tD as bP,vC as bQ,_c as bR,rA as bS,sA as bT,ae as bU,Nv as bV,tM as bW,eM as bX,XA as bY,uv as bZ,nM as b_,u4 as ba,d4 as bb,XC as bc,la as bd,n4 as be,tN as bf,a4 as bg,l4 as bh,i4 as bi,r4 as bj,KD as bk,QD as bl,GD as bm,qD as bn,p4 as bo,f4 as bp,F_ as bq,l_ as br,Nc as bs,OI as bt,S4 as bu,k4 as bv,tp as bw,Ca as bx,yC as by,vE as bz,Ae as c,Dr as c$,rM as c0,H4 as c1,oM as c2,Zf as c3,Qf as c4,ep as c5,jv as c6,xI as c7,Iv as c8,Uf as c9,uw as cA,RI as cB,II as cC,DI as cD,jI as cE,AI as cF,b4 as cG,TI as cH,iC as cI,LT as cJ,R4 as cK,zT as cL,kt as cM,A4 as cN,Cx as cO,De as cP,Nx as cQ,Ex as cR,FT as cS,_x as cT,Cs as cU,M4 as cV,XT as cW,no as cX,Ze as cY,_s as cZ,$4 as c_,Vf as ca,wI as cb,v4 as cc,L4 as cd,EI as ce,CI as cf,NI as cg,V4 as ch,D_ as ci,Av as cj,YR as ck,x4 as cl,s_ as cm,t4 as cn,WD as co,HD as cp,lD as cq,I4 as cr,PR as cs,D4 as ct,y_ as cu,lI as cv,Tp as cw,$I as cx,m4 as cy,Kg as cz,wD as d,Ea as d0,eR as d1,Tx as d2,Rp as d3,gr as d4,Qn as d5,Y_ as d6,dI as d7,yI as d8,gI as d9,ID as dA,SI as dB,bI as dC,R_ as dD,Ux as dE,ax as dF,Yw as dG,Np as dH,_p as dI,gD as dJ,_D as dK,CD as dL,ND as dM,PI as dN,YI as dO,xD as dP,bD as dQ,SD as dR,kD as dS,ED as dT,OD as dU,PD as dV,vI as da,fI as db,_I as dc,kI as dd,hI as de,mI as df,pI as dg,CM as dh,NM as di,L0 as dj,Cp as dk,kp as dl,EM as dm,OM as dn,zD as dp,DD as dq,nc as dr,FD as ds,LD as dt,AD as du,jD as dv,TD as dw,MD as dx,RD as dy,$D as dz,bp as e,ac as f,yD as g,TC as h,Wt as i,u as j,cD as k,WI as l,dD as m,fD as n,pD as o,hD as p,mD as q,y as r,Le as s,c4 as t,Oc as u,sf as v,uD as w,io as x,ao as y,lo as z};
|