@promptowl/contextnest-community 1.25.0 → 1.27.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 +102 -9
- package/CONFIGURATION.md +604 -117
- package/README.md +3 -2
- package/dist/{chunk-JDAOA5KP.js → chunk-H3W72HN3.js} +67 -14
- package/dist/{chunk-2KHM5C7V.js → chunk-MB52DWWP.js} +13 -15
- package/dist/{chunk-TI7HMP64.js → chunk-NFFUZF2B.js} +23 -2
- package/dist/{chunk-F66VCBLA.js → chunk-O3JEI33N.js} +51 -2
- package/dist/{chunk-7FROMOZM.js → chunk-QMQDWRHN.js} +180 -550
- package/dist/chunk-RXCVXG34.js +523 -0
- package/dist/{chunk-32SZCH36.js → chunk-SE5U4J4T.js} +4 -4
- package/dist/{chunk-KPGNZLZL.js → chunk-VHEMGQ3I.js} +1 -1
- package/dist/{chunk-DTLMBF4W.js → chunk-VRLAP4HB.js} +42 -17
- package/dist/{engine-TER6FDBP.js → engine-HLYQLP5T.js} +3 -2
- package/dist/{external-edit-service-CAGENHDJ.js → external-edit-service-3DFQ4EZZ.js} +4 -3
- package/dist/{grants-service-2OTFS7EH.js → grants-service-WICV4Y2J.js} +2 -2
- package/dist/index.js +1669 -521
- package/dist/invited-user-XEBX6BM4.js +12 -0
- package/dist/{migrations.postgres-23VJJJJX.js → migrations.postgres-HGSQ7IA5.js} +4 -0
- package/dist/{review-service-4G2XUFS6.js → review-service-GB43UQVH.js} +7 -6
- package/dist/{stewardship-service-S22V2JKG.js → stewardship-service-KDBPWRZI.js} +4 -3
- package/dist/{version-service-X4FAG2OZ.js → version-service-JYHFPSYP.js} +8 -3
- package/dist/web3/assets/ActivityTracePage-CkRoyIc-.js +1 -0
- package/dist/web3/assets/AgentDocsPage-BTRXmliv.js +1 -0
- package/dist/web3/assets/CollaboratorManager-CqJIkvs-.js +1 -0
- package/dist/web3/assets/CollaboratorsTab-JcO1P-qm.js +1 -0
- package/dist/web3/assets/DocumentEditor-D1GLeeEP.js +36 -0
- package/dist/web3/assets/DocumentsTab-BAgSxTX1.js +6 -0
- package/dist/web3/assets/ExternalEditsTab-DuuTXZap.js +1 -0
- package/dist/web3/assets/{MarkdownEditor-Dfk5uIE5.js → MarkdownEditor-BELFww9q.js} +130 -135
- package/dist/web3/assets/MarkdownEditor-ndtIx5x0.css +1 -0
- package/dist/web3/assets/NestPageHeader-Bbje2ncY.js +1 -0
- package/dist/web3/assets/NestView-D4OMXPQ7.js +73 -0
- package/dist/web3/assets/OverviewTab-FIDGjR3Q.js +6 -0
- package/dist/web3/assets/PersonCombobox-D52m_jhc.js +1 -0
- package/dist/web3/assets/{ReviewActions-BXDTDPp1.js → ReviewActions-DYqBcWlv.js} +2 -2
- package/dist/web3/assets/ReviewTab-DoxfygOb.js +1 -0
- package/dist/web3/assets/StewardsTab-CFsYjbEn.js +1 -0
- package/dist/web3/assets/SubmitForReviewModal-AW2OLNAE.js +1 -0
- package/dist/web3/assets/{alert-dialog-4SiLKlz8.js → alert-dialog-p-fBLSWx.js} +2 -2
- package/dist/web3/assets/{arrow-left-BAgIocLn.js → arrow-left-CiErCCTG.js} +1 -1
- package/dist/web3/assets/backlinks-DaVSYvhV.js +19 -0
- package/dist/web3/assets/boxes-VWrCCMzW.js +6 -0
- package/dist/web3/assets/{chevron-left-XR4ReJ9Z.js → chevron-left-CsD8gZwL.js} +1 -1
- package/dist/web3/assets/{circle-check-CSkZUEFK.js → circle-check-BBCXd9LI.js} +1 -1
- package/dist/web3/assets/{circle-x-in2o3aHU.js → circle-x-C9LsnORQ.js} +1 -1
- package/dist/web3/assets/{code-xml-pPQgdctI.js → code-xml-BaoV7HiQ.js} +1 -1
- package/dist/web3/assets/{corner-down-right-CuxZWscX.js → corner-down-right-DgiTXrtw.js} +1 -1
- package/dist/web3/assets/count-skeleton-CnEE4uF-.js +1 -0
- package/dist/web3/assets/{earth-CXOcThqn.js → earth-BmMbVt9k.js} +1 -1
- package/dist/web3/assets/{file-exclamation-point-CSphs1VD.js → file-exclamation-point-qJeca9-A.js} +1 -1
- package/dist/web3/assets/{folder-input-BAwK9tFL.js → folder-input-D7R93LJ6.js} +1 -1
- package/dist/web3/assets/index-DNmWTxN7.css +1 -0
- package/dist/web3/assets/index-DvuUIUP6.js +451 -0
- package/dist/web3/assets/{page-CUjuSs5Q.js → page-BJQuaTRW.js} +3 -3
- package/dist/web3/assets/page-Bb8xGOPQ.js +2 -0
- package/dist/web3/assets/page-BtM-qDzr.js +6 -0
- package/dist/web3/assets/page-Bxd0EG25.js +1 -0
- package/dist/web3/assets/page-C3QCO6IR.js +1 -0
- package/dist/web3/assets/page-CfoR0khy.js +6 -0
- package/dist/web3/assets/page-D7Zr5tAI.js +1 -0
- package/dist/web3/assets/page-DATSlHCW.js +6 -0
- package/dist/web3/assets/page-DTjPQizZ.js +45 -0
- package/dist/web3/assets/page-DspptlWr.js +1 -0
- package/dist/web3/assets/{page-xzYqkBUP.js → page-I6vAFJOj.js} +5 -5
- package/dist/web3/assets/page-QxI4Ud2s.js +9 -0
- package/dist/web3/assets/page-YcNNg-dX.js +1 -0
- package/dist/web3/assets/page-kM7eO5Kj.js +1 -0
- package/dist/web3/assets/{page-title-BkqlUA0j.js → page-title-Dn5jANiU.js} +1 -1
- package/dist/web3/assets/{play-B8xE9j5f.js → play-B2k_Ix-L.js} +1 -1
- package/dist/web3/assets/{send-CvAgOUPG.js → send-DPNxv3As.js} +1 -1
- package/dist/web3/assets/{settings-EY4A_DYv.js → settings-DZjq-OQA.js} +1 -1
- package/dist/web3/assets/{share-2-vGmZUl90.js → share-2-C-OnE2ru.js} +1 -1
- package/dist/web3/assets/{tag-Br_y1f00.js → tag-CwJl7FdI.js} +1 -1
- package/dist/web3/assets/{trash-2-B4hRXo-p.js → trash-2-aljmIff4.js} +1 -1
- package/dist/web3/assets/{user-plus-4CTYEkd3.js → user-plus-DPerZexX.js} +1 -1
- package/dist/web3/assets/{zap-BcsKR0ef.js → zap-CHZtiN7P.js} +1 -1
- package/dist/web3/index.html +2 -2
- package/package.json +8 -3
- package/dist/client-D44ZHDTJ.js +0 -11
- package/dist/keys-CTOGAG3W.js +0 -20
- package/dist/web3/assets/ActivityTracePage-D2iIbEph.js +0 -1
- package/dist/web3/assets/AgentDocsPage-Dkhgb1hk.js +0 -1
- package/dist/web3/assets/CollaboratorManager-Bo81D--Q.js +0 -1
- package/dist/web3/assets/CollaboratorsTab-DRCitQuX.js +0 -1
- package/dist/web3/assets/DocumentEditor-DV2WHYbj.js +0 -36
- package/dist/web3/assets/DocumentsTab-BUxBCN8o.js +0 -6
- package/dist/web3/assets/ExternalEditsTab-kIBimZyE.js +0 -1
- package/dist/web3/assets/MarkdownEditor-CsVusP2d.css +0 -1
- package/dist/web3/assets/NestPageHeader-yOK-OIYZ.js +0 -1
- package/dist/web3/assets/NestView-DwIagxwJ.js +0 -68
- package/dist/web3/assets/OverviewTab-DFOFMVyE.js +0 -1
- package/dist/web3/assets/PersonCombobox-D350WlrJ.js +0 -1
- package/dist/web3/assets/ReasonDialog-CN3ECAnQ.js +0 -1
- package/dist/web3/assets/ReviewTab-CZewAYiz.js +0 -1
- package/dist/web3/assets/StewardsTab-AagNWcWS.js +0 -1
- package/dist/web3/assets/SubmitForReviewModal-BOZJxwRN.js +0 -1
- package/dist/web3/assets/backlinks-Cb8Uf8mw.js +0 -24
- package/dist/web3/assets/card-UDyMRcps.js +0 -1
- package/dist/web3/assets/count-skeleton-DBWCDhRy.js +0 -1
- package/dist/web3/assets/dates-BCxbm4_q.js +0 -1
- package/dist/web3/assets/index-A0_ymcqL.js +0 -29
- package/dist/web3/assets/index-B5hLclEq.js +0 -389
- package/dist/web3/assets/index-DrUAtoQM.css +0 -1
- package/dist/web3/assets/page-BHD4beun.js +0 -1
- package/dist/web3/assets/page-BSYUXYmO.js +0 -11
- package/dist/web3/assets/page-BYc2DIux.js +0 -45
- package/dist/web3/assets/page-BfibLg8e.js +0 -1
- package/dist/web3/assets/page-CGe8MtUu.js +0 -9
- package/dist/web3/assets/page-CIgPJmG6.js +0 -2
- package/dist/web3/assets/page-Ck31nx9b.js +0 -1
- package/dist/web3/assets/page-Cpdj_11Y.js +0 -1
- package/dist/web3/assets/page-D0sN3GO6.js +0 -1
- package/dist/web3/assets/page-DEpH91X2.js +0 -1
- package/dist/web3/assets/page-l8-B7CGt.js +0 -1
- package/dist/web3/assets/page-mnSHmk6A.js +0 -6
- package/dist/web3/assets/refresh-cw-CsCtmWwX.js +0 -6
- package/dist/web3/assets/scroll-area-CbcH6yrZ.js +0 -1
- package/dist/web3/assets/scroll-area-dRWncRqa.css +0 -1
- package/dist/web3/assets/select-DrL0mpRN.js +0 -6
- package/dist/web3/assets/triangle-alert-CsYGyfGZ.js +0 -6
- package/dist/web3/assets/x-qxt1WrUi.js +0 -6
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-kM7eO5Kj.js","assets/NestPageHeader-Bbje2ncY.js","assets/arrow-left-CiErCCTG.js","assets/folder-target-CUSWqImF.js","assets/zap-CHZtiN7P.js","assets/page-Bb8xGOPQ.js","assets/trash-2-aljmIff4.js","assets/page-BJQuaTRW.js","assets/tag-CwJl7FdI.js","assets/page-I6vAFJOj.js","assets/MarkdownEditor-BELFww9q.js","assets/MarkdownEditor-ndtIx5x0.css","assets/NestView-D4OMXPQ7.js","assets/chevron-left-CsD8gZwL.js","assets/alert-dialog-p-fBLSWx.js","assets/count-skeleton-CnEE4uF-.js","assets/folder-input-D7R93LJ6.js","assets/PersonCombobox-D52m_jhc.js","assets/user-plus-DPerZexX.js","assets/ReviewActions-DYqBcWlv.js","assets/circle-check-BBCXd9LI.js","assets/circle-x-C9LsnORQ.js","assets/settings-DZjq-OQA.js","assets/play-B2k_Ix-L.js","assets/corner-down-right-DgiTXrtw.js","assets/page-DspptlWr.js","assets/page-title-Dn5jANiU.js","assets/page-CfoR0khy.js","assets/boxes-VWrCCMzW.js","assets/page-DATSlHCW.js","assets/page-Bxd0EG25.js","assets/SubmitForReviewModal-AW2OLNAE.js","assets/send-DPNxv3As.js","assets/page-YcNNg-dX.js","assets/page-DTjPQizZ.js","assets/earth-BmMbVt9k.js","assets/page-QxI4Ud2s.js","assets/page-BtM-qDzr.js","assets/page-D7Zr5tAI.js","assets/page-C3QCO6IR.js","assets/ActivityTracePage-CkRoyIc-.js","assets/client-attribution-BraarYaP.js","assets/DocumentEditor-D1GLeeEP.js","assets/CollaboratorManager-CqJIkvs-.js","assets/share-2-C-OnE2ru.js","assets/backlinks-DaVSYvhV.js","assets/code-xml-BaoV7HiQ.js","assets/file-exclamation-point-qJeca9-A.js","assets/AgentDocsPage-BTRXmliv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var l2=Object.defineProperty;var Dx=e=>{throw TypeError(e)};var u2=(e,t,n)=>t in e?l2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $x=(e,t,n)=>u2(e,typeof t!="symbol"?t+"":t,n),Pp=(e,t,n)=>t.has(e)||Dx("Cannot "+n);var F=(e,t,n)=>(Pp(e,t,"read from private field"),n?n.call(e):t.get(e)),Ie=(e,t,n)=>t.has(e)?Dx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ke=(e,t,n,r)=>(Pp(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ye=(e,t,n)=>(Pp(e,t,"access private method"),n);var ac=(e,t,n,r)=>({set _(i){ke(e,t,i,n)},get _(){return F(e,t,r)}});function c2(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var MH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jp={exports:{}},el={},Rp={exports:{}},et={};/**
|
|
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 zx;function d2(){if(zx)return et;zx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),d=Symbol.iterator;function v(M){return M===null||typeof M!="object"?null:(M=d&&M[d]||M["@@iterator"],typeof M=="function"?M:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function E(M,$,_){this.props=M,this.context=$,this.refs=k,this.updater=_||x}E.prototype.isReactComponent={},E.prototype.setState=function(M,$){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,$,"setState")},E.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=E.prototype;function P(M,$,_){this.props=M,this.context=$,this.refs=k,this.updater=_||x}var R=P.prototype=new C;R.constructor=P,S(R,E.prototype),R.isPureReactComponent=!0;var O=Array.isArray,B=Object.prototype.hasOwnProperty,A={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function I(M,$,_){var ie,K={},ce=null,ae=null;if($!=null)for(ie in $.ref!==void 0&&(ae=$.ref),$.key!==void 0&&(ce=""+$.key),$)B.call($,ie)&&!z.hasOwnProperty(ie)&&(K[ie]=$[ie]);var te=arguments.length-2;if(te===1)K.children=_;else if(1<te){for(var re=Array(te),we=0;we<te;we++)re[we]=arguments[we+2];K.children=re}if(M&&M.defaultProps)for(ie in te=M.defaultProps,te)K[ie]===void 0&&(K[ie]=te[ie]);return{$$typeof:e,type:M,key:ce,ref:ae,props:K,_owner:A.current}}function D(M,$){return{$$typeof:e,type:M.type,key:$,ref:M.ref,props:M.props,_owner:M._owner}}function j(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function H(M){var $={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(_){return $[_]})}var ee=/\/+/g;function le(M,$){return typeof M=="object"&&M!==null&&M.key!=null?H(""+M.key):$.toString(36)}function oe(M,$,_,ie,K){var ce=typeof M;(ce==="undefined"||ce==="boolean")&&(M=null);var ae=!1;if(M===null)ae=!0;else switch(ce){case"string":case"number":ae=!0;break;case"object":switch(M.$$typeof){case e:case t:ae=!0}}if(ae)return ae=M,K=K(ae),M=ie===""?"."+le(ae,0):ie,O(K)?(_="",M!=null&&(_=M.replace(ee,"$&/")+"/"),oe(K,$,_,"",function(we){return we})):K!=null&&(j(K)&&(K=D(K,_+(!K.key||ae&&ae.key===K.key?"":(""+K.key).replace(ee,"$&/")+"/")+M)),$.push(K)),1;if(ae=0,ie=ie===""?".":ie+":",O(M))for(var te=0;te<M.length;te++){ce=M[te];var re=ie+le(ce,te);ae+=oe(ce,$,_,re,K)}else if(re=v(M),typeof re=="function")for(M=re.call(M),te=0;!(ce=M.next()).done;)ce=ce.value,re=ie+le(ce,te++),ae+=oe(ce,$,_,re,K);else if(ce==="object")throw $=String(M),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.");return ae}function G(M,$,_){if(M==null)return M;var ie=[],K=0;return oe(M,ie,"","",function(ce){return $.call(_,ce,K++)}),ie}function X(M){if(M._status===-1){var $=M._result;$=$(),$.then(function(_){(M._status===0||M._status===-1)&&(M._status=1,M._result=_)},function(_){(M._status===0||M._status===-1)&&(M._status=2,M._result=_)}),M._status===-1&&(M._status=0,M._result=$)}if(M._status===1)return M._result.default;throw M._result}var ue={current:null},Z={transition:null},Q={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:Z,ReactCurrentOwner:A};function N(){throw Error("act(...) is not supported in production builds of React.")}return et.Children={map:G,forEach:function(M,$,_){G(M,function(){$.apply(this,arguments)},_)},count:function(M){var $=0;return G(M,function(){$++}),$},toArray:function(M){return G(M,function($){return $})||[]},only:function(M){if(!j(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},et.Component=E,et.Fragment=n,et.Profiler=i,et.PureComponent=P,et.StrictMode=r,et.Suspense=f,et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q,et.act=N,et.cloneElement=function(M,$,_){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ie=S({},M.props),K=M.key,ce=M.ref,ae=M._owner;if($!=null){if($.ref!==void 0&&(ce=$.ref,ae=A.current),$.key!==void 0&&(K=""+$.key),M.type&&M.type.defaultProps)var te=M.type.defaultProps;for(re in $)B.call($,re)&&!z.hasOwnProperty(re)&&(ie[re]=$[re]===void 0&&te!==void 0?te[re]:$[re])}var re=arguments.length-2;if(re===1)ie.children=_;else if(1<re){te=Array(re);for(var we=0;we<re;we++)te[we]=arguments[we+2];ie.children=te}return{$$typeof:e,type:M.type,key:K,ref:ce,props:ie,_owner:ae}},et.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},et.createElement=I,et.createFactory=function(M){var $=I.bind(null,M);return $.type=M,$},et.createRef=function(){return{current:null}},et.forwardRef=function(M){return{$$typeof:u,render:M}},et.isValidElement=j,et.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:X}},et.memo=function(M,$){return{$$typeof:p,type:M,compare:$===void 0?null:$}},et.startTransition=function(M){var $=Z.transition;Z.transition={};try{M()}finally{Z.transition=$}},et.unstable_act=N,et.useCallback=function(M,$){return ue.current.useCallback(M,$)},et.useContext=function(M){return ue.current.useContext(M)},et.useDebugValue=function(){},et.useDeferredValue=function(M){return ue.current.useDeferredValue(M)},et.useEffect=function(M,$){return ue.current.useEffect(M,$)},et.useId=function(){return ue.current.useId()},et.useImperativeHandle=function(M,$,_){return ue.current.useImperativeHandle(M,$,_)},et.useInsertionEffect=function(M,$){return ue.current.useInsertionEffect(M,$)},et.useLayoutEffect=function(M,$){return ue.current.useLayoutEffect(M,$)},et.useMemo=function(M,$){return ue.current.useMemo(M,$)},et.useReducer=function(M,$,_){return ue.current.useReducer(M,$,_)},et.useRef=function(M){return ue.current.useRef(M)},et.useState=function(M){return ue.current.useState(M)},et.useSyncExternalStore=function(M,$,_){return ue.current.useSyncExternalStore(M,$,_)},et.useTransition=function(){return ue.current.useTransition()},et.version="18.3.1",et}var Fx;function ad(){return Fx||(Fx=1,Rp.exports=d2()),Rp.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 Bx;function f2(){if(Bx)return el;Bx=1;var e=ad(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,f,p){var m,d={},v=null,x=null;p!==void 0&&(v=""+p),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(x=f.ref);for(m in f)r.call(f,m)&&!a.hasOwnProperty(m)&&(d[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)d[m]===void 0&&(d[m]=f[m]);return{$$typeof:t,type:u,key:v,ref:x,props:d,_owner:i.current}}return el.Fragment=n,el.jsx=l,el.jsxs=l,el}var Ux;function p2(){return Ux||(Ux=1,jp.exports=f2()),jp.exports}var h=p2(),y=ad();const ve=zl(y),Rm=c2({__proto__:null,default:ve},[y]);var lc={},Op={exports:{}},Rn={},Ap={exports:{}},Ip={};/**
|
|
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 Vx;function h2(){return Vx||(Vx=1,(function(e){function t(Z,Q){var N=Z.length;Z.push(Q);e:for(;0<N;){var M=N-1>>>1,$=Z[M];if(0<i($,Q))Z[M]=Q,Z[N]=$,N=M;else break e}}function n(Z){return Z.length===0?null:Z[0]}function r(Z){if(Z.length===0)return null;var Q=Z[0],N=Z.pop();if(N!==Q){Z[0]=N;e:for(var M=0,$=Z.length,_=$>>>1;M<_;){var ie=2*(M+1)-1,K=Z[ie],ce=ie+1,ae=Z[ce];if(0>i(K,N))ce<$&&0>i(ae,K)?(Z[M]=ae,Z[ce]=N,M=ce):(Z[M]=K,Z[ie]=N,M=ie);else if(ce<$&&0>i(ae,N))Z[M]=ae,Z[ce]=N,M=ce;else break e}}return Q}function i(Z,Q){var N=Z.sortIndex-Q.sortIndex;return N!==0?N:Z.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],p=[],m=1,d=null,v=3,x=!1,S=!1,k=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(Z){for(var Q=n(p);Q!==null;){if(Q.callback===null)r(p);else if(Q.startTime<=Z)r(p),Q.sortIndex=Q.expirationTime,t(f,Q);else break;Q=n(p)}}function O(Z){if(k=!1,R(Z),!S)if(n(f)!==null)S=!0,X(B);else{var Q=n(p);Q!==null&&ue(O,Q.startTime-Z)}}function B(Z,Q){S=!1,k&&(k=!1,C(I),I=-1),x=!0;var N=v;try{for(R(Q),d=n(f);d!==null&&(!(d.expirationTime>Q)||Z&&!H());){var M=d.callback;if(typeof M=="function"){d.callback=null,v=d.priorityLevel;var $=M(d.expirationTime<=Q);Q=e.unstable_now(),typeof $=="function"?d.callback=$:d===n(f)&&r(f),R(Q)}else r(f);d=n(f)}if(d!==null)var _=!0;else{var ie=n(p);ie!==null&&ue(O,ie.startTime-Q),_=!1}return _}finally{d=null,v=N,x=!1}}var A=!1,z=null,I=-1,D=5,j=-1;function H(){return!(e.unstable_now()-j<D)}function ee(){if(z!==null){var Z=e.unstable_now();j=Z;var Q=!0;try{Q=z(!0,Z)}finally{Q?le():(A=!1,z=null)}}else A=!1}var le;if(typeof P=="function")le=function(){P(ee)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,G=oe.port2;oe.port1.onmessage=ee,le=function(){G.postMessage(null)}}else le=function(){E(ee,0)};function X(Z){z=Z,A||(A=!0,le())}function ue(Z,Q){I=E(function(){Z(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(Z){Z.callback=null},e.unstable_continueExecution=function(){S||x||(S=!0,X(B))},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(Z){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var N=v;v=Q;try{return Z()}finally{v=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Z,Q){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var N=v;v=Z;try{return Q()}finally{v=N}},e.unstable_scheduleCallback=function(Z,Q,N){var M=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?M+N:M):N=M,Z){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=N+$,Z={id:m++,callback:Q,priorityLevel:Z,startTime:N,expirationTime:$,sortIndex:-1},N>M?(Z.sortIndex=N,t(p,Z),n(f)===null&&Z===n(p)&&(k?(C(I),I=-1):k=!0,ue(O,N-M))):(Z.sortIndex=$,t(f,Z),S||x||(S=!0,X(B))),Z},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(Z){var Q=v;return function(){var N=v;v=Q;try{return Z.apply(this,arguments)}finally{v=N}}}})(Ip)),Ip}var Hx;function m2(){return Hx||(Hx=1,Ap.exports=h2()),Ap.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 Wx;function g2(){if(Wx)return Rn;Wx=1;var e=ad(),t=m2();function n(o){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+o,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function a(o,s){l(o,s),l(o+"Capture",s)}function l(o,s){for(i[o]=s,o=0;o<s.length;o++)r.add(s[o])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,m={},d={};function v(o){return f.call(d,o)?!0:f.call(m,o)?!1:p.test(o)?d[o]=!0:(m[o]=!0,!1)}function x(o,s,c,g){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return g?!1:c!==null?!c.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function S(o,s,c,g){if(s===null||typeof s>"u"||x(o,s,c,g))return!0;if(g)return!1;if(c!==null)switch(c.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(o,s,c,g,w,b,T){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=g,this.attributeNamespace=w,this.mustUseProperty=c,this.propertyName=o,this.type=s,this.sanitizeURL=b,this.removeEmptyString=T}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){E[o]=new k(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var s=o[0];E[s]=new k(s,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){E[o]=new k(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){E[o]=new k(o,2,!1,o,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(o){E[o]=new k(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){E[o]=new k(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){E[o]=new k(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){E[o]=new k(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){E[o]=new k(o,5,!1,o.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function P(o){return o[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(o){var s=o.replace(C,P);E[s]=new k(s,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var s=o.replace(C,P);E[s]=new k(s,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var s=o.replace(C,P);E[s]=new k(s,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){E[o]=new k(o,1,!1,o.toLowerCase(),null,!1,!1)}),E.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){E[o]=new k(o,1,!1,o.toLowerCase(),null,!0,!0)});function R(o,s,c,g){var w=E.hasOwnProperty(s)?E[s]:null;(w!==null?w.type!==0:g||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(S(s,c,w,g)&&(c=null),g||w===null?v(s)&&(c===null?o.removeAttribute(s):o.setAttribute(s,""+c)):w.mustUseProperty?o[w.propertyName]=c===null?w.type===3?!1:"":c:(s=w.attributeName,g=w.attributeNamespace,c===null?o.removeAttribute(s):(w=w.type,c=w===3||w===4&&c===!0?"":""+c,g?o.setAttributeNS(g,s,c):o.setAttribute(s,c))))}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),A=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),H=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),Z=Symbol.iterator;function Q(o){return o===null||typeof o!="object"?null:(o=Z&&o[Z]||o["@@iterator"],typeof o=="function"?o:null)}var N=Object.assign,M;function $(o){if(M===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
|
|
35
|
+
`+M+o}var _=!1;function ie(o,s){if(!o||_)return"";_=!0;var c=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(se){var g=se}Reflect.construct(o,[],s)}else{try{s.call()}catch(se){g=se}o.call(s.prototype)}else{try{throw Error()}catch(se){g=se}o()}}catch(se){if(se&&g&&typeof se.stack=="string"){for(var w=se.stack.split(`
|
|
36
|
+
`),b=g.stack.split(`
|
|
37
|
+
`),T=w.length-1,L=b.length-1;1<=T&&0<=L&&w[T]!==b[L];)L--;for(;1<=T&&0<=L;T--,L--)if(w[T]!==b[L]){if(T!==1||L!==1)do if(T--,L--,0>L||w[T]!==b[L]){var U=`
|
|
38
|
+
`+w[T].replace(" at new "," at ");return o.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",o.displayName)),U}while(1<=T&&0<=L);break}}}finally{_=!1,Error.prepareStackTrace=c}return(o=o?o.displayName||o.name:"")?$(o):""}function K(o){switch(o.tag){case 5:return $(o.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return o=ie(o.type,!1),o;case 11:return o=ie(o.type.render,!1),o;case 1:return o=ie(o.type,!0),o;default:return""}}function ce(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case z:return"Fragment";case A:return"Portal";case D:return"Profiler";case I:return"StrictMode";case le:return"Suspense";case oe:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case H:return(o.displayName||"Context")+".Consumer";case j:return(o._context.displayName||"Context")+".Provider";case ee:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case G:return s=o.displayName||null,s!==null?s:ce(o.type)||"Memo";case X:s=o._payload,o=o._init;try{return ce(o(s))}catch{}}return null}function ae(o){var s=o.type;switch(o.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 o=s.render,o=o.displayName||o.name||"",s.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(s);case 8:return s===I?"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 te(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function re(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function we(o){var s=re(o)?"checked":"value",c=Object.getOwnPropertyDescriptor(o.constructor.prototype,s),g=""+o[s];if(!o.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var w=c.get,b=c.set;return Object.defineProperty(o,s,{configurable:!0,get:function(){return w.call(this)},set:function(T){g=""+T,b.call(this,T)}}),Object.defineProperty(o,s,{enumerable:c.enumerable}),{getValue:function(){return g},setValue:function(T){g=""+T},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function Ee(o){o._valueTracker||(o._valueTracker=we(o))}function pe(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var c=s.getValue(),g="";return o&&(g=re(o)?o.checked?"true":"false":o.value),o=g,o!==c?(s.setValue(o),!0):!1}function qe(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function ze(o,s){var c=s.checked;return N({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??o._wrapperState.initialChecked})}function zt(o,s){var c=s.defaultValue==null?"":s.defaultValue,g=s.checked!=null?s.checked:s.defaultChecked;c=te(s.value!=null?s.value:c),o._wrapperState={initialChecked:g,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Zt(o,s){s=s.checked,s!=null&&R(o,"checked",s,!1)}function Ct(o,s){Zt(o,s);var c=te(s.value),g=s.type;if(c!=null)g==="number"?(c===0&&o.value===""||o.value!=c)&&(o.value=""+c):o.value!==""+c&&(o.value=""+c);else if(g==="submit"||g==="reset"){o.removeAttribute("value");return}s.hasOwnProperty("value")?dt(o,s.type,c):s.hasOwnProperty("defaultValue")&&dt(o,s.type,te(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(o.defaultChecked=!!s.defaultChecked)}function Bn(o,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var g=s.type;if(!(g!=="submit"&&g!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+o._wrapperState.initialValue,c||s===o.value||(o.value=s),o.defaultValue=s}c=o.name,c!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,c!==""&&(o.name=c)}function dt(o,s,c){(s!=="number"||qe(o.ownerDocument)!==o)&&(c==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+c&&(o.defaultValue=""+c))}var En=Array.isArray;function rr(o,s,c,g){if(o=o.options,s){s={};for(var w=0;w<c.length;w++)s["$"+c[w]]=!0;for(c=0;c<o.length;c++)w=s.hasOwnProperty("$"+o[c].value),o[c].selected!==w&&(o[c].selected=w),w&&g&&(o[c].defaultSelected=!0)}else{for(c=""+te(c),s=null,w=0;w<o.length;w++){if(o[w].value===c){o[w].selected=!0,g&&(o[w].defaultSelected=!0);return}s!==null||o[w].disabled||(s=o[w])}s!==null&&(s.selected=!0)}}function Tt(o,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},s,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function nn(o,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(En(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}o._wrapperState={initialValue:te(c)}}function Dr(o,s){var c=te(s.value),g=te(s.defaultValue);c!=null&&(c=""+c,c!==o.value&&(o.value=c),s.defaultValue==null&&o.defaultValue!==c&&(o.defaultValue=c)),g!=null&&(o.defaultValue=""+g)}function to(o){var s=o.textContent;s===o._wrapperState.initialValue&&s!==""&&s!==null&&(o.value=s)}function de(o){switch(o){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 be(o,s){return o==null||o==="http://www.w3.org/1999/xhtml"?de(s):o==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Oe,Ge=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,g,w){MSApp.execUnsafeLocalFunction(function(){return o(s,c,g,w)})}:o})(function(o,s){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=s;else{for(Oe=Oe||document.createElement("div"),Oe.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Oe.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;s.firstChild;)o.appendChild(s.firstChild)}});function Ze(o,s){if(s){var c=o.firstChild;if(c&&c===o.lastChild&&c.nodeType===3){c.nodeValue=s;return}}o.textContent=s}var gt={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},ft=["Webkit","ms","Moz","O"];Object.keys(gt).forEach(function(o){ft.forEach(function(s){s=s+o.charAt(0).toUpperCase()+o.substring(1),gt[s]=gt[o]})});function rn(o,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||gt.hasOwnProperty(o)&>[o]?(""+s).trim():s+"px"}function Un(o,s){o=o.style;for(var c in s)if(s.hasOwnProperty(c)){var g=c.indexOf("--")===0,w=rn(c,s[c],g);c==="float"&&(c="cssFloat"),g?o.setProperty(c,w):o[c]=w}}var Vn=N({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 Et(o,s){if(s){if(Vn[o]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function W(o,s){if(o.indexOf("-")===-1)return typeof s.is=="string";switch(o){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 fe=null;function Se(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ce=null,Le=null,at=null;function Jt(o){if(o=za(o)){if(typeof Ce!="function")throw Error(n(280));var s=o.stateNode;s&&(s=ku(s),Ce(o.stateNode,o.type,s))}}function Ae(o){Le?at?at.push(o):at=[o]:Le=o}function ot(){if(Le){var o=Le,s=at;if(at=Le=null,Jt(o),s)for(o=0;o<s.length;o++)Jt(s[o])}}function ht(o,s){return o(s)}function Pt(){}var Hn=!1;function wt(o,s,c){if(Hn)return o(s,c);Hn=!0;try{return ht(o,s,c)}finally{Hn=!1,(Le!==null||at!==null)&&(Pt(),ot())}}function Wt(o,s){var c=o.stateNode;if(c===null)return null;var g=ku(c);if(g===null)return null;c=g[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":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var xo=!1;if(u)try{var Xt={};Object.defineProperty(Xt,"passive",{get:function(){xo=!0}}),window.addEventListener("test",Xt,Xt),window.removeEventListener("test",Xt,Xt)}catch{xo=!1}function Wn(o,s,c,g,w,b,T,L,U){var se=Array.prototype.slice.call(arguments,3);try{s.apply(c,se)}catch(me){this.onError(me)}}var wo=!1,or=null,wa=!1,Kd=null,mN={onError:function(o){wo=!0,or=o}};function gN(o,s,c,g,w,b,T,L,U){wo=!1,or=null,Wn.apply(mN,arguments)}function yN(o,s,c,g,w,b,T,L,U){if(gN.apply(this,arguments),wo){if(wo){var se=or;wo=!1,or=null}else throw Error(n(198));wa||(wa=!0,Kd=se)}}function mi(o){var s=o,c=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(c=s.return),o=s.return;while(o)}return s.tag===3?c:null}function sy(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function ay(o){if(mi(o)!==o)throw Error(n(188))}function vN(o){var s=o.alternate;if(!s){if(s=mi(o),s===null)throw Error(n(188));return s!==o?null:o}for(var c=o,g=s;;){var w=c.return;if(w===null)break;var b=w.alternate;if(b===null){if(g=w.return,g!==null){c=g;continue}break}if(w.child===b.child){for(b=w.child;b;){if(b===c)return ay(w),o;if(b===g)return ay(w),s;b=b.sibling}throw Error(n(188))}if(c.return!==g.return)c=w,g=b;else{for(var T=!1,L=w.child;L;){if(L===c){T=!0,c=w,g=b;break}if(L===g){T=!0,g=w,c=b;break}L=L.sibling}if(!T){for(L=b.child;L;){if(L===c){T=!0,c=b,g=w;break}if(L===g){T=!0,g=b,c=w;break}L=L.sibling}if(!T)throw Error(n(189))}}if(c.alternate!==g)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?o:s}function ly(o){return o=vN(o),o!==null?uy(o):null}function uy(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var s=uy(o);if(s!==null)return s;o=o.sibling}return null}var cy=t.unstable_scheduleCallback,dy=t.unstable_cancelCallback,xN=t.unstable_shouldYield,wN=t.unstable_requestPaint,Ot=t.unstable_now,bN=t.unstable_getCurrentPriorityLevel,Gd=t.unstable_ImmediatePriority,fy=t.unstable_UserBlockingPriority,nu=t.unstable_NormalPriority,kN=t.unstable_LowPriority,py=t.unstable_IdlePriority,ru=null,$r=null;function SN(o){if($r&&typeof $r.onCommitFiberRoot=="function")try{$r.onCommitFiberRoot(ru,o,void 0,(o.current.flags&128)===128)}catch{}}var vr=Math.clz32?Math.clz32:_N,CN=Math.log,EN=Math.LN2;function _N(o){return o>>>=0,o===0?32:31-(CN(o)/EN|0)|0}var ou=64,iu=4194304;function ba(o){switch(o&-o){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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function su(o,s){var c=o.pendingLanes;if(c===0)return 0;var g=0,w=o.suspendedLanes,b=o.pingedLanes,T=c&268435455;if(T!==0){var L=T&~w;L!==0?g=ba(L):(b&=T,b!==0&&(g=ba(b)))}else T=c&~w,T!==0?g=ba(T):b!==0&&(g=ba(b));if(g===0)return 0;if(s!==0&&s!==g&&(s&w)===0&&(w=g&-g,b=s&-s,w>=b||w===16&&(b&4194240)!==0))return s;if((g&4)!==0&&(g|=c&16),s=o.entangledLanes,s!==0)for(o=o.entanglements,s&=g;0<s;)c=31-vr(s),w=1<<c,g|=o[c],s&=~w;return g}function NN(o,s){switch(o){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 TN(o,s){for(var c=o.suspendedLanes,g=o.pingedLanes,w=o.expirationTimes,b=o.pendingLanes;0<b;){var T=31-vr(b),L=1<<T,U=w[T];U===-1?((L&c)===0||(L&g)!==0)&&(w[T]=NN(L,s)):U<=s&&(o.expiredLanes|=L),b&=~L}}function Qd(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function hy(){var o=ou;return ou<<=1,(ou&4194240)===0&&(ou=64),o}function Yd(o){for(var s=[],c=0;31>c;c++)s.push(o);return s}function ka(o,s,c){o.pendingLanes|=s,s!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,s=31-vr(s),o[s]=c}function PN(o,s){var c=o.pendingLanes&~s;o.pendingLanes=s,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=s,o.mutableReadLanes&=s,o.entangledLanes&=s,s=o.entanglements;var g=o.eventTimes;for(o=o.expirationTimes;0<c;){var w=31-vr(c),b=1<<w;s[w]=0,g[w]=-1,o[w]=-1,c&=~b}}function Zd(o,s){var c=o.entangledLanes|=s;for(o=o.entanglements;c;){var g=31-vr(c),w=1<<g;w&s|o[g]&s&&(o[g]|=s),c&=~w}}var pt=0;function my(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var gy,Jd,yy,vy,xy,Xd=!1,au=[],bo=null,ko=null,So=null,Sa=new Map,Ca=new Map,Co=[],jN="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 wy(o,s){switch(o){case"focusin":case"focusout":bo=null;break;case"dragenter":case"dragleave":ko=null;break;case"mouseover":case"mouseout":So=null;break;case"pointerover":case"pointerout":Sa.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ca.delete(s.pointerId)}}function Ea(o,s,c,g,w,b){return o===null||o.nativeEvent!==b?(o={blockedOn:s,domEventName:c,eventSystemFlags:g,nativeEvent:b,targetContainers:[w]},s!==null&&(s=za(s),s!==null&&Jd(s)),o):(o.eventSystemFlags|=g,s=o.targetContainers,w!==null&&s.indexOf(w)===-1&&s.push(w),o)}function RN(o,s,c,g,w){switch(s){case"focusin":return bo=Ea(bo,o,s,c,g,w),!0;case"dragenter":return ko=Ea(ko,o,s,c,g,w),!0;case"mouseover":return So=Ea(So,o,s,c,g,w),!0;case"pointerover":var b=w.pointerId;return Sa.set(b,Ea(Sa.get(b)||null,o,s,c,g,w)),!0;case"gotpointercapture":return b=w.pointerId,Ca.set(b,Ea(Ca.get(b)||null,o,s,c,g,w)),!0}return!1}function by(o){var s=gi(o.target);if(s!==null){var c=mi(s);if(c!==null){if(s=c.tag,s===13){if(s=sy(c),s!==null){o.blockedOn=s,xy(o.priority,function(){yy(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){o.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}o.blockedOn=null}function lu(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var c=tf(o.domEventName,o.eventSystemFlags,s[0],o.nativeEvent);if(c===null){c=o.nativeEvent;var g=new c.constructor(c.type,c);fe=g,c.target.dispatchEvent(g),fe=null}else return s=za(c),s!==null&&Jd(s),o.blockedOn=c,!1;s.shift()}return!0}function ky(o,s,c){lu(o)&&c.delete(s)}function ON(){Xd=!1,bo!==null&&lu(bo)&&(bo=null),ko!==null&&lu(ko)&&(ko=null),So!==null&&lu(So)&&(So=null),Sa.forEach(ky),Ca.forEach(ky)}function _a(o,s){o.blockedOn===s&&(o.blockedOn=null,Xd||(Xd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ON)))}function Na(o){function s(w){return _a(w,o)}if(0<au.length){_a(au[0],o);for(var c=1;c<au.length;c++){var g=au[c];g.blockedOn===o&&(g.blockedOn=null)}}for(bo!==null&&_a(bo,o),ko!==null&&_a(ko,o),So!==null&&_a(So,o),Sa.forEach(s),Ca.forEach(s),c=0;c<Co.length;c++)g=Co[c],g.blockedOn===o&&(g.blockedOn=null);for(;0<Co.length&&(c=Co[0],c.blockedOn===null);)by(c),c.blockedOn===null&&Co.shift()}var ss=O.ReactCurrentBatchConfig,uu=!0;function AN(o,s,c,g){var w=pt,b=ss.transition;ss.transition=null;try{pt=1,ef(o,s,c,g)}finally{pt=w,ss.transition=b}}function IN(o,s,c,g){var w=pt,b=ss.transition;ss.transition=null;try{pt=4,ef(o,s,c,g)}finally{pt=w,ss.transition=b}}function ef(o,s,c,g){if(uu){var w=tf(o,s,c,g);if(w===null)xf(o,s,g,cu,c),wy(o,g);else if(RN(w,o,s,c,g))g.stopPropagation();else if(wy(o,g),s&4&&-1<jN.indexOf(o)){for(;w!==null;){var b=za(w);if(b!==null&&gy(b),b=tf(o,s,c,g),b===null&&xf(o,s,g,cu,c),b===w)break;w=b}w!==null&&g.stopPropagation()}else xf(o,s,g,null,c)}}var cu=null;function tf(o,s,c,g){if(cu=null,o=Se(g),o=gi(o),o!==null)if(s=mi(o),s===null)o=null;else if(c=s.tag,c===13){if(o=sy(s),o!==null)return o;o=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null);return cu=o,null}function Sy(o){switch(o){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(bN()){case Gd:return 1;case fy:return 4;case nu:case kN:return 16;case py:return 536870912;default:return 16}default:return 16}}var Eo=null,nf=null,du=null;function Cy(){if(du)return du;var o,s=nf,c=s.length,g,w="value"in Eo?Eo.value:Eo.textContent,b=w.length;for(o=0;o<c&&s[o]===w[o];o++);var T=c-o;for(g=1;g<=T&&s[c-g]===w[b-g];g++);return du=w.slice(o,1<g?1-g:void 0)}function fu(o){var s=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&s===13&&(o=13)):o=s,o===10&&(o=13),32<=o||o===13?o:0}function pu(){return!0}function Ey(){return!1}function qn(o){function s(c,g,w,b,T){this._reactName=c,this._targetInst=w,this.type=g,this.nativeEvent=b,this.target=T,this.currentTarget=null;for(var L in o)o.hasOwnProperty(L)&&(c=o[L],this[L]=c?c(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?pu:Ey,this.isPropagationStopped=Ey,this}return N(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=pu)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=pu)},persist:function(){},isPersistent:pu}),s}var as={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rf=qn(as),Ta=N({},as,{view:0,detail:0}),MN=qn(Ta),of,sf,Pa,hu=N({},Ta,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lf,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Pa&&(Pa&&o.type==="mousemove"?(of=o.screenX-Pa.screenX,sf=o.screenY-Pa.screenY):sf=of=0,Pa=o),of)},movementY:function(o){return"movementY"in o?o.movementY:sf}}),_y=qn(hu),LN=N({},hu,{dataTransfer:0}),DN=qn(LN),$N=N({},Ta,{relatedTarget:0}),af=qn($N),zN=N({},as,{animationName:0,elapsedTime:0,pseudoElement:0}),FN=qn(zN),BN=N({},as,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),UN=qn(BN),VN=N({},as,{data:0}),Ny=qn(VN),HN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WN={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"},qN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KN(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=qN[o])?!!s[o]:!1}function lf(){return KN}var GN=N({},Ta,{key:function(o){if(o.key){var s=HN[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=fu(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?WN[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lf,charCode:function(o){return o.type==="keypress"?fu(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?fu(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),QN=qn(GN),YN=N({},hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ty=qn(YN),ZN=N({},Ta,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lf}),JN=qn(ZN),XN=N({},as,{propertyName:0,elapsedTime:0,pseudoElement:0}),eT=qn(XN),tT=N({},hu,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),nT=qn(tT),rT=[9,13,27,32],uf=u&&"CompositionEvent"in window,ja=null;u&&"documentMode"in document&&(ja=document.documentMode);var oT=u&&"TextEvent"in window&&!ja,Py=u&&(!uf||ja&&8<ja&&11>=ja),jy=" ",Ry=!1;function Oy(o,s){switch(o){case"keyup":return rT.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ay(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var ls=!1;function iT(o,s){switch(o){case"compositionend":return Ay(s);case"keypress":return s.which!==32?null:(Ry=!0,jy);case"textInput":return o=s.data,o===jy&&Ry?null:o;default:return null}}function sT(o,s){if(ls)return o==="compositionend"||!uf&&Oy(o,s)?(o=Cy(),du=nf=Eo=null,ls=!1,o):null;switch(o){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 Py&&s.locale!=="ko"?null:s.data;default:return null}}var aT={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 Iy(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!aT[o.type]:s==="textarea"}function My(o,s,c,g){Ae(g),s=xu(s,"onChange"),0<s.length&&(c=new rf("onChange","change",null,c,g),o.push({event:c,listeners:s}))}var Ra=null,Oa=null;function lT(o){Xy(o,0)}function mu(o){var s=ps(o);if(pe(s))return o}function uT(o,s){if(o==="change")return s}var Ly=!1;if(u){var cf;if(u){var df="oninput"in document;if(!df){var Dy=document.createElement("div");Dy.setAttribute("oninput","return;"),df=typeof Dy.oninput=="function"}cf=df}else cf=!1;Ly=cf&&(!document.documentMode||9<document.documentMode)}function $y(){Ra&&(Ra.detachEvent("onpropertychange",zy),Oa=Ra=null)}function zy(o){if(o.propertyName==="value"&&mu(Oa)){var s=[];My(s,Oa,o,Se(o)),wt(lT,s)}}function cT(o,s,c){o==="focusin"?($y(),Ra=s,Oa=c,Ra.attachEvent("onpropertychange",zy)):o==="focusout"&&$y()}function dT(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return mu(Oa)}function fT(o,s){if(o==="click")return mu(s)}function pT(o,s){if(o==="input"||o==="change")return mu(s)}function hT(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var xr=typeof Object.is=="function"?Object.is:hT;function Aa(o,s){if(xr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var c=Object.keys(o),g=Object.keys(s);if(c.length!==g.length)return!1;for(g=0;g<c.length;g++){var w=c[g];if(!f.call(s,w)||!xr(o[w],s[w]))return!1}return!0}function Fy(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function By(o,s){var c=Fy(o);o=0;for(var g;c;){if(c.nodeType===3){if(g=o+c.textContent.length,o<=s&&g>=s)return{node:c,offset:s-o};o=g}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Fy(c)}}function Uy(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?Uy(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Vy(){for(var o=window,s=qe();s instanceof o.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)o=s.contentWindow;else break;s=qe(o.document)}return s}function ff(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s&&(s==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||s==="textarea"||o.contentEditable==="true")}function mT(o){var s=Vy(),c=o.focusedElem,g=o.selectionRange;if(s!==c&&c&&c.ownerDocument&&Uy(c.ownerDocument.documentElement,c)){if(g!==null&&ff(c)){if(s=g.start,o=g.end,o===void 0&&(o=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(o,c.value.length);else if(o=(s=c.ownerDocument||document)&&s.defaultView||window,o.getSelection){o=o.getSelection();var w=c.textContent.length,b=Math.min(g.start,w);g=g.end===void 0?b:Math.min(g.end,w),!o.extend&&b>g&&(w=g,g=b,b=w),w=By(c,b);var T=By(c,g);w&&T&&(o.rangeCount!==1||o.anchorNode!==w.node||o.anchorOffset!==w.offset||o.focusNode!==T.node||o.focusOffset!==T.offset)&&(s=s.createRange(),s.setStart(w.node,w.offset),o.removeAllRanges(),b>g?(o.addRange(s),o.extend(T.node,T.offset)):(s.setEnd(T.node,T.offset),o.addRange(s)))}}for(s=[],o=c;o=o.parentNode;)o.nodeType===1&&s.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)o=s[c],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var gT=u&&"documentMode"in document&&11>=document.documentMode,us=null,pf=null,Ia=null,hf=!1;function Hy(o,s,c){var g=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;hf||us==null||us!==qe(g)||(g=us,"selectionStart"in g&&ff(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Ia&&Aa(Ia,g)||(Ia=g,g=xu(pf,"onSelect"),0<g.length&&(s=new rf("onSelect","select",null,s,c),o.push({event:s,listeners:g}),s.target=us)))}function gu(o,s){var c={};return c[o.toLowerCase()]=s.toLowerCase(),c["Webkit"+o]="webkit"+s,c["Moz"+o]="moz"+s,c}var cs={animationend:gu("Animation","AnimationEnd"),animationiteration:gu("Animation","AnimationIteration"),animationstart:gu("Animation","AnimationStart"),transitionend:gu("Transition","TransitionEnd")},mf={},Wy={};u&&(Wy=document.createElement("div").style,"AnimationEvent"in window||(delete cs.animationend.animation,delete cs.animationiteration.animation,delete cs.animationstart.animation),"TransitionEvent"in window||delete cs.transitionend.transition);function yu(o){if(mf[o])return mf[o];if(!cs[o])return o;var s=cs[o],c;for(c in s)if(s.hasOwnProperty(c)&&c in Wy)return mf[o]=s[c];return o}var qy=yu("animationend"),Ky=yu("animationiteration"),Gy=yu("animationstart"),Qy=yu("transitionend"),Yy=new Map,Zy="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 _o(o,s){Yy.set(o,s),a(s,[o])}for(var gf=0;gf<Zy.length;gf++){var yf=Zy[gf],yT=yf.toLowerCase(),vT=yf[0].toUpperCase()+yf.slice(1);_o(yT,"on"+vT)}_o(qy,"onAnimationEnd"),_o(Ky,"onAnimationIteration"),_o(Gy,"onAnimationStart"),_o("dblclick","onDoubleClick"),_o("focusin","onFocus"),_o("focusout","onBlur"),_o(Qy,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ma="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(" "),xT=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ma));function Jy(o,s,c){var g=o.type||"unknown-event";o.currentTarget=c,yN(g,s,void 0,o),o.currentTarget=null}function Xy(o,s){s=(s&4)!==0;for(var c=0;c<o.length;c++){var g=o[c],w=g.event;g=g.listeners;e:{var b=void 0;if(s)for(var T=g.length-1;0<=T;T--){var L=g[T],U=L.instance,se=L.currentTarget;if(L=L.listener,U!==b&&w.isPropagationStopped())break e;Jy(w,L,se),b=U}else for(T=0;T<g.length;T++){if(L=g[T],U=L.instance,se=L.currentTarget,L=L.listener,U!==b&&w.isPropagationStopped())break e;Jy(w,L,se),b=U}}}if(wa)throw o=Kd,wa=!1,Kd=null,o}function bt(o,s){var c=s[Ef];c===void 0&&(c=s[Ef]=new Set);var g=o+"__bubble";c.has(g)||(ev(s,o,2,!1),c.add(g))}function vf(o,s,c){var g=0;s&&(g|=4),ev(c,o,g,s)}var vu="_reactListening"+Math.random().toString(36).slice(2);function La(o){if(!o[vu]){o[vu]=!0,r.forEach(function(c){c!=="selectionchange"&&(xT.has(c)||vf(c,!1,o),vf(c,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[vu]||(s[vu]=!0,vf("selectionchange",!1,s))}}function ev(o,s,c,g){switch(Sy(s)){case 1:var w=AN;break;case 4:w=IN;break;default:w=ef}c=w.bind(null,s,c,o),w=void 0,!xo||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(w=!0),g?w!==void 0?o.addEventListener(s,c,{capture:!0,passive:w}):o.addEventListener(s,c,!0):w!==void 0?o.addEventListener(s,c,{passive:w}):o.addEventListener(s,c,!1)}function xf(o,s,c,g,w){var b=g;if((s&1)===0&&(s&2)===0&&g!==null)e:for(;;){if(g===null)return;var T=g.tag;if(T===3||T===4){var L=g.stateNode.containerInfo;if(L===w||L.nodeType===8&&L.parentNode===w)break;if(T===4)for(T=g.return;T!==null;){var U=T.tag;if((U===3||U===4)&&(U=T.stateNode.containerInfo,U===w||U.nodeType===8&&U.parentNode===w))return;T=T.return}for(;L!==null;){if(T=gi(L),T===null)return;if(U=T.tag,U===5||U===6){g=b=T;continue e}L=L.parentNode}}g=g.return}wt(function(){var se=b,me=Se(c),ge=[];e:{var he=Yy.get(o);if(he!==void 0){var _e=rf,je=o;switch(o){case"keypress":if(fu(c)===0)break e;case"keydown":case"keyup":_e=QN;break;case"focusin":je="focus",_e=af;break;case"focusout":je="blur",_e=af;break;case"beforeblur":case"afterblur":_e=af;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_e=_y;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_e=DN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_e=JN;break;case qy:case Ky:case Gy:_e=FN;break;case Qy:_e=eT;break;case"scroll":_e=MN;break;case"wheel":_e=nT;break;case"copy":case"cut":case"paste":_e=UN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_e=Ty}var De=(s&4)!==0,At=!De&&o==="scroll",J=De?he!==null?he+"Capture":null:he;De=[];for(var V=se,ne;V!==null;){ne=V;var xe=ne.stateNode;if(ne.tag===5&&xe!==null&&(ne=xe,J!==null&&(xe=Wt(V,J),xe!=null&&De.push(Da(V,xe,ne)))),At)break;V=V.return}0<De.length&&(he=new _e(he,je,null,c,me),ge.push({event:he,listeners:De}))}}if((s&7)===0){e:{if(he=o==="mouseover"||o==="pointerover",_e=o==="mouseout"||o==="pointerout",he&&c!==fe&&(je=c.relatedTarget||c.fromElement)&&(gi(je)||je[no]))break e;if((_e||he)&&(he=me.window===me?me:(he=me.ownerDocument)?he.defaultView||he.parentWindow:window,_e?(je=c.relatedTarget||c.toElement,_e=se,je=je?gi(je):null,je!==null&&(At=mi(je),je!==At||je.tag!==5&&je.tag!==6)&&(je=null)):(_e=null,je=se),_e!==je)){if(De=_y,xe="onMouseLeave",J="onMouseEnter",V="mouse",(o==="pointerout"||o==="pointerover")&&(De=Ty,xe="onPointerLeave",J="onPointerEnter",V="pointer"),At=_e==null?he:ps(_e),ne=je==null?he:ps(je),he=new De(xe,V+"leave",_e,c,me),he.target=At,he.relatedTarget=ne,xe=null,gi(me)===se&&(De=new De(J,V+"enter",je,c,me),De.target=ne,De.relatedTarget=At,xe=De),At=xe,_e&&je)t:{for(De=_e,J=je,V=0,ne=De;ne;ne=ds(ne))V++;for(ne=0,xe=J;xe;xe=ds(xe))ne++;for(;0<V-ne;)De=ds(De),V--;for(;0<ne-V;)J=ds(J),ne--;for(;V--;){if(De===J||J!==null&&De===J.alternate)break t;De=ds(De),J=ds(J)}De=null}else De=null;_e!==null&&tv(ge,he,_e,De,!1),je!==null&&At!==null&&tv(ge,At,je,De,!0)}}e:{if(he=se?ps(se):window,_e=he.nodeName&&he.nodeName.toLowerCase(),_e==="select"||_e==="input"&&he.type==="file")var $e=uT;else if(Iy(he))if(Ly)$e=pT;else{$e=dT;var Ue=cT}else(_e=he.nodeName)&&_e.toLowerCase()==="input"&&(he.type==="checkbox"||he.type==="radio")&&($e=fT);if($e&&($e=$e(o,se))){My(ge,$e,c,me);break e}Ue&&Ue(o,he,se),o==="focusout"&&(Ue=he._wrapperState)&&Ue.controlled&&he.type==="number"&&dt(he,"number",he.value)}switch(Ue=se?ps(se):window,o){case"focusin":(Iy(Ue)||Ue.contentEditable==="true")&&(us=Ue,pf=se,Ia=null);break;case"focusout":Ia=pf=us=null;break;case"mousedown":hf=!0;break;case"contextmenu":case"mouseup":case"dragend":hf=!1,Hy(ge,c,me);break;case"selectionchange":if(gT)break;case"keydown":case"keyup":Hy(ge,c,me)}var Ve;if(uf)e:{switch(o){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else ls?Oy(o,c)&&(Qe="onCompositionEnd"):o==="keydown"&&c.keyCode===229&&(Qe="onCompositionStart");Qe&&(Py&&c.locale!=="ko"&&(ls||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&ls&&(Ve=Cy()):(Eo=me,nf="value"in Eo?Eo.value:Eo.textContent,ls=!0)),Ue=xu(se,Qe),0<Ue.length&&(Qe=new Ny(Qe,o,null,c,me),ge.push({event:Qe,listeners:Ue}),Ve?Qe.data=Ve:(Ve=Ay(c),Ve!==null&&(Qe.data=Ve)))),(Ve=oT?iT(o,c):sT(o,c))&&(se=xu(se,"onBeforeInput"),0<se.length&&(me=new Ny("onBeforeInput","beforeinput",null,c,me),ge.push({event:me,listeners:se}),me.data=Ve))}Xy(ge,s)})}function Da(o,s,c){return{instance:o,listener:s,currentTarget:c}}function xu(o,s){for(var c=s+"Capture",g=[];o!==null;){var w=o,b=w.stateNode;w.tag===5&&b!==null&&(w=b,b=Wt(o,c),b!=null&&g.unshift(Da(o,b,w)),b=Wt(o,s),b!=null&&g.push(Da(o,b,w))),o=o.return}return g}function ds(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function tv(o,s,c,g,w){for(var b=s._reactName,T=[];c!==null&&c!==g;){var L=c,U=L.alternate,se=L.stateNode;if(U!==null&&U===g)break;L.tag===5&&se!==null&&(L=se,w?(U=Wt(c,b),U!=null&&T.unshift(Da(c,U,L))):w||(U=Wt(c,b),U!=null&&T.push(Da(c,U,L)))),c=c.return}T.length!==0&&o.push({event:s,listeners:T})}var wT=/\r\n?/g,bT=/\u0000|\uFFFD/g;function nv(o){return(typeof o=="string"?o:""+o).replace(wT,`
|
|
39
|
+
`).replace(bT,"")}function wu(o,s,c){if(s=nv(s),nv(o)!==s&&c)throw Error(n(425))}function bu(){}var wf=null,bf=null;function kf(o,s){return o==="textarea"||o==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Sf=typeof setTimeout=="function"?setTimeout:void 0,kT=typeof clearTimeout=="function"?clearTimeout:void 0,rv=typeof Promise=="function"?Promise:void 0,ST=typeof queueMicrotask=="function"?queueMicrotask:typeof rv<"u"?function(o){return rv.resolve(null).then(o).catch(CT)}:Sf;function CT(o){setTimeout(function(){throw o})}function Cf(o,s){var c=s,g=0;do{var w=c.nextSibling;if(o.removeChild(c),w&&w.nodeType===8)if(c=w.data,c==="/$"){if(g===0){o.removeChild(w),Na(s);return}g--}else c!=="$"&&c!=="$?"&&c!=="$!"||g++;c=w}while(c);Na(s)}function No(o){for(;o!=null;o=o.nextSibling){var s=o.nodeType;if(s===1||s===3)break;if(s===8){if(s=o.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return o}function ov(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return o;s--}else c==="/$"&&s++}o=o.previousSibling}return null}var fs=Math.random().toString(36).slice(2),zr="__reactFiber$"+fs,$a="__reactProps$"+fs,no="__reactContainer$"+fs,Ef="__reactEvents$"+fs,ET="__reactListeners$"+fs,_T="__reactHandles$"+fs;function gi(o){var s=o[zr];if(s)return s;for(var c=o.parentNode;c;){if(s=c[no]||c[zr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(o=ov(o);o!==null;){if(c=o[zr])return c;o=ov(o)}return s}o=c,c=o.parentNode}return null}function za(o){return o=o[zr]||o[no],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function ps(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(n(33))}function ku(o){return o[$a]||null}var _f=[],hs=-1;function To(o){return{current:o}}function kt(o){0>hs||(o.current=_f[hs],_f[hs]=null,hs--)}function yt(o,s){hs++,_f[hs]=o.current,o.current=s}var Po={},on=To(Po),_n=To(!1),yi=Po;function ms(o,s){var c=o.type.contextTypes;if(!c)return Po;var g=o.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===s)return g.__reactInternalMemoizedMaskedChildContext;var w={},b;for(b in c)w[b]=s[b];return g&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=s,o.__reactInternalMemoizedMaskedChildContext=w),w}function Nn(o){return o=o.childContextTypes,o!=null}function Su(){kt(_n),kt(on)}function iv(o,s,c){if(on.current!==Po)throw Error(n(168));yt(on,s),yt(_n,c)}function sv(o,s,c){var g=o.stateNode;if(s=s.childContextTypes,typeof g.getChildContext!="function")return c;g=g.getChildContext();for(var w in g)if(!(w in s))throw Error(n(108,ae(o)||"Unknown",w));return N({},c,g)}function Cu(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Po,yi=on.current,yt(on,o),yt(_n,_n.current),!0}function av(o,s,c){var g=o.stateNode;if(!g)throw Error(n(169));c?(o=sv(o,s,yi),g.__reactInternalMemoizedMergedChildContext=o,kt(_n),kt(on),yt(on,o)):kt(_n),yt(_n,c)}var ro=null,Eu=!1,Nf=!1;function lv(o){ro===null?ro=[o]:ro.push(o)}function NT(o){Eu=!0,lv(o)}function jo(){if(!Nf&&ro!==null){Nf=!0;var o=0,s=pt;try{var c=ro;for(pt=1;o<c.length;o++){var g=c[o];do g=g(!0);while(g!==null)}ro=null,Eu=!1}catch(w){throw ro!==null&&(ro=ro.slice(o+1)),cy(Gd,jo),w}finally{pt=s,Nf=!1}}return null}var gs=[],ys=0,_u=null,Nu=0,ir=[],sr=0,vi=null,oo=1,io="";function xi(o,s){gs[ys++]=Nu,gs[ys++]=_u,_u=o,Nu=s}function uv(o,s,c){ir[sr++]=oo,ir[sr++]=io,ir[sr++]=vi,vi=o;var g=oo;o=io;var w=32-vr(g)-1;g&=~(1<<w),c+=1;var b=32-vr(s)+w;if(30<b){var T=w-w%5;b=(g&(1<<T)-1).toString(32),g>>=T,w-=T,oo=1<<32-vr(s)+w|c<<w|g,io=b+o}else oo=1<<b|c<<w|g,io=o}function Tf(o){o.return!==null&&(xi(o,1),uv(o,1,0))}function Pf(o){for(;o===_u;)_u=gs[--ys],gs[ys]=null,Nu=gs[--ys],gs[ys]=null;for(;o===vi;)vi=ir[--sr],ir[sr]=null,io=ir[--sr],ir[sr]=null,oo=ir[--sr],ir[sr]=null}var Kn=null,Gn=null,St=!1,wr=null;function cv(o,s){var c=cr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=o,s=o.deletions,s===null?(o.deletions=[c],o.flags|=16):s.push(c)}function dv(o,s){switch(o.tag){case 5:var c=o.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(o.stateNode=s,Kn=o,Gn=No(s.firstChild),!0):!1;case 6:return s=o.pendingProps===""||s.nodeType!==3?null:s,s!==null?(o.stateNode=s,Kn=o,Gn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=vi!==null?{id:oo,overflow:io}:null,o.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=cr(18,null,null,0),c.stateNode=s,c.return=o,o.child=c,Kn=o,Gn=null,!0):!1;default:return!1}}function jf(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Rf(o){if(St){var s=Gn;if(s){var c=s;if(!dv(o,s)){if(jf(o))throw Error(n(418));s=No(c.nextSibling);var g=Kn;s&&dv(o,s)?cv(g,c):(o.flags=o.flags&-4097|2,St=!1,Kn=o)}}else{if(jf(o))throw Error(n(418));o.flags=o.flags&-4097|2,St=!1,Kn=o}}}function fv(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Kn=o}function Tu(o){if(o!==Kn)return!1;if(!St)return fv(o),St=!0,!1;var s;if((s=o.tag!==3)&&!(s=o.tag!==5)&&(s=o.type,s=s!=="head"&&s!=="body"&&!kf(o.type,o.memoizedProps)),s&&(s=Gn)){if(jf(o))throw pv(),Error(n(418));for(;s;)cv(o,s),s=No(s.nextSibling)}if(fv(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));e:{for(o=o.nextSibling,s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="/$"){if(s===0){Gn=No(o.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}o=o.nextSibling}Gn=null}}else Gn=Kn?No(o.stateNode.nextSibling):null;return!0}function pv(){for(var o=Gn;o;)o=No(o.nextSibling)}function vs(){Gn=Kn=null,St=!1}function Of(o){wr===null?wr=[o]:wr.push(o)}var TT=O.ReactCurrentBatchConfig;function Fa(o,s,c){if(o=c.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var g=c.stateNode}if(!g)throw Error(n(147,o));var w=g,b=""+o;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(T){var L=w.refs;T===null?delete L[b]:L[b]=T},s._stringRef=b,s)}if(typeof o!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,o))}return o}function Pu(o,s){throw o=Object.prototype.toString.call(s),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o))}function hv(o){var s=o._init;return s(o._payload)}function mv(o){function s(J,V){if(o){var ne=J.deletions;ne===null?(J.deletions=[V],J.flags|=16):ne.push(V)}}function c(J,V){if(!o)return null;for(;V!==null;)s(J,V),V=V.sibling;return null}function g(J,V){for(J=new Map;V!==null;)V.key!==null?J.set(V.key,V):J.set(V.index,V),V=V.sibling;return J}function w(J,V){return J=$o(J,V),J.index=0,J.sibling=null,J}function b(J,V,ne){return J.index=ne,o?(ne=J.alternate,ne!==null?(ne=ne.index,ne<V?(J.flags|=2,V):ne):(J.flags|=2,V)):(J.flags|=1048576,V)}function T(J){return o&&J.alternate===null&&(J.flags|=2),J}function L(J,V,ne,xe){return V===null||V.tag!==6?(V=Sp(ne,J.mode,xe),V.return=J,V):(V=w(V,ne),V.return=J,V)}function U(J,V,ne,xe){var $e=ne.type;return $e===z?me(J,V,ne.props.children,xe,ne.key):V!==null&&(V.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===X&&hv($e)===V.type)?(xe=w(V,ne.props),xe.ref=Fa(J,V,ne),xe.return=J,xe):(xe=Xu(ne.type,ne.key,ne.props,null,J.mode,xe),xe.ref=Fa(J,V,ne),xe.return=J,xe)}function se(J,V,ne,xe){return V===null||V.tag!==4||V.stateNode.containerInfo!==ne.containerInfo||V.stateNode.implementation!==ne.implementation?(V=Cp(ne,J.mode,xe),V.return=J,V):(V=w(V,ne.children||[]),V.return=J,V)}function me(J,V,ne,xe,$e){return V===null||V.tag!==7?(V=Ni(ne,J.mode,xe,$e),V.return=J,V):(V=w(V,ne),V.return=J,V)}function ge(J,V,ne){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Sp(""+V,J.mode,ne),V.return=J,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case B:return ne=Xu(V.type,V.key,V.props,null,J.mode,ne),ne.ref=Fa(J,null,V),ne.return=J,ne;case A:return V=Cp(V,J.mode,ne),V.return=J,V;case X:var xe=V._init;return ge(J,xe(V._payload),ne)}if(En(V)||Q(V))return V=Ni(V,J.mode,ne,null),V.return=J,V;Pu(J,V)}return null}function he(J,V,ne,xe){var $e=V!==null?V.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number")return $e!==null?null:L(J,V,""+ne,xe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case B:return ne.key===$e?U(J,V,ne,xe):null;case A:return ne.key===$e?se(J,V,ne,xe):null;case X:return $e=ne._init,he(J,V,$e(ne._payload),xe)}if(En(ne)||Q(ne))return $e!==null?null:me(J,V,ne,xe,null);Pu(J,ne)}return null}function _e(J,V,ne,xe,$e){if(typeof xe=="string"&&xe!==""||typeof xe=="number")return J=J.get(ne)||null,L(V,J,""+xe,$e);if(typeof xe=="object"&&xe!==null){switch(xe.$$typeof){case B:return J=J.get(xe.key===null?ne:xe.key)||null,U(V,J,xe,$e);case A:return J=J.get(xe.key===null?ne:xe.key)||null,se(V,J,xe,$e);case X:var Ue=xe._init;return _e(J,V,ne,Ue(xe._payload),$e)}if(En(xe)||Q(xe))return J=J.get(ne)||null,me(V,J,xe,$e,null);Pu(V,xe)}return null}function je(J,V,ne,xe){for(var $e=null,Ue=null,Ve=V,Qe=V=0,Gt=null;Ve!==null&&Qe<ne.length;Qe++){Ve.index>Qe?(Gt=Ve,Ve=null):Gt=Ve.sibling;var lt=he(J,Ve,ne[Qe],xe);if(lt===null){Ve===null&&(Ve=Gt);break}o&&Ve&<.alternate===null&&s(J,Ve),V=b(lt,V,Qe),Ue===null?$e=lt:Ue.sibling=lt,Ue=lt,Ve=Gt}if(Qe===ne.length)return c(J,Ve),St&&xi(J,Qe),$e;if(Ve===null){for(;Qe<ne.length;Qe++)Ve=ge(J,ne[Qe],xe),Ve!==null&&(V=b(Ve,V,Qe),Ue===null?$e=Ve:Ue.sibling=Ve,Ue=Ve);return St&&xi(J,Qe),$e}for(Ve=g(J,Ve);Qe<ne.length;Qe++)Gt=_e(Ve,J,Qe,ne[Qe],xe),Gt!==null&&(o&&Gt.alternate!==null&&Ve.delete(Gt.key===null?Qe:Gt.key),V=b(Gt,V,Qe),Ue===null?$e=Gt:Ue.sibling=Gt,Ue=Gt);return o&&Ve.forEach(function(zo){return s(J,zo)}),St&&xi(J,Qe),$e}function De(J,V,ne,xe){var $e=Q(ne);if(typeof $e!="function")throw Error(n(150));if(ne=$e.call(ne),ne==null)throw Error(n(151));for(var Ue=$e=null,Ve=V,Qe=V=0,Gt=null,lt=ne.next();Ve!==null&&!lt.done;Qe++,lt=ne.next()){Ve.index>Qe?(Gt=Ve,Ve=null):Gt=Ve.sibling;var zo=he(J,Ve,lt.value,xe);if(zo===null){Ve===null&&(Ve=Gt);break}o&&Ve&&zo.alternate===null&&s(J,Ve),V=b(zo,V,Qe),Ue===null?$e=zo:Ue.sibling=zo,Ue=zo,Ve=Gt}if(lt.done)return c(J,Ve),St&&xi(J,Qe),$e;if(Ve===null){for(;!lt.done;Qe++,lt=ne.next())lt=ge(J,lt.value,xe),lt!==null&&(V=b(lt,V,Qe),Ue===null?$e=lt:Ue.sibling=lt,Ue=lt);return St&&xi(J,Qe),$e}for(Ve=g(J,Ve);!lt.done;Qe++,lt=ne.next())lt=_e(Ve,J,Qe,lt.value,xe),lt!==null&&(o&<.alternate!==null&&Ve.delete(lt.key===null?Qe:lt.key),V=b(lt,V,Qe),Ue===null?$e=lt:Ue.sibling=lt,Ue=lt);return o&&Ve.forEach(function(a2){return s(J,a2)}),St&&xi(J,Qe),$e}function At(J,V,ne,xe){if(typeof ne=="object"&&ne!==null&&ne.type===z&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case B:e:{for(var $e=ne.key,Ue=V;Ue!==null;){if(Ue.key===$e){if($e=ne.type,$e===z){if(Ue.tag===7){c(J,Ue.sibling),V=w(Ue,ne.props.children),V.return=J,J=V;break e}}else if(Ue.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===X&&hv($e)===Ue.type){c(J,Ue.sibling),V=w(Ue,ne.props),V.ref=Fa(J,Ue,ne),V.return=J,J=V;break e}c(J,Ue);break}else s(J,Ue);Ue=Ue.sibling}ne.type===z?(V=Ni(ne.props.children,J.mode,xe,ne.key),V.return=J,J=V):(xe=Xu(ne.type,ne.key,ne.props,null,J.mode,xe),xe.ref=Fa(J,V,ne),xe.return=J,J=xe)}return T(J);case A:e:{for(Ue=ne.key;V!==null;){if(V.key===Ue)if(V.tag===4&&V.stateNode.containerInfo===ne.containerInfo&&V.stateNode.implementation===ne.implementation){c(J,V.sibling),V=w(V,ne.children||[]),V.return=J,J=V;break e}else{c(J,V);break}else s(J,V);V=V.sibling}V=Cp(ne,J.mode,xe),V.return=J,J=V}return T(J);case X:return Ue=ne._init,At(J,V,Ue(ne._payload),xe)}if(En(ne))return je(J,V,ne,xe);if(Q(ne))return De(J,V,ne,xe);Pu(J,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"?(ne=""+ne,V!==null&&V.tag===6?(c(J,V.sibling),V=w(V,ne),V.return=J,J=V):(c(J,V),V=Sp(ne,J.mode,xe),V.return=J,J=V),T(J)):c(J,V)}return At}var xs=mv(!0),gv=mv(!1),ju=To(null),Ru=null,ws=null,Af=null;function If(){Af=ws=Ru=null}function Mf(o){var s=ju.current;kt(ju),o._currentValue=s}function Lf(o,s,c){for(;o!==null;){var g=o.alternate;if((o.childLanes&s)!==s?(o.childLanes|=s,g!==null&&(g.childLanes|=s)):g!==null&&(g.childLanes&s)!==s&&(g.childLanes|=s),o===c)break;o=o.return}}function bs(o,s){Ru=o,Af=ws=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&s)!==0&&(Tn=!0),o.firstContext=null)}function ar(o){var s=o._currentValue;if(Af!==o)if(o={context:o,memoizedValue:s,next:null},ws===null){if(Ru===null)throw Error(n(308));ws=o,Ru.dependencies={lanes:0,firstContext:o}}else ws=ws.next=o;return s}var wi=null;function Df(o){wi===null?wi=[o]:wi.push(o)}function yv(o,s,c,g){var w=s.interleaved;return w===null?(c.next=c,Df(s)):(c.next=w.next,w.next=c),s.interleaved=c,so(o,g)}function so(o,s){o.lanes|=s;var c=o.alternate;for(c!==null&&(c.lanes|=s),c=o,o=o.return;o!==null;)o.childLanes|=s,c=o.alternate,c!==null&&(c.childLanes|=s),c=o,o=o.return;return c.tag===3?c.stateNode:null}var Ro=!1;function $f(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vv(o,s){o=o.updateQueue,s.updateQueue===o&&(s.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function ao(o,s){return{eventTime:o,lane:s,tag:0,payload:null,callback:null,next:null}}function Oo(o,s,c){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(st&2)!==0){var w=g.pending;return w===null?s.next=s:(s.next=w.next,w.next=s),g.pending=s,so(o,c)}return w=g.interleaved,w===null?(s.next=s,Df(g)):(s.next=w.next,w.next=s),g.interleaved=s,so(o,c)}function Ou(o,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var g=s.lanes;g&=o.pendingLanes,c|=g,s.lanes=c,Zd(o,c)}}function xv(o,s){var c=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,c===g)){var w=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var T={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?w=b=T:b=b.next=T,c=c.next}while(c!==null);b===null?w=b=s:b=b.next=s}else w=b=s;c={baseState:g.baseState,firstBaseUpdate:w,lastBaseUpdate:b,shared:g.shared,effects:g.effects},o.updateQueue=c;return}o=c.lastBaseUpdate,o===null?c.firstBaseUpdate=s:o.next=s,c.lastBaseUpdate=s}function Au(o,s,c,g){var w=o.updateQueue;Ro=!1;var b=w.firstBaseUpdate,T=w.lastBaseUpdate,L=w.shared.pending;if(L!==null){w.shared.pending=null;var U=L,se=U.next;U.next=null,T===null?b=se:T.next=se,T=U;var me=o.alternate;me!==null&&(me=me.updateQueue,L=me.lastBaseUpdate,L!==T&&(L===null?me.firstBaseUpdate=se:L.next=se,me.lastBaseUpdate=U))}if(b!==null){var ge=w.baseState;T=0,me=se=U=null,L=b;do{var he=L.lane,_e=L.eventTime;if((g&he)===he){me!==null&&(me=me.next={eventTime:_e,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var je=o,De=L;switch(he=s,_e=c,De.tag){case 1:if(je=De.payload,typeof je=="function"){ge=je.call(_e,ge,he);break e}ge=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=De.payload,he=typeof je=="function"?je.call(_e,ge,he):je,he==null)break e;ge=N({},ge,he);break e;case 2:Ro=!0}}L.callback!==null&&L.lane!==0&&(o.flags|=64,he=w.effects,he===null?w.effects=[L]:he.push(L))}else _e={eventTime:_e,lane:he,tag:L.tag,payload:L.payload,callback:L.callback,next:null},me===null?(se=me=_e,U=ge):me=me.next=_e,T|=he;if(L=L.next,L===null){if(L=w.shared.pending,L===null)break;he=L,L=he.next,he.next=null,w.lastBaseUpdate=he,w.shared.pending=null}}while(!0);if(me===null&&(U=ge),w.baseState=U,w.firstBaseUpdate=se,w.lastBaseUpdate=me,s=w.shared.interleaved,s!==null){w=s;do T|=w.lane,w=w.next;while(w!==s)}else b===null&&(w.shared.lanes=0);Si|=T,o.lanes=T,o.memoizedState=ge}}function wv(o,s,c){if(o=s.effects,s.effects=null,o!==null)for(s=0;s<o.length;s++){var g=o[s],w=g.callback;if(w!==null){if(g.callback=null,g=c,typeof w!="function")throw Error(n(191,w));w.call(g)}}}var Ba={},Fr=To(Ba),Ua=To(Ba),Va=To(Ba);function bi(o){if(o===Ba)throw Error(n(174));return o}function zf(o,s){switch(yt(Va,s),yt(Ua,o),yt(Fr,Ba),o=s.nodeType,o){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:be(null,"");break;default:o=o===8?s.parentNode:s,s=o.namespaceURI||null,o=o.tagName,s=be(s,o)}kt(Fr),yt(Fr,s)}function ks(){kt(Fr),kt(Ua),kt(Va)}function bv(o){bi(Va.current);var s=bi(Fr.current),c=be(s,o.type);s!==c&&(yt(Ua,o),yt(Fr,c))}function Ff(o){Ua.current===o&&(kt(Fr),kt(Ua))}var _t=To(0);function Iu(o){for(var s=o;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.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===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Bf=[];function Uf(){for(var o=0;o<Bf.length;o++)Bf[o]._workInProgressVersionPrimary=null;Bf.length=0}var Mu=O.ReactCurrentDispatcher,Vf=O.ReactCurrentBatchConfig,ki=0,Nt=null,Ft=null,qt=null,Lu=!1,Ha=!1,Wa=0,PT=0;function sn(){throw Error(n(321))}function Hf(o,s){if(s===null)return!1;for(var c=0;c<s.length&&c<o.length;c++)if(!xr(o[c],s[c]))return!1;return!0}function Wf(o,s,c,g,w,b){if(ki=b,Nt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Mu.current=o===null||o.memoizedState===null?AT:IT,o=c(g,w),Ha){b=0;do{if(Ha=!1,Wa=0,25<=b)throw Error(n(301));b+=1,qt=Ft=null,s.updateQueue=null,Mu.current=MT,o=c(g,w)}while(Ha)}if(Mu.current=zu,s=Ft!==null&&Ft.next!==null,ki=0,qt=Ft=Nt=null,Lu=!1,s)throw Error(n(300));return o}function qf(){var o=Wa!==0;return Wa=0,o}function Br(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?Nt.memoizedState=qt=o:qt=qt.next=o,qt}function lr(){if(Ft===null){var o=Nt.alternate;o=o!==null?o.memoizedState:null}else o=Ft.next;var s=qt===null?Nt.memoizedState:qt.next;if(s!==null)qt=s,Ft=o;else{if(o===null)throw Error(n(310));Ft=o,o={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},qt===null?Nt.memoizedState=qt=o:qt=qt.next=o}return qt}function qa(o,s){return typeof s=="function"?s(o):s}function Kf(o){var s=lr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=o;var g=Ft,w=g.baseQueue,b=c.pending;if(b!==null){if(w!==null){var T=w.next;w.next=b.next,b.next=T}g.baseQueue=w=b,c.pending=null}if(w!==null){b=w.next,g=g.baseState;var L=T=null,U=null,se=b;do{var me=se.lane;if((ki&me)===me)U!==null&&(U=U.next={lane:0,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),g=se.hasEagerState?se.eagerState:o(g,se.action);else{var ge={lane:me,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null};U===null?(L=U=ge,T=g):U=U.next=ge,Nt.lanes|=me,Si|=me}se=se.next}while(se!==null&&se!==b);U===null?T=g:U.next=L,xr(g,s.memoizedState)||(Tn=!0),s.memoizedState=g,s.baseState=T,s.baseQueue=U,c.lastRenderedState=g}if(o=c.interleaved,o!==null){w=o;do b=w.lane,Nt.lanes|=b,Si|=b,w=w.next;while(w!==o)}else w===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Gf(o){var s=lr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=o;var g=c.dispatch,w=c.pending,b=s.memoizedState;if(w!==null){c.pending=null;var T=w=w.next;do b=o(b,T.action),T=T.next;while(T!==w);xr(b,s.memoizedState)||(Tn=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,g]}function kv(){}function Sv(o,s){var c=Nt,g=lr(),w=s(),b=!xr(g.memoizedState,w);if(b&&(g.memoizedState=w,Tn=!0),g=g.queue,Qf(_v.bind(null,c,g,o),[o]),g.getSnapshot!==s||b||qt!==null&&qt.memoizedState.tag&1){if(c.flags|=2048,Ka(9,Ev.bind(null,c,g,w,s),void 0,null),Kt===null)throw Error(n(349));(ki&30)!==0||Cv(c,s,w)}return w}function Cv(o,s,c){o.flags|=16384,o={getSnapshot:s,value:c},s=Nt.updateQueue,s===null?(s={lastEffect:null,stores:null},Nt.updateQueue=s,s.stores=[o]):(c=s.stores,c===null?s.stores=[o]:c.push(o))}function Ev(o,s,c,g){s.value=c,s.getSnapshot=g,Nv(s)&&Tv(o)}function _v(o,s,c){return c(function(){Nv(s)&&Tv(o)})}function Nv(o){var s=o.getSnapshot;o=o.value;try{var c=s();return!xr(o,c)}catch{return!0}}function Tv(o){var s=so(o,1);s!==null&&Cr(s,o,1,-1)}function Pv(o){var s=Br();return typeof o=="function"&&(o=o()),s.memoizedState=s.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:o},s.queue=o,o=o.dispatch=OT.bind(null,Nt,o),[s.memoizedState,o]}function Ka(o,s,c,g){return o={tag:o,create:s,destroy:c,deps:g,next:null},s=Nt.updateQueue,s===null?(s={lastEffect:null,stores:null},Nt.updateQueue=s,s.lastEffect=o.next=o):(c=s.lastEffect,c===null?s.lastEffect=o.next=o:(g=c.next,c.next=o,o.next=g,s.lastEffect=o)),o}function jv(){return lr().memoizedState}function Du(o,s,c,g){var w=Br();Nt.flags|=o,w.memoizedState=Ka(1|s,c,void 0,g===void 0?null:g)}function $u(o,s,c,g){var w=lr();g=g===void 0?null:g;var b=void 0;if(Ft!==null){var T=Ft.memoizedState;if(b=T.destroy,g!==null&&Hf(g,T.deps)){w.memoizedState=Ka(s,c,b,g);return}}Nt.flags|=o,w.memoizedState=Ka(1|s,c,b,g)}function Rv(o,s){return Du(8390656,8,o,s)}function Qf(o,s){return $u(2048,8,o,s)}function Ov(o,s){return $u(4,2,o,s)}function Av(o,s){return $u(4,4,o,s)}function Iv(o,s){if(typeof s=="function")return o=o(),s(o),function(){s(null)};if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function Mv(o,s,c){return c=c!=null?c.concat([o]):null,$u(4,4,Iv.bind(null,s,o),c)}function Yf(){}function Lv(o,s){var c=lr();s=s===void 0?null:s;var g=c.memoizedState;return g!==null&&s!==null&&Hf(s,g[1])?g[0]:(c.memoizedState=[o,s],o)}function Dv(o,s){var c=lr();s=s===void 0?null:s;var g=c.memoizedState;return g!==null&&s!==null&&Hf(s,g[1])?g[0]:(o=o(),c.memoizedState=[o,s],o)}function $v(o,s,c){return(ki&21)===0?(o.baseState&&(o.baseState=!1,Tn=!0),o.memoizedState=c):(xr(c,s)||(c=hy(),Nt.lanes|=c,Si|=c,o.baseState=!0),s)}function jT(o,s){var c=pt;pt=c!==0&&4>c?c:4,o(!0);var g=Vf.transition;Vf.transition={};try{o(!1),s()}finally{pt=c,Vf.transition=g}}function zv(){return lr().memoizedState}function RT(o,s,c){var g=Lo(o);if(c={lane:g,action:c,hasEagerState:!1,eagerState:null,next:null},Fv(o))Bv(s,c);else if(c=yv(o,s,c,g),c!==null){var w=mn();Cr(c,o,g,w),Uv(c,s,g)}}function OT(o,s,c){var g=Lo(o),w={lane:g,action:c,hasEagerState:!1,eagerState:null,next:null};if(Fv(o))Bv(s,w);else{var b=o.alternate;if(o.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var T=s.lastRenderedState,L=b(T,c);if(w.hasEagerState=!0,w.eagerState=L,xr(L,T)){var U=s.interleaved;U===null?(w.next=w,Df(s)):(w.next=U.next,U.next=w),s.interleaved=w;return}}catch{}finally{}c=yv(o,s,w,g),c!==null&&(w=mn(),Cr(c,o,g,w),Uv(c,s,g))}}function Fv(o){var s=o.alternate;return o===Nt||s!==null&&s===Nt}function Bv(o,s){Ha=Lu=!0;var c=o.pending;c===null?s.next=s:(s.next=c.next,c.next=s),o.pending=s}function Uv(o,s,c){if((c&4194240)!==0){var g=s.lanes;g&=o.pendingLanes,c|=g,s.lanes=c,Zd(o,c)}}var zu={readContext:ar,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},AT={readContext:ar,useCallback:function(o,s){return Br().memoizedState=[o,s===void 0?null:s],o},useContext:ar,useEffect:Rv,useImperativeHandle:function(o,s,c){return c=c!=null?c.concat([o]):null,Du(4194308,4,Iv.bind(null,s,o),c)},useLayoutEffect:function(o,s){return Du(4194308,4,o,s)},useInsertionEffect:function(o,s){return Du(4,2,o,s)},useMemo:function(o,s){var c=Br();return s=s===void 0?null:s,o=o(),c.memoizedState=[o,s],o},useReducer:function(o,s,c){var g=Br();return s=c!==void 0?c(s):s,g.memoizedState=g.baseState=s,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:s},g.queue=o,o=o.dispatch=RT.bind(null,Nt,o),[g.memoizedState,o]},useRef:function(o){var s=Br();return o={current:o},s.memoizedState=o},useState:Pv,useDebugValue:Yf,useDeferredValue:function(o){return Br().memoizedState=o},useTransition:function(){var o=Pv(!1),s=o[0];return o=jT.bind(null,o[1]),Br().memoizedState=o,[s,o]},useMutableSource:function(){},useSyncExternalStore:function(o,s,c){var g=Nt,w=Br();if(St){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Kt===null)throw Error(n(349));(ki&30)!==0||Cv(g,s,c)}w.memoizedState=c;var b={value:c,getSnapshot:s};return w.queue=b,Rv(_v.bind(null,g,b,o),[o]),g.flags|=2048,Ka(9,Ev.bind(null,g,b,c,s),void 0,null),c},useId:function(){var o=Br(),s=Kt.identifierPrefix;if(St){var c=io,g=oo;c=(g&~(1<<32-vr(g)-1)).toString(32)+c,s=":"+s+"R"+c,c=Wa++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=PT++,s=":"+s+"r"+c.toString(32)+":";return o.memoizedState=s},unstable_isNewReconciler:!1},IT={readContext:ar,useCallback:Lv,useContext:ar,useEffect:Qf,useImperativeHandle:Mv,useInsertionEffect:Ov,useLayoutEffect:Av,useMemo:Dv,useReducer:Kf,useRef:jv,useState:function(){return Kf(qa)},useDebugValue:Yf,useDeferredValue:function(o){var s=lr();return $v(s,Ft.memoizedState,o)},useTransition:function(){var o=Kf(qa)[0],s=lr().memoizedState;return[o,s]},useMutableSource:kv,useSyncExternalStore:Sv,useId:zv,unstable_isNewReconciler:!1},MT={readContext:ar,useCallback:Lv,useContext:ar,useEffect:Qf,useImperativeHandle:Mv,useInsertionEffect:Ov,useLayoutEffect:Av,useMemo:Dv,useReducer:Gf,useRef:jv,useState:function(){return Gf(qa)},useDebugValue:Yf,useDeferredValue:function(o){var s=lr();return Ft===null?s.memoizedState=o:$v(s,Ft.memoizedState,o)},useTransition:function(){var o=Gf(qa)[0],s=lr().memoizedState;return[o,s]},useMutableSource:kv,useSyncExternalStore:Sv,useId:zv,unstable_isNewReconciler:!1};function br(o,s){if(o&&o.defaultProps){s=N({},s),o=o.defaultProps;for(var c in o)s[c]===void 0&&(s[c]=o[c]);return s}return s}function Zf(o,s,c,g){s=o.memoizedState,c=c(g,s),c=c==null?s:N({},s,c),o.memoizedState=c,o.lanes===0&&(o.updateQueue.baseState=c)}var Fu={isMounted:function(o){return(o=o._reactInternals)?mi(o)===o:!1},enqueueSetState:function(o,s,c){o=o._reactInternals;var g=mn(),w=Lo(o),b=ao(g,w);b.payload=s,c!=null&&(b.callback=c),s=Oo(o,b,w),s!==null&&(Cr(s,o,w,g),Ou(s,o,w))},enqueueReplaceState:function(o,s,c){o=o._reactInternals;var g=mn(),w=Lo(o),b=ao(g,w);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=Oo(o,b,w),s!==null&&(Cr(s,o,w,g),Ou(s,o,w))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var c=mn(),g=Lo(o),w=ao(c,g);w.tag=2,s!=null&&(w.callback=s),s=Oo(o,w,g),s!==null&&(Cr(s,o,g,c),Ou(s,o,g))}};function Vv(o,s,c,g,w,b,T){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,b,T):s.prototype&&s.prototype.isPureReactComponent?!Aa(c,g)||!Aa(w,b):!0}function Hv(o,s,c){var g=!1,w=Po,b=s.contextType;return typeof b=="object"&&b!==null?b=ar(b):(w=Nn(s)?yi:on.current,g=s.contextTypes,b=(g=g!=null)?ms(o,w):Po),s=new s(c,b),o.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Fu,o.stateNode=s,s._reactInternals=o,g&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=w,o.__reactInternalMemoizedMaskedChildContext=b),s}function Wv(o,s,c,g){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,g),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,g),s.state!==o&&Fu.enqueueReplaceState(s,s.state,null)}function Jf(o,s,c,g){var w=o.stateNode;w.props=c,w.state=o.memoizedState,w.refs={},$f(o);var b=s.contextType;typeof b=="object"&&b!==null?w.context=ar(b):(b=Nn(s)?yi:on.current,w.context=ms(o,b)),w.state=o.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Zf(o,s,b,c),w.state=o.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(s=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),s!==w.state&&Fu.enqueueReplaceState(w,w.state,null),Au(o,c,w,g),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308)}function Ss(o,s){try{var c="",g=s;do c+=K(g),g=g.return;while(g);var w=c}catch(b){w=`
|
|
40
|
+
Error generating stack: `+b.message+`
|
|
41
|
+
`+b.stack}return{value:o,source:s,stack:w,digest:null}}function Xf(o,s,c){return{value:o,source:null,stack:c??null,digest:s??null}}function ep(o,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var LT=typeof WeakMap=="function"?WeakMap:Map;function qv(o,s,c){c=ao(-1,c),c.tag=3,c.payload={element:null};var g=s.value;return c.callback=function(){Ku||(Ku=!0,mp=g),ep(o,s)},c}function Kv(o,s,c){c=ao(-1,c),c.tag=3;var g=o.type.getDerivedStateFromError;if(typeof g=="function"){var w=s.value;c.payload=function(){return g(w)},c.callback=function(){ep(o,s)}}var b=o.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){ep(o,s),typeof g!="function"&&(Io===null?Io=new Set([this]):Io.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})}),c}function Gv(o,s,c){var g=o.pingCache;if(g===null){g=o.pingCache=new LT;var w=new Set;g.set(s,w)}else w=g.get(s),w===void 0&&(w=new Set,g.set(s,w));w.has(c)||(w.add(c),o=YT.bind(null,o,s,c),s.then(o,o))}function Qv(o){do{var s;if((s=o.tag===13)&&(s=o.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return o;o=o.return}while(o!==null);return null}function Yv(o,s,c,g,w){return(o.mode&1)===0?(o===s?o.flags|=65536:(o.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=ao(-1,1),s.tag=2,Oo(c,s,1))),c.lanes|=1),o):(o.flags|=65536,o.lanes=w,o)}var DT=O.ReactCurrentOwner,Tn=!1;function hn(o,s,c,g){s.child=o===null?gv(s,null,c,g):xs(s,o.child,c,g)}function Zv(o,s,c,g,w){c=c.render;var b=s.ref;return bs(s,w),g=Wf(o,s,c,g,b,w),c=qf(),o!==null&&!Tn?(s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~w,lo(o,s,w)):(St&&c&&Tf(s),s.flags|=1,hn(o,s,g,w),s.child)}function Jv(o,s,c,g,w){if(o===null){var b=c.type;return typeof b=="function"&&!kp(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,Xv(o,s,b,g,w)):(o=Xu(c.type,null,g,s,s.mode,w),o.ref=s.ref,o.return=s,s.child=o)}if(b=o.child,(o.lanes&w)===0){var T=b.memoizedProps;if(c=c.compare,c=c!==null?c:Aa,c(T,g)&&o.ref===s.ref)return lo(o,s,w)}return s.flags|=1,o=$o(b,g),o.ref=s.ref,o.return=s,s.child=o}function Xv(o,s,c,g,w){if(o!==null){var b=o.memoizedProps;if(Aa(b,g)&&o.ref===s.ref)if(Tn=!1,s.pendingProps=g=b,(o.lanes&w)!==0)(o.flags&131072)!==0&&(Tn=!0);else return s.lanes=o.lanes,lo(o,s,w)}return tp(o,s,c,g,w)}function ex(o,s,c){var g=s.pendingProps,w=g.children,b=o!==null?o.memoizedState:null;if(g.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Es,Qn),Qn|=c;else{if((c&1073741824)===0)return o=b!==null?b.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:o,cachePool:null,transitions:null},s.updateQueue=null,yt(Es,Qn),Qn|=o,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=b!==null?b.baseLanes:c,yt(Es,Qn),Qn|=g}else b!==null?(g=b.baseLanes|c,s.memoizedState=null):g=c,yt(Es,Qn),Qn|=g;return hn(o,s,w,c),s.child}function tx(o,s){var c=s.ref;(o===null&&c!==null||o!==null&&o.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function tp(o,s,c,g,w){var b=Nn(c)?yi:on.current;return b=ms(s,b),bs(s,w),c=Wf(o,s,c,g,b,w),g=qf(),o!==null&&!Tn?(s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~w,lo(o,s,w)):(St&&g&&Tf(s),s.flags|=1,hn(o,s,c,w),s.child)}function nx(o,s,c,g,w){if(Nn(c)){var b=!0;Cu(s)}else b=!1;if(bs(s,w),s.stateNode===null)Uu(o,s),Hv(s,c,g),Jf(s,c,g,w),g=!0;else if(o===null){var T=s.stateNode,L=s.memoizedProps;T.props=L;var U=T.context,se=c.contextType;typeof se=="object"&&se!==null?se=ar(se):(se=Nn(c)?yi:on.current,se=ms(s,se));var me=c.getDerivedStateFromProps,ge=typeof me=="function"||typeof T.getSnapshotBeforeUpdate=="function";ge||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(L!==g||U!==se)&&Wv(s,T,g,se),Ro=!1;var he=s.memoizedState;T.state=he,Au(s,g,T,w),U=s.memoizedState,L!==g||he!==U||_n.current||Ro?(typeof me=="function"&&(Zf(s,c,me,g),U=s.memoizedState),(L=Ro||Vv(s,c,L,g,he,U,se))?(ge||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(s.flags|=4194308)):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=g,s.memoizedState=U),T.props=g,T.state=U,T.context=se,g=L):(typeof T.componentDidMount=="function"&&(s.flags|=4194308),g=!1)}else{T=s.stateNode,vv(o,s),L=s.memoizedProps,se=s.type===s.elementType?L:br(s.type,L),T.props=se,ge=s.pendingProps,he=T.context,U=c.contextType,typeof U=="object"&&U!==null?U=ar(U):(U=Nn(c)?yi:on.current,U=ms(s,U));var _e=c.getDerivedStateFromProps;(me=typeof _e=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(L!==ge||he!==U)&&Wv(s,T,g,U),Ro=!1,he=s.memoizedState,T.state=he,Au(s,g,T,w);var je=s.memoizedState;L!==ge||he!==je||_n.current||Ro?(typeof _e=="function"&&(Zf(s,c,_e,g),je=s.memoizedState),(se=Ro||Vv(s,c,se,g,he,je,U)||!1)?(me||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(g,je,U),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(g,je,U)),typeof T.componentDidUpdate=="function"&&(s.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof T.componentDidUpdate!="function"||L===o.memoizedProps&&he===o.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||L===o.memoizedProps&&he===o.memoizedState||(s.flags|=1024),s.memoizedProps=g,s.memoizedState=je),T.props=g,T.state=je,T.context=U,g=se):(typeof T.componentDidUpdate!="function"||L===o.memoizedProps&&he===o.memoizedState||(s.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||L===o.memoizedProps&&he===o.memoizedState||(s.flags|=1024),g=!1)}return np(o,s,c,g,b,w)}function np(o,s,c,g,w,b){tx(o,s);var T=(s.flags&128)!==0;if(!g&&!T)return w&&av(s,c,!1),lo(o,s,b);g=s.stateNode,DT.current=s;var L=T&&typeof c.getDerivedStateFromError!="function"?null:g.render();return s.flags|=1,o!==null&&T?(s.child=xs(s,o.child,null,b),s.child=xs(s,null,L,b)):hn(o,s,L,b),s.memoizedState=g.state,w&&av(s,c,!0),s.child}function rx(o){var s=o.stateNode;s.pendingContext?iv(o,s.pendingContext,s.pendingContext!==s.context):s.context&&iv(o,s.context,!1),zf(o,s.containerInfo)}function ox(o,s,c,g,w){return vs(),Of(w),s.flags|=256,hn(o,s,c,g),s.child}var rp={dehydrated:null,treeContext:null,retryLane:0};function op(o){return{baseLanes:o,cachePool:null,transitions:null}}function ix(o,s,c){var g=s.pendingProps,w=_t.current,b=!1,T=(s.flags&128)!==0,L;if((L=T)||(L=o!==null&&o.memoizedState===null?!1:(w&2)!==0),L?(b=!0,s.flags&=-129):(o===null||o.memoizedState!==null)&&(w|=1),yt(_t,w&1),o===null)return Rf(s),o=s.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((s.mode&1)===0?s.lanes=1:o.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(T=g.children,o=g.fallback,b?(g=s.mode,b=s.child,T={mode:"hidden",children:T},(g&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=T):b=ec(T,g,0,null),o=Ni(o,g,c,null),b.return=s,o.return=s,b.sibling=o,s.child=b,s.child.memoizedState=op(c),s.memoizedState=rp,o):ip(s,T));if(w=o.memoizedState,w!==null&&(L=w.dehydrated,L!==null))return $T(o,s,T,g,L,w,c);if(b){b=g.fallback,T=s.mode,w=o.child,L=w.sibling;var U={mode:"hidden",children:g.children};return(T&1)===0&&s.child!==w?(g=s.child,g.childLanes=0,g.pendingProps=U,s.deletions=null):(g=$o(w,U),g.subtreeFlags=w.subtreeFlags&14680064),L!==null?b=$o(L,b):(b=Ni(b,T,c,null),b.flags|=2),b.return=s,g.return=s,g.sibling=b,s.child=g,g=b,b=s.child,T=o.child.memoizedState,T=T===null?op(c):{baseLanes:T.baseLanes|c,cachePool:null,transitions:T.transitions},b.memoizedState=T,b.childLanes=o.childLanes&~c,s.memoizedState=rp,g}return b=o.child,o=b.sibling,g=$o(b,{mode:"visible",children:g.children}),(s.mode&1)===0&&(g.lanes=c),g.return=s,g.sibling=null,o!==null&&(c=s.deletions,c===null?(s.deletions=[o],s.flags|=16):c.push(o)),s.child=g,s.memoizedState=null,g}function ip(o,s){return s=ec({mode:"visible",children:s},o.mode,0,null),s.return=o,o.child=s}function Bu(o,s,c,g){return g!==null&&Of(g),xs(s,o.child,null,c),o=ip(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function $T(o,s,c,g,w,b,T){if(c)return s.flags&256?(s.flags&=-257,g=Xf(Error(n(422))),Bu(o,s,T,g)):s.memoizedState!==null?(s.child=o.child,s.flags|=128,null):(b=g.fallback,w=s.mode,g=ec({mode:"visible",children:g.children},w,0,null),b=Ni(b,w,T,null),b.flags|=2,g.return=s,b.return=s,g.sibling=b,s.child=g,(s.mode&1)!==0&&xs(s,o.child,null,T),s.child.memoizedState=op(T),s.memoizedState=rp,b);if((s.mode&1)===0)return Bu(o,s,T,null);if(w.data==="$!"){if(g=w.nextSibling&&w.nextSibling.dataset,g)var L=g.dgst;return g=L,b=Error(n(419)),g=Xf(b,g,void 0),Bu(o,s,T,g)}if(L=(T&o.childLanes)!==0,Tn||L){if(g=Kt,g!==null){switch(T&-T){case 4:w=2;break;case 16:w=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:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(g.suspendedLanes|T))!==0?0:w,w!==0&&w!==b.retryLane&&(b.retryLane=w,so(o,w),Cr(g,o,w,-1))}return bp(),g=Xf(Error(n(421))),Bu(o,s,T,g)}return w.data==="$?"?(s.flags|=128,s.child=o.child,s=ZT.bind(null,o),w._reactRetry=s,null):(o=b.treeContext,Gn=No(w.nextSibling),Kn=s,St=!0,wr=null,o!==null&&(ir[sr++]=oo,ir[sr++]=io,ir[sr++]=vi,oo=o.id,io=o.overflow,vi=s),s=ip(s,g.children),s.flags|=4096,s)}function sx(o,s,c){o.lanes|=s;var g=o.alternate;g!==null&&(g.lanes|=s),Lf(o.return,s,c)}function sp(o,s,c,g,w){var b=o.memoizedState;b===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:g,tail:c,tailMode:w}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=g,b.tail=c,b.tailMode=w)}function ax(o,s,c){var g=s.pendingProps,w=g.revealOrder,b=g.tail;if(hn(o,s,g.children,c),g=_t.current,(g&2)!==0)g=g&1|2,s.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&sx(o,c,s);else if(o.tag===19)sx(o,c,s);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}g&=1}if(yt(_t,g),(s.mode&1)===0)s.memoizedState=null;else switch(w){case"forwards":for(c=s.child,w=null;c!==null;)o=c.alternate,o!==null&&Iu(o)===null&&(w=c),c=c.sibling;c=w,c===null?(w=s.child,s.child=null):(w=c.sibling,c.sibling=null),sp(s,!1,w,c,b);break;case"backwards":for(c=null,w=s.child,s.child=null;w!==null;){if(o=w.alternate,o!==null&&Iu(o)===null){s.child=w;break}o=w.sibling,w.sibling=c,c=w,w=o}sp(s,!0,c,null,b);break;case"together":sp(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Uu(o,s){(s.mode&1)===0&&o!==null&&(o.alternate=null,s.alternate=null,s.flags|=2)}function lo(o,s,c){if(o!==null&&(s.dependencies=o.dependencies),Si|=s.lanes,(c&s.childLanes)===0)return null;if(o!==null&&s.child!==o.child)throw Error(n(153));if(s.child!==null){for(o=s.child,c=$o(o,o.pendingProps),s.child=c,c.return=s;o.sibling!==null;)o=o.sibling,c=c.sibling=$o(o,o.pendingProps),c.return=s;c.sibling=null}return s.child}function zT(o,s,c){switch(s.tag){case 3:rx(s),vs();break;case 5:bv(s);break;case 1:Nn(s.type)&&Cu(s);break;case 4:zf(s,s.stateNode.containerInfo);break;case 10:var g=s.type._context,w=s.memoizedProps.value;yt(ju,g._currentValue),g._currentValue=w;break;case 13:if(g=s.memoizedState,g!==null)return g.dehydrated!==null?(yt(_t,_t.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?ix(o,s,c):(yt(_t,_t.current&1),o=lo(o,s,c),o!==null?o.sibling:null);yt(_t,_t.current&1);break;case 19:if(g=(c&s.childLanes)!==0,(o.flags&128)!==0){if(g)return ax(o,s,c);s.flags|=128}if(w=s.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),yt(_t,_t.current),g)break;return null;case 22:case 23:return s.lanes=0,ex(o,s,c)}return lo(o,s,c)}var lx,ap,ux,cx;lx=function(o,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)o.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},ap=function(){},ux=function(o,s,c,g){var w=o.memoizedProps;if(w!==g){o=s.stateNode,bi(Fr.current);var b=null;switch(c){case"input":w=ze(o,w),g=ze(o,g),b=[];break;case"select":w=N({},w,{value:void 0}),g=N({},g,{value:void 0}),b=[];break;case"textarea":w=Tt(o,w),g=Tt(o,g),b=[];break;default:typeof w.onClick!="function"&&typeof g.onClick=="function"&&(o.onclick=bu)}Et(c,g);var T;c=null;for(se in w)if(!g.hasOwnProperty(se)&&w.hasOwnProperty(se)&&w[se]!=null)if(se==="style"){var L=w[se];for(T in L)L.hasOwnProperty(T)&&(c||(c={}),c[T]="")}else se!=="dangerouslySetInnerHTML"&&se!=="children"&&se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&se!=="autoFocus"&&(i.hasOwnProperty(se)?b||(b=[]):(b=b||[]).push(se,null));for(se in g){var U=g[se];if(L=w!=null?w[se]:void 0,g.hasOwnProperty(se)&&U!==L&&(U!=null||L!=null))if(se==="style")if(L){for(T in L)!L.hasOwnProperty(T)||U&&U.hasOwnProperty(T)||(c||(c={}),c[T]="");for(T in U)U.hasOwnProperty(T)&&L[T]!==U[T]&&(c||(c={}),c[T]=U[T])}else c||(b||(b=[]),b.push(se,c)),c=U;else se==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,L=L?L.__html:void 0,U!=null&&L!==U&&(b=b||[]).push(se,U)):se==="children"?typeof U!="string"&&typeof U!="number"||(b=b||[]).push(se,""+U):se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&(i.hasOwnProperty(se)?(U!=null&&se==="onScroll"&&bt("scroll",o),b||L===U||(b=[])):(b=b||[]).push(se,U))}c&&(b=b||[]).push("style",c);var se=b;(s.updateQueue=se)&&(s.flags|=4)}},cx=function(o,s,c,g){c!==g&&(s.flags|=4)};function Ga(o,s){if(!St)switch(o.tailMode){case"hidden":s=o.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?o.tail=null:c.sibling=null;break;case"collapsed":c=o.tail;for(var g=null;c!==null;)c.alternate!==null&&(g=c),c=c.sibling;g===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function an(o){var s=o.alternate!==null&&o.alternate.child===o.child,c=0,g=0;if(s)for(var w=o.child;w!==null;)c|=w.lanes|w.childLanes,g|=w.subtreeFlags&14680064,g|=w.flags&14680064,w.return=o,w=w.sibling;else for(w=o.child;w!==null;)c|=w.lanes|w.childLanes,g|=w.subtreeFlags,g|=w.flags,w.return=o,w=w.sibling;return o.subtreeFlags|=g,o.childLanes=c,s}function FT(o,s,c){var g=s.pendingProps;switch(Pf(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return an(s),null;case 1:return Nn(s.type)&&Su(),an(s),null;case 3:return g=s.stateNode,ks(),kt(_n),kt(on),Uf(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(o===null||o.child===null)&&(Tu(s)?s.flags|=4:o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,wr!==null&&(vp(wr),wr=null))),ap(o,s),an(s),null;case 5:Ff(s);var w=bi(Va.current);if(c=s.type,o!==null&&s.stateNode!=null)ux(o,s,c,g,w),o.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!g){if(s.stateNode===null)throw Error(n(166));return an(s),null}if(o=bi(Fr.current),Tu(s)){g=s.stateNode,c=s.type;var b=s.memoizedProps;switch(g[zr]=s,g[$a]=b,o=(s.mode&1)!==0,c){case"dialog":bt("cancel",g),bt("close",g);break;case"iframe":case"object":case"embed":bt("load",g);break;case"video":case"audio":for(w=0;w<Ma.length;w++)bt(Ma[w],g);break;case"source":bt("error",g);break;case"img":case"image":case"link":bt("error",g),bt("load",g);break;case"details":bt("toggle",g);break;case"input":zt(g,b),bt("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!b.multiple},bt("invalid",g);break;case"textarea":nn(g,b),bt("invalid",g)}Et(c,b),w=null;for(var T in b)if(b.hasOwnProperty(T)){var L=b[T];T==="children"?typeof L=="string"?g.textContent!==L&&(b.suppressHydrationWarning!==!0&&wu(g.textContent,L,o),w=["children",L]):typeof L=="number"&&g.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&wu(g.textContent,L,o),w=["children",""+L]):i.hasOwnProperty(T)&&L!=null&&T==="onScroll"&&bt("scroll",g)}switch(c){case"input":Ee(g),Bn(g,b,!0);break;case"textarea":Ee(g),to(g);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(g.onclick=bu)}g=w,s.updateQueue=g,g!==null&&(s.flags|=4)}else{T=w.nodeType===9?w:w.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=de(c)),o==="http://www.w3.org/1999/xhtml"?c==="script"?(o=T.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof g.is=="string"?o=T.createElement(c,{is:g.is}):(o=T.createElement(c),c==="select"&&(T=o,g.multiple?T.multiple=!0:g.size&&(T.size=g.size))):o=T.createElementNS(o,c),o[zr]=s,o[$a]=g,lx(o,s,!1,!1),s.stateNode=o;e:{switch(T=W(c,g),c){case"dialog":bt("cancel",o),bt("close",o),w=g;break;case"iframe":case"object":case"embed":bt("load",o),w=g;break;case"video":case"audio":for(w=0;w<Ma.length;w++)bt(Ma[w],o);w=g;break;case"source":bt("error",o),w=g;break;case"img":case"image":case"link":bt("error",o),bt("load",o),w=g;break;case"details":bt("toggle",o),w=g;break;case"input":zt(o,g),w=ze(o,g),bt("invalid",o);break;case"option":w=g;break;case"select":o._wrapperState={wasMultiple:!!g.multiple},w=N({},g,{value:void 0}),bt("invalid",o);break;case"textarea":nn(o,g),w=Tt(o,g),bt("invalid",o);break;default:w=g}Et(c,w),L=w;for(b in L)if(L.hasOwnProperty(b)){var U=L[b];b==="style"?Un(o,U):b==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ge(o,U)):b==="children"?typeof U=="string"?(c!=="textarea"||U!=="")&&Ze(o,U):typeof U=="number"&&Ze(o,""+U):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(i.hasOwnProperty(b)?U!=null&&b==="onScroll"&&bt("scroll",o):U!=null&&R(o,b,U,T))}switch(c){case"input":Ee(o),Bn(o,g,!1);break;case"textarea":Ee(o),to(o);break;case"option":g.value!=null&&o.setAttribute("value",""+te(g.value));break;case"select":o.multiple=!!g.multiple,b=g.value,b!=null?rr(o,!!g.multiple,b,!1):g.defaultValue!=null&&rr(o,!!g.multiple,g.defaultValue,!0);break;default:typeof w.onClick=="function"&&(o.onclick=bu)}switch(c){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return an(s),null;case 6:if(o&&s.stateNode!=null)cx(o,s,o.memoizedProps,g);else{if(typeof g!="string"&&s.stateNode===null)throw Error(n(166));if(c=bi(Va.current),bi(Fr.current),Tu(s)){if(g=s.stateNode,c=s.memoizedProps,g[zr]=s,(b=g.nodeValue!==c)&&(o=Kn,o!==null))switch(o.tag){case 3:wu(g.nodeValue,c,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&wu(g.nodeValue,c,(o.mode&1)!==0)}b&&(s.flags|=4)}else g=(c.nodeType===9?c:c.ownerDocument).createTextNode(g),g[zr]=s,s.stateNode=g}return an(s),null;case 13:if(kt(_t),g=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(St&&Gn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)pv(),vs(),s.flags|=98560,b=!1;else if(b=Tu(s),g!==null&&g.dehydrated!==null){if(o===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[zr]=s}else vs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;an(s),b=!1}else wr!==null&&(vp(wr),wr=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(g=g!==null,g!==(o!==null&&o.memoizedState!==null)&&g&&(s.child.flags|=8192,(s.mode&1)!==0&&(o===null||(_t.current&1)!==0?Bt===0&&(Bt=3):bp())),s.updateQueue!==null&&(s.flags|=4),an(s),null);case 4:return ks(),ap(o,s),o===null&&La(s.stateNode.containerInfo),an(s),null;case 10:return Mf(s.type._context),an(s),null;case 17:return Nn(s.type)&&Su(),an(s),null;case 19:if(kt(_t),b=s.memoizedState,b===null)return an(s),null;if(g=(s.flags&128)!==0,T=b.rendering,T===null)if(g)Ga(b,!1);else{if(Bt!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(T=Iu(o),T!==null){for(s.flags|=128,Ga(b,!1),g=T.updateQueue,g!==null&&(s.updateQueue=g,s.flags|=4),s.subtreeFlags=0,g=c,c=s.child;c!==null;)b=c,o=g,b.flags&=14680066,T=b.alternate,T===null?(b.childLanes=0,b.lanes=o,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=T.childLanes,b.lanes=T.lanes,b.child=T.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=T.memoizedProps,b.memoizedState=T.memoizedState,b.updateQueue=T.updateQueue,b.type=T.type,o=T.dependencies,b.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),c=c.sibling;return yt(_t,_t.current&1|2),s.child}o=o.sibling}b.tail!==null&&Ot()>_s&&(s.flags|=128,g=!0,Ga(b,!1),s.lanes=4194304)}else{if(!g)if(o=Iu(T),o!==null){if(s.flags|=128,g=!0,c=o.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Ga(b,!0),b.tail===null&&b.tailMode==="hidden"&&!T.alternate&&!St)return an(s),null}else 2*Ot()-b.renderingStartTime>_s&&c!==1073741824&&(s.flags|=128,g=!0,Ga(b,!1),s.lanes=4194304);b.isBackwards?(T.sibling=s.child,s.child=T):(c=b.last,c!==null?c.sibling=T:s.child=T,b.last=T)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Ot(),s.sibling=null,c=_t.current,yt(_t,g?c&1|2:c&1),s):(an(s),null);case 22:case 23:return wp(),g=s.memoizedState!==null,o!==null&&o.memoizedState!==null!==g&&(s.flags|=8192),g&&(s.mode&1)!==0?(Qn&1073741824)!==0&&(an(s),s.subtreeFlags&6&&(s.flags|=8192)):an(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function BT(o,s){switch(Pf(s),s.tag){case 1:return Nn(s.type)&&Su(),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return ks(),kt(_n),kt(on),Uf(),o=s.flags,(o&65536)!==0&&(o&128)===0?(s.flags=o&-65537|128,s):null;case 5:return Ff(s),null;case 13:if(kt(_t),o=s.memoizedState,o!==null&&o.dehydrated!==null){if(s.alternate===null)throw Error(n(340));vs()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return kt(_t),null;case 4:return ks(),null;case 10:return Mf(s.type._context),null;case 22:case 23:return wp(),null;case 24:return null;default:return null}}var Vu=!1,ln=!1,UT=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function Cs(o,s){var c=o.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(g){jt(o,s,g)}else c.current=null}function lp(o,s,c){try{c()}catch(g){jt(o,s,g)}}var dx=!1;function VT(o,s){if(wf=uu,o=Vy(),ff(o)){if("selectionStart"in o)var c={start:o.selectionStart,end:o.selectionEnd};else e:{c=(c=o.ownerDocument)&&c.defaultView||window;var g=c.getSelection&&c.getSelection();if(g&&g.rangeCount!==0){c=g.anchorNode;var w=g.anchorOffset,b=g.focusNode;g=g.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var T=0,L=-1,U=-1,se=0,me=0,ge=o,he=null;t:for(;;){for(var _e;ge!==c||w!==0&&ge.nodeType!==3||(L=T+w),ge!==b||g!==0&&ge.nodeType!==3||(U=T+g),ge.nodeType===3&&(T+=ge.nodeValue.length),(_e=ge.firstChild)!==null;)he=ge,ge=_e;for(;;){if(ge===o)break t;if(he===c&&++se===w&&(L=T),he===b&&++me===g&&(U=T),(_e=ge.nextSibling)!==null)break;ge=he,he=ge.parentNode}ge=_e}c=L===-1||U===-1?null:{start:L,end:U}}else c=null}c=c||{start:0,end:0}}else c=null;for(bf={focusedElem:o,selectionRange:c},uu=!1,Pe=s;Pe!==null;)if(s=Pe,o=s.child,(s.subtreeFlags&1028)!==0&&o!==null)o.return=s,Pe=o;else for(;Pe!==null;){s=Pe;try{var je=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(je!==null){var De=je.memoizedProps,At=je.memoizedState,J=s.stateNode,V=J.getSnapshotBeforeUpdate(s.elementType===s.type?De:br(s.type,De),At);J.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var ne=s.stateNode.containerInfo;ne.nodeType===1?ne.textContent="":ne.nodeType===9&&ne.documentElement&&ne.removeChild(ne.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(xe){jt(s,s.return,xe)}if(o=s.sibling,o!==null){o.return=s.return,Pe=o;break}Pe=s.return}return je=dx,dx=!1,je}function Qa(o,s,c){var g=s.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var w=g=g.next;do{if((w.tag&o)===o){var b=w.destroy;w.destroy=void 0,b!==void 0&&lp(s,c,b)}w=w.next}while(w!==g)}}function Hu(o,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&o)===o){var g=c.create;c.destroy=g()}c=c.next}while(c!==s)}}function up(o){var s=o.ref;if(s!==null){var c=o.stateNode;switch(o.tag){case 5:o=c;break;default:o=c}typeof s=="function"?s(o):s.current=o}}function fx(o){var s=o.alternate;s!==null&&(o.alternate=null,fx(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&(delete s[zr],delete s[$a],delete s[Ef],delete s[ET],delete s[_T])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function px(o){return o.tag===5||o.tag===3||o.tag===4}function hx(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||px(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function cp(o,s,c){var g=o.tag;if(g===5||g===6)o=o.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(o,s):c.insertBefore(o,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(o,c)):(s=c,s.appendChild(o)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=bu));else if(g!==4&&(o=o.child,o!==null))for(cp(o,s,c),o=o.sibling;o!==null;)cp(o,s,c),o=o.sibling}function dp(o,s,c){var g=o.tag;if(g===5||g===6)o=o.stateNode,s?c.insertBefore(o,s):c.appendChild(o);else if(g!==4&&(o=o.child,o!==null))for(dp(o,s,c),o=o.sibling;o!==null;)dp(o,s,c),o=o.sibling}var en=null,kr=!1;function Ao(o,s,c){for(c=c.child;c!==null;)mx(o,s,c),c=c.sibling}function mx(o,s,c){if($r&&typeof $r.onCommitFiberUnmount=="function")try{$r.onCommitFiberUnmount(ru,c)}catch{}switch(c.tag){case 5:ln||Cs(c,s);case 6:var g=en,w=kr;en=null,Ao(o,s,c),en=g,kr=w,en!==null&&(kr?(o=en,c=c.stateNode,o.nodeType===8?o.parentNode.removeChild(c):o.removeChild(c)):en.removeChild(c.stateNode));break;case 18:en!==null&&(kr?(o=en,c=c.stateNode,o.nodeType===8?Cf(o.parentNode,c):o.nodeType===1&&Cf(o,c),Na(o)):Cf(en,c.stateNode));break;case 4:g=en,w=kr,en=c.stateNode.containerInfo,kr=!0,Ao(o,s,c),en=g,kr=w;break;case 0:case 11:case 14:case 15:if(!ln&&(g=c.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){w=g=g.next;do{var b=w,T=b.destroy;b=b.tag,T!==void 0&&((b&2)!==0||(b&4)!==0)&&lp(c,s,T),w=w.next}while(w!==g)}Ao(o,s,c);break;case 1:if(!ln&&(Cs(c,s),g=c.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=c.memoizedProps,g.state=c.memoizedState,g.componentWillUnmount()}catch(L){jt(c,s,L)}Ao(o,s,c);break;case 21:Ao(o,s,c);break;case 22:c.mode&1?(ln=(g=ln)||c.memoizedState!==null,Ao(o,s,c),ln=g):Ao(o,s,c);break;default:Ao(o,s,c)}}function gx(o){var s=o.updateQueue;if(s!==null){o.updateQueue=null;var c=o.stateNode;c===null&&(c=o.stateNode=new UT),s.forEach(function(g){var w=JT.bind(null,o,g);c.has(g)||(c.add(g),g.then(w,w))})}}function Sr(o,s){var c=s.deletions;if(c!==null)for(var g=0;g<c.length;g++){var w=c[g];try{var b=o,T=s,L=T;e:for(;L!==null;){switch(L.tag){case 5:en=L.stateNode,kr=!1;break e;case 3:en=L.stateNode.containerInfo,kr=!0;break e;case 4:en=L.stateNode.containerInfo,kr=!0;break e}L=L.return}if(en===null)throw Error(n(160));mx(b,T,w),en=null,kr=!1;var U=w.alternate;U!==null&&(U.return=null),w.return=null}catch(se){jt(w,s,se)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)yx(s,o),s=s.sibling}function yx(o,s){var c=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Sr(s,o),Ur(o),g&4){try{Qa(3,o,o.return),Hu(3,o)}catch(De){jt(o,o.return,De)}try{Qa(5,o,o.return)}catch(De){jt(o,o.return,De)}}break;case 1:Sr(s,o),Ur(o),g&512&&c!==null&&Cs(c,c.return);break;case 5:if(Sr(s,o),Ur(o),g&512&&c!==null&&Cs(c,c.return),o.flags&32){var w=o.stateNode;try{Ze(w,"")}catch(De){jt(o,o.return,De)}}if(g&4&&(w=o.stateNode,w!=null)){var b=o.memoizedProps,T=c!==null?c.memoizedProps:b,L=o.type,U=o.updateQueue;if(o.updateQueue=null,U!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&Zt(w,b),W(L,T);var se=W(L,b);for(T=0;T<U.length;T+=2){var me=U[T],ge=U[T+1];me==="style"?Un(w,ge):me==="dangerouslySetInnerHTML"?Ge(w,ge):me==="children"?Ze(w,ge):R(w,me,ge,se)}switch(L){case"input":Ct(w,b);break;case"textarea":Dr(w,b);break;case"select":var he=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!b.multiple;var _e=b.value;_e!=null?rr(w,!!b.multiple,_e,!1):he!==!!b.multiple&&(b.defaultValue!=null?rr(w,!!b.multiple,b.defaultValue,!0):rr(w,!!b.multiple,b.multiple?[]:"",!1))}w[$a]=b}catch(De){jt(o,o.return,De)}}break;case 6:if(Sr(s,o),Ur(o),g&4){if(o.stateNode===null)throw Error(n(162));w=o.stateNode,b=o.memoizedProps;try{w.nodeValue=b}catch(De){jt(o,o.return,De)}}break;case 3:if(Sr(s,o),Ur(o),g&4&&c!==null&&c.memoizedState.isDehydrated)try{Na(s.containerInfo)}catch(De){jt(o,o.return,De)}break;case 4:Sr(s,o),Ur(o);break;case 13:Sr(s,o),Ur(o),w=o.child,w.flags&8192&&(b=w.memoizedState!==null,w.stateNode.isHidden=b,!b||w.alternate!==null&&w.alternate.memoizedState!==null||(hp=Ot())),g&4&&gx(o);break;case 22:if(me=c!==null&&c.memoizedState!==null,o.mode&1?(ln=(se=ln)||me,Sr(s,o),ln=se):Sr(s,o),Ur(o),g&8192){if(se=o.memoizedState!==null,(o.stateNode.isHidden=se)&&!me&&(o.mode&1)!==0)for(Pe=o,me=o.child;me!==null;){for(ge=Pe=me;Pe!==null;){switch(he=Pe,_e=he.child,he.tag){case 0:case 11:case 14:case 15:Qa(4,he,he.return);break;case 1:Cs(he,he.return);var je=he.stateNode;if(typeof je.componentWillUnmount=="function"){g=he,c=he.return;try{s=g,je.props=s.memoizedProps,je.state=s.memoizedState,je.componentWillUnmount()}catch(De){jt(g,c,De)}}break;case 5:Cs(he,he.return);break;case 22:if(he.memoizedState!==null){wx(ge);continue}}_e!==null?(_e.return=he,Pe=_e):wx(ge)}me=me.sibling}e:for(me=null,ge=o;;){if(ge.tag===5){if(me===null){me=ge;try{w=ge.stateNode,se?(b=w.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=ge.stateNode,U=ge.memoizedProps.style,T=U!=null&&U.hasOwnProperty("display")?U.display:null,L.style.display=rn("display",T))}catch(De){jt(o,o.return,De)}}}else if(ge.tag===6){if(me===null)try{ge.stateNode.nodeValue=se?"":ge.memoizedProps}catch(De){jt(o,o.return,De)}}else if((ge.tag!==22&&ge.tag!==23||ge.memoizedState===null||ge===o)&&ge.child!==null){ge.child.return=ge,ge=ge.child;continue}if(ge===o)break e;for(;ge.sibling===null;){if(ge.return===null||ge.return===o)break e;me===ge&&(me=null),ge=ge.return}me===ge&&(me=null),ge.sibling.return=ge.return,ge=ge.sibling}}break;case 19:Sr(s,o),Ur(o),g&4&&gx(o);break;case 21:break;default:Sr(s,o),Ur(o)}}function Ur(o){var s=o.flags;if(s&2){try{e:{for(var c=o.return;c!==null;){if(px(c)){var g=c;break e}c=c.return}throw Error(n(160))}switch(g.tag){case 5:var w=g.stateNode;g.flags&32&&(Ze(w,""),g.flags&=-33);var b=hx(o);dp(o,b,w);break;case 3:case 4:var T=g.stateNode.containerInfo,L=hx(o);cp(o,L,T);break;default:throw Error(n(161))}}catch(U){jt(o,o.return,U)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function HT(o,s,c){Pe=o,vx(o)}function vx(o,s,c){for(var g=(o.mode&1)!==0;Pe!==null;){var w=Pe,b=w.child;if(w.tag===22&&g){var T=w.memoizedState!==null||Vu;if(!T){var L=w.alternate,U=L!==null&&L.memoizedState!==null||ln;L=Vu;var se=ln;if(Vu=T,(ln=U)&&!se)for(Pe=w;Pe!==null;)T=Pe,U=T.child,T.tag===22&&T.memoizedState!==null?bx(w):U!==null?(U.return=T,Pe=U):bx(w);for(;b!==null;)Pe=b,vx(b),b=b.sibling;Pe=w,Vu=L,ln=se}xx(o)}else(w.subtreeFlags&8772)!==0&&b!==null?(b.return=w,Pe=b):xx(o)}}function xx(o){for(;Pe!==null;){var s=Pe;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:ln||Hu(5,s);break;case 1:var g=s.stateNode;if(s.flags&4&&!ln)if(c===null)g.componentDidMount();else{var w=s.elementType===s.type?c.memoizedProps:br(s.type,c.memoizedProps);g.componentDidUpdate(w,c.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&wv(s,b,g);break;case 3:var T=s.updateQueue;if(T!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}wv(s,T,c)}break;case 5:var L=s.stateNode;if(c===null&&s.flags&4){c=L;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&c.focus();break;case"img":U.src&&(c.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var se=s.alternate;if(se!==null){var me=se.memoizedState;if(me!==null){var ge=me.dehydrated;ge!==null&&Na(ge)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}ln||s.flags&512&&up(s)}catch(he){jt(s,s.return,he)}}if(s===o){Pe=null;break}if(c=s.sibling,c!==null){c.return=s.return,Pe=c;break}Pe=s.return}}function wx(o){for(;Pe!==null;){var s=Pe;if(s===o){Pe=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Pe=c;break}Pe=s.return}}function bx(o){for(;Pe!==null;){var s=Pe;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{Hu(4,s)}catch(U){jt(s,c,U)}break;case 1:var g=s.stateNode;if(typeof g.componentDidMount=="function"){var w=s.return;try{g.componentDidMount()}catch(U){jt(s,w,U)}}var b=s.return;try{up(s)}catch(U){jt(s,b,U)}break;case 5:var T=s.return;try{up(s)}catch(U){jt(s,T,U)}}}catch(U){jt(s,s.return,U)}if(s===o){Pe=null;break}var L=s.sibling;if(L!==null){L.return=s.return,Pe=L;break}Pe=s.return}}var WT=Math.ceil,Wu=O.ReactCurrentDispatcher,fp=O.ReactCurrentOwner,ur=O.ReactCurrentBatchConfig,st=0,Kt=null,Mt=null,tn=0,Qn=0,Es=To(0),Bt=0,Ya=null,Si=0,qu=0,pp=0,Za=null,Pn=null,hp=0,_s=1/0,uo=null,Ku=!1,mp=null,Io=null,Gu=!1,Mo=null,Qu=0,Ja=0,gp=null,Yu=-1,Zu=0;function mn(){return(st&6)!==0?Ot():Yu!==-1?Yu:Yu=Ot()}function Lo(o){return(o.mode&1)===0?1:(st&2)!==0&&tn!==0?tn&-tn:TT.transition!==null?(Zu===0&&(Zu=hy()),Zu):(o=pt,o!==0||(o=window.event,o=o===void 0?16:Sy(o.type)),o)}function Cr(o,s,c,g){if(50<Ja)throw Ja=0,gp=null,Error(n(185));ka(o,c,g),((st&2)===0||o!==Kt)&&(o===Kt&&((st&2)===0&&(qu|=c),Bt===4&&Do(o,tn)),jn(o,g),c===1&&st===0&&(s.mode&1)===0&&(_s=Ot()+500,Eu&&jo()))}function jn(o,s){var c=o.callbackNode;TN(o,s);var g=su(o,o===Kt?tn:0);if(g===0)c!==null&&dy(c),o.callbackNode=null,o.callbackPriority=0;else if(s=g&-g,o.callbackPriority!==s){if(c!=null&&dy(c),s===1)o.tag===0?NT(Sx.bind(null,o)):lv(Sx.bind(null,o)),ST(function(){(st&6)===0&&jo()}),c=null;else{switch(my(g)){case 1:c=Gd;break;case 4:c=fy;break;case 16:c=nu;break;case 536870912:c=py;break;default:c=nu}c=Rx(c,kx.bind(null,o))}o.callbackPriority=s,o.callbackNode=c}}function kx(o,s){if(Yu=-1,Zu=0,(st&6)!==0)throw Error(n(327));var c=o.callbackNode;if(Ns()&&o.callbackNode!==c)return null;var g=su(o,o===Kt?tn:0);if(g===0)return null;if((g&30)!==0||(g&o.expiredLanes)!==0||s)s=Ju(o,g);else{s=g;var w=st;st|=2;var b=Ex();(Kt!==o||tn!==s)&&(uo=null,_s=Ot()+500,Ei(o,s));do try{GT();break}catch(L){Cx(o,L)}while(!0);If(),Wu.current=b,st=w,Mt!==null?s=0:(Kt=null,tn=0,s=Bt)}if(s!==0){if(s===2&&(w=Qd(o),w!==0&&(g=w,s=yp(o,w))),s===1)throw c=Ya,Ei(o,0),Do(o,g),jn(o,Ot()),c;if(s===6)Do(o,g);else{if(w=o.current.alternate,(g&30)===0&&!qT(w)&&(s=Ju(o,g),s===2&&(b=Qd(o),b!==0&&(g=b,s=yp(o,b))),s===1))throw c=Ya,Ei(o,0),Do(o,g),jn(o,Ot()),c;switch(o.finishedWork=w,o.finishedLanes=g,s){case 0:case 1:throw Error(n(345));case 2:_i(o,Pn,uo);break;case 3:if(Do(o,g),(g&130023424)===g&&(s=hp+500-Ot(),10<s)){if(su(o,0)!==0)break;if(w=o.suspendedLanes,(w&g)!==g){mn(),o.pingedLanes|=o.suspendedLanes&w;break}o.timeoutHandle=Sf(_i.bind(null,o,Pn,uo),s);break}_i(o,Pn,uo);break;case 4:if(Do(o,g),(g&4194240)===g)break;for(s=o.eventTimes,w=-1;0<g;){var T=31-vr(g);b=1<<T,T=s[T],T>w&&(w=T),g&=~b}if(g=w,g=Ot()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*WT(g/1960))-g,10<g){o.timeoutHandle=Sf(_i.bind(null,o,Pn,uo),g);break}_i(o,Pn,uo);break;case 5:_i(o,Pn,uo);break;default:throw Error(n(329))}}}return jn(o,Ot()),o.callbackNode===c?kx.bind(null,o):null}function yp(o,s){var c=Za;return o.current.memoizedState.isDehydrated&&(Ei(o,s).flags|=256),o=Ju(o,s),o!==2&&(s=Pn,Pn=c,s!==null&&vp(s)),o}function vp(o){Pn===null?Pn=o:Pn.push.apply(Pn,o)}function qT(o){for(var s=o;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var g=0;g<c.length;g++){var w=c[g],b=w.getSnapshot;w=w.value;try{if(!xr(b(),w))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Do(o,s){for(s&=~pp,s&=~qu,o.suspendedLanes|=s,o.pingedLanes&=~s,o=o.expirationTimes;0<s;){var c=31-vr(s),g=1<<c;o[c]=-1,s&=~g}}function Sx(o){if((st&6)!==0)throw Error(n(327));Ns();var s=su(o,0);if((s&1)===0)return jn(o,Ot()),null;var c=Ju(o,s);if(o.tag!==0&&c===2){var g=Qd(o);g!==0&&(s=g,c=yp(o,g))}if(c===1)throw c=Ya,Ei(o,0),Do(o,s),jn(o,Ot()),c;if(c===6)throw Error(n(345));return o.finishedWork=o.current.alternate,o.finishedLanes=s,_i(o,Pn,uo),jn(o,Ot()),null}function xp(o,s){var c=st;st|=1;try{return o(s)}finally{st=c,st===0&&(_s=Ot()+500,Eu&&jo())}}function Ci(o){Mo!==null&&Mo.tag===0&&(st&6)===0&&Ns();var s=st;st|=1;var c=ur.transition,g=pt;try{if(ur.transition=null,pt=1,o)return o()}finally{pt=g,ur.transition=c,st=s,(st&6)===0&&jo()}}function wp(){Qn=Es.current,kt(Es)}function Ei(o,s){o.finishedWork=null,o.finishedLanes=0;var c=o.timeoutHandle;if(c!==-1&&(o.timeoutHandle=-1,kT(c)),Mt!==null)for(c=Mt.return;c!==null;){var g=c;switch(Pf(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&Su();break;case 3:ks(),kt(_n),kt(on),Uf();break;case 5:Ff(g);break;case 4:ks();break;case 13:kt(_t);break;case 19:kt(_t);break;case 10:Mf(g.type._context);break;case 22:case 23:wp()}c=c.return}if(Kt=o,Mt=o=$o(o.current,null),tn=Qn=s,Bt=0,Ya=null,pp=qu=Si=0,Pn=Za=null,wi!==null){for(s=0;s<wi.length;s++)if(c=wi[s],g=c.interleaved,g!==null){c.interleaved=null;var w=g.next,b=c.pending;if(b!==null){var T=b.next;b.next=w,g.next=T}c.pending=g}wi=null}return o}function Cx(o,s){do{var c=Mt;try{if(If(),Mu.current=zu,Lu){for(var g=Nt.memoizedState;g!==null;){var w=g.queue;w!==null&&(w.pending=null),g=g.next}Lu=!1}if(ki=0,qt=Ft=Nt=null,Ha=!1,Wa=0,fp.current=null,c===null||c.return===null){Bt=1,Ya=s,Mt=null;break}e:{var b=o,T=c.return,L=c,U=s;if(s=tn,L.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var se=U,me=L,ge=me.tag;if((me.mode&1)===0&&(ge===0||ge===11||ge===15)){var he=me.alternate;he?(me.updateQueue=he.updateQueue,me.memoizedState=he.memoizedState,me.lanes=he.lanes):(me.updateQueue=null,me.memoizedState=null)}var _e=Qv(T);if(_e!==null){_e.flags&=-257,Yv(_e,T,L,b,s),_e.mode&1&&Gv(b,se,s),s=_e,U=se;var je=s.updateQueue;if(je===null){var De=new Set;De.add(U),s.updateQueue=De}else je.add(U);break e}else{if((s&1)===0){Gv(b,se,s),bp();break e}U=Error(n(426))}}else if(St&&L.mode&1){var At=Qv(T);if(At!==null){(At.flags&65536)===0&&(At.flags|=256),Yv(At,T,L,b,s),Of(Ss(U,L));break e}}b=U=Ss(U,L),Bt!==4&&(Bt=2),Za===null?Za=[b]:Za.push(b),b=T;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var J=qv(b,U,s);xv(b,J);break e;case 1:L=U;var V=b.type,ne=b.stateNode;if((b.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||ne!==null&&typeof ne.componentDidCatch=="function"&&(Io===null||!Io.has(ne)))){b.flags|=65536,s&=-s,b.lanes|=s;var xe=Kv(b,L,s);xv(b,xe);break e}}b=b.return}while(b!==null)}Nx(c)}catch($e){s=$e,Mt===c&&c!==null&&(Mt=c=c.return);continue}break}while(!0)}function Ex(){var o=Wu.current;return Wu.current=zu,o===null?zu:o}function bp(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Kt===null||(Si&268435455)===0&&(qu&268435455)===0||Do(Kt,tn)}function Ju(o,s){var c=st;st|=2;var g=Ex();(Kt!==o||tn!==s)&&(uo=null,Ei(o,s));do try{KT();break}catch(w){Cx(o,w)}while(!0);if(If(),st=c,Wu.current=g,Mt!==null)throw Error(n(261));return Kt=null,tn=0,Bt}function KT(){for(;Mt!==null;)_x(Mt)}function GT(){for(;Mt!==null&&!xN();)_x(Mt)}function _x(o){var s=jx(o.alternate,o,Qn);o.memoizedProps=o.pendingProps,s===null?Nx(o):Mt=s,fp.current=null}function Nx(o){var s=o;do{var c=s.alternate;if(o=s.return,(s.flags&32768)===0){if(c=FT(c,s,Qn),c!==null){Mt=c;return}}else{if(c=BT(c,s),c!==null){c.flags&=32767,Mt=c;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{Bt=6,Mt=null;return}}if(s=s.sibling,s!==null){Mt=s;return}Mt=s=o}while(s!==null);Bt===0&&(Bt=5)}function _i(o,s,c){var g=pt,w=ur.transition;try{ur.transition=null,pt=1,QT(o,s,c,g)}finally{ur.transition=w,pt=g}return null}function QT(o,s,c,g){do Ns();while(Mo!==null);if((st&6)!==0)throw Error(n(327));c=o.finishedWork;var w=o.finishedLanes;if(c===null)return null;if(o.finishedWork=null,o.finishedLanes=0,c===o.current)throw Error(n(177));o.callbackNode=null,o.callbackPriority=0;var b=c.lanes|c.childLanes;if(PN(o,b),o===Kt&&(Mt=Kt=null,tn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Gu||(Gu=!0,Rx(nu,function(){return Ns(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=ur.transition,ur.transition=null;var T=pt;pt=1;var L=st;st|=4,fp.current=null,VT(o,c),yx(c,o),mT(bf),uu=!!wf,bf=wf=null,o.current=c,HT(c),wN(),st=L,pt=T,ur.transition=b}else o.current=c;if(Gu&&(Gu=!1,Mo=o,Qu=w),b=o.pendingLanes,b===0&&(Io=null),SN(c.stateNode),jn(o,Ot()),s!==null)for(g=o.onRecoverableError,c=0;c<s.length;c++)w=s[c],g(w.value,{componentStack:w.stack,digest:w.digest});if(Ku)throw Ku=!1,o=mp,mp=null,o;return(Qu&1)!==0&&o.tag!==0&&Ns(),b=o.pendingLanes,(b&1)!==0?o===gp?Ja++:(Ja=0,gp=o):Ja=0,jo(),null}function Ns(){if(Mo!==null){var o=my(Qu),s=ur.transition,c=pt;try{if(ur.transition=null,pt=16>o?16:o,Mo===null)var g=!1;else{if(o=Mo,Mo=null,Qu=0,(st&6)!==0)throw Error(n(331));var w=st;for(st|=4,Pe=o.current;Pe!==null;){var b=Pe,T=b.child;if((Pe.flags&16)!==0){var L=b.deletions;if(L!==null){for(var U=0;U<L.length;U++){var se=L[U];for(Pe=se;Pe!==null;){var me=Pe;switch(me.tag){case 0:case 11:case 15:Qa(8,me,b)}var ge=me.child;if(ge!==null)ge.return=me,Pe=ge;else for(;Pe!==null;){me=Pe;var he=me.sibling,_e=me.return;if(fx(me),me===se){Pe=null;break}if(he!==null){he.return=_e,Pe=he;break}Pe=_e}}}var je=b.alternate;if(je!==null){var De=je.child;if(De!==null){je.child=null;do{var At=De.sibling;De.sibling=null,De=At}while(De!==null)}}Pe=b}}if((b.subtreeFlags&2064)!==0&&T!==null)T.return=b,Pe=T;else e:for(;Pe!==null;){if(b=Pe,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Qa(9,b,b.return)}var J=b.sibling;if(J!==null){J.return=b.return,Pe=J;break e}Pe=b.return}}var V=o.current;for(Pe=V;Pe!==null;){T=Pe;var ne=T.child;if((T.subtreeFlags&2064)!==0&&ne!==null)ne.return=T,Pe=ne;else e:for(T=V;Pe!==null;){if(L=Pe,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:Hu(9,L)}}catch($e){jt(L,L.return,$e)}if(L===T){Pe=null;break e}var xe=L.sibling;if(xe!==null){xe.return=L.return,Pe=xe;break e}Pe=L.return}}if(st=w,jo(),$r&&typeof $r.onPostCommitFiberRoot=="function")try{$r.onPostCommitFiberRoot(ru,o)}catch{}g=!0}return g}finally{pt=c,ur.transition=s}}return!1}function Tx(o,s,c){s=Ss(c,s),s=qv(o,s,1),o=Oo(o,s,1),s=mn(),o!==null&&(ka(o,1,s),jn(o,s))}function jt(o,s,c){if(o.tag===3)Tx(o,o,c);else for(;s!==null;){if(s.tag===3){Tx(s,o,c);break}else if(s.tag===1){var g=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Io===null||!Io.has(g))){o=Ss(c,o),o=Kv(s,o,1),s=Oo(s,o,1),o=mn(),s!==null&&(ka(s,1,o),jn(s,o));break}}s=s.return}}function YT(o,s,c){var g=o.pingCache;g!==null&&g.delete(s),s=mn(),o.pingedLanes|=o.suspendedLanes&c,Kt===o&&(tn&c)===c&&(Bt===4||Bt===3&&(tn&130023424)===tn&&500>Ot()-hp?Ei(o,0):pp|=c),jn(o,s)}function Px(o,s){s===0&&((o.mode&1)===0?s=1:(s=iu,iu<<=1,(iu&130023424)===0&&(iu=4194304)));var c=mn();o=so(o,s),o!==null&&(ka(o,s,c),jn(o,c))}function ZT(o){var s=o.memoizedState,c=0;s!==null&&(c=s.retryLane),Px(o,c)}function JT(o,s){var c=0;switch(o.tag){case 13:var g=o.stateNode,w=o.memoizedState;w!==null&&(c=w.retryLane);break;case 19:g=o.stateNode;break;default:throw Error(n(314))}g!==null&&g.delete(s),Px(o,c)}var jx;jx=function(o,s,c){if(o!==null)if(o.memoizedProps!==s.pendingProps||_n.current)Tn=!0;else{if((o.lanes&c)===0&&(s.flags&128)===0)return Tn=!1,zT(o,s,c);Tn=(o.flags&131072)!==0}else Tn=!1,St&&(s.flags&1048576)!==0&&uv(s,Nu,s.index);switch(s.lanes=0,s.tag){case 2:var g=s.type;Uu(o,s),o=s.pendingProps;var w=ms(s,on.current);bs(s,c),w=Wf(null,s,g,o,w,c);var b=qf();return s.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(g)?(b=!0,Cu(s)):b=!1,s.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,$f(s),w.updater=Fu,s.stateNode=w,w._reactInternals=s,Jf(s,g,o,c),s=np(null,s,g,!0,b,c)):(s.tag=0,St&&b&&Tf(s),hn(null,s,w,c),s=s.child),s;case 16:g=s.elementType;e:{switch(Uu(o,s),o=s.pendingProps,w=g._init,g=w(g._payload),s.type=g,w=s.tag=e2(g),o=br(g,o),w){case 0:s=tp(null,s,g,o,c);break e;case 1:s=nx(null,s,g,o,c);break e;case 11:s=Zv(null,s,g,o,c);break e;case 14:s=Jv(null,s,g,br(g.type,o),c);break e}throw Error(n(306,g,""))}return s;case 0:return g=s.type,w=s.pendingProps,w=s.elementType===g?w:br(g,w),tp(o,s,g,w,c);case 1:return g=s.type,w=s.pendingProps,w=s.elementType===g?w:br(g,w),nx(o,s,g,w,c);case 3:e:{if(rx(s),o===null)throw Error(n(387));g=s.pendingProps,b=s.memoizedState,w=b.element,vv(o,s),Au(s,g,null,c);var T=s.memoizedState;if(g=T.element,b.isDehydrated)if(b={element:g,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){w=Ss(Error(n(423)),s),s=ox(o,s,g,c,w);break e}else if(g!==w){w=Ss(Error(n(424)),s),s=ox(o,s,g,c,w);break e}else for(Gn=No(s.stateNode.containerInfo.firstChild),Kn=s,St=!0,wr=null,c=gv(s,null,g,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(vs(),g===w){s=lo(o,s,c);break e}hn(o,s,g,c)}s=s.child}return s;case 5:return bv(s),o===null&&Rf(s),g=s.type,w=s.pendingProps,b=o!==null?o.memoizedProps:null,T=w.children,kf(g,w)?T=null:b!==null&&kf(g,b)&&(s.flags|=32),tx(o,s),hn(o,s,T,c),s.child;case 6:return o===null&&Rf(s),null;case 13:return ix(o,s,c);case 4:return zf(s,s.stateNode.containerInfo),g=s.pendingProps,o===null?s.child=xs(s,null,g,c):hn(o,s,g,c),s.child;case 11:return g=s.type,w=s.pendingProps,w=s.elementType===g?w:br(g,w),Zv(o,s,g,w,c);case 7:return hn(o,s,s.pendingProps,c),s.child;case 8:return hn(o,s,s.pendingProps.children,c),s.child;case 12:return hn(o,s,s.pendingProps.children,c),s.child;case 10:e:{if(g=s.type._context,w=s.pendingProps,b=s.memoizedProps,T=w.value,yt(ju,g._currentValue),g._currentValue=T,b!==null)if(xr(b.value,T)){if(b.children===w.children&&!_n.current){s=lo(o,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){T=b.child;for(var U=L.firstContext;U!==null;){if(U.context===g){if(b.tag===1){U=ao(-1,c&-c),U.tag=2;var se=b.updateQueue;if(se!==null){se=se.shared;var me=se.pending;me===null?U.next=U:(U.next=me.next,me.next=U),se.pending=U}}b.lanes|=c,U=b.alternate,U!==null&&(U.lanes|=c),Lf(b.return,c,s),L.lanes|=c;break}U=U.next}}else if(b.tag===10)T=b.type===s.type?null:b.child;else if(b.tag===18){if(T=b.return,T===null)throw Error(n(341));T.lanes|=c,L=T.alternate,L!==null&&(L.lanes|=c),Lf(T,c,s),T=b.sibling}else T=b.child;if(T!==null)T.return=b;else for(T=b;T!==null;){if(T===s){T=null;break}if(b=T.sibling,b!==null){b.return=T.return,T=b;break}T=T.return}b=T}hn(o,s,w.children,c),s=s.child}return s;case 9:return w=s.type,g=s.pendingProps.children,bs(s,c),w=ar(w),g=g(w),s.flags|=1,hn(o,s,g,c),s.child;case 14:return g=s.type,w=br(g,s.pendingProps),w=br(g.type,w),Jv(o,s,g,w,c);case 15:return Xv(o,s,s.type,s.pendingProps,c);case 17:return g=s.type,w=s.pendingProps,w=s.elementType===g?w:br(g,w),Uu(o,s),s.tag=1,Nn(g)?(o=!0,Cu(s)):o=!1,bs(s,c),Hv(s,g,w),Jf(s,g,w,c),np(null,s,g,!0,o,c);case 19:return ax(o,s,c);case 22:return ex(o,s,c)}throw Error(n(156,s.tag))};function Rx(o,s){return cy(o,s)}function XT(o,s,c,g){this.tag=o,this.key=c,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=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cr(o,s,c,g){return new XT(o,s,c,g)}function kp(o){return o=o.prototype,!(!o||!o.isReactComponent)}function e2(o){if(typeof o=="function")return kp(o)?1:0;if(o!=null){if(o=o.$$typeof,o===ee)return 11;if(o===G)return 14}return 2}function $o(o,s){var c=o.alternate;return c===null?(c=cr(o.tag,s,o.key,o.mode),c.elementType=o.elementType,c.type=o.type,c.stateNode=o.stateNode,c.alternate=o,o.alternate=c):(c.pendingProps=s,c.type=o.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=o.flags&14680064,c.childLanes=o.childLanes,c.lanes=o.lanes,c.child=o.child,c.memoizedProps=o.memoizedProps,c.memoizedState=o.memoizedState,c.updateQueue=o.updateQueue,s=o.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=o.sibling,c.index=o.index,c.ref=o.ref,c}function Xu(o,s,c,g,w,b){var T=2;if(g=o,typeof o=="function")kp(o)&&(T=1);else if(typeof o=="string")T=5;else e:switch(o){case z:return Ni(c.children,w,b,s);case I:T=8,w|=8;break;case D:return o=cr(12,c,s,w|2),o.elementType=D,o.lanes=b,o;case le:return o=cr(13,c,s,w),o.elementType=le,o.lanes=b,o;case oe:return o=cr(19,c,s,w),o.elementType=oe,o.lanes=b,o;case ue:return ec(c,w,b,s);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case j:T=10;break e;case H:T=9;break e;case ee:T=11;break e;case G:T=14;break e;case X:T=16,g=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return s=cr(T,c,s,w),s.elementType=o,s.type=g,s.lanes=b,s}function Ni(o,s,c,g){return o=cr(7,o,g,s),o.lanes=c,o}function ec(o,s,c,g){return o=cr(22,o,g,s),o.elementType=ue,o.lanes=c,o.stateNode={isHidden:!1},o}function Sp(o,s,c){return o=cr(6,o,null,s),o.lanes=c,o}function Cp(o,s,c){return s=cr(4,o.children!==null?o.children:[],o.key,s),s.lanes=c,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}function t2(o,s,c,g,w){this.tag=s,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yd(0),this.expirationTimes=Yd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yd(0),this.identifierPrefix=g,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function Ep(o,s,c,g,w,b,T,L,U){return o=new t2(o,s,c,L,U),s===1?(s=1,b===!0&&(s|=8)):s=0,b=cr(3,null,null,s),o.current=b,b.stateNode=o,b.memoizedState={element:g,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},$f(b),o}function n2(o,s,c){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:g==null?null:""+g,children:o,containerInfo:s,implementation:c}}function Ox(o){if(!o)return Po;o=o._reactInternals;e:{if(mi(o)!==o||o.tag!==1)throw Error(n(170));var s=o;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(o.tag===1){var c=o.type;if(Nn(c))return sv(o,c,s)}return s}function Ax(o,s,c,g,w,b,T,L,U){return o=Ep(c,g,!0,o,w,b,T,L,U),o.context=Ox(null),c=o.current,g=mn(),w=Lo(c),b=ao(g,w),b.callback=s??null,Oo(c,b,w),o.current.lanes=w,ka(o,w,g),jn(o,g),o}function tc(o,s,c,g){var w=s.current,b=mn(),T=Lo(w);return c=Ox(c),s.context===null?s.context=c:s.pendingContext=c,s=ao(b,T),s.payload={element:o},g=g===void 0?null:g,g!==null&&(s.callback=g),o=Oo(w,s,T),o!==null&&(Cr(o,w,T,b),Ou(o,w,T)),T}function nc(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function Ix(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var c=o.retryLane;o.retryLane=c!==0&&c<s?c:s}}function _p(o,s){Ix(o,s),(o=o.alternate)&&Ix(o,s)}function r2(){return null}var Mx=typeof reportError=="function"?reportError:function(o){console.error(o)};function Np(o){this._internalRoot=o}rc.prototype.render=Np.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(n(409));tc(o,s,null,null)},rc.prototype.unmount=Np.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;Ci(function(){tc(null,o,null,null)}),s[no]=null}};function rc(o){this._internalRoot=o}rc.prototype.unstable_scheduleHydration=function(o){if(o){var s=vy();o={blockedOn:null,target:o,priority:s};for(var c=0;c<Co.length&&s!==0&&s<Co[c].priority;c++);Co.splice(c,0,o),c===0&&by(o)}};function Tp(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function oc(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function Lx(){}function o2(o,s,c,g,w){if(w){if(typeof g=="function"){var b=g;g=function(){var se=nc(T);b.call(se)}}var T=Ax(s,g,o,0,null,!1,!1,"",Lx);return o._reactRootContainer=T,o[no]=T.current,La(o.nodeType===8?o.parentNode:o),Ci(),T}for(;w=o.lastChild;)o.removeChild(w);if(typeof g=="function"){var L=g;g=function(){var se=nc(U);L.call(se)}}var U=Ep(o,0,!1,null,null,!1,!1,"",Lx);return o._reactRootContainer=U,o[no]=U.current,La(o.nodeType===8?o.parentNode:o),Ci(function(){tc(s,U,c,g)}),U}function ic(o,s,c,g,w){var b=c._reactRootContainer;if(b){var T=b;if(typeof w=="function"){var L=w;w=function(){var U=nc(T);L.call(U)}}tc(s,T,o,w)}else T=o2(c,s,o,w,g);return nc(T)}gy=function(o){switch(o.tag){case 3:var s=o.stateNode;if(s.current.memoizedState.isDehydrated){var c=ba(s.pendingLanes);c!==0&&(Zd(s,c|1),jn(s,Ot()),(st&6)===0&&(_s=Ot()+500,jo()))}break;case 13:Ci(function(){var g=so(o,1);if(g!==null){var w=mn();Cr(g,o,1,w)}}),_p(o,1)}},Jd=function(o){if(o.tag===13){var s=so(o,134217728);if(s!==null){var c=mn();Cr(s,o,134217728,c)}_p(o,134217728)}},yy=function(o){if(o.tag===13){var s=Lo(o),c=so(o,s);if(c!==null){var g=mn();Cr(c,o,s,g)}_p(o,s)}},vy=function(){return pt},xy=function(o,s){var c=pt;try{return pt=o,s()}finally{pt=c}},Ce=function(o,s,c){switch(s){case"input":if(Ct(o,c),s=c.name,c.type==="radio"&&s!=null){for(c=o;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var g=c[s];if(g!==o&&g.form===o.form){var w=ku(g);if(!w)throw Error(n(90));pe(g),Ct(g,w)}}}break;case"textarea":Dr(o,c);break;case"select":s=c.value,s!=null&&rr(o,!!c.multiple,s,!1)}},ht=xp,Pt=Ci;var i2={usingClientEntryPoint:!1,Events:[za,ps,ku,Ae,ot,xp]},Xa={findFiberByHostInstance:gi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},s2={bundleType:Xa.bundleType,version:Xa.version,rendererPackageName:Xa.rendererPackageName,rendererConfig:Xa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=ly(o),o===null?null:o.stateNode},findFiberByHostInstance:Xa.findFiberByHostInstance||r2,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 sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{ru=sc.inject(s2),$r=sc}catch{}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i2,Rn.createPortal=function(o,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Tp(s))throw Error(n(200));return n2(o,s,null,c)},Rn.createRoot=function(o,s){if(!Tp(o))throw Error(n(299));var c=!1,g="",w=Mx;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(g=s.identifierPrefix),s.onRecoverableError!==void 0&&(w=s.onRecoverableError)),s=Ep(o,1,!1,null,null,c,!1,g,w),o[no]=s.current,La(o.nodeType===8?o.parentNode:o),new Np(s)},Rn.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var s=o._reactInternals;if(s===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=ly(s),o=o===null?null:o.stateNode,o},Rn.flushSync=function(o){return Ci(o)},Rn.hydrate=function(o,s,c){if(!oc(s))throw Error(n(200));return ic(null,o,s,!0,c)},Rn.hydrateRoot=function(o,s,c){if(!Tp(o))throw Error(n(405));var g=c!=null&&c.hydratedSources||null,w=!1,b="",T=Mx;if(c!=null&&(c.unstable_strictMode===!0&&(w=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(T=c.onRecoverableError)),s=Ax(s,null,o,1,c??null,w,!1,b,T),o[no]=s.current,La(o),g)for(o=0;o<g.length;o++)c=g[o],w=c._getVersion,w=w(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,w]:s.mutableSourceEagerHydrationData.push(c,w);return new rc(s)},Rn.render=function(o,s,c){if(!oc(s))throw Error(n(200));return ic(null,o,s,!1,c)},Rn.unmountComponentAtNode=function(o){if(!oc(o))throw Error(n(40));return o._reactRootContainer?(Ci(function(){ic(null,null,o,!1,function(){o._reactRootContainer=null,o[no]=null})}),!0):!1},Rn.unstable_batchedUpdates=xp,Rn.unstable_renderSubtreeIntoContainer=function(o,s,c,g){if(!oc(c))throw Error(n(200));if(o==null||o._reactInternals===void 0)throw Error(n(38));return ic(o,s,c,!1,g)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var qx;function A0(){if(qx)return Op.exports;qx=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(),Op.exports=g2(),Op.exports}var Kx;function y2(){if(Kx)return lc;Kx=1;var e=A0();return lc.createRoot=e.createRoot,lc.hydrateRoot=e.hydrateRoot,lc}var v2=y2();const x2=zl(v2);var Fl=A0();const I0=zl(Fl);function w2(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const b2=e=>{switch(e){case"success":return C2;case"info":return _2;case"warning":return E2;case"error":return N2;default:return null}},k2=Array(12).fill(0),S2=({visible:e,className:t})=>ve.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ve.createElement("div",{className:"sonner-spinner"},k2.map((n,r)=>ve.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),C2=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.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"})),E2=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ve.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"})),_2=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.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"})),N2=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.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"})),T2=ve.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"},ve.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ve.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),P2=()=>{const[e,t]=ve.useState(document.hidden);return ve.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let kh=1;class j2{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:kh++,l=this.toasts.find(f=>f.id===a),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),l?this.toasts=this.toasts.map(f=>f.id===a?(this.publish({...f,...t,id:a,title:r}),{...f,...t,id:a,dismissible:u,title:r}):f):this.addToast({title:r,...i,dismissible:u,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,l;const u=i.then(async p=>{if(l=["resolve",p],ve.isValidElement(p))a=!1,this.create({id:r,type:"default",message:p});else if(O2(p)&&!p.ok){a=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${p.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${p.status}`):n.description,S=typeof d=="object"&&!ve.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:v,...S})}else if(p instanceof Error){a=!1;const d=typeof n.error=="function"?await n.error(p):n.error,v=typeof n.description=="function"?await n.description(p):n.description,S=typeof d=="object"&&!ve.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:v,...S})}else if(n.success!==void 0){a=!1;const d=typeof n.success=="function"?await n.success(p):n.success,v=typeof n.description=="function"?await n.description(p):n.description,S=typeof d=="object"&&!ve.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:v,...S})}}).catch(async p=>{if(l=["reject",p],n.error!==void 0){a=!1;const m=typeof n.error=="function"?await n.error(p):n.error,d=typeof n.description=="function"?await n.description(p):n.description,x=typeof m=="object"&&!ve.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:d,...x})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((p,m)=>u.then(()=>l[0]==="reject"?m(l[1]):p(l[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:f}:Object.assign(r,{unwrap:f})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||kh++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ln=new j2,R2=(e,t)=>{const n=(t==null?void 0:t.id)||kh++;return Ln.addToast({title:e,...t,id:n}),n},O2=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",A2=R2,I2=()=>Ln.toasts,M2=()=>Ln.getActiveToasts(),wl=Object.assign(A2,{success:Ln.success,info:Ln.info,warning:Ln.warning,error:Ln.error,custom:Ln.custom,message:Ln.message,promise:Ln.promise,dismiss:Ln.dismiss,loading:Ln.loading},{getHistory:I2,getToasts:M2});w2("[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 uc(e){return e.label!==void 0}const L2=3,D2="24px",$2="16px",Gx=4e3,z2=356,F2=14,B2=45,U2=200;function Vr(...e){return e.filter(Boolean).join(" ")}function V2(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const H2=e=>{var t,n,r,i,a,l,u,f,p;const{invert:m,toast:d,unstyled:v,interacting:x,setHeights:S,visibleToasts:k,heights:E,index:C,toasts:P,expanded:R,removeToast:O,defaultRichColors:B,closeButton:A,style:z,cancelButtonStyle:I,actionButtonStyle:D,className:j="",descriptionClassName:H="",duration:ee,position:le,gap:oe,expandByDefault:G,classNames:X,icons:ue,closeButtonAriaLabel:Z="Close toast"}=e,[Q,N]=ve.useState(null),[M,$]=ve.useState(null),[_,ie]=ve.useState(!1),[K,ce]=ve.useState(!1),[ae,te]=ve.useState(!1),[re,we]=ve.useState(!1),[Ee,pe]=ve.useState(!1),[qe,ze]=ve.useState(0),[zt,Zt]=ve.useState(0),Ct=ve.useRef(d.duration||ee||Gx),Bn=ve.useRef(null),dt=ve.useRef(null),En=C===0,rr=C+1<=k,Tt=d.type,nn=d.dismissible!==!1,Dr=d.className||"",to=d.descriptionClassName||"",de=ve.useMemo(()=>E.findIndex(Ae=>Ae.toastId===d.id)||0,[E,d.id]),be=ve.useMemo(()=>{var Ae;return(Ae=d.closeButton)!=null?Ae:A},[d.closeButton,A]),Oe=ve.useMemo(()=>d.duration||ee||Gx,[d.duration,ee]),Ge=ve.useRef(0),Ze=ve.useRef(0),gt=ve.useRef(0),ft=ve.useRef(null),[rn,Un]=le.split("-"),Vn=ve.useMemo(()=>E.reduce((Ae,ot,ht)=>ht>=de?Ae:Ae+ot.height,0),[E,de]),Et=P2(),W=d.invert||m,fe=Tt==="loading";Ze.current=ve.useMemo(()=>de*oe+Vn,[de,Vn]),ve.useEffect(()=>{Ct.current=Oe},[Oe]),ve.useEffect(()=>{ie(!0)},[]),ve.useEffect(()=>{const Ae=dt.current;if(Ae){const ot=Ae.getBoundingClientRect().height;return Zt(ot),S(ht=>[{toastId:d.id,height:ot,position:d.position},...ht]),()=>S(ht=>ht.filter(Pt=>Pt.toastId!==d.id))}},[S,d.id]),ve.useLayoutEffect(()=>{if(!_)return;const Ae=dt.current,ot=Ae.style.height;Ae.style.height="auto";const ht=Ae.getBoundingClientRect().height;Ae.style.height=ot,Zt(ht),S(Pt=>Pt.find(wt=>wt.toastId===d.id)?Pt.map(wt=>wt.toastId===d.id?{...wt,height:ht}:wt):[{toastId:d.id,height:ht,position:d.position},...Pt])},[_,d.title,d.description,S,d.id,d.jsx,d.action,d.cancel]);const Se=ve.useCallback(()=>{ce(!0),ze(Ze.current),S(Ae=>Ae.filter(ot=>ot.toastId!==d.id)),setTimeout(()=>{O(d)},U2)},[d,O,S,Ze]);ve.useEffect(()=>{if(d.promise&&Tt==="loading"||d.duration===1/0||d.type==="loading")return;let Ae;return R||x||Et?(()=>{if(gt.current<Ge.current){const Pt=new Date().getTime()-Ge.current;Ct.current=Ct.current-Pt}gt.current=new Date().getTime()})():(()=>{Ct.current!==1/0&&(Ge.current=new Date().getTime(),Ae=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Se()},Ct.current))})(),()=>clearTimeout(Ae)},[R,x,d,Tt,Et,Se]),ve.useEffect(()=>{d.delete&&(Se(),d.onDismiss==null||d.onDismiss.call(d,d))},[Se,d.delete]);function Ce(){var Ae;if(ue!=null&&ue.loading){var ot;return ve.createElement("div",{className:Vr(X==null?void 0:X.loader,d==null||(ot=d.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Tt==="loading"},ue.loading)}return ve.createElement(S2,{className:Vr(X==null?void 0:X.loader,d==null||(Ae=d.classNames)==null?void 0:Ae.loader),visible:Tt==="loading"})}const Le=d.icon||(ue==null?void 0:ue[Tt])||b2(Tt);var at,Jt;return ve.createElement("li",{tabIndex:0,ref:dt,className:Vr(j,Dr,X==null?void 0:X.toast,d==null||(t=d.classNames)==null?void 0:t.toast,X==null?void 0:X.default,X==null?void 0:X[Tt],d==null||(n=d.classNames)==null?void 0:n[Tt]),"data-sonner-toast":"","data-rich-colors":(at=d.richColors)!=null?at:B,"data-styled":!(d.jsx||d.unstyled||v),"data-mounted":_,"data-promise":!!d.promise,"data-swiped":Ee,"data-removed":K,"data-visible":rr,"data-y-position":rn,"data-x-position":Un,"data-index":C,"data-front":En,"data-swiping":ae,"data-dismissible":nn,"data-type":Tt,"data-invert":W,"data-swipe-out":re,"data-swipe-direction":M,"data-expanded":!!(R||G&&_),"data-testid":d.testId,style:{"--index":C,"--toasts-before":C,"--z-index":P.length-C,"--offset":`${K?qe:Ze.current}px`,"--initial-height":G?"auto":`${zt}px`,...z,...d.style},onDragEnd:()=>{te(!1),N(null),ft.current=null},onPointerDown:Ae=>{Ae.button!==2&&(fe||!nn||(Bn.current=new Date,ze(Ze.current),Ae.target.setPointerCapture(Ae.pointerId),Ae.target.tagName!=="BUTTON"&&(te(!0),ft.current={x:Ae.clientX,y:Ae.clientY})))},onPointerUp:()=>{var Ae,ot,ht;if(re||!nn)return;ft.current=null;const Pt=Number(((Ae=dt.current)==null?void 0:Ae.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Hn=Number(((ot=dt.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),wt=new Date().getTime()-((ht=Bn.current)==null?void 0:ht.getTime()),Wt=Q==="x"?Pt:Hn,xo=Math.abs(Wt)/wt;if(Math.abs(Wt)>=B2||xo>.11){ze(Ze.current),d.onDismiss==null||d.onDismiss.call(d,d),$(Q==="x"?Pt>0?"right":"left":Hn>0?"down":"up"),Se(),we(!0);return}else{var Xt,Wn;(Xt=dt.current)==null||Xt.style.setProperty("--swipe-amount-x","0px"),(Wn=dt.current)==null||Wn.style.setProperty("--swipe-amount-y","0px")}pe(!1),te(!1),N(null)},onPointerMove:Ae=>{var ot,ht,Pt;if(!ft.current||!nn||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const wt=Ae.clientY-ft.current.y,Wt=Ae.clientX-ft.current.x;var xo;const Xt=(xo=e.swipeDirections)!=null?xo:V2(le);!Q&&(Math.abs(Wt)>1||Math.abs(wt)>1)&&N(Math.abs(Wt)>Math.abs(wt)?"x":"y");let Wn={x:0,y:0};const wo=or=>1/(1.5+Math.abs(or)/20);if(Q==="y"){if(Xt.includes("top")||Xt.includes("bottom"))if(Xt.includes("top")&&wt<0||Xt.includes("bottom")&&wt>0)Wn.y=wt;else{const or=wt*wo(wt);Wn.y=Math.abs(or)<Math.abs(wt)?or:wt}}else if(Q==="x"&&(Xt.includes("left")||Xt.includes("right")))if(Xt.includes("left")&&Wt<0||Xt.includes("right")&&Wt>0)Wn.x=Wt;else{const or=Wt*wo(Wt);Wn.x=Math.abs(or)<Math.abs(Wt)?or:Wt}(Math.abs(Wn.x)>0||Math.abs(Wn.y)>0)&&pe(!0),(ht=dt.current)==null||ht.style.setProperty("--swipe-amount-x",`${Wn.x}px`),(Pt=dt.current)==null||Pt.style.setProperty("--swipe-amount-y",`${Wn.y}px`)}},be&&!d.jsx&&Tt!=="loading"?ve.createElement("button",{"aria-label":Z,"data-disabled":fe,"data-close-button":!0,onClick:fe||!nn?()=>{}:()=>{Se(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Vr(X==null?void 0:X.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(Jt=ue==null?void 0:ue.close)!=null?Jt:T2):null,(Tt||d.icon||d.promise)&&d.icon!==null&&((ue==null?void 0:ue[Tt])!==null||d.icon)?ve.createElement("div",{"data-icon":"",className:Vr(X==null?void 0:X.icon,d==null||(i=d.classNames)==null?void 0:i.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Ce():null,d.type!=="loading"?Le:null):null,ve.createElement("div",{"data-content":"",className:Vr(X==null?void 0:X.content,d==null||(a=d.classNames)==null?void 0:a.content)},ve.createElement("div",{"data-title":"",className:Vr(X==null?void 0:X.title,d==null||(l=d.classNames)==null?void 0:l.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?ve.createElement("div",{"data-description":"",className:Vr(H,to,X==null?void 0:X.description,d==null||(u=d.classNames)==null?void 0:u.description)},typeof d.description=="function"?d.description():d.description):null),ve.isValidElement(d.cancel)?d.cancel:d.cancel&&uc(d.cancel)?ve.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||I,onClick:Ae=>{uc(d.cancel)&&nn&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Ae),Se())},className:Vr(X==null?void 0:X.cancelButton,d==null||(f=d.classNames)==null?void 0:f.cancelButton)},d.cancel.label):null,ve.isValidElement(d.action)?d.action:d.action&&uc(d.action)?ve.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||D,onClick:Ae=>{uc(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Ae),!Ae.defaultPrevented&&Se())},className:Vr(X==null?void 0:X.actionButton,d==null||(p=d.classNames)==null?void 0:p.actionButton)},d.action.label):null)};function Qx(){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 W2(e,t){const n={};return[e,t].forEach((r,i)=>{const a=i===1,l=a?"--mobile-offset":"--offset",u=a?$2:D2;function f(p){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof p=="number"?`${p}px`:p})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(p=>{r[p]===void 0?n[`${l}-${p}`]=u:n[`${l}-${p}`]=typeof r[p]=="number"?`${r[p]}px`:r[p]}):f(u)}),n}const q2=ve.forwardRef(function(t,n){const{id:r,invert:i,position:a="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:f,className:p,offset:m,mobileOffset:d,theme:v="light",richColors:x,duration:S,style:k,visibleToasts:E=L2,toastOptions:C,dir:P=Qx(),gap:R=F2,icons:O,containerAriaLabel:B="Notifications"}=t,[A,z]=ve.useState([]),I=ve.useMemo(()=>r?A.filter(_=>_.toasterId===r):A.filter(_=>!_.toasterId),[A,r]),D=ve.useMemo(()=>Array.from(new Set([a].concat(I.filter(_=>_.position).map(_=>_.position)))),[I,a]),[j,H]=ve.useState([]),[ee,le]=ve.useState(!1),[oe,G]=ve.useState(!1),[X,ue]=ve.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=ve.useRef(null),Q=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=ve.useRef(null),M=ve.useRef(!1),$=ve.useCallback(_=>{z(ie=>{var K;return(K=ie.find(ce=>ce.id===_.id))!=null&&K.delete||Ln.dismiss(_.id),ie.filter(({id:ce})=>ce!==_.id)})},[]);return ve.useEffect(()=>Ln.subscribe(_=>{if(_.dismiss){requestAnimationFrame(()=>{z(ie=>ie.map(K=>K.id===_.id?{...K,delete:!0}:K))});return}setTimeout(()=>{I0.flushSync(()=>{z(ie=>{const K=ie.findIndex(ce=>ce.id===_.id);return K!==-1?[...ie.slice(0,K),{...ie[K],..._},...ie.slice(K+1)]:[_,...ie]})})})}),[A]),ve.useEffect(()=>{if(v!=="system"){ue(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ue("dark"):ue("light")),typeof window>"u")return;const _=window.matchMedia("(prefers-color-scheme: dark)");try{_.addEventListener("change",({matches:ie})=>{ue(ie?"dark":"light")})}catch{_.addListener(({matches:K})=>{try{ue(K?"dark":"light")}catch(ce){console.error(ce)}})}},[v]),ve.useEffect(()=>{A.length<=1&&le(!1)},[A]),ve.useEffect(()=>{const _=ie=>{var K;if(l.every(te=>ie[te]||ie.code===te)){var ae;le(!0),(ae=Z.current)==null||ae.focus()}ie.code==="Escape"&&(document.activeElement===Z.current||(K=Z.current)!=null&&K.contains(document.activeElement))&&le(!1)};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[l]),ve.useEffect(()=>{if(Z.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,M.current=!1)}},[Z.current]),ve.createElement("section",{ref:n,"aria-label":`${B} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((_,ie)=>{var K;const[ce,ae]=_.split("-");return I.length?ve.createElement("ol",{key:_,dir:P==="auto"?Qx():P,tabIndex:-1,ref:Z,className:p,"data-sonner-toaster":!0,"data-sonner-theme":X,"data-y-position":ce,"data-x-position":ae,style:{"--front-toast-height":`${((K=j[0])==null?void 0:K.height)||0}px`,"--width":`${z2}px`,"--gap":`${R}px`,...k,...W2(m,d)},onBlur:te=>{M.current&&!te.currentTarget.contains(te.relatedTarget)&&(M.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||M.current||(M.current=!0,N.current=te.relatedTarget)},onMouseEnter:()=>le(!0),onMouseMove:()=>le(!0),onMouseLeave:()=>{oe||le(!1)},onDragEnd:()=>le(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},I.filter(te=>!te.position&&ie===0||te.position===_).map((te,re)=>{var we,Ee;return ve.createElement(H2,{key:te.id,icons:O,index:re,toast:te,defaultRichColors:x,duration:(we=C==null?void 0:C.duration)!=null?we:S,className:C==null?void 0:C.className,descriptionClassName:C==null?void 0:C.descriptionClassName,invert:i,visibleToasts:E,closeButton:(Ee=C==null?void 0:C.closeButton)!=null?Ee:f,interacting:oe,position:_,style:C==null?void 0:C.style,unstyled:C==null?void 0:C.unstyled,classNames:C==null?void 0:C.classNames,cancelButtonStyle:C==null?void 0:C.cancelButtonStyle,actionButtonStyle:C==null?void 0:C.actionButtonStyle,closeButtonAriaLabel:C==null?void 0:C.closeButtonAriaLabel,removeToast:$,toasts:I.filter(pe=>pe.position==te.position),heights:j.filter(pe=>pe.position==te.position),setHeights:H,expandByDefault:u,gap:R,expanded:ee,swipeDirections:t.swipeDirections})})):null}))}),K2="modulepreload",G2=function(e){return"/"+e},Yx={},Vt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=l(n.map(p=>{if(p=G2(p),p in Yx)return;Yx[p]=!0;const m=p.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${d}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":K2,m||(v.as="script"),v.crossOrigin="",v.href=p,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((x,S)=>{v.addEventListener("load",x),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function a(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return i.then(l=>{for(const u of l||[])u.status==="rejected"&&a(u.reason);return t().catch(a)})},Mp="chunk-reload";function Om(e){return y.lazy(()=>e().then(t=>{try{sessionStorage.removeItem(Mp)}catch{}return t},t=>{if(!Q2(t))throw t;let n=!1;try{n=sessionStorage.getItem(Mp)==="1",n||sessionStorage.setItem(Mp,"1")}catch{}if(n)throw t;return window.location.reload(),new Promise(()=>{})}))}function Q2(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 M0=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).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 Y2=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 Z2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.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 Zx=e=>{const t=Z2(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 J2={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 X2=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 eP=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:l,...u},f)=>y.createElement("svg",{ref:f,...J2,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:M0("lucide",i),...!a&&!X2(u)&&{"aria-hidden":"true"},...u},[...l.map(([p,m])=>y.createElement(p,m)),...Array.isArray(a)?a:[a]]));/**
|
|
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 Be=(e,t)=>{const n=y.forwardRef(({className:r,...i},a)=>y.createElement(eP,{ref:a,iconNode:t,className:M0(`lucide-${Y2(Zx(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Zx(e),n};/**
|
|
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 tP=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],nP=Be("arrow-up",tP);/**
|
|
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 rP=[["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"}]],oP=Be("book-marked",rP);/**
|
|
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 iP=[["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"}]],L0=Be("book-open",iP);/**
|
|
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 sP=[["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"}]],aP=Be("bot",sP);/**
|
|
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 lP=[["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"}]],uP=Be("building-2",lP);/**
|
|
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 cP=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pa=Be("check",cP);/**
|
|
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 dP=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ri=Be("chevron-down",dP);/**
|
|
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 fP=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bl=Be("chevron-right",fP);/**
|
|
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 pP=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],hP=Be("chevron-up",pP);/**
|
|
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 mP=[["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"}]],zs=Be("circle-alert",mP);/**
|
|
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 gP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],yP=Be("circle",gP);/**
|
|
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 vP=[["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"}]],xP=Be("clipboard-check",vP);/**
|
|
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 wP=[["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"}]],Am=Be("copy",wP);/**
|
|
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 bP=[["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"}]],Ul=Be("database",bP);/**
|
|
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 kP=[["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"}]],Tc=Be("download",kP);/**
|
|
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 SP=[["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"}]],Sh=Be("external-link",SP);/**
|
|
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 CP=[["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"}]],D0=Be("eye-off",CP);/**
|
|
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 EP=[["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"}]],$0=Be("eye",EP);/**
|
|
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 _P=[["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"}]],Vl=Be("file-text",_P);/**
|
|
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 NP=[["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"}]],TP=Be("folder-open",NP);/**
|
|
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 PP=[["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"}]],jP=Be("folder",PP);/**
|
|
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 RP=[["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"}]],OP=Be("globe",RP);/**
|
|
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 AP=[["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"}]],z0=Be("house",AP);/**
|
|
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 IP=[["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"}]],MP=Be("inbox",IP);/**
|
|
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 LP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Jx=Be("info",LP);/**
|
|
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 DP=[["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"}]],ld=Be("key-round",DP);/**
|
|
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 $P=[["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"}]],Xx=Be("key",$P);/**
|
|
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 zP=[["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"}]],FP=Be("keyboard",zP);/**
|
|
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 BP=[["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"}]],F0=Be("layout-grid",BP);/**
|
|
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 UP=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nr=Be("loader-circle",UP);/**
|
|
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 VP=[["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"}]],HP=Be("lock",VP);/**
|
|
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 WP=[["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"}]],B0=Be("log-out",WP);/**
|
|
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 qP=[["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"}]],KP=Be("message-square-text",qP);/**
|
|
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 GP=[["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"}]],ew=Be("monitor",GP);/**
|
|
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 QP=[["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"}]],YP=Be("network",QP);/**
|
|
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 ZP=[["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"}]],cc=Be("package",ZP);/**
|
|
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 JP=[["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"}]],XP=Be("panel-left-close",JP);/**
|
|
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 ej=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],tj=Be("panel-left",ej);/**
|
|
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 nj=[["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"}]],rj=Be("pencil",nj);/**
|
|
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 oj=[["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"}]],ij=Be("plug",oj);/**
|
|
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 sj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],U0=Be("plus",sj);/**
|
|
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 aj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],lj=Be("refresh-cw",aj);/**
|
|
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 uj=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],cj=Be("rotate-ccw",uj);/**
|
|
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 dj=[["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"}]],fj=Be("scroll-text",dj);/**
|
|
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 pj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Im=Be("search",pj);/**
|
|
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 hj=[["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"}]],mj=Be("shield-alert",hj);/**
|
|
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 gj=[["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"}]],yj=Be("shield-check",gj);/**
|
|
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 vj=[["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"}]],ud=Be("shield",vj);/**
|
|
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 xj=[["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"}]],wj=Be("sparkles",xj);/**
|
|
327
|
+
* @license lucide-react v0.577.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const bj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],tw=Be("terminal",bj);/**
|
|
332
|
+
* @license lucide-react v0.577.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const kj=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Sj=Be("triangle-alert",kj);/**
|
|
337
|
+
* @license lucide-react v0.577.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const Cj=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],V0=Be("user-round",Cj);/**
|
|
342
|
+
* @license lucide-react v0.577.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const Ej=[["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"}]],H0=Be("users",Ej);/**
|
|
347
|
+
* @license lucide-react v0.577.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const _j=[["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"}]],Nj=Be("workflow",_j);/**
|
|
352
|
+
* @license lucide-react v0.577.0 - ISC
|
|
353
|
+
*
|
|
354
|
+
* This source code is licensed under the ISC license.
|
|
355
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
+
*/const Tj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pj=Be("x",Tj),W0="contextnest:draft:",Mm=(e,t)=>`${W0}${e}:${t}`;function LH(e,t){try{const n=localStorage.getItem(Mm(e,t));return n?JSON.parse(n):null}catch{return null}}function jj(e){let t=null,n=1/0;for(let r=0;r<localStorage.length;r++){const i=localStorage.key(r);if(!i||i===e||!i.startsWith(W0))continue;let a=0;try{a=Number(JSON.parse(localStorage.getItem(i)||"{}").savedAt)||0}catch{a=0}a<n&&(n=a,t=i)}return t?(localStorage.removeItem(t),!0):!1}function DH(e,t,n){const r=Mm(e,t),i=JSON.stringify({...n,savedAt:Date.now()});for(;;)try{return localStorage.setItem(r,i),!0}catch{let a=!1;try{a=jj(r)}catch{a=!1}if(!a)return!1}}function Rj(e,t){try{localStorage.removeItem(Mm(e,t))}catch{}}const Hl="",Oj="cnst_token";function q0(){try{localStorage.removeItem(Oj)}catch{}}async function Y(e,t={}){const n={"Content-Type":"application/json",...t.headers},r=await fetch(`${Hl}${e}`,{...t,headers:n,credentials:"include"}),i=await r.text();let a;try{a=i?JSON.parse(i):{}}catch{a={error:i.slice(0,200)}}if(!r.ok){r.status===401&&(q0(),typeof window<"u"&&window.dispatchEvent(new Event("auth:unauthorized")));const u=new Error(a.error||`Request failed: ${r.status}`);throw u.status=r.status,u.body=a,u}return(t.method??"GET").toUpperCase()!=="GET"&&(Vi==null||Vi.invalidatePath(e)),a}let Vi=null;function Aj(e){Vi=e}function Lp(e){{Vi==null||Vi.clear();return}}async function K0(e,t){return Y("/auth/login",{method:"POST",body:JSON.stringify({email:e,password:t})})}async function Ij(e,t,n){return Y("/auth/register",{method:"POST",body:JSON.stringify({email:e,password:t,name:n})})}async function Mj(){return Y("/auth/logout",{method:"POST"})}async function G0(){return Y("/auth/device",{method:"POST",body:JSON.stringify({})})}async function Q0(e,t){return Y(`/auth/device/poll?code=${encodeURIComponent(e)}&client_secret=${encodeURIComponent(t)}`)}async function Y0(e){return Y("/auth/promptowl",{method:"POST",body:JSON.stringify({token:e})})}async function bl(){return Y("/health")}async function Lj(){return Y("/admin/settings")}async function $H(e){return Y("/admin/settings",{method:"PATCH",body:JSON.stringify(e)})}async function zH(e){return Y("/admin/settings/test-notification",{method:"POST",body:JSON.stringify({channel:e})})}async function Z0(){return Y("/license/status")}async function Dj(e){return Y("/license/install",{method:"POST",body:JSON.stringify({key:e})})}async function Dp(){return Y("/auth/admin-status")}async function $j(){return Y("/auth/teammates")}async function FH(e){return Y("/auth/invite",{method:"POST",body:JSON.stringify({email:e})})}async function zj(){return Y("/admin/super-admins")}async function BH(e){return Y("/admin/super-admins",{method:"POST",body:JSON.stringify({email:e})})}async function UH(e){return Y(`/admin/super-admins/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Fj(){return Y("/admin/community-sites")}async function VH(e){return Y("/admin/community-sites",{method:"POST",body:JSON.stringify(e)})}async function HH(e,t){return Y(`/admin/community-sites/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)})}async function WH(e){return Y(`/admin/community-sites/${encodeURIComponent(e)}`,{method:"DELETE"})}async function qH(e){return Y("/auth/profile",{method:"PATCH",body:JSON.stringify({name:e})})}async function KH(e,t){return Y("/auth/password",{method:"POST",body:JSON.stringify({current:e,next:t})})}async function GH(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 n=t.toString()?`?${t}`:"";return Y(`/admin/trace${n}`)}async function QH(e,t={}){const n=new URLSearchParams;t.kind&&n.set("kind",t.kind),t.user&&n.set("user",t.user),t.limit!=null&&n.set("limit",String(t.limit)),t.offset!=null&&n.set("offset",String(t.offset));const r=n.toString()?`?${n}`:"";return Y(`/nests/${encodeURIComponent(e)}/trace${r}`)}async function YH(e){return Y(`/auth/users/${encodeURIComponent(e)}`,{method:"DELETE"})}async function ZH(e,t){return Y(`/auth/admin/reset-password/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify({})})}async function Bj(){return Y("/auth/keys")}async function Uj(e){return Y("/auth/keys",{method:"POST",body:JSON.stringify(e||{})})}async function Vj(e){return Y("/auth/keys/rotate",{method:"POST",body:JSON.stringify(e||{})})}async function JH(e){return Y(`/auth/keys/${encodeURIComponent(e)}`,{method:"DELETE"})}async function Hj(e){return Y(`/nests/${e}/settings`)}async function XH(e,t){return Y(`/nests/${e}/settings`,{method:"PATCH",body:JSON.stringify(t)})}function eW(e,t){if(typeof e.prime=="boolean")return e.prime;if(!t.length)return!1;const n=new Set(t);return(e.tags||[]).some(r=>n.has(r.trim().replace(/^#+/,"").toLowerCase()))}async function Wj(e){return Y(e!=null&&e.archived?"/nests?archived=1":"/nests")}async function tW(e,t){return Y("/nests",{method:"POST",body:JSON.stringify({name:e,description:t})})}async function qj(e){return Y("/nests/"+e,{method:"DELETE"})}async function nW(e){return Y("/nests/"+e+"/archive",{method:"POST"})}async function rW(e){return Y("/nests/"+e+"/restore",{method:"POST"})}async function oW(e,t){return Y("/nests/"+e+"/pin",{method:t?"POST":"DELETE"})}async function iW(e,t){return Y("/nests/"+e,{method:"PATCH",body:JSON.stringify(t)})}const Kj=4*1024*1024,Gj=8*1024*1024;async function sW(e,t,n){const r=new TextEncoder,i=[],a=[];let l=[],u=0;for(const v of t){const x=r.encode(v.path).length+r.encode(v.content??"").length;if(x>Gj){a.push(v.path);continue}l.length&&u+x>Kj&&(i.push(l),l=[],u=0),l.push(v),u+=x}(l.length||!i.length)&&i.push(l),n==null||n(0,t.length);const f=[...a],p=await Y("/nests/import",{method:"POST",body:JSON.stringify({name:e,files:i[0],partial:i.length>1})});f.push(...p.rejected??[]);let m=i[0].length;if(n==null||n(m,t.length),i.length===1)return{nest:p.nest,documents:p.documents??0,rejected:f};const d=p.nest.id;try{for(const x of i.slice(1)){const S=await Y("/nests/import",{method:"POST",body:JSON.stringify({nestId:d,files:x})});f.push(...S.rejected??[]),m+=x.length,n==null||n(m,t.length)}return{...await Y("/nests/import",{method:"POST",body:JSON.stringify({nestId:d,finalize:!0})}),rejected:f}}catch(v){throw await qj(d).catch(()=>{}),v}}async function Qj(){return Y("/nests/unsynced")}async function aW(e){return Y("/nests/unsynced/sync",{method:"POST",body:JSON.stringify({name:e})})}async function lW(e){return Y("/nests/unsynced/sync",{method:"DELETE",body:JSON.stringify({name:e})})}async function uW(e,t,n){return Y(`/nests/${e}/visibility`,{method:"PATCH",body:JSON.stringify(n?{visibility:t,acknowledge_public:!0}:{visibility:t})})}async function cW(e,t){return Y(`/nests/${e}/reader-mode`,{method:"PATCH",body:JSON.stringify(t)})}async function dW(e,t){return Y(`/nests/${e}/branding`,{method:"PATCH",body:JSON.stringify(t)})}async function Yj(e){return Y(`/nests/${e}`)}async function Zj(e){return Y(`/nests/${e}/definitions`)}async function fW(e,t){return Y(`/nests/${e}/definitions`,{method:"POST",body:JSON.stringify(t)})}async function pW(e,t){return Y(`/nests/${e}/definitions/${encodeURIComponent(t)}`,{method:"DELETE"})}async function hW(e,t){const n=new FormData;n.append("file",t);const r=await fetch(`/nests/${e}/assets`,{method:"POST",body:n,credentials:"include"}),i=await r.json().catch(()=>({}));if(!r.ok)throw new Error(i.error||`Upload failed: ${r.status}`);return i}async function Jj(e){return Y(`/nests/${e}/nodes?content=1`)}async function Xj(e,t){return Y(`/nests/${e}/nodes?folder=${encodeURIComponent(t)}`)}async function eR(e,t=!1){return Y(`/nests/${e}/nodes${t?"?approved_only=1":""}`)}async function tR(e){return Y(`/nests/${e}/census`)}async function nR(e){return Y(`/nests/${e}/comment-counts`)}async function rR(e,t,n=!1){return Y(`/nests/${e}/nodes/${t}${n?"?approved_only=1":""}`)}async function mW(e,t){return Y(`/nests/${e}/nodes`,{method:"POST",body:JSON.stringify(t)})}async function gW(e,t,n={}){var l;const r=new FormData;r.append("file",t),n.title&&r.append("title",n.title),n.folder&&r.append("folder",n.folder),n.nodeId&&r.append("nodeId",n.nodeId),(l=n.changeNote)!=null&&l.trim()&&r.append("changeNote",n.changeNote.trim());for(const u of n.tags??[])r.append("tags",u);const i=await fetch(`/nests/${e}/nodes/pdf`,{method:"POST",body:r,credentials:"include"}),a=await i.json().catch(()=>({}));if(!i.ok)throw new Error(a.error||`PDF upload failed: ${i.status}`);return a}function yW(e,t,n={}){const r=new URLSearchParams;n.version&&r.set("version",String(n.version)),n.approvedOnly&&r.set("approved_only","1"),n.download&&r.set("download","1");const i=r.toString();return`/nests/${e}/nodes/${t}/pdf${i?`?${i}`:""}`}async function vW(e,t,n,r){const i={};return r!==void 0&&(i["X-Base-Version"]=String(r)),Y(`/nests/${e}/nodes/${t}`,{method:"PATCH",headers:i,body:JSON.stringify(n)})}async function xW(e,t){return Y(`/nests/${e}/nodes/${t}`,{method:"DELETE"})}async function wW(e,t,n){return Y(`/nests/${e}/nodes/${t}/move`,{method:"POST",body:JSON.stringify({folder:n})})}async function oR(e,t){return Y(`/nests/${e}/search?q=${encodeURIComponent(t)}`)}async function iR(e,t=20){return Y(`/search?q=${encodeURIComponent(e)}&limit=${t}`)}async function sR(e){return Y(`/nests/${e}/overview`)}async function aR(e,t={}){const n=new URLSearchParams({format:"markdown"});t.selector&&n.set("selector",t.selector),t.maxTokens&&n.set("max_tokens",String(t.maxTokens));const r=await fetch(`${Hl}/nests/${e}/export?${n.toString()}`,{credentials:"include"});if(!r.ok){const i=await r.text();let a=`Export failed (${r.status})`;try{a=JSON.parse(i).error||a}catch{}throw new Error(a)}return r.text()}async function lR(e,t={}){const n=new URLSearchParams({format:"bundle"});t.includeDrafts&&n.set("includeDrafts","1");const r=await fetch(`${Hl}/nests/${e}/export?${n.toString()}`,{credentials:"include"});if(!r.ok){const f=await r.text();let p=`Export failed (${r.status})`;try{p=JSON.parse(f).error||p}catch{}throw new Error(p)}const i=await r.blob(),a=URL.createObjectURL(i),l=document.createElement("a");l.href=a;const u=(t.nestName||"nest").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"nest";l.download=`${u}-bundle.zip`,document.body.appendChild(l),l.click(),l.remove(),URL.revokeObjectURL(a)}async function uR(e){const t=await Y(`/nests/${e}/overview`),n=(t==null?void 0:t.tags)??{};return Object.keys(n).map(r=>r.replace(/^#+/,"")).filter(Boolean).sort((r,i)=>r.localeCompare(i))}async function cR(e){return Y(`/nests/${e}/stewards`)}async function bW(e){return Y(`/nests/${e}/stewards/sync`,{method:"POST",body:"{}"})}async function kW(e,t){return Y(`/nests/${e}/stewards`,{method:"POST",body:JSON.stringify(t)})}async function SW(e,t){return Y(`/nests/${e}/stewards/${t}`,{method:"DELETE"})}async function CW(e,t,n){return Y(`/nests/${e}/stewards/${t}`,{method:"PATCH",body:JSON.stringify(n)})}async function dR(e,t){return Y(`/nests/${e}/nodes/${t}/stewards`)}async function EW(e,t,n){return Y(`/nests/${e}/nodes/${t}/request-deletion`,{method:"POST",body:JSON.stringify({reason:n})})}async function _W(e,t){return Y(`/nests/${e}/delete-folder`,{method:"POST",body:JSON.stringify({folder:t})})}async function NW(e,t,n,r){return Y(`/nests/${e}/request-deletion`,{method:"POST",body:JSON.stringify({targetType:t,target:n,reason:r})})}async function fR(e,t="pending"){return Y(`/nests/${e}/deletion-requests?status=${encodeURIComponent(t)}`)}async function TW(e,t){return Y(`/nests/${e}/deletion-requests/${t}/delete`,{method:"POST"})}async function PW(e,t,n){return Y(`/nests/${e}/deletion-requests/${t}/decline`,{method:"POST",body:JSON.stringify({note:n})})}async function jW(e,t){return Y(`/nests/${e}/deletion-requests/${t}/withdraw`,{method:"POST"})}async function RW(e,t){return Y(`/nests/${e}/folders`,{method:"POST",body:JSON.stringify({folder:t})})}async function OW(e,t){return Y(`/nests/${e}/nodes/${t}/cancel-review`,{method:"POST"})}async function pR(e,t="pending"){return Y(`/nests/${e}/review-queue?status=${encodeURIComponent(t)}`)}async function hR(e,t="all",n=50,r=0){const i=new URLSearchParams({filter:t,limit:String(n),offset:String(r)});return Y(`/nests/${e}/feed?${i.toString()}`)}async function AW(e,t,n,r){return Y(`/nests/${e}/nodes/${t}/submit-review`,{method:"POST",body:JSON.stringify({note:n,priority:r})})}async function IW(e,t,n){return Y(`/nests/${e}/nodes/${t}/approve`,{method:"POST",body:JSON.stringify({note:n})})}async function MW(e,t,n){return Y(`/nests/${e}/nodes/${t}/reject`,{method:"POST",body:JSON.stringify({note:n})})}async function LW(e,t,n,r){return Y(`/nests/${e}/review-queue/bulk`,{method:"POST",body:JSON.stringify({action:t,nodeIds:n,note:r})})}async function DW(e,t,n){return Y(`/nests/${e}/nodes/${t}/revert`,{method:"POST",body:JSON.stringify({targetVersion:n})})}async function mR(e,t){return Y(`/nests/${e}/nodes/${t}/versions`)}async function $W(e,t,n){return Y(`/nests/${e}/nodes/${t}/versions/${n}`)}async function gR(e,t){return Y(`/nests/${e}/nodes/${t}/reviews`)}function yR(e,t,n,r){const i=new URLSearchParams;n!=null&&i.set("v",String(n)),r!=null&&i.set("_",String(r));const a=i.toString(),l=t.replace(/^nodes\//,"");return`${Hl}/nests/${e}/nodes/${l}/hosted${a?`?${a}`:""}`}async function zW(e,t,n,r){const i=await fetch(yR(e,t,n,r),{credentials:"include",cache:"no-store"});if(!i.ok)throw new Error(`Failed to load artifact (${i.status})`);const a=i.headers.get("X-Artifact-Snapshot"),l=a?Number(a):null;return{html:await i.text(),snapshot:Number.isFinite(l)?l:null}}async function vR(e,t){return Y(`/nests/${e}/nodes/${t}/annotations`)}async function FW(e,t,n){return Y(`/nests/${e}/nodes/${t}/annotations`,{method:"POST",body:JSON.stringify(n)})}async function BW(e,t,n,r){return Y(`/nests/${e}/nodes/${t}/annotations/${n}/comments`,{method:"POST",body:JSON.stringify({body:r})})}async function UW(e,t,n){return Y(`/nests/${e}/nodes/${t}/annotations/${n}/resolve`,{method:"POST",body:"{}"})}async function VW(e,t,n){return Y(`/nests/${e}/nodes/${t}/annotations/${n}/reopen`,{method:"POST",body:"{}"})}async function xR(e,t,n){const r=n?`?status=${n}`:"";return Y(`/nests/${e}/nodes/${t}/comments${r}`)}async function wR(e,t,n=100){return Y(`/nests/${e}/nodes/${t}/activity?limit=${n}`)}async function bR(e,t=!1){return Y(`/nests/${e}/external-edits${t?"?refresh=true":""}`)}async function kR(e){return Y(`/nests/${e}/external-edits?count=1`)}async function HW(e){return Y(`/nests/${e}/external-edits/scan`,{method:"POST",body:"{}"})}async function SR(e,t){return Y(`/nests/${e}/nodes/${t}/external-edits`)}async function WW(e,t,n){return Y(`/nests/${e}/nodes/${t}/external-edits/${n}`)}async function qW(e,t,n,r){return Y(`/nests/${e}/nodes/${t}/external-edits/${n}/approve`,{method:"POST",body:JSON.stringify({comment:r})})}async function KW(e,t,n,r){return Y(`/nests/${e}/nodes/${t}/external-edits/${n}/reject`,{method:"POST",body:JSON.stringify({reason:r})})}async function GW(e){return Y(`/nests/${e}/publications`)}async function QW(e,t){return Y(`/nests/${e}/publications`,{method:"POST",body:JSON.stringify(t)})}async function YW(e,t){return Y(`/nests/${e}/publications/${t}/views`)}async function ZW(e,t){return Y(`/nests/${e}/publications/${t}`,{method:"DELETE"})}async function CR(e){return Y(`/nests/${e}/collaborators`)}async function ER(e){return Y(`/nests/${e}/mentionable`)}async function _R(e=""){const t=e.trim()?`?q=${encodeURIComponent(e.trim())}`:"";return Y(`/people/suggest${t}`)}async function JW(e,t){return Y(`/nests/${e}/collaborators`,{method:"POST",body:JSON.stringify(t)})}async function XW(e,t,n){return Y(`/nests/${e}/collaborators/${t}`,{method:"PATCH",body:JSON.stringify({permission:n})})}async function eq(e,t){return Y(`/nests/${e}/collaborators/${t}`,{method:"DELETE"})}async function tq(e){return Y(`/nests/${e}/grants`)}async function nq(e,t){return Y(`/nests/${e}/grants`,{method:"POST",body:JSON.stringify(t)})}async function rq(e,t){return Y(`/nests/${e}/grants/${t}`,{method:"DELETE"})}const oq=[{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 NR(){return Y("/teams")}async function TR(e){return Y(`/teams/${e}`)}async function iq(e){return Y("/teams",{method:"POST",body:JSON.stringify({name:e})})}async function sq(e,t){return Y(`/teams/${e}`,{method:"PATCH",body:JSON.stringify({name:t})})}async function aq(e){return Y(`/teams/${e}`,{method:"DELETE"})}async function lq(e,t){return Y(`/teams/${e}/members`,{method:"POST",body:JSON.stringify(t)})}async function uq(e,t,n){return Y(`/teams/${e}/members/${t}`,{method:"PATCH",body:JSON.stringify({role:n})})}async function cq(e,t){return Y(`/teams/${e}/members/${t}`,{method:"DELETE"})}function dq(e){return["owner","editor"].includes((e.your_role||"").toLowerCase())}const PR="promptowl_connect_required";function fq(){return typeof document>"u"?!1:document.cookie.split(";").some(e=>e.trim().startsWith("cnst_po_session="))}function pq(e){var t;return((t=e==null?void 0:e.body)==null?void 0:t.code)===PR}async function jR(){return Y("/teams/promptowl")}async function hq(e){return Y("/teams/promptowl/sync",{method:"POST",body:JSON.stringify({team_ids:e})})}async function RR(e){return Y(`/nests/${e}/teams`)}async function mq(e,t){return Y(`/nests/${e}/teams`,{method:"POST",body:JSON.stringify({team_id:t})})}async function gq(e,t){return Y(`/nests/${e}/teams/${t}`,{method:"DELETE"})}async function OR(e){return Y(`/nests/${e}/graph`)}async function AR(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 n=t.toString();return Y(`/me/work${n?`?${n}`:""}`)}async function IR(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 n=t.toString();return Y(`/me/drafts${n?`?${n}`:""}`)}async function yq(e,t){const n=await Y(`/nests/${e}/nodes/${t}/discard`,{method:"POST"});return Rj(e,t),n}async function vq(e,t,n){return Y(`/nests/${e}/nodes/${t}/approve`,{method:"POST",body:JSON.stringify({note:n})})}async function xq(e,t,n){return Y(`/nests/${e}/nodes/${t}/reject`,{method:"POST",body:JSON.stringify({note:n})})}const wq=e=>e.status==="running"&&!e.claimed_by;async function MR(e){return(await Y(`/nests/${e}/edge-types`)).edge_types}async function LR(e){return(await Y(`/nests/${e}/edges`)).edges}async function bq(e,t){return(await Y(`/nests/${e}/edges`,{method:"POST",body:JSON.stringify(t)})).edge}async function kq(e,t,n){return(await Y(`/nests/${e}/edges/${t}`,{method:"PATCH",body:JSON.stringify(n)})).edge}async function Sq(e,t){return Y(`/nests/${e}/edges/${t}`,{method:"DELETE"})}async function DR(e){return(await Y(`/nests/${e}/schedules`)).schedules}async function Cq(e,t){return(await Y(`/nests/${e}/schedules`,{method:"POST",body:JSON.stringify(t)})).schedule}async function Eq(e,t,n){return(await Y(`/nests/${e}/schedules/${t}`,{method:"PATCH",body:JSON.stringify(n)})).schedule}async function _q(e,t){return Y(`/nests/${e}/schedules/${t}`,{method:"DELETE"})}async function $R(e,t){return(await Y(`/nests/${e}/nodes/${t}/watchers`)).watchers}async function Nq(e,t,n){return(await Y(`/nests/${e}/nodes/${t}/watchers`,{method:"POST",body:JSON.stringify({email:n})})).watchers}async function Tq(e,t,n){return(await Y(`/nests/${e}/nodes/${t}/watchers?email=${encodeURIComponent(n)}`,{method:"DELETE"})).watchers}async function zR(){return Y("/me/notifications?unread=true")}async function Pq(e){return Y(`/me/nests/${e}/leave`,{method:"POST"})}async function jq(e){return Y("/me/notifications/read",{method:"POST",body:JSON.stringify({ids:e})})}async function FR(e){return(await Y(`/nests/${e}/env`)).env}async function Rq(e,t,n){return Y(`/nests/${e}/env`,{method:"PUT",body:JSON.stringify({key:t,value:n})})}async function Oq(e,t){return Y(`/nests/${e}/env/${encodeURIComponent(t)}`,{method:"DELETE"})}async function BR(e,t){const n=t?`?agent=${encodeURIComponent(t)}`:"";return(await Y(`/nests/${e}/hooks${n}`)).hooks}async function Aq(e,t,n){return(await Y(`/nests/${e}/hooks`,{method:"POST",body:JSON.stringify({agent_node:t,preset:n})})).hook}async function Iq(e,t){return Y(`/nests/${e}/hooks/${t}`,{method:"DELETE"})}async function UR(e){return(await Y(`/nests/${e}/connectors`)).connectors}async function Mq(e,t){return(await Y(`/nests/${e}/connectors`,{method:"POST",body:JSON.stringify(t)})).connector}async function Lq(e,t,n){return(await Y(`/nests/${e}/connectors/${t}`,{method:"PATCH",body:JSON.stringify(n)})).connector}async function Dq(e,t){return Y(`/nests/${e}/connectors/${t}`,{method:"DELETE"})}async function $q(e,t,n){return Y(`/nests/${e}/table-query`,{method:"POST",body:JSON.stringify({table:t,query:n,include_drafts:!0})})}async function zq(e,t,n,r=4e3){return Y(`/nests/${e}/context`,{method:"POST",body:JSON.stringify({selector:t,hops:n,max_tokens:r})})}async function Fq(e,t,n){const r=new URLSearchParams;r.set("limit",String(n));const i=r.toString();return(await Y(`/nests/${e}/runs${i?`?${i}`:""}`)).runs}async function Bq(e){const t=await Y(`/runs/${e}`);return{...t.run,steps:t.steps}}async function Uq(e,t){return Y(`/runs/${e}`,{method:"PATCH",body:JSON.stringify({status:"cancelled",trace:{error:"Cancelled from the Runs page"}})})}async function Vq(e,t,n,r){return Y(`/nests/${e}/run/${t}`,{method:"POST",body:JSON.stringify({...n?{inputs:n}:{},...r?{parent_run_id:r}:{}})})}async function VR(e,t,n,r){const i=await fetch(`${Hl}/nests/${e}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t),signal:r});if(!i.ok){const p=await i.text();let m;try{m=p?JSON.parse(p):{}}catch{m={error:p.slice(0,200)}}i.status===401&&typeof window<"u"&&window.dispatchEvent(new Event("auth:unauthorized"));const d=new Error(m.error||`Request failed: ${i.status}`);throw d.status=i.status,d.body=m,d}if(!i.body)return;const a=i.body.getReader(),l=new TextDecoder;let u="";const f=p=>{var x,S,k,E;let m="message";const d=[];for(const C of p.split(`
|
|
357
|
+
`))C.startsWith("event:")?m=C.slice(6).trim():C.startsWith("data:")&&d.push(C.slice(5).trimStart());if(d.length===0)return;let v;try{v=JSON.parse(d.join(`
|
|
358
|
+
`))}catch{return}m==="meta"?(x=n.meta)==null||x.call(n,v):m==="delta"?(S=n.delta)==null||S.call(n,v.text??""):m==="done"?(k=n.done)==null||k.call(n,v):m==="error"&&((E=n.error)==null||E.call(n,v.error??"Something went wrong."))};for(;;){const{value:p,done:m}=await a.read();if(m)break;u+=l.decode(p,{stream:!0});let d;for(;(d=u.indexOf(`
|
|
359
|
+
|
|
360
|
+
`))>=0;)f(u.slice(0,d)),u=u.slice(d+2)}u.trim()&&f(u)}async function HR(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 sa(e,t){const n=await HR(e);return n?t&&wl.success(t):wl.error("Couldn't copy automatically — select the text and copy it manually."),n}let Ic=null;const ml=[],WR=50;function qR(e,t){if(!e){ml.length=0;return}Ic||(Ic=Vt(async()=>{const{default:n}=await import("./module-uADzTImp.js");return{default:n}},[]).then(({default:n})=>{n.init(e,{api_host:t||"https://us.i.posthog.com",person_profiles:"identified_only"});for(const[r,i]of ml.splice(0))n.capture(r,i);return n}).catch(n=>(console.warn("[analytics] PostHog failed to load",n),ml.length=0,null)))}function KR(e,t){if(!Ic){ml.length<WR&&ml.push([e,t]);return}Ic.then(n=>n==null?void 0:n.capture(e,t))}const J0=y.createContext(null);function GR({children:e}){var ae;const[t,n]=y.useState(null),[r,i]=y.useState(null),[a,l]=y.useState(null),[u,f]=y.useState(!1),[p,m]=y.useState(!1),[d,v]=y.useState(!0),[x,S]=y.useState(!1),[k,E]=y.useState(!0),[C,P]=y.useState(!0),[R,O]=y.useState(!1),[B,A]=y.useState(!1),[z,I]=y.useState(8),[D,j]=y.useState(16),[H,ee]=y.useState(null),[le,oe]=y.useState(!1),[G,X]=y.useState(!0),[ue,Z]=y.useState(null),Q=y.useRef(0),N=y.useCallback((te,re)=>te==="open"?!0:!!re,[]),M=y.useCallback(async()=>{try{const te=await bl();i(te.logo_url??null),f(!!te.workflow_plane_enabled),m(!!te.promptowl_teams_enabled),v(te.type_artifact_enabled!==!1),E(te.type_table_enabled!==!1),P(te.hootie_enabled!==!1),O(!!te.runner_key_configured),S(!!te.shared_deployment),A(!!te.subagent_runs_enabled),typeof te.subagent_max_depth=="number"&&I(te.subagent_max_depth),typeof te.subagent_max_children=="number"&&j(te.subagent_max_children)}catch{}},[]),$=y.useCallback(async()=>{const te=++Q.current;try{const re=await Dp();if(Q.current!==te)return;ee(re),oe(t==="open"?!0:!!re.me)}catch{}},[t]);y.useEffect(()=>{q0();let te=!1;return(async()=>{try{const re=await bl();if(te)return;const we=re.auth_mode;n(we),i(re.logo_url??null),l(re.version??null),f(!!re.workflow_plane_enabled),m(!!re.promptowl_teams_enabled),v(re.type_artifact_enabled!==!1),E(re.type_table_enabled!==!1),P(re.hootie_enabled!==!1),O(!!re.runner_key_configured),S(!!re.shared_deployment),A(!!re.subagent_runs_enabled),qR(re.posthog_key,re.posthog_host),typeof re.subagent_max_depth=="number"&&I(re.subagent_max_depth),typeof re.subagent_max_children=="number"&&j(re.subagent_max_children);const Ee=await Dp();if(te)return;ee(Ee),oe(N(we,Ee.me))}catch{te||Z("Cannot connect to server")}finally{te||X(!1)}})(),()=>{te=!0}},[N]),y.useEffect(()=>{if(!r)return;const te=document.querySelector('link[rel="icon"]');te&&(te.href=r)},[r]),y.useEffect(()=>{const te=()=>{++Q.current,oe(t==="open"),ee(re=>re&&{...re,me:null})};return window.addEventListener("auth:unauthorized",te),()=>window.removeEventListener("auth:unauthorized",te)},[t]),y.useEffect(()=>{const te="cnst_auth_tick",re=Ee=>{Ee.key===te&&(Lp(),$())},we=()=>{document.visibilityState==="visible"&&$()};return window.addEventListener("storage",re),document.addEventListener("visibilitychange",we),()=>{window.removeEventListener("storage",re),document.removeEventListener("visibilitychange",we)}},[$]);const _=y.useCallback(()=>{try{localStorage.setItem("cnst_auth_tick",String(Date.now()))}catch{}},[]),ie=y.useCallback(te=>{const re=++Q.current;if(Lp(),te){const we=te.name??null;ee(Ee=>({claimed:(Ee==null?void 0:Ee.claimed)??!0,admin:(Ee==null?void 0:Ee.admin)??{email:te.email,name:we},me:{email:te.email,name:we,is_admin:te.is_admin}})),oe(!0)}_(),(async()=>{try{const we=await Dp();Q.current===re&&(ee(we),oe(N(t,we.me)))}catch{}})()},[t,_,N]),K=y.useCallback(async()=>{if(++Q.current,document.cookie.split(";").some(re=>re.trim().startsWith("cnst_sso_session="))){window.location.assign("/auth/oidc/logout");return}try{await Mj()}catch{}Lp(),oe(t==="open"),ee(re=>re&&{...re,me:null}),_()},[t,_]),ce=!!((ae=H==null?void 0:H.me)!=null&&ae.is_admin);return h.jsx(J0.Provider,{value:{authMode:t,logoUrl:r,serverVersion:a,adminStatus:H,authenticated:le,isAdmin:ce,workflowPlaneEnabled:u,promptowlTeamsEnabled:p,typeArtifactEnabled:d,typeTableEnabled:k,hootieEnabled:C,runnerKeyConfigured:R,sharedDeployment:x,subagentRunsEnabled:B,subagentMaxDepth:z,subagentMaxChildren:D,loading:G,error:ue,refresh:$,refreshHealth:M,loginSuccess:ie,logout:K},children:e})}function ts(){const e=y.useContext(J0);if(!e)throw new Error("useAuth must be used inside <AuthProvider>");return e}var b0;const Hr=typeof window<"u"&&((b0=new URLSearchParams(window.location.search).get("invite"))==null?void 0:b0.trim())||null;function QR(){const{loginSuccess:e,logoUrl:t}=ts(),[n,r]=y.useState("login"),[i,a]=y.useState(Hr??""),[l,u]=y.useState(""),[f,p]=y.useState(""),[m,d]=y.useState(null),[v,x]=y.useState(!1),[S,k]=y.useState(null),[E,C]=y.useState(null),[P,R]=y.useState(!1),[O,B]=y.useState(!1),[A,z]=y.useState("open"),[I,D]=y.useState("open"),[j,H]=y.useState({enabled:!1,issuer:""}),ee=typeof window<"u"&&new URLSearchParams(window.location.search).has("admin"),le=A==="open"||A==="admin-only"&&ee,oe=I!=="disabled",G=I==="open",X=(()=>{try{const N=new URL(j.issuer).host;if(N==="login.microsoftonline.com")return"Sign in with Microsoft";if(N==="accounts.google.com")return"Sign in with Google"}catch{}return"Sign in with SSO"})();y.useEffect(()=>{let N=!1;return bl().then(M=>{N||(z(M.promptowl_sign_in_gate??"open"),D(M.manual_sign_in??"open"),H({enabled:!!M.oidc_enabled,issuer:M.oidc_issuer??""}))}).catch(()=>{}),()=>{N=!0}},[]);const ue=async()=>{E&&await sa(E)&&(R(!0),setTimeout(()=>R(!1),1500))},Z=async N=>{N.preventDefault(),d(null),x(!0);try{const M=n==="register"?await Ij(i,l,f):await K0(i,l);e(M.user?{email:M.user.email,name:M.user.name,is_admin:!!M.user.is_admin}:void 0)}catch(M){d(n==="login"&&M.status===401?`Invalid email or password. If you were invited, ${le?"continue with PromptOwl using the invited email, or ":""}use the temporary password from your invite email, or ask your admin to reset it.`:M.message)}finally{x(!1)}},Q=async()=>{var N,M;d(null),x(!0);try{const $=await G0(),_=Hr?`${$.verificationUrl}${$.verificationUrl.includes("?")?"&":"?"}email=${encodeURIComponent(Hr)}`:$.verificationUrl;k(_),C($.deviceCode),window.open(_,"_blank","noopener,noreferrer");for(let ie=0;ie<180;ie++){await new Promise(ae=>setTimeout(ae,2e3));const K=await Q0($.deviceCode,$.clientSecret);if(K.status==="approved"&&K.token){const ae=await Y0(K.token),te=(M=(N=ae.user)==null?void 0:N.email)==null?void 0:M.toLowerCase();Hr&&te&&te!==Hr.toLowerCase()&&wl.warning(`You signed in as ${te}, but the invite was for ${Hr}. Nests shared with ${Hr} won't show here — sign out and continue with PromptOwl using that email.`,{duration:15e3}),e(ae.user?{email:ae.user.email,name:ae.user.name,is_admin:!!ae.user.is_admin}:void 0);return}if(K.status==="pending")continue;const ce=K.status==="denied"||K.status==="rejected"?"Login request was denied. Please try again to create a new authentication request.":K.status==="expired"?"Login expired. Try again.":K.status==="cancelled"?"Login cancelled. Try again.":`Login failed (status: ${K.status}). Try again.`;d(ce),k(null),C(null),x(!1);return}d("Login timed out waiting for approval. Try again."),k(null),C(null),x(!1)}catch($){d($.message),k(null),C(null),x(!1)}};return h.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:h.jsxs("div",{className:"w-full max-w-sm space-y-6 p-6",children:[h.jsxs("div",{className:"text-center",children:[t?h.jsx("img",{src:t,alt:"",className:"h-12 w-12 mx-auto object-contain"}):h.jsx("span",{className:"text-4xl",children:"🪺"}),h.jsx("h1",{className:"text-xl font-semibold mt-2",children:"ContextNest"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Community Server"})]}),Hr&&!S&&h.jsxs("div",{className:"rounded-md border border-primary/30 bg-primary/5 p-3 text-sm space-y-1",children:[h.jsxs("p",{children:["You were invited as ",h.jsx("strong",{children:Hr}),"."]}),h.jsx("p",{className:"text-xs text-muted-foreground",children:le?"Continue with PromptOwl using this email — you can create a PromptOwl account there if you don't have one. Or sign in below with the temporary password from your invite email.":"Sign in below with the temporary password from your invite email."})]}),le&&h.jsx("button",{onClick:Q,disabled:v,"data-testid":"login-promptowl-button",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:v&&S?"Waiting for approval...":Hr?"Continue with PromptOwl":"Login with PromptOwl"}),j.enabled&&!S&&h.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:X}),S&&h.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 space-y-2",children:[h.jsxs("p",{className:"text-xs text-muted-foreground",children:["A new tab opened at"," ",h.jsx("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"PromptOwl"}),". If it asks for a verification code, use this:"]}),E&&h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("code",{className:"flex-1 bg-background border rounded px-2 py-1.5 text-xs font-mono break-all",children:E}),h.jsx("button",{type:"button",onClick:ue,className:"px-2 py-1.5 rounded border text-xs hover:bg-secondary",children:P?"Copied":"Copy"})]})]}),!S&&oe&&h.jsxs(h.Fragment,{children:[(le||j.enabled)&&h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-0 flex items-center",children:h.jsx("div",{className:"w-full border-t border-border"})}),h.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:h.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"or"})})]}),h.jsxs("form",{onSubmit:Z,className:"space-y-3",children:[n==="register"&&h.jsx("input",{type:"text",placeholder:"Name",value:f,onChange:N=>p(N.target.value),"data-testid":"login-name-input",className:"w-full px-3 py-2 rounded-md border border-input bg-background text-sm"}),h.jsx("input",{type:"email",placeholder:"Email",value:i,onChange:N=>a(N.target.value),required:!0,"data-testid":"login-email-input",className:"w-full px-3 py-2 rounded-md border border-input bg-background text-sm"}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:O?"text":"password",placeholder:"Password",value:l,onChange:N=>u(N.target.value),required:!0,"data-testid":"login-password-input",className:"w-full px-3 py-2 pr-9 rounded-md border border-input bg-background text-sm"}),h.jsx("button",{type:"button",onClick:()=>B(N=>!N),"aria-label":O?"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:O?h.jsx(D0,{className:"h-4 w-4"}):h.jsx($0,{className:"h-4 w-4"})})]}),h.jsx("button",{type:"submit",disabled:v,"data-testid":"login-submit-button",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:v?"...":n==="register"?"Create Account":"Login"})]})]}),m&&h.jsx("p",{className:"text-sm text-destructive text-center","data-testid":"login-error",children:m}),!S&&oe&&G&&h.jsx("p",{className:"text-xs text-center text-muted-foreground",children:n==="login"?h.jsxs(h.Fragment,{children:["No account?"," ",h.jsx("button",{onClick:()=>r("register"),"data-testid":"login-register-toggle",className:"text-primary underline",children:"Register"})]}):h.jsxs(h.Fragment,{children:["Have an account?"," ",h.jsx("button",{onClick:()=>r("login"),className:"text-primary underline",children:"Login"})]})}),!S&&!oe&&!le&&!j.enabled&&h.jsx("p",{className:"text-sm text-center text-muted-foreground",children:"Sign-in is restricted on this server. Contact your admin for access."}),A==="admin-only"&&!ee&&!S&&h.jsx("p",{className:"text-xs text-center text-muted-foreground",children:h.jsx("a",{href:"?admin=1",className:"text-primary underline",children:"Admin sign-in"})})]})})}var ha=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(){}},Ai,Wo,Ws,k0,YR=(k0=class extends ha{constructor(){super();Ie(this,Ai);Ie(this,Wo);Ie(this,Ws);ke(this,Ws,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Wo)||this.setEventListener(F(this,Ws))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Wo))==null||t.call(this),ke(this,Wo,void 0))}setEventListener(t){var n;ke(this,Ws,t),(n=F(this,Wo))==null||n.call(this),ke(this,Wo,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,Ai)!==t&&(ke(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,Ai)=="boolean"?F(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,Wo=new WeakMap,Ws=new WeakMap,k0),Lm=new YR,ZR={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},qo,jm,S0,JR=(S0=class{constructor(){Ie(this,qo,ZR);Ie(this,jm,!1)}setTimeoutProvider(e){ke(this,qo,e)}setTimeout(e,t){return F(this,qo).setTimeout(e,t)}clearTimeout(e){F(this,qo).clearTimeout(e)}setInterval(e,t){return F(this,qo).setInterval(e,t)}clearInterval(e){F(this,qo).clearInterval(e)}},qo=new WeakMap,jm=new WeakMap,S0),Oi=new JR;function XR(e){setTimeout(e,0)}var eO=typeof window>"u"||"Deno"in globalThis;function vn(){}function tO(e,t){return typeof e=="function"?e(t):e}function Ch(e){return typeof e=="number"&&e>=0&&e!==1/0}function X0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ti(e,t){return typeof e=="function"?e(t):e}function Xn(e,t){return typeof e=="function"?e(t):e}function nw(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==Dm(l,t.options))return!1}else if(!aa(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||a&&!a(t))}function rw(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(kl(t.options.mutationKey)!==kl(a))return!1}else if(!aa(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Dm(e,t){return((t==null?void 0:t.queryKeyHashFn)||kl)(e)}function kl(e){return JSON.stringify(e,(t,n)=>Eh(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function aa(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 r=0;r<t.length;r++)if(!aa(e[r],t[r]))return!1;return!0}const n=Object.keys(t);for(const r of n)if(!aa(e[r],t[r]))return!1;return!0}return!1}var nO=Object.prototype.hasOwnProperty;function $m(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=ow(e)&&ow(t);if(!r&&!(Eh(e)&&Eh(t)))return t;const a=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,f=r?new Array(u):{};let p=0;for(let m=0;m<u;m++){const d=r?m:l[m],v=e[d],x=t[d];if(v===x){f[d]=v,(r?m<a:nO.call(e,d))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){f[d]=x;continue}const S=$m(v,x,n+1);f[d]=S,S===v&&p++}return a===u&&p===a?e:f}function Mc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ow(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Eh(e){if(!iw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!iw(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function iw(e){return Object.prototype.toString.call(e)==="[object Object]"}function rO(e){return new Promise(t=>{Oi.setTimeout(t,e)})}function _h(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?$m(e,t):t}function oO(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function iO(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zm=Symbol();function e1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===zm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function t1(e,t){return typeof e=="function"?e(...t):!!e}function sO(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Sl=(()=>{let e=()=>eO;return{isServer(){return e()},setIsServer(t){e=t}}})();function Nh(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var aO=XR;function lO(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=aO;const a=u=>{t?e.push(u):i(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(f=>{n(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||l()}return f},batchCalls:u=>(...f)=>{a(()=>{u(...f)})},schedule:a,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Dt=lO(),qs,Ko,Ks,C0,uO=(C0=class extends ha{constructor(){super();Ie(this,qs,!0);Ie(this,Ko);Ie(this,Ks);ke(this,Ks,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,Ko)||this.setEventListener(F(this,Ks))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Ko))==null||t.call(this),ke(this,Ko,void 0))}setEventListener(t){var n;ke(this,Ks,t),(n=F(this,Ko))==null||n.call(this),ke(this,Ko,t(this.setOnline.bind(this)))}setOnline(t){F(this,qs)!==t&&(ke(this,qs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,qs)}},qs=new WeakMap,Ko=new WeakMap,Ks=new WeakMap,C0),Lc=new uO;function cO(e){return Math.min(1e3*2**e,3e4)}function n1(e){return(e??"online")==="online"?Lc.isOnline():!0}var Th=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function r1(e){let t=!1,n=0,r;const i=Nh(),a=()=>i.status!=="pending",l=k=>{var E;if(!a()){const C=new Th(k);v(C),(E=e.onCancel)==null||E.call(e,C)}},u=()=>{t=!0},f=()=>{t=!1},p=()=>Lm.isFocused()&&(e.networkMode==="always"||Lc.isOnline())&&e.canRun(),m=()=>n1(e.networkMode)&&e.canRun(),d=k=>{a()||(r==null||r(),i.resolve(k))},v=k=>{a()||(r==null||r(),i.reject(k))},x=()=>new Promise(k=>{var E;r=C=>{(a()||p())&&k(C)},(E=e.onPause)==null||E.call(e)}).then(()=>{var k;r=void 0,a()||(k=e.onContinue)==null||k.call(e)}),S=()=>{if(a())return;let k;const E=n===0?e.initialPromise:void 0;try{k=E??e.fn()}catch(C){k=Promise.reject(C)}Promise.resolve(k).then(d).catch(C=>{var A;if(a())return;const P=e.retry??(Sl.isServer()?0:3),R=e.retryDelay??cO,O=typeof R=="function"?R(n,C):R,B=P===!0||typeof P=="number"&&n<P||typeof P=="function"&&P(n,C);if(t||!B){v(C);return}n++,(A=e.onFail)==null||A.call(e,n,C),rO(O).then(()=>p()?void 0:x()).then(()=>{t?v(C):S()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:u,continueRetry:f,canStart:m,start:()=>(m()?S():x().then(S),i)}}var Ii,E0,o1=(E0=class{constructor(){Ie(this,Ii)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ch(this.gcTime)&&ke(this,Ii,Oi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sl.isServer()?1/0:300*1e3))}clearGcTimeout(){F(this,Ii)!==void 0&&(Oi.clearTimeout(F(this,Ii)),ke(this,Ii,void 0))}},Ii=new WeakMap,E0);function dO(e){return{onFetch:(t,n)=>{var m,d,v,x,S;const r=t.options,i=(v=(d=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:d.fetchMore)==null?void 0:v.direction,a=((x=t.state.data)==null?void 0:x.pages)||[],l=((S=t.state.data)==null?void 0:S.pageParams)||[];let u={pages:[],pageParams:[]},f=0;const p=async()=>{let k=!1;const E=R=>{sO(R,()=>t.signal,()=>k=!0)},C=e1(t.options,t.fetchOptions),P=async(R,O,B)=>{if(k)return Promise.reject(t.signal.reason);if(O==null&&R.pages.length)return Promise.resolve(R);const z=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:O,direction:B?"backward":"forward",meta:t.options.meta};return E(H),H})(),I=await C(z),{maxPages:D}=t.options,j=B?iO:oO;return{pages:j(R.pages,I,D),pageParams:j(R.pageParams,O,D)}};if(i&&a.length){const R=i==="backward",O=R?fO:sw,B={pages:a,pageParams:l},A=O(r,B);u=await P(B,A,R)}else{const R=e??a.length;do{const O=f===0?l[0]??r.initialPageParam:sw(r,u);if(f>0&&O==null)break;u=await P(u,O),f++}while(f<R)}return u};t.options.persister?t.fetchFn=()=>{var k,E;return(E=(k=t.options).persister)==null?void 0:E.call(k,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=p}}}function sw(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fO(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Gs,Mi,Qs,dr,Li,Qt,jl,Di,Jn,i1,fo,_0,pO=(_0=class extends o1{constructor(t){super();Ie(this,Jn);Ie(this,Gs);Ie(this,Mi);Ie(this,Qs);Ie(this,dr);Ie(this,Li);Ie(this,Qt);Ie(this,jl);Ie(this,Di);ke(this,Di,!1),ke(this,jl,t.defaultOptions),this.setOptions(t.options),this.observers=[],ke(this,Li,t.client),ke(this,dr,F(this,Li).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ke(this,Mi,lw(this.options)),this.state=t.state??F(this,Mi),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return F(this,Gs)}get promise(){var t;return(t=F(this,Qt))==null?void 0:t.promise}setOptions(t){if(this.options={...F(this,jl),...t},t!=null&&t._type&&ke(this,Gs,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=lw(this.options);n.data!==void 0&&(this.setState(aw(n.data,n.dataUpdatedAt)),ke(this,Mi,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,dr).remove(this)}setData(t,n){const r=_h(this.state.data,t,this.options);return Ye(this,Jn,fo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Ye(this,Jn,fo).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=F(this,Qt))==null?void 0:r.promise;return(i=F(this,Qt))==null||i.cancel(t),n?n.then(vn).catch(vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return F(this,Mi)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Xn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ti(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:!X0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,Qt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,Qt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,dr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,Qt)&&(F(this,Di)||Ye(this,Jn,i1).call(this)?F(this,Qt).cancel({revert:!0}):F(this,Qt).cancelRetry()),this.scheduleGc()),F(this,dr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ye(this,Jn,fo).call(this,{type:"invalidate"})}async fetch(t,n){var p,m,d,v,x,S,k,E,C,P,R;if(this.state.fetchStatus!=="idle"&&((p=F(this,Qt))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,Qt))return F(this,Qt).continueRetry(),F(this,Qt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const O=this.observers.find(B=>B.options.queryFn);O&&this.setOptions(O.options)}const r=new AbortController,i=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(ke(this,Di,!0),r.signal)})},a=()=>{const O=e1(this.options,n),A=(()=>{const z={client:F(this,Li),queryKey:this.queryKey,meta:this.meta};return i(z),z})();return ke(this,Di,!1),this.options.persister?this.options.persister(O,A,this):O(A)},u=(()=>{const O={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,Li),state:this.state,fetchFn:a};return i(O),O})(),f=F(this,Gs)==="infinite"?dO(this.options.pages):this.options.behavior;f==null||f.onFetch(u,this),ke(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&Ye(this,Jn,fo).call(this,{type:"fetch",meta:(d=u.fetchOptions)==null?void 0:d.meta}),ke(this,Qt,r1({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:O=>{O instanceof Th&&O.revert&&this.setState({...F(this,Qs),fetchStatus:"idle"}),r.abort()},onFail:(O,B)=>{Ye(this,Jn,fo).call(this,{type:"failed",failureCount:O,error:B})},onPause:()=>{Ye(this,Jn,fo).call(this,{type:"pause"})},onContinue:()=>{Ye(this,Jn,fo).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const O=await F(this,Qt).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(x=(v=F(this,dr).config).onSuccess)==null||x.call(v,O,this),(k=(S=F(this,dr).config).onSettled)==null||k.call(S,O,this.state.error,this),O}catch(O){if(O instanceof Th){if(O.silent)return F(this,Qt).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw Ye(this,Jn,fo).call(this,{type:"error",error:O}),(C=(E=F(this,dr).config).onError)==null||C.call(E,O,this),(R=(P=F(this,dr).config).onSettled)==null||R.call(P,this.state.data,O,this),O}finally{this.scheduleGc()}}},Gs=new WeakMap,Mi=new WeakMap,Qs=new WeakMap,dr=new WeakMap,Li=new WeakMap,Qt=new WeakMap,jl=new WeakMap,Di=new WeakMap,Jn=new WeakSet,i1=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},fo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...s1(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...aw(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ke(this,Qs,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Dt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,dr).notify({query:this,type:"updated",action:t})})},_0);function s1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:n1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function aw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var In,rt,Rl,yn,$i,Ys,ho,Go,Ol,Zs,Js,zi,Fi,Qo,Xs,ct,cl,Ph,jh,Rh,Oh,Ah,Ih,Mh,a1,N0,Fm=(N0=class extends ha{constructor(t,n){super();Ie(this,ct);Ie(this,In);Ie(this,rt);Ie(this,Rl);Ie(this,yn);Ie(this,$i);Ie(this,Ys);Ie(this,ho);Ie(this,Go);Ie(this,Ol);Ie(this,Zs);Ie(this,Js);Ie(this,zi);Ie(this,Fi);Ie(this,Qo);Ie(this,Xs,new Set);this.options=n,ke(this,In,t),ke(this,Go,null),ke(this,ho,Nh()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,rt).addObserver(this),uw(F(this,rt),this.options)?Ye(this,ct,cl).call(this):this.updateResult(),Ye(this,ct,Oh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lh(F(this,rt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lh(F(this,rt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ye(this,ct,Ah).call(this),Ye(this,ct,Ih).call(this),F(this,rt).removeObserver(this)}setOptions(t){const n=this.options,r=F(this,rt);if(this.options=F(this,In).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xn(this.options.enabled,F(this,rt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ye(this,ct,Mh).call(this),F(this,rt).setOptions(this.options),n._defaulted&&!Mc(this.options,n)&&F(this,In).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,rt),observer:this});const i=this.hasListeners();i&&cw(F(this,rt),r,this.options,n)&&Ye(this,ct,cl).call(this),this.updateResult(),i&&(F(this,rt)!==r||Xn(this.options.enabled,F(this,rt))!==Xn(n.enabled,F(this,rt))||ti(this.options.staleTime,F(this,rt))!==ti(n.staleTime,F(this,rt)))&&Ye(this,ct,Ph).call(this);const a=Ye(this,ct,jh).call(this);i&&(F(this,rt)!==r||Xn(this.options.enabled,F(this,rt))!==Xn(n.enabled,F(this,rt))||a!==F(this,Qo))&&Ye(this,ct,Rh).call(this,a)}getOptimisticResult(t){const n=F(this,In).getQueryCache().build(F(this,In),t),r=this.createResult(n,t);return mO(this,r)&&(ke(this,yn,r),ke(this,Ys,this.options),ke(this,$i,F(this,rt).state)),r}getCurrentResult(){return F(this,yn)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&F(this,ho).status==="pending"&&F(this,ho).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){F(this,Xs).add(t)}getCurrentQuery(){return F(this,rt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,In).defaultQueryOptions(t),r=F(this,In).getQueryCache().build(F(this,In),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ye(this,ct,cl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,yn)))}createResult(t,n){var D;const r=F(this,rt),i=this.options,a=F(this,yn),l=F(this,$i),u=F(this,Ys),p=t!==r?t.state:F(this,Rl),{state:m}=t;let d={...m},v=!1,x;if(n._optimisticResults){const j=this.hasListeners(),H=!j&&uw(t,n),ee=j&&cw(t,r,n,i);(H||ee)&&(d={...d,...s1(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:S,errorUpdatedAt:k,status:E}=d;x=d.data;let C=!1;if(n.placeholderData!==void 0&&x===void 0&&E==="pending"){let j;a!=null&&a.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(j=a.data,C=!0):j=typeof n.placeholderData=="function"?n.placeholderData((D=F(this,Js))==null?void 0:D.state.data,F(this,Js)):n.placeholderData,j!==void 0&&(E="success",x=_h(a==null?void 0:a.data,j,n),v=!0)}if(n.select&&x!==void 0&&!C)if(a&&x===(l==null?void 0:l.data)&&n.select===F(this,Ol))x=F(this,Zs);else try{ke(this,Ol,n.select),x=n.select(x),x=_h(a==null?void 0:a.data,x,n),ke(this,Zs,x),ke(this,Go,null)}catch(j){ke(this,Go,j)}F(this,Go)&&(S=F(this,Go),x=F(this,Zs),k=Date.now(),E="error");const P=d.fetchStatus==="fetching",R=E==="pending",O=E==="error",B=R&&P,A=x!==void 0,I={status:E,fetchStatus:d.fetchStatus,isPending:R,isSuccess:E==="success",isError:O,isInitialLoading:B,isLoading:B,data:x,dataUpdatedAt:d.dataUpdatedAt,error:S,errorUpdatedAt:k,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>p.dataUpdateCount||d.errorUpdateCount>p.errorUpdateCount,isFetching:P,isRefetching:P&&!R,isLoadingError:O&&!A,isPaused:d.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:O&&A,isStale:Bm(t,n),refetch:this.refetch,promise:F(this,ho),isEnabled:Xn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=I.data!==void 0,H=I.status==="error"&&!j,ee=G=>{H?G.reject(I.error):j&&G.resolve(I.data)},le=()=>{const G=ke(this,ho,I.promise=Nh());ee(G)},oe=F(this,ho);switch(oe.status){case"pending":t.queryHash===r.queryHash&&ee(oe);break;case"fulfilled":(H||I.data!==oe.value)&&le();break;case"rejected":(!H||I.error!==oe.reason)&&le();break}}return I}updateResult(){const t=F(this,yn),n=this.createResult(F(this,rt),this.options);if(ke(this,$i,F(this,rt).state),ke(this,Ys,this.options),F(this,$i).data!==void 0&&ke(this,Js,F(this,rt)),Mc(n,t))return;ke(this,yn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!F(this,Xs).size)return!0;const l=new Set(a??F(this,Xs));return this.options.throwOnError&&l.add("error"),Object.keys(F(this,yn)).some(u=>{const f=u;return F(this,yn)[f]!==t[f]&&l.has(f)})};Ye(this,ct,a1).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ye(this,ct,Oh).call(this)}},In=new WeakMap,rt=new WeakMap,Rl=new WeakMap,yn=new WeakMap,$i=new WeakMap,Ys=new WeakMap,ho=new WeakMap,Go=new WeakMap,Ol=new WeakMap,Zs=new WeakMap,Js=new WeakMap,zi=new WeakMap,Fi=new WeakMap,Qo=new WeakMap,Xs=new WeakMap,ct=new WeakSet,cl=function(t){Ye(this,ct,Mh).call(this);let n=F(this,rt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(vn)),n},Ph=function(){Ye(this,ct,Ah).call(this);const t=ti(this.options.staleTime,F(this,rt));if(Sl.isServer()||F(this,yn).isStale||!Ch(t))return;const r=X0(F(this,yn).dataUpdatedAt,t)+1;ke(this,zi,Oi.setTimeout(()=>{F(this,yn).isStale||this.updateResult()},r))},jh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,rt)):this.options.refetchInterval)??!1},Rh=function(t){Ye(this,ct,Ih).call(this),ke(this,Qo,t),!(Sl.isServer()||Xn(this.options.enabled,F(this,rt))===!1||!Ch(F(this,Qo))||F(this,Qo)===0)&&ke(this,Fi,Oi.setInterval(()=>{(this.options.refetchIntervalInBackground||Lm.isFocused())&&Ye(this,ct,cl).call(this)},F(this,Qo)))},Oh=function(){Ye(this,ct,Ph).call(this),Ye(this,ct,Rh).call(this,Ye(this,ct,jh).call(this))},Ah=function(){F(this,zi)!==void 0&&(Oi.clearTimeout(F(this,zi)),ke(this,zi,void 0))},Ih=function(){F(this,Fi)!==void 0&&(Oi.clearInterval(F(this,Fi)),ke(this,Fi,void 0))},Mh=function(){const t=F(this,In).getQueryCache().build(F(this,In),this.options);if(t===F(this,rt))return;const n=F(this,rt);ke(this,rt,t),ke(this,Rl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},a1=function(t){Dt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,yn))}),F(this,In).getQueryCache().notify({query:F(this,rt),type:"observerResultsUpdated"})})},N0);function hO(e,t){return Xn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Xn(t.retryOnMount,e)===!1)}function uw(e,t){return hO(e,t)||e.state.data!==void 0&&Lh(e,t,t.refetchOnMount)}function Lh(e,t,n){if(Xn(t.enabled,e)!==!1&&ti(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Bm(e,t)}return!1}function cw(e,t,n,r){return(e!==t||Xn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Bm(e,n)}function Bm(e,t){return Xn(t.enabled,e)!==!1&&e.isStaleByTime(ti(t.staleTime,e))}function mO(e,t){return!Mc(e.getCurrentResult(),t)}var Al,qr,un,Bi,Kr,Vo,T0,gO=(T0=class extends o1{constructor(t){super();Ie(this,Kr);Ie(this,Al);Ie(this,qr);Ie(this,un);Ie(this,Bi);ke(this,Al,t.client),this.mutationId=t.mutationId,ke(this,un,t.mutationCache),ke(this,qr,[]),this.state=t.state||yO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,qr).includes(t)||(F(this,qr).push(t),this.clearGcTimeout(),F(this,un).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ke(this,qr,F(this,qr).filter(n=>n!==t)),this.scheduleGc(),F(this,un).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,qr).length||(this.state.status==="pending"?this.scheduleGc():F(this,un).remove(this))}continue(){var t;return((t=F(this,Bi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,f,p,m,d,v,x,S,k,E,C,P,R,O,B,A,z;const n=()=>{Ye(this,Kr,Vo).call(this,{type:"continue"})},r={client:F(this,Al),meta:this.options.meta,mutationKey:this.options.mutationKey};ke(this,Bi,r1({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(I,D)=>{Ye(this,Kr,Vo).call(this,{type:"failed",failureCount:I,error:D})},onPause:()=>{Ye(this,Kr,Vo).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,un).canRun(this)}));const i=this.state.status==="pending",a=!F(this,Bi).canStart();try{if(i)n();else{Ye(this,Kr,Vo).call(this,{type:"pending",variables:t,isPaused:a}),F(this,un).config.onMutate&&await F(this,un).config.onMutate(t,this,r);const D=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));D!==this.state.context&&Ye(this,Kr,Vo).call(this,{type:"pending",context:D,variables:t,isPaused:a})}const I=await F(this,Bi).start();return await((p=(f=F(this,un).config).onSuccess)==null?void 0:p.call(f,I,t,this.state.context,this,r)),await((d=(m=this.options).onSuccess)==null?void 0:d.call(m,I,t,this.state.context,r)),await((x=(v=F(this,un).config).onSettled)==null?void 0:x.call(v,I,null,this.state.variables,this.state.context,this,r)),await((k=(S=this.options).onSettled)==null?void 0:k.call(S,I,null,t,this.state.context,r)),Ye(this,Kr,Vo).call(this,{type:"success",data:I}),I}catch(I){try{await((C=(E=F(this,un).config).onError)==null?void 0:C.call(E,I,t,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((R=(P=this.options).onError)==null?void 0:R.call(P,I,t,this.state.context,r))}catch(D){Promise.reject(D)}try{await((B=(O=F(this,un).config).onSettled)==null?void 0:B.call(O,void 0,I,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((z=(A=this.options).onSettled)==null?void 0:z.call(A,void 0,I,t,this.state.context,r))}catch(D){Promise.reject(D)}throw Ye(this,Kr,Vo).call(this,{type:"error",error:I}),I}finally{F(this,un).runNext(this)}}},Al=new WeakMap,qr=new WeakMap,un=new WeakMap,Bi=new WeakMap,Kr=new WeakSet,Vo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Dt.batch(()=>{F(this,qr).forEach(r=>{r.onMutationUpdate(t)}),F(this,un).notify({mutation:this,type:"updated",action:t})})},T0);function yO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var mo,_r,Il,P0,vO=(P0=class extends ha{constructor(t={}){super();Ie(this,mo);Ie(this,_r);Ie(this,Il);this.config=t,ke(this,mo,new Set),ke(this,_r,new Map),ke(this,Il,0)}build(t,n,r){const i=new gO({client:t,mutationCache:this,mutationId:++ac(this,Il)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){F(this,mo).add(t);const n=dc(t);if(typeof n=="string"){const r=F(this,_r).get(n);r?r.push(t):F(this,_r).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,mo).delete(t)){const n=dc(t);if(typeof n=="string"){const r=F(this,_r).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&F(this,_r).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=dc(t);if(typeof n=="string"){const r=F(this,_r).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=dc(t);if(typeof n=="string"){const i=(r=F(this,_r).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Dt.batch(()=>{F(this,mo).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,mo).clear(),F(this,_r).clear()})}getAll(){return Array.from(F(this,mo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>rw(n,r))}findAll(t={}){return this.getAll().filter(n=>rw(t,n))}notify(t){Dt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Dt.batch(()=>Promise.all(t.map(n=>n.continue().catch(vn))))}},mo=new WeakMap,_r=new WeakMap,Il=new WeakMap,P0);function dc(e){var t;return(t=e.options.scope)==null?void 0:t.id}function dw(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function xO(e,t,n){const r=e.slice(0);return r[t]=n,r}var ea,Mn,ta,Ui,Zn,Yo,Ml,Ll,Dl,$l,Ht,Dh,$h,l1,zh,Fh,Bh,j0,wO=(j0=class extends ha{constructor(t,n,r){super();Ie(this,Ht);Ie(this,ea);Ie(this,Mn);Ie(this,ta);Ie(this,Ui);Ie(this,Zn);Ie(this,Yo);Ie(this,Ml);Ie(this,Ll);Ie(this,Dl);Ie(this,$l,[]);ke(this,ea,t),ke(this,Ui,r),ke(this,ta,[]),ke(this,Zn,[]),ke(this,Mn,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&F(this,Zn).forEach(t=>{t.subscribe(n=>{Ye(this,Ht,Fh).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,F(this,Zn).forEach(t=>{t.destroy()})}setQueries(t,n){ke(this,ta,t),ke(this,Ui,n),Dt.batch(()=>{const r=F(this,Zn),i=Ye(this,Ht,zh).call(this,F(this,ta));i.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const a=i.map(d=>d.observer),l=a.map(d=>d.getCurrentResult()),u=r.length!==a.length,f=a.some((d,v)=>d!==r[v]),p=u||f,m=p?!0:l.some((d,v)=>{const x=F(this,Mn)[v];return!x||!Mc(d,x)});!p&&!m||(p&&(ke(this,$l,i),ke(this,Zn,a)),ke(this,Mn,l),this.hasListeners()&&(p&&(dw(r,a).forEach(d=>{d.destroy()}),dw(a,r).forEach(d=>{d.subscribe(v=>{Ye(this,Ht,Fh).call(this,d,v)})})),Ye(this,Ht,Bh).call(this)))})}getCurrentResult(){return F(this,Mn)}getQueries(){return F(this,Zn).map(t=>t.getCurrentQuery())}getObservers(){return F(this,Zn)}getOptimisticResult(t,n){const r=Ye(this,Ht,zh).call(this,t),i=r.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),a=r.map(l=>l.defaultedQueryOptions.queryHash);return[i,l=>Ye(this,Ht,$h).call(this,l??i,n,a),()=>Ye(this,Ht,Dh).call(this,i,r)]}},ea=new WeakMap,Mn=new WeakMap,ta=new WeakMap,Ui=new WeakMap,Zn=new WeakMap,Yo=new WeakMap,Ml=new WeakMap,Ll=new WeakMap,Dl=new WeakMap,$l=new WeakMap,Ht=new WeakSet,Dh=function(t,n){return n.map((r,i)=>{const a=t[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,l=>{n.forEach(u=>{u.observer.trackProp(l)})})})},$h=function(t,n,r){if(n){const i=F(this,Dl),a=r!==void 0&&i!==void 0&&(i.length!==r.length||r.some((l,u)=>l!==i[u]));return(!F(this,Yo)||F(this,Mn)!==F(this,Ll)||a||n!==F(this,Ml))&&(ke(this,Ml,n),ke(this,Ll,F(this,Mn)),r!==void 0&&ke(this,Dl,r),ke(this,Yo,$m(F(this,Yo),n(t)))),F(this,Yo)}return t},l1=function(){var t;return((t=F(this,Ui))==null?void 0:t.combine)!==void 0&&F(this,Zn).some((n,r)=>{var i;return n.options.suspense&&((i=F(this,Mn)[r])==null?void 0:i.data)===void 0})},zh=function(t){const n=new Map;F(this,Zn).forEach(i=>{const a=i.options.queryHash;if(!a)return;const l=n.get(a);l?l.push(i):n.set(a,[i])});const r=[];return t.forEach(i=>{var f;const a=F(this,ea).defaultQueryOptions(i),u=((f=n.get(a.queryHash))==null?void 0:f.shift())??new Fm(F(this,ea),a);r.push({defaultedQueryOptions:a,observer:u})}),r},Fh=function(t,n){const r=F(this,Zn).indexOf(t);r!==-1&&(ke(this,Mn,xO(F(this,Mn),r,n)),Ye(this,Ht,Bh).call(this))},Bh=function(){var t;if(this.hasListeners()){const n=Ye(this,Ht,Dh).call(this,F(this,Mn),F(this,$l)),r=Ye(this,Ht,l1).call(this),i=F(this,Yo),a=r?i:Ye(this,Ht,$h).call(this,n,(t=F(this,Ui))==null?void 0:t.combine);(r||i!==a)&&Dt.batch(()=>{this.listeners.forEach(l=>{l(F(this,Mn))})})}},j0),Gr,R0,bO=(R0=class extends ha{constructor(t={}){super();Ie(this,Gr);this.config=t,ke(this,Gr,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??Dm(i,n);let l=this.get(a);return l||(l=new pO({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){F(this,Gr).has(t.queryHash)||(F(this,Gr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,Gr).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,Gr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Dt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,Gr).get(t)}getAll(){return[...F(this,Gr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>nw(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>nw(t,r)):n}notify(t){Dt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gr=new WeakMap,R0),Rt,Zo,Jo,na,ra,Xo,oa,ia,O0,kO=(O0=class{constructor(e={}){Ie(this,Rt);Ie(this,Zo);Ie(this,Jo);Ie(this,na);Ie(this,ra);Ie(this,Xo);Ie(this,oa);Ie(this,ia);ke(this,Rt,e.queryCache||new bO),ke(this,Zo,e.mutationCache||new vO),ke(this,Jo,e.defaultOptions||{}),ke(this,na,new Map),ke(this,ra,new Map),ke(this,Xo,0)}mount(){ac(this,Xo)._++,F(this,Xo)===1&&(ke(this,oa,Lm.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Rt).onFocus())})),ke(this,ia,Lc.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Rt).onOnline())})))}unmount(){var e,t;ac(this,Xo)._--,F(this,Xo)===0&&((e=F(this,oa))==null||e.call(this),ke(this,oa,void 0),(t=F(this,ia))==null||t.call(this),ke(this,ia,void 0))}isFetching(e){return F(this,Rt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,Zo).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Rt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Rt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ti(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Rt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=F(this,Rt).get(r.queryHash),a=i==null?void 0:i.state.data,l=tO(t,a);if(l!==void 0)return F(this,Rt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Dt.batch(()=>F(this,Rt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Rt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Rt);Dt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Rt);return Dt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Dt.batch(()=>F(this,Rt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(vn).catch(vn)}invalidateQueries(e,t={}){return Dt.batch(()=>(F(this,Rt).findAll(e).forEach(n=>{n.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 n={...t,cancelRefetch:t.cancelRefetch??!0},r=Dt.batch(()=>F(this,Rt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(vn)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(vn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Rt).build(this,t);return n.isStaleByTime(ti(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vn).catch(vn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vn).catch(vn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Lc.isOnline()?F(this,Zo).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Rt)}getMutationCache(){return F(this,Zo)}getDefaultOptions(){return F(this,Jo)}setDefaultOptions(e){ke(this,Jo,e)}setQueryDefaults(e,t){F(this,na).set(kl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,na).values()],n={};return t.forEach(r=>{aa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,ra).set(kl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,ra).values()],n={};return t.forEach(r=>{aa(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Jo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Dm(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===zm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Jo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Rt).clear(),F(this,Zo).clear()}},Rt=new WeakMap,Zo=new WeakMap,Jo=new WeakMap,na=new WeakMap,ra=new WeakMap,Xo=new WeakMap,oa=new WeakMap,ia=new WeakMap,O0),u1=y.createContext(void 0),Wl=e=>{const t=y.useContext(u1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},SO=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(u1.Provider,{value:e,children:t})),c1=y.createContext(!1),d1=()=>y.useContext(c1);c1.Provider;function CO(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var EO=y.createContext(CO()),f1=()=>y.useContext(EO),p1=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?t1(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},h1=e=>{y.useEffect(()=>{e.clearReset()},[e])},m1=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||t1(n,[e.error,r])),g1=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},_O=(e,t)=>e.isLoading&&e.isFetching&&!t,Uh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Vh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function NO({queries:e,...t},n){const r=Wl(),i=d1(),a=f1(),l=y.useMemo(()=>e.map(k=>{const E=r.defaultQueryOptions(k);return E._optimisticResults=i?"isRestoring":"optimistic",E}),[e,r,i]);l.forEach(k=>{g1(k);const E=r.getQueryCache().get(k.queryHash);p1(k,a,E)}),h1(a);const[u]=y.useState(()=>new wO(r,l,t)),[f,p,m]=u.getOptimisticResult(l,t.combine),d=!i&&t.subscribed!==!1;y.useSyncExternalStore(y.useCallback(k=>d?u.subscribe(Dt.batchCalls(k)):vn,[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setQueries(l,t)},[l,t,u]);const x=f.some((k,E)=>Uh(l[E],k))?f.flatMap((k,E)=>{const C=l[E];if(C&&Uh(C,k)){const P=new Fm(r,C);return Vh(C,P,a)}return[]}):[];if(x.length>0)throw Promise.all(x);const S=f.find((k,E)=>{const C=l[E];return C&&m1({result:k,errorResetBoundary:a,throwOnError:C.throwOnError,query:r.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(S!=null&&S.error)throw S.error;return p(m())}function TO(e,t,n){var x,S,k,E;const r=d1(),i=f1(),a=Wl(),l=a.defaultQueryOptions(e);(S=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||S.call(x,l);const u=a.getQueryCache().get(l.queryHash),f=e.subscribed!==!1;l._optimisticResults=r?"isRestoring":f?"optimistic":void 0,g1(l),p1(l,i,u),h1(i);const p=!a.getQueryCache().get(l.queryHash),[m]=y.useState(()=>new t(a,l)),d=m.getOptimisticResult(l),v=!r&&f;if(y.useSyncExternalStore(y.useCallback(C=>{const P=v?m.subscribe(Dt.batchCalls(C)):vn;return m.updateResult(),P},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(l)},[l,m]),Uh(l,d))throw Vh(l,m,i);if(m1({result:d,errorResetBoundary:i,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw d.error;if((E=(k=a.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||E.call(k,l,d),l.experimental_prefetchInRender&&!Sl.isServer()&&_O(d,r)){const C=p?Vh(l,m,i):u==null?void 0:u.promise;C==null||C.catch(vn).finally(()=>{m.updateResult()})}return l.notifyOnChangeProps?d:m.trackResult(d)}function hr(e,t){return TO(e,Fm)}const q={nests:["nests"],nestList:(e=!1)=>[...q.nestListAll(),e?"archived":"live"],nestListAll:()=>[...q.nests,"list"],unsynced:()=>[...q.nests,"unsynced"],nest:e=>[...q.nests,"detail",e],settings:e=>[...q.nest(e),"settings"],nodes:e=>[...q.nest(e),"nodes"],folderNodes:(e,t)=>[...q.nodes(e),"folder",t],nodesMeta:(e,t=!1)=>[...q.nodes(e),"meta",t?"approved":"all"],census:e=>[...q.nodes(e),"census"],stewards:e=>[...q.nest(e),"stewards"],collaborators:e=>[...q.nest(e),"collaborators"],mentionable:e=>[...q.nest(e),"mentionable"],definitions:e=>[...q.nest(e),"definitions"],commentCounts:e=>[...q.nest(e),"comment-counts"],overview:e=>[...q.nest(e),"overview"],tags:e=>[...q.nest(e),"tags"],graph:e=>[...q.nest(e),"graph"],edgeTypes:e=>[...q.nest(e),"edge-types"],edges:e=>[...q.nest(e),"edges"],schedules:e=>[...q.nest(e),"schedules"],env:e=>[...q.nest(e),"env"],connectors:e=>[...q.nest(e),"connectors"],nestTeams:e=>[...q.nest(e),"teams"],externalEdits:e=>[...q.nest(e),"external-edits"],externalEditCount:e=>[...q.externalEdits(e),"count"],hooks:(e,t)=>[...q.nest(e),"hooks",t??"all"],reviewQueue:(e,t)=>[...q.nest(e),"review-queue",t],deletionRequests:(e,t)=>[...q.nest(e),"deletion-requests",t],feed:(e,t,n,r)=>[...q.nest(e),"feed",t,n,r],node:(e,t)=>[...q.nodes(e),"node",t],nodeVersions:(e,t)=>[...q.node(e,t),"versions"],nodeReviews:(e,t)=>[...q.node(e,t),"reviews"],nodeStewards:(e,t)=>[...q.node(e,t),"stewards"],nodeWatchers:(e,t)=>[...q.node(e,t),"watchers"],nodeAnnotations:(e,t)=>[...q.node(e,t),"annotations"],nodePendingEdit:(e,t)=>[...q.node(e,t),"external-edit"],nodeComments:(e,t,n)=>[...q.node(e,t),"comments",n],nodeActivity:(e,t,n)=>[...q.node(e,t),"activity",n],people:["people"],peopleSuggest:e=>[...q.people,"suggest",e],teams:["teams"],teamList:()=>[...q.teams,"list"],team:e=>[...q.teams,"detail",e],promptowlTeams:()=>[...q.teams,"promptowl"],admin:["admin"],adminSettings:()=>[...q.admin,"settings"],superAdmins:()=>[...q.admin,"super-admins"],communitySites:()=>[...q.admin,"community-sites"],auth:["auth"],teammates:()=>[...q.auth,"teammates"],apiKeys:()=>[...q.auth,"keys"],license:["license"],licenseStatus:()=>[...q.license,"status"],me:["me"],unreadNotifications:()=>[...q.me,"notifications","unread"],myWork:(e,t)=>[...q.me,"work",e??null,t??null],myDrafts:(e,t,n,r)=>[...q.me,"drafts",e??null,t??null,n??null,r??null],health:["health"],search:["search"],globalSearch:(e,t)=>[...q.search,"global",e,t]},He={reference:5*6e4,listing:3e4,governance:5e3,content:0};function PO(e,t){const n=t==null?void 0:t.status;return n===401||n===403||n===404?!1:e<2}function jO(){return new kO({defaultOptions:{queries:{retry:PO,gcTime:5*6e4,retryOnMount:!0}}})}const RO=[{match:/^\/nodes\/(.+)\/(?:comments|annotations)(?:\/|$)/,affects:(e,t)=>[q.node(e,t[1]),q.commentCounts(e),[...q.nest(e),"feed"]]},{match:/^\/nodes\/(.+)\/watchers(?:\/|$|\?)/,affects:(e,t)=>[q.nodeWatchers(e,t[1])]},{match:/^\/nodes\/(.+)\/(?:approve|reject|submit-review|revert|external-edits)(?:\/|$)/,affects:e=>[q.nodes(e),[...q.nest(e),"review-queue"],q.externalEdits(e),[...q.nest(e),"feed"],q.me]},{match:/^\/nodes\/(.+)\/request-deletion(?:\/|$)/,affects:e=>[[...q.nest(e),"deletion-requests"],q.me]},{match:/^\/nodes\/(.+)\/move(?:\/|$)/,affects:(e,t)=>[q.node(e,t[1]),q.nodes(e),q.nestListAll(),[...q.nest(e),"feed"]]},{match:/^\/nodes(?:\/)?$/,affects:e=>[q.nodes(e),q.nestListAll(),q.search,[...q.nest(e),"feed"]]},{match:/^\/nodes\/(.+)$/,affects:(e,t)=>[q.node(e,t[1]),q.nodes(e),q.nestListAll(),q.search,[...q.nest(e),"feed"]]},{match:/^\/stewards/,affects:e=>[q.stewards(e),q.mentionable(e),q.nest(e)]},{match:/^\/collaborators/,affects:e=>[q.collaborators(e),q.mentionable(e),q.nest(e)]},{match:/^\/teams/,affects:e=>[q.nestTeams(e),q.teams,q.collaborators(e),q.mentionable(e),q.nest(e)]},{match:/^\/settings/,affects:e=>[q.nest(e)]},{match:/^\/visibility/,affects:e=>[q.nest(e),q.nestListAll()]},{match:/^\/reader-mode/,affects:e=>[q.nest(e),q.nestListAll()]},{match:/^\/branding/,affects:e=>[q.nest(e)]},{match:/^\/definitions/,affects:e=>[q.definitions(e)]},{match:/^\/edges/,affects:e=>[q.edges(e),q.graph(e)]},{match:/^\/edge-types/,affects:e=>[q.edgeTypes(e),q.edges(e)]},{match:/^\/env/,affects:e=>[q.env(e)]},{match:/^\/hooks/,affects:e=>[[...q.nest(e),"hooks"]]},{match:/^\/schedules/,affects:e=>[q.schedules(e)]},{match:/^\/connectors/,affects:e=>[q.connectors(e)]},{match:/^\/external-edits/,affects:e=>[q.externalEdits(e),q.nodes(e)]},{match:/^\/deletion-requests/,affects:e=>[[...q.nest(e),"deletion-requests"],q.nodes(e),q.nestListAll(),q.me]},{match:/^\/(delete-folder|request-deletion)/,affects:e=>[q.nodes(e),q.nestListAll()]},{match:/^\/(archive|restore)/,affects:e=>[q.nest(e),q.nestListAll(),q.me,q.search]},{match:/^\/pin/,affects:()=>[q.nestList()]}];function OO(e,t){var i;const n=a=>void e.invalidateQueries({queryKey:a}),r=(i=t.match(/^\/nests\/([^/?]+)/))==null?void 0:i[1];if(r&&r!=="import"&&r!=="unsynced"){const a=t.slice(`/nests/${r}`.length).split("?")[0];for(const l of RO){const u=a.match(l.match);if(u){for(const f of l.affects(r,u))n(f);return}}n(q.nest(r)),n(q.nestListAll());return}if(t.startsWith("/nests")){n(q.nestListAll()),n(q.unsynced());return}if(t.startsWith("/teams")){n(q.teams),n(q.nests);return}if(t.startsWith("/admin")){n(q.admin),n(q.auth),n(q.people),n(q.nests);return}if(t.startsWith("/auth")){n(q.auth);return}if(t.startsWith("/license")){n(q.license);return}t.startsWith("/me")&&n(q.me)}function AO(e){Aj({clear:()=>e.clear(),invalidatePath:t=>OO(e,t)})}const It={nestList:(e=!1)=>({queryKey:q.nestList(e),queryFn:()=>Wj({archived:e}),staleTime:He.reference}),unsynced:()=>({queryKey:q.unsynced(),queryFn:()=>Qj(),staleTime:He.listing}),nest:e=>({queryKey:q.nest(e),queryFn:()=>Yj(e),staleTime:He.reference}),settings:e=>({queryKey:q.settings(e),queryFn:()=>Hj(e),staleTime:He.reference}),nodes:e=>({queryKey:q.nodes(e),queryFn:()=>Jj(e),staleTime:He.listing}),folderNodes:(e,t)=>({queryKey:q.folderNodes(e,t),queryFn:()=>Xj(e,t),staleTime:He.listing}),nodesMeta:(e,t=!1)=>({queryKey:q.nodesMeta(e,t),queryFn:()=>eR(e,t),staleTime:He.listing}),census:e=>({queryKey:q.census(e),queryFn:()=>tR(e),staleTime:He.listing}),stewards:e=>({queryKey:q.stewards(e),queryFn:()=>cR(e),staleTime:He.reference}),collaborators:e=>({queryKey:q.collaborators(e),queryFn:()=>CR(e),staleTime:He.reference}),mentionable:e=>({queryKey:q.mentionable(e),queryFn:()=>ER(e),staleTime:He.reference}),peopleSuggest:e=>({queryKey:q.peopleSuggest(e),queryFn:()=>_R(e),staleTime:He.reference}),definitions:e=>({queryKey:q.definitions(e),queryFn:()=>Zj(e),staleTime:He.reference}),commentCounts:e=>({queryKey:q.commentCounts(e),queryFn:()=>nR(e),staleTime:He.listing}),overview:e=>({queryKey:q.overview(e),queryFn:()=>sR(e),staleTime:He.listing}),globalSearch:(e,t)=>({queryKey:q.globalSearch(e,t),queryFn:()=>iR(e,t),staleTime:He.listing}),tags:e=>({queryKey:q.tags(e),queryFn:()=>uR(e),staleTime:He.reference}),graph:e=>({queryKey:q.graph(e),queryFn:()=>OR(e),staleTime:He.listing}),edgeTypes:e=>({queryKey:q.edgeTypes(e),queryFn:()=>MR(e),staleTime:He.reference}),edges:e=>({queryKey:q.edges(e),queryFn:()=>LR(e),staleTime:He.listing}),schedules:e=>({queryKey:q.schedules(e),queryFn:()=>DR(e),staleTime:He.reference}),env:e=>({queryKey:q.env(e),queryFn:()=>FR(e),staleTime:He.reference}),connectors:e=>({queryKey:q.connectors(e),queryFn:()=>UR(e),staleTime:He.reference}),nestTeams:e=>({queryKey:q.nestTeams(e),queryFn:()=>RR(e),staleTime:He.reference}),hooks:(e,t)=>({queryKey:q.hooks(e,t),queryFn:()=>BR(e,t),staleTime:He.reference}),externalEdits:e=>({queryKey:q.externalEdits(e),queryFn:()=>bR(e),staleTime:He.governance}),externalEditCount:e=>({queryKey:q.externalEditCount(e),queryFn:()=>kR(e),staleTime:He.governance}),reviewQueue:(e,t="pending")=>({queryKey:q.reviewQueue(e,t),queryFn:()=>pR(e,t),staleTime:He.governance}),deletionRequests:(e,t="pending")=>({queryKey:q.deletionRequests(e,t),queryFn:()=>fR(e,t),staleTime:He.governance}),feed:(e,t="all",n=50,r=0)=>({queryKey:q.feed(e,t,n,r),queryFn:()=>hR(e,t,n,r),staleTime:He.governance}),node:(e,t)=>({queryKey:q.node(e,t),queryFn:()=>rR(e,t),staleTime:He.content,gcTime:6e4}),nodeVersions:(e,t)=>({queryKey:q.nodeVersions(e,t),queryFn:()=>mR(e,t),staleTime:He.listing}),nodeReviews:(e,t)=>({queryKey:q.nodeReviews(e,t),queryFn:()=>gR(e,t),staleTime:He.governance}),nodeStewards:(e,t)=>({queryKey:q.nodeStewards(e,t),queryFn:()=>dR(e,t),staleTime:He.reference}),nodeWatchers:(e,t)=>({queryKey:q.nodeWatchers(e,t),queryFn:()=>$R(e,t),staleTime:He.reference}),nodeAnnotations:(e,t)=>({queryKey:q.nodeAnnotations(e,t),queryFn:()=>vR(e,t),staleTime:He.governance}),nodePendingEdit:(e,t)=>({queryKey:q.nodePendingEdit(e,t),queryFn:()=>SR(e,t),staleTime:He.governance}),nodeComments:(e,t,n)=>({queryKey:q.nodeComments(e,t,n??"all"),queryFn:()=>xR(e,t,n),staleTime:He.governance}),nodeActivity:(e,t,n=100)=>({queryKey:q.nodeActivity(e,t,n),queryFn:()=>wR(e,t,n),staleTime:He.governance}),unreadNotifications:()=>({queryKey:q.unreadNotifications(),queryFn:()=>zR(),staleTime:He.listing}),health:()=>({queryKey:q.health,queryFn:()=>bl(),staleTime:He.reference}),adminSettings:()=>({queryKey:q.adminSettings(),queryFn:()=>Lj(),staleTime:He.reference}),superAdmins:()=>({queryKey:q.superAdmins(),queryFn:()=>zj(),staleTime:He.reference}),communitySites:()=>({queryKey:q.communitySites(),queryFn:()=>Fj(),staleTime:He.reference}),teammates:()=>({queryKey:q.teammates(),queryFn:()=>$j(),staleTime:He.reference}),apiKeys:()=>({queryKey:q.apiKeys(),queryFn:()=>Bj(),staleTime:He.reference}),licenseStatus:()=>({queryKey:q.licenseStatus(),queryFn:()=>Z0(),staleTime:He.reference}),teamList:()=>({queryKey:q.teamList(),queryFn:()=>NR(),staleTime:He.reference}),team:e=>({queryKey:q.team(e),queryFn:()=>TR(e),staleTime:He.reference}),promptowlTeams:()=>({queryKey:q.promptowlTeams(),queryFn:()=>jR(),staleTime:He.reference}),myWork:e=>({queryKey:q.myWork(e==null?void 0:e.limit,e==null?void 0:e.offset),queryFn:()=>AR(e),staleTime:He.governance}),myDrafts:e=>({queryKey:q.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:()=>IR(e),staleTime:He.governance})},Hq=(e=!1)=>hr(It.nestList(e)),IO=e=>hr({...It.nest(e??""),enabled:!!e}),Wq=e=>hr({...It.settings(e??""),enabled:!!e}),qq=(e,t)=>hr({...It.nodeStewards(e??"",t??""),enabled:!!e&&!!t}),MO=e=>hr({...It.apiKeys(),...e}),Hh="00000000-0000-0000-0000-000000000000",Kq=8,Gq=50;function LO(e){return!!(e!=null&&e.archived_at)}function Wh({roles:e,permission:t,myStewards:n,isOwner:r,isAdmin:i,readerMode:a,previewReader:l,isArchived:u}){if(u)return{canManage:!1,collabCanWrite:!1,canReviewDocs:!1,canEditDocs:!1,isReadOnly:!0,isReaderView:!!a};const p=r||i||((...k)=>e.some(E=>k.includes(E)))("owner","admin"),m=t==="owner"||t==="admin"||t==="write",d=p||n.some(k=>k.role==="reviewer"),v=p||m||n.some(k=>k.role==="editor"&&k.scope==="nest"),x=!v&&!d&&!p;return{canManage:p,collabCanWrite:m,canReviewDocs:d,canEditDocs:v,isReadOnly:x,isReaderView:!!a&&(x||!!l)}}function Qq(e,t){return!t&&(e==="editor"||e==="admin")}function qh(e){const t=e.startsWith("nodes/")?e.slice(6):e;return(t.includes("/")?t.slice(t.lastIndexOf("/")+1):t).toLowerCase()}function Yq(e,t){return(e==null?void 0:e.id)===t||qh((e==null?void 0:e.id)||"")===qh(t)}function Zq(e){return[qh((e==null?void 0:e.id)||""),String((e==null?void 0:e.title)||"").toLowerCase()]}const DO=["board","ontology-graph","definitions"];function y1(e){return DO.includes(e)}function $p(e,t){return!!t&&y1(e)}const pr="__uncategorized__",$O=["draft","pending_review","approved","published","rejected","external_edit_pending"],zO={draft:"Draft",pending_review:"Pending Review",approved:"Approved",published:"Published",rejected:"Rejected",external_edit_pending:"External Edit"};function FO(e,t=28){if(e.length<=t)return e;const n=e.split("/");for(let r=1;r<n.length;r++){const i=`…/${n.slice(r).join("/")}`;if(i.length<=t||r===n.length-1)return i}return e}function Um(e){const t=e.startsWith("nodes/")?e.slice(6):e,n=t.lastIndexOf("/");return n===-1?"":t.slice(0,n)}function Vm(e){return(e.tagNamespace??"").trim().split(":")[0].trim()}const v1=e=>e.startsWith("#")?e.slice(1):e,fw=e=>e.startsWith("#")?e:`#${e}`;function BO(e){return e.dimension==="tag"?`tag:${Vm(e)}`:e.dimension}function Jq(e,t){if(!e.startsWith("tag:"))return t;const n=r=>r&&[...new Set(r.map(v1))];return{columnOrder:n(t.columnOrder),hiddenColumns:n(t.hiddenColumns)}}function Xq(e){const t=e.layouts[BO(e)]??{};return{dimension:e.dimension,tagNamespace:e.tagNamespace,columnOrder:t.columnOrder??(e.dimension==="status"?$O:void 0),hiddenColumns:t.hiddenColumns,explicitColumns:e.dimension==="tag"&&t.columnOrder!==void 0}}function x1(e,t){switch(t.dimension){case"folder":return[Um(e.id)];case"status":return[e.status||pr];case"tag":{const n=Vm(t),r=e.tags.map(v1),i=n?r.filter(a=>a.startsWith(`${n}:`)).map(a=>a.slice(n.length+1)).filter(Boolean):r.filter(Boolean);return i.length>0?[...new Set(i)]:[pr]}}}function UO(e,t){return x1(e,t)[0]}function w1(e,t,n){const r=x1(e,t).filter(i=>!n.has(i));if(t.explicitColumns){const i=new Set((t.columnOrder??[]).filter(a=>!n.has(a)));return r.filter(a=>i.has(a))}return r.length>0?r:[pr]}function pw(e,t){return e===pr?"Uncategorized":e===""&&t.dimension==="folder"?"(root)":t.dimension==="status"?zO[e]??e.replace(/_/g," "):t.dimension==="folder"?FO(e):e}function eK(e){return e!=="tag"}function hw(e,t){return e===pr?"Uncategorized":e===""&&t.dimension==="folder"?"(root)":e}function VO(e,t){const n=new Set(t.hiddenColumns??[]);if(t.explicitColumns){const p=new Set,m=[];for(const d of t.columnOrder??[])n.has(d)||d===pr||p.has(d)||(p.add(d),m.push(d));return m.map(d=>({key:d,label:pw(d,t),title:hw(d,t)}))}const r=new Set;for(const p of e)for(const m of w1(p,t,n))r.add(m);const i=r.has(pr);r.delete(pr);const a=[],l=new Set;for(const p of t.columnOrder??[])n.has(p)||p===pr||l.has(p)||(l.add(p),a.push(p),r.delete(p));const u=[...r].sort(),f=[...a,...u];return i&&f.push(pr),f.map(p=>({key:p,label:pw(p,t),title:hw(p,t)}))}function tK(e,t){const n=new Set(t.hiddenColumns??[]),r=VO(e,t),i={};for(const a of r)i[a.key]=[];for(const a of e)for(const l of w1(a,t,n))(i[l]??(i[l]=[])).push(a);return{columns:r,byColumn:i}}function nK(e,t,n,r){switch(n.dimension){case"folder":return UO(e,n)===t?{kind:"unsupported",reason:"Already in this column."}:{kind:"move-folder",folder:t};case"tag":{if(t===pr)return{kind:"unsupported",reason:"Drop onto a tag column to add that tag."};if(r&&r===t)return{kind:"unsupported",reason:"Already in this column."};const i=Vm(n),a=p=>fw(i?`${i}:${p}`:p),l=r&&r!==pr?a(r):null,u=a(t),f=new Set(e.tags.map(fw));return l&&f.delete(l),!l&&f.has(u)?{kind:"unsupported",reason:"Already in this column."}:(f.add(u),{kind:"retag",tags:[...f]})}case"status":return{kind:"unsupported",reason:"Status changes go through the review workflow, not the board — open the doc and submit for review."}}}const HO={path:"board",label:"Board",icon:F0,order:1,viewPage:"board"},WO=Object.freeze(Object.defineProperty({__proto__:null,meta:HO},Symbol.toStringTag,{value:"Module"})),qO={path:"definitions",label:"Definitions",icon:oP,order:3,viewPage:"definitions"},KO=Object.freeze(Object.defineProperty({__proto__:null,meta:qO},Symbol.toStringTag,{value:"Module"})),GO={path:"graph",label:"Graph",icon:YP,order:2,viewPage:"ontology-graph"},QO=Object.freeze(Object.defineProperty({__proto__:null,meta:GO},Symbol.toStringTag,{value:"Module"})),YO={path:"workflows",label:"Workflows",icon:Nj,order:4,viewPage:"workflows",beta:!0,visible:e=>e.workflowPlaneEnabled&&e.canEditDocs},ZO=Object.freeze(Object.defineProperty({__proto__:null,meta:YO},Symbol.toStringTag,{value:"Module"})),JO=Object.assign({"../pages/nest/board/meta.ts":WO,"../pages/nest/definitions/meta.ts":KO,"../pages/nest/graph/meta.ts":QO,"../pages/nest/workflows/meta.ts":ZO}),XO=Object.assign({"../pages/nest/board/page.tsx":()=>Vt(()=>import("./page-kM7eO5Kj.js"),__vite__mapDeps([0,1,2,3,4])),"../pages/nest/definitions/page.tsx":()=>Vt(()=>import("./page-Bb8xGOPQ.js"),__vite__mapDeps([5,1,2,6])),"../pages/nest/graph/page.tsx":()=>Vt(()=>import("./page-BJQuaTRW.js"),__vite__mapDeps([7,1,2,8])),"../pages/nest/workflows/page.tsx":()=>Vt(()=>import("./page-I6vAFJOj.js"),__vite__mapDeps([9,10,4,2,6,11,12,13,14,1,15,16,17,8,18,19,20,21,22,23,24]))}),eA=e=>e.split("/").slice(-2,-1)[0],cd=Object.entries(JO).map(([e,t])=>{const n=eA(e),r=XO[e.replace(/meta\.ts$/,"page.tsx")];if(!r)throw new Error(`pages/nest/${n}: meta.ts has no page.tsx beside it`);return{id:n,...t.meta,Component:Om(r)}}).sort((e,t)=>e.order-t.order),tl=e=>cd.find(t=>t.viewPage===e),tA=e=>e?cd.find(t=>t.path===e):void 0,nA=e=>cd.filter(t=>!t.visible||t.visible(e));function rA(e){if(e==="new")return[];const t=Um(e);if(!t)return[];const n=t.split("/");return n.map((r,i)=>n.slice(0,i+1).join("/"))}function oA(e){const t=new Map;for(const r of e){const i=Um(r.id),a=t.get(i);a?a.push(r):t.set(i,[r])}const n=new Intl.Collator(void 0,{sensitivity:"base"});return[...t.entries()].sort(([r],[i])=>n.compare(r,i)).map(([r,i])=>({folder:r,items:[...i].sort((a,l)=>n.compare(a.title??a.id,l.title??l.id))}))}function rK(e,t){return e||!!t.initialThreadId||!!t.commentMode||!!t.pendingAnchor||!!t.activeThreadId}const b1="contextnest:doc-page",Ts={sidebarCollapsed:!1,commentsOpen:!1,viewsOpen:!1,closedGroups:[]};function dd(e){try{const t=e.getItem(b1);if(!t)return{...Ts};const n=JSON.parse(t);return{sidebarCollapsed:typeof(n==null?void 0:n.sidebarCollapsed)=="boolean"?n.sidebarCollapsed:Ts.sidebarCollapsed,commentsOpen:typeof(n==null?void 0:n.commentsOpen)=="boolean"?n.commentsOpen:Ts.commentsOpen,viewsOpen:typeof(n==null?void 0:n.viewsOpen)=="boolean"?n.viewsOpen:Ts.viewsOpen,closedGroups:Array.isArray(n==null?void 0:n.closedGroups)?n.closedGroups.filter(r=>typeof r=="string"):[...Ts.closedGroups]}}catch{return{...Ts}}}function Hm(e,t){try{const n={...dd(e),...t};e.setItem(b1,JSON.stringify(n))}catch{}}function iA(e,t){const n=[{id:"overview",label:"Overview",page:"nest",tab:"overview"}];if(e.isReaderView)return n;!e.isReadOnly&&(t.stewardshipEnabled||t.hasPending)&&n.push({id:"review",label:"Review queue",page:"nest",tab:"review"});for(const r of nA({...e,workflowPlaneEnabled:t.workflowPlaneEnabled}))n.push({id:r.id,label:r.label,icon:r.icon,page:r.viewPage,group:"views"});return n}function Kh(e){return e==="Root"?"Root":e.split(/[-_]/).map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function oK(e){return e==="Root"?"Root":e.split("/").map(Kh).join(" / ")}function sA(e,t="",n){const r={path:t,name:"",label:"",depth:-1,count:0,total:0,docs:[],children:[]},i=new Map([[t,r]]),a=p=>{const m=i.get(p);if(m)return m;const v=(t&&p.startsWith(`${t}/`)?p.slice(t.length+1):p).split("/"),x=v.length>1?`${t?`${t}/`:""}${v.slice(0,-1).join("/")}`:t,S=a(x),k={path:p,name:v[v.length-1],label:Kh(v[v.length-1]),depth:S.depth+1,count:0,total:0,docs:[],children:[]};return S.children.push(k),i.set(p,k),k},l=new Map;for(const p of n??[])!p.path||p.path===t||t&&!p.path.startsWith(`${t}/`)||(a(p.path),l.set(p.path,p.total));for(const p of e){const m=p.folder;if(!m||m===t||m==="Root"){r.docs.push(...p.items);continue}a(m).docs.push(...p.items)}const u=p=>{p.count=p.docs.length,p.children.sort((d,v)=>d.name.localeCompare(v.name));let m=p.count;for(const d of p.children)m+=u(d);return p.total=Math.max(m,l.get(p.path)??0),p.total};u(r);const f=(p,m)=>{const d=[p.name];let v=p;for(;v.count===0&&v.children.length===1;)v=v.children[0],d.push(v.name);return{path:v.path,name:v.name,label:d.map(Kh).join(" / "),depth:m,count:v.count,total:v.total,docs:v.docs,children:v.children.map(x=>f(x,m+1))}};return r.children=n?r.children:r.children.map(p=>f(p,0)),r}function aA({groups:e,baseFolder:t="",known:n,indentRem:r=1.25,isCollapsed:i,renderFolder:a,renderDoc:l,className:u}){const f=y.useMemo(()=>sA(e,t,n),[e,t,n]),p=[],m=v=>v>0?{marginLeft:`${v*r}rem`}:void 0,d=v=>{const x=v.depth+1;for(const S of v.docs)p.push(h.jsx("div",{style:m(x),children:l(S,{depth:x,parent:v})},`doc:${S.id}`));for(const S of v.children){const k=i?i(S.path):!1;p.push(h.jsx("div",{style:m(S.depth),children:a(S,{collapsed:k,depth:S.depth})},`folder:${S.path}`)),k||d(S)}};return d(f),h.jsx("div",{className:u,children:p})}const lA={path:"/account",label:"Account",icon:V0,order:40,hidden:!0},uA=Object.freeze(Object.defineProperty({__proto__:null,meta:lA},Symbol.toStringTag,{value:"Module"})),cA={path:"/api-keys",label:"API keys",icon:ld,order:11,group:"workspace"},dA=Object.freeze(Object.defineProperty({__proto__:null,meta:cA},Symbol.toStringTag,{value:"Module"})),fA={path:"/guide",label:"How it works",icon:L0,order:30,group:"help"},pA=Object.freeze(Object.defineProperty({__proto__:null,meta:fA},Symbol.toStringTag,{value:"Module"})),hA={path:"/my-drafts",label:"My Drafts",icon:rj,order:3,group:"work",badge:{options:()=>It.myDrafts({limit:1}),count:e=>{var t;return((t=e==null?void 0:e.pagination)==null?void 0:t.total)??0},tone:"muted"}},mA=Object.freeze(Object.defineProperty({__proto__:null,meta:hA},Symbol.toStringTag,{value:"Module"})),gA={path:"/my-work",label:"My Work",icon:MP,order:2,group:"work",badge:{options:()=>It.myWork({limit:1}),count:e=>{var t;return((t=e==null?void 0:e.pagination)==null?void 0:t.total)??0},tone:"primary"}},yA=Object.freeze(Object.defineProperty({__proto__:null,meta:gA},Symbol.toStringTag,{value:"Module"})),vA={path:"/",label:"Nests",icon:Ul,order:1},xA=Object.freeze(Object.defineProperty({__proto__:null,meta:vA},Symbol.toStringTag,{value:"Module"})),wA={path:"/settings",label:"Server settings",icon:ud,order:21,group:"admin",visible:({isAdmin:e})=>e},bA=Object.freeze(Object.defineProperty({__proto__:null,meta:wA},Symbol.toStringTag,{value:"Module"})),kA={path:"/teammates",label:"Teammates",icon:H0,order:20,group:"admin",visible:({isAdmin:e})=>e},SA=Object.freeze(Object.defineProperty({__proto__:null,meta:kA},Symbol.toStringTag,{value:"Module"})),CA={path:"/teams",label:"Teams",icon:H0,order:10,group:"workspace"},EA=Object.freeze(Object.defineProperty({__proto__:null,meta:CA},Symbol.toStringTag,{value:"Module"})),_A={path:"/trace",label:"Activity trace",icon:fj,order:22,group:"admin",visible:({isAdmin:e})=>e},NA=Object.freeze(Object.defineProperty({__proto__:null,meta:_A},Symbol.toStringTag,{value:"Module"})),TA=[{id:"work",label:"Work"},{id:"workspace",label:"Workspace"},{id:"admin",label:"Admin"},{id:"help",label:"Help"}],PA=Object.assign({"../pages/app/account/meta.ts":uA,"../pages/app/api-keys/meta.ts":dA,"../pages/app/guide/meta.ts":pA,"../pages/app/my-drafts/meta.ts":mA,"../pages/app/my-work/meta.ts":yA,"../pages/app/nests/meta.ts":xA,"../pages/app/settings/meta.ts":bA,"../pages/app/teammates/meta.ts":SA,"../pages/app/teams/meta.ts":EA,"../pages/app/trace/meta.ts":NA}),jA=Object.assign({"../pages/app/account/page.tsx":()=>Vt(()=>import("./page-DspptlWr.js"),__vite__mapDeps([25,26])),"../pages/app/api-keys/page.tsx":()=>Vt(()=>import("./page-CfoR0khy.js"),__vite__mapDeps([27,26,28,6])),"../pages/app/guide/page.tsx":()=>Vt(()=>import("./page-DATSlHCW.js"),__vite__mapDeps([29,26,28,18,22])),"../pages/app/my-drafts/page.tsx":()=>Vt(()=>import("./page-Bxd0EG25.js"),__vite__mapDeps([30,26,31,32,14,20,6,13])),"../pages/app/my-work/page.tsx":()=>Vt(()=>import("./page-YcNNg-dX.js"),__vite__mapDeps([33,26,19,20,21,6,13])),"../pages/app/nests/page.tsx":()=>Vt(()=>import("./page-DTjPQizZ.js"),__vite__mapDeps([34,35,15,6,16,26,14,20])),"../pages/app/settings/page.tsx":()=>Vt(()=>import("./page-QxI4Ud2s.js"),__vite__mapDeps([36,26,35,6])),"../pages/app/teammates/page.tsx":()=>Vt(()=>import("./page-BtM-qDzr.js"),__vite__mapDeps([37,26,18])),"../pages/app/teams/page.tsx":()=>Vt(()=>import("./page-D7Zr5tAI.js"),__vite__mapDeps([38,26,17,6,20,21,18])),"../pages/app/trace/page.tsx":()=>Vt(()=>import("./page-C3QCO6IR.js"),__vite__mapDeps([39,40,26,41,2,13]))}),RA=e=>e.split("/").slice(-2,-1)[0],gl=Object.entries(PA).map(([e,t])=>{const n=RA(e),r=jA[e.replace(/meta\.ts$/,"page.tsx")];if(!r)throw new Error(`pages/app/${n}: meta.ts has no page.tsx beside it`);return{id:n,...t.meta,Component:Om(r)}}).sort((e,t)=>e.order-t.order),Dc="nests";function Gh(e){return gl.find(t=>t.id===e)??gl.find(t=>t.id===Dc)??gl[0]}function OA(e){return Gh(e).path}function AA(e){var n;const t=e.length>1?e.replace(/\/+$/,""):e;return((n=gl.find(r=>r.path===t))==null?void 0:n.id)??null}const k1=(e,t)=>!e.visible||e.visible(t);function zp(e,t){const n=Gh(e);return k1(n,t)?n:Gh(Dc)}function IA(e){const t=gl.filter(n=>!n.hidden&&k1(n,e));return{top:t.filter(n=>!n.group),groups:TA.map(n=>({...n,pages:t.filter(r=>r.group===n.id)})).filter(n=>n.pages.length>0)}}function S1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=S1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C1(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=S1(e))&&(r&&(r+=" "),r+=t);return r}const MA=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},LA=(e,t)=>({classGroupId:e,validator:t}),E1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$c="-",mw=[],DA="arbitrary..",$A=e=>{const t=FA(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return zA(l);const u=l.split($c),f=u[0]===""&&u.length>1?1:0;return _1(u,f,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const f=r[l],p=n[l];return f?p?MA(p,f):f:p||mw}return n[l]||mw}}},_1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const p=_1(e,t+1,a);if(p)return p}const l=n.validators;if(l===null)return;const u=t===0?e.join($c):e.slice(t).join($c),f=l.length;for(let p=0;p<f;p++){const m=l[p];if(m.validator(u))return m.classGroupId}},zA=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?DA+r:void 0})(),FA=e=>{const{theme:t,classGroups:n}=e;return BA(n,t)},BA=(e,t)=>{const n=E1();for(const r in e){const i=e[r];Wm(i,n,r,t)}return n},Wm=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const l=e[a];UA(l,t,n,r)}},UA=(e,t,n,r)=>{if(typeof e=="string"){VA(e,t,n);return}if(typeof e=="function"){HA(e,t,n,r);return}WA(e,t,n,r)},VA=(e,t,n)=>{const r=e===""?t:N1(t,e);r.classGroupId=n},HA=(e,t,n,r)=>{if(qA(e)){Wm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(LA(n,e))},WA=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let l=0;l<a;l++){const[u,f]=i[l];Wm(f,N1(t,u),n,r)}},N1=(e,t)=>{let n=e;const r=t.split($c),i=r.length;for(let a=0;a<i;a++){const l=r[a];let u=n.nextPart.get(l);u||(u=E1(),n.nextPart.set(l,u)),n=u}return n},qA=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,KA=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,l)=>{n[a]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return i(a,l),l},set(a,l){a in n?n[a]=l:i(a,l)}}},Qh="!",gw=":",GA=[],yw=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),QA=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let l=0,u=0,f=0,p;const m=i.length;for(let k=0;k<m;k++){const E=i[k];if(l===0&&u===0){if(E===gw){a.push(i.slice(f,k)),f=k+1;continue}if(E==="/"){p=k;continue}}E==="["?l++:E==="]"?l--:E==="("?u++:E===")"&&u--}const d=a.length===0?i:i.slice(f);let v=d,x=!1;d.endsWith(Qh)?(v=d.slice(0,-1),x=!0):d.startsWith(Qh)&&(v=d.slice(1),x=!0);const S=p&&p>f?p-f:void 0;return yw(a,x,v,S)};if(t){const i=t+gw,a=r;r=l=>l.startsWith(i)?a(l.slice(i.length)):yw(GA,!1,l,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},YA=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const l=n[a],u=l[0]==="[",f=t.has(l);u||f?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},ZA=e=>({cache:KA(e.cacheSize),parseClassName:QA(e),sortModifiers:YA(e),...$A(e)}),JA=/\s+/,XA=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,l=[],u=e.trim().split(JA);let f="";for(let p=u.length-1;p>=0;p-=1){const m=u[p],{isExternal:d,modifiers:v,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:k}=n(m);if(d){f=m+(f.length>0?" "+f:f);continue}let E=!!k,C=r(E?S.substring(0,k):S);if(!C){if(!E){f=m+(f.length>0?" "+f:f);continue}if(C=r(S),!C){f=m+(f.length>0?" "+f:f);continue}E=!1}const P=v.length===0?"":v.length===1?v[0]:a(v).join(":"),R=x?P+Qh:P,O=R+C;if(l.indexOf(O)>-1)continue;l.push(O);const B=i(C,E);for(let A=0;A<B.length;++A){const z=B[A];l.push(R+z)}f=m+(f.length>0?" "+f:f)}return f},eI=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=T1(n))&&(i&&(i+=" "),i+=r);return i},T1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=T1(e[r]))&&(n&&(n+=" "),n+=t);return n},tI=(e,...t)=>{let n,r,i,a;const l=f=>{const p=t.reduce((m,d)=>d(m),e());return n=ZA(p),r=n.cache.get,i=n.cache.set,a=u,u(f)},u=f=>{const p=r(f);if(p)return p;const m=XA(f,n);return i(f,m),m};return a=l,(...f)=>a(eI(...f))},nI=[],Ut=e=>{const t=n=>n[e]||nI;return t.isThemeGetter=!0,t},P1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,j1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rI=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,oI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iI=/\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$/,sI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fo=e=>rI.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Bo=e=>!!e&&Number.isInteger(Number(e)),Fp=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),co=e=>oI.test(e),R1=()=>!0,uI=e=>iI.test(e)&&!sI.test(e),qm=()=>!1,cI=e=>aI.test(e),dI=e=>lI.test(e),fI=e=>!Re(e)&&!Me(e),pI=e=>di(e,I1,qm),Re=e=>P1.test(e),Ti=e=>di(e,M1,uI),vw=e=>di(e,bI,Xe),hI=e=>di(e,D1,R1),mI=e=>di(e,L1,qm),xw=e=>di(e,O1,qm),gI=e=>di(e,A1,dI),fc=e=>di(e,$1,cI),Me=e=>j1.test(e),nl=e=>ns(e,M1),yI=e=>ns(e,L1),ww=e=>ns(e,O1),vI=e=>ns(e,I1),xI=e=>ns(e,A1),pc=e=>ns(e,$1,!0),wI=e=>ns(e,D1,!0),di=(e,t,n)=>{const r=P1.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ns=(e,t,n=!1)=>{const r=j1.exec(e);return r?r[1]?t(r[1]):n:!1},O1=e=>e==="position"||e==="percentage",A1=e=>e==="image"||e==="url",I1=e=>e==="length"||e==="size"||e==="bg-size",M1=e=>e==="length",bI=e=>e==="number",L1=e=>e==="family-name",D1=e=>e==="number"||e==="weight",$1=e=>e==="shadow",kI=()=>{const e=Ut("color"),t=Ut("font"),n=Ut("text"),r=Ut("font-weight"),i=Ut("tracking"),a=Ut("leading"),l=Ut("breakpoint"),u=Ut("container"),f=Ut("spacing"),p=Ut("radius"),m=Ut("shadow"),d=Ut("inset-shadow"),v=Ut("text-shadow"),x=Ut("drop-shadow"),S=Ut("blur"),k=Ut("perspective"),E=Ut("aspect"),C=Ut("ease"),P=Ut("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...O(),Me,Re],A=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],I=()=>[Me,Re,f],D=()=>[Fo,"full","auto",...I()],j=()=>[Bo,"none","subgrid",Me,Re],H=()=>["auto",{span:["full",Bo,Me,Re]},Bo,Me,Re],ee=()=>[Bo,"auto",Me,Re],le=()=>["auto","min","max","fr",Me,Re],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",...I()],ue=()=>[Fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],Z=()=>[Fo,"screen","full","dvw","lvw","svw","min","max","fit",...I()],Q=()=>[Fo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],N=()=>[e,Me,Re],M=()=>[...O(),ww,xw,{position:[Me,Re]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",vI,pI,{size:[Me,Re]}],ie=()=>[Fp,nl,Ti],K=()=>["","none","full",p,Me,Re],ce=()=>["",Xe,nl,Ti],ae=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[Xe,Fp,ww,xw],we=()=>["","none",S,Me,Re],Ee=()=>["none",Xe,Me,Re],pe=()=>["none",Xe,Me,Re],qe=()=>[Xe,Me,Re],ze=()=>[Fo,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[co],breakpoint:[co],color:[R1],container:[co],"drop-shadow":[co],ease:["in","out","in-out"],font:[fI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[co],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[co],shadow:[co],spacing:["px",Xe],text:[co],"text-shadow":[co],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Fo,Re,Me,E]}],container:["container"],columns:[{columns:[Xe,Re,Me,u]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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:B()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Bo,"auto",Me,Re]}],basis:[{basis:[Fo,"full","auto",u,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Fo,"auto","initial","none",Re]}],grow:[{grow:["",Xe,Me,Re]}],shrink:[{shrink:["",Xe,Me,Re]}],order:[{order:[Bo,"first","last","none",Me,Re]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mbs:[{mbs:X()}],mbe:[{mbe:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:ue()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[u,"screen",...ue()]}],"min-w":[{"min-w":[u,"screen","none",...ue()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...ue()]}],h:[{h:["screen","lh",...ue()]}],"min-h":[{"min-h":["screen","lh","none",...ue()]}],"max-h":[{"max-h":["screen","lh",...ue()]}],"font-size":[{text:["base",n,nl,Ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,wI,hI]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fp,Re]}],"font-family":[{font:[yI,mI,t]}],"font-features":[{"font-features":[Re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Me,Re]}],"line-clamp":[{"line-clamp":[Xe,"none",Me,vw]}],leading:[{leading:[a,...I()]}],"list-image":[{"list-image":["none",Me,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Me,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Me,Ti]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[Xe,"auto",Me,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me,Re]}],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",Me,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Bo,Me,Re],radial:["",Me,Re],conic:[Bo,Me,Re]},xI,gI]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Me,Re]}],"outline-w":[{outline:["",Xe,nl,Ti]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",m,pc,fc]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,pc,fc]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[Xe,Ti]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",v,pc,fc]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[Xe,Me,Re]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"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":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[Me,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Me,Re]}],filter:[{filter:["","none",Me,Re]}],blur:[{blur:we()}],brightness:[{brightness:[Xe,Me,Re]}],contrast:[{contrast:[Xe,Me,Re]}],"drop-shadow":[{"drop-shadow":["","none",x,pc,fc]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",Xe,Me,Re]}],"hue-rotate":[{"hue-rotate":[Xe,Me,Re]}],invert:[{invert:["",Xe,Me,Re]}],saturate:[{saturate:[Xe,Me,Re]}],sepia:[{sepia:["",Xe,Me,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",Me,Re]}],"backdrop-blur":[{"backdrop-blur":we()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Me,Re]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Me,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Me,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Me,Re]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Me,Re]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Me,Re]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Me,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Me,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Me,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Me,Re]}],ease:[{ease:["linear","initial",C,Me,Re]}],delay:[{delay:[Xe,Me,Re]}],animate:[{animate:["none",P,Me,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Me,Re]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":["scale-3d"],skew:[{skew:qe()}],"skew-x":[{"skew-x":qe()}],"skew-y":[{"skew-y":qe()}],transform:[{transform:[Me,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",Me,Re]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",Me,Re]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[Xe,nl,Ti,vw]}],stroke:[{stroke:["none",...N()]}],"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"]}},SI=tI(kI);var bw;function Ke(e,t,n){function r(u,f){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:f,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,f);const p=l.prototype,m=Object.keys(p);for(let d=0;d<m.length;d++){const v=m[d];v in u||(u[v]=p[v].bind(u))}}const i=(n==null?void 0:n.Parent)??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function l(u){var f;const p=n!=null&&n.Parent?new a:this;r(p,u),(f=p._zod).deferred??(f.deferred=[]);for(const m of p._zod.deferred)m();return p}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>{var f,p;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(p=(f=u==null?void 0:u._zod)==null?void 0:f.traits)==null?void 0:p.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class Fs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class z1 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(bw=globalThis).__zod_globalConfig??(bw.__zod_globalConfig={});const CI=globalThis.__zod_globalConfig;function qi(e){return CI}function Yh(e,t){return typeof t=="bigint"?t.toString():t}function Km(e){return e==null}function Gm(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const kw=Symbol("evaluating");function xt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==kw)return r===void 0&&(r=kw,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function EI(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function _I(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const F1="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Sw(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Zh(e){if(Sw(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Sw(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function B1(e){return Zh(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Qm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function NI(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function bn(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 $s(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function TI(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)===!1)return!0;return!1}function PI(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function hc(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ki(e,t,n){var f,p,m,d,v,x;const r=e.message?e.message:hc((m=(p=(f=e.inst)==null?void 0:f._zod.def)==null?void 0:p.error)==null?void 0:m.call(p,e))??hc((d=t==null?void 0:t.error)==null?void 0:d.call(t,e))??hc((v=n.customError)==null?void 0:v.call(n,e))??hc((x=n.localeError)==null?void 0:x.call(n,e))??"Invalid input",{inst:i,continue:a,input:l,...u}=e;return u.path??(u.path=[]),u.message=r,t!=null&&t.reportInput&&(u.input=l),u}function Ym(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Cl(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const U1=(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,Yh,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},V1=Ke("$ZodError",U1),H1=Ke("$ZodError",U1,{Parent:Error});function jI(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function RI(e,t=n=>n.message){const n={_errors:[]},r=(i,a=[])=>{for(const l of i.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>r({issues:u},[...a,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...a,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...a,...l.path]);else{const u=[...a,...l.path];if(u.length===0)n._errors.push(t(l));else{let f=n,p=0;for(;p<u.length;){const m=u[p];p===u.length-1?(f[m]=f[m]||{_errors:[]},f[m]._errors.push(t(l))):f[m]=f[m]||{_errors:[]},f=f[m],p++}}}};return r(e),n}const Zm=e=>(t,n,r,i)=>{const a=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise)throw new Fs;if(l.issues.length){const u=new((i==null?void 0:i.Err)??e)(l.issues.map(f=>Ki(f,a,qi())));throw F1(u,i==null?void 0:i.callee),u}return l.value},Jm=e=>async(t,n,r,i)=>{const a=r?{...r,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},a);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new((i==null?void 0:i.Err)??e)(l.issues.map(f=>Ki(f,a,qi())));throw F1(u,i==null?void 0:i.callee),u}return l.value},fd=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Fs;return a.issues.length?{success:!1,error:new(e??V1)(a.issues.map(l=>Ki(l,i,qi())))}:{success:!0,data:a.value}},OI=fd(H1),pd=e=>async(t,n,r)=>{const i=r?{...r,async:!0}:{async:!0};let a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(l=>Ki(l,i,qi())))}:{success:!0,data:a.value}},AI=pd(H1),II=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return Zm(e)(t,n,i)},MI=e=>(t,n,r)=>Zm(e)(t,n,r),LI=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return Jm(e)(t,n,i)},DI=e=>async(t,n,r)=>Jm(e)(t,n,r),$I=e=>(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return fd(e)(t,n,i)},zI=e=>(t,n,r)=>fd(e)(t,n,r),FI=e=>async(t,n,r)=>{const i=r?{...r,direction:"backward"}:{direction:"backward"};return pd(e)(t,n,i)},BI=e=>async(t,n,r)=>pd(e)(t,n,r),UI=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,VI=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}$`)},HI=/^[^A-Z]*$/,WI=/^[^a-z]*$/,Zr=Ke("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),qI=Ke("$ZodCheckMaxLength",(e,t)=>{var n;Zr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Km(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const l=Ym(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),KI=Ke("$ZodCheckMinLength",(e,t)=>{var n;Zr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Km(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=Ym(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),GI=Ke("$ZodCheckLengthEquals",(e,t)=>{var n;Zr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Km(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,a=i.length;if(a===t.length)return;const l=Ym(i),u=a>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),hd=Ke("$ZodCheckStringFormat",(e,t)=>{var n,r;Zr.init(e,t),e._zod.onattach.push(i=>{const a=i._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),QI=Ke("$ZodCheckRegex",(e,t)=>{hd.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),YI=Ke("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=HI),hd.init(e,t)}),ZI=Ke("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=WI),hd.init(e,t)}),JI=Ke("$ZodCheckIncludes",(e,t)=>{Zr.init(e,t);const n=Qm(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const a=i._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),XI=Ke("$ZodCheckStartsWith",(e,t)=>{Zr.init(e,t);const n=new RegExp(`^${Qm(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),eM=Ke("$ZodCheckEndsWith",(e,t)=>{Zr.init(e,t);const n=new RegExp(`.*${Qm(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),tM=Ke("$ZodCheckOverwrite",(e,t)=>{Zr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}}),nM={major:4,minor:4,patch:3},kn=Ke("$ZodType",(e,t)=>{var i;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nM;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const l of a._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(i=e._zod.deferred)==null||i.push(()=>{e._zod.run=e._zod.parse});else{const a=(u,f,p)=>{let m=$s(u),d;for(const v of f){if(v._zod.def.when){if(TI(u)||!v._zod.def.when(u))continue}else if(m)continue;const x=u.issues.length,S=v._zod.check(u);if(S instanceof Promise&&(p==null?void 0:p.async)===!1)throw new Fs;if(d||S instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await S,u.issues.length!==x&&(m||(m=$s(u,x)))});else{if(u.issues.length===x)continue;m||(m=$s(u,x))}}return d?d.then(()=>u):u},l=(u,f,p)=>{if($s(u))return u.aborted=!0,u;const m=a(f,r,p);if(m instanceof Promise){if(p.async===!1)throw new Fs;return m.then(d=>e._zod.parse(d,p))}return e._zod.parse(m,p)};e._zod.run=(u,f)=>{if(f.skipChecks)return e._zod.parse(u,f);if(f.direction==="backward"){const m=e._zod.parse({value:u.value,issues:[]},{...f,skipChecks:!0});return m instanceof Promise?m.then(d=>l(d,u,f)):l(m,u,f)}const p=e._zod.parse(u,f);if(p instanceof Promise){if(f.async===!1)throw new Fs;return p.then(m=>a(m,r,f))}return a(p,r,f)}}xt(e,"~standard",()=>({validate:a=>{var l;try{const u=OI(e,a);return u.success?{value:u.data}:{issues:(l=u.error)==null?void 0:l.issues}}catch{return AI(e,a).then(f=>{var p;return f.success?{value:f.data}:{issues:(p=f.error)==null?void 0:p.issues}})}},vendor:"zod",version:1}))}),W1=Ke("$ZodString",(e,t)=>{var n;kn.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??VI(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),q1=Ke("$ZodStringFormat",(e,t)=>{hd.init(e,t),W1.init(e,t)}),rM=Ke("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=UI),q1.init(e,t)});function Cw(e,t,n){e.issues.length&&t.issues.push(...PI(n,e.issues)),t.value[n]=e.value}const oM=Ke("$ZodArray",(e,t)=>{kn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const a=[];for(let l=0;l<i.length;l++){const u=i[l],f=t.element._zod.run({value:u,issues:[]},r);f instanceof Promise?a.push(f.then(p=>Cw(p,n,l))):Cw(f,n,l)}return a.length?Promise.all(a).then(()=>n):n}});function Ew(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const i=e.filter(a=>!$s(a));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(l=>Ki(l,r,qi())))}),t)}const iM=Ke("$ZodUnion",(e,t)=>{kn.init(e,t),xt(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),xt(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),xt(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),xt(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>Gm(i.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1;const l=[];for(const u of t.options){const f=u._zod.run({value:r.value,issues:[]},i);if(f instanceof Promise)l.push(f),a=!0;else{if(f.issues.length===0)return f;l.push(f)}}return a?Promise.all(l).then(u=>Ew(u,r,e,i)):Ew(l,r,e,i)}}),sM=Ke("$ZodIntersection",(e,t)=>{kn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,a=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return a instanceof Promise||l instanceof Promise?Promise.all([a,l]).then(([f,p])=>_w(n,f,p)):_w(n,a,l)}});function Jh(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(Zh(e)&&Zh(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),i={...e,...t};for(const a of r){const l=Jh(e[a],t[a]);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};i[a]=l.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],a=t[r],l=Jh(i,a);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function _w(e,t,n){const r=new Map;let i;for(const u of t.issues)if(u.code==="unrecognized_keys"){i??(i=u);for(const f of u.keys)r.has(f)||r.set(f,{}),r.get(f).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const f of u.keys)r.has(f)||r.set(f,{}),r.get(f).r=!0;else e.issues.push(u);const a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length&&i&&e.issues.push({...i,keys:a}),$s(e))return e;const l=Jh(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const aM=Ke("$ZodTransform",(e,t)=>{kn.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new z1(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n.fallback=!0,n));if(i instanceof Promise)throw new Fs;return n.value=i,n.fallback=!0,n}});function Nw(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const K1=Ke("$ZodOptional",(e,t)=>{kn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",xt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),xt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Gm(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=n.value,a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(l=>Nw(l,i)):Nw(a,i)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),lM=Ke("$ZodExactOptional",(e,t)=>{K1.init(e,t),xt(e._zod,"values",()=>t.innerType._zod.values),xt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),uM=Ke("$ZodNullable",(e,t)=>{kn.init(e,t),xt(e._zod,"optin",()=>t.innerType._zod.optin),xt(e._zod,"optout",()=>t.innerType._zod.optout),xt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Gm(n.source)}|null)$`):void 0}),xt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),cM=Ke("$ZodDefault",(e,t)=>{kn.init(e,t),e._zod.optin="optional",xt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>Tw(a,t)):Tw(i,t)}});function Tw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const dM=Ke("$ZodPrefault",(e,t)=>{kn.init(e,t),e._zod.optin="optional",xt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),fM=Ke("$ZodNonOptional",(e,t)=>{kn.init(e,t),xt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>Pw(a,e)):Pw(i,e)}});function Pw(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 pM=Ke("$ZodCatch",(e,t)=>{kn.init(e,t),e._zod.optin="optional",xt(e._zod,"optout",()=>t.innerType._zod.optout),xt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(l=>Ki(l,r,qi()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>Ki(a,r,qi()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),hM=Ke("$ZodPipe",(e,t)=>{kn.init(e,t),xt(e._zod,"values",()=>t.in._zod.values),xt(e._zod,"optin",()=>t.in._zod.optin),xt(e._zod,"optout",()=>t.out._zod.optout),xt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(l=>mc(l,t.in,r)):mc(a,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(a=>mc(a,t.out,r)):mc(i,t.out,r)}});function mc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const mM=Ke("$ZodReadonly",(e,t)=>{kn.init(e,t),xt(e._zod,"propValues",()=>t.innerType._zod.propValues),xt(e._zod,"values",()=>t.innerType._zod.values),xt(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),xt(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(jw):jw(i)}});function jw(e){return e.value=Object.freeze(e.value),e}const gM=Ke("$ZodCustom",(e,t)=>{Zr.init(e,t),kn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(a=>Rw(a,n,r,e));Rw(i,n,r,e)}});function Rw(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(Cl(i))}}var Ow;class yM{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function vM(){return new yM}(Ow=globalThis).__zod_globalRegistry??(Ow.__zod_globalRegistry=vM());const dl=globalThis.__zod_globalRegistry;function xM(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...bn(t)})}function G1(e,t){return new qI({check:"max_length",...bn(t),maximum:e})}function zc(e,t){return new KI({check:"min_length",...bn(t),minimum:e})}function Q1(e,t){return new GI({check:"length_equals",...bn(t),length:e})}function wM(e,t){return new QI({check:"string_format",format:"regex",...bn(t),pattern:e})}function bM(e){return new YI({check:"string_format",format:"lowercase",...bn(e)})}function kM(e){return new ZI({check:"string_format",format:"uppercase",...bn(e)})}function SM(e,t){return new JI({check:"string_format",format:"includes",...bn(t),includes:e})}function CM(e,t){return new XI({check:"string_format",format:"starts_with",...bn(t),prefix:e})}function EM(e,t){return new eM({check:"string_format",format:"ends_with",...bn(t),suffix:e})}function ma(e){return new tM({check:"overwrite",tx:e})}function _M(e){return ma(t=>t.normalize(e))}function NM(){return ma(e=>e.trim())}function TM(){return ma(e=>e.toLowerCase())}function PM(){return ma(e=>e.toUpperCase())}function jM(){return ma(e=>_I(e))}function RM(e,t,n){return new e({type:"array",element:t,...bn(n)})}function OM(e,t,n){return new e({type:"custom",check:"custom",fn:t,...bn(n)})}function AM(e,t){const n=IM(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(Cl(i,r.value,n._zod.def));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=n),a.continue??(a.continue=!n._zod.def.abort),r.issues.push(Cl(a))}},e(r.value,r)),t);return n}function IM(e,t){const n=new Zr({check:"custom",...bn(t)});return n._zod.check=e,n}function Y1(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)??dl,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 wn(e,t,n={path:[],schemaPath:[]}){var m,d;var r;const i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const u=(d=(m=e._zod).toJSONSchema)==null?void 0:d.call(m);if(u)l.schema=u;else{const v={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,v);else{const S=l.schema,k=t.processors[i.type];if(!k)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);k(e,t,S,v)}const x=e._zod.parent;x&&(l.ref||(l.ref=x),wn(x,t,v),t.seen.get(x).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(l.schema,f),t.io==="input"&&gn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function Z1(e,t){var l,u,f,p;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const m of e.seen.entries()){const d=(l=e.metadataRegistry.get(m[0]))==null?void 0:l.id;if(d){const v=r.get(d);if(v&&v!==m[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,m[0])}}const i=m=>{var k;const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const E=(k=e.external.registry.get(m[0]))==null?void 0:k.id,C=e.external.uri??(R=>R);if(E)return{ref:C(E)};const P=m[1].defId??m[1].schema.id??`schema${e.counter++}`;return m[1].defId=P,{defId:P,ref:`${C("__shared")}#/${d}/${P}`}}if(m[1]===n)return{ref:"#"};const x=`#/${d}/`,S=m[1].schema.id??`__schema${e.counter++}`;return{defId:S,ref:x+S}},a=m=>{if(m[1].schema.$ref)return;const d=m[1],{ref:v,defId:x}=i(m);d.def={...d.schema},x&&(d.defId=x);const S=d.schema;for(const k in S)delete S[k];S.$ref=v};if(e.cycles==="throw")for(const m of e.seen.entries()){const d=m[1];if(d.cycle)throw new Error(`Cycle detected: #/${(u=d.cycle)==null?void 0:u.join("/")}/<root>
|
|
361
|
+
|
|
362
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const m of e.seen.entries()){const d=m[1];if(t===m[0]){a(m);continue}if(e.external){const x=(f=e.external.registry.get(m[0]))==null?void 0:f.id;if(t!==m[0]&&x){a(m);continue}}if((p=e.metadataRegistry.get(m[0]))==null?void 0:p.id){a(m);continue}if(d.cycle){a(m);continue}if(d.count>1&&e.reused==="ref"){a(m);continue}}}function J1(e,t){var u,f,p,m;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const v=e.seen.get(d);if(v.ref===null)return;const x=v.def??v.schema,S={...x},k=v.ref;if(v.ref=null,k){r(k);const C=e.seen.get(k),P=C.schema;if(P.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(x.allOf=x.allOf??[],x.allOf.push(P)):Object.assign(x,P),Object.assign(x,S),d._zod.parent===k)for(const O in x)O==="$ref"||O==="allOf"||O in S||delete x[O];if(P.$ref&&C.def)for(const O in x)O==="$ref"||O==="allOf"||O in C.def&&JSON.stringify(x[O])===JSON.stringify(C.def[O])&&delete x[O]}const E=d._zod.parent;if(E&&E!==k){r(E);const C=e.seen.get(E);if(C!=null&&C.schema.$ref&&(x.$ref=C.schema.$ref,C.def))for(const P in x)P==="$ref"||P==="allOf"||P in C.def&&JSON.stringify(x[P])===JSON.stringify(C.def[P])&&delete x[P]}e.override({zodSchema:d,jsonSchema:x,path:v.path??[]})};for(const d of[...e.seen.entries()].reverse())r(d[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,(u=e.external)!=null&&u.uri){const d=(f=e.external.registry.get(t))==null?void 0:f.id;if(!d)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(d)}Object.assign(i,n.def??n.schema);const a=(p=e.metadataRegistry.get(t))==null?void 0:p.id;a!==void 0&&i.id===a&&delete i.id;const l=((m=e.external)==null?void 0:m.defs)??{};for(const d of e.seen.entries()){const v=d[1];v.def&&v.defId&&(v.def.id===v.defId&&delete v.def.id,l[v.defId]=v.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?i.$defs=l:i.definitions=l);try{const d=JSON.parse(JSON.stringify(i));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:Fc(t,"input",e.processors),output:Fc(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function gn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return gn(r.element,n);if(r.type==="set")return gn(r.valueType,n);if(r.type==="lazy")return gn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return gn(r.innerType,n);if(r.type==="intersection")return gn(r.left,n)||gn(r.right,n);if(r.type==="record"||r.type==="map")return gn(r.keyType,n)||gn(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:gn(r.in,n)||gn(r.out,n);if(r.type==="object"){for(const i in r.shape)if(gn(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(gn(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(gn(i,n))return!0;return!!(r.rest&&gn(r.rest,n))}return!1}const MM=(e,t={})=>n=>{const r=Y1({...n,processors:t});return wn(e,r),Z1(r,e),J1(r,e)},Fc=(e,t,n={})=>r=>{const{libraryOptions:i,target:a}=r??{},l=Y1({...i??{},target:a,io:t,processors:n});return wn(e,l),Z1(l,e),J1(l,e)},LM={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},DM=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:a,maximum:l,format:u,patterns:f,contentEncoding:p}=e._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof l=="number"&&(i.maxLength=l),u&&(i.format=LM[u]??u,i.format===""&&delete i.format,u==="time"&&delete i.format),p&&(i.contentEncoding=p),f&&f.size>0){const m=[...f];m.length===1?i.pattern=m[0].source:m.length>1&&(i.allOf=[...m.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},$M=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},zM=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},FM=(e,t,n,r)=>{const i=n,a=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof u=="number"&&(i.maxItems=u),i.type="array",i.items=wn(a.element,t,{...r,path:[...r.path,"items"]})},BM=(e,t,n,r)=>{const i=e._zod.def,a=i.inclusive===!1,l=i.options.map((u,f)=>wn(u,t,{...r,path:[...r.path,a?"oneOf":"anyOf",f]}));a?n.oneOf=l:n.anyOf=l},UM=(e,t,n,r)=>{const i=e._zod.def,a=wn(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=wn(i.right,t,{...r,path:[...r.path,"allOf",1]}),u=p=>"allOf"in p&&Object.keys(p).length===1,f=[...u(a)?a.allOf:[a],...u(l)?l.allOf:[l]];n.allOf=f},VM=(e,t,n,r)=>{const i=e._zod.def,a=wn(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},HM=(e,t,n,r)=>{const i=e._zod.def;wn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType},WM=(e,t,n,r)=>{const i=e._zod.def;wn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},qM=(e,t,n,r)=>{const i=e._zod.def;wn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},KM=(e,t,n,r)=>{const i=e._zod.def;wn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},GM=(e,t,n,r)=>{const i=e._zod.def,a=i.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?a?i.out:i.in:i.out;wn(l,t,r);const u=t.seen.get(e);u.ref=l},QM=(e,t,n,r)=>{const i=e._zod.def;wn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},X1=(e,t,n,r)=>{const i=e._zod.def;wn(i.innerType,t,r);const a=t.seen.get(e);a.ref=i.innerType},YM=(e,t)=>{V1.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>RI(e,n)},flatten:{value:n=>jI(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Yh,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Yh,2)}},isEmpty:{get(){return e.issues.length===0}}})},gr=Ke("ZodError",YM,{Parent:Error}),ZM=Zm(gr),JM=Jm(gr),XM=fd(gr),eL=pd(gr),tL=II(gr),nL=MI(gr),rL=LI(gr),oL=DI(gr),iL=$I(gr),sL=zI(gr),aL=FI(gr),lL=BI(gr),Aw=new WeakMap;function Xm(e,t,n){const r=Object.getPrototypeOf(e);let i=Aw.get(r);if(i||(i=new Set,Aw.set(r,i)),!i.has(t)){i.add(t);for(const a in n){const l=n[a];Object.defineProperty(r,a,{configurable:!0,enumerable:!1,get(){const u=l.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}const Sn=Ke("ZodType",(e,t)=>(kn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Fc(e,"input"),output:Fc(e,"output")}}),e.toJSONSchema=MM(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>ZM(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>XM(e,n,r),e.parseAsync=async(n,r)=>JM(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>eL(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>tL(e,n,r),e.decode=(n,r)=>nL(e,n,r),e.encodeAsync=async(n,r)=>rL(e,n,r),e.decodeAsync=async(n,r)=>oL(e,n,r),e.safeEncode=(n,r)=>iL(e,n,r),e.safeDecode=(n,r)=>sL(e,n,r),e.safeEncodeAsync=async(n,r)=>aL(e,n,r),e.safeDecodeAsync=async(n,r)=>lL(e,n,r),Xm(e,"ZodType",{check(...n){const r=this.def;return this.clone(EI(r,{checks:[...r.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return NI(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(DL(n,r))},superRefine(n,r){return this.check($L(n,r))},overwrite(n){return this.check(ma(n))},optional(){return Iw(this)},exactOptional(){return SL(this)},nullable(){return Mw(this)},nullish(){return Iw(Mw(this))},nonoptional(n){return jL(this,n)},array(){return hL(this)},or(n){return gL([this,n])},and(n){return vL(this,n)},transform(n){return Lw(this,wL(n))},default(n){return _L(this,n)},prefault(n){return TL(this,n)},catch(n){return OL(this,n)},pipe(n){return Lw(this,n)},readonly(){return ML(this)},describe(n){const r=this.clone();return dl.add(r,{description:n}),r},meta(...n){if(n.length===0)return dl.get(this);const r=this.clone();return dl.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=dl.get(e))==null?void 0:n.description},configurable:!0}),e)),uL=Ke("_ZodString",(e,t)=>{W1.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(r,i,a)=>DM(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Xm(e,"_ZodString",{regex(...r){return this.check(wM(...r))},includes(...r){return this.check(SM(...r))},startsWith(...r){return this.check(CM(...r))},endsWith(...r){return this.check(EM(...r))},min(...r){return this.check(zc(...r))},max(...r){return this.check(G1(...r))},length(...r){return this.check(Q1(...r))},nonempty(...r){return this.check(zc(1,...r))},lowercase(r){return this.check(bM(r))},uppercase(r){return this.check(kM(r))},trim(){return this.check(NM())},normalize(...r){return this.check(_M(...r))},toLowerCase(){return this.check(TM())},toUpperCase(){return this.check(PM())},slugify(){return this.check(jM())}})}),cL=Ke("ZodStringFormat",(e,t)=>{q1.init(e,t),uL.init(e,t)}),dL=Ke("ZodEmail",(e,t)=>{rM.init(e,t),cL.init(e,t)});function fL(e){return xM(dL,e)}const pL=Ke("ZodArray",(e,t)=>{oM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>FM(e,n,r,i),e.element=t.element,Xm(e,"ZodArray",{min(n,r){return this.check(zc(n,r))},nonempty(n){return this.check(zc(1,n))},max(n,r){return this.check(G1(n,r))},length(n,r){return this.check(Q1(n,r))},unwrap(){return this.element}})});function hL(e,t){return RM(pL,e,t)}const mL=Ke("ZodUnion",(e,t)=>{iM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>BM(e,n,r,i),e.options=t.options});function gL(e,t){return new mL({type:"union",options:e,...bn(t)})}const yL=Ke("ZodIntersection",(e,t)=>{sM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>UM(e,n,r,i)});function vL(e,t){return new yL({type:"intersection",left:e,right:t})}const xL=Ke("ZodTransform",(e,t)=>{aM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>zM(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new z1(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Cl(a,n.value,t));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Cl(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(a=>(n.value=a,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function wL(e){return new xL({type:"transform",transform:e})}const bL=Ke("ZodOptional",(e,t)=>{K1.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>X1(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Iw(e){return new bL({type:"optional",innerType:e})}const kL=Ke("ZodExactOptional",(e,t)=>{lM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>X1(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function SL(e){return new kL({type:"optional",innerType:e})}const CL=Ke("ZodNullable",(e,t)=>{uM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>VM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Mw(e){return new CL({type:"nullable",innerType:e})}const EL=Ke("ZodDefault",(e,t)=>{cM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>WM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _L(e,t){return new EL({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():B1(t)}})}const NL=Ke("ZodPrefault",(e,t)=>{dM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>qM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function TL(e,t){return new NL({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():B1(t)}})}const PL=Ke("ZodNonOptional",(e,t)=>{fM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>HM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function jL(e,t){return new PL({type:"nonoptional",innerType:e,...bn(t)})}const RL=Ke("ZodCatch",(e,t)=>{pM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>KM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function OL(e,t){return new RL({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const AL=Ke("ZodPipe",(e,t)=>{hM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>GM(e,n,r,i),e.in=t.in,e.out=t.out});function Lw(e,t){return new AL({type:"pipe",in:e,out:t})}const IL=Ke("ZodReadonly",(e,t)=>{mM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>QM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function ML(e){return new IL({type:"readonly",innerType:e})}const LL=Ke("ZodCustom",(e,t)=>{gM.init(e,t),Sn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>$M(e,n)});function DL(e,t={}){return OM(LL,e,t)}function $L(e,t){return AM(e,t)}function Te(...e){return SI(C1(e))}const zL=fL();function iK(e){return zL.safeParse(e.trim()).success}const Dw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$w=C1,md=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return $w(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,l=Object.keys(i).map(p=>{const m=n==null?void 0:n[p],d=a==null?void 0:a[p];if(m===null)return null;const v=Dw(m)||Dw(d);return i[p][v]}),u=n&&Object.entries(n).reduce((p,m)=>{let[d,v]=m;return v===void 0||(p[d]=v),p},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,m)=>{let{class:d,className:v,...x}=m;return Object.entries(x).every(S=>{let[k,E]=S;return Array.isArray(E)?E.includes({...a,...u}[k]):{...a,...u}[k]===E})?[...p,d,v]:p},[]);return $w(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},FL=md("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 eg({className:e,variant:t,...n}){return h.jsx("div",{className:Te(FL({variant:t}),e),...n})}const Hi="flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm hover:bg-muted",Wi="text-foreground/80 hover:text-foreground",tg="bg-muted font-medium text-foreground",go="h-4 w-4 shrink-0",BL="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",gc=e=>({nestId:e.id,nestName:e.name,isOwner:e.is_owner??e.permission==="owner",isAnonOwned:e.user_id===Hh});function UL({nestId:e,nodeId:t,activeView:n=null,onCollapse:r,onOpenDocument:i,onOpenNest:a,onOpenView:l,onConnect:u,onOpenDashboard:f,logoUrl:p,dashboardTab:m=null,onOpenDashboardTab:d,onNewDocument:v}){var B,A;const x=hr({...It.nestList(),enabled:e!==null}),{isAdmin:S,workflowPlaneEnabled:k}=ts(),[E,C]=y.useState(()=>new Set(e?[e]:[]));y.useEffect(()=>{e&&C(z=>z.has(e)?z:new Set([...z,e]))},[e]);const[P,R]=y.useState(""),O=y.useMemo(()=>{var D;const z=((D=x.data)==null?void 0:D.nests)??[],I=P.trim().toLowerCase();return z.filter(j=>!I||j.id===e||String(j.name).toLowerCase().includes(I)).sort((j,H)=>j.id===e?-1:H.id===e?1:String(j.name).localeCompare(String(H.name)))},[x.data,e,P]);return h.jsxs("nav",{"aria-label":"Nests and documents",className:"flex h-full flex-col bg-muted/30 text-sm","data-testid":"document-sidebar",children:[h.jsxs("div",{className:"flex h-16 shrink-0 items-center justify-between gap-1 border-b border-border px-4",children:[h.jsxs("button",{type:"button",onClick:f,className:"flex min-w-0 items-center gap-2 hover:opacity-80",title:"Dashboard","data-testid":"document-sidebar-brand",children:[h.jsx("img",{src:p,alt:"ContextNest",className:"h-7 w-7 object-contain"}),h.jsx("span",{className:"font-semibold",children:"ContextNest"}),h.jsx(eg,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:"Community"})]}),h.jsx("button",{type:"button",onClick:r,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:h.jsx(XP,{className:"h-4 w-4"})})]}),e!==null&&h.jsxs("button",{type:"button",onClick:f,className:Te(Hi,Wi,"mx-2 mt-3 w-auto"),title:"All nests",children:[h.jsx(F0,{className:go}),"All nests"]}),e!==null&&(((A=(B=x.data)==null?void 0:B.nests)==null?void 0:A.length)??0)>1&&h.jsxs("div",{className:"relative mx-2 mt-1 mb-2",children:[h.jsx(Im,{className:"pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),h.jsx("input",{type:"search",value:P,onChange:z=>R(z.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"})]}),h.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-4",children:[e===null&&h.jsx(VL,{active:m,isAdmin:S,onOpen:d}),e!==null&&x.isLoading&&h.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"Loading…"}),e!==null&&O.map(z=>{const I=E.has(z.id),D=z.id===e;return h.jsxs("div",{className:Te("mb-1",D&&"mb-3"),children:[h.jsxs("div",{className:Te("group flex items-center gap-1 rounded px-1.5 py-1",D?"text-foreground":"text-muted-foreground"),children:[h.jsx("button",{type:"button",onClick:()=>C(j=>{const H=new Set(j);return H.has(z.id)?H.delete(z.id):H.add(z.id),H}),className:"rounded p-0.5 hover:bg-muted","aria-label":I?`Collapse ${z.name}`:`Expand ${z.name}`,"aria-expanded":I,children:I?h.jsx(ri,{className:"h-3.5 w-3.5"}):h.jsx(Bl,{className:"h-3.5 w-3.5"})}),h.jsxs("button",{type:"button",onClick:()=>a(gc(z)),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 ${z.name}`,children:[h.jsx("span",{className:"truncate",children:z.name}),h.jsx(HL,{visibility:z.visibility})]}),D&&v&&h.jsx("button",{type:"button",onClick:()=>v(),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:h.jsx(U0,{className:"h-3.5 w-3.5"})})]}),I&&D&&h.jsx(qL,{nestId:z.id,isOwner:gc(z).isOwner,isAdmin:S,workflowPlaneEnabled:k,activeView:n,onOpen:j=>l(gc(z),j),onConnect:u}),I&&h.jsx(KL,{nestId:z.id,currentNodeId:D?t:null,onOpen:j=>i({...gc(z),nodeId:j}),onNewDocument:D?v:void 0})]},z.id)})]})]})}function VL({active:e,isAdmin:t,onOpen:n}){const r=IA({isAdmin:t}),[i,a]=y.useState(()=>dd(localStorage).closedGroups),l=(u,f)=>{const p=f?i.filter(m=>m!==u):[...i,u];a(p),Hm(localStorage,{closedGroups:p})};return h.jsxs("div",{className:"mt-3 space-y-0.5","data-testid":"document-sidebar-dashboard",children:[r.top.map(u=>h.jsx(zw,{page:u,active:u.id===e,onOpen:n},u.id)),r.groups.map(u=>{const f=u.pages.some(m=>m.id===e),p=!i.includes(u.id)||f;return h.jsxs("div",{className:"pt-2",children:[h.jsxs("button",{type:"button",onClick:()=>l(u.id,!p),"aria-expanded":p,className:BL,"data-testid":`document-sidebar-group-${u.id}`,children:[p?h.jsx(ri,{className:"h-3.5 w-3.5 shrink-0"}):h.jsx(Bl,{className:"h-3.5 w-3.5 shrink-0"}),h.jsx("span",{className:"truncate",children:u.label})]}),p&&h.jsx("div",{className:"space-y-0.5",children:u.pages.map(m=>h.jsx(zw,{page:m,active:m.id===e,onOpen:n,indent:!0},m.id))})]},u.id)})]})}function zw({page:e,active:t,indent:n=!1,onOpen:r}){var u,f;const i=hr({...((u=e.badge)==null?void 0:u.options())??{queryKey:["page-badge",e.id,"none"],queryFn:async()=>null},enabled:!!e.badge}),a=e.badge?e.badge.count(i.data):0,l=e.icon;return h.jsxs("button",{type:"button",onClick:()=>r==null?void 0:r(e.id),"aria-current":t?"page":void 0,className:Te(Hi,n&&"pl-7",t?tg:Wi),"data-testid":`document-sidebar-dashboard-${e.id}`,children:[h.jsx(l,{className:go}),h.jsx("span",{className:"truncate",children:e.label}),a>0&&h.jsx("span",{className:Te("ml-auto rounded-full px-2 py-0.5 text-[11px] font-semibold tabular-nums",((f=e.badge)==null?void 0:f.tone)==="primary"?"bg-primary text-primary-foreground":"bg-muted-foreground/15 text-muted-foreground"),children:a})]})}function HL({visibility:e}){return e==="public"?h.jsx(OP,{className:"h-3 w-3 shrink-0 text-green-600","aria-label":"Public"}):e==="org"?h.jsx(uP,{className:"h-3 w-3 shrink-0 text-blue-600","aria-label":"Organization"}):h.jsx(HP,{className:"h-3 w-3 shrink-0 opacity-60","aria-label":"Private"})}const WL={overview:z0,review:xP};function qL({nestId:e,isOwner:t,isAdmin:n,workflowPlaneEnabled:r,activeView:i,onOpen:a,onConnect:l}){var B,A,z,I,D;const u=IO(e),f=y.useMemo(()=>{var H;const j=u.data;return j?Wh({roles:j.roles??[],permission:j.permission??null,myStewards:j.myStewards??[],isOwner:t,isAdmin:n,readerMode:!!((H=j.nest)!=null&&H.reader_mode),isArchived:LO(j.nest)}):null},[u.data,t,n]),p=hr({...It.reviewQueue(e),enabled:!!f&&!f.isReadOnly&&!f.isReaderView}),m=((B=p.data)==null?void 0:B.total)??((z=(A=p.data)==null?void 0:A.requests)==null?void 0:z.length)??0,d=!!((D=(I=u.data)==null?void 0:I.nest)!=null&&D.stewardship_enabled),v=y.useMemo(()=>f?iA(f,{workflowPlaneEnabled:r,stewardshipEnabled:d,hasPending:m>0}):[],[f,r,d,m]),[x,S]=y.useState(()=>dd(localStorage).viewsOpen),k=j=>{S(j),Hm(localStorage,{viewsOpen:j})},E=v.some(j=>j.group==="views"&&j.id===i),C=x||E,P=v.filter(j=>!j.group),R=v.filter(j=>j.group==="views");if(v.length===0)return null;const O=(j,H=!1)=>{const ee=j.icon??WL[j.id]??z0,le=j.id===i;return h.jsxs("button",{type:"button",onClick:()=>a(j),"aria-current":le?"page":void 0,className:Te(Hi,H&&"pl-7",le?tg:Wi),"data-testid":`document-sidebar-view-${j.id}`,children:[h.jsx(ee,{className:go}),h.jsx("span",{className:"truncate",children:j.label}),j.id==="review"&&m>0&&h.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:`${m} awaiting review`,"data-testid":"document-sidebar-review-badge",children:[h.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-500","aria-hidden":!0}),m]})]},j.id)};return h.jsxs("div",{className:"mb-1 ml-2 pl-1","data-testid":"document-sidebar-views",children:[P.map(j=>O(j)),R.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",onClick:()=>k(!C),"aria-expanded":C,className:Te(Hi,Wi),"data-testid":"document-sidebar-views-group",children:[C?h.jsx(ri,{className:go}):h.jsx(Bl,{className:go}),h.jsx("span",{className:"truncate",children:"Views"})]}),C&&R.map(j=>O(j,!0))]}),l&&h.jsxs("button",{type:"button",onClick:l,className:Te(Hi,Wi),title:"Connect a CLI, MCP client or API caller to this nest","data-testid":"document-sidebar-connect",children:[h.jsx(ij,{className:go}),h.jsx("span",{className:"truncate",children:"Connect"})]})]})}function KL({nestId:e,currentNodeId:t,onOpen:n,onNewDocument:r}){var E;const[i,a]=y.useState(()=>new Map),l=y.useMemo(()=>new Set(t?rA(t):[]),[t]),u=C=>i.get(C)??!l.has(C),f=hr(It.census(e)),p=y.useMemo(()=>{var C;return(((C=f.data)==null?void 0:C.census.folders)??[]).map(P=>({path:P.path,total:P.total??0}))},[f.data]),m=y.useMemo(()=>["",...p.map(P=>P.path).filter(P=>!u(P))],[p,i,l]),d=NO({queries:m.map(C=>It.folderNodes(e,C))}),v=d[0],x=d.flatMap(C=>{var P;return((P=C.data)==null?void 0:P.nodes)??[]}),S=x.map(C=>C.id).join("|"),k=y.useMemo(()=>oA(x),[S]);return v!=null&&v.isLoading&&f.isLoading?h.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"Loading…"}):v!=null&&v.isError?h.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"Couldn't load"}):!(v!=null&&v.isLoading)&&(((E=v==null?void 0:v.data)==null?void 0:E.nodes)??[]).length===0&&p.length===0?h.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:"No documents yet"}):h.jsx(aA,{groups:k,known:p,indentRem:.75,isCollapsed:u,className:"ml-2 border-l border-border/60 pl-1",renderFolder:(C,{collapsed:P})=>h.jsxs("div",{className:"group flex items-center",children:[h.jsxs("button",{type:"button",onClick:()=>a(R=>new Map(R).set(C.path,!P)),className:Te(Hi,Wi),"aria-expanded":!P,title:C.path,children:[P?h.jsx(jP,{className:go}):h.jsx(TP,{className:go}),h.jsx("span",{className:"truncate",children:C.label}),C.total>0&&h.jsx("span",{className:"ml-auto text-[10px] tabular-nums opacity-70",children:C.total})]}),r&&h.jsx("button",{type:"button",onClick:()=>r(C.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 ${C.label}`,"aria-label":`New document in ${C.label}`,"data-testid":"document-sidebar-folder-new",children:h.jsx(U0,{className:"h-3.5 w-3.5"})})]}),renderDoc:C=>{const P=C.id===t;return h.jsxs("button",{type:"button",onClick:()=>n(C.id),"aria-current":P?"page":void 0,className:Te(Hi,P?tg:Wi),title:C.title,"data-testid":"document-sidebar-doc",children:[h.jsx(Vl,{className:go}),h.jsx("span",{className:"truncate",children:C.title||"Untitled"})]})}})}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Fw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dn(...e){return t=>{let n=!1;const r=e.map(i=>{const a=Fw(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():Fw(e[i],null)}}}}function nt(...e){return y.useCallback(Dn(...e),e)}function GL(e,t){const n=y.createContext(t),r=a=>{const{children:l,...u}=a,f=y.useMemo(()=>u,Object.values(u));return h.jsx(n.Provider,{value:f,children:l})};r.displayName=e+"Provider";function i(a){const l=y.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Mr(e,t=[]){let n=[];function r(a,l){const u=y.createContext(l),f=n.length;n=[...n,l];const p=d=>{var C;const{scope:v,children:x,...S}=d,k=((C=v==null?void 0:v[e])==null?void 0:C[f])||u,E=y.useMemo(()=>S,Object.values(S));return h.jsx(k.Provider,{value:E,children:x})};p.displayName=a+"Provider";function m(d,v){var k;const x=((k=v==null?void 0:v[e])==null?void 0:k[f])||u,S=y.useContext(x);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[p,m]}const i=()=>{const a=n.map(l=>y.createContext(l));return function(u){const f=(u==null?void 0:u[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[r,QL(i,...t)]}function QL(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const l=r.reduce((u,{useScope:f,scopeName:p})=>{const d=f(a)[`__scope${p}`];return{...u,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var $t=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},YL=Rm[" useId ".trim().toString()]||(()=>{}),ZL=0;function fn(e){const[t,n]=y.useState(YL());return $t(()=>{n(r=>r??String(ZL++))},[e]),e||(t?`radix-${t}`:"")}var JL=Rm[" useInsertionEffect ".trim().toString()]||$t;function oi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,l]=XL({defaultProp:t,onChange:n}),u=e!==void 0,f=u?e:i;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const d=m.current;d!==u&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${u?"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.`),m.current=u},[u,r])}const p=y.useCallback(m=>{var d;if(u){const v=eD(m)?m(e):m;v!==e&&((d=l.current)==null||d.call(l,v))}else a(m)},[u,e,a,l]);return[f,p]}function XL({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),i=y.useRef(n),a=y.useRef(t);return JL(()=>{a.current=t},[t]),y.useEffect(()=>{var l;i.current!==n&&((l=a.current)==null||l.call(a,n),i.current=n)},[n,i]),[n,r,a]}function eD(e){return typeof e=="function"}function tD(e){const t=nD(e),n=y.forwardRef((r,i)=>{const{children:a,...l}=r,u=y.Children.toArray(a),f=u.find(oD);if(f){const p=f.props.children,m=u.map(d=>d===f?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:d);return h.jsx(t,{...l,ref:i,children:y.isValidElement(p)?y.cloneElement(p,void 0,m):null})}return h.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function nD(e){const t=y.forwardRef((n,r)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const l=sD(i),u=iD(a,i.props);return i.type!==y.Fragment&&(u.ref=r?Dn(r,l):l),y.cloneElement(i,u)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rD=Symbol("radix.slottable");function oD(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rD}function iD(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function sD(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var aD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fe=aD.reduce((e,t)=>{const n=tD(`Primitive.${t}`),r=y.forwardRef((i,a)=>{const{asChild:l,...u}=i,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(f,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ek(e,t){e&&Fl.flushSync(()=>e.dispatchEvent(t))}function Yt(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lD(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var uD="DismissableLayer",Xh="dismissableLayer.update",cD="dismissableLayer.pointerDownOutside",dD="dismissableLayer.focusOutside",Bw,tk=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gd=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...f}=e,p=y.useContext(tk),[m,d]=y.useState(null),v=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=y.useState({}),S=nt(t,z=>d(z)),k=Array.from(p.layers),[E]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=k.indexOf(E),P=m?k.indexOf(m):-1,R=p.layersWithOutsidePointerEventsDisabled.size>0,O=P>=C,B=hD(z=>{const I=z.target,D=[...p.branches].some(j=>j.contains(I));!O||D||(i==null||i(z),l==null||l(z),z.defaultPrevented||u==null||u())},v),A=mD(z=>{const I=z.target;[...p.branches].some(j=>j.contains(I))||(a==null||a(z),l==null||l(z),z.defaultPrevented||u==null||u())},v);return lD(z=>{P===p.layers.size-1&&(r==null||r(z),!z.defaultPrevented&&u&&(z.preventDefault(),u()))},v),y.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Bw=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),Uw(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Bw)}},[m,v,n,p]),y.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),Uw())},[m,p]),y.useEffect(()=>{const z=()=>x({});return document.addEventListener(Xh,z),()=>document.removeEventListener(Xh,z)},[]),h.jsx(Fe.div,{...f,ref:S,style:{pointerEvents:R?O?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,B.onPointerDownCapture)})});gd.displayName=uD;var fD="DismissableLayerBranch",pD=y.forwardRef((e,t)=>{const n=y.useContext(tk),r=y.useRef(null),i=nt(t,r);return y.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),h.jsx(Fe.div,{...e,ref:i})});pD.displayName=fD;function hD(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let f=function(){nk(cD,n,p,{discrete:!0})};const p={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function mD(e,t=globalThis==null?void 0:globalThis.document){const n=Yt(e),r=y.useRef(!1);return y.useEffect(()=>{const i=a=>{a.target&&!r.current&&nk(dD,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Uw(){const e=new CustomEvent(Xh);document.dispatchEvent(e)}function nk(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ek(i,a):i.dispatchEvent(a)}var Bp="focusScope.autoFocusOnMount",Up="focusScope.autoFocusOnUnmount",Vw={bubbles:!1,cancelable:!0},gD="FocusScope",yd=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[u,f]=y.useState(null),p=Yt(i),m=Yt(a),d=y.useRef(null),v=nt(t,k=>f(k)),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let k=function(R){if(x.paused||!u)return;const O=R.target;u.contains(O)?d.current=O:Ho(d.current,{select:!0})},E=function(R){if(x.paused||!u)return;const O=R.relatedTarget;O!==null&&(u.contains(O)||Ho(d.current,{select:!0}))},C=function(R){if(document.activeElement===document.body)for(const B of R)B.removedNodes.length>0&&Ho(u)};document.addEventListener("focusin",k),document.addEventListener("focusout",E);const P=new MutationObserver(C);return u&&P.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",E),P.disconnect()}}},[r,u,x.paused]),y.useEffect(()=>{if(u){Ww.add(x);const k=document.activeElement;if(!u.contains(k)){const C=new CustomEvent(Bp,Vw);u.addEventListener(Bp,p),u.dispatchEvent(C),C.defaultPrevented||(yD(kD(rk(u)),{select:!0}),document.activeElement===k&&Ho(u))}return()=>{u.removeEventListener(Bp,p),setTimeout(()=>{const C=new CustomEvent(Up,Vw);u.addEventListener(Up,m),u.dispatchEvent(C),C.defaultPrevented||Ho(k??document.body,{select:!0}),u.removeEventListener(Up,m),Ww.remove(x)},0)}}},[u,p,m,x]);const S=y.useCallback(k=>{if(!n&&!r||x.paused)return;const E=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,C=document.activeElement;if(E&&C){const P=k.currentTarget,[R,O]=vD(P);R&&O?!k.shiftKey&&C===O?(k.preventDefault(),n&&Ho(R,{select:!0})):k.shiftKey&&C===R&&(k.preventDefault(),n&&Ho(O,{select:!0})):C===P&&k.preventDefault()}},[n,r,x.paused]);return h.jsx(Fe.div,{tabIndex:-1,...l,ref:v,onKeyDown:S})});yd.displayName=gD;function yD(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ho(r,{select:t}),document.activeElement!==n)return}function vD(e){const t=rk(e),n=Hw(t,e),r=Hw(t.reverse(),e);return[n,r]}function rk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Hw(e,t){for(const n of e)if(!xD(n,{upTo:t}))return n}function xD(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 wD(e){return e instanceof HTMLInputElement&&"select"in e}function Ho(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wD(e)&&t&&e.select()}}var Ww=bD();function bD(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=qw(e,t),e.unshift(t)},remove(t){var n;e=qw(e,t),(n=e[0])==null||n.resume()}}}function qw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kD(e){return e.filter(t=>t.tagName!=="A")}var SD="Portal",vd=y.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,a]=y.useState(!1);$t(()=>a(!0),[]);const l=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?I0.createPortal(h.jsx(Fe.div,{...r,ref:t}),l):null});vd.displayName=SD;function CD(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var $n=e=>{const{present:t,children:n}=e,r=ED(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),a=nt(r.ref,_D(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:a}):null};$n.displayName="Presence";function ED(e){const[t,n]=y.useState(),r=y.useRef(null),i=y.useRef(e),a=y.useRef("none"),l=e?"mounted":"unmounted",[u,f]=CD(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const p=yc(r.current);a.current=u==="mounted"?p:"none"},[u]),$t(()=>{const p=r.current,m=i.current;if(m!==e){const v=a.current,x=yc(p);e?f("MOUNT"):x==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(m&&v!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),$t(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,d=x=>{const k=yc(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&k&&(f("ANIMATION_END"),!i.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},v=x=>{x.target===t&&(a.current=yc(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(p=>{r.current=p?getComputedStyle(p):null,n(p)},[])}}function yc(e){return(e==null?void 0:e.animationName)||"none"}function _D(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Vp=0;function ng(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Kw()),document.body.insertAdjacentElement("beforeend",e[1]??Kw()),Vp++,()=>{Vp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vp--}},[])}function Kw(){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 Qr=function(){return Qr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Qr.apply(this,arguments)};function ok(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ND(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Pc="right-scroll-bar-position",jc="width-before-scroll-bar",TD="with-scroll-bars-hidden",PD="--removed-body-scroll-bar-size";function Hp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function jD(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var RD=typeof window<"u"?y.useLayoutEffect:y.useEffect,Gw=new WeakMap;function OD(e,t){var n=jD(null,function(r){return e.forEach(function(i){return Hp(i,r)})});return RD(function(){var r=Gw.get(n);if(r){var i=new Set(r),a=new Set(e),l=n.current;i.forEach(function(u){a.has(u)||Hp(u,null)}),a.forEach(function(u){i.has(u)||Hp(u,l)})}Gw.set(n,e)},[e]),n}function AD(e){return e}function ID(e,t){t===void 0&&(t=AD);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var l=t(a,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(a){for(r=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(a),l=n}var f=function(){var m=l;l=[],m.forEach(a)},p=function(){return Promise.resolve().then(f)};p(),n={push:function(m){l.push(m),p()},filter:function(m){return l=l.filter(m),n}}}};return i}function MD(e){e===void 0&&(e={});var t=ID(null);return t.options=Qr({async:!0,ssr:!1},e),t}var ik=function(e){var t=e.sideCar,n=ok(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,Qr({},n))};ik.isSideCarExport=!0;function LD(e,t){return e.useMedium(t),ik}var sk=MD(),Wp=function(){},xd=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Wp,onWheelCapture:Wp,onTouchMoveCapture:Wp}),i=r[0],a=r[1],l=e.forwardProps,u=e.children,f=e.className,p=e.removeScrollBar,m=e.enabled,d=e.shards,v=e.sideCar,x=e.noRelative,S=e.noIsolation,k=e.inert,E=e.allowPinchZoom,C=e.as,P=C===void 0?"div":C,R=e.gapMode,O=ok(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=v,A=OD([n,t]),z=Qr(Qr({},O),i);return y.createElement(y.Fragment,null,m&&y.createElement(B,{sideCar:sk,removeScrollBar:p,shards:d,noRelative:x,noIsolation:S,inert:k,setCallbacks:a,allowPinchZoom:!!E,lockRef:n,gapMode:R}),l?y.cloneElement(y.Children.only(u),Qr(Qr({},z),{ref:A})):y.createElement(P,Qr({},z,{className:f,ref:A}),u))});xd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xd.classNames={fullWidth:jc,zeroRight:Pc};var DD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $D(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=DD();return t&&e.setAttribute("nonce",t),e}function zD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function FD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var BD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$D())&&(zD(t,n),FD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},UD=function(){var e=BD();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ak=function(){var e=UD(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},VD={left:0,top:0,right:0,gap:0},qp=function(e){return parseInt(e||"",10)||0},HD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[qp(n),qp(r),qp(i)]},WD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return VD;var t=HD(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},qD=ak(),Bs="data-scroll-locked",KD=function(e,t,n,r){var i=e.left,a=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
363
|
+
.`.concat(TD,` {
|
|
364
|
+
overflow: hidden `).concat(r,`;
|
|
365
|
+
padding-right: `).concat(u,"px ").concat(r,`;
|
|
366
|
+
}
|
|
367
|
+
body[`).concat(Bs,`] {
|
|
368
|
+
overflow: hidden `).concat(r,`;
|
|
369
|
+
overscroll-behavior: contain;
|
|
370
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
371
|
+
padding-left: `.concat(i,`px;
|
|
372
|
+
padding-top: `).concat(a,`px;
|
|
373
|
+
padding-right: `).concat(l,`px;
|
|
374
|
+
margin-left:0;
|
|
375
|
+
margin-top:0;
|
|
376
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
377
|
+
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.`).concat(Pc,` {
|
|
381
|
+
right: `).concat(u,"px ").concat(r,`;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.`).concat(jc,` {
|
|
385
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.`).concat(Pc," .").concat(Pc,` {
|
|
389
|
+
right: 0 `).concat(r,`;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.`).concat(jc," .").concat(jc,` {
|
|
393
|
+
margin-right: 0 `).concat(r,`;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
body[`).concat(Bs,`] {
|
|
397
|
+
`).concat(PD,": ").concat(u,`px;
|
|
398
|
+
}
|
|
399
|
+
`)},Qw=function(){var e=parseInt(document.body.getAttribute(Bs)||"0",10);return isFinite(e)?e:0},GD=function(){y.useEffect(function(){return document.body.setAttribute(Bs,(Qw()+1).toString()),function(){var e=Qw()-1;e<=0?document.body.removeAttribute(Bs):document.body.setAttribute(Bs,e.toString())}},[])},QD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;GD();var a=y.useMemo(function(){return WD(i)},[i]);return y.createElement(qD,{styles:KD(a,!t,i,n?"":"!important")})},em=!1;if(typeof window<"u")try{var vc=Object.defineProperty({},"passive",{get:function(){return em=!0,!0}});window.addEventListener("test",vc,vc),window.removeEventListener("test",vc,vc)}catch{em=!1}var Ps=em?{passive:!1}:!1,YD=function(e){return e.tagName==="TEXTAREA"},lk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!YD(e)&&n[t]==="visible")},ZD=function(e){return lk(e,"overflowY")},JD=function(e){return lk(e,"overflowX")},Yw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=uk(e,r);if(i){var a=ck(e,r),l=a[1],u=a[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},XD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},e$=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},uk=function(e,t){return e==="v"?ZD(t):JD(t)},ck=function(e,t){return e==="v"?XD(t):e$(t)},t$=function(e,t){return e==="h"&&t==="rtl"?-1:1},n$=function(e,t,n,r,i){var a=t$(e,window.getComputedStyle(t).direction),l=a*r,u=n.target,f=t.contains(u),p=!1,m=l>0,d=0,v=0;do{if(!u)break;var x=ck(e,u),S=x[0],k=x[1],E=x[2],C=k-E-a*S;(S||C)&&uk(e,u)&&(d+=C,v+=S);var P=u.parentNode;u=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(m&&Math.abs(d)<1||!m&&Math.abs(v)<1)&&(p=!0),p},xc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zw=function(e){return[e.deltaX,e.deltaY]},Jw=function(e){return e&&"current"in e?e.current:e},r$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},o$=function(e){return`
|
|
400
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
401
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
402
|
+
`)},i$=0,js=[];function s$(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(i$++)[0],a=y.useState(ak)[0],l=y.useRef(e);y.useEffect(function(){l.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var k=ND([e.lockRef.current],(e.shards||[]).map(Jw),!0).filter(Boolean);return k.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=y.useCallback(function(k,E){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!l.current.allowPinchZoom;var C=xc(k),P=n.current,R="deltaX"in k?k.deltaX:P[0]-C[0],O="deltaY"in k?k.deltaY:P[1]-C[1],B,A=k.target,z=Math.abs(R)>Math.abs(O)?"h":"v";if("touches"in k&&z==="h"&&A.type==="range")return!1;var I=window.getSelection(),D=I&&I.anchorNode,j=D?D===A||D.contains(A):!1;if(j)return!1;var H=Yw(z,A);if(!H)return!0;if(H?B=z:(B=z==="v"?"h":"v",H=Yw(z,A)),!H)return!1;if(!r.current&&"changedTouches"in k&&(R||O)&&(r.current=B),!B)return!0;var ee=r.current||B;return n$(ee,E,k,ee==="h"?R:O)},[]),f=y.useCallback(function(k){var E=k;if(!(!js.length||js[js.length-1]!==a)){var C="deltaY"in E?Zw(E):xc(E),P=t.current.filter(function(B){return B.name===E.type&&(B.target===E.target||E.target===B.shadowParent)&&r$(B.delta,C)})[0];if(P&&P.should){E.cancelable&&E.preventDefault();return}if(!P){var R=(l.current.shards||[]).map(Jw).filter(Boolean).filter(function(B){return B.contains(E.target)}),O=R.length>0?u(E,R[0]):!l.current.noIsolation;O&&E.cancelable&&E.preventDefault()}}},[]),p=y.useCallback(function(k,E,C,P){var R={name:k,delta:E,target:C,should:P,shadowParent:a$(C)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(O){return O!==R})},1)},[]),m=y.useCallback(function(k){n.current=xc(k),r.current=void 0},[]),d=y.useCallback(function(k){p(k.type,Zw(k),k.target,u(k,e.lockRef.current))},[]),v=y.useCallback(function(k){p(k.type,xc(k),k.target,u(k,e.lockRef.current))},[]);y.useEffect(function(){return js.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Ps),document.addEventListener("touchmove",f,Ps),document.addEventListener("touchstart",m,Ps),function(){js=js.filter(function(k){return k!==a}),document.removeEventListener("wheel",f,Ps),document.removeEventListener("touchmove",f,Ps),document.removeEventListener("touchstart",m,Ps)}},[]);var x=e.removeScrollBar,S=e.inert;return y.createElement(y.Fragment,null,S?y.createElement(a,{styles:o$(i)}):null,x?y.createElement(QD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function a$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const l$=LD(sk,s$);var wd=y.forwardRef(function(e,t){return y.createElement(xd,Qr({},e,{ref:t,sideCar:l$}))});wd.classNames=xd.classNames;var u$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Rs=new WeakMap,wc=new WeakMap,bc={},Kp=0,dk=function(e){return e&&(e.host||dk(e.parentNode))},c$=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},d$=function(e,t,n,r){var i=c$(t,Array.isArray(e)?e:[e]);bc[n]||(bc[n]=new WeakMap);var a=bc[n],l=[],u=new Set,f=new Set(i),p=function(d){!d||u.has(d)||(u.add(d),p(d.parentNode))};i.forEach(p);var m=function(d){!d||f.has(d)||Array.prototype.forEach.call(d.children,function(v){if(u.has(v))m(v);else try{var x=v.getAttribute(r),S=x!==null&&x!=="false",k=(Rs.get(v)||0)+1,E=(a.get(v)||0)+1;Rs.set(v,k),a.set(v,E),l.push(v),k===1&&S&&wc.set(v,!0),E===1&&v.setAttribute(n,"true"),S||v.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return m(t),u.clear(),Kp++,function(){l.forEach(function(d){var v=Rs.get(d)-1,x=a.get(d)-1;Rs.set(d,v),a.set(d,x),v||(wc.has(d)||d.removeAttribute(r),wc.delete(d)),x||d.removeAttribute(n)}),Kp--,Kp||(Rs=new WeakMap,Rs=new WeakMap,wc=new WeakMap,bc={})}},rg=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=u$(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),d$(r,i,n,"aria-hidden")):function(){return null}};function f$(e){const t=p$(e),n=y.forwardRef((r,i)=>{const{children:a,...l}=r,u=y.Children.toArray(a),f=u.find(m$);if(f){const p=f.props.children,m=u.map(d=>d===f?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:d);return h.jsx(t,{...l,ref:i,children:y.isValidElement(p)?y.cloneElement(p,void 0,m):null})}return h.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function p$(e){const t=y.forwardRef((n,r)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const l=y$(i),u=g$(a,i.props);return i.type!==y.Fragment&&(u.ref=r?Dn(r,l):l),y.cloneElement(i,u)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var h$=Symbol("radix.slottable");function m$(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===h$}function g$(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function y$(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bd="Dialog",[fk,sK]=Mr(bd),[v$,Lr]=fk(bd),pk=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:l=!0}=e,u=y.useRef(null),f=y.useRef(null),[p,m]=oi({prop:r,defaultProp:i??!1,onChange:a,caller:bd});return h.jsx(v$,{scope:t,triggerRef:u,contentRef:f,contentId:fn(),titleId:fn(),descriptionId:fn(),open:p,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(d=>!d),[m]),modal:l,children:n})};pk.displayName=bd;var hk="DialogTrigger",mk=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Lr(hk,n),a=nt(t,i.triggerRef);return h.jsx(Fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":sg(i.open),...r,ref:a,onClick:Ne(e.onClick,i.onOpenToggle)})});mk.displayName=hk;var og="DialogPortal",[x$,gk]=fk(og,{forceMount:void 0}),yk=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Lr(og,t);return h.jsx(x$,{scope:t,forceMount:n,children:y.Children.map(r,l=>h.jsx($n,{present:n||a.open,children:h.jsx(vd,{asChild:!0,container:i,children:l})}))})};yk.displayName=og;var Bc="DialogOverlay",vk=y.forwardRef((e,t)=>{const n=gk(Bc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Lr(Bc,e.__scopeDialog);return a.modal?h.jsx($n,{present:r||a.open,children:h.jsx(b$,{...i,ref:t})}):null});vk.displayName=Bc;var w$=f$("DialogOverlay.RemoveScroll"),b$=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Lr(Bc,n);return h.jsx(wd,{as:w$,allowPinchZoom:!0,shards:[i.contentRef],children:h.jsx(Fe.div,{"data-state":sg(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Gi="DialogContent",xk=y.forwardRef((e,t)=>{const n=gk(Gi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Lr(Gi,e.__scopeDialog);return h.jsx($n,{present:r||a.open,children:a.modal?h.jsx(k$,{...i,ref:t}):h.jsx(S$,{...i,ref:t})})});xk.displayName=Gi;var k$=y.forwardRef((e,t)=>{const n=Lr(Gi,e.__scopeDialog),r=y.useRef(null),i=nt(t,n.contentRef,r);return y.useEffect(()=>{const a=r.current;if(a)return rg(a)},[]),h.jsx(wk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&a.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,a=>a.preventDefault())})}),S$=y.forwardRef((e,t)=>{const n=Lr(Gi,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return h.jsx(wk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var f,p;(f=e.onInteractOutside)==null||f.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=a.target;((p=n.triggerRef.current)==null?void 0:p.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),wk=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=e,u=Lr(Gi,n),f=y.useRef(null),p=nt(t,f);return ng(),h.jsxs(h.Fragment,{children:[h.jsx(yd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:h.jsx(gd,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":sg(u.open),...l,ref:p,onDismiss:()=>u.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(C$,{titleId:u.titleId}),h.jsx(_$,{contentRef:f,descriptionId:u.descriptionId})]})]})}),ig="DialogTitle",bk=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Lr(ig,n);return h.jsx(Fe.h2,{id:i.titleId,...r,ref:t})});bk.displayName=ig;var kk="DialogDescription",Sk=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Lr(kk,n);return h.jsx(Fe.p,{id:i.descriptionId,...r,ref:t})});Sk.displayName=kk;var Ck="DialogClose",Ek=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Lr(Ck,n);return h.jsx(Fe.button,{type:"button",...r,ref:t,onClick:Ne(e.onClick,()=>i.onOpenChange(!1))})});Ek.displayName=Ck;function sg(e){return e?"open":"closed"}var _k="DialogTitleWarning",[aK,Nk]=GL(_k,{contentName:Gi,titleName:ig,docsSlug:"dialog"}),C$=({titleId:e})=>{const t=Nk(_k),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
403
|
+
|
|
404
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
405
|
+
|
|
406
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},E$="DialogDescriptionWarning",_$=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nk(E$).contentName}}.`;return y.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Tk=pk,lK=mk,Pk=yk,ag=vk,lg=xk,jk=bk,Rk=Sk,N$=Ek;function Ok(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var T$=["color"],P$=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ok(e,T$);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{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:r,fillRule:"evenodd",clipRule:"evenodd"}))}),j$=["color"],R$=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ok(e,j$);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{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:r,fillRule:"evenodd",clipRule:"evenodd"}))});const Qi=Tk,O$=Pk,Ak=y.forwardRef(({className:e,...t},n)=>h.jsx(ag,{ref:n,className:Te("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}));Ak.displayName=ag.displayName;const ii=y.forwardRef(({className:e,children:t,hideCloseButton:n,...r},i)=>h.jsxs(O$,{children:[h.jsx(Ak,{}),h.jsxs(lg,{ref:i,className:Te("fixed left-[50%] top-[50%] z-50 grid grid-cols-[minmax(0,1fr)] 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),...r,children:[t,!n&&h.jsxs(N$,{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:[h.jsx(P$,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ii.displayName=lg.displayName;const si=({className:e,...t})=>h.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});si.displayName="DialogHeader";const kd=({className:e,...t})=>h.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});kd.displayName="DialogFooter";const ai=y.forwardRef(({className:e,...t},n)=>h.jsx(jk,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));ai.displayName=jk.displayName;const li=y.forwardRef(({className:e,...t},n)=>h.jsx(Rk,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));li.displayName=Rk.displayName;var A$=Symbol.for("react.lazy"),Uc=Rm[" use ".trim().toString()];function I$(e){return typeof e=="object"&&e!==null&&"then"in e}function Ik(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===A$&&"_payload"in e&&I$(e._payload)}function ug(e){const t=L$(e),n=y.forwardRef((r,i)=>{let{children:a,...l}=r;Ik(a)&&typeof Uc=="function"&&(a=Uc(a._payload));const u=y.Children.toArray(a),f=u.find($$);if(f){const p=f.props.children,m=u.map(d=>d===f?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:d);return h.jsx(t,{...l,ref:i,children:y.isValidElement(p)?y.cloneElement(p,void 0,m):null})}return h.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var M$=ug("Slot");function L$(e){const t=y.forwardRef((n,r)=>{let{children:i,...a}=n;if(Ik(i)&&typeof Uc=="function"&&(i=Uc(i._payload)),y.isValidElement(i)){const l=F$(i),u=z$(a,i.props);return i.type!==y.Fragment&&(u.ref=r?Dn(r,l):l),y.cloneElement(i,u)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var D$=Symbol("radix.slottable");function $$(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===D$}function z$(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function F$(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const B$=md("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"}}),ut=y.forwardRef(({className:e,variant:t="default",size:n="default",asChild:r=!1,...i},a)=>{const l=r?M$:"button";return h.jsx(l,{className:Te(B$({variant:t,size:n,className:e})),ref:a,...i})});ut.displayName="Button";function U$(e,t=[]){let n=[];function r(a,l){const u=y.createContext(l);u.displayName=a+"Context";const f=n.length;n=[...n,l];const p=d=>{var C;const{scope:v,children:x,...S}=d,k=((C=v==null?void 0:v[e])==null?void 0:C[f])||u,E=y.useMemo(()=>S,Object.values(S));return h.jsx(k.Provider,{value:E,children:x})};p.displayName=a+"Provider";function m(d,v){var k;const x=((k=v==null?void 0:v[e])==null?void 0:k[f])||u,S=y.useContext(x);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[p,m]}const i=()=>{const a=n.map(l=>y.createContext(l));return function(u){const f=(u==null?void 0:u[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[r,V$(i,...t)]}function V$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const l=r.reduce((u,{useScope:f,scopeName:p})=>{const d=f(a)[`__scope${p}`];return{...u,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var H$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cg=H$.reduce((e,t)=>{const n=ug(`Primitive.${t}`),r=y.forwardRef((i,a)=>{const{asChild:l,...u}=i,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(f,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Gp={exports:{}},Qp={};/**
|
|
407
|
+
* @license React
|
|
408
|
+
* use-sync-external-store-shim.production.js
|
|
409
|
+
*
|
|
410
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
411
|
+
*
|
|
412
|
+
* This source code is licensed under the MIT license found in the
|
|
413
|
+
* LICENSE file in the root directory of this source tree.
|
|
414
|
+
*/var Xw;function W$(){if(Xw)return Qp;Xw=1;var e=ad();function t(d,v){return d===v&&(d!==0||1/d===1/v)||d!==d&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function u(d,v){var x=v(),S=r({inst:{value:x,getSnapshot:v}}),k=S[0].inst,E=S[1];return a(function(){k.value=x,k.getSnapshot=v,f(k)&&E({inst:k})},[d,x,v]),i(function(){return f(k)&&E({inst:k}),d(function(){f(k)&&E({inst:k})})},[d]),l(x),x}function f(d){var v=d.getSnapshot;d=d.value;try{var x=v();return!n(d,x)}catch{return!0}}function p(d,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:u;return Qp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Qp}var eb;function q$(){return eb||(eb=1,Gp.exports=W$()),Gp.exports}var K$=q$();function G$(){return K$.useSyncExternalStore(Q$,()=>!0,()=>!1)}function Q$(){return()=>{}}var dg="Avatar",[Y$]=U$(dg),[Z$,Mk]=Y$(dg),Lk=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=y.useState("idle");return h.jsx(Z$,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:h.jsx(cg.span,{...r,ref:t})})});Lk.displayName=dg;var Dk="AvatarImage",$k=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,l=Mk(Dk,n),u=J$(r,a),f=Yt(p=>{i(p),l.onImageLoadingStatusChange(p)});return $t(()=>{u!=="idle"&&f(u)},[u,f]),u==="loaded"?h.jsx(cg.img,{...a,ref:t,src:r}):null});$k.displayName=Dk;var zk="AvatarFallback",Fk=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=Mk(zk,n),[l,u]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const f=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(f)}},[r]),l&&a.imageLoadingStatus!=="loaded"?h.jsx(cg.span,{...i,ref:t}):null});Fk.displayName=zk;function tb(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function J$(e,{referrerPolicy:t,crossOrigin:n}){const r=G$(),i=y.useRef(null),a=r?(i.current||(i.current=new window.Image),i.current):null,[l,u]=y.useState(()=>tb(a,e));return $t(()=>{u(tb(a,e))},[a,e]),$t(()=>{const f=d=>()=>{u(d)};if(!a)return;const p=f("loaded"),m=f("error");return a.addEventListener("load",p),a.addEventListener("error",m),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",p),a.removeEventListener("error",m)}},[a,n,t]),l}var Bk=Lk,Uk=$k,Vk=Fk;const tm=y.forwardRef(({className:e,...t},n)=>h.jsx(Bk,{ref:n,className:Te("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));tm.displayName=Bk.displayName;const X$=y.forwardRef(({className:e,...t},n)=>h.jsx(Uk,{ref:n,className:Te("aspect-square h-full w-full",e),...t}));X$.displayName=Uk.displayName;const nm=y.forwardRef(({className:e,...t},n)=>h.jsx(Vk,{ref:n,className:Te("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));nm.displayName=Vk.displayName;function nb(e){const t=e4(e),n=y.forwardRef((r,i)=>{const{children:a,...l}=r,u=y.Children.toArray(a),f=u.find(n4);if(f){const p=f.props.children,m=u.map(d=>d===f?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:d);return h.jsx(t,{...l,ref:i,children:y.isValidElement(p)?y.cloneElement(p,void 0,m):null})}return h.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function e4(e){const t=y.forwardRef((n,r)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const l=o4(i),u=r4(a,i.props);return i.type!==y.Fragment&&(u.ref=r?Dn(r,l):l),y.cloneElement(i,u)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var t4=Symbol("radix.slottable");function n4(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===t4}function r4(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function o4(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function fg(e){const t=e+"CollectionProvider",[n,r]=Mr(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=k=>{const{scope:E,children:C}=k,P=ve.useRef(null),R=ve.useRef(new Map).current;return h.jsx(i,{scope:E,itemMap:R,collectionRef:P,children:C})};l.displayName=t;const u=e+"CollectionSlot",f=nb(u),p=ve.forwardRef((k,E)=>{const{scope:C,children:P}=k,R=a(u,C),O=nt(E,R.collectionRef);return h.jsx(f,{ref:O,children:P})});p.displayName=u;const m=e+"CollectionItemSlot",d="data-radix-collection-item",v=nb(m),x=ve.forwardRef((k,E)=>{const{scope:C,children:P,...R}=k,O=ve.useRef(null),B=nt(E,O),A=a(m,C);return ve.useEffect(()=>(A.itemMap.set(O,{ref:O,...R}),()=>void A.itemMap.delete(O))),h.jsx(v,{[d]:"",ref:B,children:P})});x.displayName=m;function S(k){const E=a(e+"CollectionConsumer",k);return ve.useCallback(()=>{const P=E.collectionRef.current;if(!P)return[];const R=Array.from(P.querySelectorAll(`[${d}]`));return Array.from(E.itemMap.values()).sort((A,z)=>R.indexOf(A.ref.current)-R.indexOf(z.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:l,Slot:p,ItemSlot:x},S,r]}var i4=y.createContext(void 0);function ql(e){const t=y.useContext(i4);return e||t||"ltr"}const Hk=["top","right","bottom","left"],rb=["start","end"],ob=Hk.reduce((e,t)=>e.concat(t,t+"-"+rb[0],t+"-"+rb[1]),[]),Rr=Math.min,cn=Math.max,Vc=Math.round,kc=Math.floor,Yr=e=>({x:e,y:e}),s4={left:"right",right:"left",bottom:"top",top:"bottom"};function rm(e,t,n){return cn(e,Rr(t,n))}function Or(e,t){return typeof e=="function"?e(t):e}function nr(e){return e.split("-")[0]}function Pr(e){return e.split("-")[1]}function pg(e){return e==="x"?"y":"x"}function hg(e){return e==="y"?"height":"width"}function Tr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function mg(e){return pg(Tr(e))}function Wk(e,t,n){n===void 0&&(n=!1);const r=Pr(e),i=mg(e),a=hg(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Wc(l)),[l,Wc(l)]}function a4(e){const t=Wc(e);return[Hc(e),t,Hc(t)]}function Hc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ib=["left","right"],sb=["right","left"],l4=["top","bottom"],u4=["bottom","top"];function c4(e,t,n){switch(e){case"top":case"bottom":return n?t?sb:ib:t?ib:sb;case"left":case"right":return t?l4:u4;default:return[]}}function d4(e,t,n,r){const i=Pr(e);let a=c4(nr(e),n==="start",r);return i&&(a=a.map(l=>l+"-"+i),t&&(a=a.concat(a.map(Hc)))),a}function Wc(e){const t=nr(e);return s4[t]+e.slice(t.length)}function f4(e){return{top:0,right:0,bottom:0,left:0,...e}}function gg(e){return typeof e!="number"?f4(e):{top:e,right:e,bottom:e,left:e}}function la(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ab(e,t,n){let{reference:r,floating:i}=e;const a=Tr(t),l=mg(t),u=hg(l),f=nr(t),p=a==="y",m=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,v=r[u]/2-i[u]/2;let x;switch(f){case"top":x={x:m,y:r.y-i.height};break;case"bottom":x={x:m,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:d};break;case"left":x={x:r.x-i.width,y:d};break;default:x={x:r.x,y:r.y}}switch(Pr(t)){case"start":x[l]-=v*(n&&p?-1:1);break;case"end":x[l]+=v*(n&&p?-1:1);break}return x}async function p4(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:l,elements:u,strategy:f}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:d="floating",altBoundary:v=!1,padding:x=0}=Or(t,e),S=gg(x),E=u[v?d==="floating"?"reference":"floating":d],C=la(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(E)))==null||n?E:E.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:p,rootBoundary:m,strategy:f})),P=d==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),O=await(a.isElement==null?void 0:a.isElement(R))?await(a.getScale==null?void 0:a.getScale(R))||{x:1,y:1}:{x:1,y:1},B=la(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:P,offsetParent:R,strategy:f}):P);return{top:(C.top-B.top+S.top)/O.y,bottom:(B.bottom-C.bottom+S.bottom)/O.y,left:(C.left-B.left+S.left)/O.x,right:(B.right-C.right+S.right)/O.x}}const h4=50,m4=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:l}=n,u=l.detectOverflow?l:{...l,detectOverflow:p4},f=await(l.isRTL==null?void 0:l.isRTL(t));let p=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:d}=ab(p,r,f),v=r,x=0;const S={};for(let k=0;k<a.length;k++){const E=a[k];if(!E)continue;const{name:C,fn:P}=E,{x:R,y:O,data:B,reset:A}=await P({x:m,y:d,initialPlacement:r,placement:v,strategy:i,middlewareData:S,rects:p,platform:u,elements:{reference:e,floating:t}});m=R??m,d=O??d,S[C]={...S[C],...B},A&&x<h4&&(x++,typeof A=="object"&&(A.placement&&(v=A.placement),A.rects&&(p=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:m,y:d}=ab(p,v,f)),k=-1)}return{x:m,y:d,placement:v,strategy:i,middlewareData:S}},g4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:l,elements:u,middlewareData:f}=t,{element:p,padding:m=0}=Or(e,t)||{};if(p==null)return{};const d=gg(m),v={x:n,y:r},x=mg(i),S=hg(x),k=await l.getDimensions(p),E=x==="y",C=E?"top":"left",P=E?"bottom":"right",R=E?"clientHeight":"clientWidth",O=a.reference[S]+a.reference[x]-v[x]-a.floating[S],B=v[x]-a.reference[x],A=await(l.getOffsetParent==null?void 0:l.getOffsetParent(p));let z=A?A[R]:0;(!z||!await(l.isElement==null?void 0:l.isElement(A)))&&(z=u.floating[R]||a.floating[S]);const I=O/2-B/2,D=z/2-k[S]/2-1,j=Rr(d[C],D),H=Rr(d[P],D),ee=j,le=z-k[S]-H,oe=z/2-k[S]/2+I,G=rm(ee,oe,le),X=!f.arrow&&Pr(i)!=null&&oe!==G&&a.reference[S]/2-(oe<ee?j:H)-k[S]/2<0,ue=X?oe<ee?oe-ee:oe-le:0;return{[x]:v[x]+ue,data:{[x]:G,centerOffset:oe-G-ue,...X&&{alignmentOffset:ue}},reset:X}}});function y4(e,t,n){return(e?[...n.filter(i=>Pr(i)===e),...n.filter(i=>Pr(i)!==e)]:n.filter(i=>nr(i)===i)).filter(i=>e?Pr(i)===e||(t?Hc(i)!==i:!1):!0)}const v4=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:a,middlewareData:l,placement:u,platform:f,elements:p}=t,{crossAxis:m=!1,alignment:d,allowedPlacements:v=ob,autoAlignment:x=!0,...S}=Or(e,t),k=d!==void 0||v===ob?y4(d||null,x,v):v,E=await f.detectOverflow(t,S),C=((n=l.autoPlacement)==null?void 0:n.index)||0,P=k[C];if(P==null)return{};const R=Wk(P,a,await(f.isRTL==null?void 0:f.isRTL(p.floating)));if(u!==P)return{reset:{placement:k[0]}};const O=[E[nr(P)],E[R[0]],E[R[1]]],B=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:P,overflows:O}],A=k[C+1];if(A)return{data:{index:C+1,overflows:B},reset:{placement:A}};const z=B.map(j=>{const H=Pr(j.placement);return[j.placement,H&&m?j.overflows.slice(0,2).reduce((ee,le)=>ee+le,0):j.overflows[0],j.overflows]}).sort((j,H)=>j[1]-H[1]),D=((i=z.filter(j=>j[2].slice(0,Pr(j[0])?2:3).every(H=>H<=0))[0])==null?void 0:i[0])||z[0][0];return D!==u?{data:{index:C+1,overflows:B},reset:{placement:D}}:{}}}},x4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:l,initialPlacement:u,platform:f,elements:p}=t,{mainAxis:m=!0,crossAxis:d=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...E}=Or(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const C=nr(i),P=Tr(u),R=nr(u)===u,O=await(f.isRTL==null?void 0:f.isRTL(p.floating)),B=v||(R||!k?[Wc(u)]:a4(u)),A=S!=="none";!v&&A&&B.push(...d4(u,k,S,O));const z=[u,...B],I=await f.detectOverflow(t,E),D=[];let j=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&D.push(I[C]),d){const oe=Wk(i,l,O);D.push(I[oe[0]],I[oe[1]])}if(j=[...j,{placement:i,overflows:D}],!D.every(oe=>oe<=0)){var H,ee;const oe=(((H=a.flip)==null?void 0:H.index)||0)+1,G=z[oe];if(G&&(!(d==="alignment"?P!==Tr(G):!1)||j.every(Z=>Tr(Z.placement)===P?Z.overflows[0]>0:!0)))return{data:{index:oe,overflows:j},reset:{placement:G}};let X=(ee=j.filter(ue=>ue.overflows[0]<=0).sort((ue,Z)=>ue.overflows[1]-Z.overflows[1])[0])==null?void 0:ee.placement;if(!X)switch(x){case"bestFit":{var le;const ue=(le=j.filter(Z=>{if(A){const Q=Tr(Z.placement);return Q===P||Q==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(Q=>Q>0).reduce((Q,N)=>Q+N,0)]).sort((Z,Q)=>Z[1]-Q[1])[0])==null?void 0:le[0];ue&&(X=ue);break}case"initialPlacement":X=u;break}if(i!==X)return{reset:{placement:X}}}return{}}}};function lb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ub(e){return Hk.some(t=>e[t]>=0)}const w4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=Or(e,t);switch(i){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),u=lb(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:ub(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),u=lb(l,n.floating);return{data:{escapedOffsets:u,escaped:ub(u)}}}default:return{}}}}};function qk(e){const t=Rr(...e.map(a=>a.left)),n=Rr(...e.map(a=>a.top)),r=cn(...e.map(a=>a.right)),i=cn(...e.map(a=>a.bottom));return{x:t,y:n,width:r-t,height:i-n}}function b4(e){const t=e.slice().sort((i,a)=>i.y-a.y),n=[];let r=null;for(let i=0;i<t.length;i++){const a=t[i];!r||a.y-r.y>r.height/2?n.push([a]):n[n.length-1].push(a),r=a}return n.map(i=>la(qk(i)))}const k4=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:i,platform:a,strategy:l}=t,{padding:u=2,x:f,y:p}=Or(e,t),m=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=b4(m),v=la(qk(m)),x=gg(u);function S(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&p!=null)return d.find(E=>f>E.left-x.left&&f<E.right+x.right&&p>E.top-x.top&&p<E.bottom+x.bottom)||v;if(d.length>=2){if(Tr(n)==="y"){const j=d[0],H=d[d.length-1],ee=nr(n)==="top",le=j.top,oe=H.bottom,G=ee?j.left:H.left,X=ee?j.right:H.right,ue=X-G,Z=oe-le;return{top:le,bottom:oe,left:G,right:X,width:ue,height:Z,x:G,y:le}}const E=nr(n)==="left",C=cn(...d.map(j=>j.right)),P=Rr(...d.map(j=>j.left)),R=d.filter(j=>E?j.left===P:j.right===C),O=R[0].top,B=R[R.length-1].bottom,A=P,z=C,I=z-A,D=B-O;return{top:O,bottom:B,left:A,right:z,width:I,height:D,x:A,y:O}}return v}const k=await a.getElementRects({reference:{getBoundingClientRect:S},floating:r.floating,strategy:l});return i.reference.x!==k.reference.x||i.reference.y!==k.reference.y||i.reference.width!==k.reference.width||i.reference.height!==k.reference.height?{reset:{rects:k}}:{}}}},Kk=new Set(["left","top"]);async function S4(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=nr(n),u=Pr(n),f=Tr(n)==="y",p=Kk.has(l)?-1:1,m=a&&f?-1:1,d=Or(t,e);let{mainAxis:v,crossAxis:x,alignmentAxis:S}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return u&&typeof S=="number"&&(x=u==="end"?S*-1:S),f?{x:x*m,y:v*p}:{x:v*p,y:x*m}}const C4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:l,middlewareData:u}=t,f=await S4(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:a+f.y,data:{...f,placement:l}}}}},E4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:f={fn:C=>{let{x:P,y:R}=C;return{x:P,y:R}}},...p}=Or(e,t),m={x:n,y:r},d=await a.detectOverflow(t,p),v=Tr(nr(i)),x=pg(v);let S=m[x],k=m[v];if(l){const C=x==="y"?"top":"left",P=x==="y"?"bottom":"right",R=S+d[C],O=S-d[P];S=rm(R,S,O)}if(u){const C=v==="y"?"top":"left",P=v==="y"?"bottom":"right",R=k+d[C],O=k-d[P];k=rm(R,k,O)}const E=f.fn({...t,[x]:S,[v]:k});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[x]:l,[v]:u}}}}}},_4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:f=!0,crossAxis:p=!0}=Or(e,t),m={x:n,y:r},d=Tr(i),v=pg(d);let x=m[v],S=m[d];const k=Or(u,t),E=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(f){const R=v==="y"?"height":"width",O=a.reference[v]-a.floating[R]+E.mainAxis,B=a.reference[v]+a.reference[R]-E.mainAxis;x<O?x=O:x>B&&(x=B)}if(p){var C,P;const R=v==="y"?"width":"height",O=Kk.has(nr(i)),B=a.reference[d]-a.floating[R]+(O&&((C=l.offset)==null?void 0:C[d])||0)+(O?0:E.crossAxis),A=a.reference[d]+a.reference[R]+(O?0:((P=l.offset)==null?void 0:P[d])||0)-(O?E.crossAxis:0);S<B?S=B:S>A&&(S=A)}return{[v]:x,[d]:S}}}},N4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:l,elements:u}=t,{apply:f=()=>{},...p}=Or(e,t),m=await l.detectOverflow(t,p),d=nr(i),v=Pr(i),x=Tr(i)==="y",{width:S,height:k}=a.floating;let E,C;d==="top"||d==="bottom"?(E=d,C=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(C=d,E=v==="end"?"top":"bottom");const P=k-m.top-m.bottom,R=S-m.left-m.right,O=Rr(k-m[E],P),B=Rr(S-m[C],R),A=!t.middlewareData.shift;let z=O,I=B;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=R),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(z=P),A&&!v){const j=cn(m.left,0),H=cn(m.right,0),ee=cn(m.top,0),le=cn(m.bottom,0);x?I=S-2*(j!==0||H!==0?j+H:cn(m.left,m.right)):z=k-2*(ee!==0||le!==0?ee+le:cn(m.top,m.bottom))}await f({...t,availableWidth:I,availableHeight:z});const D=await l.getDimensions(u.floating);return S!==D.width||k!==D.height?{reset:{rects:!0}}:{}}}};function Sd(){return typeof window<"u"}function ga(e){return Gk(e)?(e.nodeName||"").toLowerCase():"#document"}function er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jr(e){var t;return(t=(Gk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gk(e){return Sd()?e instanceof Node||e instanceof er(e).Node:!1}function Ar(e){return Sd()?e instanceof Element||e instanceof er(e).Element:!1}function yo(e){return Sd()?e instanceof HTMLElement||e instanceof er(e).HTMLElement:!1}function cb(e){return!Sd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof er(e).ShadowRoot}function Kl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ir(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function T4(e){return/^(table|td|th)$/.test(ga(e))}function Cd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const P4=/transform|translate|scale|rotate|perspective|filter/,j4=/paint|layout|strict|content/,Pi=e=>!!e&&e!=="none";let Yp;function yg(e){const t=Ar(e)?Ir(e):e;return Pi(t.transform)||Pi(t.translate)||Pi(t.scale)||Pi(t.rotate)||Pi(t.perspective)||!vg()&&(Pi(t.backdropFilter)||Pi(t.filter))||P4.test(t.willChange||"")||j4.test(t.contain||"")}function R4(e){let t=ui(e);for(;yo(t)&&!ua(t);){if(yg(t))return t;if(Cd(t))return null;t=ui(t)}return null}function vg(){return Yp==null&&(Yp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yp}function ua(e){return/^(html|body|#document)$/.test(ga(e))}function Ir(e){return er(e).getComputedStyle(e)}function Ed(e){return Ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ui(e){if(ga(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cb(e)&&e.host||Jr(e);return cb(t)?t.host:t}function Qk(e){const t=ui(e);return ua(t)?e.ownerDocument?e.ownerDocument.body:e.body:yo(t)&&Kl(t)?t:Qk(t)}function El(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Qk(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),l=er(i);if(a){const u=om(l);return t.concat(l,l.visualViewport||[],Kl(i)?i:[],u&&n?El(u):[])}else return t.concat(i,El(i,[],n))}function om(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yk(e){const t=Ir(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=yo(e),a=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=Vc(n)!==a||Vc(r)!==l;return u&&(n=a,r=l),{width:n,height:r,$:u}}function xg(e){return Ar(e)?e:e.contextElement}function Us(e){const t=xg(e);if(!yo(t))return Yr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Yk(t);let l=(a?Vc(n.width):n.width)/r,u=(a?Vc(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const O4=Yr(0);function Zk(e){const t=er(e);return!vg()||!t.visualViewport?O4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function A4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==er(e)?!1:t}function Yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=xg(e);let l=Yr(1);t&&(r?Ar(r)&&(l=Us(r)):l=Us(e));const u=A4(a,n,r)?Zk(a):Yr(0);let f=(i.left+u.x)/l.x,p=(i.top+u.y)/l.y,m=i.width/l.x,d=i.height/l.y;if(a){const v=er(a),x=r&&Ar(r)?er(r):r;let S=v,k=om(S);for(;k&&r&&x!==S;){const E=Us(k),C=k.getBoundingClientRect(),P=Ir(k),R=C.left+(k.clientLeft+parseFloat(P.paddingLeft))*E.x,O=C.top+(k.clientTop+parseFloat(P.paddingTop))*E.y;f*=E.x,p*=E.y,m*=E.x,d*=E.y,f+=R,p+=O,S=er(k),k=om(S)}}return la({width:m,height:d,x:f,y:p})}function _d(e,t){const n=Ed(e).scrollLeft;return t?t.left+n:Yi(Jr(e)).left+n}function Jk(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-_d(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function I4(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",l=Jr(r),u=t?Cd(t.floating):!1;if(r===l||u&&a)return n;let f={scrollLeft:0,scrollTop:0},p=Yr(1);const m=Yr(0),d=yo(r);if((d||!d&&!a)&&((ga(r)!=="body"||Kl(l))&&(f=Ed(r)),d)){const x=Yi(r);p=Us(r),m.x=x.x+r.clientLeft,m.y=x.y+r.clientTop}const v=l&&!d&&!a?Jk(l,f):Yr(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-f.scrollLeft*p.x+m.x+v.x,y:n.y*p.y-f.scrollTop*p.y+m.y+v.y}}function M4(e){return Array.from(e.getClientRects())}function L4(e){const t=Jr(e),n=Ed(e),r=e.ownerDocument.body,i=cn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=cn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+_d(e);const u=-n.scrollTop;return Ir(r).direction==="rtl"&&(l+=cn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:l,y:u}}const db=25;function D4(e,t){const n=er(e),r=Jr(e),i=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,u=0,f=0;if(i){a=i.width,l=i.height;const m=vg();(!m||m&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}const p=_d(r);if(p<=0){const m=r.ownerDocument,d=m.body,v=getComputedStyle(d),x=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(r.clientWidth-d.clientWidth-x);S<=db&&(a-=S)}else p<=db&&(a+=p);return{width:a,height:l,x:u,y:f}}function $4(e,t){const n=Yi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yo(e)?Us(e):Yr(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,f=i*a.x,p=r*a.y;return{width:l,height:u,x:f,y:p}}function fb(e,t,n){let r;if(t==="viewport")r=D4(e,n);else if(t==="document")r=L4(Jr(e));else if(Ar(t))r=$4(t,n);else{const i=Zk(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return la(r)}function Xk(e,t){const n=ui(e);return n===t||!Ar(n)||ua(n)?!1:Ir(n).position==="fixed"||Xk(n,t)}function z4(e,t){const n=t.get(e);if(n)return n;let r=El(e,[],!1).filter(u=>Ar(u)&&ga(u)!=="body"),i=null;const a=Ir(e).position==="fixed";let l=a?ui(e):e;for(;Ar(l)&&!ua(l);){const u=Ir(l),f=yg(l);!f&&u.position==="fixed"&&(i=null),(a?!f&&!i:!f&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Kl(l)&&!f&&Xk(e,l))?r=r.filter(m=>m!==l):i=u,l=ui(l)}return t.set(e,r),r}function F4(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Cd(t)?[]:z4(t,this._c):[].concat(n),r],u=fb(t,l[0],i);let f=u.top,p=u.right,m=u.bottom,d=u.left;for(let v=1;v<l.length;v++){const x=fb(t,l[v],i);f=cn(x.top,f),p=Rr(x.right,p),m=Rr(x.bottom,m),d=cn(x.left,d)}return{width:p-d,height:m-f,x:d,y:f}}function B4(e){const{width:t,height:n}=Yk(e);return{width:t,height:n}}function U4(e,t,n){const r=yo(t),i=Jr(t),a=n==="fixed",l=Yi(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Yr(0);function p(){f.x=_d(i)}if(r||!r&&!a)if((ga(t)!=="body"||Kl(i))&&(u=Ed(t)),r){const x=Yi(t,!0,a,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}else i&&p();a&&!r&&i&&p();const m=i&&!r&&!a?Jk(i,u):Yr(0),d=l.left+u.scrollLeft-f.x-m.x,v=l.top+u.scrollTop-f.y-m.y;return{x:d,y:v,width:l.width,height:l.height}}function Zp(e){return Ir(e).position==="static"}function pb(e,t){if(!yo(e)||Ir(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jr(e)===n&&(n=n.ownerDocument.body),n}function eS(e,t){const n=er(e);if(Cd(e))return n;if(!yo(e)){let i=ui(e);for(;i&&!ua(i);){if(Ar(i)&&!Zp(i))return i;i=ui(i)}return n}let r=pb(e,t);for(;r&&T4(r)&&Zp(r);)r=pb(r,t);return r&&ua(r)&&Zp(r)&&!yg(r)?n:r||R4(e)||n}const V4=async function(e){const t=this.getOffsetParent||eS,n=this.getDimensions,r=await n(e.floating);return{reference:U4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function H4(e){return Ir(e).direction==="rtl"}const W4={convertOffsetParentRelativeRectToViewportRelativeRect:I4,getDocumentElement:Jr,getClippingRect:F4,getOffsetParent:eS,getElementRects:V4,getClientRects:M4,getDimensions:B4,getScale:Us,isElement:Ar,isRTL:H4};function tS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function q4(e,t){let n=null,r;const i=Jr(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const p=e.getBoundingClientRect(),{left:m,top:d,width:v,height:x}=p;if(u||t(),!v||!x)return;const S=kc(d),k=kc(i.clientWidth-(m+v)),E=kc(i.clientHeight-(d+x)),C=kc(m),R={rootMargin:-S+"px "+-k+"px "+-E+"px "+-C+"px",threshold:cn(0,Rr(1,f))||1};let O=!0;function B(A){const z=A[0].intersectionRatio;if(z!==f){if(!O)return l();z?l(!1,z):r=setTimeout(()=>{l(!1,1e-7)},1e3)}z===1&&!tS(p,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(B,{...R,root:i.ownerDocument})}catch{n=new IntersectionObserver(B,R)}n.observe(e)}return l(!0),a}function K4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,p=xg(e),m=i||a?[...p?El(p):[],...t?El(t):[]]:[];m.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),a&&C.addEventListener("resize",n)});const d=p&&u?q4(p,n):null;let v=-1,x=null;l&&(x=new ResizeObserver(C=>{let[P]=C;P&&P.target===p&&x&&t&&(x.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var R;(R=x)==null||R.observe(t)})),n()}),p&&!f&&x.observe(p),t&&x.observe(t));let S,k=f?Yi(e):null;f&&E();function E(){const C=Yi(e);k&&!tS(k,C)&&n(),k=C,S=requestAnimationFrame(E)}return n(),()=>{var C;m.forEach(P=>{i&&P.removeEventListener("scroll",n),a&&P.removeEventListener("resize",n)}),d==null||d(),(C=x)==null||C.disconnect(),x=null,f&&cancelAnimationFrame(S)}}const G4=C4,uK=v4,Q4=E4,Y4=x4,Z4=N4,J4=w4,hb=g4,cK=k4,X4=_4,e5=(e,t,n)=>{const r=new Map,i={platform:W4,...n},a={...i.platform,_c:r};return m4(e,t,{...i,platform:a})};var t5=typeof document<"u",n5=function(){},Rc=t5?y.useLayoutEffect:n5;function qc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!qc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!qc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function nS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mb(e,t){const n=nS(e);return Math.round(t*n)/n}function Jp(e){const t=y.useRef(e);return Rc(()=>{t.current=e}),t}function r5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:f,open:p}=e,[m,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,x]=y.useState(r);qc(v,r)||x(r);const[S,k]=y.useState(null),[E,C]=y.useState(null),P=y.useCallback(Z=>{Z!==A.current&&(A.current=Z,k(Z))},[]),R=y.useCallback(Z=>{Z!==z.current&&(z.current=Z,C(Z))},[]),O=a||S,B=l||E,A=y.useRef(null),z=y.useRef(null),I=y.useRef(m),D=f!=null,j=Jp(f),H=Jp(i),ee=Jp(p),le=y.useCallback(()=>{if(!A.current||!z.current)return;const Z={placement:t,strategy:n,middleware:v};H.current&&(Z.platform=H.current),e5(A.current,z.current,Z).then(Q=>{const N={...Q,isPositioned:ee.current!==!1};oe.current&&!qc(I.current,N)&&(I.current=N,Fl.flushSync(()=>{d(N)}))})},[v,t,n,H,ee]);Rc(()=>{p===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(Z=>({...Z,isPositioned:!1})))},[p]);const oe=y.useRef(!1);Rc(()=>(oe.current=!0,()=>{oe.current=!1}),[]),Rc(()=>{if(O&&(A.current=O),B&&(z.current=B),O&&B){if(j.current)return j.current(O,B,le);le()}},[O,B,le,j,D]);const G=y.useMemo(()=>({reference:A,floating:z,setReference:P,setFloating:R}),[P,R]),X=y.useMemo(()=>({reference:O,floating:B}),[O,B]),ue=y.useMemo(()=>{const Z={position:n,left:0,top:0};if(!X.floating)return Z;const Q=mb(X.floating,m.x),N=mb(X.floating,m.y);return u?{...Z,transform:"translate("+Q+"px, "+N+"px)",...nS(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:N}},[n,u,X.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:le,refs:G,elements:X,floatingStyles:ue}),[m,le,G,X,ue])}const o5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?hb({element:r.current,padding:i}).fn(n):{}:r?hb({element:r,padding:i}).fn(n):{}}}},i5=(e,t)=>{const n=G4(e);return{name:n.name,fn:n.fn,options:[e,t]}},s5=(e,t)=>{const n=Q4(e);return{name:n.name,fn:n.fn,options:[e,t]}},a5=(e,t)=>({fn:X4(e).fn,options:[e,t]}),l5=(e,t)=>{const n=Y4(e);return{name:n.name,fn:n.fn,options:[e,t]}},u5=(e,t)=>{const n=Z4(e);return{name:n.name,fn:n.fn,options:[e,t]}},c5=(e,t)=>{const n=J4(e);return{name:n.name,fn:n.fn,options:[e,t]}},d5=(e,t)=>{const n=o5(e);return{name:n.name,fn:n.fn,options:[e,t]}};var f5="Arrow",rS=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return h.jsx(Fe.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});rS.displayName=f5;var p5=rS;function wg(e){const[t,n]=y.useState(void 0);return $t(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let l,u;if("borderBoxSize"in a){const f=a.borderBoxSize,p=Array.isArray(f)?f[0]:f;l=p.inlineSize,u=p.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var bg="Popper",[oS,Nd]=Mr(bg),[h5,iS]=oS(bg),sS=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return h.jsx(h5,{scope:t,anchor:r,onAnchorChange:i,children:n})};sS.displayName=bg;var aS="PopperAnchor",lS=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=iS(aS,n),l=y.useRef(null),u=nt(t,l),f=y.useRef(null);return y.useEffect(()=>{const p=f.current;f.current=(r==null?void 0:r.current)||l.current,p!==f.current&&a.onAnchorChange(f.current)}),r?null:h.jsx(Fe.div,{...i,ref:u})});lS.displayName=aS;var kg="PopperContent",[m5,g5]=oS(kg),uS=y.forwardRef((e,t)=>{var ae,te,re,we,Ee,pe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:d="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:S,...k}=e,E=iS(kg,n),[C,P]=y.useState(null),R=nt(t,qe=>P(qe)),[O,B]=y.useState(null),A=wg(O),z=(A==null?void 0:A.width)??0,I=(A==null?void 0:A.height)??0,D=r+(a!=="center"?"-"+a:""),j=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},H=Array.isArray(p)?p:[p],ee=H.length>0,le={padding:j,boundary:H.filter(v5),altBoundary:ee},{refs:oe,floatingStyles:G,placement:X,isPositioned:ue,middlewareData:Z}=r5({strategy:"fixed",placement:D,whileElementsMounted:(...qe)=>K4(...qe,{animationFrame:x==="always"}),elements:{reference:E.anchor},middleware:[i5({mainAxis:i+I,alignmentAxis:l}),f&&s5({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?a5():void 0,...le}),f&&l5({...le}),u5({...le,apply:({elements:qe,rects:ze,availableWidth:zt,availableHeight:Zt})=>{const{width:Ct,height:Bn}=ze.reference,dt=qe.floating.style;dt.setProperty("--radix-popper-available-width",`${zt}px`),dt.setProperty("--radix-popper-available-height",`${Zt}px`),dt.setProperty("--radix-popper-anchor-width",`${Ct}px`),dt.setProperty("--radix-popper-anchor-height",`${Bn}px`)}}),O&&d5({element:O,padding:u}),x5({arrowWidth:z,arrowHeight:I}),v&&c5({strategy:"referenceHidden",...le})]}),[Q,N]=fS(X),M=Yt(S);$t(()=>{ue&&(M==null||M())},[ue,M]);const $=(ae=Z.arrow)==null?void 0:ae.x,_=(te=Z.arrow)==null?void 0:te.y,ie=((re=Z.arrow)==null?void 0:re.centerOffset)!==0,[K,ce]=y.useState();return $t(()=>{C&&ce(window.getComputedStyle(C).zIndex)},[C]),h.jsx("div",{ref:oe.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:ue?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(we=Z.transformOrigin)==null?void 0:we.x,(Ee=Z.transformOrigin)==null?void 0:Ee.y].join(" "),...((pe=Z.hide)==null?void 0:pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(m5,{scope:n,placedSide:Q,onArrowChange:B,arrowX:$,arrowY:_,shouldHideArrow:ie,children:h.jsx(Fe.div,{"data-side":Q,"data-align":N,...k,ref:R,style:{...k.style,animation:ue?void 0:"none"}})})})});uS.displayName=kg;var cS="PopperArrow",y5={top:"bottom",right:"left",bottom:"top",left:"right"},dS=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=g5(cS,r),l=y5[a.placedSide];return h.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:h.jsx(p5,{...i,ref:n,style:{...i.style,display:"block"}})})});dS.displayName=cS;function v5(e){return e!==null}var x5=e=>({name:"transformOrigin",options:e,fn(t){var E,C,P;const{placement:n,rects:r,middlewareData:i}=t,l=((E=i.arrow)==null?void 0:E.centerOffset)!==0,u=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[p,m]=fS(n),d={start:"0%",center:"50%",end:"100%"}[m],v=(((C=i.arrow)==null?void 0:C.x)??0)+u/2,x=(((P=i.arrow)==null?void 0:P.y)??0)+f/2;let S="",k="";return p==="bottom"?(S=l?d:`${v}px`,k=`${-f}px`):p==="top"?(S=l?d:`${v}px`,k=`${r.floating.height+f}px`):p==="right"?(S=`${-f}px`,k=l?d:`${x}px`):p==="left"&&(S=`${r.floating.width+f}px`,k=l?d:`${x}px`),{data:{x:S,y:k}}}});function fS(e){const[t,n="center"]=e.split("-");return[t,n]}var pS=sS,hS=lS,mS=uS,gS=dS,Xp="rovingFocusGroup.onEntryFocus",w5={bubbles:!1,cancelable:!0},Gl="RovingFocusGroup",[im,yS,b5]=fg(Gl),[k5,Td]=Mr(Gl,[b5]),[S5,C5]=k5(Gl),vS=y.forwardRef((e,t)=>h.jsx(im.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(im.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(E5,{...e,ref:t})})}));vS.displayName=Gl;var E5=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...d}=e,v=y.useRef(null),x=nt(t,v),S=ql(a),[k,E]=oi({prop:l,defaultProp:u??null,onChange:f,caller:Gl}),[C,P]=y.useState(!1),R=Yt(p),O=yS(n),B=y.useRef(!1),[A,z]=y.useState(0);return y.useEffect(()=>{const I=v.current;if(I)return I.addEventListener(Xp,R),()=>I.removeEventListener(Xp,R)},[R]),h.jsx(S5,{scope:n,orientation:r,dir:S,loop:i,currentTabStopId:k,onItemFocus:y.useCallback(I=>E(I),[E]),onItemShiftTab:y.useCallback(()=>P(!0),[]),onFocusableItemAdd:y.useCallback(()=>z(I=>I+1),[]),onFocusableItemRemove:y.useCallback(()=>z(I=>I-1),[]),children:h.jsx(Fe.div,{tabIndex:C||A===0?-1:0,"data-orientation":r,...d,ref:x,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{B.current=!0}),onFocus:Ne(e.onFocus,I=>{const D=!B.current;if(I.target===I.currentTarget&&D&&!C){const j=new CustomEvent(Xp,w5);if(I.currentTarget.dispatchEvent(j),!j.defaultPrevented){const H=O().filter(X=>X.focusable),ee=H.find(X=>X.active),le=H.find(X=>X.id===k),G=[ee,le,...H].filter(Boolean).map(X=>X.ref.current);bS(G,m)}}B.current=!1}),onBlur:Ne(e.onBlur,()=>P(!1))})})}),xS="RovingFocusGroupItem",wS=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:l,...u}=e,f=fn(),p=a||f,m=C5(xS,n),d=m.currentTabStopId===p,v=yS(n),{onFocusableItemAdd:x,onFocusableItemRemove:S,currentTabStopId:k}=m;return y.useEffect(()=>{if(r)return x(),()=>S()},[r,x,S]),h.jsx(im.ItemSlot,{scope:n,id:p,focusable:r,active:i,children:h.jsx(Fe.span,{tabIndex:d?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:Ne(e.onMouseDown,E=>{r?m.onItemFocus(p):E.preventDefault()}),onFocus:Ne(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:Ne(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){m.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const C=T5(E,m.orientation,m.dir);if(C!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let R=v().filter(O=>O.focusable).map(O=>O.ref.current);if(C==="last")R.reverse();else if(C==="prev"||C==="next"){C==="prev"&&R.reverse();const O=R.indexOf(E.currentTarget);R=m.loop?P5(R,O+1):R.slice(O+1)}setTimeout(()=>bS(R))}}),children:typeof l=="function"?l({isCurrentTabStop:d,hasTabStop:k!=null}):l})})});wS.displayName=xS;var _5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function N5(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function T5(e,t,n){const r=N5(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _5[r]}function bS(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function P5(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kS=vS,SS=wS;function j5(e){const t=R5(e),n=y.forwardRef((r,i)=>{const{children:a,...l}=r,u=y.Children.toArray(a),f=u.find(A5);if(f){const p=f.props.children,m=u.map(d=>d===f?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:d);return h.jsx(t,{...l,ref:i,children:y.isValidElement(p)?y.cloneElement(p,void 0,m):null})}return h.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function R5(e){const t=y.forwardRef((n,r)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const l=M5(i),u=I5(a,i.props);return i.type!==y.Fragment&&(u.ref=r?Dn(r,l):l),y.cloneElement(i,u)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var O5=Symbol("radix.slottable");function A5(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===O5}function I5(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function M5(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sm=["Enter"," "],L5=["ArrowDown","PageUp","Home"],CS=["ArrowUp","PageDown","End"],D5=[...L5,...CS],$5={ltr:[...sm,"ArrowRight"],rtl:[...sm,"ArrowLeft"]},z5={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ql="Menu",[_l,F5,B5]=fg(Ql),[rs,ES]=Mr(Ql,[B5,Nd,Td]),Pd=Nd(),_S=Td(),[U5,os]=rs(Ql),[V5,Yl]=rs(Ql),NS=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:l=!0}=e,u=Pd(t),[f,p]=y.useState(null),m=y.useRef(!1),d=Yt(a),v=ql(i);return y.useEffect(()=>{const x=()=>{m.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>m.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),h.jsx(pS,{...u,children:h.jsx(U5,{scope:t,open:n,onOpenChange:d,content:f,onContentChange:p,children:h.jsx(V5,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:m,dir:v,modal:l,children:r})})})};NS.displayName=Ql;var H5="MenuAnchor",Sg=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Pd(n);return h.jsx(hS,{...i,...r,ref:t})});Sg.displayName=H5;var Cg="MenuPortal",[W5,TS]=rs(Cg,{forceMount:void 0}),PS=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=os(Cg,t);return h.jsx(W5,{scope:t,forceMount:n,children:h.jsx($n,{present:n||a.open,children:h.jsx(vd,{asChild:!0,container:i,children:r})})})};PS.displayName=Cg;var mr="MenuContent",[q5,Eg]=rs(mr),jS=y.forwardRef((e,t)=>{const n=TS(mr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=os(mr,e.__scopeMenu),l=Yl(mr,e.__scopeMenu);return h.jsx(_l.Provider,{scope:e.__scopeMenu,children:h.jsx($n,{present:r||a.open,children:h.jsx(_l.Slot,{scope:e.__scopeMenu,children:l.modal?h.jsx(K5,{...i,ref:t}):h.jsx(G5,{...i,ref:t})})})})}),K5=y.forwardRef((e,t)=>{const n=os(mr,e.__scopeMenu),r=y.useRef(null),i=nt(t,r);return y.useEffect(()=>{const a=r.current;if(a)return rg(a)},[]),h.jsx(_g,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ne(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),G5=y.forwardRef((e,t)=>{const n=os(mr,e.__scopeMenu);return h.jsx(_g,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Q5=j5("MenuContent.ScrollLock"),_g=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:d,onInteractOutside:v,onDismiss:x,disableOutsideScroll:S,...k}=e,E=os(mr,n),C=Yl(mr,n),P=Pd(n),R=_S(n),O=F5(n),[B,A]=y.useState(null),z=y.useRef(null),I=nt(t,z,E.onContentChange),D=y.useRef(0),j=y.useRef(""),H=y.useRef(0),ee=y.useRef(null),le=y.useRef("right"),oe=y.useRef(0),G=S?wd:y.Fragment,X=S?{as:Q5,allowPinchZoom:!0}:void 0,ue=Q=>{var ae,te;const N=j.current+Q,M=O().filter(re=>!re.disabled),$=document.activeElement,_=(ae=M.find(re=>re.ref.current===$))==null?void 0:ae.textValue,ie=M.map(re=>re.textValue),K=az(ie,N,_),ce=(te=M.find(re=>re.textValue===K))==null?void 0:te.ref.current;(function re(we){j.current=we,window.clearTimeout(D.current),we!==""&&(D.current=window.setTimeout(()=>re(""),1e3))})(N),ce&&setTimeout(()=>ce.focus())};y.useEffect(()=>()=>window.clearTimeout(D.current),[]),ng();const Z=y.useCallback(Q=>{var M,$;return le.current===((M=ee.current)==null?void 0:M.side)&&uz(Q,($=ee.current)==null?void 0:$.area)},[]);return h.jsx(q5,{scope:n,searchRef:j,onItemEnter:y.useCallback(Q=>{Z(Q)&&Q.preventDefault()},[Z]),onItemLeave:y.useCallback(Q=>{var N;Z(Q)||((N=z.current)==null||N.focus(),A(null))},[Z]),onTriggerLeave:y.useCallback(Q=>{Z(Q)&&Q.preventDefault()},[Z]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(Q=>{ee.current=Q},[]),children:h.jsx(G,{...X,children:h.jsx(yd,{asChild:!0,trapped:i,onMountAutoFocus:Ne(a,Q=>{var N;Q.preventDefault(),(N=z.current)==null||N.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:h.jsx(gd,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:d,onInteractOutside:v,onDismiss:x,children:h.jsx(kS,{asChild:!0,...R,dir:C.dir,orientation:"vertical",loop:r,currentTabStopId:B,onCurrentTabStopIdChange:A,onEntryFocus:Ne(f,Q=>{C.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(mS,{role:"menu","aria-orientation":"vertical","data-state":qS(E.open),"data-radix-menu-content":"",dir:C.dir,...P,...k,ref:I,style:{outline:"none",...k.style},onKeyDown:Ne(k.onKeyDown,Q=>{const M=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,$=Q.ctrlKey||Q.altKey||Q.metaKey,_=Q.key.length===1;M&&(Q.key==="Tab"&&Q.preventDefault(),!$&&_&&ue(Q.key));const ie=z.current;if(Q.target!==ie||!D5.includes(Q.key))return;Q.preventDefault();const ce=O().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);CS.includes(Q.key)&&ce.reverse(),iz(ce)}),onBlur:Ne(e.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(D.current),j.current="")}),onPointerMove:Ne(e.onPointerMove,Nl(Q=>{const N=Q.target,M=oe.current!==Q.clientX;if(Q.currentTarget.contains(N)&&M){const $=Q.clientX>oe.current?"right":"left";le.current=$,oe.current=Q.clientX}}))})})})})})})});jS.displayName=mr;var Y5="MenuGroup",Ng=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(Fe.div,{role:"group",...r,ref:t})});Ng.displayName=Y5;var Z5="MenuLabel",RS=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(Fe.div,{...r,ref:t})});RS.displayName=Z5;var Kc="MenuItem",gb="menu.itemSelect",jd=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=y.useRef(null),l=Yl(Kc,e.__scopeMenu),u=Eg(Kc,e.__scopeMenu),f=nt(t,a),p=y.useRef(!1),m=()=>{const d=a.current;if(!n&&d){const v=new CustomEvent(gb,{bubbles:!0,cancelable:!0});d.addEventListener(gb,x=>r==null?void 0:r(x),{once:!0}),ek(d,v),v.defaultPrevented?p.current=!1:l.onClose()}};return h.jsx(OS,{...i,ref:f,disabled:n,onClick:Ne(e.onClick,m),onPointerDown:d=>{var v;(v=e.onPointerDown)==null||v.call(e,d),p.current=!0},onPointerUp:Ne(e.onPointerUp,d=>{var v;p.current||(v=d.currentTarget)==null||v.click()}),onKeyDown:Ne(e.onKeyDown,d=>{const v=u.searchRef.current!=="";n||v&&d.key===" "||sm.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});jd.displayName=Kc;var OS=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,l=Eg(Kc,n),u=_S(n),f=y.useRef(null),p=nt(t,f),[m,d]=y.useState(!1),[v,x]=y.useState("");return y.useEffect(()=>{const S=f.current;S&&x((S.textContent??"").trim())},[a.children]),h.jsx(_l.ItemSlot,{scope:n,disabled:r,textValue:i??v,children:h.jsx(SS,{asChild:!0,...u,focusable:!r,children:h.jsx(Fe.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:p,onPointerMove:Ne(e.onPointerMove,Nl(S=>{r?l.onItemLeave(S):(l.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ne(e.onPointerLeave,Nl(S=>l.onItemLeave(S))),onFocus:Ne(e.onFocus,()=>d(!0)),onBlur:Ne(e.onBlur,()=>d(!1))})})})}),J5="MenuCheckboxItem",AS=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return h.jsx($S,{scope:e.__scopeMenu,checked:n,children:h.jsx(jd,{role:"menuitemcheckbox","aria-checked":Gc(n)?"mixed":n,...i,ref:t,"data-state":Pg(n),onSelect:Ne(i.onSelect,()=>r==null?void 0:r(Gc(n)?!0:!n),{checkForDefaultPrevented:!1})})})});AS.displayName=J5;var IS="MenuRadioGroup",[X5,ez]=rs(IS,{value:void 0,onValueChange:()=>{}}),MS=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Yt(r);return h.jsx(X5,{scope:e.__scopeMenu,value:n,onValueChange:a,children:h.jsx(Ng,{...i,ref:t})})});MS.displayName=IS;var LS="MenuRadioItem",DS=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=ez(LS,e.__scopeMenu),a=n===i.value;return h.jsx($S,{scope:e.__scopeMenu,checked:a,children:h.jsx(jd,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Pg(a),onSelect:Ne(r.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,n)},{checkForDefaultPrevented:!1})})})});DS.displayName=LS;var Tg="MenuItemIndicator",[$S,tz]=rs(Tg,{checked:!1}),zS=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=tz(Tg,n);return h.jsx($n,{present:r||Gc(a.checked)||a.checked===!0,children:h.jsx(Fe.span,{...i,ref:t,"data-state":Pg(a.checked)})})});zS.displayName=Tg;var nz="MenuSeparator",FS=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(Fe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});FS.displayName=nz;var rz="MenuArrow",BS=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Pd(n);return h.jsx(gS,{...i,...r,ref:t})});BS.displayName=rz;var oz="MenuSub",[dK,US]=rs(oz),fl="MenuSubTrigger",VS=y.forwardRef((e,t)=>{const n=os(fl,e.__scopeMenu),r=Yl(fl,e.__scopeMenu),i=US(fl,e.__scopeMenu),a=Eg(fl,e.__scopeMenu),l=y.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:f}=a,p={__scopeMenu:e.__scopeMenu},m=y.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return y.useEffect(()=>m,[m]),y.useEffect(()=>{const d=u.current;return()=>{window.clearTimeout(d),f(null)}},[u,f]),h.jsx(Sg,{asChild:!0,...p,children:h.jsx(OS,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":qS(n.open),...e,ref:Dn(t,i.onTriggerChange),onClick:d=>{var v;(v=e.onClick)==null||v.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ne(e.onPointerMove,Nl(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(a.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Ne(e.onPointerLeave,Nl(d=>{var x,S;m();const v=(x=n.content)==null?void 0:x.getBoundingClientRect();if(v){const k=(S=n.content)==null?void 0:S.dataset.side,E=k==="right",C=E?-5:5,P=v[E?"left":"right"],R=v[E?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+C,y:d.clientY},{x:P,y:v.top},{x:R,y:v.top},{x:R,y:v.bottom},{x:P,y:v.bottom}],side:k}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Ne(e.onKeyDown,d=>{var x;const v=a.searchRef.current!=="";e.disabled||v&&d.key===" "||$5[r.dir].includes(d.key)&&(n.onOpenChange(!0),(x=n.content)==null||x.focus(),d.preventDefault())})})})});VS.displayName=fl;var HS="MenuSubContent",WS=y.forwardRef((e,t)=>{const n=TS(mr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=os(mr,e.__scopeMenu),l=Yl(mr,e.__scopeMenu),u=US(HS,e.__scopeMenu),f=y.useRef(null),p=nt(t,f);return h.jsx(_l.Provider,{scope:e.__scopeMenu,children:h.jsx($n,{present:r||a.open,children:h.jsx(_l.Slot,{scope:e.__scopeMenu,children:h.jsx(_g,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:p,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var d;l.isUsingKeyboardRef.current&&((d=f.current)==null||d.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Ne(e.onFocusOutside,m=>{m.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ne(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:Ne(e.onKeyDown,m=>{var x;const d=m.currentTarget.contains(m.target),v=z5[l.dir].includes(m.key);d&&v&&(a.onOpenChange(!1),(x=u.trigger)==null||x.focus(),m.preventDefault())})})})})})});WS.displayName=HS;function qS(e){return e?"open":"closed"}function Gc(e){return e==="indeterminate"}function Pg(e){return Gc(e)?"indeterminate":e?"checked":"unchecked"}function iz(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function sz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function az(e,t,n){const i=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=sz(e,Math.max(a,0));i.length===1&&(l=l.filter(p=>p!==n));const f=l.find(p=>p.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function lz(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],f=t[l],p=u.x,m=u.y,d=f.x,v=f.y;m>r!=v>r&&n<(d-p)*(r-m)/(v-m)+p&&(i=!i)}return i}function uz(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lz(n,t)}function Nl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cz=NS,dz=Sg,fz=PS,pz=jS,hz=Ng,mz=RS,gz=jd,yz=AS,vz=MS,xz=DS,wz=zS,bz=FS,kz=BS,Sz=VS,Cz=WS,Rd="DropdownMenu",[Ez]=Mr(Rd,[ES]),Cn=ES(),[_z,KS]=Ez(Rd),GS=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:l,modal:u=!0}=e,f=Cn(t),p=y.useRef(null),[m,d]=oi({prop:i,defaultProp:a??!1,onChange:l,caller:Rd});return h.jsx(_z,{scope:t,triggerId:fn(),triggerRef:p,contentId:fn(),open:m,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(v=>!v),[d]),modal:u,children:h.jsx(cz,{...f,open:m,onOpenChange:d,dir:r,modal:u,children:n})})};GS.displayName=Rd;var QS="DropdownMenuTrigger",YS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=KS(QS,n),l=Cn(n);return h.jsx(dz,{asChild:!0,...l,children:h.jsx(Fe.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Dn(t,a.triggerRef),onPointerDown:Ne(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:Ne(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});YS.displayName=QS;var Nz="DropdownMenuPortal",ZS=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Cn(t);return h.jsx(fz,{...r,...n})};ZS.displayName=Nz;var JS="DropdownMenuContent",XS=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=KS(JS,n),a=Cn(n),l=y.useRef(!1);return h.jsx(pz,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Ne(e.onCloseAutoFocus,u=>{var f;l.current||(f=i.triggerRef.current)==null||f.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:Ne(e.onInteractOutside,u=>{const f=u.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,m=f.button===2||p;(!i.modal||m)&&(l.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)"}})});XS.displayName=JS;var Tz="DropdownMenuGroup",Pz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(hz,{...i,...r,ref:t})});Pz.displayName=Tz;var jz="DropdownMenuLabel",eC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(mz,{...i,...r,ref:t})});eC.displayName=jz;var Rz="DropdownMenuItem",tC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(gz,{...i,...r,ref:t})});tC.displayName=Rz;var Oz="DropdownMenuCheckboxItem",nC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(yz,{...i,...r,ref:t})});nC.displayName=Oz;var Az="DropdownMenuRadioGroup",Iz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(vz,{...i,...r,ref:t})});Iz.displayName=Az;var Mz="DropdownMenuRadioItem",rC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(xz,{...i,...r,ref:t})});rC.displayName=Mz;var Lz="DropdownMenuItemIndicator",oC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(wz,{...i,...r,ref:t})});oC.displayName=Lz;var Dz="DropdownMenuSeparator",iC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(bz,{...i,...r,ref:t})});iC.displayName=Dz;var $z="DropdownMenuArrow",zz=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(kz,{...i,...r,ref:t})});zz.displayName=$z;var Fz="DropdownMenuSubTrigger",sC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(Sz,{...i,...r,ref:t})});sC.displayName=Fz;var Bz="DropdownMenuSubContent",aC=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Cn(n);return h.jsx(Cz,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aC.displayName=Bz;var Uz=GS,Vz=YS,Hz=ZS,lC=XS,uC=eC,cC=tC,dC=nC,fC=rC,pC=oC,hC=iC,mC=sC,gC=aC;const Wz=Uz,qz=Vz,Kz=y.forwardRef(({className:e,inset:t,children:n,...r},i)=>h.jsxs(mC,{ref:i,className:Te("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),...r,children:[n,h.jsx(Bl,{className:"ml-auto h-4 w-4"})]}));Kz.displayName=mC.displayName;const Gz=y.forwardRef(({className:e,...t},n)=>h.jsx(gC,{ref:n,className:Te("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}));Gz.displayName=gC.displayName;const yC=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(Hz,{children:h.jsx(lC,{ref:r,sideOffset:t,className:Te("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),...n})}));yC.displayName=lC.displayName;const Oc=y.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(cC,{ref:r,className:Te("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),...n}));Oc.displayName=cC.displayName;const Qz=y.forwardRef(({className:e,children:t,checked:n,...r},i)=>h.jsxs(dC,{ref:i,className:Te("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:n,...r,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(pC,{children:h.jsx(pa,{className:"h-4 w-4"})})}),t]}));Qz.displayName=dC.displayName;const Yz=y.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(fC,{ref:r,className:Te("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),...n,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(pC,{children:h.jsx(yP,{className:"h-2 w-2 fill-current"})})}),t]}));Yz.displayName=fC.displayName;const Zz=y.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(uC,{ref:r,className:Te("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Zz.displayName=uC.displayName;const am=y.forwardRef(({className:e,...t},n)=>h.jsx(hC,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));am.displayName=hC.displayName;var Jz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xz=Jz.reduce((e,t)=>{const n=ug(`Primitive.${t}`),r=y.forwardRef((i,a)=>{const{asChild:l,...u}=i,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(f,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),e3="Label",vC=y.forwardRef((e,t)=>h.jsx(Xz.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vC.displayName=e3;var xC=vC;const t3=md("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ca=y.forwardRef(({className:e,...t},n)=>h.jsx(xC,{ref:n,className:Te(t3(),e),...t}));ca.displayName=xC.displayName;function lm(e,[t,n]){return Math.min(n,Math.max(t,e))}function n3(e){const t=r3(e),n=y.forwardRef((r,i)=>{const{children:a,...l}=r,u=y.Children.toArray(a),f=u.find(i3);if(f){const p=f.props.children,m=u.map(d=>d===f?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:d);return h.jsx(t,{...l,ref:i,children:y.isValidElement(p)?y.cloneElement(p,void 0,m):null})}return h.jsx(t,{...l,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function r3(e){const t=y.forwardRef((n,r)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const l=a3(i),u=s3(a,i.props);return i.type!==y.Fragment&&(u.ref=r?Dn(r,l):l),y.cloneElement(i,u)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var o3=Symbol("radix.slottable");function i3(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===o3}function s3(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function a3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function jg(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])}var wC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),l3="VisuallyHidden",bC=y.forwardRef((e,t)=>h.jsx(Fe.span,{...e,ref:t,style:{...wC,...e.style}}));bC.displayName=l3;var fK=bC,u3=[" ","Enter","ArrowUp","ArrowDown"],c3=[" ","Enter"],Zi="Select",[Od,Ad,d3]=fg(Zi),[ya]=Mr(Zi,[d3,Nd]),Id=Nd(),[f3,fi]=ya(Zi),[p3,h3]=ya(Zi),kC=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:l,defaultValue:u,onValueChange:f,dir:p,name:m,autoComplete:d,disabled:v,required:x,form:S}=e,k=Id(t),[E,C]=y.useState(null),[P,R]=y.useState(null),[O,B]=y.useState(!1),A=ql(p),[z,I]=oi({prop:r,defaultProp:i??!1,onChange:a,caller:Zi}),[D,j]=oi({prop:l,defaultProp:u,onChange:f,caller:Zi}),H=y.useRef(null),ee=E?S||!!E.closest("form"):!0,[le,oe]=y.useState(new Set),G=Array.from(le).map(X=>X.props.value).join(";");return h.jsx(pS,{...k,children:h.jsxs(f3,{required:x,scope:t,trigger:E,onTriggerChange:C,valueNode:P,onValueNodeChange:R,valueNodeHasChildren:O,onValueNodeHasChildrenChange:B,contentId:fn(),value:D,onValueChange:j,open:z,onOpenChange:I,dir:A,triggerPointerDownPosRef:H,disabled:v,children:[h.jsx(Od.Provider,{scope:t,children:h.jsx(p3,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(X=>{oe(ue=>new Set(ue).add(X))},[]),onNativeOptionRemove:y.useCallback(X=>{oe(ue=>{const Z=new Set(ue);return Z.delete(X),Z})},[]),children:n})}),ee?h.jsxs(qC,{"aria-hidden":!0,required:x,tabIndex:-1,name:m,autoComplete:d,value:D,onChange:X=>j(X.target.value),disabled:v,form:S,children:[D===void 0?h.jsx("option",{value:""}):null,Array.from(le)]},G):null]})})};kC.displayName=Zi;var SC="SelectTrigger",CC=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=Id(n),l=fi(SC,n),u=l.disabled||r,f=nt(t,l.onTriggerChange),p=Ad(n),m=y.useRef("touch"),[d,v,x]=GC(k=>{const E=p().filter(R=>!R.disabled),C=E.find(R=>R.value===l.value),P=QC(E,k,C);P!==void 0&&l.onValueChange(P.value)}),S=k=>{u||(l.onOpenChange(!0),x()),k&&(l.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return h.jsx(hS,{asChild:!0,...a,children:h.jsx(Fe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":KC(l.value)?"":void 0,...i,ref:f,onClick:Ne(i.onClick,k=>{k.currentTarget.focus(),m.current!=="mouse"&&S(k)}),onPointerDown:Ne(i.onPointerDown,k=>{m.current=k.pointerType;const E=k.target;E.hasPointerCapture(k.pointerId)&&E.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(S(k),k.preventDefault())}),onKeyDown:Ne(i.onKeyDown,k=>{const E=d.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&v(k.key),!(E&&k.key===" ")&&u3.includes(k.key)&&(S(),k.preventDefault())})})})});CC.displayName=SC;var EC="SelectValue",_C=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:l="",...u}=e,f=fi(EC,n),{onValueNodeHasChildrenChange:p}=f,m=a!==void 0,d=nt(t,f.onValueNodeChange);return $t(()=>{p(m)},[p,m]),h.jsx(Fe.span,{...u,ref:d,style:{pointerEvents:"none"},children:KC(f.value)?h.jsx(h.Fragment,{children:l}):a})});_C.displayName=EC;var m3="SelectIcon",NC=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return h.jsx(Fe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});NC.displayName=m3;var g3="SelectPortal",TC=e=>h.jsx(vd,{asChild:!0,...e});TC.displayName=g3;var Ji="SelectContent",PC=y.forwardRef((e,t)=>{const n=fi(Ji,e.__scopeSelect),[r,i]=y.useState();if($t(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Fl.createPortal(h.jsx(jC,{scope:e.__scopeSelect,children:h.jsx(Od.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),a):null}return h.jsx(RC,{...e,ref:t})});PC.displayName=Ji;var Er=10,[jC,pi]=ya(Ji),y3="SelectContentImpl",v3=n3("SelectContent.RemoveScroll"),RC=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:l,side:u,sideOffset:f,align:p,alignOffset:m,arrowPadding:d,collisionBoundary:v,collisionPadding:x,sticky:S,hideWhenDetached:k,avoidCollisions:E,...C}=e,P=fi(Ji,n),[R,O]=y.useState(null),[B,A]=y.useState(null),z=nt(t,ae=>O(ae)),[I,D]=y.useState(null),[j,H]=y.useState(null),ee=Ad(n),[le,oe]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(R)return rg(R)},[R]),ng();const X=y.useCallback(ae=>{const[te,...re]=ee().map(pe=>pe.ref.current),[we]=re.slice(-1),Ee=document.activeElement;for(const pe of ae)if(pe===Ee||(pe==null||pe.scrollIntoView({block:"nearest"}),pe===te&&B&&(B.scrollTop=0),pe===we&&B&&(B.scrollTop=B.scrollHeight),pe==null||pe.focus(),document.activeElement!==Ee))return},[ee,B]),ue=y.useCallback(()=>X([I,R]),[X,I,R]);y.useEffect(()=>{le&&ue()},[le,ue]);const{onOpenChange:Z,triggerPointerDownPosRef:Q}=P;y.useEffect(()=>{if(R){let ae={x:0,y:0};const te=we=>{var Ee,pe;ae={x:Math.abs(Math.round(we.pageX)-(((Ee=Q.current)==null?void 0:Ee.x)??0)),y:Math.abs(Math.round(we.pageY)-(((pe=Q.current)==null?void 0:pe.y)??0))}},re=we=>{ae.x<=10&&ae.y<=10?we.preventDefault():R.contains(we.target)||Z(!1),document.removeEventListener("pointermove",te),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",te),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",re,{capture:!0})}}},[R,Z,Q]),y.useEffect(()=>{const ae=()=>Z(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[Z]);const[N,M]=GC(ae=>{const te=ee().filter(Ee=>!Ee.disabled),re=te.find(Ee=>Ee.ref.current===document.activeElement),we=QC(te,ae,re);we&&setTimeout(()=>we.ref.current.focus())}),$=y.useCallback((ae,te,re)=>{const we=!G.current&&!re;(P.value!==void 0&&P.value===te||we)&&(D(ae),we&&(G.current=!0))},[P.value]),_=y.useCallback(()=>R==null?void 0:R.focus(),[R]),ie=y.useCallback((ae,te,re)=>{const we=!G.current&&!re;(P.value!==void 0&&P.value===te||we)&&H(ae)},[P.value]),K=r==="popper"?um:OC,ce=K===um?{side:u,sideOffset:f,align:p,alignOffset:m,arrowPadding:d,collisionBoundary:v,collisionPadding:x,sticky:S,hideWhenDetached:k,avoidCollisions:E}:{};return h.jsx(jC,{scope:n,content:R,viewport:B,onViewportChange:A,itemRefCallback:$,selectedItem:I,onItemLeave:_,itemTextRefCallback:ie,focusSelectedItem:ue,selectedItemText:j,position:r,isPositioned:le,searchRef:N,children:h.jsx(wd,{as:v3,allowPinchZoom:!0,children:h.jsx(yd,{asChild:!0,trapped:P.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Ne(i,ae=>{var te;(te=P.trigger)==null||te.focus({preventScroll:!0}),ae.preventDefault()}),children:h.jsx(gd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:h.jsx(K,{role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:ae=>ae.preventDefault(),...C,...ce,onPlaced:()=>oe(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:Ne(C.onKeyDown,ae=>{const te=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!te&&ae.key.length===1&&M(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let we=ee().filter(Ee=>!Ee.disabled).map(Ee=>Ee.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const Ee=ae.target,pe=we.indexOf(Ee);we=we.slice(pe+1)}setTimeout(()=>X(we)),ae.preventDefault()}})})})})})})});RC.displayName=y3;var x3="SelectItemAlignedPosition",OC=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=fi(Ji,n),l=pi(Ji,n),[u,f]=y.useState(null),[p,m]=y.useState(null),d=nt(t,z=>m(z)),v=Ad(n),x=y.useRef(!1),S=y.useRef(!0),{viewport:k,selectedItem:E,selectedItemText:C,focusSelectedItem:P}=l,R=y.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&p&&k&&E&&C){const z=a.trigger.getBoundingClientRect(),I=p.getBoundingClientRect(),D=a.valueNode.getBoundingClientRect(),j=C.getBoundingClientRect();if(a.dir!=="rtl"){const Ee=j.left-I.left,pe=D.left-Ee,qe=z.left-pe,ze=z.width+qe,zt=Math.max(ze,I.width),Zt=window.innerWidth-Er,Ct=lm(pe,[Er,Math.max(Er,Zt-zt)]);u.style.minWidth=ze+"px",u.style.left=Ct+"px"}else{const Ee=I.right-j.right,pe=window.innerWidth-D.right-Ee,qe=window.innerWidth-z.right-pe,ze=z.width+qe,zt=Math.max(ze,I.width),Zt=window.innerWidth-Er,Ct=lm(pe,[Er,Math.max(Er,Zt-zt)]);u.style.minWidth=ze+"px",u.style.right=Ct+"px"}const H=v(),ee=window.innerHeight-Er*2,le=k.scrollHeight,oe=window.getComputedStyle(p),G=parseInt(oe.borderTopWidth,10),X=parseInt(oe.paddingTop,10),ue=parseInt(oe.borderBottomWidth,10),Z=parseInt(oe.paddingBottom,10),Q=G+X+le+Z+ue,N=Math.min(E.offsetHeight*5,Q),M=window.getComputedStyle(k),$=parseInt(M.paddingTop,10),_=parseInt(M.paddingBottom,10),ie=z.top+z.height/2-Er,K=ee-ie,ce=E.offsetHeight/2,ae=E.offsetTop+ce,te=G+X+ae,re=Q-te;if(te<=ie){const Ee=H.length>0&&E===H[H.length-1].ref.current;u.style.bottom="0px";const pe=p.clientHeight-k.offsetTop-k.offsetHeight,qe=Math.max(K,ce+(Ee?_:0)+pe+ue),ze=te+qe;u.style.height=ze+"px"}else{const Ee=H.length>0&&E===H[0].ref.current;u.style.top="0px";const qe=Math.max(ie,G+k.offsetTop+(Ee?$:0)+ce)+re;u.style.height=qe+"px",k.scrollTop=te-ie+k.offsetTop}u.style.margin=`${Er}px 0`,u.style.minHeight=N+"px",u.style.maxHeight=ee+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[v,a.trigger,a.valueNode,u,p,k,E,C,a.dir,r]);$t(()=>R(),[R]);const[O,B]=y.useState();$t(()=>{p&&B(window.getComputedStyle(p).zIndex)},[p]);const A=y.useCallback(z=>{z&&S.current===!0&&(R(),P==null||P(),S.current=!1)},[R,P]);return h.jsx(b3,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:A,children:h.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:h.jsx(Fe.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});OC.displayName=x3;var w3="SelectPopperPosition",um=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Er,...a}=e,l=Id(n);return h.jsx(mS,{...l,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});um.displayName=w3;var[b3,Rg]=ya(Ji,{}),cm="SelectViewport",AC=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=pi(cm,n),l=Rg(cm,n),u=nt(t,a.onViewportChange),f=y.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(Od.Slot,{scope:n,children:h.jsx(Fe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ne(i.onScroll,p=>{const m=p.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:v}=l;if(v!=null&&v.current&&d){const x=Math.abs(f.current-m.scrollTop);if(x>0){const S=window.innerHeight-Er*2,k=parseFloat(d.style.minHeight),E=parseFloat(d.style.height),C=Math.max(k,E);if(C<S){const P=C+x,R=Math.min(S,P),O=P-R;d.style.height=R+"px",d.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,d.style.justifyContent="flex-end")}}}f.current=m.scrollTop})})})]})});AC.displayName=cm;var IC="SelectGroup",[k3,S3]=ya(IC),C3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=fn();return h.jsx(k3,{scope:n,id:i,children:h.jsx(Fe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});C3.displayName=IC;var MC="SelectLabel",LC=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=S3(MC,n);return h.jsx(Fe.div,{id:i.id,...r,ref:t})});LC.displayName=MC;var Qc="SelectItem",[E3,DC]=ya(Qc),$C=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...l}=e,u=fi(Qc,n),f=pi(Qc,n),p=u.value===r,[m,d]=y.useState(a??""),[v,x]=y.useState(!1),S=nt(t,P=>{var R;return(R=f.itemRefCallback)==null?void 0:R.call(f,P,r,i)}),k=fn(),E=y.useRef("touch"),C=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(E3,{scope:n,value:r,disabled:i,textId:k,isSelected:p,onItemTextChange:y.useCallback(P=>{d(R=>R||((P==null?void 0:P.textContent)??"").trim())},[]),children:h.jsx(Od.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:h.jsx(Fe.div,{role:"option","aria-labelledby":k,"data-highlighted":v?"":void 0,"aria-selected":p&&v,"data-state":p?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:S,onFocus:Ne(l.onFocus,()=>x(!0)),onBlur:Ne(l.onBlur,()=>x(!1)),onClick:Ne(l.onClick,()=>{E.current!=="mouse"&&C()}),onPointerUp:Ne(l.onPointerUp,()=>{E.current==="mouse"&&C()}),onPointerDown:Ne(l.onPointerDown,P=>{E.current=P.pointerType}),onPointerMove:Ne(l.onPointerMove,P=>{var R;E.current=P.pointerType,i?(R=f.onItemLeave)==null||R.call(f):E.current==="mouse"&&P.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(l.onPointerLeave,P=>{var R;P.currentTarget===document.activeElement&&((R=f.onItemLeave)==null||R.call(f))}),onKeyDown:Ne(l.onKeyDown,P=>{var O;((O=f.searchRef)==null?void 0:O.current)!==""&&P.key===" "||(c3.includes(P.key)&&C(),P.key===" "&&P.preventDefault())})})})})});$C.displayName=Qc;var pl="SelectItemText",zC=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,l=fi(pl,n),u=pi(pl,n),f=DC(pl,n),p=h3(pl,n),[m,d]=y.useState(null),v=nt(t,C=>d(C),f.onItemTextChange,C=>{var P;return(P=u.itemTextRefCallback)==null?void 0:P.call(u,C,f.value,f.disabled)}),x=m==null?void 0:m.textContent,S=y.useMemo(()=>h.jsx("option",{value:f.value,disabled:f.disabled,children:x},f.value),[f.disabled,f.value,x]),{onNativeOptionAdd:k,onNativeOptionRemove:E}=p;return $t(()=>(k(S),()=>E(S)),[k,E,S]),h.jsxs(h.Fragment,{children:[h.jsx(Fe.span,{id:f.textId,...a,ref:v}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Fl.createPortal(a.children,l.valueNode):null]})});zC.displayName=pl;var FC="SelectItemIndicator",BC=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return DC(FC,n).isSelected?h.jsx(Fe.span,{"aria-hidden":!0,...r,ref:t}):null});BC.displayName=FC;var dm="SelectScrollUpButton",UC=y.forwardRef((e,t)=>{const n=pi(dm,e.__scopeSelect),r=Rg(dm,e.__scopeSelect),[i,a]=y.useState(!1),l=nt(t,r.onScrollButtonChange);return $t(()=>{if(n.viewport&&n.isPositioned){let u=function(){const p=f.scrollTop>0;a(p)};const f=n.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?h.jsx(HC,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});UC.displayName=dm;var fm="SelectScrollDownButton",VC=y.forwardRef((e,t)=>{const n=pi(fm,e.__scopeSelect),r=Rg(fm,e.__scopeSelect),[i,a]=y.useState(!1),l=nt(t,r.onScrollButtonChange);return $t(()=>{if(n.viewport&&n.isPositioned){let u=function(){const p=f.scrollHeight-f.clientHeight,m=Math.ceil(f.scrollTop)<p;a(m)};const f=n.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?h.jsx(HC,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});VC.displayName=fm;var HC=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=pi("SelectScrollButton",n),l=y.useRef(null),u=Ad(n),f=y.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return y.useEffect(()=>()=>f(),[f]),$t(()=>{var m;const p=u().find(d=>d.ref.current===document.activeElement);(m=p==null?void 0:p.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),h.jsx(Fe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ne(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ne(i.onPointerMove,()=>{var p;(p=a.onItemLeave)==null||p.call(a),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ne(i.onPointerLeave,()=>{f()})})}),_3="SelectSeparator",WC=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(Fe.div,{"aria-hidden":!0,...r,ref:t})});WC.displayName=_3;var pm="SelectArrow",N3=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Id(n),a=fi(pm,n),l=pi(pm,n);return a.open&&l.position==="popper"?h.jsx(gS,{...i,...r,ref:t}):null});N3.displayName=pm;var T3="SelectBubbleInput",qC=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=y.useRef(null),a=nt(r,i),l=jg(t);return y.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==t&&m){const d=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(d)}},[l,t]),h.jsx(Fe.select,{...n,style:{...wC,...n.style},ref:a,defaultValue:t})});qC.displayName=T3;function KC(e){return e===""||e===void 0}function GC(e){const t=Yt(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(l=>{const u=n.current+l;t(u),(function f(p){n.current=p,window.clearTimeout(r.current),p!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(u)},[t]),a=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function QC(e,t,n){const i=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=P3(e,Math.max(a,0));i.length===1&&(l=l.filter(p=>p!==n));const f=l.find(p=>p.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function P3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var j3=kC,YC=CC,R3=_C,O3=NC,A3=TC,ZC=PC,I3=AC,JC=LC,XC=$C,M3=zC,L3=BC,eE=UC,tE=VC,nE=WC;const pK=j3,hK=R3,D3=y.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(YC,{ref:r,className:Te("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,h.jsx(O3,{asChild:!0,children:h.jsx(ri,{className:"h-4 w-4 opacity-50"})})]}));D3.displayName=YC.displayName;const rE=y.forwardRef(({className:e,...t},n)=>h.jsx(eE,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(hP,{className:"h-4 w-4"})}));rE.displayName=eE.displayName;const oE=y.forwardRef(({className:e,...t},n)=>h.jsx(tE,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:h.jsx(ri,{className:"h-4 w-4"})}));oE.displayName=tE.displayName;const $3=y.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>h.jsx(A3,{children:h.jsxs(ZC,{ref:i,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[h.jsx(rE,{}),h.jsx(I3,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),h.jsx(oE,{})]})}));$3.displayName=ZC.displayName;const z3=y.forwardRef(({className:e,...t},n)=>h.jsx(JC,{ref:n,className:Te("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));z3.displayName=JC.displayName;const F3=y.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(XC,{ref:r,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(L3,{children:h.jsx(pa,{className:"h-4 w-4"})})}),h.jsx(M3,{children:t})]}));F3.displayName=XC.displayName;const B3=y.forwardRef(({className:e,...t},n)=>h.jsx(nE,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));B3.displayName=nE.displayName;const U3=md("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"}}),Yc=y.forwardRef(({className:e,variant:t,...n},r)=>h.jsx("div",{ref:r,role:"alert",className:Te(U3({variant:t}),e),...n}));Yc.displayName="Alert";const V3=y.forwardRef(({className:e,...t},n)=>h.jsx("h5",{ref:n,className:Te("mb-1 font-medium leading-none tracking-tight",e),...t}));V3.displayName="AlertTitle";const Zc=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Te("text-sm [&_p]:leading-relaxed",e),...t}));Zc.displayName="AlertDescription";var yb=1,H3=.9,W3=.8,q3=.17,eh=.1,th=.999,K3=.9999,G3=.99,Q3=/[\\\/_+.#"@\[\(\{&]/,Y3=/[\\\/_+.#"@\[\(\{&]/g,Z3=/[\s-]/,iE=/[\s-]/g;function hm(e,t,n,r,i,a,l){if(a===t.length)return i===e.length?yb:G3;var u=`${i},${a}`;if(l[u]!==void 0)return l[u];for(var f=r.charAt(a),p=n.indexOf(f,i),m=0,d,v,x,S;p>=0;)d=hm(e,t,n,r,p+1,a+1,l),d>m&&(p===i?d*=yb:Q3.test(e.charAt(p-1))?(d*=W3,x=e.slice(i,p-1).match(Y3),x&&i>0&&(d*=Math.pow(th,x.length))):Z3.test(e.charAt(p-1))?(d*=H3,S=e.slice(i,p-1).match(iE),S&&i>0&&(d*=Math.pow(th,S.length))):(d*=q3,i>0&&(d*=Math.pow(th,p-i))),e.charAt(p)!==t.charAt(a)&&(d*=K3)),(d<eh&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&(v=hm(e,t,n,r,p+1,a+2,l),v*eh>d&&(d=v*eh)),d>m&&(m=d),p=n.indexOf(f,p+1);return l[u]=m,m}function vb(e){return e.toLowerCase().replace(iE," ")}function J3(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,hm(e,t,vb(e),vb(t),0,0,{})}var rl='[cmdk-group=""]',nh='[cmdk-group-items=""]',X3='[cmdk-group-heading=""]',sE='[cmdk-item=""]',xb=`${sE}:not([aria-disabled="true"])`,mm="cmdk-item-select",Is="data-value",eF=(e,t,n)=>J3(e,t,n),aE=y.createContext(void 0),Zl=()=>y.useContext(aE),lE=y.createContext(void 0),Og=()=>y.useContext(lE),uE=y.createContext(void 0),cE=y.forwardRef((e,t)=>{let n=Ms(()=>{var $,_;return{search:"",value:(_=($=e.value)!=null?$:e.defaultValue)!=null?_:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Ms(()=>new Set),i=Ms(()=>new Map),a=Ms(()=>new Map),l=Ms(()=>new Set),u=dE(e),{label:f,children:p,value:m,onValueChange:d,filter:v,shouldFilter:x,loop:S,disablePointerSelection:k=!1,vimBindings:E=!0,...C}=e,P=fn(),R=fn(),O=fn(),B=y.useRef(null),A=dF();Xi(()=>{if(m!==void 0){let $=m.trim();n.current.value=$,z.emit()}},[m]),Xi(()=>{A(6,le)},[]);let z=y.useMemo(()=>({subscribe:$=>(l.current.add($),()=>l.current.delete($)),snapshot:()=>n.current,setState:($,_,ie)=>{var K,ce,ae,te;if(!Object.is(n.current[$],_)){if(n.current[$]=_,$==="search")ee(),j(),A(1,H);else if($==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let re=document.getElementById(O);re?re.focus():(K=document.getElementById(P))==null||K.focus()}if(A(7,()=>{var re;n.current.selectedItemId=(re=oe())==null?void 0:re.id,z.emit()}),ie||A(5,le),((ce=u.current)==null?void 0:ce.value)!==void 0){let re=_??"";(te=(ae=u.current).onValueChange)==null||te.call(ae,re);return}}z.emit()}},emit:()=>{l.current.forEach($=>$())}}),[]),I=y.useMemo(()=>({value:($,_,ie)=>{var K;_!==((K=a.current.get($))==null?void 0:K.value)&&(a.current.set($,{value:_,keywords:ie}),n.current.filtered.items.set($,D(_,ie)),A(2,()=>{j(),z.emit()}))},item:($,_)=>(r.current.add($),_&&(i.current.has(_)?i.current.get(_).add($):i.current.set(_,new Set([$]))),A(3,()=>{ee(),j(),n.current.value||H(),z.emit()}),()=>{a.current.delete($),r.current.delete($),n.current.filtered.items.delete($);let ie=oe();A(4,()=>{ee(),(ie==null?void 0:ie.getAttribute("id"))===$&&H(),z.emit()})}),group:$=>(i.current.has($)||i.current.set($,new Set),()=>{a.current.delete($),i.current.delete($)}),filter:()=>u.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:P,inputId:O,labelId:R,listInnerRef:B}),[]);function D($,_){var ie,K;let ce=(K=(ie=u.current)==null?void 0:ie.filter)!=null?K:eF;return $?ce($,n.current.search,_):0}function j(){if(!n.current.search||u.current.shouldFilter===!1)return;let $=n.current.filtered.items,_=[];n.current.filtered.groups.forEach(K=>{let ce=i.current.get(K),ae=0;ce.forEach(te=>{let re=$.get(te);ae=Math.max(re,ae)}),_.push([K,ae])});let ie=B.current;G().sort((K,ce)=>{var ae,te;let re=K.getAttribute("id"),we=ce.getAttribute("id");return((ae=$.get(we))!=null?ae:0)-((te=$.get(re))!=null?te:0)}).forEach(K=>{let ce=K.closest(nh);ce?ce.appendChild(K.parentElement===ce?K:K.closest(`${nh} > *`)):ie.appendChild(K.parentElement===ie?K:K.closest(`${nh} > *`))}),_.sort((K,ce)=>ce[1]-K[1]).forEach(K=>{var ce;let ae=(ce=B.current)==null?void 0:ce.querySelector(`${rl}[${Is}="${encodeURIComponent(K[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function H(){let $=G().find(ie=>ie.getAttribute("aria-disabled")!=="true"),_=$==null?void 0:$.getAttribute(Is);z.setState("value",_||void 0)}function ee(){var $,_,ie,K;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ce=0;for(let ae of r.current){let te=(_=($=a.current.get(ae))==null?void 0:$.value)!=null?_:"",re=(K=(ie=a.current.get(ae))==null?void 0:ie.keywords)!=null?K:[],we=D(te,re);n.current.filtered.items.set(ae,we),we>0&&ce++}for(let[ae,te]of i.current)for(let re of te)if(n.current.filtered.items.get(re)>0){n.current.filtered.groups.add(ae);break}n.current.filtered.count=ce}function le(){var $,_,ie;let K=oe();K&&((($=K.parentElement)==null?void 0:$.firstChild)===K&&((ie=(_=K.closest(rl))==null?void 0:_.querySelector(X3))==null||ie.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function oe(){var $;return($=B.current)==null?void 0:$.querySelector(`${sE}[aria-selected="true"]`)}function G(){var $;return Array.from((($=B.current)==null?void 0:$.querySelectorAll(xb))||[])}function X($){let _=G()[$];_&&z.setState("value",_.getAttribute(Is))}function ue($){var _;let ie=oe(),K=G(),ce=K.findIndex(te=>te===ie),ae=K[ce+$];(_=u.current)!=null&&_.loop&&(ae=ce+$<0?K[K.length-1]:ce+$===K.length?K[0]:K[ce+$]),ae&&z.setState("value",ae.getAttribute(Is))}function Z($){let _=oe(),ie=_==null?void 0:_.closest(rl),K;for(;ie&&!K;)ie=$>0?uF(ie,rl):cF(ie,rl),K=ie==null?void 0:ie.querySelector(xb);K?z.setState("value",K.getAttribute(Is)):ue($)}let Q=()=>X(G().length-1),N=$=>{$.preventDefault(),$.metaKey?Q():$.altKey?Z(1):ue(1)},M=$=>{$.preventDefault(),$.metaKey?X(0):$.altKey?Z(-1):ue(-1)};return y.createElement(Fe.div,{ref:t,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:$=>{var _;(_=C.onKeyDown)==null||_.call(C,$);let ie=$.nativeEvent.isComposing||$.keyCode===229;if(!($.defaultPrevented||ie))switch($.key){case"n":case"j":{E&&$.ctrlKey&&N($);break}case"ArrowDown":{N($);break}case"p":case"k":{E&&$.ctrlKey&&M($);break}case"ArrowUp":{M($);break}case"Home":{$.preventDefault(),X(0);break}case"End":{$.preventDefault(),Q();break}case"Enter":{$.preventDefault();let K=oe();if(K){let ce=new Event(mm);K.dispatchEvent(ce)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:pF},f),Md(e,$=>y.createElement(lE.Provider,{value:z},y.createElement(aE.Provider,{value:I},$))))}),tF=y.forwardRef((e,t)=>{var n,r;let i=fn(),a=y.useRef(null),l=y.useContext(uE),u=Zl(),f=dE(e),p=(r=(n=f.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;Xi(()=>{if(!p)return u.item(i,l==null?void 0:l.id)},[p]);let m=fE(i,a,[e.value,e.children,a],e.keywords),d=Og(),v=ci(A=>A.value&&A.value===m.current),x=ci(A=>p||u.filter()===!1?!0:A.search?A.filtered.items.get(i)>0:!0);y.useEffect(()=>{let A=a.current;if(!(!A||e.disabled))return A.addEventListener(mm,S),()=>A.removeEventListener(mm,S)},[x,e.onSelect,e.disabled]);function S(){var A,z;k(),(z=(A=f.current).onSelect)==null||z.call(A,m.current)}function k(){d.setState("value",m.current,!0)}if(!x)return null;let{disabled:E,value:C,onSelect:P,forceMount:R,keywords:O,...B}=e;return y.createElement(Fe.div,{ref:Dn(a,t),...B,id:i,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!v,"data-disabled":!!E,"data-selected":!!v,onPointerMove:E||u.getDisablePointerSelection()?void 0:k,onClick:E?void 0:S},e.children)}),nF=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,l=fn(),u=y.useRef(null),f=y.useRef(null),p=fn(),m=Zl(),d=ci(x=>i||m.filter()===!1?!0:x.search?x.filtered.groups.has(l):!0);Xi(()=>m.group(l),[]),fE(l,u,[e.value,e.heading,f]);let v=y.useMemo(()=>({id:l,forceMount:i}),[i]);return y.createElement(Fe.div,{ref:Dn(u,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&y.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:p},n),Md(e,x=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?p:void 0},y.createElement(uE.Provider,{value:v},x))))}),rF=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),a=ci(l=>!l.search);return!n&&!a?null:y.createElement(Fe.div,{ref:Dn(i,t),...r,"cmdk-separator":"",role:"separator"})}),oF=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=Og(),l=ci(p=>p.search),u=ci(p=>p.selectedItemId),f=Zl();return y.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),y.createElement(Fe.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":u,id:f.inputId,type:"text",value:i?e.value:l,onChange:p=>{i||a.setState("search",p.target.value),n==null||n(p.target.value)}})}),iF=y.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=y.useRef(null),l=y.useRef(null),u=ci(p=>p.selectedItemId),f=Zl();return y.useEffect(()=>{if(l.current&&a.current){let p=l.current,m=a.current,d,v=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let x=p.offsetHeight;m.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return v.observe(p),()=>{cancelAnimationFrame(d),v.unobserve(p)}}},[]),y.createElement(Fe.div,{ref:Dn(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:f.listId},Md(e,p=>y.createElement("div",{ref:Dn(l,f.listInnerRef),"cmdk-list-sizer":""},p)))}),sF=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:l,...u}=e;return y.createElement(Tk,{open:n,onOpenChange:r},y.createElement(Pk,{container:l},y.createElement(ag,{"cmdk-overlay":"",className:i}),y.createElement(lg,{"aria-label":e.label,"cmdk-dialog":"",className:a},y.createElement(cE,{ref:t,...u}))))}),aF=y.forwardRef((e,t)=>ci(n=>n.filtered.count===0)?y.createElement(Fe.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),lF=y.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return y.createElement(Fe.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Md(e,l=>y.createElement("div",{"aria-hidden":!0},l)))}),zn=Object.assign(cE,{List:iF,Item:tF,Input:oF,Group:nF,Separator:rF,Dialog:sF,Empty:aF,Loading:lF});function uF(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function cF(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function dE(e){let t=y.useRef(e);return Xi(()=>{t.current=e}),t}var Xi=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Ms(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function ci(e){let t=Og(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function fE(e,t,n,r=[]){let i=y.useRef(),a=Zl();return Xi(()=>{var l;let u=(()=>{var p;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(p=m.current.textContent)==null?void 0:p.trim():i.current}})(),f=r.map(p=>p.trim());a.value(e,u,f),(l=t.current)==null||l.setAttribute(Is,u),i.current=u}),i}var dF=()=>{let[e,t]=y.useState(),n=Ms(()=>new Map);return Xi(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function fF(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Md({asChild:e,children:t},n){return e&&y.isValidElement(t)?y.cloneElement(fF(t),{ref:t.ref},n(t.props.children)):n(t)}var pF={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const hF=y.forwardRef(({className:e,...t},n)=>h.jsx(zn,{ref:n,className:Te("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));hF.displayName=zn.displayName;const mF=y.forwardRef(({className:e,...t},n)=>h.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[h.jsx(R$,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),h.jsx(zn.Input,{ref:n,className:Te("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));mF.displayName=zn.Input.displayName;const gF=y.forwardRef(({className:e,...t},n)=>h.jsx(zn.List,{ref:n,className:Te("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));gF.displayName=zn.List.displayName;const yF=y.forwardRef((e,t)=>h.jsx(zn.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));yF.displayName=zn.Empty.displayName;const vF=y.forwardRef(({className:e,...t},n)=>h.jsx(zn.Group,{ref:n,className:Te("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));vF.displayName=zn.Group.displayName;const xF=y.forwardRef(({className:e,...t},n)=>h.jsx(zn.Separator,{ref:n,className:Te("-mx-1 h-px bg-border",e),...t}));xF.displayName=zn.Separator.displayName;const wF=y.forwardRef(({className:e,...t},n)=>h.jsx(zn.Item,{ref:n,className:Te("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t}));wF.displayName=zn.Item.displayName;const Jc=y.forwardRef(({className:e,type:t,...n},r)=>h.jsx("input",{type:t,className:Te("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:r,...n}));Jc.displayName="Input";const bF=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Te("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));bF.displayName="Card";const kF=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Te("flex flex-col space-y-1.5 p-6",e),...t}));kF.displayName="CardHeader";const SF=y.forwardRef(({className:e,...t},n)=>h.jsx("h3",{ref:n,className:Te("text-2xl font-semibold leading-none tracking-tight",e),...t}));SF.displayName="CardTitle";const CF=y.forwardRef(({className:e,...t},n)=>h.jsx("p",{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));CF.displayName="CardDescription";const EF=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Te("p-6 pt-0",e),...t}));EF.displayName="CardContent";const _F=y.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:Te("flex items-center p-6 pt-0",e),...t}));_F.displayName="CardFooter";var Ld="Checkbox",[NF]=Mr(Ld),[TF,Ag]=NF(Ld);function PF(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:l,name:u,onCheckedChange:f,required:p,value:m="on",internal_do_not_use_render:d}=e,[v,x]=oi({prop:n,defaultProp:i??!1,onChange:f,caller:Ld}),[S,k]=y.useState(null),[E,C]=y.useState(null),P=y.useRef(!1),R=S?!!l||!!S.closest("form"):!0,O={checked:v,disabled:a,setChecked:x,control:S,setControl:k,name:u,form:l,value:m,hasConsumerStoppedPropagationRef:P,required:p,defaultChecked:ni(i)?!1:i,isFormControl:R,bubbleInput:E,setBubbleInput:C};return h.jsx(TF,{scope:t,...O,children:jF(d)?d(O):r})}var pE="CheckboxTrigger",hE=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:a,value:l,disabled:u,checked:f,required:p,setControl:m,setChecked:d,hasConsumerStoppedPropagationRef:v,isFormControl:x,bubbleInput:S}=Ag(pE,e),k=nt(i,m),E=y.useRef(f);return y.useEffect(()=>{const C=a==null?void 0:a.form;if(C){const P=()=>d(E.current);return C.addEventListener("reset",P),()=>C.removeEventListener("reset",P)}},[a,d]),h.jsx(Fe.button,{type:"button",role:"checkbox","aria-checked":ni(f)?"mixed":f,"aria-required":p,"data-state":xE(f),"data-disabled":u?"":void 0,disabled:u,value:l,...r,ref:k,onKeyDown:Ne(t,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:Ne(n,C=>{d(P=>ni(P)?!0:!P),S&&x&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})})});hE.displayName=pE;var Ig=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:l,disabled:u,value:f,onCheckedChange:p,form:m,...d}=e;return h.jsx(PF,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:u,required:l,onCheckedChange:p,name:r,form:m,value:f,internal_do_not_use_render:({isFormControl:v})=>h.jsxs(h.Fragment,{children:[h.jsx(hE,{...d,ref:t,__scopeCheckbox:n}),v&&h.jsx(vE,{__scopeCheckbox:n})]})})});Ig.displayName=Ld;var mE="CheckboxIndicator",gE=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=Ag(mE,n);return h.jsx($n,{present:r||ni(a.checked)||a.checked===!0,children:h.jsx(Fe.span,{"data-state":xE(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});gE.displayName=mE;var yE="CheckboxBubbleInput",vE=y.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:l,required:u,disabled:f,name:p,value:m,form:d,bubbleInput:v,setBubbleInput:x}=Ag(yE,e),S=nt(n,x),k=jg(a),E=wg(r);y.useEffect(()=>{const P=v;if(!P)return;const R=window.HTMLInputElement.prototype,B=Object.getOwnPropertyDescriptor(R,"checked").set,A=!i.current;if(k!==a&&B){const z=new Event("click",{bubbles:A});P.indeterminate=ni(a),B.call(P,ni(a)?!1:a),P.dispatchEvent(z)}},[v,k,a,i]);const C=y.useRef(ni(a)?!1:a);return h.jsx(Fe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??C.current,required:u,disabled:f,name:p,value:m,form:d,...t,tabIndex:-1,ref:S,style:{...t.style,...E,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});vE.displayName=yE;function jF(e){return typeof e=="function"}function ni(e){return e==="indeterminate"}function xE(e){return ni(e)?"indeterminate":e?"checked":"unchecked"}const RF=y.forwardRef(({className:e,...t},n)=>h.jsx(Ig,{ref:n,className:Te("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:h.jsx(gE,{className:Te("flex items-center justify-center text-current"),children:h.jsx(pa,{className:"h-4 w-4"})})}));RF.displayName=Ig.displayName;function wE(e){if(!e)return null;const t=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(\.\d+)?$/.test(e)?`${e.replace(" ","T")}Z`:e,n=new Date(t);return isNaN(n.getTime())?null:n}function wb(e){var t;return((t=wE(e))==null?void 0:t.toLocaleString())??""}function mK(e){var a;const t=(a=wE(e))==null?void 0:a.getTime();if(t==null)return"";const n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"just now";const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}const bE=y.forwardRef(({className:e,...t},n)=>h.jsx("textarea",{className:Te("flex min-h-[82px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));bE.displayName="Textarea";function OF({open:e,onOpenChange:t,title:n,description:r,warning:i,label:a,optionalReason:l,placeholder:u,confirmLabel:f,destructive:p,priorDecline:m,secondaryLabel:d,onSecondary:v,onConfirm:x}){const[S,k]=y.useState(""),[E,C]=y.useState(null),P=E!==null,[R,O]=y.useState(null),B=D=>{P||(D||(k(""),O(null)),t(D))},A=async(D,j)=>{C(D),O(null);try{await j(S.trim()),k(""),t(!1)}catch(H){O((H==null?void 0:H.message)||"Something went wrong")}finally{C(null)}},z=()=>A("confirm",x),I=P||!!a&&!l&&!S.trim();return h.jsx(Qi,{open:e,onOpenChange:B,children:h.jsxs(ii,{className:"sm:max-w-[440px]",children:[h.jsxs(si,{children:[h.jsx(ai,{children:n}),r&&h.jsx(li,{children:r})]}),i&&h.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs font-medium text-amber-900",role:"alert","data-testid":"reason-dialog-warning",children:[h.jsx(Sj,{className:"h-4 w-4 shrink-0"}),i]}),m&&h.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 space-y-1","data-testid":"reason-dialog-prior-decline",children:[h.jsxs("p",{className:"font-medium",children:["Rejected",m.resolvedBy?` by ${m.resolvedBy}`:"",wb(m.resolvedAt)?` · ${wb(m.resolvedAt)}`:""]}),m.resolutionNote&&h.jsxs("p",{children:["“",m.resolutionNote,"”"]}),m.reason&&h.jsxs("p",{className:"text-amber-800/80",children:["Asked before: “",m.reason,"”"]})]}),a&&h.jsxs("div",{className:"space-y-2",children:[h.jsx(ca,{htmlFor:"reason-dialog-input",children:a}),h.jsx(bE,{id:"reason-dialog-input",autoFocus:!0,rows:3,value:S,placeholder:u,onChange:D=>k(D.target.value),"data-testid":"reason-dialog-input"})]}),R&&h.jsxs(Yc,{variant:"destructive",children:[h.jsx(zs,{className:"h-4 w-4"}),h.jsx(Zc,{children:R})]}),h.jsxs(kd,{children:[h.jsx(ut,{variant:"outline",onClick:()=>B(!1),disabled:P,children:"Cancel"}),d&&v&&h.jsxs(ut,{variant:"outline",onClick:()=>A("secondary",v),disabled:I,"data-testid":"reason-dialog-secondary",children:[E==="secondary"&&h.jsx(Nr,{className:"h-4 w-4 mr-2 animate-spin"}),d]}),h.jsxs(ut,{onClick:z,disabled:I,variant:p?"destructive":"default","data-testid":"reason-dialog-confirm",children:[E==="confirm"&&h.jsx(Nr,{className:"h-4 w-4 mr-2 animate-spin"}),f]})]})]})})}function AF(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Mg="ScrollArea",[kE]=Mr(Mg),[IF,yr]=kE(Mg),SE=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:a=600,...l}=e,[u,f]=y.useState(null),[p,m]=y.useState(null),[d,v]=y.useState(null),[x,S]=y.useState(null),[k,E]=y.useState(null),[C,P]=y.useState(0),[R,O]=y.useState(0),[B,A]=y.useState(!1),[z,I]=y.useState(!1),D=nt(t,H=>f(H)),j=ql(i);return h.jsx(IF,{scope:n,type:r,dir:j,scrollHideDelay:a,scrollArea:u,viewport:p,onViewportChange:m,content:d,onContentChange:v,scrollbarX:x,onScrollbarXChange:S,scrollbarXEnabled:B,onScrollbarXEnabledChange:A,scrollbarY:k,onScrollbarYChange:E,scrollbarYEnabled:z,onScrollbarYEnabledChange:I,onCornerWidthChange:P,onCornerHeightChange:O,children:h.jsx(Fe.div,{dir:j,...l,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});SE.displayName=Mg;var CE="ScrollAreaViewport",EE=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...a}=e,l=yr(CE,n),u=y.useRef(null),f=nt(t,u,l.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),h.jsx(Fe.div,{"data-radix-scroll-area-viewport":"",...a,ref:f,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:h.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});EE.displayName=CE;var Xr="ScrollAreaScrollbar",Lg=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=yr(Xr,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:l}=i,u=e.orientation==="horizontal";return y.useEffect(()=>(u?a(!0):l(!0),()=>{u?a(!1):l(!1)}),[u,a,l]),i.type==="hover"?h.jsx(MF,{...r,ref:t,forceMount:n}):i.type==="scroll"?h.jsx(LF,{...r,ref:t,forceMount:n}):i.type==="auto"?h.jsx(_E,{...r,ref:t,forceMount:n}):i.type==="always"?h.jsx(Dg,{...r,ref:t}):null});Lg.displayName=Xr;var MF=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=yr(Xr,e.__scopeScrollArea),[a,l]=y.useState(!1);return y.useEffect(()=>{const u=i.scrollArea;let f=0;if(u){const p=()=>{window.clearTimeout(f),l(!0)},m=()=>{f=window.setTimeout(()=>l(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",p),u.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),u.removeEventListener("pointerenter",p),u.removeEventListener("pointerleave",m)}}},[i.scrollArea,i.scrollHideDelay]),h.jsx($n,{present:n||a,children:h.jsx(_E,{"data-state":a?"visible":"hidden",...r,ref:t})})}),LF=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=yr(Xr,e.__scopeScrollArea),a=e.orientation==="horizontal",l=$d(()=>f("SCROLL_END"),100),[u,f]=AF("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(u==="idle"){const p=window.setTimeout(()=>f("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(p)}},[u,i.scrollHideDelay,f]),y.useEffect(()=>{const p=i.viewport,m=a?"scrollLeft":"scrollTop";if(p){let d=p[m];const v=()=>{const x=p[m];d!==x&&(f("SCROLL"),l()),d=x};return p.addEventListener("scroll",v),()=>p.removeEventListener("scroll",v)}},[i.viewport,a,f,l]),h.jsx($n,{present:n||u!=="hidden",children:h.jsx(Dg,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ne(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Ne(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),_E=y.forwardRef((e,t)=>{const n=yr(Xr,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,l]=y.useState(!1),u=e.orientation==="horizontal",f=$d(()=>{if(n.viewport){const p=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?p:m)}},10);return da(n.viewport,f),da(n.content,f),h.jsx($n,{present:r||a,children:h.jsx(Dg,{"data-state":a?"visible":"hidden",...i,ref:t})})}),Dg=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=yr(Xr,e.__scopeScrollArea),a=y.useRef(null),l=y.useRef(0),[u,f]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=RE(u.viewport,u.content),m={...r,sizes:u,onSizesChange:f,hasThumb:p>0&&p<1,onThumbChange:v=>a.current=v,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:v=>l.current=v};function d(v,x){return UF(v,l.current,u,x)}return n==="horizontal"?h.jsx(DF,{...m,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const v=i.viewport.scrollLeft,x=bb(v,u,i.dir);a.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollLeft=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollLeft=d(v,i.dir))}}):n==="vertical"?h.jsx($F,{...m,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const v=i.viewport.scrollTop,x=bb(v,u);a.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:v=>{i.viewport&&(i.viewport.scrollTop=v)},onDragScroll:v=>{i.viewport&&(i.viewport.scrollTop=d(v))}}):null}),DF=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=yr(Xr,e.__scopeScrollArea),[l,u]=y.useState(),f=y.useRef(null),p=nt(t,f,a.onScrollbarXChange);return y.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),h.jsx(TE,{"data-orientation":"horizontal",...i,ref:p,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Dd(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,d)=>{if(a.viewport){const v=a.viewport.scrollLeft+m.deltaX;e.onWheelScroll(v),AE(v,d)&&m.preventDefault()}},onResize:()=>{f.current&&a.viewport&&l&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:ed(l.paddingLeft),paddingEnd:ed(l.paddingRight)}})}})}),$F=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=yr(Xr,e.__scopeScrollArea),[l,u]=y.useState(),f=y.useRef(null),p=nt(t,f,a.onScrollbarYChange);return y.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),h.jsx(TE,{"data-orientation":"vertical",...i,ref:p,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Dd(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,d)=>{if(a.viewport){const v=a.viewport.scrollTop+m.deltaY;e.onWheelScroll(v),AE(v,d)&&m.preventDefault()}},onResize:()=>{f.current&&a.viewport&&l&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:ed(l.paddingTop),paddingEnd:ed(l.paddingBottom)}})}})}),[zF,NE]=kE(Xr),TE=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:p,onWheelScroll:m,onResize:d,...v}=e,x=yr(Xr,n),[S,k]=y.useState(null),E=nt(t,D=>k(D)),C=y.useRef(null),P=y.useRef(""),R=x.viewport,O=r.content-r.viewport,B=Yt(m),A=Yt(f),z=$d(d,10);function I(D){if(C.current){const j=D.clientX-C.current.left,H=D.clientY-C.current.top;p({x:j,y:H})}}return y.useEffect(()=>{const D=j=>{const H=j.target;(S==null?void 0:S.contains(H))&&B(j,O)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[R,S,O,B]),y.useEffect(A,[r,A]),da(S,z),da(x.content,z),h.jsx(zF,{scope:n,scrollbar:S,hasThumb:i,onThumbChange:Yt(a),onThumbPointerUp:Yt(l),onThumbPositionChange:A,onThumbPointerDown:Yt(u),children:h.jsx(Fe.div,{...v,ref:E,style:{position:"absolute",...v.style},onPointerDown:Ne(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),C.current=S.getBoundingClientRect(),P.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),I(D))}),onPointerMove:Ne(e.onPointerMove,I),onPointerUp:Ne(e.onPointerUp,D=>{const j=D.target;j.hasPointerCapture(D.pointerId)&&j.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=P.current,x.viewport&&(x.viewport.style.scrollBehavior=""),C.current=null})})})}),Xc="ScrollAreaThumb",PE=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=NE(Xc,e.__scopeScrollArea);return h.jsx($n,{present:n||i.hasThumb,children:h.jsx(FF,{ref:t,...r})})}),FF=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,a=yr(Xc,n),l=NE(Xc,n),{onThumbPositionChange:u}=l,f=nt(t,d=>l.onThumbChange(d)),p=y.useRef(void 0),m=$d(()=>{p.current&&(p.current(),p.current=void 0)},100);return y.useEffect(()=>{const d=a.viewport;if(d){const v=()=>{if(m(),!p.current){const x=VF(d,u);p.current=x,u()}};return u(),d.addEventListener("scroll",v),()=>d.removeEventListener("scroll",v)}},[a.viewport,m,u]),h.jsx(Fe.div,{"data-state":l.hasThumb?"visible":"hidden",...i,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ne(e.onPointerDownCapture,d=>{const x=d.target.getBoundingClientRect(),S=d.clientX-x.left,k=d.clientY-x.top;l.onThumbPointerDown({x:S,y:k})}),onPointerUp:Ne(e.onPointerUp,l.onThumbPointerUp)})});PE.displayName=Xc;var $g="ScrollAreaCorner",jE=y.forwardRef((e,t)=>{const n=yr($g,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?h.jsx(BF,{...e,ref:t}):null});jE.displayName=$g;var BF=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=yr($g,n),[a,l]=y.useState(0),[u,f]=y.useState(0),p=!!(a&&u);return da(i.scrollbarX,()=>{var d;const m=((d=i.scrollbarX)==null?void 0:d.offsetHeight)||0;i.onCornerHeightChange(m),f(m)}),da(i.scrollbarY,()=>{var d;const m=((d=i.scrollbarY)==null?void 0:d.offsetWidth)||0;i.onCornerWidthChange(m),l(m)}),p?h.jsx(Fe.div,{...r,ref:t,style:{width:a,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ed(e){return e?parseInt(e,10):0}function RE(e,t){const n=e/t;return isNaN(n)?0:n}function Dd(e){const t=RE(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function UF(e,t,n,r="ltr"){const i=Dd(n),a=i/2,l=t||a,u=i-l,f=n.scrollbar.paddingStart+l,p=n.scrollbar.size-n.scrollbar.paddingEnd-u,m=n.content-n.viewport,d=r==="ltr"?[0,m]:[m*-1,0];return OE([f,p],d)(e)}function bb(e,t,n="ltr"){const r=Dd(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,l=t.content-t.viewport,u=a-r,f=n==="ltr"?[0,l]:[l*-1,0],p=lm(e,f);return OE([0,l],[0,u])(p)}function OE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function AE(e,t){return e>0&&e<t}var VF=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const a={left:e.scrollLeft,top:e.scrollTop},l=n.left!==a.left,u=n.top!==a.top;(l||u)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function $d(e,t){const n=Yt(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function da(e,t){const n=Yt(t);$t(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var IE=SE,HF=EE,WF=jE;const qF=y.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(IE,{ref:r,className:Te("relative overflow-hidden",e),...n,children:[h.jsx(HF,{className:"h-full w-full rounded-[inherit] [&>div]:!block [&>div]:!min-w-0",children:t}),h.jsx(ME,{}),h.jsx(WF,{})]}));qF.displayName=IE.displayName;const ME=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>h.jsx(Lg,{ref:r,orientation:t,className:Te("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:h.jsx(PE,{className:"relative flex-1 rounded-full bg-border"})}));ME.displayName=Lg.displayName;function gK(){}function yK(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const l=n.slice(i,r).trim();(l||!a)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function KF(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const GF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QF=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YF={};function kb(e,t){return(YF.jsx?QF:GF).test(e)}const ZF=/[ \t\n\f\r]/g;function JF(e){return typeof e=="object"?e.type==="text"?Sb(e.value):!1:Sb(e)}function Sb(e){return e.replace(ZF,"")===""}class Jl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Jl.prototype.normal={};Jl.prototype.property={};Jl.prototype.space=void 0;function LE(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Jl(n,r,t)}function gm(e){return e.toLowerCase()}class Fn{constructor(t,n){this.attribute=n,this.property=t}}Fn.prototype.attribute="";Fn.prototype.booleanish=!1;Fn.prototype.boolean=!1;Fn.prototype.commaOrSpaceSeparated=!1;Fn.prototype.commaSeparated=!1;Fn.prototype.defined=!1;Fn.prototype.mustUseProperty=!1;Fn.prototype.number=!1;Fn.prototype.overloadedBoolean=!1;Fn.prototype.property="";Fn.prototype.spaceSeparated=!1;Fn.prototype.space=void 0;let XF=0;const Je=is(),Lt=is(),ym=is(),ye=is(),vt=is(),Vs=is(),Yn=is();function is(){return 2**++XF}const vm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:Lt,commaOrSpaceSeparated:Yn,commaSeparated:Vs,number:ye,overloadedBoolean:ym,spaceSeparated:vt},Symbol.toStringTag,{value:"Module"})),rh=Object.keys(vm);class zg extends Fn{constructor(t,n,r,i){let a=-1;if(super(t,n),Cb(this,"space",i),typeof r=="number")for(;++a<rh.length;){const l=rh[a];Cb(this,rh[a],(r&vm[l])===vm[l])}}}zg.prototype.defined=!0;function Cb(e,t,n){n&&(e[t]=n)}function va(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new zg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gm(r)]=r,n[gm(a.attribute)]=r}return new Jl(t,n,e.space)}const DE=va({properties:{ariaActiveDescendant:null,ariaAtomic:Lt,ariaAutoComplete:null,ariaBusy:Lt,ariaChecked:Lt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:vt,ariaCurrent:null,ariaDescribedBy:vt,ariaDetails:null,ariaDisabled:Lt,ariaDropEffect:vt,ariaErrorMessage:null,ariaExpanded:Lt,ariaFlowTo:vt,ariaGrabbed:Lt,ariaHasPopup:null,ariaHidden:Lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vt,ariaLevel:ye,ariaLive:null,ariaModal:Lt,ariaMultiLine:Lt,ariaMultiSelectable:Lt,ariaOrientation:null,ariaOwns:vt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Lt,ariaReadOnly:Lt,ariaRelevant:null,ariaRequired:Lt,ariaRoleDescription:vt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Lt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function $E(e,t){return t in e?e[t]:t}function zE(e,t){return $E(e,t.toLowerCase())}const e6=va({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vs,acceptCharset:vt,accessKey:vt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:vt,autoFocus:Je,autoPlay:Je,blocking:vt,capture:null,charSet:null,checked:Je,cite:null,className:vt,cols:ye,colSpan:null,content:null,contentEditable:Lt,controls:Je,controlsList:vt,coords:ye|Vs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:ym,draggable:Lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:vt,height:ye,hidden:ym,high:ye,href:null,hrefLang:null,htmlFor:vt,httpEquiv:vt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:vt,itemRef:vt,itemScope:Je,itemType:vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Je,muted:Je,name:null,nonce:null,noModule:Je,noValidate:Je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Je,optimum:ye,pattern:null,ping:vt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:vt,required:Je,reversed:Je,rows:ye,rowSpan:ye,sandbox:vt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:Lt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Je,declare:Je,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Lt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Je,disableRemotePlayback:Je,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:zE}),t6=va({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Yn,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:vt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Vs,g2:Vs,glyphName:Vs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:Yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yn,rev:Yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yn,requiredFeatures:Yn,requiredFonts:Yn,requiredFormats:Yn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:Yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Yn,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$E}),FE=va({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),BE=va({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:zE}),UE=va({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),n6={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},r6=/[A-Z]/g,Eb=/-[a-z]/g,o6=/^data[-\w.:]+$/i;function i6(e,t){const n=gm(t);let r=t,i=Fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&o6.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Eb,a6);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Eb.test(a)){let l=a.replace(r6,s6);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=zg}return new i(r,t)}function s6(e){return"-"+e.toLowerCase()}function a6(e){return e.charAt(1).toUpperCase()}const l6=LE([DE,e6,FE,BE,UE],"html"),Fg=LE([DE,t6,FE,BE,UE],"svg");function vK(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function u6(e){return e.join(" ").trim()}var Os={},oh,_b;function c6(){if(_b)return oh;_b=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,f=`
|
|
415
|
+
`,p="/",m="*",d="",v="comment",x="declaration";function S(E,C){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];C=C||{};var P=1,R=1;function O(oe){var G=oe.match(t);G&&(P+=G.length);var X=oe.lastIndexOf(f);R=~X?oe.length-X:R+oe.length}function B(){var oe={line:P,column:R};return function(G){return G.position=new A(oe),D(),G}}function A(oe){this.start=oe,this.end={line:P,column:R},this.source=C.source}A.prototype.content=E;function z(oe){var G=new Error(C.source+":"+P+":"+R+": "+oe);if(G.reason=oe,G.filename=C.source,G.line=P,G.column=R,G.source=E,!C.silent)throw G}function I(oe){var G=oe.exec(E);if(G){var X=G[0];return O(X),E=E.slice(X.length),G}}function D(){I(n)}function j(oe){var G;for(oe=oe||[];G=H();)G!==!1&&oe.push(G);return oe}function H(){var oe=B();if(!(p!=E.charAt(0)||m!=E.charAt(1))){for(var G=2;d!=E.charAt(G)&&(m!=E.charAt(G)||p!=E.charAt(G+1));)++G;if(G+=2,d===E.charAt(G-1))return z("End of comment missing");var X=E.slice(2,G-2);return R+=2,O(X),E=E.slice(G),R+=2,oe({type:v,comment:X})}}function ee(){var oe=B(),G=I(r);if(G){if(H(),!I(i))return z("property missing ':'");var X=I(a),ue=oe({type:x,property:k(G[0].replace(e,d)),value:X?k(X[0].replace(e,d)):d});return I(l),ue}}function le(){var oe=[];j(oe);for(var G;G=ee();)G!==!1&&(oe.push(G),j(oe));return oe}return D(),le()}function k(E){return E?E.replace(u,d):d}return oh=S,oh}var Nb;function d6(){if(Nb)return Os;Nb=1;var e=Os&&Os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Os,"__esModule",{value:!0}),Os.default=n;const t=e(c6());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof i=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:p,value:m}=f;u?i(p,m,f):m&&(a=a||{},a[p]=m)}),a}return Os}var ol={},Tb;function f6(){if(Tb)return ol;Tb=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(p){return!p||n.test(p)||e.test(p)},l=function(p,m){return m.toUpperCase()},u=function(p,m){return"".concat(m,"-")},f=function(p,m){return m===void 0&&(m={}),a(p)?p:(p=p.toLowerCase(),m.reactCompat?p=p.replace(i,u):p=p.replace(r,u),p.replace(t,l))};return ol.camelCase=f,ol}var il,Pb;function p6(){if(Pb)return il;Pb=1;var e=il&&il.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(d6()),n=f6();function r(i,a){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(u,f){u&&f&&(l[(0,n.camelCase)(u,a)]=f)}),l}return r.default=r,il=r,il}var h6=p6();const m6=zl(h6),VE=HE("end"),Bg=HE("start");function HE(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function g6(e){const t=Bg(e),n=VE(e);if(t&&n)return{start:t,end:n}}function yl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jb(e.position):"start"in e||"end"in e?jb(e):"line"in e||"column"in e?xm(e):""}function xm(e){return Rb(e&&e.line)+":"+Rb(e&&e.column)}function jb(e){return xm(e&&e.start)+"-"+xm(e&&e.end)}function Rb(e){return e&&typeof e=="number"?e:1}class pn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(l=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?a.ruleId=r:(a.source=r.slice(0,f),a.ruleId=r.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=yl(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pn.prototype.file="";pn.prototype.name="";pn.prototype.reason="";pn.prototype.message="";pn.prototype.stack="";pn.prototype.column=void 0;pn.prototype.line=void 0;pn.prototype.ancestors=void 0;pn.prototype.cause=void 0;pn.prototype.fatal=void 0;pn.prototype.place=void 0;pn.prototype.ruleId=void 0;pn.prototype.source=void 0;const Ug={}.hasOwnProperty,y6=new Map,v6=/[A-Z]/g,x6=new Set(["table","tbody","thead","tfoot","tr"]),w6=new Set(["td","th"]),WE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function b6(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=P6(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=T6(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Fg:l6,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=qE(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function qE(e,t,n){if(t.type==="element")return k6(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return S6(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return E6(e,t,n);if(t.type==="mdxjsEsm")return C6(e,t);if(t.type==="root")return _6(e,t,n);if(t.type==="text")return N6(e,t)}function k6(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Fg,e.schema=i),e.ancestors.push(t);const a=GE(e,t.tagName,!1),l=j6(e,t);let u=Hg(e,t);return x6.has(t.tagName)&&(u=u.filter(function(f){return typeof f=="string"?!JF(f):!0})),KE(e,l,a,t),Vg(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function S6(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Tl(e,t.position)}function C6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tl(e,t.position)}function E6(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Fg,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:GE(e,t.name,!0),l=R6(e,t),u=Hg(e,t);return KE(e,l,a,t),Vg(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function _6(e,t,n){const r={};return Vg(r,Hg(e,t)),e.create(t,e.Fragment,r,n)}function N6(e,t){return t.value}function KE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function T6(e,t,n){return r;function r(i,a,l,u){const p=Array.isArray(l.children)?n:t;return u?p(a,l,u):p(a,l)}}function P6(e,t){return n;function n(r,i,a,l){const u=Array.isArray(a.children),f=Bg(r);return t(i,a,l,u,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function j6(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ug.call(t.properties,i)){const a=O6(e,i,t.properties[i]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&w6.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function R6(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Tl(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else Tl(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Hg(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:y6;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const p=i.get(f)||0;l=f+"-"+p,i.set(f,p+1)}}const u=qE(e,a,l);u!==void 0&&n.push(u)}return n}function O6(e,t,n){const r=i6(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?KF(n):u6(n)),r.property==="style"){let i=typeof n=="object"?n:A6(e,String(n));return e.stylePropertyNameCase==="css"&&(i=I6(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?n6[r.property]||r.property:r.attribute,n]}}function A6(e,t){try{return m6(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new pn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=WE+"#cannot-parse-style-attribute",i}}function GE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,l;for(;++a<i.length;){const u=kb(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=kb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ug.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Tl(e)}function Tl(e,t){const n=new pn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=WE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function I6(e){const t={};let n;for(n in e)Ug.call(e,n)&&(t[M6(n)]=e[n]);return t}function M6(e){let t=e.replace(v6,L6);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function L6(e){return"-"+e.toLowerCase()}const ih={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},D6={};function Wg(e,t){const n=D6,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return QE(e,r,i)}function QE(e,t,n){if($6(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ob(e.children,t,n)}return Array.isArray(e)?Ob(e,t,n):""}function Ob(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=QE(e[i],t,n);return r.join("")}function $6(e){return!!(e&&typeof e=="object")}const Ab=document.createElement("i");function qg(e){const t="&"+e+";";Ab.innerHTML=t;const n=Ab.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function tr(e,t,n,r){const i=e.length;let a=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function fr(e,t){return e.length>0?(tr(e,e.length,0,t),e):t}const Ib={}.hasOwnProperty;function YE(e){const t={};let n=-1;for(;++n<e.length;)z6(t,e[n]);return t}function z6(e,t){let n;for(n in t){const i=(Ib.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){Ib.call(i,l)||(i[l]=[]);const u=a[l];F6(i[l],Array.isArray(u)?u:u?[u]:[])}}}function F6(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);tr(e,0,0,r)}function ZE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function jr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xn=hi(/[A-Za-z]/),dn=hi(/[\dA-Za-z]/),B6=hi(/[#-'*+\--9=?A-Z^-~]/);function td(e){return e!==null&&(e<32||e===127)}const wm=hi(/\d/),U6=hi(/[\dA-Fa-f]/),V6=hi(/[!-/:-@[-`{-~]/);function We(e){return e!==null&&e<-2}function mt(e){return e!==null&&(e<0||e===32)}function tt(e){return e===-2||e===-1||e===32}const zd=hi(new RegExp("\\p{P}|\\p{S}","u")),es=hi(/\s/);function hi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function xa(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&dn(e.charCodeAt(n+1))&&dn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),i=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function it(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(f){return tt(f)?(e.enter(n),u(f)):t(f)}function u(f){return tt(f)&&a++<i?(e.consume(f),u):(e.exit(n),t(f))}}const H6={tokenize:W6};function W6(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),it(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return We(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const q6={tokenize:K6},Mb={tokenize:G6};function K6(e){const t=this,n=[];let r=0,i,a,l;return u;function u(R){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,f,p)(R)}return p(R)}function f(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&P();const O=t.events.length;let B=O,A;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){A=t.events[B][1].end;break}C(r);let z=O;for(;z<t.events.length;)t.events[z][1].end={...A},z++;return tr(t.events,B+1,0,t.events.slice(O)),t.events.length=z,p(R)}return u(R)}function p(R){if(r===n.length){if(!i)return v(R);if(i.currentConstruct&&i.currentConstruct.concrete)return S(R);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mb,m,d)(R)}function m(R){return i&&P(),C(r),v(R)}function d(R){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,S(R)}function v(R){return t.containerState={},e.attempt(Mb,x,S)(R)}function x(R){return r++,n.push([t.currentConstruct,t.containerState]),v(R)}function S(R){if(R===null){i&&P(),C(0),e.consume(R);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),k(R)}function k(R){if(R===null){E(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return We(R)?(e.consume(R),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(R),k)}function E(R,O){const B=t.sliceStream(R);if(O&&B.push(null),R.previous=a,a&&(a.next=R),a=R,i.defineSkip(R.start),i.write(B),t.parser.lazy[R.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<l&&(!i.events[A][1].end||i.events[A][1].end.offset>l))return;const z=t.events.length;let I=z,D,j;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(D){j=t.events[I][1].end;break}D=!0}for(C(r),A=z;A<t.events.length;)t.events[A][1].end={...j},A++;tr(t.events,I+1,0,t.events.slice(z)),t.events.length=A}}function C(R){let O=n.length;for(;O-- >R;){const B=n[O];t.containerState=B[1],B[0].exit.call(t,e)}n.length=R}function P(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function G6(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fa(e){if(e===null||mt(e)||es(e))return 1;if(zd(e))return 2}function Fd(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const bm={name:"attention",resolveAll:Q6,tokenize:Y6};function Q6(e,t){let n=-1,r,i,a,l,u,f,p,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},v={...e[n][1].start};Lb(d,-f),Lb(v,f),l={type:f>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},a={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:f>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=fr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])),p=fr(p,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",a,t]]),p=fr(p,Fd(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),p=fr(p,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,p=fr(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,tr(e,r-1,n-r+3,p),n=r+p.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Y6(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=fa(r);let a;return l;function l(f){return a=f,e.enter("attentionSequence"),u(f)}function u(f){if(f===a)return e.consume(f),u;const p=e.exit("attentionSequence"),m=fa(f),d=!m||m===2&&i||n.includes(f),v=!i||i===2&&m||n.includes(r);return p._open=!!(a===42?d:d&&(i||!v)),p._close=!!(a===42?v:v&&(m||!d)),t(f)}}function Lb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Z6={name:"autolink",tokenize:J6};function J6(e,t,n){let r=0;return i;function i(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(x){return xn(x)?(e.consume(x),l):x===64?n(x):p(x)}function l(x){return x===43||x===45||x===46||dn(x)?(r=1,u(x)):p(x)}function u(x){return x===58?(e.consume(x),r=0,f):(x===43||x===45||x===46||dn(x))&&r++<32?(e.consume(x),u):(r=0,p(x))}function f(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||td(x)?n(x):(e.consume(x),f)}function p(x){return x===64?(e.consume(x),m):B6(x)?(e.consume(x),p):n(x)}function m(x){return dn(x)?d(x):n(x)}function d(x){return x===46?(e.consume(x),r=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):v(x)}function v(x){if((x===45||dn(x))&&r++<63){const S=x===45?v:d;return e.consume(x),S}return n(x)}}const Xl={partial:!0,tokenize:X6};function X6(e,t,n){return r;function r(a){return tt(a)?it(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||We(a)?t(a):n(a)}}const JE={continuation:{tokenize:t8},exit:n8,name:"blockQuote",tokenize:e8};function e8(e,t,n){const r=this;return i;function i(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return tt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function t8(e,t,n){const r=this;return i;function i(l){return tt(l)?it(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(JE,t,n)(l)}}function n8(e){e.exit("blockQuote")}const XE={name:"characterEscape",tokenize:r8};function r8(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return V6(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const e_={name:"characterReference",tokenize:o8};function o8(e,t,n){const r=this;let i=0,a,l;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),f}function f(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,l=dn,m(d))}function p(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=U6,m):(e.enter("characterReferenceValue"),a=7,l=wm,m(d))}function m(d){if(d===59&&i){const v=e.exit("characterReferenceValue");return l===dn&&!qg(r.sliceSerialize(v))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(d)&&i++<a?(e.consume(d),m):n(d)}}const Db={partial:!0,tokenize:s8},$b={concrete:!0,name:"codeFenced",tokenize:i8};function i8(e,t,n){const r=this,i={partial:!0,tokenize:B};let a=0,l=0,u;return f;function f(A){return p(A)}function p(A){const z=r.events[r.events.length-1];return a=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,u=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(A)}function m(A){return A===u?(l++,e.consume(A),m):l<3?n(A):(e.exit("codeFencedFenceSequence"),tt(A)?it(e,d,"whitespace")(A):d(A))}function d(A){return A===null||We(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(Db,k,O)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(A))}function v(A){return A===null||We(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(A)):tt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,x,"whitespace")(A)):A===96&&A===u?n(A):(e.consume(A),v)}function x(A){return A===null||We(A)?d(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(A))}function S(A){return A===null||We(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(A)):A===96&&A===u?n(A):(e.consume(A),S)}function k(A){return e.attempt(i,O,E)(A)}function E(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),C}function C(A){return a>0&&tt(A)?it(e,P,"linePrefix",a+1)(A):P(A)}function P(A){return A===null||We(A)?e.check(Db,k,O)(A):(e.enter("codeFlowValue"),R(A))}function R(A){return A===null||We(A)?(e.exit("codeFlowValue"),P(A)):(e.consume(A),R)}function O(A){return e.exit("codeFenced"),t(A)}function B(A,z,I){let D=0;return j;function j(G){return A.enter("lineEnding"),A.consume(G),A.exit("lineEnding"),H}function H(G){return A.enter("codeFencedFence"),tt(G)?it(A,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):ee(G)}function ee(G){return G===u?(A.enter("codeFencedFenceSequence"),le(G)):I(G)}function le(G){return G===u?(D++,A.consume(G),le):D>=l?(A.exit("codeFencedFenceSequence"),tt(G)?it(A,oe,"whitespace")(G):oe(G)):I(G)}function oe(G){return G===null||We(G)?(A.exit("codeFencedFence"),z(G)):I(G)}}}function s8(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const sh={name:"codeIndented",tokenize:l8},a8={partial:!0,tokenize:u8};function l8(e,t,n){const r=this;return i;function i(p){return e.enter("codeIndented"),it(e,a,"linePrefix",5)(p)}function a(p){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(p):n(p)}function l(p){return p===null?f(p):We(p)?e.attempt(a8,l,f)(p):(e.enter("codeFlowValue"),u(p))}function u(p){return p===null||We(p)?(e.exit("codeFlowValue"),l(p)):(e.consume(p),u)}function f(p){return e.exit("codeIndented"),t(p)}}function u8(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):We(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):it(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):We(l)?i(l):n(l)}}const c8={name:"codeText",previous:f8,resolve:d8,tokenize:p8};function d8(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function f8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function p8(e,t,n){let r=0,i,a;return l;function l(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),f(d))}function f(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),f):d===96?(a=e.enter("codeTextSequence"),i=0,m(d)):We(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(d))}function p(d){return d===null||d===32||d===96||We(d)?(e.exit("codeTextData"),f(d)):(e.consume(d),p)}function m(d){return d===96?(e.consume(d),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",p(d))}}class h8{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&sl(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),sl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),sl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);sl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);sl(this.left,n.reverse())}}}function sl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function t_(e){const t={};let n=-1,r,i,a,l,u,f,p;const m=new h8(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,m8(m,n)),n=t[n],p=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(l=m.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},u=m.slice(i,n),u.unshift(r),m.splice(i,n-i+1,u))}}return tr(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!p}function m8(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,f=[],p={};let m,d,v=-1,x=n,S=0,k=0;const E=[k];for(;x;){for(;e.get(++i)[1]!==x;);a.push(i),x._tokenizer||(m=r.sliceStream(x),x.next||m.push(null),d&&l.defineSkip(x.start),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),d=x,x=x.next}for(x=n;++v<u.length;)u[v][0]==="exit"&&u[v-1][0]==="enter"&&u[v][1].type===u[v-1][1].type&&u[v][1].start.line!==u[v][1].end.line&&(k=v+1,E.push(k),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(l.events=[],x?(x._tokenizer=void 0,x.previous=void 0):E.pop(),v=E.length;v--;){const C=u.slice(E[v],E[v+1]),P=a.pop();f.push([P,P+C.length-1]),e.splice(P,2,C)}for(f.reverse(),v=-1;++v<f.length;)p[S+f[v][0]]=S+f[v][1],S+=f[v][1]-f[v][0]-1;return p}const g8={resolve:v8,tokenize:x8},y8={partial:!0,tokenize:w8};function v8(e){return t_(e),e}function x8(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):We(u)?e.check(y8,l,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function w8(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),it(e,a,"linePrefix")}function a(l){if(l===null||We(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function n_(e,t,n,r,i,a,l,u,f){const p=f||Number.POSITIVE_INFINITY;let m=0;return d;function d(C){return C===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(C),e.exit(a),v):C===null||C===32||C===41||td(C)?n(C):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(C))}function v(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===62?(e.exit("chunkString"),e.exit(u),v(C)):C===null||C===60||We(C)?n(C):(e.consume(C),C===92?S:x)}function S(C){return C===60||C===62||C===92?(e.consume(C),x):x(C)}function k(C){return!m&&(C===null||C===41||mt(C))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(C)):m<p&&C===40?(e.consume(C),m++,k):C===41?(e.consume(C),m--,k):C===null||C===32||C===40||td(C)?n(C):(e.consume(C),C===92?E:k)}function E(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function r_(e,t,n,r,i,a){const l=this;let u=0,f;return p;function p(x){return e.enter(r),e.enter(i),e.consume(x),e.exit(i),e.enter(a),m}function m(x){return u>999||x===null||x===91||x===93&&!f||x===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(x):x===93?(e.exit(a),e.enter(i),e.consume(x),e.exit(i),e.exit(r),t):We(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===null||x===91||x===93||We(x)||u++>999?(e.exit("chunkString"),m(x)):(e.consume(x),f||(f=!tt(x)),x===92?v:d)}function v(x){return x===91||x===92||x===93?(e.consume(x),u++,d):d(x)}}function o_(e,t,n,r,i,a){let l;return u;function u(v){return v===34||v===39||v===40?(e.enter(r),e.enter(i),e.consume(v),e.exit(i),l=v===40?41:v,f):n(v)}function f(v){return v===l?(e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):(e.enter(a),p(v))}function p(v){return v===l?(e.exit(a),f(l)):v===null?n(v):We(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),it(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===l||v===null||We(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?d:m)}function d(v){return v===l||v===92?(e.consume(v),m):m(v)}}function vl(e,t){let n;return r;function r(i){return We(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):tt(i)?it(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const b8={name:"definition",tokenize:S8},k8={partial:!0,tokenize:C8};function S8(e,t,n){const r=this;let i;return a;function a(x){return e.enter("definition"),l(x)}function l(x){return r_.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function u(x){return i=jr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):n(x)}function f(x){return mt(x)?vl(e,p)(x):p(x)}function p(x){return n_(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(k8,d,d)(x)}function d(x){return tt(x)?it(e,v,"whitespace")(x):v(x)}function v(x){return x===null||We(x)?(e.exit("definition"),r.parser.defined.push(i),t(x)):n(x)}}function C8(e,t,n){return r;function r(u){return mt(u)?vl(e,i)(u):n(u)}function i(u){return o_(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return tt(u)?it(e,l,"whitespace")(u):l(u)}function l(u){return u===null||We(u)?t(u):n(u)}}const E8={name:"hardBreakEscape",tokenize:_8};function _8(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return We(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const N8={name:"headingAtx",resolve:T8,tokenize:P8};function T8(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},tr(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function P8(e,t,n){let r=0;return i;function i(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&r++<6?(e.consume(m),l):m===null||mt(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||We(m)?(e.exit("atxHeading"),t(m)):tt(m)?it(e,u,"whitespace")(m):(e.enter("atxHeadingText"),p(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),u(m))}function p(m){return m===null||m===35||mt(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),p)}}const j8=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zb=["pre","script","style","textarea"],R8={concrete:!0,name:"htmlFlow",resolveTo:I8,tokenize:M8},O8={partial:!0,tokenize:D8},A8={partial:!0,tokenize:L8};function I8(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function M8(e,t,n){const r=this;let i,a,l,u,f;return p;function p(_){return m(_)}function m(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),v):_===47?(e.consume(_),a=!0,k):_===63?(e.consume(_),i=3,r.interrupt?t:N):xn(_)?(e.consume(_),l=String.fromCharCode(_),E):n(_)}function v(_){return _===45?(e.consume(_),i=2,x):_===91?(e.consume(_),i=5,u=0,S):xn(_)?(e.consume(_),i=4,r.interrupt?t:N):n(_)}function x(_){return _===45?(e.consume(_),r.interrupt?t:N):n(_)}function S(_){const ie="CDATA[";return _===ie.charCodeAt(u++)?(e.consume(_),u===ie.length?r.interrupt?t:ee:S):n(_)}function k(_){return xn(_)?(e.consume(_),l=String.fromCharCode(_),E):n(_)}function E(_){if(_===null||_===47||_===62||mt(_)){const ie=_===47,K=l.toLowerCase();return!ie&&!a&&zb.includes(K)?(i=1,r.interrupt?t(_):ee(_)):j8.includes(l.toLowerCase())?(i=6,ie?(e.consume(_),C):r.interrupt?t(_):ee(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?P(_):R(_))}return _===45||dn(_)?(e.consume(_),l+=String.fromCharCode(_),E):n(_)}function C(_){return _===62?(e.consume(_),r.interrupt?t:ee):n(_)}function P(_){return tt(_)?(e.consume(_),P):j(_)}function R(_){return _===47?(e.consume(_),j):_===58||_===95||xn(_)?(e.consume(_),O):tt(_)?(e.consume(_),R):j(_)}function O(_){return _===45||_===46||_===58||_===95||dn(_)?(e.consume(_),O):B(_)}function B(_){return _===61?(e.consume(_),A):tt(_)?(e.consume(_),B):R(_)}function A(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),f=_,z):tt(_)?(e.consume(_),A):I(_)}function z(_){return _===f?(e.consume(_),f=null,D):_===null||We(_)?n(_):(e.consume(_),z)}function I(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||mt(_)?B(_):(e.consume(_),I)}function D(_){return _===47||_===62||tt(_)?R(_):n(_)}function j(_){return _===62?(e.consume(_),H):n(_)}function H(_){return _===null||We(_)?ee(_):tt(_)?(e.consume(_),H):n(_)}function ee(_){return _===45&&i===2?(e.consume(_),X):_===60&&i===1?(e.consume(_),ue):_===62&&i===4?(e.consume(_),M):_===63&&i===3?(e.consume(_),N):_===93&&i===5?(e.consume(_),Q):We(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(O8,$,le)(_)):_===null||We(_)?(e.exit("htmlFlowData"),le(_)):(e.consume(_),ee)}function le(_){return e.check(A8,oe,$)(_)}function oe(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),G}function G(_){return _===null||We(_)?le(_):(e.enter("htmlFlowData"),ee(_))}function X(_){return _===45?(e.consume(_),N):ee(_)}function ue(_){return _===47?(e.consume(_),l="",Z):ee(_)}function Z(_){if(_===62){const ie=l.toLowerCase();return zb.includes(ie)?(e.consume(_),M):ee(_)}return xn(_)&&l.length<8?(e.consume(_),l+=String.fromCharCode(_),Z):ee(_)}function Q(_){return _===93?(e.consume(_),N):ee(_)}function N(_){return _===62?(e.consume(_),M):_===45&&i===2?(e.consume(_),N):ee(_)}function M(_){return _===null||We(_)?(e.exit("htmlFlowData"),$(_)):(e.consume(_),M)}function $(_){return e.exit("htmlFlow"),t(_)}}function L8(e,t,n){const r=this;return i;function i(l){return We(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function D8(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Xl,t,n)}}const $8={name:"htmlText",tokenize:z8};function z8(e,t,n){const r=this;let i,a,l;return u;function u(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),f}function f(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),B):N===63?(e.consume(N),R):xn(N)?(e.consume(N),I):n(N)}function p(N){return N===45?(e.consume(N),m):N===91?(e.consume(N),a=0,S):xn(N)?(e.consume(N),P):n(N)}function m(N){return N===45?(e.consume(N),x):n(N)}function d(N){return N===null?n(N):N===45?(e.consume(N),v):We(N)?(l=d,ue(N)):(e.consume(N),d)}function v(N){return N===45?(e.consume(N),x):d(N)}function x(N){return N===62?X(N):N===45?v(N):d(N)}function S(N){const M="CDATA[";return N===M.charCodeAt(a++)?(e.consume(N),a===M.length?k:S):n(N)}function k(N){return N===null?n(N):N===93?(e.consume(N),E):We(N)?(l=k,ue(N)):(e.consume(N),k)}function E(N){return N===93?(e.consume(N),C):k(N)}function C(N){return N===62?X(N):N===93?(e.consume(N),C):k(N)}function P(N){return N===null||N===62?X(N):We(N)?(l=P,ue(N)):(e.consume(N),P)}function R(N){return N===null?n(N):N===63?(e.consume(N),O):We(N)?(l=R,ue(N)):(e.consume(N),R)}function O(N){return N===62?X(N):R(N)}function B(N){return xn(N)?(e.consume(N),A):n(N)}function A(N){return N===45||dn(N)?(e.consume(N),A):z(N)}function z(N){return We(N)?(l=z,ue(N)):tt(N)?(e.consume(N),z):X(N)}function I(N){return N===45||dn(N)?(e.consume(N),I):N===47||N===62||mt(N)?D(N):n(N)}function D(N){return N===47?(e.consume(N),X):N===58||N===95||xn(N)?(e.consume(N),j):We(N)?(l=D,ue(N)):tt(N)?(e.consume(N),D):X(N)}function j(N){return N===45||N===46||N===58||N===95||dn(N)?(e.consume(N),j):H(N)}function H(N){return N===61?(e.consume(N),ee):We(N)?(l=H,ue(N)):tt(N)?(e.consume(N),H):D(N)}function ee(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),i=N,le):We(N)?(l=ee,ue(N)):tt(N)?(e.consume(N),ee):(e.consume(N),oe)}function le(N){return N===i?(e.consume(N),i=void 0,G):N===null?n(N):We(N)?(l=le,ue(N)):(e.consume(N),le)}function oe(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||mt(N)?D(N):(e.consume(N),oe)}function G(N){return N===47||N===62||mt(N)?D(N):n(N)}function X(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function ue(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Z}function Z(N){return tt(N)?it(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):Q(N)}function Q(N){return e.enter("htmlTextData"),l(N)}}const Kg={name:"labelEnd",resolveAll:V8,resolveTo:H8,tokenize:W8},F8={tokenize:q8},B8={tokenize:K8},U8={tokenize:G8};function V8(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&tr(e,0,e.length,n),e}function H8(e,t){let n=e.length,r=0,i,a,l,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},m={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",f,t],["enter",p,t]],u=fr(u,e.slice(a+1,a+r+3)),u=fr(u,[["enter",m,t]]),u=fr(u,Fd(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=fr(u,[["exit",m,t],e[l-2],e[l-1],["exit",p,t]]),u=fr(u,e.slice(l+1)),u=fr(u,[["exit",f,t]]),tr(e,a,e.length,u),e}function W8(e,t,n){const r=this;let i=r.events.length,a,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(v){return a?a._inactive?d(v):(l=r.parser.defined.includes(jr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):n(v)}function f(v){return v===40?e.attempt(F8,m,l?m:d)(v):v===91?e.attempt(B8,m,l?p:d)(v):l?m(v):d(v)}function p(v){return e.attempt(U8,m,d)(v)}function m(v){return t(v)}function d(v){return a._balanced=!0,n(v)}}function q8(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return mt(d)?vl(e,a)(d):a(d)}function a(d){return d===41?m(d):n_(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function l(d){return mt(d)?vl(e,f)(d):m(d)}function u(d){return n(d)}function f(d){return d===34||d===39||d===40?o_(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):m(d)}function p(d){return mt(d)?vl(e,m)(d):m(d)}function m(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function K8(e,t,n){const r=this;return i;function i(u){return r_.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(jr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function G8(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Q8={name:"labelStartImage",resolveAll:Kg.resolveAll,tokenize:Y8};function Y8(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Z8={name:"labelStartLink",resolveAll:Kg.resolveAll,tokenize:J8};function J8(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const ah={name:"lineEnding",tokenize:X8};function X8(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Ac={name:"thematicBreak",tokenize:eB};function eB(e,t,n){let r=0,i;return a;function a(p){return e.enter("thematicBreak"),l(p)}function l(p){return i=p,u(p)}function u(p){return p===i?(e.enter("thematicBreakSequence"),f(p)):r>=3&&(p===null||We(p))?(e.exit("thematicBreak"),t(p)):n(p)}function f(p){return p===i?(e.consume(p),r++,f):(e.exit("thematicBreakSequence"),tt(p)?it(e,u,"whitespace")(p):u(p))}}const On={continuation:{tokenize:oB},exit:sB,name:"list",tokenize:rB},tB={partial:!0,tokenize:aB},nB={partial:!0,tokenize:iB};function rB(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return u;function u(x){const S=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:wm(x)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Ac,n,p)(x):p(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return n(x)}function f(x){return wm(x)&&++l<10?(e.consume(x),f):(!r.interrupt||l<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):n(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(Xl,r.interrupt?n:m,e.attempt(tB,v,d))}function m(x){return r.containerState.initialBlankLine=!0,a++,v(x)}function d(x){return tt(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):n(x)}function v(x){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function oB(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Xl,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!tt(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nB,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(On,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function iB(e,t,n){const r=this;return it(e,i,"listItemIndent",r.containerState.size+1);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function sB(e){e.exit(this.containerState.type)}function aB(e,t,n){const r=this;return it(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=r.events[r.events.length-1];return!tt(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Fb={name:"setextUnderline",resolveTo:lB,tokenize:uB};function lB(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function uB(e,t,n){const r=this;let i;return a;function a(p){let m=r.events.length,d;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){d=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=p,l(p)):n(p)}function l(p){return e.enter("setextHeadingLineSequence"),u(p)}function u(p){return p===i?(e.consume(p),u):(e.exit("setextHeadingLineSequence"),tt(p)?it(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||We(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const cB={tokenize:dB};function dB(e){const t=this,n=e.attempt(Xl,r,e.attempt(this.parser.constructs.flowInitial,i,it(e,e.attempt(this.parser.constructs.flow,i,e.attempt(g8,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const fB={resolveAll:s_()},pB=i_("string"),hB=i_("text");function i_(e){return{resolveAll:s_(e==="text"?mB:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,l,u);return l;function l(m){return p(m)?a(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return p(m)?(n.exit("data"),a(m)):(n.consume(m),f)}function p(m){if(m===null)return!0;const d=i[m];let v=-1;if(d)for(;++v<d.length;){const x=d[v];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function s_(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function mB(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,l=-1,u=0,f;for(;a--;){const p=i[a];if(typeof p=="string"){for(l=p.length;p.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(p===-2)f=!0,u++;else if(p!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const p={type:n===e.length||f||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...p.start},r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const gB={42:On,43:On,45:On,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,62:JE},yB={91:b8},vB={[-2]:sh,[-1]:sh,32:sh},xB={35:N8,42:Ac,45:[Fb,Ac],60:R8,61:Fb,95:Ac,96:$b,126:$b},wB={38:e_,92:XE},bB={[-5]:ah,[-4]:ah,[-3]:ah,33:Q8,38:e_,42:bm,60:[Z6,$8],91:Z8,92:[E8,XE],93:Kg,95:bm,96:c8},kB={null:[bm,fB]},SB={null:[42,95]},CB={null:[]},EB=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:SB,contentInitial:yB,disable:CB,document:gB,flow:xB,flowInitial:vB,insideSpan:kB,string:wB,text:bB},Symbol.toStringTag,{value:"Module"}));function _B(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let l=[],u=[];const f={attempt:z(B),check:z(A),consume:P,enter:R,exit:O,interrupt:z(A,{interrupt:!0})},p={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:d};let m=t.tokenize.call(p,f);return t.resolveAll&&a.push(t),p;function d(H){return l=fr(l,H),E(),l[l.length-1]!==null?[]:(I(t,0),p.events=Fd(a,p.events,p),p.events)}function v(H,ee){return TB(x(H),ee)}function x(H){return NB(l,H)}function S(){const{_bufferIndex:H,_index:ee,line:le,column:oe,offset:G}=r;return{_bufferIndex:H,_index:ee,line:le,column:oe,offset:G}}function k(H){i[H.line]=H.column,j()}function E(){let H;for(;r._index<l.length;){const ee=l[r._index];if(typeof ee=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<ee.length;)C(ee.charCodeAt(r._bufferIndex));else C(ee)}}function C(H){m=m(H)}function P(H){We(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,j()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=H}function R(H,ee){const le=ee||{};return le.type=H,le.start=S(),p.events.push(["enter",le,p]),u.push(le),le}function O(H){const ee=u.pop();return ee.end=S(),p.events.push(["exit",ee,p]),ee}function B(H,ee){I(H,ee.from)}function A(H,ee){ee.restore()}function z(H,ee){return le;function le(oe,G,X){let ue,Z,Q,N;return Array.isArray(oe)?$(oe):"tokenize"in oe?$([oe]):M(oe);function M(ce){return ae;function ae(te){const re=te!==null&&ce[te],we=te!==null&&ce.null,Ee=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(we)?we:we?[we]:[]];return $(Ee)(te)}}function $(ce){return ue=ce,Z=0,ce.length===0?X:_(ce[Z])}function _(ce){return ae;function ae(te){return N=D(),Q=ce,ce.partial||(p.currentConstruct=ce),ce.name&&p.parser.constructs.disable.null.includes(ce.name)?K():ce.tokenize.call(ee?Object.assign(Object.create(p),ee):p,f,ie,K)(te)}}function ie(ce){return H(Q,N),G}function K(ce){return N.restore(),++Z<ue.length?_(ue[Z]):X}}}function I(H,ee){H.resolveAll&&!a.includes(H)&&a.push(H),H.resolve&&tr(p.events,ee,p.events.length-ee,H.resolve(p.events.slice(ee),p)),H.resolveTo&&(p.events=H.resolveTo(p.events,p))}function D(){const H=S(),ee=p.previous,le=p.currentConstruct,oe=p.events.length,G=Array.from(u);return{from:oe,restore:X};function X(){r=H,p.previous=ee,p.currentConstruct=le,p.events.length=oe,u=G,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function NB(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,a)];else{if(l=e.slice(n,i),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function TB(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
416
|
+
`;break}case-3:{l=`\r
|
|
417
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(a)}i=a===-2,r.push(l)}return r.join("")}function PB(e){const r={constructs:YE([EB,...(e||{}).extensions||[]]),content:i(H6),defined:[],document:i(q6),flow:i(cB),lazy:{},string:i(pB),text:i(hB)};return r;function i(a){return l;function l(u){return _B(r,a,u)}}}function jB(e){for(;!t_(e););return e}const Bb=/[\0\t\n\r]/g;function RB(){let e=1,t="",n=!0,r;return i;function i(a,l,u){const f=[];let p,m,d,v,x;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(Bb.lastIndex=d,p=Bb.exec(a),v=p&&p.index!==void 0?p.index:a.length,x=a.charCodeAt(v),!p){t=a.slice(d);break}if(x===10&&d===v&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),d<v&&(f.push(a.slice(d,v)),e+=v-d),x){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}d=v+1}return u&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const OB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AB(e){return e.replace(OB,IB)}function IB(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return ZE(n.slice(a?2:1),a?16:10)}return qg(n)||e}const a_={}.hasOwnProperty;function MB(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),LB(n)(jB(PB(n).document().write(RB()(e,t,!0))))}function LB(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(dt),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(zt),blockQuote:a(we),characterEscape:D,characterReference:D,codeFenced:a(Ee),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ee,l),codeText:a(pe,l),codeTextData:D,data:D,codeFlowValue:D,definition:a(qe),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(ze),hardBreakEscape:a(Zt),hardBreakTrailing:a(Zt),htmlFlow:a(Ct,l),htmlFlowData:D,htmlText:a(Ct,l),htmlTextData:D,image:a(Bn),label:l,link:a(dt),listItem:a(rr),listItemValue:v,listOrdered:a(En,d),listUnordered:a(En),paragraph:a(Tt),reference:_,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(zt),strong:a(nn),thematicBreak:a(to)},exit:{atxHeading:f(),atxHeadingSequence:B,autolink:f(),autolinkEmail:re,autolinkProtocol:te,blockQuote:f(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:K,characterReferenceMarkerNumeric:K,characterReferenceValue:ce,characterReference:ae,codeFenced:f(E),codeFencedFence:k,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:j,codeIndented:f(C),codeText:f(G),codeTextData:j,data:j,definition:f(),definitionDestinationString:O,definitionLabelString:P,definitionTitleString:R,emphasis:f(),hardBreakEscape:f(ee),hardBreakTrailing:f(ee),htmlFlow:f(le),htmlFlowData:j,htmlText:f(oe),htmlTextData:j,image:f(ue),label:Q,labelText:Z,lineEnding:H,link:f(X),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ie,resourceDestinationString:N,resourceTitleString:M,resource:$,setextHeading:f(I),setextHeadingLineSequence:z,setextHeadingText:A,strong:f(),thematicBreak:f()}};l_(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(de){let be={type:"root",children:[]};const Oe={stack:[be],tokenStack:[],config:t,enter:u,exit:p,buffer:l,resume:m,data:n},Ge=[];let Ze=-1;for(;++Ze<de.length;)if(de[Ze][1].type==="listOrdered"||de[Ze][1].type==="listUnordered")if(de[Ze][0]==="enter")Ge.push(Ze);else{const gt=Ge.pop();Ze=i(de,gt,Ze)}for(Ze=-1;++Ze<de.length;){const gt=t[de[Ze][0]];a_.call(gt,de[Ze][1].type)&>[de[Ze][1].type].call(Object.assign({sliceSerialize:de[Ze][2].sliceSerialize},Oe),de[Ze][1])}if(Oe.tokenStack.length>0){const gt=Oe.tokenStack[Oe.tokenStack.length-1];(gt[1]||Ub).call(Oe,void 0,gt[0])}for(be.position={start:Uo(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:Uo(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)be=t.transforms[Ze](be)||be;return be}function i(de,be,Oe){let Ge=be-1,Ze=-1,gt=!1,ft,rn,Un,Vn;for(;++Ge<=Oe;){const Et=de[Ge];switch(Et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Et[0]==="enter"?Ze++:Ze--,Vn=void 0;break}case"lineEndingBlank":{Et[0]==="enter"&&(ft&&!Vn&&!Ze&&!Un&&(Un=Ge),Vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vn=void 0}if(!Ze&&Et[0]==="enter"&&Et[1].type==="listItemPrefix"||Ze===-1&&Et[0]==="exit"&&(Et[1].type==="listUnordered"||Et[1].type==="listOrdered")){if(ft){let W=Ge;for(rn=void 0;W--;){const fe=de[W];if(fe[1].type==="lineEnding"||fe[1].type==="lineEndingBlank"){if(fe[0]==="exit")continue;rn&&(de[rn][1].type="lineEndingBlank",gt=!0),fe[1].type="lineEnding",rn=W}else if(!(fe[1].type==="linePrefix"||fe[1].type==="blockQuotePrefix"||fe[1].type==="blockQuotePrefixWhitespace"||fe[1].type==="blockQuoteMarker"||fe[1].type==="listItemIndent"))break}Un&&(!rn||Un<rn)&&(ft._spread=!0),ft.end=Object.assign({},rn?de[rn][1].start:Et[1].end),de.splice(rn||Ge,0,["exit",ft,Et[2]]),Ge++,Oe++}if(Et[1].type==="listItemPrefix"){const W={type:"listItem",_spread:!1,start:Object.assign({},Et[1].start),end:void 0};ft=W,de.splice(Ge,0,["enter",W,Et[2]]),Ge++,Oe++,Un=void 0,Vn=!0}}}return de[be][1]._spread=gt,Oe}function a(de,be){return Oe;function Oe(Ge){u.call(this,de(Ge),Ge),be&&be.call(this,Ge)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(de,be,Oe){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([be,Oe||void 0]),de.position={start:Uo(be.start),end:void 0}}function f(de){return be;function be(Oe){de&&de.call(this,Oe),p.call(this,Oe)}}function p(de,be){const Oe=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==de.type&&(be?be.call(this,de,Ge[0]):(Ge[1]||Ub).call(this,de,Ge[0]));else throw new Error("Cannot close `"+de.type+"` ("+yl({start:de.start,end:de.end})+"): it’s not open");Oe.position.end=Uo(de.end)}function m(){return Wg(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function v(de){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function x(){const de=this.resume(),be=this.stack[this.stack.length-1];be.lang=de}function S(){const de=this.resume(),be=this.stack[this.stack.length-1];be.meta=de}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const de=this.resume(),be=this.stack[this.stack.length-1];be.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const de=this.resume(),be=this.stack[this.stack.length-1];be.value=de.replace(/(\r?\n|\r)$/g,"")}function P(de){const be=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=be,Oe.identifier=jr(this.sliceSerialize(de)).toLowerCase()}function R(){const de=this.resume(),be=this.stack[this.stack.length-1];be.title=de}function O(){const de=this.resume(),be=this.stack[this.stack.length-1];be.url=de}function B(de){const be=this.stack[this.stack.length-1];if(!be.depth){const Oe=this.sliceSerialize(de).length;be.depth=Oe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function z(de){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function D(de){const Oe=this.stack[this.stack.length-1].children;let Ge=Oe[Oe.length-1];(!Ge||Ge.type!=="text")&&(Ge=Dr(),Ge.position={start:Uo(de.start),end:void 0},Oe.push(Ge)),this.stack.push(Ge)}function j(de){const be=this.stack.pop();be.value+=this.sliceSerialize(de),be.position.end=Uo(de.end)}function H(de){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=be.children[be.children.length-1];Oe.position.end=Uo(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(be.type)&&(D.call(this,de),j.call(this,de))}function ee(){this.data.atHardBreak=!0}function le(){const de=this.resume(),be=this.stack[this.stack.length-1];be.value=de}function oe(){const de=this.resume(),be=this.stack[this.stack.length-1];be.value=de}function G(){const de=this.resume(),be=this.stack[this.stack.length-1];be.value=de}function X(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=be,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function ue(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=be,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function Z(de){const be=this.sliceSerialize(de),Oe=this.stack[this.stack.length-2];Oe.label=AB(be),Oe.identifier=jr(be).toLowerCase()}function Q(){const de=this.stack[this.stack.length-1],be=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const Ge=de.children;Oe.children=Ge}else Oe.alt=be}function N(){const de=this.resume(),be=this.stack[this.stack.length-1];be.url=de}function M(){const de=this.resume(),be=this.stack[this.stack.length-1];be.title=de}function $(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function ie(de){const be=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=be,Oe.identifier=jr(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function K(de){this.data.characterReferenceType=de.type}function ce(de){const be=this.sliceSerialize(de),Oe=this.data.characterReferenceType;let Ge;Oe?(Ge=ZE(be,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=qg(be);const Ze=this.stack[this.stack.length-1];Ze.value+=Ge}function ae(de){const be=this.stack.pop();be.position.end=Uo(de.end)}function te(de){j.call(this,de);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(de)}function re(de){j.call(this,de);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(de)}function we(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ze(){return{type:"emphasis",children:[]}}function zt(){return{type:"heading",depth:0,children:[]}}function Zt(){return{type:"break"}}function Ct(){return{type:"html",value:""}}function Bn(){return{type:"image",title:null,url:"",alt:null}}function dt(){return{type:"link",title:null,url:"",children:[]}}function En(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function rr(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function Tt(){return{type:"paragraph",children:[]}}function nn(){return{type:"strong",children:[]}}function Dr(){return{type:"text",value:""}}function to(){return{type:"thematicBreak"}}}function Uo(e){return{line:e.line,column:e.column,offset:e.offset}}function l_(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?l_(e,r):DB(e,r)}}function DB(e,t){let n;for(n in t)if(a_.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ub(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yl({start:t.start,end:t.end})+") is still open")}function $B(e){const t=this;t.parser=n;function n(r){return MB(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function zB(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function FB(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
418
|
+
`}]}function BB(e,t){const n=t.value?t.value+`
|
|
419
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function UB(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VB(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HB(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=xa(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,u+=1,e.footnoteCounts.set(r,u);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function WB(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qB(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function u_(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function KB(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return u_(e,t);const i={src:xa(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function GB(e,t){const n={src:xa(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function QB(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function YB(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return u_(e,t);const i={href:xa(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ZB(e,t){const n={href:xa(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function JB(e,t,n){const r=e.all(t),i=n?XB(n):c_(t),a={},l=[];if(typeof t.checked=="boolean"){const m=r[0];let d;m&&m.type==="element"&&m.tagName==="p"?d=m:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const m=r[u];(i||u!==0||m.type!=="element"||m.tagName!=="p")&&l.push({type:"text",value:`
|
|
420
|
+
`}),m.type==="element"&&m.tagName==="p"&&!i?l.push(...m.children):l.push(m)}const f=r[r.length-1];f&&(i||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
421
|
+
`});const p={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,p),e.applyData(t,p)}function XB(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=c_(n[r])}return t}function c_(e){const t=e.spread;return t??e.children.length>1}function e9(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function t9(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n9(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function r9(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function o9(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Bg(t.children[1]),f=VE(t.children[t.children.length-1]);u&&f&&(l.position={start:u,end:f}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function i9(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let f=-1;const p=[];for(;++f<u;){const d=t.children[f],v={},x=l?l[f]:void 0;x&&(v.align=x);let S={type:"element",tagName:a,properties:v,children:[]};d&&(S.children=e.all(d),e.patch(d,S),S=e.applyData(d,S)),p.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,m),e.applyData(t,m)}function s9(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Vb=9,Hb=32;function a9(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Wb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Wb(t.slice(i),i>0,!1)),a.join("")}function Wb(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Vb||a===Hb;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Vb||a===Hb;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function l9(e,t){const n={type:"text",value:a9(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function u9(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const c9={blockquote:zB,break:FB,code:BB,delete:UB,emphasis:VB,footnoteReference:HB,heading:WB,html:qB,imageReference:KB,image:GB,inlineCode:QB,linkReference:YB,link:ZB,listItem:JB,list:e9,paragraph:t9,root:n9,strong:r9,table:o9,tableCell:s9,tableRow:i9,text:l9,thematicBreak:u9,toml:Sc,yaml:Sc,definition:Sc,footnoteDefinition:Sc};function Sc(){}const d_=-1,Bd=0,xl=1,nd=2,Gg=3,Qg=4,Yg=5,Zg=6,f_=7,p_=8,d9=typeof self=="object"?self:globalThis,qb=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new d9[e](t)},f9=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,l]=t[i];switch(a){case Bd:case d_:return n(l,i);case xl:{const u=n([],i);for(const f of l)u.push(r(f));return u}case nd:{const u=n({},i);for(const[f,p]of l)u[r(f)]=r(p);return u}case Gg:return n(new Date(l),i);case Qg:{const{source:u,flags:f}=l;return n(new RegExp(u,f),i)}case Yg:{const u=n(new Map,i);for(const[f,p]of l)u.set(r(f),r(p));return u}case Zg:{const u=n(new Set,i);for(const f of l)u.add(r(f));return u}case f_:{const{name:u,message:f}=l;return n(qb(u,f),i)}case p_:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(qb(a,l),i)};return r},Kb=e=>f9(new Map,e)(0),As="",{toString:p9}={},{keys:h9}=Object,al=e=>{const t=typeof e;if(t!=="object"||!e)return[Bd,t];const n=p9.call(e).slice(8,-1);switch(n){case"Array":return[xl,As];case"Object":return[nd,As];case"Date":return[Gg,As];case"RegExp":return[Qg,As];case"Map":return[Yg,As];case"Set":return[Zg,As];case"DataView":return[xl,n]}return n.includes("Array")?[xl,n]:n.includes("Error")?[f_,n]:[nd,n]},Cc=([e,t])=>e===Bd&&(t==="function"||t==="symbol"),m9=(e,t,n,r)=>{const i=(l,u)=>{const f=r.push(l)-1;return n.set(u,f),f},a=l=>{if(n.has(l))return n.get(l);let[u,f]=al(l);switch(u){case Bd:{let m=l;switch(f){case"bigint":u=p_,m=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return i([d_],l)}return i([u,m],l)}case xl:{if(f){let v=l;return f==="DataView"?v=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(v=new Uint8Array(l)),i([f,[...v]],l)}const m=[],d=i([u,m],l);for(const v of l)m.push(a(v));return d}case nd:{if(f)switch(f){case"BigInt":return i([f,l.toString()],l);case"Boolean":case"Number":case"String":return i([f,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const m=[],d=i([u,m],l);for(const v of h9(l))(e||!Cc(al(l[v])))&&m.push([a(v),a(l[v])]);return d}case Gg:return i([u,l.toISOString()],l);case Qg:{const{source:m,flags:d}=l;return i([u,{source:m,flags:d}],l)}case Yg:{const m=[],d=i([u,m],l);for(const[v,x]of l)(e||!(Cc(al(v))||Cc(al(x))))&&m.push([a(v),a(x)]);return d}case Zg:{const m=[],d=i([u,m],l);for(const v of l)(e||!Cc(al(v)))&&m.push(a(v));return d}}const{message:p}=l;return i([u,{name:f,message:p}],l)};return a},Gb=(e,{json:t,lossy:n}={})=>{const r=[];return m9(!(t||n),!!t,new Map,r)(e),r},rd=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kb(Gb(e,t)):structuredClone(e):(e,t)=>Kb(Gb(e,t));function g9(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function y9(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function v9(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||g9,r=e.options.footnoteBackLabel||y9,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const m=e.all(p),d=String(p.identifier).toUpperCase(),v=xa(d.toLowerCase());let x=0;const S=[],k=e.footnoteCounts.get(d);for(;k!==void 0&&++x<=k;){S.length>0&&S.push({type:"text",value:" "});let P=typeof n=="string"?n:n(f,x);typeof P=="string"&&(P={type:"text",value:P}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,x),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const E=m[m.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const P=E.children[E.children.length-1];P&&P.type==="text"?P.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...S)}else m.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(m,!0)};e.patch(p,C),u.push(C)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...rd(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
422
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
423
|
+
`}]}}const Ud=(function(e){if(e==null)return k9;if(typeof e=="function")return Vd(e);if(typeof e=="object")return Array.isArray(e)?x9(e):w9(e);if(typeof e=="string")return b9(e);throw new Error("Expected function, string, or object as test")});function x9(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ud(e[n]);return Vd(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function w9(e){const t=e;return Vd(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function b9(e){return Vd(t);function t(n){return n&&n.type===e}}function Vd(e){return t;function t(n,r,i){return!!(S9(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function k9(){return!0}function S9(e){return e!==null&&typeof e=="object"&&"type"in e}const h_=[],C9=!0,km=!1,E9="skip";function m_(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Ud(i),l=r?-1:1;u(e,void 0,[])();function u(f,p,m){const d=f&&typeof f=="object"?f:{};if(typeof d.type=="string"){const x=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(f.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=h_,S,k,E;if((!t||a(f,p,m[m.length-1]||void 0))&&(x=_9(n(f,m)),x[0]===km))return x;if("children"in f&&f.children){const C=f;if(C.children&&x[0]!==E9)for(k=(r?C.children.length:-1)+l,E=m.concat(C);k>-1&&k<C.children.length;){const P=C.children[k];if(S=u(P,k,E)(),S[0]===km)return S;k=typeof S[1]=="number"?S[1]:k+l}}return x}}}function _9(e){return Array.isArray(e)?e:typeof e=="number"?[C9,e]:e==null?h_:[e]}function Jg(e,t,n,r){let i,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,i=n):(a=t,l=n,i=r),m_(e,a,u,i);function u(f,p){const m=p[p.length-1],d=m?m.children.indexOf(f):void 0;return l(f,d,m)}}const Sm={}.hasOwnProperty,N9={};function T9(e,t){const n=t||N9,r=new Map,i=new Map,a=new Map,l={...c9,...n.handlers},u={all:p,applyData:j9,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:l,one:f,options:n,patch:P9,wrap:O9};return Jg(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const d=m.type==="definition"?r:i,v=String(m.identifier).toUpperCase();d.has(v)||d.set(v,m)}}),u;function f(m,d){const v=m.type,x=u.handlers[v];if(Sm.call(u.handlers,v)&&x)return x(u,m,d);if(u.options.passThrough&&u.options.passThrough.includes(v)){if("children"in m){const{children:k,...E}=m,C=rd(E);return C.children=u.all(m),C}return rd(m)}return(u.options.unknownHandler||R9)(u,m,d)}function p(m){const d=[];if("children"in m){const v=m.children;let x=-1;for(;++x<v.length;){const S=u.one(v[x],m);if(S){if(x&&v[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Qb(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=Qb(k.value))}Array.isArray(S)?d.push(...S):d.push(S)}}}return d}}function P9(e,t){e.position&&(t.position=g6(e))}function j9(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,rd(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function R9(e,t){const n=t.data||{},r="value"in t&&!(Sm.call(n,"hProperties")||Sm.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function O9(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
424
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
425
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
426
|
+
`}),n}function Qb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Yb(e,t){const n=T9(e,t),r=n.one(e,void 0),i=v9(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
427
|
+
`},i),a}function A9(e,t){return e&&"run"in e?async function(n,r){const i=Yb(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Yb(n,{file:r,...e||t})}}function Zb(e){if(e)throw e}var lh,Jb;function I9(){if(Jb)return lh;Jb=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},a=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var m=e.call(p,"constructor"),d=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!m&&!d)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},l=function(p,m){n&&m.name==="__proto__"?n(p,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):p[m.name]=m.newValue},u=function(p,m){if(m==="__proto__")if(e.call(p,m)){if(r)return r(p,m).value}else return;return p[m]};return lh=function f(){var p,m,d,v,x,S,k=arguments[0],E=1,C=arguments.length,P=!1;for(typeof k=="boolean"&&(P=k,k=arguments[1]||{},E=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});E<C;++E)if(p=arguments[E],p!=null)for(m in p)d=u(k,m),v=u(p,m),k!==v&&(P&&v&&(a(v)||(x=i(v)))?(x?(x=!1,S=d&&i(d)?d:[]):S=d&&a(d)?d:{},l(k,{name:m,newValue:f(P,S,v)})):typeof v<"u"&&l(k,{name:m,newValue:v}));return k},lh}var M9=I9();const uh=zl(M9);function Cm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function L9(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...i);function u(f,...p){const m=e[++a];let d=-1;if(f){l(f);return}for(;++d<i.length;)(p[d]===null||p[d]===void 0)&&(p[d]=i[d]);i=p,m?D9(m,u)(...p):l(null,...p)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function D9(e,t){let n;return r;function r(...l){const u=e.length>l.length;let f;u&&l.push(i);try{f=e.apply(this,l)}catch(p){const m=p;if(u&&n)throw m;return i(m)}u||(f&&f.then&&typeof f.then=="function"?f.then(a,i):f instanceof Error?i(f):a(f))}function i(l,...u){n||(n=!0,t(l,...u))}function a(l){i(null,l)}}const Wr={basename:$9,dirname:z9,extname:F9,join:B9,sep:"/"};function $9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');eu(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else l<0&&(a=!0,l=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function z9(e){if(eu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function F9(e){eu(e);let t=e.length,n=-1,r=0,i=-1,a=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function B9(...e){let t=-1,n;for(;++t<e.length;)eu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":U9(n)}function U9(e){eu(e);const t=e.codePointAt(0)===47;let n=V9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function V9(e,t){let n="",r=0,i=-1,a=0,l=-1,u,f;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(i===l-1||a===1))if(i!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),i=l,a=0;continue}}else if(n.length>0){n="",r=0,i=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,a=0}else u===46&&a>-1?a++:a=-1}return n}function eu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const H9={cwd:W9};function W9(){return"/"}function Em(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function q9(e){if(typeof e=="string")e=new URL(e);else if(!Em(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return K9(e)}function K9(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ch=["history","path","basename","stem","extname","dirname"];class g_{constructor(t){let n;t?Em(t)?n={path:t}:typeof t=="string"||G9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":H9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ch.length;){const a=ch[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)ch.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Wr.basename(this.path):void 0}set basename(t){fh(t,"basename"),dh(t,"basename"),this.path=Wr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wr.dirname(this.path):void 0}set dirname(t){Xb(this.basename,"dirname"),this.path=Wr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wr.extname(this.path):void 0}set extname(t){if(dh(t,"extname"),Xb(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Wr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Em(t)&&(t=q9(t)),fh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wr.basename(this.path,this.extname):void 0}set stem(t){fh(t,"stem"),dh(t,"stem"),this.path=Wr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new pn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function dh(e,t){if(e&&e.includes(Wr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wr.sep+"`")}function fh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xb(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function G9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Q9=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Y9={}.hasOwnProperty;class Xg extends Q9{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=L9()}copy(){const t=new Xg;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(uh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(mh("data",this.frozen),this.namespace[t]=n,this):Y9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(mh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ec(t),r=this.parser||this.Parser;return ph("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ph("process",this.parser||this.Parser),hh("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,l){const u=Ec(t),f=r.parse(u);r.run(f,u,function(m,d,v){if(m||!d||!v)return p(m);const x=d,S=r.stringify(x,v);X9(S)?v.value=S:v.result=S,p(m,v)});function p(m,d){m||!d?l(m):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),ph("processSync",this.parser||this.Parser),hh("processSync",this.compiler||this.Compiler),this.process(t,i),t0("processSync","process",n),r;function i(a,l){n=!0,Zb(a),r=l}}run(t,n,r){e0(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,u){const f=Ec(n);i.run(t,f,p);function p(m,d,v){const x=d||t;m?u(m):l?l(x):r(void 0,x,v)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),t0("runSync","run",r),i;function a(l,u){Zb(l),i=u,r=!0}}stringify(t,n){this.freeze();const r=Ec(n),i=this.compiler||this.Compiler;return hh("stringify",i),e0(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(mh("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[m,...d]=p;f(m,d)}else l(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function l(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(p.plugins),p.settings&&(i.settings=uh(!0,i.settings,p.settings))}function u(p){let m=-1;if(p!=null)if(Array.isArray(p))for(;++m<p.length;){const d=p[m];a(d)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,m){let d=-1,v=-1;for(;++d<r.length;)if(r[d][0]===p){v=d;break}if(v===-1)r.push([p,...m]);else if(m.length>0){let[x,...S]=m;const k=r[v][1];Cm(k)&&Cm(x)&&(x=uh(!0,k,x)),r[v]=[p,x,...S]}}}}const Z9=new Xg().freeze();function ph(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function e0(e){if(!Cm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function t0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ec(e){return J9(e)?e:new g_(e)}function J9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function X9(e){return typeof e=="string"||eU(e)}function eU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tU="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",n0=[],r0={allowDangerousHtml:!0},nU=/^(https?|ircs?|mailto|xmpp)$/i,rU=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oU(e){const t=iU(e),n=sU(e);return aU(t.runSync(t.parse(n),n),e)}function iU(e){const t=e.rehypePlugins||n0,n=e.remarkPlugins||n0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...r0}:r0;return Z9().use($B).use(n).use(A9,r).use(t)}function sU(e){const t=e.children||"",n=new g_;return typeof t=="string"&&(n.value=t),n}function aU(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,f=t.urlTransform||lU;for(const m of rU)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+tU+m.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Jg(e,p),b6(e,{Fragment:h.Fragment,components:i,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function p(m,d,v){if(m.type==="raw"&&v&&typeof d=="number")return l?v.children.splice(d,1):v.children[d]={type:"text",value:m.value},d;if(m.type==="element"){let x;for(x in ih)if(Object.hasOwn(ih,x)&&Object.hasOwn(m.properties,x)){const S=m.properties[x],k=ih[x];(k===null||k.includes(m.tagName))&&(m.properties[x]=f(String(S||""),x,m))}}if(m.type==="element"){let x=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!x&&r&&typeof d=="number"&&(x=!r(m,d,v)),x&&v&&typeof d=="number")return u&&m.children?v.children.splice(d,1,...m.children):v.children.splice(d,1),d}}}function lU(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||nU.test(e.slice(0,t))?e:""}function o0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function uU(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cU(e,t,n){const i=Ud((n||{}).ignore||[]),a=dU(t);let l=-1;for(;++l<a.length;)m_(e,"text",u);function u(p,m){let d=-1,v;for(;++d<m.length;){const x=m[d],S=v?v.children:void 0;if(i(x,S?S.indexOf(x):void 0,v))return;v=x}if(v)return f(p,m)}function f(p,m){const d=m[m.length-1],v=a[l][0],x=a[l][1];let S=0;const E=d.children.indexOf(p);let C=!1,P=[];v.lastIndex=0;let R=v.exec(p.value);for(;R;){const O=R.index,B={index:R.index,input:R.input,stack:[...m,p]};let A=x(...R,B);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?v.lastIndex=O+1:(S!==O&&P.push({type:"text",value:p.value.slice(S,O)}),Array.isArray(A)?P.push(...A):A&&P.push(A),S=O+R[0].length,C=!0),!v.global)break;R=v.exec(p.value)}return C?(S<p.value.length&&P.push({type:"text",value:p.value.slice(S)}),d.children.splice(E,1,...P)):P=[p],E+P.length}}function dU(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([fU(i[0]),pU(i[1])])}return t}function fU(e){return typeof e=="string"?new RegExp(uU(e),"g"):e}function pU(e){return typeof e=="function"?e:function(){return e}}const gh="phrasing",yh=["autolink","link","image","label"];function hU(){return{transforms:[bU],enter:{literalAutolink:gU,literalAutolinkEmail:vh,literalAutolinkHttp:vh,literalAutolinkWww:vh},exit:{literalAutolink:wU,literalAutolinkEmail:xU,literalAutolinkHttp:yU,literalAutolinkWww:vU}}}function mU(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:gh,notInConstruct:yh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:gh,notInConstruct:yh},{character:":",before:"[ps]",after:"\\/",inConstruct:gh,notInConstruct:yh}]}}function gU(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vh(e){this.config.enter.autolinkProtocol.call(this,e)}function yU(e){this.config.exit.autolinkProtocol.call(this,e)}function vU(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function xU(e){this.config.exit.autolinkEmail.call(this,e)}function wU(e){this.exit(e)}function bU(e){cU(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,kU],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),SU]],{ignore:["link","linkReference"]})}function kU(e,t,n,r,i){let a="";if(!y_(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!CU(n)))return!1;const l=EU(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function SU(e,t,n,r){return!y_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function CU(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function EU(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=o0(e,"(");let a=o0(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function y_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||es(n)||zd(n))&&(!t||n!==47)}v_.peek=IU;function _U(){this.buffer()}function NU(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function TU(){this.buffer()}function PU(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function jU(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RU(e){this.exit(e)}function OU(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function AU(e){this.exit(e)}function IU(){return"["}function v_(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),l(),a+=i.move("]"),a}function MU(){return{enter:{gfmFootnoteCallString:_U,gfmFootnoteCall:NU,gfmFootnoteDefinitionLabelString:TU,gfmFootnoteDefinition:PU},exit:{gfmFootnoteCallString:jU,gfmFootnoteCall:RU,gfmFootnoteDefinitionLabelString:OU,gfmFootnoteDefinition:AU}}}function LU(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:v_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,l){const u=a.createTracker(l);let f=u.move("[^");const p=a.enter("footnoteDefinition"),m=a.enter("label");return f+=u.move(a.safe(a.associationId(r),{before:f,after:"]"})),m(),f+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),f+=u.move((t?`
|
|
428
|
+
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?x_:DU))),p(),f}}function DU(e,t,n){return t===0?e:x_(e,t,n)}function x_(e,t,n){return(n?"":" ")+e}const $U=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];w_.peek=VU;function zU(){return{canContainEols:["delete"],enter:{strikethrough:BU},exit:{strikethrough:UU}}}function FU(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$U}],handlers:{delete:w_}}}function BU(e){this.enter({type:"delete",children:[]},e)}function UU(e){this.exit(e)}function w_(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),a(),l}function VU(){return"~"}function HU(e){return e.length}function WU(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||HU,a=[],l=[],u=[],f=[];let p=0,m=-1;for(;++m<e.length;){const k=[],E=[];let C=-1;for(e[m].length>p&&(p=e[m].length);++C<e[m].length;){const P=qU(e[m][C]);if(n.alignDelimiters!==!1){const R=i(P);E[C]=R,(f[C]===void 0||R>f[C])&&(f[C]=R)}k.push(P)}l[m]=k,u[m]=E}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<p;)a[d]=i0(r[d]);else{const k=i0(r);for(;++d<p;)a[d]=k}d=-1;const v=[],x=[];for(;++d<p;){const k=a[d];let E="",C="";k===99?(E=":",C=":"):k===108?E=":":k===114&&(C=":");let P=n.alignDelimiters===!1?1:Math.max(1,f[d]-E.length-C.length);const R=E+"-".repeat(P)+C;n.alignDelimiters!==!1&&(P=E.length+P+C.length,P>f[d]&&(f[d]=P),x[d]=P),v[d]=R}l.splice(1,0,v),u.splice(1,0,x),m=-1;const S=[];for(;++m<l.length;){const k=l[m],E=u[m];d=-1;const C=[];for(;++d<p;){const P=k[d]||"";let R="",O="";if(n.alignDelimiters!==!1){const B=f[d]-(E[d]||0),A=a[d];A===114?R=" ".repeat(B):A===99?B%2?(R=" ".repeat(B/2+.5),O=" ".repeat(B/2-.5)):(R=" ".repeat(B/2),O=R):O=" ".repeat(B)}n.delimiterStart!==!1&&!d&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&P==="")&&(n.delimiterStart!==!1||d)&&C.push(" "),n.alignDelimiters!==!1&&C.push(R),C.push(P),n.alignDelimiters!==!1&&C.push(O),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||d!==p-1)&&C.push("|")}S.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return S.join(`
|
|
429
|
+
`)}function qU(e){return e==null?"":String(e)}function i0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function KU(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),GU);return i(),l}function GU(e,t,n){return">"+(n?"":" ")+e}function QU(e,t){return s0(e,t.inConstruct,!0)&&!s0(e,t.notInConstruct,!1)}function s0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function a0(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
430
|
+
`&&QU(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
431
|
+
`}function YU(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>l&&(l=a):a=1,i=r+t.length,r=n.indexOf(t,i);return l}function ZU(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function JU(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function XU(e,t,n,r){const i=JU(n),a=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(ZU(e,n)){const d=n.enter("codeIndented"),v=n.indentLines(a,e7);return d(),v}const u=n.createTracker(r),f=i.repeat(Math.max(YU(a,i)+1,3)),p=n.enter("codeFenced");let m=u.move(f);if(e.lang){const d=n.enter(`codeFencedLang${l}`);m+=u.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${l}`);m+=u.move(" "),m+=u.move(n.safe(e.meta,{before:m,after:`
|
|
432
|
+
`,encode:["`"],...u.current()})),d()}return m+=u.move(`
|
|
433
|
+
`),a&&(m+=u.move(a+`
|
|
434
|
+
`)),m+=u.move(f),p(),m}function e7(e,t,n){return(n?"":" ")+e}function ey(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function t7(e,t,n,r){const i=ey(n),a=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const f=n.createTracker(r);let p=f.move("[");return p+=f.move(n.safe(n.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(u=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":`
|
|
435
|
+
`,...f.current()}))),u(),e.title&&(u=n.enter(`title${a}`),p+=f.move(" "+i),p+=f.move(n.safe(e.title,{before:p,after:i,...f.current()})),p+=f.move(i),u()),l(),p}function n7(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Pl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function od(e,t,n){const r=fa(e),i=fa(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}b_.peek=r7;function b_(e,t,n,r){const i=n7(n),a=n.enter("emphasis"),l=n.createTracker(r),u=l.move(i);let f=l.move(n.containerPhrasing(e,{after:i,before:u,...l.current()}));const p=f.charCodeAt(0),m=od(r.before.charCodeAt(r.before.length-1),p,i);m.inside&&(f=Pl(p)+f.slice(1));const d=f.charCodeAt(f.length-1),v=od(r.after.charCodeAt(0),d,i);v.inside&&(f=f.slice(0,-1)+Pl(d));const x=l.move(i);return a(),n.attentionEncodeSurroundingInfo={after:v.outside,before:m.outside},u+f+x}function r7(e,t,n){return n.options.emphasis||"*"}function o7(e,t){let n=!1;return Jg(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,km}),!!((!e.depth||e.depth<3)&&Wg(e)&&(t.options.setext||n))}function i7(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(o7(e,n)){const m=n.enter("headingSetext"),d=n.enter("phrasing"),v=n.containerPhrasing(e,{...a.current(),before:`
|
|
436
|
+
`,after:`
|
|
437
|
+
`});return d(),m(),v+`
|
|
438
|
+
`+(i===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
439
|
+
`))+1))}const l="#".repeat(i),u=n.enter("headingAtx"),f=n.enter("phrasing");a.move(l+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
|
|
440
|
+
`,...a.current()});return/^[\t ]/.test(p)&&(p=Pl(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),f(),u(),p}k_.peek=s7;function k_(e){return e.value||""}function s7(){return"<"}S_.peek=a7;function S_(e,t,n,r){const i=ey(n),a=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const f=n.createTracker(r);let p=f.move("![");return p+=f.move(n.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(u=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),u(),e.title&&(u=n.enter(`title${a}`),p+=f.move(" "+i),p+=f.move(n.safe(e.title,{before:p,after:i,...f.current()})),p+=f.move(i),u()),p+=f.move(")"),l(),p}function a7(){return"!"}C_.peek=l7;function C_(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let f=u.move("![");const p=n.safe(e.alt,{before:f,after:"]",...u.current()});f+=u.move(p+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const d=n.safe(n.associationId(e),{before:f,after:"]",...u.current()});return l(),n.stack=m,a(),i==="full"||!p||p!==d?f+=u.move(d+"]"):i==="shortcut"?f=f.slice(0,-1):f+=u.move("]"),f}function l7(){return"!"}E_.peek=u7;function E_(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],u=n.compilePattern(l);let f;if(l.atBreak)for(;f=u.exec(r);){let p=f.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(f.index+1)}}return i+r+i}function u7(){return"`"}function __(e,t){const n=Wg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}N_.peek=c7;function N_(e,t,n,r){const i=ey(n),a=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,f;if(__(e,n)){const m=n.stack;n.stack=[],u=n.enter("autolink");let d=l.move("<");return d+=l.move(n.containerPhrasing(e,{before:d,after:">",...l.current()})),d+=l.move(">"),u(),n.stack=m,d}u=n.enter("link"),f=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(e,{before:p,after:"](",...l.current()})),p+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(e.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(f=n.enter("destinationRaw"),p+=l.move(n.safe(e.url,{before:p,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${a}`),p+=l.move(" "+i),p+=l.move(n.safe(e.title,{before:p,after:i,...l.current()})),p+=l.move(i),f()),p+=l.move(")"),u(),p}function c7(e,t,n){return __(e,n)?"<":"["}T_.peek=d7;function T_(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let f=u.move("[");const p=n.containerPhrasing(e,{before:f,after:"]",...u.current()});f+=u.move(p+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const d=n.safe(n.associationId(e),{before:f,after:"]",...u.current()});return l(),n.stack=m,a(),i==="full"||!p||p!==d?f+=u.move(d+"]"):i==="shortcut"?f=f.slice(0,-1):f+=u.move("]"),f}function d7(){return"["}function ty(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function f7(e){const t=ty(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function p7(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function P_(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function h7(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?p7(n):ty(n);const u=e.ordered?l==="."?")":".":f7(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),P_(n)===l&&m){let d=-1;for(;++d<e.children.length;){const v=e.children[d];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=u),n.bulletCurrent=l;const p=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,i(),p}function m7(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function g7(e,t,n,r){const i=m7(n);let a=n.bulletCurrent||ty(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(l-a.length)),u.shift(l);const f=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,u.current()),m);return f(),p;function m(d,v,x){return v?(x?"":" ".repeat(l))+d:(x?a:a+" ".repeat(l-a.length))+d}}function y7(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),i(),l}const v7=Ud(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function x7(e,t,n,r){return(e.children.some(function(l){return v7(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function w7(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}j_.peek=b7;function j_(e,t,n,r){const i=w7(n),a=n.enter("strong"),l=n.createTracker(r),u=l.move(i+i);let f=l.move(n.containerPhrasing(e,{after:i,before:u,...l.current()}));const p=f.charCodeAt(0),m=od(r.before.charCodeAt(r.before.length-1),p,i);m.inside&&(f=Pl(p)+f.slice(1));const d=f.charCodeAt(f.length-1),v=od(r.after.charCodeAt(0),d,i);v.inside&&(f=f.slice(0,-1)+Pl(d));const x=l.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:v.outside,before:m.outside},u+f+x}function b7(e,t,n){return n.options.strong||"*"}function k7(e,t,n,r){return n.safe(e.value,r)}function S7(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function C7(e,t,n){const r=(P_(n)+(n.options.ruleSpaces?" ":"")).repeat(S7(n));return n.options.ruleSpaces?r.slice(0,-1):r}const R_={blockquote:KU,break:a0,code:XU,definition:t7,emphasis:b_,hardBreak:a0,heading:i7,html:k_,image:S_,imageReference:C_,inlineCode:E_,link:N_,linkReference:T_,list:h7,listItem:g7,paragraph:y7,root:x7,strong:j_,text:k7,thematicBreak:C7};function E7(){return{enter:{table:_7,tableData:l0,tableHeader:l0,tableRow:T7},exit:{codeText:P7,table:N7,tableData:xh,tableHeader:xh,tableRow:xh}}}function _7(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function N7(e){this.exit(e),this.data.inTable=void 0}function T7(e){this.enter({type:"tableRow",children:[]},e)}function xh(e){this.exit(e)}function l0(e){this.enter({type:"tableCell",children:[]},e)}function P7(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,j7));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function j7(e,t){return t==="|"?t:e}function R7(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
441
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:l,tableCell:f,tableRow:u}};function l(x,S,k,E){return p(m(x,k,E),x.align)}function u(x,S,k,E){const C=d(x,k,E),P=p([C]);return P.slice(0,P.indexOf(`
|
|
442
|
+
`))}function f(x,S,k,E){const C=k.enter("tableCell"),P=k.enter("phrasing"),R=k.containerPhrasing(x,{...E,before:a,after:a});return P(),C(),R}function p(x,S){return WU(x,{align:S,alignDelimiters:r,padding:n,stringLength:i})}function m(x,S,k){const E=x.children;let C=-1;const P=[],R=S.enter("table");for(;++C<E.length;)P[C]=d(E[C],S,k);return R(),P}function d(x,S,k){const E=x.children;let C=-1;const P=[],R=S.enter("tableRow");for(;++C<E.length;)P[C]=f(E[C],x,S,k);return R(),P}function v(x,S,k){let E=R_.inlineCode(x,S,k);return k.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function O7(){return{exit:{taskListCheckValueChecked:u0,taskListCheckValueUnchecked:u0,paragraph:I7}}}function A7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:M7}}}function u0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function I7(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,l;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function M7(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(l);let f=R_.listItem(e,t,n,{...r,...u.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(m){return m+l}}function L7(){return[hU(),MU(),zU(),E7(),O7()]}function D7(e){return{extensions:[mU(),LU(e),FU(),R7(e),A7()]}}const $7={tokenize:H7,partial:!0},O_={tokenize:W7,partial:!0},A_={tokenize:q7,partial:!0},I_={tokenize:K7,partial:!0},z7={tokenize:G7,partial:!0},M_={name:"wwwAutolink",tokenize:U7,previous:D_},L_={name:"protocolAutolink",tokenize:V7,previous:$_},vo={name:"emailAutolink",tokenize:B7,previous:z_},eo={};function F7(){return{text:eo}}let ji=48;for(;ji<123;)eo[ji]=vo,ji++,ji===58?ji=65:ji===91&&(ji=97);eo[43]=vo;eo[45]=vo;eo[46]=vo;eo[95]=vo;eo[72]=[vo,L_];eo[104]=[vo,L_];eo[87]=[vo,M_];eo[119]=[vo,M_];function B7(e,t,n){const r=this;let i,a;return l;function l(d){return!_m(d)||!z_.call(r,r.previous)||ny(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return _m(d)?(e.consume(d),u):d===64?(e.consume(d),f):n(d)}function f(d){return d===46?e.check(z7,m,p)(d):d===45||d===95||dn(d)?(a=!0,e.consume(d),f):m(d)}function p(d){return e.consume(d),i=!0,f}function m(d){return a&&i&&xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function U7(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!D_.call(r,r.previous)||ny(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($7,e.attempt(O_,e.attempt(A_,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function V7(e,t,n){const r=this;let i="",a=!1;return l;function l(d){return(d===72||d===104)&&$_.call(r,r.previous)&&!ny(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(xn(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const v=i.toLowerCase();if(v==="http"||v==="https")return e.consume(d),f}return n(d)}function f(d){return d===47?(e.consume(d),a?p:(a=!0,f)):n(d)}function p(d){return d===null||td(d)||mt(d)||es(d)||zd(d)?n(d):e.attempt(O_,e.attempt(A_,m),n)(d)}function m(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function H7(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function W7(e,t,n){let r,i,a;return l;function l(p){return p===46||p===95?e.check(I_,f,u)(p):p===null||mt(p)||es(p)||p!==45&&zd(p)?f(p):(a=!0,e.consume(p),l)}function u(p){return p===95?r=!0:(i=r,r=void 0),e.consume(p),l}function f(p){return i||r||!a?n(p):t(p)}}function q7(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(I_,t,a)(l):l===null||mt(l)||es(l)?t(l):(e.consume(l),i)}function a(l){return l===41&&r++,e.consume(l),i}}function K7(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||mt(u)||es(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||mt(u)||es(u)?t(u):r(u)}function a(u){return xn(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):xn(u)?(e.consume(u),l):n(u)}}function G7(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return dn(a)?n(a):t(a)}}function D_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function $_(e){return!xn(e)}function z_(e){return!(e===47||_m(e))}function _m(e){return e===43||e===45||e===46||e===95||dn(e)}function ny(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Q7={tokenize:rV,partial:!0};function Y7(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:eV,continuation:{tokenize:tV},exit:nV}},text:{91:{name:"gfmFootnoteCall",tokenize:X7},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Z7,resolveTo:J7}}}}function Z7(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const f=r.events[i][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return u;function u(f){if(!l||!l._balanced)return n(f);const p=jr(r.sliceSerialize({start:l.end,end:r.now()}));return p.codePointAt(0)!==94||!a.includes(p.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function J7(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function X7(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),f}function f(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(d){if(a>999||d===93&&!l||d===null||d===91||mt(d))return n(d);if(d===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return i.includes(jr(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return mt(d)||(l=!0),a++,e.consume(d),d===92?m:p}function m(d){return d===91||d===92||d===93?(e.consume(d),a++,p):p(d)}}function eV(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,u;return f;function f(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(S)}function m(S){if(l>999||S===93&&!u||S===null||S===91||mt(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=jr(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return mt(S)||(u=!0),l++,e.consume(S),S===92?d:m}function d(S){return S===91||S===92||S===93?(e.consume(S),l++,m):m(S)}function v(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),i.includes(a)||i.push(a),it(e,x,"gfmFootnoteDefinitionWhitespace")):n(S)}function x(S){return t(S)}}function tV(e,t,n){return e.check(Xl,t,e.attempt(Q7,t,n))}function nV(e){e.exit("gfmFootnoteDefinition")}function rV(e,t,n){const r=this;return it(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function oV(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,u){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let p=f;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[f][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[f][1].end)},d={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[f][1].start)},v=[["enter",m,u],["enter",l[p][1],u],["exit",l[p][1],u],["enter",d,u]],x=u.parser.constructs.insideSpan.null;x&&tr(v,v.length,0,Fd(x,l.slice(p+1,f),u)),tr(v,v.length,0,[["exit",d,u],["enter",l[f][1],u],["exit",l[f][1],u],["exit",m,u]]),tr(l,p-1,f-p+3,v),f=p+v.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function a(l,u,f){const p=this.previous,m=this.events;let d=0;return v;function v(S){return p===126&&m[m.length-1][1].type!=="characterEscape"?f(S):(l.enter("strikethroughSequenceTemporary"),x(S))}function x(S){const k=fa(p);if(S===126)return d>1?f(S):(l.consume(S),d++,x);if(d<2&&!n)return f(S);const E=l.exit("strikethroughSequenceTemporary"),C=fa(S);return E._open=!C||C===2&&!!k,E._close=!k||k===2&&!!C,u(S)}}}class iV{constructor(){this.map=[]}add(t,n,r){sV(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function sV(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function aV(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function lV(){return{flow:{null:{name:"table",tokenize:uV,resolveAll:cV}}}}function uV(e,t,n){const r=this;let i=0,a=0,l;return u;function u(j){let H=r.events.length-1;for(;H>-1;){const oe=r.events[H][1].type;if(oe==="lineEnding"||oe==="linePrefix")H--;else break}const ee=H>-1?r.events[H][1].type:null,le=ee==="tableHead"||ee==="tableRow"?A:f;return le===A&&r.parser.lazy[r.now().line]?n(j):le(j)}function f(j){return e.enter("tableHead"),e.enter("tableRow"),p(j)}function p(j){return j===124||(l=!0,a+=1),m(j)}function m(j){return j===null?n(j):We(j)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),x):n(j):tt(j)?it(e,m,"whitespace")(j):(a+=1,l&&(l=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),d(j)))}function d(j){return j===null||j===124||mt(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?v:d)}function v(j){return j===92||j===124?(e.consume(j),d):d(j)}function x(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),l=!1,tt(j)?it(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):S(j))}function S(j){return j===45||j===58?E(j):j===124?(l=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),k):B(j)}function k(j){return tt(j)?it(e,E,"whitespace")(j):E(j)}function E(j){return j===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),C):j===45?(a+=1,C(j)):j===null||We(j)?O(j):B(j)}function C(j){return j===45?(e.enter("tableDelimiterFiller"),P(j)):B(j)}function P(j){return j===45?(e.consume(j),P):j===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(j))}function R(j){return tt(j)?it(e,O,"whitespace")(j):O(j)}function O(j){return j===124?S(j):j===null||We(j)?!l||i!==a?B(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):B(j)}function B(j){return n(j)}function A(j){return e.enter("tableRow"),z(j)}function z(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),z):j===null||We(j)?(e.exit("tableRow"),t(j)):tt(j)?it(e,z,"whitespace")(j):(e.enter("data"),I(j))}function I(j){return j===null||j===124||mt(j)?(e.exit("data"),z(j)):(e.consume(j),j===92?D:I)}function D(j){return j===92||j===124?(e.consume(j),I):I(j)}}function cV(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],l=[0,0,0,0],u=!1,f=0,p,m,d;const v=new iV;for(;++n<e.length;){const x=e[n],S=x[1];x[0]==="enter"?S.type==="tableHead"?(u=!1,f!==0&&(c0(v,t,f,p,m),m=void 0,f=0),p={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(n,0,[["enter",p,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(n,0,[["enter",m,t]])),i=S.type==="tableDelimiterRow"?2:m?3:1):i&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],d=_c(v,t,a,i,void 0,d),a=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],d=_c(v,t,a,i,void 0,d)),a=l,l=[a[1],n,0,0])):S.type==="tableHead"?(u=!0,f=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(f=n,a[1]!==0?(l[0]=l[1],d=_c(v,t,a,i,n,d)):l[1]!==0&&(d=_c(v,t,l,i,n,d)),i=0):i&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&c0(v,t,f,p,m),v.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=aV(t.events,n))}return e}function _c(e,t,n,r,i,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Ls(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=Ls(t.events,n[1]);if(a={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const p=Ls(t.events,n[2]),m=Ls(t.events,n[3]),d={type:u,start:Object.assign({},p),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const v=t.events[n[2]],x=t.events[n[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Ls(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function c0(e,t,n,r,i){const a=[],l=Ls(t.events,n);i&&(i.end=Object.assign({},l),a.push(["exit",i,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ls(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dV={name:"tasklistCheck",tokenize:pV};function fV(){return{text:{91:dV}}}function pV(e,t,n){const r=this;return i;function i(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return mt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(f)}function u(f){return We(f)?t(f):tt(f)?e.check({tokenize:hV},t,n)(f):n(f)}}function hV(e,t,n){return it(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function mV(e){return YE([F7(),Y7(),oV(e),lV(),fV()])}const gV={};function yV(e){const t=this,n=e||gV,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(mV(n)),a.push(L7()),l.push(D7(n))}var Hd="Switch",[vV]=Mr(Hd),[xV,wV]=vV(Hd),F_=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:l,disabled:u,value:f="on",onCheckedChange:p,form:m,...d}=e,[v,x]=y.useState(null),S=nt(t,R=>x(R)),k=y.useRef(!1),E=v?m||!!v.closest("form"):!0,[C,P]=oi({prop:i,defaultProp:a??!1,onChange:p,caller:Hd});return h.jsxs(xV,{scope:n,checked:C,disabled:u,children:[h.jsx(Fe.button,{type:"button",role:"switch","aria-checked":C,"aria-required":l,"data-state":H_(C),"data-disabled":u?"":void 0,disabled:u,value:f,...d,ref:S,onClick:Ne(e.onClick,R=>{P(O=>!O),E&&(k.current=R.isPropagationStopped(),k.current||R.stopPropagation())})}),E&&h.jsx(V_,{control:v,bubbles:!k.current,name:r,value:f,checked:C,required:l,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});F_.displayName=Hd;var B_="SwitchThumb",U_=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=wV(B_,n);return h.jsx(Fe.span,{"data-state":H_(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});U_.displayName=B_;var bV="SwitchBubbleInput",V_=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{const l=y.useRef(null),u=nt(l,a),f=jg(n),p=wg(t);return y.useEffect(()=>{const m=l.current;if(!m)return;const d=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(d,"checked").set;if(f!==n&&x){const S=new Event("click",{bubbles:r});x.call(m,n),m.dispatchEvent(S)}},[f,n,r]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:u,style:{...i.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});V_.displayName=bV;function H_(e){return e?"checked":"unchecked"}var W_=F_,kV=U_;const q_=y.forwardRef(({className:e,...t},n)=>h.jsx(W_,{className:Te("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:n,children:h.jsx(kV,{className:Te("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")})}));q_.displayName=W_.displayName;var Wd="Tabs",[SV]=Mr(Wd,[Td]),K_=Td(),[CV,ry]=SV(Wd),G_=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:l="horizontal",dir:u,activationMode:f="automatic",...p}=e,m=ql(u),[d,v]=oi({prop:r,onChange:i,defaultProp:a??"",caller:Wd});return h.jsx(CV,{scope:n,baseId:fn(),value:d,onValueChange:v,orientation:l,dir:m,activationMode:f,children:h.jsx(Fe.div,{dir:m,"data-orientation":l,...p,ref:t})})});G_.displayName=Wd;var Q_="TabsList",Y_=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=ry(Q_,n),l=K_(n);return h.jsx(kS,{asChild:!0,...l,orientation:a.orientation,dir:a.dir,loop:r,children:h.jsx(Fe.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});Y_.displayName=Q_;var Z_="TabsTrigger",J_=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,l=ry(Z_,n),u=K_(n),f=tN(l.baseId,r),p=nN(l.baseId,r),m=r===l.value;return h.jsx(SS,{asChild:!0,...u,focusable:!i,active:m,children:h.jsx(Fe.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":p,"data-state":m?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...a,ref:t,onMouseDown:Ne(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?l.onValueChange(r):d.preventDefault()}),onKeyDown:Ne(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&l.onValueChange(r)}),onFocus:Ne(e.onFocus,()=>{const d=l.activationMode!=="manual";!m&&!i&&d&&l.onValueChange(r)})})})});J_.displayName=Z_;var X_="TabsContent",eN=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...l}=e,u=ry(X_,n),f=tN(u.baseId,r),p=nN(u.baseId,r),m=r===u.value,d=y.useRef(m);return y.useEffect(()=>{const v=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(v)},[]),h.jsx($n,{present:i||m,children:({present:v})=>h.jsx(Fe.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!v,id:p,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:v&&a})})});eN.displayName=X_;function tN(e,t){return`${e}-trigger-${t}`}function nN(e,t){return`${e}-content-${t}`}var EV=G_,rN=Y_,oN=J_,iN=eN;const sN=EV,oy=y.forwardRef(({className:e,...t},n)=>h.jsx(rN,{ref:n,className:Te("inline-flex min-h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));oy.displayName=rN.displayName;const Ri=y.forwardRef(({className:e,...t},n)=>h.jsx(oN,{ref:n,className:Te("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}));Ri.displayName=oN.displayName;const Ds=y.forwardRef(({className:e,...t},n)=>h.jsx(iN,{ref:n,className:Te("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ds.displayName=iN.displayName;const _V="__all__",NV=60;function xK(e,t){var r;return e.nest_id?{kind:"nest",label:`Nest: ${((r=t==null?void 0:t.find(i=>i.id===e.nest_id))==null?void 0:r.name)||`${e.nest_id} (not in your list)`}`,nestId:e.nest_id}:{kind:"all",label:"All your nests"}}function wK(e,t){const n=e.trim();return t===_V?{label:n}:{label:n,nest_id:t}}function TV(e,t){const n=new Set(t.map(r=>(r??"").trim().toLowerCase()));for(let r=1;;r++){const i=r===1?" only":` only ${r}`,l=`${e.trim().slice(0,NV-i.length)}${i}`;if(!n.has(l.toLowerCase()))return l}}const po="<paste-your-api-key-here>";function bK(e){const t=e.reduce((n,r)=>{const i=Number(r.document_count??0);return n+(Number.isFinite(i)?i:0)},0);return{nestCount:e.length,documentCount:t}}function PV(e){return`${e.replace(/\/+$/,"")}/mcp`}function kK(e,t=!1){return["Connect to all my ContextNest nests and treat them as my source of truth.","",`Add one MCP server "contextnest" at: ${PV(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(`
|
|
443
|
+
`)}function jV(e){const{serverUrl:t,apiKey:n,nestId:r}=e;return["# ContextNest — keep this secret. Do not commit this file.",`CONTEXTNEST_SERVER=${t.replace(/\/+$/,"")}`,r?`CONTEXTNEST_NEST=${r}`:null,`CONTEXTNEST_API_KEY=${n}`,""].filter(Boolean).join(`
|
|
444
|
+
`)}function RV(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(`
|
|
445
|
+
`)}function tu(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"nest"}function aN(e,t,n,r=!1){const i=e.replace(/\/+$/,""),a=tu(n);return[`ctx vault add ${a} --url ${i}/nests/${t}/mcp${r?"":" --bearer-env CONTEXTNEST_API_KEY"}`,`ctx query "#tag" --vault ${a}`].join(`
|
|
446
|
+
`)}function OV(e,t,n,r=!1){const i=t.replace(/\/+$/,""),a=`${i}/nests/${n}/mcp`,l=r?"":'-H "Authorization: Bearer $CONTEXTNEST_API_KEY" ',u=r?"":` ${l.trimEnd()}`;return[`Connect to my ContextNest nest "${e}" and treat it as my source of truth.`,"",r?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.",r?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 ${i}/nests/${n}/context \\`,` ${l}-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' "${i}/nests/${n}/export?format=markdown"${u}`," 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' "${i}/nests/${n}/nodes"${u}`,` curl -s -w '\\nHTTP_STATUS:%{http_code}\\n' "${i}/nests/${n}/nodes/<id-from-the-list>"${u}`," 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.",r?null:" 401 the key is missing or wrong. Also check you did not send the literal text",r?null:" `$CONTEXTNEST_API_KEY`: that happens when the command runs without a shell to",r?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 ${i}/nests/${n}/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 ${a}${r?"":" (Bearer header)"}`,...aN(i,n,e,r).split(`
|
|
447
|
+
`).map(f=>` ${f}`)," 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(f=>f!==null).join(`
|
|
448
|
+
`)}function AV(e,t,n=!1){return JSON.stringify({mcpServers:{[tu(e)]:{command:"npx",args:["-y","mcp-remote",t,...n?[]:["--header",`Authorization: Bearer ${po}`]]}}},null,2)}function IV(e,t,n=!1){return`claude mcp add --transport http ${tu(e)} ${t}${n?"":` --header "Authorization: Bearer ${po}"`}`}function MV(e,t,n=!1){return JSON.stringify({mcpServers:{[tu(e)]:{url:t,...n?{}:{headers:{Authorization:`Bearer ${po}`}}}}},null,2)}function LV({isOpen:e,onClose:t,nestId:n,nestName:r,onManageKeys:i}){const{authenticated:a,authMode:l}=ts(),u=typeof window<"u"?window.location.origin:"http://localhost:3838",f=`${u}/nests/${n}/mcp`,p=`${u}/nests/${n}/export?format=markdown`,[m,d]=y.useState(!1),[v,x]=y.useState(!1),[S,k]=y.useState(!1),[E,C]=y.useState(!1),[P,R]=y.useState(!1),[O,B]=y.useState(!1),[A,z]=y.useState(null),I=Wl(),D=a&&l!=="open",{data:j}=MO({enabled:e&&D}),[H,ee]=y.useState(null),[le,oe]=y.useState(null),[G,X]=y.useState(null),ue=((j==null?void 0:j.keys)??[]).filter(pe=>pe.nest_id===n),Z=async pe=>{z(null),ee(pe??"new");try{if(pe){const qe=await Vj({key_id:pe});oe({key:qe.api_key,kind:"rotated"})}else{const qe=TV(r,((j==null?void 0:j.keys)??[]).map(zt=>zt.label)),ze=await Uj({label:qe,nest_id:n});oe({key:ze.api_key,kind:"generated"})}}catch(qe){z((qe==null?void 0:qe.message)||"Couldn't create a key for this nest.")}finally{I.invalidateQueries({queryKey:It.apiKeys().queryKey}),ee(null)}};y.useEffect(()=>{e||z(null)},[e]);const Q=async()=>{z(null),x(!0);try{await lR(n,{nestName:r,includeDrafts:E}),k(!1)}catch(pe){z((pe==null?void 0:pe.message)||"Bundle export failed")}finally{x(!1)}},N=async()=>{z(null),d(!0);try{const pe=await aR(n),qe=URL.createObjectURL(new Blob([pe],{type:"text/markdown"})),ze=document.createElement("a");ze.href=qe,ze.download=`${tu(r)}.md`,document.body.appendChild(ze),ze.click(),ze.remove(),URL.revokeObjectURL(qe)}catch(pe){z((pe==null?void 0:pe.message)||"Export failed")}finally{d(!1)}},M=l==="open",$=AV(r,f,M),_=IV(r,f,M),ie=MV(r,f,M),K=M,ce=!a&&l==="key",ae=K?"":` \\
|
|
449
|
+
-H "Authorization: Bearer ${po}"`,te=`curl -X POST ${u}/nests/${n}/context \\
|
|
450
|
+
-H "Content-Type: application/json"${ae} \\
|
|
451
|
+
-d '{"selector": "#gtm", "hops": 2, "max_tokens": 4000}'`,re=`curl "${u}/nests/${n}/nodes/nodes/<slug>?format=markdown"${ae}`,we=aN(u,n,r,K),Ee=K?`ctx push --server ${u} --nest ${n}`:`CONTEXTNEST_API_KEY=${po} ctx push --server ${u} --nest ${n}`;return h.jsxs(h.Fragment,{children:[h.jsx(Qi,{open:e,onOpenChange:t,children:h.jsxs(ii,{className:"sm:max-w-[640px] max-h-[85vh] flex flex-col overflow-hidden [&>*]:min-w-0",children:[h.jsxs(si,{children:[h.jsxs(ai,{children:["Connect to ",r]}),h.jsx(li,{children:"Use this nest in the app you already have. New to this? Start on the Hootie tab — it's the quickest way in."})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto overflow-x-hidden min-w-0 space-y-4",children:[h.jsxs("div",{className:"rounded-lg border-2 border-primary/30 bg-primary/5 p-3.5",children:[h.jsx("p",{className:"text-sm font-semibold",children:"Now paste into your AI agent or harness"}),h.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."}),h.jsxs("div",{className:"flex flex-wrap gap-2",children:[h.jsxs(ut,{size:"sm",onClick:()=>sa(RV(r),"Chat prompt copied"),children:[h.jsx(KP,{className:"mr-1.5 h-3.5 w-3.5"}),"Chat with this nest"]}),h.jsxs(ut,{size:"sm",onClick:()=>sa(OV(r,u,n,K),"Setup prompt copied"),children:[h.jsx(wj,{className:"mr-1.5 h-3.5 w-3.5"}),"Set up an agent"]})]})]}),ce&&h.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:[h.jsx(zs,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),h.jsx("span",{children:"You're not logged in. Login from the header to generate an API key for external clients."})]}),K&&h.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:[h.jsx(zs,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),h.jsxs("span",{children:["Server is in ",h.jsx("strong",{children:"open"})," mode — anyone on the network can read/write without a key. The snippets below omit the Authorization header."]})]}),A&&h.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:[h.jsx(zs,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),h.jsx("span",{children:A})]}),a&&!K&&h.jsxs("div",{className:"rounded-md border bg-card p-3 space-y-2",children:[h.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[h.jsx(Xx,{className:"h-3.5 w-3.5 shrink-0"}),h.jsx("span",{className:"font-medium truncate",children:"External-client API key"})]}),i&&h.jsx(ut,{variant:"outline",size:"sm",className:"shrink-0",onClick:i,children:"Manage API keys"})]}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"Use the key you already have — an all-nests key works here too. Handing this nest to an agent or integration that shouldn't see anything else? Create a key for this nest only: it works with this nest's MCP URL below, and every other nest, your account and your API keys answer 403. Revoke keys on the API keys page; a key is shown only once, when it's created or rotated."}),ue.length>0?ue.map(pe=>h.jsxs("div",{className:"flex items-center justify-between gap-2 rounded-md border px-2.5 py-1.5",children:[h.jsxs("div",{className:"min-w-0 text-xs",children:[h.jsx("span",{className:"font-medium",children:pe.label||"Untitled key"})," ",h.jsxs("code",{className:"font-mono text-muted-foreground",children:[pe.key_prefix,"…"]})]}),h.jsxs(ut,{size:"sm",variant:"outline",className:"shrink-0",disabled:H!==null,onClick:()=>X({id:pe.id,name:pe.label||"Untitled key"}),children:[H===pe.id?h.jsx(Nr,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):h.jsx(lj,{className:"mr-1.5 h-3.5 w-3.5"}),"Rotate"]})]},pe.id)):h.jsx("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:h.jsxs(ut,{size:"sm",variant:"secondary",className:"shrink-0",disabled:H!==null||!j,onClick:()=>Z(),children:[H?h.jsx(Nr,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):h.jsx(Xx,{className:"mr-1.5 h-3.5 w-3.5"}),"Create a key for this nest only"]})}),h.jsx(An,{label:"This nest's MCP URL",value:f})]}),h.jsxs("button",{type:"button",onClick:()=>R(pe=>!pe),"aria-expanded":P,className:"flex w-full items-center justify-between rounded-lg border px-3 py-2.5 text-sm hover:bg-muted/40",children:[h.jsx("span",{className:"font-medium",children:"Configure a specific client"}),h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:["Hootie · Claude · Cursor · CLI",h.jsx(ri,{className:`h-4 w-4 transition-transform ${P?"rotate-180":""}`})]})]}),P&&h.jsxs(sN,{defaultValue:"hootie",className:"w-full min-w-0",children:[h.jsxs(oy,{className:"grid w-full grid-cols-5 sticky top-0 z-10",children:[h.jsxs(Ri,{value:"hootie",children:[h.jsx(aP,{className:"h-3.5 w-3.5 mr-1"}),"Hootie"]}),h.jsxs(Ri,{value:"claude",children:[h.jsx(ew,{className:"h-3.5 w-3.5 mr-1"}),"Claude"]}),h.jsx(Ri,{value:"mcp",children:"MCP"}),h.jsx(Ri,{value:"api",children:"API"}),h.jsxs(Ri,{value:"cli",children:[h.jsx(tw,{className:"h-3.5 w-3.5 mr-1"}),"CLI"]})]}),h.jsxs(Ds,{value:"hootie",className:"space-y-4 pt-4",children:[h.jsxs("div",{children:[h.jsxs("p",{className:"text-sm mb-3",children:["In Hootie, open"," ",h.jsx("strong",{children:"Settings → ContextNest Vault → Remote Server"})," ","and paste:"]}),h.jsx(An,{label:"Server URL",value:u}),!K&&h.jsx(An,{label:"API Key (paste your generated key)",value:po})]}),h.jsxs("ol",{className:"text-xs text-muted-foreground space-y-1 list-decimal list-inside",children:[h.jsx("li",{children:"Open Hootie"}),h.jsx("li",{children:"Click the gear icon (Settings)"}),h.jsx("li",{children:"Scroll to ContextNest Vault"}),h.jsx("li",{children:'Switch tab to "Remote Server"'}),h.jsxs("li",{children:["Paste the URL",!K&&" + your API Key"," ","above, click Test Vault"]})]})]}),h.jsxs(Ds,{value:"claude",className:"space-y-4 pt-4",children:[h.jsxs("div",{children:[h.jsxs("p",{className:"text-sm mb-3",children:[h.jsx("strong",{children:"Claude Code"})," (the CLI) registers a server with one command — it persists the config itself, no file to find or edit.",!K&&h.jsxs(h.Fragment,{children:[" ","Replace"," ",h.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:po})," ","with your generated key."]})]}),h.jsx(An,{label:"Run in your terminal (Claude Code CLI)",value:_,multiline:!0}),h.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."})]}),h.jsxs("div",{className:"border-t pt-3",children:[h.jsxs("p",{className:"text-sm mb-3",children:["Using ",h.jsx("strong",{children:"Claude Desktop"})," (the GUI app) instead? It has no CLI, so add this to your"," ",h.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"claude_desktop_config.json"}),!K&&h.jsxs(h.Fragment,{children:[" ","(replace"," ",h.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:po})," ","with your generated key):"]})]}),h.jsx(An,{label:"Claude Desktop config (via mcp-remote bridge)",value:$,multiline:!0}),h.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Location:"," ",h.jsx("code",{className:"text-[10px]",children:"%APPDATA%\\Claude\\claude_desktop_config.json"})," ","(Windows) or"," ",h.jsx("code",{className:"text-[10px]",children:"~/Library/Application Support/Claude/claude_desktop_config.json"})," ","(Mac)"]}),h.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Claude Desktop config runs a local command, so this uses"," ",h.jsx("code",{className:"text-[10px]",children:"mcp-remote"})," to bridge to the server's HTTP endpoint — you need"," ",h.jsx("a",{href:"https://nodejs.org",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Node.js"})," ","installed (it provides"," ",h.jsx("code",{className:"text-[10px]",children:"npx"}),"). Restart Claude Desktop after editing; the nest's context tools then appear in the tools panel."]})]})]}),h.jsxs(Ds,{value:"mcp",className:"space-y-4 pt-4",children:[h.jsxs("div",{children:[h.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.",!K&&h.jsxs(h.Fragment,{children:[" ","Replace"," ",h.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:po})," ","with your generated key."]})]}),h.jsx(An,{label:"Direct HTTP config (Cursor, VS Code, Claude Code — not Claude Desktop)",value:ie,multiline:!0}),h.jsx(An,{label:`From the ctx CLI (2.2+)${K?"":" — export CONTEXTNEST_API_KEY first"}`,value:we,multiline:!0})]}),h.jsxs("div",{className:"text-xs text-muted-foreground space-y-2",children:[h.jsx("p",{className:"font-medium",children:"Available tools:"}),h.jsxs("div",{className:"grid grid-cols-2 gap-x-4 font-mono text-[11px]",children:[h.jsx("span",{children:"context_init"}),h.jsx("span",{children:"context_resolve"}),h.jsx("span",{children:"context_overview"}),h.jsx("span",{children:"context_create"}),h.jsx("span",{children:"context_search"}),h.jsx("span",{children:"context_update"}),h.jsx("span",{children:"context_query"}),h.jsx("span",{children:"context_export"}),h.jsx("span",{children:"context_get"}),h.jsx("span",{children:"context_comments"}),h.jsx("span",{children:"context_list"}),h.jsx("span",{children:"context_stewards"}),h.jsx("span",{children:"context_review_queue"}),h.jsx("span",{children:"context_my_drafts"}),h.jsx("span",{children:"context_submit_review"}),h.jsx("span",{children:"context_approve"}),h.jsx("span",{children:"context_reject"}),h.jsx("span",{children:"context_versions"}),h.jsx("span",{children:"context_assign_steward"}),h.jsx("span",{children:"context_request_deletion"}),h.jsx("span",{children:"context_deletion_queue"}),h.jsx("span",{children:"context_resolve_deletion"}),h.jsx("span",{children:"context_share_nest"}),h.jsx("span",{children:"context_unsynced_list"}),h.jsx("span",{children:"context_sync_folder"})]})]})]}),h.jsxs(Ds,{value:"api",className:"space-y-4 pt-4",children:[h.jsxs("div",{children:[h.jsxs("p",{className:"text-sm mb-3",children:["Deterministic retrieval over plain HTTP — the same selector and ",h.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 (",h.jsx("code",{className:"text-[11px]",children:"hops_used"}),","," ",h.jsx("code",{className:"text-[11px]",children:"nodes_traversed"}),") so you can audit exactly what was pulled."]}),h.jsx(An,{label:"Query + N-hop graph context (POST /context)",value:te,multiline:!0}),h.jsx(An,{label:"Single document (GET, deterministic by id)",value:re,multiline:!0})]}),h.jsxs("div",{className:"text-xs text-muted-foreground space-y-2",children:[h.jsx("p",{className:"font-medium",children:"Selector grammar:"}),h.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-[11px]",children:[h.jsx("span",{children:"#tag"}),h.jsx("span",{className:"font-sans",children:"nodes carrying a tag"}),h.jsx("span",{children:"type:document"}),h.jsx("span",{className:"font-sans",children:"nodes of a type"}),h.jsx("span",{children:"[[Title]]"}),h.jsx("span",{className:"font-sans",children:"a node by title"}),h.jsx("span",{children:"scope:team"}),h.jsx("span",{className:"font-sans",children:"nodes by visibility scope"}),h.jsx("span",{children:"+AND · |OR · -NOT"}),h.jsx("span",{className:"font-sans",children:"combine selectors"})]}),h.jsxs("p",{className:"pt-1",children:[h.jsx("span",{className:"font-medium",children:"Hops"})," controls graph traversal from the matches:"," ",h.jsx("code",{className:"text-[11px]",children:"1"})," = matches + directly linked nodes (single hop),"," ",h.jsx("code",{className:"text-[11px]",children:"2"})," (default) and up follow wiki-links further out for multi-hop context."," ",h.jsx("code",{className:"text-[11px]",children:"max_tokens"})," caps the payload; the response reports what was truncated."]}),h.jsxs("p",{children:["Also useful:"," ",h.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:"POST /query"})," ","(matches + snippets, no bodies),"," ",h.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"," ",h.jsxs("code",{className:"text-[11px] bg-muted px-1 rounded",children:["/nests/","<nest-id>","/…"]})]})]})]}),h.jsxs(Ds,{value:"cli",className:"space-y-4 pt-4",children:[h.jsxs("div",{children:[h.jsxs("p",{className:"text-sm mb-3",children:["Read this nest from the shell, or push a local vault into it, with the"," ",h.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"ctx"})," ","CLI",!K&&h.jsxs(h.Fragment,{children:[" ","(export"," ",h.jsx("code",{className:"text-[11px] bg-muted px-1 rounded",children:"CONTEXTNEST_API_KEY"})," ","first — the key never goes on the command line)"]}),":"]}),h.jsx(An,{label:"Install",value:"npm i -g @promptowl/contextnest-cli"}),h.jsx(An,{label:"Register this nest as a vault alias, then query it",value:we,multiline:!0}),h.jsx(An,{label:"Push a local vault into this nest",value:Ee,multiline:!0})]}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:[h.jsx("code",{className:"text-[10px]",children:"query"}),","," ",h.jsx("code",{className:"text-[10px]",children:"read"}),","," ",h.jsx("code",{className:"text-[10px]",children:"list"})," and"," ",h.jsx("code",{className:"text-[10px]",children:"search"})," accept"," ",h.jsx("code",{className:"text-[10px]",children:"--vault <alias>"})," ","once the alias exists (ctx 2.2+). Full CLI reference lives in the ContextNest docs."]})]})]}),P&&h.jsxs("div",{className:"border-t pt-3",children:[h.jsx("p",{className:"mb-2 text-sm font-medium",children:"Get the apps"}),h.jsxs("div",{className:"grid gap-2 sm:grid-cols-3",children:[h.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:[h.jsx(ew,{className:"h-4 w-4 shrink-0"})," Desktop app"]}),h.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:[h.jsx(tw,{className:"h-4 w-4 shrink-0"})," ctx CLI"]}),h.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:[h.jsx(cc,{className:"h-4 w-4 shrink-0"})," Self-hosted"]})]})]}),h.jsxs("button",{type:"button",onClick:()=>B(pe=>!pe),"aria-expanded":O,className:"flex w-full items-center justify-between rounded-lg border px-3 py-2.5 text-sm hover:bg-muted/40",children:[h.jsx("span",{className:"font-medium",children:"Export & nest details"}),h.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:["Markdown · .zip · Nest ID",h.jsx(ri,{className:`h-4 w-4 transition-transform ${O?"rotate-180":""}`})]})]}),O&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"border-t pt-3 space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[h.jsx(Tc,{className:"h-3.5 w-3.5 shrink-0"}),h.jsx("span",{className:"font-medium truncate",children:"Export as markdown"})]}),h.jsx(ut,{variant:"outline",size:"sm",className:"shrink-0",onClick:N,disabled:m,"aria-label":"Download this nest as a single markdown file",children:m?h.jsx(Nr,{className:"h-3.5 w-3.5 animate-spin"}):h.jsxs(h.Fragment,{children:[h.jsx(Tc,{className:"h-3.5 w-3.5 mr-1"}),"Download .md"]})})]}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"Frontmatter + body, one file. Approved versions only. Agents can fetch this URL directly."}),h.jsx(An,{label:"Export URL (text/markdown)",value:p})]}),h.jsxs("div",{className:"border-t pt-3 space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[h.jsx(cc,{className:"h-3.5 w-3.5 shrink-0"}),h.jsx("span",{className:"font-medium truncate",children:"Portability bundle"})]}),h.jsxs(ut,{variant:"outline",size:"sm",className:"shrink-0",onClick:()=>k(!0),"aria-label":"Export this nest as a portable .zip bundle",children:[h.jsx(cc,{className:"h-3.5 w-3.5 mr-1"}),"Export .zip"]})]}),h.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."})]}),h.jsx("div",{className:"border-t pt-3",children:h.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[h.jsx("span",{children:"Nest ID:"}),h.jsx("code",{className:"flex-1 bg-muted px-2 py-1 rounded text-[11px] font-mono truncate",children:n}),h.jsx(lN,{value:n})]})})]})]})]})}),h.jsx(Qi,{open:S,onOpenChange:pe=>!v&&k(pe),children:h.jsxs(ii,{className:"sm:max-w-[420px]",children:[h.jsxs(si,{children:[h.jsxs(ai,{className:"flex items-center gap-2",children:[h.jsx(cc,{className:"h-5 w-5"}),"Export portability bundle"]}),h.jsxs(li,{children:["Downloads a ",h.jsx("code",{children:".zip"})," of this nest's documents. On another ContextNest host, unzip it and bring it in with the existing"," ",h.jsx("strong",{children:"Import Folder"})," button."]})]}),h.jsxs("div",{className:"flex items-start justify-between gap-3 py-2",children:[h.jsxs("div",{className:"space-y-0.5",children:[h.jsx(ca,{htmlFor:"include-drafts",className:"text-sm font-medium",children:"Include draft documents"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"Off: approved / published documents only. On: also export unapproved drafts."})]}),h.jsx(q_,{id:"include-drafts",checked:E,onCheckedChange:C})]}),A&&h.jsx("p",{className:"text-sm text-destructive",children:A}),h.jsxs(kd,{children:[h.jsx(ut,{variant:"outline",onClick:()=>k(!1),disabled:v,children:"Cancel"}),h.jsxs(ut,{onClick:Q,disabled:v,children:[v?h.jsx(Nr,{className:"h-4 w-4 mr-2 animate-spin"}):h.jsx(Tc,{className:"h-4 w-4 mr-2"}),"Download .zip"]})]})]})}),le&&h.jsx($V,{apiKey:le.key,kind:le.kind,nestId:n,scopedTo:{nestName:r,mcpUrl:f},onClose:()=>oe(null)}),h.jsx(DV,{target:G,onConfirm:pe=>Z(pe),onClose:()=>X(null)})]})}function DV({target:e,onConfirm:t,onClose:n}){return e?h.jsx(OF,{open:!0,onOpenChange:r=>!r&&n(),title:`Rotate "${e.name}"?`,description:"The current key stops working immediately — anything still using it needs the new one.",confirmLabel:"Rotate key",destructive:!0,onConfirm:async()=>{await t(e.id)}}):null}function $V({apiKey:e,kind:t,onClose:n,nestId:r,scopedTo:i}){const[a,l]=y.useState(!1),u=async()=>{await sa(e)&&(l(!0),setTimeout(()=>l(!1),1500))},f=()=>{const p=typeof window<"u"?window.location.origin:"http://localhost:3838",m=URL.createObjectURL(new Blob([jV({serverUrl:p,apiKey:e,nestId:r})],{type:"text/plain"})),d=document.createElement("a");d.href=m,d.download="contextnest.env",document.body.appendChild(d),d.click(),d.remove(),URL.revokeObjectURL(m)};return h.jsx(Qi,{open:!0,onOpenChange:n,children:h.jsxs(ii,{className:"sm:max-w-[480px]",children:[h.jsxs(si,{children:[h.jsxs(ai,{className:"flex items-center gap-2",children:[h.jsx(mj,{className:"h-4 w-4 text-amber-700"}),t==="generated"?"API key generated":"API key rotated"]}),h.jsxs(li,{children:["This key is shown ",h.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"&&h.jsxs(h.Fragment,{children:[" ","Your previous key has been invalidated and will stop working immediately."]})]})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("code",{className:"flex-1 bg-muted px-3 py-2 rounded text-xs font-mono break-all",children:e}),h.jsx(ut,{size:"sm",variant:"outline",onClick:u,children:a?h.jsx(pa,{className:"h-3.5 w-3.5 text-green-600"}):h.jsx(Am,{className:"h-3.5 w-3.5"})})]}),h.jsxs(ut,{variant:"outline",size:"sm",className:"w-full",onClick:f,children:[h.jsx(Tc,{className:"mr-1.5 h-3.5 w-3.5"}),"Download .env"]}),i&&h.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:[h.jsxs("p",{className:"mb-1.5",children:["This key works for ",h.jsx("strong",{children:i.nestName})," only. Use it with this nest's MCP URL — other nests, your account and your API keys refuse it."]}),h.jsx(An,{label:"MCP URL",value:i.mcpUrl})]}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:["Copy it, or download a ready"," ",h.jsx("code",{className:"text-[11px]",children:".env"})," (server URL + key) to hand your agent. Keep it secret — don't commit it."]})]}),h.jsx("div",{className:"flex justify-end pt-2",children:h.jsx(ut,{onClick:n,children:"I've saved it — close"})})]})})}function An({label:e,value:t,multiline:n}){return h.jsxs("div",{className:"mb-3 min-w-0",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1 min-w-0",children:[h.jsx("span",{className:"text-xs font-medium text-muted-foreground truncate",children:e}),h.jsx(lN,{value:t})]}),h.jsx("pre",{className:`${n?"p-3":"px-3 py-2"} bg-muted rounded text-xs font-mono min-w-0 ${n?"whitespace-pre overflow-x-auto":"whitespace-pre-wrap break-all"}`,children:t})]})}function lN({value:e}){const[t,n]=y.useState(!1),r=async()=>{await sa(e)&&(n(!0),setTimeout(()=>n(!1),1500))};return h.jsx(ut,{variant:"ghost",size:"sm",className:"h-6 px-2",onClick:r,children:t?h.jsx(pa,{className:"h-3 w-3 text-green-600"}):h.jsx(Am,{className:"h-3 w-3"})})}function zV(e){return e==="new"}function FV({existingAdmin:e,onClose:t}){const{loginSuccess:n}=ts(),[r,i]=y.useState("promptowl"),[a,l]=y.useState(""),[u,f]=y.useState(""),[p,m]=y.useState(!1),[d,v]=y.useState(null),[x,S]=y.useState(null),[k,E]=y.useState(null),[C,P]=y.useState(!1),[R,O]=y.useState(!1),[B,A]=y.useState(null),[z,I]=y.useState("open"),D=typeof window<"u"&&new URLSearchParams(window.location.search).has("admin"),j=z==="open"||z==="admin-only"&&D,H=j?r:"password";y.useEffect(()=>{let G=!1;return bl().then(X=>{G||I(X.promptowl_sign_in_gate??"open")}).catch(()=>{}),()=>{G=!0}},[]);const ee=async()=>{k&&await sa(k)&&(P(!0),setTimeout(()=>P(!1),1500))},le=async()=>{v(null),m(!0);try{const G=await G0();S(G.verificationUrl),E(G.deviceCode),window.open(G.verificationUrl,"_blank","noopener,noreferrer");for(let X=0;X<180;X++){await new Promise(Q=>setTimeout(Q,2e3));const ue=await Q0(G.deviceCode,G.clientSecret);if(ue.status==="approved"&&ue.token){const Q=await Y0(ue.token);if(n(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){A({info:Q.claim_blocked,attemptedEmail:Q.user.email}),S(null),E(null),m(!1);return}t();return}if(ue.status==="pending")continue;const Z=ue.status==="denied"||ue.status==="rejected"?"Login request was denied. Please try again to create a new authentication request.":ue.status==="expired"?"Login expired. Try again.":ue.status==="cancelled"?"Login cancelled. Try again.":`Login failed (status: ${ue.status}). Try again.`;v(Z),S(null),E(null),m(!1);return}v("Login timed out waiting for approval. Try again."),S(null),E(null),m(!1)}catch(G){v(G.message),S(null),E(null),m(!1)}},oe=async G=>{G.preventDefault(),v(null),m(!0);try{const X=await K0(a,u);n(X.user?{email:X.user.email,name:X.user.name,is_admin:!!X.user.is_admin}:void 0),t()}catch(X){v(X.message),m(!1)}};return h.jsx(Qi,{open:!0,onOpenChange:t,children:h.jsxs(ii,{className:"sm:max-w-[420px]",children:[h.jsxs(si,{children:[h.jsxs(ai,{className:"flex items-center gap-2",children:[h.jsx(ud,{className:"h-4 w-4"}),"Login"]}),h.jsx(li,{children:e?`This server is administered by ${e}. Login to manage settings and teammates.`:"Login with your account."})]}),h.jsxs("div",{className:"space-y-4 pt-2",children:[d&&h.jsxs(Yc,{variant:"destructive",children:[h.jsx(zs,{className:"h-4 w-4"}),h.jsx(Zc,{children:d})]}),B&&h.jsxs(Yc,{variant:"destructive",children:[h.jsx(ld,{className:"h-4 w-4"}),h.jsx(Zc,{children:B.info.reason==="license_required"?h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"font-medium",children:"Admin claim blocked — no license installed."}),h.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."}),h.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",h.jsx(Sh,{className:"h-3 w-3"})]})]}):h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"font-medium",children:"Admin claim blocked — email does not match license owner."}),h.jsxs("p",{className:"text-xs",children:["License owner:"," ",h.jsx("code",{className:"font-mono",children:B.info.license_owner_email||"(unknown)"})]}),h.jsxs("p",{className:"text-xs",children:["You logged in as:"," ",h.jsx("code",{className:"font-mono",children:B.attemptedEmail})]}),h.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."})]})})]}),H==="promptowl"?h.jsxs(h.Fragment,{children:[h.jsx(ut,{onClick:le,disabled:p,className:"w-full",children:p&&x?h.jsxs(h.Fragment,{children:[h.jsx(Nr,{className:"h-4 w-4 mr-2 animate-spin"}),"Waiting for approval..."]}):"Login with PromptOwl"}),x&&h.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 space-y-2",children:[h.jsxs("p",{className:"text-xs text-muted-foreground",children:["A new tab opened at"," ",h.jsxs("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary underline",children:["PromptOwl",h.jsx(Sh,{className:"h-3 w-3"})]}),". If it asks for a verification code, use this:"]}),k&&h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("code",{className:"flex-1 bg-background border rounded px-2 py-1.5 text-xs font-mono break-all",children:k}),h.jsx(ut,{size:"sm",variant:"outline",onClick:ee,children:C?h.jsx(pa,{className:"h-3.5 w-3.5 text-green-600"}):h.jsx(Am,{className:"h-3.5 w-3.5"})})]})]}),!x&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-0 flex items-center",children:h.jsx("div",{className:"w-full border-t border-border"})}),h.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:h.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"or"})})]}),h.jsx(ut,{variant:"outline",className:"w-full",onClick:()=>i("password"),children:"Use email + password"})]})]}):h.jsxs("form",{onSubmit:oe,className:"space-y-3",children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx(ca,{children:"Email"}),h.jsx(Jc,{type:"email",value:a,onChange:G=>l(G.target.value),required:!0,autoFocus:!0})]}),h.jsxs("div",{className:"space-y-1",children:[h.jsx(ca,{children:"Password"}),h.jsxs("div",{className:"relative",children:[h.jsx(Jc,{type:R?"text":"password",value:u,onChange:G=>f(G.target.value),required:!0,className:"pr-9"}),h.jsx("button",{type:"button",onClick:()=>O(G=>!G),"aria-label":R?"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:R?h.jsx(D0,{className:"h-4 w-4"}):h.jsx($0,{className:"h-4 w-4"})})]})]}),h.jsx(ut,{type:"submit",disabled:p,className:"w-full",children:p?h.jsx(Nr,{className:"h-4 w-4 animate-spin"}):"Login"}),j&&h.jsx("button",{type:"button",onClick:()=>i("promptowl"),className:"w-full text-xs text-muted-foreground hover:text-foreground",children:"← Back to PromptOwl login"})]})]})]})})}function BV({onActivated:e}){const[t,n]=y.useState(""),[r,i]=y.useState(!1),[a,l]=y.useState(null),[u,f]=y.useState(null),p=async()=>{const m=t.trim();if(!m.startsWith("pk_")){l("License key must start with pk_");return}l(null),f(null),i(!0);try{const d=await Dj(m);if(!d.valid){l(d.error||"PromptOwl rejected this key.");return}if(d.warning){f(d.warning);return}e()}catch(d){l(d instanceof Error?d.message:"Failed to install key")}finally{i(!1)}};return h.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:h.jsxs("div",{className:"w-full max-w-lg space-y-6",children:[h.jsxs("div",{className:"text-center space-y-2",children:[h.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-primary/10",children:h.jsx(yj,{className:"h-6 w-6 text-primary"})}),h.jsx("h1",{className:"text-2xl font-bold",children:"Activate ContextNest Community"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"This server is in setup mode. Paste a PromptOwl license key to unlock write access."})]}),h.jsxs("div",{className:"border rounded-lg p-6 space-y-4 bg-card",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(ca,{htmlFor:"license-key",children:"License key"}),h.jsx(Jc,{id:"license-key","data-testid":"license-setup-key-input",placeholder:"pk_...",value:t,autoFocus:!0,onChange:m=>{n(m.target.value),a&&l(null)},onKeyDown:m=>{m.key==="Enter"&&!r&&p()},className:"font-mono"}),a&&h.jsx("p",{className:"text-sm text-destructive","data-testid":"license-setup-error",children:a}),u&&h.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:[h.jsx("p",{className:"font-medium",children:"License not saved"}),h.jsx("p",{children:u})]})]}),u?h.jsx(ut,{className:"w-full",variant:"outline",onClick:e,"data-testid":"license-setup-continue",children:"Continue anyway (key lost on restart)"}):h.jsx(ut,{className:"w-full",onClick:p,disabled:r||!t.trim(),"data-testid":"license-setup-submit",children:r?h.jsxs(h.Fragment,{children:[h.jsx(Nr,{className:"h-4 w-4 mr-2 animate-spin"}),"Validating..."]}):h.jsxs(h.Fragment,{children:[h.jsx(ld,{className:"h-4 w-4 mr-2"}),"Activate Server"]})})]}),h.jsxs("div",{className:"text-sm text-muted-foreground space-y-2 border rounded-lg p-4 bg-muted/30",children:[h.jsx("p",{className:"font-medium text-foreground",children:"Need a key?"}),h.jsxs("ol",{className:"list-decimal list-inside space-y-1",children:[h.jsxs("li",{children:["Sign up free at"," ",h.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",h.jsx(Sh,{className:"h-3 w-3"})]})]}),h.jsx("li",{children:"Open Overview > Community License"}),h.jsx("li",{children:"Generate a key and paste it above"})]}),h.jsx("p",{className:"text-xs pt-2",children:"Reads stay available without a license. Writes (nest/node create, update, delete) require activation."})]})]})})}function UV(e,t){const n=t.toLowerCase().split(/\s+/).filter(Boolean);return n.length===0?[]:e.filter(r=>{const i=`${r.name??""} ${r.description??""} ${r.id??""}`.toLowerCase();return n.every(a=>i.includes(a))}).sort((r,i)=>+!!i.pinned-+!!r.pinned).map(r=>({id:r.id,title:r.name??r.id,description:r.description??null}))}const wh=20;function VV(e,t){const n=t.trim().split(/\s+/).filter(Boolean);if(n.length===0)return e;const r=new RegExp(`(${n.map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})`,"gi"),i=n.map(a=>a.toLowerCase());return e.split(r).map((a,l)=>a&&i.includes(a.toLowerCase())?h.jsx("mark",{className:"bg-yellow-200 dark:bg-yellow-700/60 rounded-sm px-0.5",children:a},l):a)}function d0({active:e,onClick:t,label:n}){return h.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:n})}function HV({nestId:e,nestName:t,nestOnly:n=!1,onSelect:r,onClose:i}){const[a,l]=y.useState(""),[u,f]=y.useState(!1),[p,m]=y.useState([]),[d,v]=y.useState(0),[x,S]=y.useState(!1),[k,E]=y.useState(0),C=y.useRef(null),P=y.useRef(null),R=Wl(),O=!e||u,B=!!e&&!n;y.useEffect(()=>{var D;(D=C.current)==null||D.focus()},[]),y.useEffect(()=>{const D=j=>{j.key==="Escape"&&i()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[i]),y.useEffect(()=>(P.current&&clearTimeout(P.current),P.current=setTimeout(async()=>{const D=a.trim();if(!D){m([]),E(0);return}S(!0);try{if(O){const[j,H]=await Promise.all([R.fetchQuery(It.nestList()).then(ee=>UV((ee==null?void 0:ee.nests)??[],D).map(le=>({...le,kind:"nest"}))).catch(()=>[]),R.fetchQuery(It.globalSearch(D,wh)).then(ee=>(E(ee.count),ee.nodes.map(le=>({...le,kind:"node"})))).catch(()=>(E(0),[]))]);m([...j.slice(0,4),...H.slice(0,wh)])}else{const j=await oR(e,D);E(j.nodes.length),m(j.nodes.slice(0,wh).map(H=>({...H,kind:"node",nest_id:H.nest_id??e,nest_name:H.nest_name??t})))}v(0)}catch{m([]),E(0)}finally{S(!1)}},a.trim()?250:0),()=>{P.current&&clearTimeout(P.current)}),[e,t,O,a,R]);const A=D=>{const j=p[D];j&&r(j.id,j)},z=p.filter(D=>D.kind==="node").length,I=()=>x?"Searching…":a.trim()?!O&&B?h.jsxs(h.Fragment,{children:["No matches in ",t??"this nest","."," ",h.jsx("button",{type:"button",onClick:()=>f(!0),className:"font-medium text-foreground underline underline-offset-2 hover:no-underline","data-testid":"quick-open-widen-scope",children:"Search all nests"})]}):"No matches":O?"Type to search nests and documents…":`Type to search ${t??"this nest"}…`;return h.jsx("div",{className:"fixed inset-0 z-50 bg-black/30 flex items-start justify-center pt-[15vh]",onClick:i,children:h.jsxs("div",{className:"w-full max-w-lg rounded-lg border bg-background shadow-xl overflow-hidden",onClick:D=>D.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center gap-2 border-b px-3",children:[x?h.jsx(Nr,{className:"h-4 w-4 text-muted-foreground animate-spin"}):h.jsx(Im,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("input",{ref:C,value:a,onChange:D=>l(D.target.value),onKeyDown:D=>{D.key==="Tab"&&B&&(D.preventDefault(),f(j=>!j)),D.key==="ArrowDown"&&(D.preventDefault(),v(j=>Math.min(j+1,p.length-1))),D.key==="ArrowUp"&&(D.preventDefault(),v(j=>Math.max(j-1,0))),D.key==="Enter"&&(D.preventDefault(),A(d))},placeholder:O?"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"}),h.jsx("kbd",{className:"text-[10px] text-muted-foreground border rounded px-1",children:"esc"})]}),h.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-1.5 text-xs text-muted-foreground",children:[h.jsx("span",{children:"Searching"}),e&&!B?h.jsx("span",{className:"font-medium text-foreground",children:t??"this nest"}):e?h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(d0,{active:!u,onClick:()=>f(!1),label:t?`This nest — ${t}`:"This nest"}),h.jsx(d0,{active:u,onClick:()=>f(!0),label:"All nests"}),h.jsx("kbd",{className:"rounded border px-1 text-[10px]",children:"tab"})]}):h.jsx("span",{className:"font-medium text-foreground",children:"all nests"})]}),h.jsx("div",{className:"max-h-72 overflow-y-auto py-1",children:p.length===0?h.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:I()}):p.map((D,j)=>{var H;return h.jsxs(y.Fragment,{children:[D.kind!==((H=p[j-1])==null?void 0:H.kind)&&h.jsx("div",{className:"px-3 pb-0.5 pt-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:D.kind==="nest"?"Nests":"Documents"}),h.jsxs("button",{type:"button",className:`flex w-full items-start gap-2 px-3 py-2 text-left text-sm ${j===d?"bg-muted":"hover:bg-muted/50"}`,onMouseEnter:()=>v(j),onClick:()=>A(j),children:[D.kind==="nest"?h.jsx(Ul,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"}):h.jsx(Vl,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"truncate font-medium",children:D.title}),D.kind==="nest"?h.jsx("span",{className:"ml-auto text-xs text-muted-foreground shrink-0",children:"Nest"}):O&&D.nest_name?h.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground shrink-0",children:D.nest_name}):D.tags&&D.tags.length>0&&h.jsx("span",{className:"ml-auto truncate text-xs text-muted-foreground",children:D.tags.slice(0,3).join(" ")})]}),D.kind==="node"&&D.snippet&&a.trim()&&h.jsx("div",{className:"mt-0.5 line-clamp-2 text-xs text-muted-foreground",children:VV(D.snippet,a)})]})]})]},`${D.kind}:${D.nest_id??""}${D.id}`)})}),z>0&&k>z&&h.jsxs("div",{className:"border-t px-3 py-2 text-xs text-muted-foreground",children:["Showing ",z," of ",k," matching documents — keep typing to narrow."]})]})})}const ll=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform)?"⌘":"Ctrl",WV=[{title:"Anywhere",items:[[`${ll} 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:[[`${ll} B`,"Bold"],[`${ll} I`,"Italic"],[`${ll} Z`,"Undo"],[`${ll} ⇧ Z`,"Redo"],["# / ## / ###","Heading, typed at the start of a line"],["[[","Link to another document"],["@","Mention a person"]]}];function qV({onClose:e}){return h.jsx(Qi,{open:!0,onOpenChange:e,children:h.jsxs(ii,{className:"sm:max-w-[480px]",children:[h.jsxs(si,{children:[h.jsx(ai,{children:"Keyboard shortcuts"}),h.jsxs(li,{children:["Press ",h.jsx("kbd",{className:"rounded border px-1",children:"?"})," anywhere to bring this back."]})]}),h.jsx("div",{className:"space-y-4",children:WV.map(t=>h.jsxs("div",{children:[h.jsx("div",{className:"mb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:t.title}),h.jsx("dl",{className:"space-y-1",children:t.items.map(([n,r])=>h.jsxs("div",{className:"flex items-baseline gap-3 text-sm",children:[h.jsx("dt",{className:"w-32 shrink-0",children:h.jsx("kbd",{className:"rounded border bg-muted px-1.5 py-0.5 text-xs",children:n})}),h.jsx("dd",{className:"text-muted-foreground",children:r})]},n))})]},t.title))})]})})}const KV=/\[\[([^\]\n]*)$/,GV=/(?:^|\s)@([\w.@+-]*)$/;function uN(e){const t=KV.exec(e);if(t)return{kind:"wiki",query:t[1],length:t[0].length};const n=GV.exec(e);if(n){const r=/^\s/.test(n[0])?1:0;return{kind:"mention",query:n[1],length:n[0].length-r}}return null}function cN(e){const t=e.email.toLowerCase();return[t,t.split("@")[0],(e.name||"").toLowerCase()].filter(Boolean)}function QV(e,t,n=8){const r=t.trim().toLowerCase();return e.filter(i=>!r||cN(i).some(a=>a.includes(r))).slice(0,n)}function YV(e,t){const n=t.trim().toLowerCase();return n?e.some(r=>r.email.toLowerCase()===n)?!0:e.filter(r=>cN(r).includes(n)).length===1:!1}function ZV(e,t,n){const r=e.slice(0,t),i=uN(r);if(!i||i.kind!=="mention")return null;const a=t-i.length,l=`@${n} `,u=e.slice(t),f=u.startsWith(" ")?u.slice(1):u;return{value:e.slice(0,a)+l+f,caret:a+l.length}}const f0=/((?:```[\s\S]*?```)|(?:`[^`\n]*`))|(?:(^|\s)@(?:\(([^)]+)\)|([a-zA-Z0-9._@-]+)))/g;function JV(e,t){const n=[],r=e||"",i=t.length>0;let a=0;const l=f=>{if(!f)return;const p=n[n.length-1];(p==null?void 0:p.kind)==="text"?p.text+=f:n.push({kind:"text",text:f})};f0.lastIndex=0;let u;for(;(u=f0.exec(r))!==null;){const[f,p,m,d,v]=u;if(p){l(r.slice(a,u.index+f.length)),a=u.index+f.length;continue}const x=(d||v||"").trim(),S=u.index+(m?m.length:0);l(r.slice(a,S)),n.push({kind:"mention",text:r.slice(S,u.index+f.length),name:x,resolved:!i||YV(t,x)}),a=u.index+f.length}return l(r.slice(a)),n}const XV=y.forwardRef(function({value:t,onValueChange:n,members:r,className:i,onKeyDown:a,...l},u){var B,A,z;const f=y.useRef(null),[p,m]=y.useState(0),[d,v]=y.useState(!1),[x,S]=y.useState(0),k=I=>{f.current=I,typeof u=="function"?u(I):u&&(u.current=I)},E=y.useMemo(()=>{if(!d)return null;const I=uN(t.slice(0,p));return(I==null?void 0:I.kind)==="mention"?I:null},[d,t,p]),C=(z=(A=(B=ts().adminStatus)==null?void 0:B.me)==null?void 0:A.email)==null?void 0:z.toLowerCase(),P=y.useMemo(()=>E?QV(r.filter(I=>I.email.toLowerCase()!==C),E.query):[],[E,r,C]);y.useEffect(()=>S(0),[E==null?void 0:E.query,P.length]);const R=I=>{const D=f.current,j=ZV(t,p,I);j&&(n(j.value),v(!1),requestAnimationFrame(()=>{D&&(D.focus(),D.setSelectionRange(j.caret,j.caret),m(j.caret))}))},O=!!E&&P.length>0;return h.jsxs("div",{className:"relative",children:[h.jsx("textarea",{...l,ref:k,value:t,className:i,onChange:I=>{n(I.target.value),m(I.target.selectionStart??I.target.value.length),v(!0)},onKeyUp:I=>m(I.target.selectionStart??0),onPaste:I=>{const D=I.currentTarget;requestAnimationFrame(()=>m(D.selectionStart??0))},onClick:I=>m(I.target.selectionStart??0),onBlur:()=>v(!1),onKeyDown:I=>{if(O){if(I.key==="ArrowDown"){I.preventDefault(),S(D=>(D+1)%P.length);return}if(I.key==="ArrowUp"){I.preventDefault(),S(D=>D<=0?P.length-1:D-1);return}if(I.key==="Enter"||I.key==="Tab"){I.preventDefault();const D=P[x]??P[0];D&&R(D.email);return}if(I.key==="Escape"){I.stopPropagation(),v(!1);return}}a==null||a(I)}}),O&&h.jsx("ul",{role:"listbox",className:"absolute left-0 right-0 top-full z-50 mt-1 max-h-48 overflow-auto rounded-md border bg-popover py-1 text-popover-foreground shadow-md","data-testid":"mention-picker",children:P.map((I,D)=>h.jsx("li",{children:h.jsxs("button",{type:"button",role:"option","aria-selected":D===x,onMouseDown:j=>{j.preventDefault(),R(I.email)},onMouseEnter:()=>S(D),className:Te("flex w-full flex-col items-start px-3 py-1.5 text-left text-sm",D===x?"bg-accent text-accent-foreground":""),children:[h.jsx("span",{className:"truncate font-medium",children:I.name||I.email.split("@")[0]}),h.jsx("span",{className:"truncate text-xs text-muted-foreground",children:I.email})]})},I.email))})]})});function SK({body:e,members:t,className:n}){const r=y.useMemo(()=>JV(e,t),[e,t]);return h.jsx("div",{className:Te("whitespace-pre-wrap",n),children:r.map((i,a)=>i.kind==="text"?h.jsx("span",{children:i.text},a):h.jsx("span",{className:i.resolved?"rounded bg-primary/10 px-0.5 font-medium text-primary":"rounded bg-muted px-0.5 text-muted-foreground line-through decoration-dotted",title:i.resolved?i.name:`No member named "${i.name}" in this nest`,children:i.text},a))})}const ei="/assets/hootie-_U3ECslt.svg";function eH({page:e,onOpenNode:t,onOpenSettings:n}){var N,M,$;const{hootieEnabled:r,runnerKeyConfigured:i,isAdmin:a}=ts(),[l,u]=y.useState(!1),[f,p]=y.useState(null),[m,d]=y.useState([]),[v,x]=y.useState(""),[S,k]=y.useState(!1),E=y.useRef(null),C=y.useRef(null),P=y.useRef(null),R=y.useRef(1),O=f?{nestId:f.id,nestName:f.name}:e,B=(O==null?void 0:O.nestId)??null,A=y.useRef(B);y.useEffect(()=>{var _;A.current!==B&&(A.current=B,(_=E.current)==null||_.abort(),d([]),k(!1))},[B]),y.useEffect(()=>{f&&e&&e.nestId!==f.id&&p(null)},[e==null?void 0:e.nestId]);const{data:z}=hr({...It.nestList(),enabled:l}),I=y.useMemo(()=>((z==null?void 0:z.nests)??[]).map(_=>({id:_.id,name:_.name||_.id})),[z]),{data:D}=hr({...It.mentionable(B??""),enabled:l&&!!B,retry:!1}),j=y.useMemo(()=>((D==null?void 0:D.people)??[]).filter(_=>!!_.email),[D]),{data:H}=hr({...It.node((e==null?void 0:e.nestId)??"",(e==null?void 0:e.nodeId)??""),enabled:l&&!!(e!=null&&e.nestId)&&!!(e!=null&&e.nodeId)&&!f}),ee=((M=(N=H==null?void 0:H.node)==null?void 0:N.frontmatter)==null?void 0:M.title)??(($=H==null?void 0:H.node)==null?void 0:$.title)??null;y.useEffect(()=>{if(!l)return;const _=C.current;_&&(_.scrollTop=_.scrollHeight)},[m,l]),y.useEffect(()=>{l&&requestAnimationFrame(()=>{var _;return(_=P.current)==null?void 0:_.focus()})},[l,B]);const le=v.startsWith("/")?v.slice(1).trim().toLowerCase():null,oe=y.useMemo(()=>le===null?[]:I.filter(_=>!le||_.name.toLowerCase().includes(le)).slice(0,8),[le,I]),[G,X]=y.useState(0);y.useEffect(()=>X(0),[le]);const ue=_=>{p(e&&e.nestId===_.id?null:_),x(""),requestAnimationFrame(()=>{var ie;return(ie=P.current)==null?void 0:ie.focus()})},Z=y.useCallback(async _=>{const ie=(_??v).trim();if(!ie||S||!O)return;const K=O.nestId,ce=f?null:(e==null?void 0:e.nodeId)??null,ae=m.filter(pe=>!pe.failed&&!pe.pending).slice(-20).map(pe=>({role:pe.role,content:pe.content})),te=R.current++,re=R.current++;d(pe=>[...pe,{id:te,role:"user",content:ie},{id:re,role:"assistant",content:"",pending:!0}]),x(""),k(!0);const we=pe=>d(qe=>qe.map(ze=>ze.id===re?{...ze,...pe}:ze)),Ee=new AbortController;E.current=Ee;try{await VR(K,{message:ie,node_id:ce,history:ae},{delta:pe=>d(qe=>qe.map(ze=>ze.id===re?{...ze,content:ze.content+pe}:ze)),done:pe=>we({content:pe.answer,cited:pe.cited,mention:pe.mention,pending:!1}),error:pe=>we({content:pe,failed:!0,pending:!1})},Ee.signal),d(pe=>pe.map(qe=>qe.id===re&&qe.pending?{...qe,pending:!1}:qe))}catch(pe){Ee.signal.aborted?d(qe=>qe.filter(ze=>ze.id!==re&&ze.id!==te)):we({content:(pe==null?void 0:pe.message)||"Hootie couldn't answer that.",failed:!0,pending:!1})}finally{E.current===Ee&&(E.current=null),k(!1)}},[v,S,O,f,e,m]);if(!r||!i&&!a)return null;const Q=O?!f&&(e!=null&&e.nodeId)?`Asking about ${ee?`“${ee}”`:"this document"} in ${O.nestName}`:`Asking about ${O.nestName}`:"Pick a nest to ask about";return h.jsxs(h.Fragment,{children:[!l&&h.jsxs("button",{type:"button",onClick:()=>u(!0),"aria-label":"Ask Hootie","data-testid":"hootie-launcher",className:"group fixed bottom-5 right-5 z-40 flex h-14 items-center gap-2 rounded-full bg-primary pl-2 pr-2 text-primary-foreground shadow-lg ring-4 ring-primary/15 transition-all hover:pr-5 hover:shadow-xl focus:outline-none focus-visible:ring-primary/40",children:[h.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-background",children:h.jsx("img",{src:ei,alt:"",className:"h-7 w-7"})}),h.jsx("span",{className:"max-w-0 overflow-hidden whitespace-nowrap text-sm font-medium transition-all duration-200 group-hover:max-w-[8rem] group-focus-visible:max-w-[8rem]",children:"Ask Hootie"})]}),l&&h.jsxs("aside",{role:"dialog","aria-label":"Hootie","data-testid":"hootie-panel",className:"fixed bottom-5 right-5 z-40 flex h-[min(680px,calc(100vh-2.5rem))] w-[min(420px,calc(100vw-2.5rem))] flex-col overflow-hidden rounded-2xl border bg-background shadow-2xl ring-1 ring-black/5 animate-in fade-in slide-in-from-bottom-4 zoom-in-95 duration-200",children:[h.jsxs("header",{className:"flex items-center gap-3 bg-primary px-4 py-3 text-primary-foreground",children:[h.jsxs("span",{className:"relative flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-background",children:[h.jsx("img",{src:ei,alt:"",className:"h-6 w-6"}),h.jsx("span",{className:"absolute -bottom-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-emerald-400 ring-2 ring-primary"})]}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-sm font-semibold leading-tight",children:"Hootie"}),h.jsx("div",{className:"truncate text-xs text-primary-foreground/75",title:Q,children:Q})]}),m.length>0&&h.jsx("button",{type:"button",onClick:()=>{var _;(_=E.current)==null||_.abort(),d([])},"aria-label":"New conversation",title:"New conversation",className:"rounded-md p-1.5 text-primary-foreground/75 hover:bg-primary-foreground/10 hover:text-primary-foreground",children:h.jsx(cj,{className:"h-4 w-4"})}),h.jsx("button",{type:"button",onClick:()=>u(!1),"aria-label":"Close Hootie",className:"rounded-md p-1.5 text-primary-foreground/75 hover:bg-primary-foreground/10 hover:text-primary-foreground",children:h.jsx(Pj,{className:"h-4 w-4"})})]}),i?O?h.jsxs(h.Fragment,{children:[h.jsxs("div",{ref:C,className:"flex-1 overflow-y-auto bg-muted/30 px-4 py-4",children:[m.length===0&&h.jsx(rH,{onDocument:!f&&!!(e!=null&&e.nodeId),subject:!f&&(e!=null&&e.nodeId)?ee??"this document":O.nestName,onAsk:_=>void Z(_)}),h.jsx("ul",{className:"space-y-4",children:m.map(_=>h.jsx("li",{"data-testid":`hootie-${_.role}`,children:_.role==="user"?h.jsx("div",{className:"ml-auto w-fit max-w-[85%] whitespace-pre-wrap rounded-2xl rounded-br-md bg-primary px-3.5 py-2 text-sm text-primary-foreground shadow-sm",children:_.content}):h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border bg-background shadow-sm",children:h.jsx("img",{src:ei,alt:"",className:"h-[18px] w-[18px]"})}),h.jsx("div",{className:"min-w-0 flex-1",children:h.jsx(oH,{message:_,nestId:O.nestId,onOpenNode:t})})]})},_.id))})]}),h.jsxs("div",{className:"border-t bg-background px-3 pb-2.5 pt-3",children:[h.jsxs("div",{className:"relative rounded-xl border bg-background shadow-sm transition focus-within:border-primary/50 focus-within:ring-2 focus-within:ring-primary/15",children:[le!==null&&oe.length>0&&h.jsx("ul",{role:"listbox","data-testid":"hootie-nest-picker",className:"absolute bottom-full left-0 right-0 z-50 mb-1 max-h-56 overflow-auto rounded-md border bg-popover py-1 text-popover-foreground shadow-md",children:oe.map((_,ie)=>h.jsx("li",{children:h.jsxs("button",{type:"button",role:"option","aria-selected":ie===G,onMouseDown:K=>{K.preventDefault(),ue(_)},onMouseEnter:()=>X(ie),className:Te("flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",ie===G?"bg-accent text-accent-foreground":""),children:[h.jsx(Ul,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),h.jsx("span",{className:"truncate",children:_.name}),_.id===O.nestId&&h.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:"current"})]})},_.id))}),h.jsx(XV,{ref:P,value:v,onValueChange:x,members:j,rows:2,placeholder:"Ask Hootie anything…","data-testid":"hootie-input",className:"block w-full resize-none rounded-xl border-0 bg-transparent px-3.5 py-2.5 pr-12 text-sm placeholder:text-muted-foreground/70 focus:outline-none",onKeyDown:_=>{if(le!==null&&oe.length>0){if(_.key==="ArrowDown"){_.preventDefault(),X(ie=>(ie+1)%oe.length);return}if(_.key==="ArrowUp"){_.preventDefault(),X(ie=>ie<=0?oe.length-1:ie-1);return}if(_.key==="Enter"||_.key==="Tab"){_.preventDefault(),ue(oe[G]??oe[0]);return}if(_.key==="Escape"){_.stopPropagation(),x("");return}}_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),le===null&&Z()),_.key==="Escape"&&u(!1)}}),h.jsx("button",{type:"button",onClick:()=>void Z(),disabled:S||!v.trim()||le!==null,"aria-label":"Send",className:"absolute bottom-2 right-2 flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-sm transition hover:opacity-90 disabled:bg-muted disabled:text-muted-foreground disabled:shadow-none",children:S?h.jsx(Nr,{className:"h-4 w-4 animate-spin"}):h.jsx(nP,{className:"h-4 w-4"})})]}),h.jsxs("p",{className:"mt-2 text-center text-[11px] text-muted-foreground",children:[h.jsx("kbd",{className:"rounded border bg-muted px-1 font-sans",children:"@"})," tag a colleague ·"," ",h.jsx("kbd",{className:"rounded border bg-muted px-1 font-sans",children:"/"})," switch nest · answers use only what you can read"]})]})]}):h.jsx(nH,{nests:I,onPick:ue}):h.jsx(tH,{isAdmin:a,onOpenSettings:n})]})]})}function tH({isAdmin:e,onOpenSettings:t}){return h.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 bg-muted/30 px-6 text-center text-sm",children:[h.jsx("span",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-amber-500/10 ring-8 ring-amber-500/5",children:h.jsx(ld,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}),h.jsx("p",{className:"text-base font-semibold",children:"Hootie needs an API key"}),h.jsx("p",{className:"text-muted-foreground",children:e?"Add an Anthropic API key under Settings → General and Hootie can answer from your nests.":"Ask your server admin to add an Anthropic API key under Settings → General."}),e&&t&&h.jsx(ut,{size:"sm",variant:"outline",onClick:t,children:"Open Settings"})]})}function nH({nests:e,onPick:t}){return h.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-4 text-sm",children:[h.jsx("p",{className:"mb-3 text-muted-foreground",children:"Hootie answers about one nest at a time. Which one?"}),e.length===0?h.jsx("p",{className:"text-xs text-muted-foreground",children:"No nests yet."}):h.jsx("ul",{className:"space-y-1","data-testid":"hootie-nest-list",children:e.map(n=>h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>t(n),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left hover:bg-accent",children:[h.jsx(Ul,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),h.jsx("span",{className:"truncate",children:n.name})]})},n.id))})]})}function rH({onDocument:e,subject:t,onAsk:n}){const r=e?["Summarize this document","What are the key points here?","What's unclear or missing?"]:["What's in this nest?","Summarize the main topics","Where should I start?"];return h.jsxs("div",{className:"flex flex-col items-center px-2 pt-6 text-center",children:[h.jsx("span",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-primary/10 ring-8 ring-primary/5",children:h.jsx("img",{src:ei,alt:"",className:"h-10 w-10"})}),h.jsx("h2",{className:"mt-4 text-base font-semibold",children:"Hi, I'm Hootie"}),h.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Ask me anything about ",h.jsx("span",{className:"font-medium text-foreground",children:t}),"."]}),h.jsx("div",{className:"mt-5 flex w-full flex-col gap-2","data-testid":"hootie-starters",children:r.map(i=>h.jsxs("button",{type:"button",onClick:()=>n(i),className:"flex items-center gap-2 rounded-xl border bg-background px-3 py-2 text-left text-sm shadow-sm transition hover:border-primary/40 hover:bg-accent",children:[e?h.jsx(Vl,{className:"h-3.5 w-3.5 shrink-0 text-primary"}):h.jsx(Ul,{className:"h-3.5 w-3.5 shrink-0 text-primary"}),i]},i))})]})}function oH({message:e,nestId:t,onOpenNode:n}){const r=e.cited??[],i=y.useMemo(()=>new Map(r.map(l=>[l.title.toLowerCase(),l])),[r]),a=y.useMemo(()=>e.content.replace(/\[\[([^\]]+)\]\]/g,(l,u)=>{const f=i.get(u.trim().toLowerCase());return f?`[${u.trim()}](#cite:${encodeURIComponent(f.id)})`:l}),[e.content,i]);return e.failed?h.jsxs("div",{className:"flex items-start gap-2 rounded-2xl rounded-tl-md border border-destructive/30 bg-destructive/5 px-3.5 py-2.5 text-sm text-destructive",children:[h.jsx(zs,{className:"mt-0.5 h-4 w-4 shrink-0"}),h.jsx("span",{children:e.content})]}):h.jsxs("div",{children:[h.jsx("div",{className:"rounded-2xl rounded-tl-md border bg-background px-3.5 py-2.5 text-sm shadow-sm",children:e.pending&&!e.content?h.jsxs("span",{className:"inline-flex items-center gap-2 text-muted-foreground","aria-label":"Hootie is thinking",children:[h.jsx("span",{className:"flex gap-1",children:[0,150,300].map(l=>h.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-muted-foreground/60",style:{animationDelay:`${l}ms`}},l))}),h.jsx("span",{className:"text-xs",children:"Reading the nest…"})]}):h.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:h.jsx(oU,{remarkPlugins:[yV],components:{a:({href:l,children:u})=>{if(l!=null&&l.startsWith("#cite:")){const f=decodeURIComponent(l.slice(6));return h.jsx("button",{type:"button",onClick:()=>n(t,f),className:"inline-flex items-center rounded-md border border-primary/20 bg-primary/5 px-1.5 py-0.5 align-baseline text-xs font-medium text-primary no-underline hover:bg-primary/10","data-testid":"hootie-citation",children:u})}return h.jsx("a",{href:l,target:"_blank",rel:"noreferrer",children:u})}},children:a})})}),r.length>0&&h.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5","data-testid":"hootie-cited",children:r.map(l=>h.jsxs("button",{type:"button",onClick:()=>n(t,l.id),className:"inline-flex max-w-full items-center gap-1 rounded-full border bg-background px-2 py-0.5 text-[11px] text-muted-foreground hover:border-primary/40 hover:text-foreground",title:l.id,children:[h.jsx(Vl,{className:"h-3 w-3 shrink-0"}),h.jsx("span",{className:"truncate",children:l.title})]},l.id))}),e.mention&&h.jsx(iH,{outcome:e.mention,nestId:t,onOpenNode:n})]})}function iH({outcome:e,nestId:t,onOpenNode:n}){return e.status==="posted"?h.jsxs("p",{className:"mt-1.5 text-[11px] text-muted-foreground","data-testid":"hootie-mention-posted",children:["Posted as a comment on"," ",h.jsx("button",{type:"button",className:"underline hover:text-foreground",onClick:()=>n(t,e.node_id),children:e.node_title}),e.notified>0?` · ${e.notified} ${e.notified===1?"person":"people"} notified`:" · nobody new to notify"]}):h.jsx("p",{className:"mt-1.5 text-[11px] text-amber-700 dark:text-amber-400","data-testid":"hootie-mention-undeliverable",children:e.reason==="no_anchor"?"Couldn't tag anyone: there's no document to attach this to. Open one, or ask something Hootie can cite.":"Couldn't post the comment — the mention wasn't delivered."})}let Nm=null,Tm=!1;function CK(e){Nm=e}function sH(e){!Tm&&Nm&&Nm(e)||e()}function EK(e){Tm=!0;try{e()}finally{Tm=!1}}function aH(e,t){return e!==null&&t!==null&&t!==e?"push":"replace"}const dN=/^\/nest\/([^/]+)(?:\/([^/]+))?\/?$/;function lH(e){try{return decodeURIComponent(e)}catch{return e}}function bh(e=window.location){const t=e.pathname.match(dN);return t?lH(t[1]):new URLSearchParams(e.search).get("nest")}function p0(e=window.location){const t=e.pathname.match(dN);return t!=null&&t[2]?t[2]:new URLSearchParams(e.search).get("view")}function h0(e,t){if(!e)return"/";const n=`/nest/${encodeURIComponent(e)}`;return t?`${n}/${t}`:n}const fN=y.createContext(null),uH=fN.Provider;function _K(){const e=y.useContext(fN);if(!e)throw new Error("useNestPage: no NestPageProvider above this page");return e}const pN=y.createContext(null),cH=pN.Provider;function NK(){const e=y.useContext(pN);if(!e)throw new Error("useAppNav: no AppNavProvider above this page");return e}const iy=y.createContext(null);function dH({children:e}){const[t,n]=y.useState([]);return h.jsx(iy.Provider,{value:{tail:t,setTail:n},children:e})}function TK(e){const t=y.useContext(iy),n=e.map(r=>r.label).join("\0");y.useEffect(()=>{if(t)return t.setTail(e),()=>t.setTail([])},[n])}function fH(){var e;return((e=y.useContext(iy))==null?void 0:e.tail)??[]}function m0(e){return e?"min-w-0 truncate text-base font-semibold":"min-w-0 truncate text-muted-foreground"}function pH({branding:e,className:t=""}){const{footer_text:n,footer_link_url:r,footer_link_label:i,hide_powered_by:a}=e;return!n&&!r&&a?null:h.jsxs("footer",{className:`${t} flex flex-wrap items-center justify-center gap-x-4 gap-y-1 px-4 py-4 text-center text-xs text-muted-foreground`,"data-testid":"reader-brand-footer",children:[n&&h.jsx("span",{children:n}),r&&h.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2 hover:text-foreground",style:{color:"var(--reader-accent-text, inherit)"},children:i||r.replace(/^https:\/\//,"").replace(/\/$/,"")}),!a&&h.jsx("a",{href:"https://promptowl.ai/contextnest/",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground/80 hover:text-foreground",children:"Powered by ContextNest"})]})}const g0={site_title:120,banner_headline:120,banner_subtext:280,footer_text:280,footer_link_label:80,url:2048},hH=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,mH=/\.(?:png|jpe?g|gif|webp)$/i,gH=/^[0-9a-f-]{36}\.(?:png|jpe?g|gif|webp)$/,yH={light:"#ffffff",dark:"#09090b"};function Hs(e){if(typeof e!="string"||!hH.test(e))return null;let t=e.slice(1).toLowerCase();return t.length===3&&(t=t.split("").map(n=>n+n).join("")),"#"+t}function id(e){const t=Hs(e).slice(1);return[0,2,4].map(n=>parseInt(t.slice(n,n+2),16))}function vH(e){return"#"+e.map(t=>Math.round(Math.max(0,Math.min(255,t))).toString(16).padStart(2,"0")).join("")}function y0(e){const[t,n,r]=id(e).map(i=>{const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)});return .2126*t+.7152*n+.0722*r}function sd(e,t){const n=y0(e),r=y0(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function hl(e){return sd("#000000",e)>=sd("#ffffff",e)?"#000000":"#ffffff"}function Pm(e,t,n){const r=id(e),i=id(t);return vH([0,1,2].map(a=>r[a]*n+i[a]*(1-n)))}function v0(e,t,n=4.5){const r=Hs(e);if(sd(r,t)>=n)return r;const i=hl(t);for(let a=.05;a<=1.0001;a+=.05){const l=Pm(i,r,a);if(sd(l,t)>=n)return l}return i}function ul(e){const[t,n,r]=id(e).map(m=>m/255),i=Math.max(t,n,r),a=Math.min(t,n,r),l=(i+a)/2;let u=0,f=0;if(i!==a){const m=i-a;f=l>.5?m/(2-i-a):m/(i+a),i===t?u=(n-r)/m+(n<r?6:0):i===n?u=(r-t)/m+2:u=(t-n)/m+4,u*=60}const p=m=>Math.round(m*10)/10;return`${p(u)} ${p(f*100)}% ${p(l*100)}%`}function xH(e){return e?Object.entries(e).some(([,t])=>typeof t=="string"?t.trim()!=="":t===!0):!1}function wH(e,t="light"){const n={};if(!e)return n;const r=yH[t],i=Hs(e.page_tint_color),a=i?Pm(i,r,t==="light"?.1:.14):r;i&&(n["--background"]=ul(a),n["--reader-page-bg"]=a);const l=Hs(e.accent_color);if(l){const f=v0(v0(l,a),r),p=Pm(l,r,t==="light"?.12:.22);n["--reader-accent"]=l,n["--reader-accent-fg"]=hl(l),n["--reader-accent-text"]=f,n["--primary"]=ul(f),n["--primary-foreground"]=ul(hl(f)),n["--ring"]=n["--primary"],n["--accent"]=ul(p),n["--accent-foreground"]=ul(hl(p)==="#000000"?"#18181b":"#fafafa")}const u=Hs(e.header_bg_color);return u&&(n["--reader-header-bg"]=u,n["--reader-header-fg"]=hl(u)),n}function bH(e,t){const n=`/nests/${t}/assets/`;if(e.startsWith(n))return gH.test(e.slice(n.length));if(!/^https:\/\//i.test(e))return!1;try{const r=new URL(e);return r.protocol==="https:"&&!r.username&&!r.password&&!!r.hostname&&mH.test(r.pathname)}catch{return!1}}function kH(e){if(!/^https:\/\//i.test(e))return!1;try{const t=new URL(e);return t.protocol==="https:"&&!t.username&&!t.password&&!!t.hostname}catch{return!1}}function PK(e,t){var i,a;const n={};for(const l of["accent_color","header_bg_color","page_tint_color"]){const u=e[l];u&&!Hs(u)&&(n[l]="Use a hex color like #1e40af")}for(const l of["logo_url","banner_url","favicon_url"]){const u=(i=e[l])==null?void 0:i.trim();u&&!bH(u,t)&&(n[l]="Upload an image, or use an https:// link ending in .png, .jpg, .gif or .webp")}const r=(a=e.footer_link_url)==null?void 0:a.trim();r&&!kH(r)&&(n.footer_link_url="Use an https:// link");for(const l of["site_title","banner_headline","banner_subtext","footer_text","footer_link_label"]){const u=e[l];u&&u.length>g0[l]&&(n[l]=`At most ${g0[l]} characters`)}return n}function jK(e,t,n){var i;const r=((i=t==null?void 0:t.site_title)==null?void 0:i.trim())||n;return e?`${e} · ${r}`:r}function RK(e){return`url("${e.replace(/["'()\\\s\u0000-\u001f\u007f]/g,n=>"%"+n.charCodeAt(0).toString(16).padStart(2,"0").toUpperCase())}")`}function SH({className:e}){return h.jsx("span",{className:Te("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"})}const qd=(e,t)=>Om(()=>e().then(n=>({default:n[t]}))),CH=qd(()=>Vt(()=>import("./NestView-D4OMXPQ7.js").then(e=>e.k),__vite__mapDeps([12,10,4,2,6,11,13,14,1,15,16,17,8,18,19,20,21,22])),"NestView"),EH=qd(()=>Vt(()=>import("./DocumentEditor-D1GLeeEP.js"),__vite__mapDeps([42,10,4,2,6,11,43,14,17,18,44,45,41,20,21,16,23,46,19,32,24,31,47])),"DocumentEditor"),_H=qd(()=>Vt(()=>import("./AgentDocsPage-BTRXmliv.js"),__vite__mapDeps([48,26,46])),"AgentDocsPage"),NH=qd(()=>Vt(()=>import("./ActivityTracePage-CkRoyIc-.js"),__vite__mapDeps([40,26,41,2,13])),"ActivityTracePage"),hN=[{page:"nest",label:"Nest",icon:Vl,beta:!1},...cd.map(e=>({page:e.viewPage,label:e.label,icon:e.icon,beta:!!e.beta}))],TH={overview:"Overview",documents:"Documents",review:"Review queue","external-edits":"External edits",stewards:"Stewards",collaborators:"Collaborators"},PH=["overview","documents","review","external-edits","stewards","collaborators"],Nc=e=>hN.some(t=>t.page===e.page),x0=e=>e.page==="document"?`${e.nestId}/${e.nodeId}`:e.page==="nest"&&e.readerMode&&e.readerDoc?`${e.nestId}/${e.readerDoc}`:null;let w0=!1;function jH(){var Vn,Et;const{authMode:e,logoUrl:t,serverVersion:n,adminStatus:r,authenticated:i,isAdmin:a,workflowPlaneEnabled:l,subagentRunsEnabled:u,loading:f,error:p,logout:m}=ts(),[d,v]=y.useState(()=>({page:"dashboard",...typeof window<"u"?{tab:AA(window.location.pathname)??Dc}:{}})),x=y.useCallback(W=>sH(()=>v(W)),[]),S=y.useRef(null);y.useEffect(()=>{KR("$pageview",{page:d.page})},[d.page]);const[k,E]=y.useState(!1),[C,P]=y.useState(()=>typeof window>"u"?{status:"idle"}:bh()?{status:"loading"}:{status:"idle"}),[R,O]=y.useState(null),[B,A]=y.useState(!0),[z,I]=y.useState(!1),[D,j]=y.useState(!1),[H,ee]=y.useState(!1),[le,oe]=y.useState(()=>dd(localStorage).sidebarCollapsed),G=W=>{oe(W),Hm(localStorage,{sidebarCollapsed:W})},[X,ue]=y.useState(!1);y.useEffect(()=>{ue(!1)},[d]);const[Z,Q]=y.useState(!1),N=y.useCallback(()=>I(!0),[]),M=Wl(),$=y.useCallback(async W=>{var Jt;const fe=await M.fetchQuery(It.nestList()).catch(()=>null),Se=W.kind==="nest"?W.id:W.nest_id,Ce=(Jt=fe==null?void 0:fe.nests)==null?void 0:Jt.find(Ae=>Ae.id===Se),Le={isOwner:(Ce==null?void 0:Ce.is_owner)??!1,isAnonOwned:(Ce==null?void 0:Ce.user_id)===Hh},at=W.kind==="nest"?W.title:W.nest_name;x(W.kind==="nest"?{page:"nest",nestId:Se,nestName:at,...Le}:{page:"document",nestId:Se,nestName:at,nodeId:W.id,...Le})},[M]),_=y.useCallback(async(W,fe)=>{var Le;if("nestId"in d&&d.nestId===W){x({page:"document",nestId:W,nestName:d.nestName,nodeId:fe,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned});return}const Se=await M.fetchQuery(It.nestList()).catch(()=>null),Ce=(Le=Se==null?void 0:Se.nests)==null?void 0:Le.find(at=>at.id===W);x({page:"document",nestId:W,nestName:(Ce==null?void 0:Ce.name)??W,nodeId:fe,isOwner:(Ce==null?void 0:Ce.is_owner)??!1,isAnonOwned:(Ce==null?void 0:Ce.user_id)===Hh})},[M,d,x]),ie="nestId"in d?{nestId:d.nestId,nestName:d.nestName,nodeId:d.page==="document"&&d.nodeId!=="new"?d.nodeId:void 0}:null,K=d.page==="nest"||d.page==="document"||d.page==="dashboard";y.useEffect(()=>{if(!K){ee(!1);return}const W=fe=>{(fe.metaKey||fe.ctrlKey)&&fe.key.toLowerCase()==="k"&&(fe.preventDefault(),ee(Se=>!Se))};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[K]);const[ce,ae]=y.useState(!1);y.useEffect(()=>{const W=fe=>{if(fe.key!=="?"||fe.metaKey||fe.ctrlKey||fe.altKey)return;const Se=fe.target;Se!=null&&Se.isContentEditable||(Se==null?void 0:Se.tagName)==="INPUT"||(Se==null?void 0:Se.tagName)==="TEXTAREA"||(Se==null?void 0:Se.tagName)==="SELECT"||(fe.preventDefault(),ae(!0))};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[]);const te=y.useCallback(async()=>{j(!0);try{await m(),I(!1),wl.success("Logged out successfully")}finally{j(!1)}},[m]),re=y.useCallback(async()=>{try{const W=await Z0();O(W)}catch{O(null)}finally{A(!1)}},[]);y.useEffect(()=>{if(C.status!=="loading")return;const W=new URLSearchParams(window.location.search),fe=C.nestId??bh();if(!fe){P({status:"missing"});return}if(f&&p0()==="workflows")return;let Se=!1;return(async()=>{try{const{nest:Ce,permission:Le,roles:at,myStewards:Jt}=await M.fetchQuery(It.nest(fe));if(Se)return;const Ae=Le==="owner",ot=Wh({roles:at??[],permission:Le,myStewards:Jt??[],isOwner:Ae,isAdmin:a,readerMode:!!Ce.reader_mode}).isReaderView;P({status:"ok",nestId:Ce.id,nestName:Ce.name});const ht=W.get("doc");if(ht&&ht!=="new"&&ot){x({page:"nest",nestId:Ce.id,nestName:Ce.name,isOwner:Ae,isAnonOwned:!1,readerMode:ot,readerDoc:ht});return}if(ht&&ht!=="new"){x({page:"document",nestId:Ce.id,nestName:Ce.name,nodeId:ht,isOwner:Ae,isAnonOwned:!1,initialThreadId:W.get("thread")||void 0});return}const Pt=p0(),Hn=tA(Pt),wt=Hn?Hn.visible&&!Hn.visible({isReadOnly:!1,isReaderView:!1,canEditDocs:!0,workflowPlaneEnabled:l})?null:Hn.viewPage:Pt==="trace"?"nest-trace":null;if(wt&&$p(wt,ot)){x({page:"nest",nestId:Ce.id,nestName:Ce.name,isOwner:Ae,isAnonOwned:!1,readerMode:ot});return}if(wt){x({page:wt,nestId:Ce.id,nestName:Ce.name,isOwner:Ae,isAnonOwned:!1,readerMode:ot});return}x({page:"nest",nestId:Ce.id,nestName:Ce.name,isOwner:Ae,isAnonOwned:!1,readerMode:ot,tab:PH.includes(W.get("tab")??"")?W.get("tab"):void 0})}catch{Se||P({status:"unreachable",nestId:fe})}})(),()=>{Se=!0}},[C.status,l,f]),y.useEffect(()=>{var ot;if(typeof window>"u"||C.status==="loading")return;const W=new URLSearchParams(window.location.search);W.delete("nest");let fe=null,Se=null;d.page==="document"?(fe=d.nestId,d.nodeId&&d.nodeId!=="new"?W.set("doc",d.nodeId):W.delete("doc"),d.initialThreadId?W.set("thread",d.initialThreadId):W.delete("thread"),W.delete("view"),W.delete("tab")):d.page==="nest"?(fe=d.nestId,d.readerMode&&d.readerDoc?W.set("doc",d.readerDoc):W.delete("doc"),W.delete("thread"),W.delete("view"),d.tab&&d.tab!=="overview"?W.set("tab",d.tab):W.delete("tab")):d.page==="ontology-graph"||d.page==="workflows"||d.page==="definitions"||d.page==="board"||d.page==="nest-trace"?(fe=d.nestId,Se=d.page==="nest-trace"?"trace":((ot=tl(d.page))==null?void 0:ot.path)??null,W.delete("doc"),W.delete("thread"),W.delete("tab"),W.delete("view")):(W.delete("doc"),W.delete("thread"),W.delete("view"),W.delete("tab"));const Ce=W.toString(),at=(d.page==="dashboard"?OA(d.tab):h0(fe,Se))+(Ce?`?${Ce}`:"")+window.location.hash,Jt=window.location.pathname+window.location.search+window.location.hash,Ae=x0(d);at!==Jt&&(aH(S.current,Ae)==="push"?window.history.pushState(d,"",at):window.history.replaceState(d,"",at)),S.current=Ae},[d,C.status]),y.useEffect(()=>{const W=fe=>{const Se=fe.state;Se&&typeof Se=="object"&&"page"in Se&&(S.current=x0(Se),v(Se))};return window.addEventListener("popstate",W),()=>window.removeEventListener("popstate",W)},[]);const[we,Ee]=y.useState(null),[pe,qe]=y.useState(null),ze=Nc(d)?we??d.readerMode??!1:!1;y.useEffect(()=>{Nc(d)&&$p(d.page,ze)&&x({page:"nest",nestId:d.nestId,nestName:d.nestName,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned,readerMode:ze})},[d,ze]);const zt="nestId"in d?d.nestId:null,Zt="nestId"in d?d.isOwner:!1,[Ct,Bn]=y.useState(null);y.useEffect(()=>{if(Bn(null),Ee(null),qe(null),!zt)return;let W=!1;return M.fetchQuery(It.nest(zt)).then(fe=>{var Ce,Le;if(W)return;const Se=Wh({roles:(fe==null?void 0:fe.roles)??[],permission:(fe==null?void 0:fe.permission)??null,myStewards:(fe==null?void 0:fe.myStewards)??[],isOwner:Zt,isAdmin:a,readerMode:!!((Ce=fe==null?void 0:fe.nest)!=null&&Ce.reader_mode)});Bn(Se.canEditDocs),Ee(Se.isReaderView),qe(((Le=fe==null?void 0:fe.nest)==null?void 0:Le.branding)??null)}).catch(()=>{W||(Bn(!1),Ee(!1))}),()=>{W=!0}},[zt,Zt,a]),y.useEffect(()=>{d.page==="workflows"&&Ct===!1&&x({page:"nest",nestId:d.nestId,nestName:d.nestName,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned})},[d,Ct]);const dt=fH(),En=y.useMemo(()=>{var fe;const W={label:"Home",go:()=>x({page:"dashboard"})};if(d.page==="dashboard"){const Se=zp(d.tab,{isAdmin:a});return dt.length?[W,...dt]:Se.id===Dc?[{label:Se.label}]:[W,{label:Se.label}]}if("nestId"in d){const Se={label:d.nestName,go:()=>x({page:"nest",nestId:d.nestId,nestName:d.nestName,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned,tab:"overview"})};if(dt.length)return[W,Se,...dt];const Ce=d.page==="nest"?TH[d.tab??"overview"]??"Overview":d.page==="document"?"Document":d.page==="nest-trace"?"Trace":((fe=tl(d.page))==null?void 0:fe.label)??"";return[W,Se,{label:Ce}]}return d.page==="docs"?[W,{label:"Docs"}]:dt.length?[W,...dt]:[]},[d,x,dt]),rr=y.useMemo(()=>({openNest:(W,fe,Se,Ce,Le)=>x({page:"nest",nestId:W,nestName:fe,isOwner:Se,isAnonOwned:Ce,isArchived:Le}),openReview:(W,fe,Se)=>x({page:"document",nestId:W,nestName:fe,nodeId:Se,isOwner:!0,isAnonOwned:!0}),manageKeys:()=>x({page:"dashboard",tab:"api-keys"})}),[x]),Tt=y.useCallback(()=>{if(typeof window<"u"&&bh()){const W=new URLSearchParams(window.location.search);W.delete("nest");const fe=W.toString();window.history.replaceState({},"",h0(null)+(fe?`?${fe}`:"")+window.location.hash)}!i&&e==="key"&&P({status:"missing"}),x({page:"dashboard"})},[i,e]);y.useEffect(()=>{if(typeof window>"u"||w0)return;const W=new URLSearchParams(window.location.search),fe=W.get("sso_error");if(!fe)return;w0=!0,W.delete("sso_error");const Se=W.toString();window.history.replaceState({},"",window.location.pathname+(Se?`?${Se}`:"")+window.location.hash);const Le={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."}[fe]??"Sign-in failed. Please try again.";setTimeout(()=>wl.error(Le),0)},[]),y.useEffect(()=>{re();const W=setInterval(re,900*1e3),fe=()=>{re()};return window.addEventListener("auth:unauthorized",fe),()=>{clearInterval(W),window.removeEventListener("auth:unauthorized",fe)}},[re]);const nn=((Vn=r==null?void 0:r.me)==null?void 0:Vn.email)??null,Dr=y.useRef(nn);if(y.useEffect(()=>{if(Dr.current===nn)return;const W=Dr.current!==null;Dr.current=nn,W&&v({page:"dashboard"})},[nn]),p)return h.jsx("div",{className:"min-h-screen flex items-center justify-center",children:h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-lg font-medium text-destructive",children:p}),h.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Check that the community server is running."})]})});if(f||e===null||B||C.status==="loading")return h.jsx("div",{className:"min-h-screen flex items-center justify-center",children:h.jsxs("div",{className:"flex flex-col items-center gap-3 animate-pulse",children:[h.jsx("img",{src:t??ei,alt:"",className:"h-10 w-10"}),h.jsx("span",{className:"text-sm font-medium",children:"ContextNest"}),h.jsx("span",{className:"text-xs text-muted-foreground",children:"Loading your nests…"})]})});if(R&&!R.valid)return h.jsx(BV,{onActivated:re});const to=h.jsxs(h.Fragment,{children:[h.jsx(Qi,{open:z,onOpenChange:W=>{!W&&!D&&I(!1)},children:h.jsxs(ii,{className:"sm:max-w-[400px]",children:[h.jsxs(si,{children:[h.jsxs(ai,{className:"flex items-center gap-2",children:[h.jsx(B0,{className:"h-4 w-4 text-muted-foreground"}),"Log out?"]}),h.jsx(li,{children:"You'll be signed out of this browser. Any unsaved edits in other tabs may be lost — save your work first."})]}),h.jsxs(kd,{className:"gap-2",children:[h.jsx(ut,{variant:"outline",onClick:()=>I(!1),disabled:D,children:"Cancel"}),h.jsx(ut,{variant:"destructive",onClick:te,disabled:D,children:D?"Logging out...":"Log out"})]})]})}),H&&K&&h.jsx(HV,{nestId:d.page==="nest"||d.page==="document"?d.nestId:void 0,nestName:d.page==="nest"||d.page==="document"?d.nestName:void 0,nestOnly:!i&&e==="key",onClose:()=>ee(!1),onSelect:(W,fe)=>{if(ee(!1),d.page==="nest"&&we&&fe.kind==="node"&&(fe.nest_id??d.nestId)===d.nestId){x({...d,readerDoc:W});return}if((d.page==="nest"||d.page==="document")&&fe.kind==="node"&&(fe.nest_id??d.nestId)===d.nestId){x({page:"document",nestId:d.nestId,nestName:d.nestName,nodeId:W,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned});return}$(fe)}}),ce&&h.jsx(qV,{onClose:()=>ae(!1)})]});if(!i&&e==="key"&&(C.status!=="ok"||!("nestId"in d||d.page==="docs")))return h.jsxs(h.Fragment,{children:[h.jsx(QR,{}),to]});const de=d.page==="document",be="nestId"in d&&we!==!0,Oe=(i||e!=="key")&&(be||d.page==="dashboard"||d.page==="docs"),Ge=Oe&&(!le||X),Ze=d.page==="board"?"max-w-[1800px]":"max-w-6xl",gt=Oe?"w-full max-w-none":`${Ze} mx-auto`,ft=ze&&xH(pe)?pe:null,rn=ft?wH(ft,document.documentElement.classList.contains("dark")?"dark":"light"):void 0,Un=ft!=null&&ft.header_bg_color?{backgroundColor:"var(--reader-header-bg)",color:"var(--reader-header-fg)",borderColor:"transparent"}:void 0;return h.jsxs("div",{className:Oe?"flex min-h-screen items-stretch bg-background":"min-h-screen bg-background",style:rn,children:[Oe&&h.jsxs(h.Fragment,{children:[Oe&&X&&h.jsx("button",{type:"button",className:"fixed inset-0 z-40 bg-black/30 md:hidden","aria-label":"Close sidebar",onClick:()=>ue(!1)}),Ge&&(()=>{var Se,Ce;const W=d,fe=Le=>"nestId"in Le?Le:null;return h.jsx("div",{className:X?"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:h.jsx("div",{className:"sticky top-0 h-screen max-h-screen",children:h.jsx(UL,{logoUrl:t??ei,nestId:((Se=fe(W))==null?void 0:Se.nestId)??null,nodeId:W.page==="document"?W.nodeId:null,activeView:W.page==="nest"?W.tab==="review"?"review":"overview":((Ce=tl(W.page))==null?void 0:Ce.id)??null,onCollapse:()=>X?ue(!1):G(!0),onOpenDashboard:()=>x({page:"dashboard"}),dashboardTab:W.page==="dashboard"?zp(W.tab,{isAdmin:a}).id:null,onOpenDashboardTab:Le=>x({page:"dashboard",tab:Le}),onOpenNest:Le=>x({page:"nest",nestId:Le.nestId,nestName:Le.nestName,isOwner:Le.isOwner,isAnonOwned:Le.isAnonOwned,tab:"documents"}),onOpenView:(Le,at)=>x({page:at.page,nestId:Le.nestId,nestName:Le.nestName,isOwner:Le.isOwner,isAnonOwned:Le.isAnonOwned,readerMode:ze,...at.page==="nest"&&at.tab?{tab:at.tab}:{}}),onConnect:()=>Q(!0),onOpenDocument:Le=>{W.page==="document"&&Le.nestId===W.nestId&&Le.nodeId===W.nodeId||x({page:"document",nestId:Le.nestId,nestName:Le.nestName,nodeId:Le.nodeId,isOwner:Le.isOwner,isAnonOwned:Le.isAnonOwned})},onNewDocument:!("nestId"in W)||W.page==="document"&&W.nodeId==="new"?void 0:Le=>x({page:"document",nestId:W.nestId,nestName:W.nestName,nodeId:"new",isOwner:W.isOwner,isAnonOwned:W.isAnonOwned,initialFolder:Le})})})})})()]}),h.jsxs("div",{className:Oe?"flex min-w-0 flex-1 flex-col":"",children:[h.jsxs("header",{className:"contents",children:[h.jsx("div",{className:"sticky top-0 z-40 border-b border-border bg-card",style:Un,"data-reader-brand-header":Un?"":void 0,children:h.jsxs("div",{className:`${gt} h-16 px-4 flex items-center justify-between gap-2`,children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[Oe&&h.jsx(ut,{variant:"ghost",size:"icon",className:`h-8 w-8 shrink-0${Ge?" md:hidden":""}`,title:"Show sidebar","aria-label":"Show sidebar","data-testid":"nest-sidebar-expand",onClick:()=>{window.matchMedia("(max-width: 767px)").matches?ue(!0):G(!1)},children:h.jsx(tj,{className:"h-4 w-4"})}),h.jsx("button",{onClick:()=>x(d.page==="nest"&&we?{...d,readerDoc:void 0}:{page:"dashboard"}),className:`flex shrink-0 items-center gap-2 hover:opacity-80${Ge?" md:hidden":""}${Oe?" max-sm:hidden":""}`,children:ft?h.jsxs(h.Fragment,{children:[h.jsx("img",{src:ft.logo_url||t||ei,alt:"",className:`h-8 w-auto max-w-[9rem] object-contain${ft.logo_url?"":" hidden min-[480px]:block"}`}),h.jsx("span",{className:`max-w-[40vw] truncate font-semibold sm:max-w-[24rem]${ft.logo_url?" hidden min-[480px]:inline":""}`,children:ft.site_title||("nestName"in d?d.nestName:"")})]}):h.jsxs(h.Fragment,{children:[h.jsx("img",{src:t??ei,alt:"ContextNest",className:"h-7 w-7 object-contain"}),h.jsx("span",{className:"font-semibold",children:"ContextNest"}),h.jsx(eg,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:"Community"})]})}),Oe&&En.length>0&&h.jsx("nav",{"aria-label":"Breadcrumb",className:"ml-1 flex min-w-0 items-center gap-1 text-sm","data-testid":"header-breadcrumb",children:En.map((W,fe)=>{const Se=fe===En.length-1;return h.jsxs("span",{className:`flex min-w-0 items-center gap-1${Se?"":" max-sm:hidden"}`,children:[fe>0&&h.jsx(Bl,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground/60${Se?" max-sm:hidden":""}`,"aria-hidden":!0}),Se||!W.go?h.jsx("span",{className:m0(Se),"aria-current":Se?"page":void 0,children:W.label}):h.jsx("button",{type:"button",onClick:W.go,className:`${m0(!1)} hover:text-foreground`,children:W.label})]},fe)})})]}),h.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[K&&h.jsxs("button",{onClick:()=>ee(!0),title:d.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","aria-label":"Search","data-testid":"global-search-trigger",children:[h.jsx(Im,{className:"h-3.5 w-3.5"}),h.jsx("span",{className:"hidden sm:inline",children:"Search"}),h.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"&&!(r!=null&&r.me)&&h.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:[h.jsx(Jx,{className:"h-3 w-3"}),"Open mode"]}),e==="key"&&!i&&h.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:[h.jsx(Jx,{className:"h-3 w-3"}),"Public read-only"]}),d.page!=="docs"&&h.jsxs(ut,{variant:"ghost",size:"sm",onClick:()=>x({page:"docs"}),title:"API, MCP & CLI docs for agents","aria-label":"Docs",children:[h.jsx(L0,{className:"h-3.5 w-3.5 sm:mr-1"}),h.jsx("span",{className:"hidden sm:inline",children:"Docs"})]}),r!=null&&r.me?h.jsx(RH,{me:r.me,isAdmin:a,onShortcuts:()=>ae(!0),onAccount:()=>x({page:"dashboard",tab:"account"}),onLogout:N}):h.jsxs(ut,{variant:"outline",size:"sm",onClick:()=>E(!0),children:[h.jsx(ud,{className:"h-3.5 w-3.5 mr-1"}),"Login"]})]})]})}),Nc(d)&&!ze&&h.jsx("div",{className:`${gt} px-4 py-2 overflow-x-auto flex items-center gap-2${Ge?" md:hidden":""}`,children:h.jsx(sN,{value:d.page,onValueChange:W=>x({page:W,nestId:d.nestId,nestName:d.nestName,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned,readerMode:ze,isArchived:d.isArchived}),children:h.jsx(oy,{children:hN.filter(W=>{const fe=tl(W.page);return!(fe!=null&&fe.visible)||fe.visible({isReadOnly:Ct===!1,isReaderView:!!ze,canEditDocs:Ct===!0,workflowPlaneEnabled:l})}).filter(W=>!ze||!y1(W.page)).map(W=>{const fe=W.icon;return h.jsxs(Ri,{value:W.page,className:"gap-1.5",children:[h.jsx(fe,{className:"h-3.5 w-3.5"}),W.label,W.beta&&h.jsx(SH,{})]},W.page)})})})})]}),h.jsx("main",{className:`${gt} min-w-0 overflow-x-clip${Oe?"":" px-4 py-4"}`,children:C.status==="unreachable"?h.jsxs("div",{className:"py-20 text-center",children:[h.jsx("p",{className:"text-lg font-medium",children:"This nest doesn't exist or you don't have access."}),h.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."}),h.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2",children:[h.jsx(ut,{variant:"outline",onClick:()=>P({status:"loading",nestId:C.nestId}),children:"Try again"}),h.jsx(ut,{onClick:()=>P({status:"missing"}),children:"Back to dashboard"})]})]}):h.jsx("div",{className:Oe&&!de?"px-8 py-6":"",children:h.jsxs(y.Suspense,{fallback:h.jsx("div",{className:"py-12 text-center text-muted-foreground",children:"Loading..."}),children:[d.page==="dashboard"&&(()=>{const W=zp(d.tab,{isAdmin:a}).Component;return h.jsx(cH,{value:rr,children:h.jsx(y.Suspense,{fallback:h.jsx("div",{className:"py-12 text-center text-muted-foreground",children:"Loading..."}),children:h.jsx(W,{})})})})(),d.page==="nest"&&h.jsx(CH,{nestId:d.nestId,nestName:d.nestName,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned,isArchived:d.isArchived,initialSearch:d.initialSearch,initialTags:d.initialTags,initialFolder:d.initialFolder,initialTab:d.tab,initialDoc:d.readerDoc??null,onReaderDocChange:W=>x({...d,readerDoc:W??void 0}),onManageKeys:()=>x({page:"dashboard",tab:"api-keys"}),onTabChange:W=>x({...d,tab:W}),onBack:Tt,onOpenDocument:(W,fe)=>x({page:"document",nestId:d.nestId,nestName:d.nestName,nodeId:W,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned,initialFolder:fe==null?void 0:fe.folder,initialThreadId:fe==null?void 0:fe.thread}),onOpenTrace:()=>x({page:"nest-trace",nestId:d.nestId,nestName:d.nestName,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned})}),d.page==="nest-trace"&&h.jsx(NH,{nestId:d.nestId,onBack:()=>x({page:"nest",nestId:d.nestId,nestName:d.nestName,isOwner:d.isOwner,isAnonOwned:d.isAnonOwned})}),d.page==="document"&&(()=>{const W=d,fe=Ce=>x({page:"document",...Ce}),Se=Ce=>x({page:"nest",nestId:W.nestId,nestName:W.nestName,isOwner:W.isOwner,isAnonOwned:W.isAnonOwned,...Ce});return h.jsx(EH,{sidebarCollapsed:le,onToggleSidebar:()=>{window.matchMedia("(max-width: 767px)").matches?ue(!0):G(!1)},nestId:W.nestId,nestName:W.nestName,nodeId:W.nodeId,initialFolder:W.initialFolder,initialThreadId:W.initialThreadId,isOwner:W.isOwner,breadcrumb:W.breadcrumb,onBack:()=>{const Ce=W.breadcrumb??[];if(Ce.length>0){const Le=Ce[Ce.length-1];fe({...Le,breadcrumb:Ce.slice(0,-1)});return}Se({tab:"documents"})},onJumpBreadcrumb:Ce=>{const Le=W.breadcrumb??[],at=Le[Ce];at&&fe({...at,breadcrumb:Le.slice(0,Ce)})},onSaved:()=>{zV(W.nodeId)&&Se()},onNavigateDocument:(Ce,Le,at)=>{const Jt=W.breadcrumb??[],Ae=Ce===W.nestId;if(Ce===W.nestId&&Le===W.nodeId)return;const ot=Jt.findIndex(Pt=>Pt.nestId===Ce&&Pt.nodeId===Le);if(ot!==-1){fe({nestId:Ce,nestName:Ae?W.nestName:"Document",nodeId:Le,isOwner:Ae?W.isOwner:!1,isAnonOwned:Ae?W.isAnonOwned:!1,breadcrumb:Jt.slice(0,ot)});return}const ht=W.nodeId!=="new"?[...Jt,{nestId:W.nestId,nestName:W.nestName,nodeId:W.nodeId,title:(at==null?void 0:at.trim())||"Untitled",isOwner:W.isOwner,isAnonOwned:W.isAnonOwned}]:Jt;fe({nestId:Ce,nestName:Ae?W.nestName:"Document",nodeId:Le,isOwner:Ae?W.isOwner:!1,isAnonOwned:Ae?W.isAnonOwned:!1,breadcrumb:ht})},onTagClick:Ce=>Se({initialTags:[Ce]}),onOpenNest:()=>Se(),onOpenFolder:Ce=>Se({initialFolder:Ce}),onCreateDocument:(Ce,Le)=>fe({nestId:Ce,nestName:W.nestName,nodeId:"new",isOwner:W.isOwner,isAnonOwned:W.isAnonOwned,initialTitle:Le}),initialTitle:W.initialTitle},`${W.nestId}/${W.nodeId}/${W.initialFolder??""}`)})(),Nc(d)&&d.page!=="nest"&&(()=>{const W=tl(d.page);if(!W||$p(d.page,ze))return null;const fe=d,Se={nestId:fe.nestId,nestName:fe.nestName,isOwner:fe.isOwner,isAnonOwned:fe.isAnonOwned,isArchived:fe.isArchived,openDocument:Ce=>x({page:"document",nestId:fe.nestId,nestName:fe.nestName,nodeId:Ce,isOwner:fe.isOwner,isAnonOwned:fe.isAnonOwned}),openNest:Ce=>x({page:"nest",nestId:fe.nestId,nestName:fe.nestName,isOwner:fe.isOwner,isAnonOwned:fe.isAnonOwned,...Ce!=null&&Ce.tags?{initialTags:Ce.tags}:{}}),leaveNest:Tt};return h.jsx(uH,{value:Se,children:h.jsx(y.Suspense,{fallback:h.jsx("div",{className:"py-12 text-center text-muted-foreground",children:"Loading..."}),children:h.jsx(W.Component,{})})})})(),d.page==="docs"&&h.jsx(_H,{onOpenGuide:()=>x({page:"dashboard",tab:"guide"})})]})})}),d.page!=="document"&&(ft?h.jsx(pH,{branding:ft,className:gt}):h.jsxs("footer",{className:`${gt} px-4 py-4 text-xs text-muted-foreground text-center`,children:["ContextNest Community",n?` v${n}`:""]}))]}),(i||e==="open")&&h.jsx(eH,{page:ie,onOpenNode:(W,fe)=>void _(W,fe),onOpenSettings:a?()=>x({page:"dashboard",tab:"settings"}):void 0}),Z&&"nestId"in d&&h.jsx(LV,{isOpen:!0,onClose:()=>Q(!1),nestId:d.nestId,nestName:d.nestName,onManageKeys:()=>{Q(!1),x({page:"dashboard",tab:"api-keys"})}}),k&&h.jsx(FV,{existingAdmin:((Et=r==null?void 0:r.admin)==null?void 0:Et.email)||null,onClose:()=>E(!1)}),to]})}function RH({me:e,isAdmin:t,onShortcuts:n,onAccount:r,onLogout:i}){var u;const a=((u=e.name)==null?void 0:u.trim())||e.email,l=a.charAt(0);return h.jsxs(Wz,{modal:!1,children:[h.jsx(qz,{asChild:!0,children:h.jsxs(ut,{variant:"ghost",size:"sm",className:"group h-9 gap-2 px-2","data-testid":"user-menu-trigger",children:[h.jsx(tm,{className:"h-[1.8rem] w-[1.8rem] rounded-sm shrink-0",children:h.jsx(nm,{className:"rounded-sm",children:l})}),h.jsx("span",{className:"hidden sm:inline max-w-[140px] truncate text-sm font-medium",children:a}),h.jsx(ri,{className:"h-3.5 w-3.5 text-muted-foreground"})]})}),h.jsxs(yC,{align:"end",className:"min-w-56",children:[h.jsxs("div",{className:"flex items-center gap-2 p-2",children:[h.jsx(tm,{className:"h-8 w-8 rounded-sm shrink-0",children:h.jsx(nm,{className:"rounded-sm",children:l})}),h.jsxs("div",{className:"grid gap-0.5 leading-none min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"font-semibold truncate",children:a}),t&&h.jsxs(eg,{variant:"outline",className:"gap-1 border-blue-200 bg-blue-50 text-blue-700 text-[10px] px-1.5 py-0",children:[h.jsx(ud,{className:"h-2.5 w-2.5"}),"Admin"]})]}),h.jsx("div",{className:"text-sm text-muted-foreground truncate",children:e.email})]})]}),h.jsx(am,{}),h.jsxs(Oc,{onSelect:r,className:"cursor-pointer","data-testid":"user-menu-account",children:[h.jsx(V0,{className:"h-3.5 w-3.5 mr-2"}),"Account"]}),h.jsxs(Oc,{onSelect:n,className:"cursor-pointer",children:[h.jsx(FP,{className:"h-3.5 w-3.5 mr-2"}),"Keyboard shortcuts"]}),h.jsx(am,{}),h.jsxs(Oc,{onSelect:i,className:"cursor-pointer text-red-600 focus:text-red-700","data-testid":"user-menu-logout",children:[h.jsx(B0,{className:"h-3.5 w-3.5 mr-2"}),"Logout"]})]})]})}class OH extends y.Component{constructor(){super(...arguments);$x(this,"state",{error:null,info:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){console.error("[ui] render crash:",n,r.componentStack),this.setState({info:r})}render(){const{error:n,info:r}=this.state;return n?h.jsx("div",{className:"min-h-screen flex items-center justify-center p-6",children:h.jsxs("div",{className:"max-w-2xl w-full space-y-4",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-lg font-semibold text-destructive",children:"Something broke while rendering this page"}),h.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."})]}),h.jsx("pre",{className:"text-xs bg-muted rounded-md p-3 overflow-auto max-h-40 whitespace-pre-wrap",children:n.message}),(r==null?void 0:r.componentStack)&&h.jsxs("details",{className:"text-xs",children:[h.jsx("summary",{className:"cursor-pointer text-muted-foreground",children:"Component stack"}),h.jsx("pre",{className:"mt-2 bg-muted rounded-md p-3 overflow-auto max-h-60 whitespace-pre-wrap",children:r.componentStack})]}),h.jsxs("div",{className:"flex gap-2",children:[h.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"}),h.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 AH({children:e}){const[t]=y.useState(()=>{const n=jO();return AO(n),n});return h.jsx(SO,{client:t,children:e})}x2.createRoot(document.getElementById("root")).render(h.jsx(ve.StrictMode,{children:h.jsx(OH,{children:h.jsx(AH,{children:h.jsxs(GR,{children:[h.jsx(dH,{children:h.jsx(jH,{})}),h.jsx(q2,{richColors:!0,position:"bottom-right"})]})})})}));export{q_ as $,Yc as A,ut as B,pa as C,Qi as D,$0 as E,Vl as F,ii as G,si as H,Jc as I,ai as J,li as K,Nr as L,kd as M,ca as N,zs as O,gq as P,mq as Q,lj as R,ts as S,bE as T,H0 as U,sN as V,oy as W,Pj as X,Ri as Y,Ds as Z,hr as _,Zc as a,Xq as a$,XV as a0,SK as a1,IO as a2,Wq as a3,qq as a4,TK as a5,LO as a6,dd as a7,rK as a8,Kh as a9,Zz as aA,Oc as aB,am as aC,Am as aD,hW as aE,xW as aF,EW as aG,jW as aH,sa as aI,MW as aJ,IW as aK,Hm as aL,OW as aM,Kq as aN,TP as aO,AW as aP,EK as aQ,h0 as aR,mW as aS,L0 as aT,ij as aU,tw as aV,oU as aW,yV as aX,Yj as aY,Wh as aZ,BO as a_,aP as aa,LH as ab,Rj as ac,yq as ad,CK as ae,DH as af,q as ag,OP as ah,uP as ai,HP as aj,OF as ak,pK as al,D3 as am,hK as an,$3 as ao,F3 as ap,oK as aq,wW as ar,OO as as,tj as at,rj as au,mK as av,Wz as aw,qz as ax,ri as ay,yC as az,qW as b,hl as b$,tK as b0,nK as b1,pr as b2,x1 as b3,U0 as b4,eK as b5,Jq as b6,Ul as b7,_K as b8,fW as b9,Oq as bA,bq as bB,kq as bC,Sq as bD,wq as bE,Uq as bF,Bq as bG,iK as bH,wj as bI,Xx as bJ,ud as bK,XH as bL,xH as bM,Yq as bN,Zq as bO,Im as bP,Bl as bQ,wH as bR,rR as bS,aA as bT,jP as bU,jK as bV,RK as bW,PK as bX,g0 as bY,Hs as bZ,ei as b_,pW as ba,OR as bb,Jx as bc,LR as bd,MR as be,Jj as bf,DR as bg,$R as bh,BR as bi,Vq as bj,Eq as bk,_q as bl,Cq as bm,Iq as bn,Aq as bo,Tq as bp,Nq as bq,zq as br,Fq as bs,FR as bt,bl as bu,Rq as bv,UR as bw,Lq as bx,Dq as by,Mq as bz,Be as c,YV as c$,sd as c0,dW as c1,_W as c2,NW as c3,iW as c4,gW as c5,bF as c6,kF as c7,CF as c8,SF as c9,gm as cA,l6 as cB,Fg as cC,Ud as cD,m_ as cE,E9 as cF,Jg as cG,yW as cH,Tc as cI,oR as cJ,ad as cK,q$ as cL,K$ as cM,ve as cN,I0 as cO,Y4 as cP,Q4 as cQ,G4 as cR,hb as cS,Z4 as cT,uK as cU,J4 as cV,cK as cW,e5 as cX,Fl as cY,zl as cZ,nP as c_,EF as ca,LV as cb,bW as cc,Om as cd,Vt as ce,RW as cf,cW as cg,kW as ch,CW as ci,SW as cj,TW as ck,PW as cl,uW as cm,hF as cn,mF as co,gF as cp,yF as cq,vF as cr,wF as cs,gK as ct,YU as cu,it as cv,We as cw,i6 as cx,vK as cy,yK as cz,KW as d,lK as d$,QV as d0,hP as d1,uN as d2,ld as d3,D0 as d4,KH as d5,V0 as d6,tm as d7,nm as d8,qH as d9,KP as dA,MH as dB,ug as dC,sW as dD,ew as dE,Hh as dF,rW as dG,aW as dH,lW as dI,tW as dJ,oW as dK,Qq as dL,Pq as dM,nW as dN,qj as dO,Tk as dP,sK as dQ,Pk as dR,nt as dS,aK as dT,lg as dU,Ne as dV,jk as dW,Rk as dX,N$ as dY,ag as dZ,Mr as d_,MO as da,Hq as db,_V as dc,xK as dd,DV as de,$V as df,JH as dg,Uj as dh,wK as di,Vj as dj,wE as dk,NK as dl,yj as dm,F0 as dn,SH as dp,RF as dq,Gq as dr,MP as ds,jq as dt,vq as du,xq as dv,LW as dw,bK as dx,PV as dy,kK as dz,eg as e,B$ as e0,Lj as e1,$H as e2,HH as e3,VH as e4,WH as e5,zH as e6,ZH as e7,YH as e8,BH as e9,QH as eA,GH as eB,fj as eC,HW as eD,XW as eE,eq as eF,B3 as eG,eW as eH,qF as eI,GW as eJ,QW as eK,YW as eL,ZW as eM,tq as eN,nq as eO,rq as eP,UH as ea,FH as eb,JW as ec,fn as ed,oi as ee,pS as ef,hS as eg,Fe as eh,Nd as ei,$n as ej,vd as ek,gd as el,mS as em,fK as en,gS as eo,pq as ep,dq as eq,hq as er,fq as es,aq as et,oq as eu,iq as ev,lq as ew,sq as ex,uq as ey,cq as ez,wb as f,WW as g,Sj as h,wl as i,h as j,yR as k,It as l,DW as m,vW as n,zW as o,FW as p,BW as q,y as r,UW as s,$q as t,Wl as u,VW as v,Te as w,Sh as x,cj as y,$W as z};
|