documentation-hub 5.7.2
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/.eslintrc.json +43 -0
- package/.github/workflows/build.yml +64 -0
- package/.github/workflows/ci.yml +39 -0
- package/.vscode/extensions.json +3 -0
- package/Current.md +97 -0
- package/DocHub_Image.png +0 -0
- package/README.md +666 -0
- package/USER_GUIDE.md +1173 -0
- package/Updater.md +311 -0
- package/build/256x256.png +0 -0
- package/build/512x512.png +0 -0
- package/build/app-update.yml +4 -0
- package/build/create-icon.js +208 -0
- package/build/icon.ico +0 -0
- package/build/icon.png +0 -0
- package/build/icon_1024x1024.png +0 -0
- package/dist/assets/Analytics-BpsG9895.js +1 -0
- package/dist/assets/Card-IAZin8kp.js +1 -0
- package/dist/assets/CurrentSession-B-rFkHvf.js +12 -0
- package/dist/assets/Dashboard-C_5gMb0q.js +1 -0
- package/dist/assets/Documents-CqZ25axS.js +1 -0
- package/dist/assets/Input-l89xwXBi.js +1 -0
- package/dist/assets/Reporting-DqdHJY_a.js +1 -0
- package/dist/assets/Search-XNbu5z_3.js +1 -0
- package/dist/assets/SessionManager-lH9hZfzH.js +1 -0
- package/dist/assets/Sessions-ClZOPYNc.js +1 -0
- package/dist/assets/Settings-DUEHGURa.js +11 -0
- package/dist/assets/index-8xUe8ptc.js +24 -0
- package/dist/assets/index-RYyJqF7O.css +1 -0
- package/dist/assets/path-BkOl0AGO.js +1 -0
- package/dist/assets/promises-ID_B9S-h.js +1 -0
- package/dist/assets/urlHelpers-TvgahX0r.js +1 -0
- package/dist/assets/useToast-yRSO1dkm.js +1 -0
- package/dist/assets/vendor-charts-RkGK5ROP.js +36 -0
- package/dist/assets/vendor-db-l0sNRNKZ.js +1 -0
- package/dist/assets/vendor-react-BVZ_anCF.js +4 -0
- package/dist/assets/vendor-search-Dw8P0qyA.js +1 -0
- package/dist/assets/vendor-ui-BU7NfluV.js +53 -0
- package/dist/electron/PowerAutomateApiService-LfW09ZGr.js +147 -0
- package/dist/electron/main-CXkNtyv-.js +19789 -0
- package/dist/electron/main.js +5 -0
- package/dist/electron/preload.js +1 -0
- package/dist/icon.png +0 -0
- package/dist/index.html +27 -0
- package/docs/CODEBASE_ANALYSIS_REPORT.md +309 -0
- package/docs/DEBUG_LOGGING_GUIDE.md +244 -0
- package/docs/README.md +115 -0
- package/docs/TOC_WIRING_GUIDE.md +344 -0
- package/docs/analysis/Bullet_Symbol_Bug_Analysis.md +136 -0
- package/docs/analysis/DOCXMLATER_ANALYSIS_SUMMARY.txt +169 -0
- package/docs/analysis/Document_Processing_Issues_Analysis.md +704 -0
- package/docs/analysis/FIELD_PRESERVATION_ANALYSIS.md +1200 -0
- package/docs/analysis/INDENTATION_PRESERVE_ANALYSIS.md +181 -0
- package/docs/analysis/INDENTATION_PRESERVE_IMPLEMENTATION.md +207 -0
- package/docs/analysis/List_Implementation.md +206 -0
- package/docs/analysis/List_Implementation_Accuracy_Report.md +366 -0
- package/docs/analysis/PROCESSING_OPTIONS_UI_UPDATES.md +220 -0
- package/docs/analysis/RefactorStyles.md +852 -0
- package/docs/analysis/STYLE_PARAMETER_ENHANCEMENT.md +143 -0
- package/docs/analysis/docxmlater-comparison-todo-2025-11-13.md +636 -0
- package/docs/analysis/docxmlater-implementation-analysis-2025-11-13.md +340 -0
- package/docs/analysis/docxmlater-template_ui-integration-analysis.md +263 -0
- package/docs/analysis/github-issues-to-create.md +237 -0
- package/docs/api/API_README.md +538 -0
- package/docs/api/API_REFERENCE.md +751 -0
- package/docs/api/TYPE_DEFINITIONS.md +869 -0
- package/docs/architecture/FONT_EMBEDDING_GUIDE.md +318 -0
- package/docs/architecture/docxmlater-functions-and-structure.md +726 -0
- package/docs/docxmlater-readme.md +1341 -0
- package/docs/fixes/EXECUTION_LOG_TEST_BASE.md +573 -0
- package/docs/fixes/HYPERLINK_TEXT_SANITIZATION.md +253 -0
- package/docs/fixes/README.md +37 -0
- package/docs/github-issues/issue-1-body.md +125 -0
- package/docs/github-issues/issue-10-body.md +850 -0
- package/docs/github-issues/issue-2-body.md +200 -0
- package/docs/github-issues/issue-3-body.md +270 -0
- package/docs/github-issues/issue-4-body.md +169 -0
- package/docs/github-issues/issue-5-body.md +173 -0
- package/docs/github-issues/issue-6-body.md +158 -0
- package/docs/github-issues/issue-7-body.md +171 -0
- package/docs/github-issues/issue-8-body.md +407 -0
- package/docs/github-issues/issue-9-body.md +515 -0
- package/docs/github-issues/issue-tracker.md +274 -0
- package/docs/github-issues/predictive-analysis-2025-10-18.md +2131 -0
- package/docs/implementation/List_Framework_Refactor_Plan.md +336 -0
- package/docs/implementation/PRIMARY_TEXT_COLOR_FEATURE.md +217 -0
- package/docs/implementation/RELEASE_PLAN_v2.1.0.md +362 -0
- package/docs/implementation/RefactorStyles.md +588 -0
- package/docs/implementation/implement-plan.md +489 -0
- package/docs/implementation/missing-helpers-implementation.md +391 -0
- package/docs/implementation/refactor-plan.md +520 -0
- package/docs/implementation/session-implementation-complete.md +233 -0
- package/docs/implementation/session-management-plan.md +250 -0
- package/docs/setup-checklist.md +77 -0
- package/docs/versions/changelog.md +345 -0
- package/electron/customUpdater.ts +656 -0
- package/electron/main.ts +2441 -0
- package/electron/memoryConfig.ts +187 -0
- package/electron/preload.ts +394 -0
- package/electron/proxyConfig.ts +340 -0
- package/electron/services/BackupService.ts +452 -0
- package/electron/services/DictionaryService.ts +402 -0
- package/electron/services/LocalDictionaryLookupService.ts +147 -0
- package/electron/services/PowerAutomateApiService.ts +231 -0
- package/electron/services/SharePointSyncService.ts +474 -0
- package/electron/windowsCertStore.ts +427 -0
- package/electron/zscalerConfig.ts +381 -0
- package/eslint.config.js +92 -0
- package/jest.config.js +52 -0
- package/package.json +214 -0
- package/postcss.config.mjs +6 -0
- package/public/icon.png +0 -0
- package/publish-release.ps1 +5 -0
- package/renovate.json +30 -0
- package/src/App.tsx +216 -0
- package/src/__mocks__/p-limit.js +12 -0
- package/src/__mocks__/styleMock.js +1 -0
- package/src/components/common/BugReportButton.tsx +44 -0
- package/src/components/common/BugReportDialog.tsx +193 -0
- package/src/components/common/Button.tsx +153 -0
- package/src/components/common/Card.tsx +86 -0
- package/src/components/common/ColorPickerDialog.tsx +177 -0
- package/src/components/common/ConfirmDialog.tsx +96 -0
- package/src/components/common/DebugConsole.tsx +275 -0
- package/src/components/common/EmptyState.tsx +183 -0
- package/src/components/common/ErrorBoundary.tsx +98 -0
- package/src/components/common/ErrorDetailsDialog.tsx +153 -0
- package/src/components/common/ErrorFallback.tsx +218 -0
- package/src/components/common/Input.tsx +109 -0
- package/src/components/common/Skeleton.tsx +184 -0
- package/src/components/common/SplashScreen.tsx +81 -0
- package/src/components/common/Toast.tsx +155 -0
- package/src/components/common/Tooltip.tsx +79 -0
- package/src/components/common/UpdateNotification.tsx +320 -0
- package/src/components/comparison/ComparisonWindow.tsx +374 -0
- package/src/components/comparison/SideBySideDiff.tsx +486 -0
- package/src/components/comparison/index.ts +8 -0
- package/src/components/document/DocumentUploader.tsx +288 -0
- package/src/components/document/HyperlinkPreview.tsx +430 -0
- package/src/components/document/HyperlinkService.md +1484 -0
- package/src/components/document/Hyperlink_Technical_Documentation.md +496 -0
- package/src/components/document/InlineChangesView.tsx +707 -0
- package/src/components/document/ProcessingProgress.tsx +303 -0
- package/src/components/document/ProcessingResults.tsx +256 -0
- package/src/components/document/TrackedChangesDetail.tsx +530 -0
- package/src/components/document/TrackedChangesPanel.tsx +546 -0
- package/src/components/document/VirtualDocumentList.tsx +240 -0
- package/src/components/editor/DocumentEditor.tsx +723 -0
- package/src/components/editor/DocumentEditorModal.tsx +640 -0
- package/src/components/editor/EditorQuickActions.tsx +502 -0
- package/src/components/editor/EditorToolbar.tsx +312 -0
- package/src/components/editor/TableEditor.tsx +926 -0
- package/src/components/editor/index.ts +18 -0
- package/src/components/layout/Header.tsx +190 -0
- package/src/components/layout/Sidebar.tsx +313 -0
- package/src/components/layout/TitleBar.tsx +190 -0
- package/src/components/navigation/CommandPalette.tsx +233 -0
- package/src/components/navigation/KeyboardShortcutsModal.tsx +173 -0
- package/src/components/sessions/ChangeItem.tsx +408 -0
- package/src/components/sessions/ChangeViewer.tsx +1155 -0
- package/src/components/sessions/DocumentComparisonModal.tsx +314 -0
- package/src/components/sessions/ProcessingOptions.tsx +297 -0
- package/src/components/sessions/ReplacementsTab.tsx +438 -0
- package/src/components/sessions/RevisionHandlingOptions.tsx +87 -0
- package/src/components/sessions/SessionManager.tsx +188 -0
- package/src/components/sessions/StylesEditor.tsx +1335 -0
- package/src/components/sessions/TabContainer.tsx +151 -0
- package/src/components/sessions/VirtualSessionList.tsx +157 -0
- package/src/components/sessions/sessionToProcessorManager.tsx +420 -0
- package/src/components/settings/CertificateManager.tsx +410 -0
- package/src/components/settings/SegmentedControl.tsx +88 -0
- package/src/components/settings/SettingRow.tsx +52 -0
- package/src/contexts/GlobalStatsContext.tsx +396 -0
- package/src/contexts/SessionContext.tsx +2129 -0
- package/src/contexts/ThemeContext.tsx +428 -0
- package/src/contexts/UserSettingsContext.tsx +290 -0
- package/src/contexts/__tests__/GlobalStatsContext.test.tsx +390 -0
- package/src/global.d.ts +273 -0
- package/src/hooks/useDocumentQueue.tsx +210 -0
- package/src/hooks/useToast.tsx +55 -0
- package/src/main.tsx +10 -0
- package/src/pages/Analytics.tsx +386 -0
- package/src/pages/CurrentSession.tsx +1174 -0
- package/src/pages/Dashboard.tsx +319 -0
- package/src/pages/Documents.tsx +317 -0
- package/src/pages/Projects.tsx +250 -0
- package/src/pages/Reporting.tsx +386 -0
- package/src/pages/Search.tsx +349 -0
- package/src/pages/Sessions.tsx +285 -0
- package/src/pages/Settings.tsx +2662 -0
- package/src/services/HyperlinkService.ts +1085 -0
- package/src/services/document/DocXMLaterProcessor.ts +617 -0
- package/src/services/document/DocumentProcessingComparison.ts +856 -0
- package/src/services/document/DocumentSnapshotService.ts +575 -0
- package/src/services/document/WordDocumentProcessor.ts +10509 -0
- package/src/services/document/__tests__/DocXMLaterProcessor.hyperlinks.test.md +311 -0
- package/src/services/document/__tests__/WordDocumentProcessor.integration.test.ts +515 -0
- package/src/services/document/__tests__/WordDocumentProcessor.test.ts +812 -0
- package/src/services/document/blanklines/BlankLineManager.ts +658 -0
- package/src/services/document/blanklines/__tests__/paragraphChecks.test.ts +281 -0
- package/src/services/document/blanklines/helpers/blankLineInsertion.ts +87 -0
- package/src/services/document/blanklines/helpers/blankLineSnapshot.ts +251 -0
- package/src/services/document/blanklines/helpers/clearCustom.ts +121 -0
- package/src/services/document/blanklines/helpers/contextChecks.ts +117 -0
- package/src/services/document/blanklines/helpers/imageChecks.ts +51 -0
- package/src/services/document/blanklines/helpers/paragraphChecks.ts +236 -0
- package/src/services/document/blanklines/helpers/removeBlanksBetweenListItems.ts +91 -0
- package/src/services/document/blanklines/helpers/removeTrailingBlanks.ts +35 -0
- package/src/services/document/blanklines/helpers/tableGuards.ts +21 -0
- package/src/services/document/blanklines/index.ts +67 -0
- package/src/services/document/blanklines/rules/additionRules.ts +337 -0
- package/src/services/document/blanklines/rules/indentationRules.ts +317 -0
- package/src/services/document/blanklines/rules/removalRules.ts +362 -0
- package/src/services/document/blanklines/rules/ruleTypes.ts +92 -0
- package/src/services/document/blanklines/types.ts +29 -0
- package/src/services/document/helpers/ImageBorderCropper.ts +377 -0
- package/src/services/document/helpers/__tests__/whitespace.test.ts +272 -0
- package/src/services/document/helpers/whitespace.ts +117 -0
- package/src/services/document/list/ListNormalizer.ts +947 -0
- package/src/services/document/list/index.ts +45 -0
- package/src/services/document/list/list-detection.ts +275 -0
- package/src/services/document/list/list-types.ts +162 -0
- package/src/services/document/processors/HyperlinkProcessor.ts +370 -0
- package/src/services/document/processors/ListProcessor.ts +257 -0
- package/src/services/document/processors/StructureProcessor.ts +176 -0
- package/src/services/document/processors/StyleProcessor.ts +389 -0
- package/src/services/document/processors/TableProcessor.ts +2238 -0
- package/src/services/document/processors/__tests__/HyperlinkProcessor.test.ts +314 -0
- package/src/services/document/processors/__tests__/ListProcessor.test.ts +291 -0
- package/src/services/document/processors/__tests__/StructureProcessor.test.ts +257 -0
- package/src/services/document/processors/__tests__/TableProcessor.hlp-tips-bullets.test.ts +459 -0
- package/src/services/document/processors/__tests__/TableProcessor.test.ts +1604 -0
- package/src/services/document/processors/index.ts +28 -0
- package/src/services/document/types/docx-processing.ts +310 -0
- package/src/services/editor/EditorActionHandlers.ts +901 -0
- package/src/services/editor/index.ts +13 -0
- package/src/setupTests.ts +47 -0
- package/src/styles/global.css +782 -0
- package/src/types/backup.ts +132 -0
- package/src/types/dictionary.ts +125 -0
- package/src/types/document-processing.ts +331 -0
- package/src/types/docxmlater-augments.d.ts +142 -0
- package/src/types/editor.ts +280 -0
- package/src/types/electron.ts +340 -0
- package/src/types/globalStats.ts +155 -0
- package/src/types/hyperlink.ts +471 -0
- package/src/types/operations.ts +354 -0
- package/src/types/session.ts +427 -0
- package/src/types/settings.ts +112 -0
- package/src/utils/MemoryMonitor.ts +248 -0
- package/src/utils/cn.ts +6 -0
- package/src/utils/colorConvert.ts +306 -0
- package/src/utils/diffUtils.ts +347 -0
- package/src/utils/documentUtils.ts +202 -0
- package/src/utils/electronGuard.ts +62 -0
- package/src/utils/indexedDB.ts +915 -0
- package/src/utils/logger.ts +717 -0
- package/src/utils/pathSecurity.ts +232 -0
- package/src/utils/pathValidator.ts +236 -0
- package/src/utils/processingTimeEstimator.ts +153 -0
- package/src/utils/safeJsonParse.ts +62 -0
- package/src/utils/textSanitizer.ts +162 -0
- package/src/utils/urlHelpers.ts +304 -0
- package/src/utils/urlPatterns.ts +198 -0
- package/src/utils/urlSanitizer.ts +152 -0
- package/src/vite-env.d.ts +11 -0
- package/tsconfig.electron.json +19 -0
- package/tsconfig.json +36 -0
- package/tsconfig.node.json +12 -0
- package/typedoc.json +45 -0
- package/vite.config.ts +152 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Dashboard-C_5gMb0q.js","./vendor-ui-BU7NfluV.js","./vendor-react-BVZ_anCF.js","./Card-IAZin8kp.js","./SessionManager-lH9hZfzH.js","./Input-l89xwXBi.js","./vendor-charts-RkGK5ROP.js","./Settings-DUEHGURa.js","./urlHelpers-TvgahX0r.js","./CurrentSession-B-rFkHvf.js","./useToast-yRSO1dkm.js","./Sessions-ClZOPYNc.js","./Documents-CqZ25axS.js","./Analytics-BpsG9895.js","./Reporting-DqdHJY_a.js","./Search-XNbu5z_3.js","./vendor-search-Dw8P0qyA.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as h,P as Ls,u as fu,a as Si,b as iv,c as Dg,d as Ng,e as rv,D as cv,f as uv,g as fv,h as Dl,i as dv,k as mv,M as hv,S as gv,X as Ya,A as ba,m as Xe,H as Au,C as _h,F as Og,l as pv,n as zg,o as yv,p as jg,q as Mg,r as bv,Z as vv,s as du,t as mu,v as Uh,w as Sv,U as xv,_ as Nl,x as wv,y as Cv,R as Av,z as Ev,O as Tv,B as Dv,K as Nv,T as Ov,E as zv,G as jv,I as Eu,J as Mv,L as kv,N as Rv,Q as Bv,V as hu,W as xi,Y as _v,$ as Lh,a0 as Uv,a1 as Lv,a2 as Hv,a3 as qv,a4 as Hh,a5 as Gv}from"./vendor-ui-BU7NfluV.js";import{c as Yv,d as Vv,g as kg,r as x,a as Xv,u as wi,e as Rg,f as Qv,h as Zv,O as Kv,i as Fv}from"./vendor-react-BVZ_anCF.js";import{c as Bg}from"./vendor-charts-RkGK5ROP.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function c(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(u){if(u.ep)return;u.ep=!0;const d=c(u);fetch(u.href,d)}})();var Vc={exports:{}},zs={},Xc={exports:{}},Qc={};var qh;function Jv(){return qh||(qh=1,(function(s){function o(M,$){var _=M.length;M.push($);e:for(;0<_;){var me=_-1>>>1,ge=M[me];if(0<u(ge,$))M[me]=$,M[_]=ge,_=me;else break e}}function c(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var $=M[0],_=M.pop();if(_!==$){M[0]=_;e:for(var me=0,ge=M.length,Qe=ge>>>1;me<Qe;){var Ee=2*(me+1)-1,fe=M[Ee],be=Ee+1,Ie=M[be];if(0>u(fe,_))be<ge&&0>u(Ie,fe)?(M[me]=Ie,M[be]=_,me=be):(M[me]=fe,M[Ee]=_,me=Ee);else if(be<ge&&0>u(Ie,_))M[me]=Ie,M[be]=_,me=be;else break e}}return $}function u(M,$){var _=M.sortIndex-$.sortIndex;return _!==0?_:M.id-$.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;s.unstable_now=function(){return d.now()}}else{var m=Date,y=m.now();s.unstable_now=function(){return m.now()-y}}var p=[],b=[],v=1,S=null,A=3,N=!1,R=!1,U=!1,E=!1,q=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function X(M){for(var $=c(b);$!==null;){if($.callback===null)r(b);else if($.startTime<=M)r(b),$.sortIndex=$.expirationTime,o(p,$);else break;$=c(b)}}function j(M){if(U=!1,X(M),!R)if(c(p)!==null)R=!0,I||(I=!0,ye());else{var $=c(b);$!==null&&ie(j,$.startTime-M)}}var I=!1,ee=-1,W=5,re=-1;function Ae(){return E?!0:!(s.unstable_now()-re<W)}function de(){if(E=!1,I){var M=s.unstable_now();re=M;var $=!0;try{e:{R=!1,U&&(U=!1,G(ee),ee=-1),N=!0;var _=A;try{t:{for(X(M),S=c(p);S!==null&&!(S.expirationTime>M&&Ae());){var me=S.callback;if(typeof me=="function"){S.callback=null,A=S.priorityLevel;var ge=me(S.expirationTime<=M);if(M=s.unstable_now(),typeof ge=="function"){S.callback=ge,X(M),$=!0;break t}S===c(p)&&r(p),X(M)}else r(p);S=c(p)}if(S!==null)$=!0;else{var Qe=c(b);Qe!==null&&ie(j,Qe.startTime-M),$=!1}}break e}finally{S=null,A=_,N=!1}$=void 0}}finally{$?ye():I=!1}}}var ye;if(typeof V=="function")ye=function(){V(de)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,xe=Me.port2;Me.port1.onmessage=de,ye=function(){xe.postMessage(null)}}else ye=function(){q(de,0)};function ie(M,$){ee=q(function(){M(s.unstable_now())},$)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(M){M.callback=null},s.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<M?Math.floor(1e3/M):5},s.unstable_getCurrentPriorityLevel=function(){return A},s.unstable_next=function(M){switch(A){case 1:case 2:case 3:var $=3;break;default:$=A}var _=A;A=$;try{return M()}finally{A=_}},s.unstable_requestPaint=function(){E=!0},s.unstable_runWithPriority=function(M,$){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var _=A;A=M;try{return $()}finally{A=_}},s.unstable_scheduleCallback=function(M,$,_){var me=s.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?me+_:me):_=me,M){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=_+ge,M={id:v++,callback:$,priorityLevel:M,startTime:_,expirationTime:ge,sortIndex:-1},_>me?(M.sortIndex=_,o(b,M),c(p)===null&&M===c(b)&&(U?(G(ee),ee=-1):U=!0,ie(j,_-me))):(M.sortIndex=ge,o(p,M),R||N||(R=!0,I||(I=!0,ye()))),M},s.unstable_shouldYield=Ae,s.unstable_wrapCallback=function(M){var $=A;return function(){var _=A;A=$;try{return M.apply(this,arguments)}finally{A=_}}}})(Qc)),Qc}var Gh;function $v(){return Gh||(Gh=1,Xc.exports=Jv()),Xc.exports}var Yh;function Iv(){if(Yh)return zs;Yh=1;var s=$v(),o=Yv(),c=Vv();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(r(188))}function b(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return p(l),e;if(i===a)return p(l),t;i=i.sibling}throw Error(r(188))}if(n.return!==a.return)n=l,a=i;else{for(var f=!1,g=l.child;g;){if(g===n){f=!0,n=l,a=i;break}if(g===a){f=!0,a=l,n=i;break}g=g.sibling}if(!f){for(g=i.child;g;){if(g===n){f=!0,n=i,a=l;break}if(g===a){f=!0,a=i,n=l;break}g=g.sibling}if(!f)throw Error(r(189))}}if(n.alternate!==a)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,A=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),V=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),Ae=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=de&&e[de]||e["@@iterator"],typeof e=="function"?e:null)}var Me=Symbol.for("react.client.reference");function xe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case U:return"Fragment";case q:return"Profiler";case E:return"StrictMode";case j:return"Suspense";case I:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case V:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:xe(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return xe(e(t))}catch{}}return null}var ie=Array.isArray,M=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_={pending:!1,data:null,method:null,action:null},me=[],ge=-1;function Qe(e){return{current:e}}function Ee(e){0>ge||(e.current=me[ge],me[ge]=null,ge--)}function fe(e,t){ge++,me[ge]=e.current,e.current=t}var be=Qe(null),Ie=Qe(null),Q=Qe(null),L=Qe(null);function D(e,t){switch(fe(Q,t),fe(Ie,e),fe(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?sh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=sh(t),e=oh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ee(be),fe(be,e)}function K(){Ee(be),Ee(Ie),Ee(Q)}function J(e){e.memoizedState!==null&&fe(L,e);var t=be.current,n=oh(t,e.type);t!==n&&(fe(Ie,e),fe(be,n))}function te(e){Ie.current===e&&(Ee(be),Ee(Ie)),L.current===e&&(Ee(L),Ts._currentValue=_)}var P,ce;function we(e){if(P===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||"",ce=-1<n.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+P+e+ce}var ut=!1;function vt(e,t){if(!e||ut)return"";ut=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(B){var k=B}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(B){k=B}e.call(Z.prototype)}}else{try{throw Error()}catch(B){k=B}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(B){if(B&&k&&typeof B.stack=="string")return[B.stack,k.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),f=i[0],g=i[1];if(f&&g){var w=f.split(`
|
|
5
|
+
`),z=g.split(`
|
|
6
|
+
`);for(l=a=0;a<w.length&&!w[a].includes("DetermineComponentFrameRoot");)a++;for(;l<z.length&&!z[l].includes("DetermineComponentFrameRoot");)l++;if(a===w.length||l===z.length)for(a=w.length-1,l=z.length-1;1<=a&&0<=l&&w[a]!==z[l];)l--;for(;1<=a&&0<=l;a--,l--)if(w[a]!==z[l]){if(a!==1||l!==1)do if(a--,l--,0>l||w[a]!==z[l]){var H=`
|
|
7
|
+
`+w[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=l);break}}}finally{ut=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?we(n):""}function wt(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return vt(e.type,!1);case 11:return vt(e.type.render,!1);case 1:return vt(e.type,!0);case 31:return we("Activity");default:return""}}function Ct(e){try{var t="",n=null;do t+=wt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
8
|
+
Error generating stack: `+a.message+`
|
|
9
|
+
`+a.stack}}var bt=Object.prototype.hasOwnProperty,St=s.unstable_scheduleCallback,pe=s.unstable_cancelCallback,ze=s.unstable_shouldYield,Qt=s.unstable_requestPaint,tt=s.unstable_now,Oi=s.unstable_getCurrentPriorityLevel,mn=s.unstable_ImmediatePriority,zi=s.unstable_UserBlockingPriority,ke=s.unstable_NormalPriority,ne=s.unstable_LowPriority,nt=s.unstable_IdlePriority,Mt=s.log,sn=s.unstable_setDisableYieldValue,Ll=null,kt=null;function Qn(e){if(typeof Mt=="function"&&sn(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(Ll,e)}catch{}}var Rt=Math.clz32?Math.clz32:Kp,Qp=Math.log,Zp=Math.LN2;function Kp(e){return e>>>=0,e===0?32:31-(Qp(e)/Zp|0)|0}var Gs=256,Ys=262144,Vs=4194304;function xa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xs(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,i=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var g=a&134217727;return g!==0?(a=g&~i,a!==0?l=xa(a):(f&=g,f!==0?l=xa(f):n||(n=g&~e,n!==0&&(l=xa(n))))):(g=a&~i,g!==0?l=xa(g):f!==0?l=xa(f):n||(n=a&~e,n!==0&&(l=xa(n)))),l===0?0:t!==0&&t!==l&&(t&i)===0&&(i=l&-l,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:l}function Hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hu(){var e=Vs;return Vs<<=1,(Vs&62914560)===0&&(Vs=4194304),e}function ji(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ql(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jp(e,t,n,a,l,i){var f=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var g=e.entanglements,w=e.expirationTimes,z=e.hiddenUpdates;for(n=f&~n;0<n;){var H=31-Rt(n),Z=1<<H;g[H]=0,w[H]=-1;var k=z[H];if(k!==null)for(z[H]=null,H=0;H<k.length;H++){var B=k[H];B!==null&&(B.lane&=-536870913)}n&=~Z}a!==0&&qu(e,a,0),i!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=i&~(f&~t))}function qu(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Rt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function Gu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Rt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function Yu(e,t){var n=t&-t;return n=(n&42)!==0?1:Mi(n),(n&(e.suspendedLanes|t))!==0?0:n}function Mi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ki(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vu(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Oh(e.type))}function Xu(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}var Zn=Math.random().toString(36).slice(2),mt="__reactFiber$"+Zn,At="__reactProps$"+Zn,Va="__reactContainer$"+Zn,Ri="__reactEvents$"+Zn,$p="__reactListeners$"+Zn,Ip="__reactHandles$"+Zn,Qu="__reactResources$"+Zn,Gl="__reactMarker$"+Zn;function Bi(e){delete e[mt],delete e[At],delete e[Ri],delete e[$p],delete e[Ip]}function Xa(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Va]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mh(e);e!==null;){if(n=e[mt])return n;e=mh(e)}return t}e=n,n=e.parentNode}return null}function Qa(e){if(e=e[mt]||e[Va]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Yl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Za(e){var t=e[Qu];return t||(t=e[Qu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[Gl]=!0}var Zu=new Set,Ku={};function wa(e,t){Ka(e,t),Ka(e+"Capture",t)}function Ka(e,t){for(Ku[e]=t,e=0;e<t.length;e++)Zu.add(t[e])}var Pp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Fu={},Ju={};function Wp(e){return bt.call(Ju,e)?!0:bt.call(Fu,e)?!1:Pp.test(e)?Ju[e]=!0:(Fu[e]=!0,!1)}function Qs(e,t,n){if(Wp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Zs(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function An(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $u(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ey(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(f){n=""+f,i.call(this,f)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(f){n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _i(e){if(!e._valueTracker){var t=$u(e)?"checked":"value";e._valueTracker=ey(e,t,""+e[t])}}function Iu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=$u(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Ks(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ty=/[\n"\\]/g;function Kt(e){return e.replace(ty,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ui(e,t,n,a,l,i,f,g){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Li(e,f,Zt(t)):n!=null?Li(e,f,Zt(n)):a!=null&&e.removeAttribute("value"),l==null&&i!=null&&(e.defaultChecked=!!i),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+Zt(g):e.removeAttribute("name")}function Pu(e,t,n,a,l,i,f,g){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){_i(e);return}n=n!=null?""+Zt(n):"",t=t!=null?""+Zt(t):n,g||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=g?e.checked:!!a,e.defaultChecked=!!a,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),_i(e)}function Li(e,t,n){t==="number"&&Ks(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Fa(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Zt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Wu(e,t,n){if(t!=null&&(t=""+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Zt(n):""}function ef(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(r(92));if(ie(a)){if(1<a.length)throw Error(r(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Zt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),_i(e)}function Ja(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ny=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tf(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||ny.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function nf(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&tf(e,l,a)}else for(var i in t)t.hasOwnProperty(i)&&tf(e,i,t[i])}function Hi(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ay=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ly=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Fs(e){return ly.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function En(){}var qi=null;function Gi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $a=null,Ia=null;function af(e){var t=Qa(e);if(t&&(e=t.stateNode)){var n=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ui(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[At]||null;if(!l)throw Error(r(90));Ui(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Iu(a)}break e;case"textarea":Wu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Fa(e,!!n.multiple,t,!1)}}}var Yi=!1;function lf(e,t,n){if(Yi)return e(t,n);Yi=!0;try{var a=e(t);return a}finally{if(Yi=!1,($a!==null||Ia!==null)&&(_o(),$a&&(t=$a,e=Ia,Ia=$a=null,af(t),e)))for(t=0;t<e.length;t++)af(e[t])}}function Vl(e,t){var n=e.stateNode;if(n===null)return null;var a=n[At]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vi=!1;if(Tn)try{var Xl={};Object.defineProperty(Xl,"passive",{get:function(){Vi=!0}}),window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{Vi=!1}var Kn=null,Xi=null,Js=null;function sf(){if(Js)return Js;var e,t=Xi,n=t.length,a,l="value"in Kn?Kn.value:Kn.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var f=n-e;for(a=1;a<=f&&t[n-a]===l[i-a];a++);return Js=l.slice(e,1<a?1-a:void 0)}function $s(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Is(){return!0}function of(){return!1}function Et(e){function t(n,a,l,i,f){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=i,this.target=f,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(n=e[g],this[g]=n?n(i):i[g]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Is:of,this.isPropagationStopped=of,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Is)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Is)},persist:function(){},isPersistent:Is}),t}var Ca={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ps=Et(Ca),Ql=S({},Ca,{view:0,detail:0}),sy=Et(Ql),Qi,Zi,Zl,Ws=S({},Ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fi,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zl&&(Zl&&e.type==="mousemove"?(Qi=e.screenX-Zl.screenX,Zi=e.screenY-Zl.screenY):Zi=Qi=0,Zl=e),Qi)},movementY:function(e){return"movementY"in e?e.movementY:Zi}}),rf=Et(Ws),oy=S({},Ws,{dataTransfer:0}),iy=Et(oy),ry=S({},Ql,{relatedTarget:0}),Ki=Et(ry),cy=S({},Ca,{animationName:0,elapsedTime:0,pseudoElement:0}),uy=Et(cy),fy=S({},Ca,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dy=Et(fy),my=S({},Ca,{data:0}),cf=Et(my),hy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gy={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"},py={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=py[e])?!!t[e]:!1}function Fi(){return yy}var by=S({},Ql,{key:function(e){if(e.key){var t=hy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fi,charCode:function(e){return e.type==="keypress"?$s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vy=Et(by),Sy=S({},Ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uf=Et(Sy),xy=S({},Ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fi}),wy=Et(xy),Cy=S({},Ca,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ay=Et(Cy),Ey=S({},Ws,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ty=Et(Ey),Dy=S({},Ca,{newState:0,oldState:0}),Ny=Et(Dy),Oy=[9,13,27,32],Ji=Tn&&"CompositionEvent"in window,Kl=null;Tn&&"documentMode"in document&&(Kl=document.documentMode);var zy=Tn&&"TextEvent"in window&&!Kl,ff=Tn&&(!Ji||Kl&&8<Kl&&11>=Kl),df=" ",mf=!1;function hf(e,t){switch(e){case"keyup":return Oy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pa=!1;function jy(e,t){switch(e){case"compositionend":return gf(t);case"keypress":return t.which!==32?null:(mf=!0,df);case"textInput":return e=t.data,e===df&&mf?null:e;default:return null}}function My(e,t){if(Pa)return e==="compositionend"||!Ji&&hf(e,t)?(e=sf(),Js=Xi=Kn=null,Pa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ff&&t.locale!=="ko"?null:t.data;default:return null}}var ky={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 pf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ky[e.type]:t==="textarea"}function yf(e,t,n,a){$a?Ia?Ia.push(a):Ia=[a]:$a=a,t=Vo(t,"onChange"),0<t.length&&(n=new Ps("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Fl=null,Jl=null;function Ry(e){Wm(e,0)}function eo(e){var t=Yl(e);if(Iu(t))return e}function bf(e,t){if(e==="change")return t}var vf=!1;if(Tn){var $i;if(Tn){var Ii="oninput"in document;if(!Ii){var Sf=document.createElement("div");Sf.setAttribute("oninput","return;"),Ii=typeof Sf.oninput=="function"}$i=Ii}else $i=!1;vf=$i&&(!document.documentMode||9<document.documentMode)}function xf(){Fl&&(Fl.detachEvent("onpropertychange",wf),Jl=Fl=null)}function wf(e){if(e.propertyName==="value"&&eo(Jl)){var t=[];yf(t,Jl,e,Gi(e)),lf(Ry,t)}}function By(e,t,n){e==="focusin"?(xf(),Fl=t,Jl=n,Fl.attachEvent("onpropertychange",wf)):e==="focusout"&&xf()}function _y(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return eo(Jl)}function Uy(e,t){if(e==="click")return eo(t)}function Ly(e,t){if(e==="input"||e==="change")return eo(t)}function Hy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:Hy;function $l(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!bt.call(t,l)||!Bt(e[l],t[l]))return!1}return!0}function Cf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Af(e,t){var n=Cf(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cf(n)}}function Ef(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ef(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ks(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ks(e.document)}return t}function Pi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var qy=Tn&&"documentMode"in document&&11>=document.documentMode,Wa=null,Wi=null,Il=null,er=!1;function Df(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;er||Wa==null||Wa!==Ks(a)||(a=Wa,"selectionStart"in a&&Pi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Il&&$l(Il,a)||(Il=a,a=Vo(Wi,"onSelect"),0<a.length&&(t=new Ps("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Wa)))}function Aa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var el={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionrun:Aa("Transition","TransitionRun"),transitionstart:Aa("Transition","TransitionStart"),transitioncancel:Aa("Transition","TransitionCancel"),transitionend:Aa("Transition","TransitionEnd")},tr={},Nf={};Tn&&(Nf=document.createElement("div").style,"AnimationEvent"in window||(delete el.animationend.animation,delete el.animationiteration.animation,delete el.animationstart.animation),"TransitionEvent"in window||delete el.transitionend.transition);function Ea(e){if(tr[e])return tr[e];if(!el[e])return e;var t=el[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Nf)return tr[e]=t[n];return e}var Of=Ea("animationend"),zf=Ea("animationiteration"),jf=Ea("animationstart"),Gy=Ea("transitionrun"),Yy=Ea("transitionstart"),Vy=Ea("transitioncancel"),Mf=Ea("transitionend"),kf=new Map,nr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");nr.push("scrollEnd");function on(e,t){kf.set(e,t),wa(t,[e])}var to=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ft=[],tl=0,ar=0;function no(){for(var e=tl,t=ar=tl=0;t<e;){var n=Ft[t];Ft[t++]=null;var a=Ft[t];Ft[t++]=null;var l=Ft[t];Ft[t++]=null;var i=Ft[t];if(Ft[t++]=null,a!==null&&l!==null){var f=a.pending;f===null?l.next=l:(l.next=f.next,f.next=l),a.pending=l}i!==0&&Rf(n,l,i)}}function ao(e,t,n,a){Ft[tl++]=e,Ft[tl++]=t,Ft[tl++]=n,Ft[tl++]=a,ar|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function lr(e,t,n,a){return ao(e,t,n,a),lo(e)}function Ta(e,t){return ao(e,null,null,t),lo(e)}function Rf(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(l=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,l&&t!==null&&(l=31-Rt(n),e=i.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),i):null}function lo(e){if(50<vs)throw vs=0,mc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var nl={};function Xy(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _t(e,t,n,a){return new Xy(e,t,n,a)}function sr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dn(e,t){var n=e.alternate;return n===null?(n=_t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Bf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function so(e,t,n,a,l,i){var f=0;if(a=e,typeof e=="function")sr(e)&&(f=1);else if(typeof e=="string")f=Jb(e,n,be.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=_t(31,n,t,l),e.elementType=re,e.lanes=i,e;case U:return Da(n.children,l,i,t);case E:f=8,l|=24;break;case q:return e=_t(12,n,t,l|2),e.elementType=q,e.lanes=i,e;case j:return e=_t(13,n,t,l),e.elementType=j,e.lanes=i,e;case I:return e=_t(19,n,t,l),e.elementType=I,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:f=10;break e;case G:f=9;break e;case X:f=11;break e;case ee:f=14;break e;case W:f=16,a=null;break e}f=29,n=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=_t(f,n,t,l),t.elementType=e,t.type=a,t.lanes=i,t}function Da(e,t,n,a){return e=_t(7,e,a,t),e.lanes=n,e}function or(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function _f(e){var t=_t(18,null,null,0);return t.stateNode=e,t}function ir(e,t,n){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Uf=new WeakMap;function Jt(e,t){if(typeof e=="object"&&e!==null){var n=Uf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Ct(t)},Uf.set(e,t),t)}return{value:e,source:t,stack:Ct(t)}}var al=[],ll=0,oo=null,Pl=0,$t=[],It=0,Fn=null,hn=1,gn="";function Nn(e,t){al[ll++]=Pl,al[ll++]=oo,oo=e,Pl=t}function Lf(e,t,n){$t[It++]=hn,$t[It++]=gn,$t[It++]=Fn,Fn=e;var a=hn;e=gn;var l=32-Rt(a)-1;a&=~(1<<l),n+=1;var i=32-Rt(t)+l;if(30<i){var f=l-l%5;i=(a&(1<<f)-1).toString(32),a>>=f,l-=f,hn=1<<32-Rt(t)+l|n<<l|a,gn=i+e}else hn=1<<i|n<<l|a,gn=e}function rr(e){e.return!==null&&(Nn(e,1),Lf(e,1,0))}function cr(e){for(;e===oo;)oo=al[--ll],al[ll]=null,Pl=al[--ll],al[ll]=null;for(;e===Fn;)Fn=$t[--It],$t[It]=null,gn=$t[--It],$t[It]=null,hn=$t[--It],$t[It]=null}function Hf(e,t){$t[It++]=hn,$t[It++]=gn,$t[It++]=Fn,hn=t.id,gn=t.overflow,Fn=e}var ht=null,Ze=null,je=!1,Jn=null,Pt=!1,ur=Error(r(519));function $n(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wl(Jt(t,e)),ur}function qf(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[mt]=e,t[At]=a,n){case"dialog":De("cancel",t),De("close",t);break;case"iframe":case"object":case"embed":De("load",t);break;case"video":case"audio":for(n=0;n<xs.length;n++)De(xs[n],t);break;case"source":De("error",t);break;case"img":case"image":case"link":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"input":De("invalid",t),Pu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":De("invalid",t);break;case"textarea":De("invalid",t),ef(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||ah(t.textContent,n)?(a.popover!=null&&(De("beforetoggle",t),De("toggle",t)),a.onScroll!=null&&De("scroll",t),a.onScrollEnd!=null&&De("scrollend",t),a.onClick!=null&&(t.onclick=En),t=!0):t=!1,t||$n(e,!0)}function Gf(e){for(ht=e.return;ht;)switch(ht.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:ht=ht.return}}function sl(e){if(e!==ht)return!1;if(!je)return Gf(e),je=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Nc(e.type,e.memoizedProps)),n=!n),n&&Ze&&$n(e),Gf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ze=dh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ze=dh(e)}else t===27?(t=Ze,ua(e.type)?(e=kc,kc=null,Ze=e):Ze=t):Ze=ht?en(e.stateNode.nextSibling):null;return!0}function Na(){Ze=ht=null,je=!1}function fr(){var e=Jn;return e!==null&&(Ot===null?Ot=e:Ot.push.apply(Ot,e),Jn=null),e}function Wl(e){Jn===null?Jn=[e]:Jn.push(e)}var dr=Qe(null),Oa=null,On=null;function In(e,t,n){fe(dr,t._currentValue),t._currentValue=n}function zn(e){e._currentValue=dr.current,Ee(dr)}function mr(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function hr(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var i=l.dependencies;if(i!==null){var f=l.child;i=i.firstContext;e:for(;i!==null;){var g=i;i=l;for(var w=0;w<t.length;w++)if(g.context===t[w]){i.lanes|=n,g=i.alternate,g!==null&&(g.lanes|=n),mr(i.return,n,e),a||(f=null);break e}i=g.next}}else if(l.tag===18){if(f=l.return,f===null)throw Error(r(341));f.lanes|=n,i=f.alternate,i!==null&&(i.lanes|=n),mr(f,n,e),f=null}else f=l.child;if(f!==null)f.return=l;else for(f=l;f!==null;){if(f===e){f=null;break}if(l=f.sibling,l!==null){l.return=f.return,f=l;break}f=f.return}l=f}}function ol(e,t,n,a){e=null;for(var l=t,i=!1;l!==null;){if(!i){if((l.flags&524288)!==0)i=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var f=l.alternate;if(f===null)throw Error(r(387));if(f=f.memoizedProps,f!==null){var g=l.type;Bt(l.pendingProps.value,f.value)||(e!==null?e.push(g):e=[g])}}else if(l===L.current){if(f=l.alternate,f===null)throw Error(r(387));f.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Ts):e=[Ts])}l=l.return}e!==null&&hr(t,e,n,a),t.flags|=262144}function io(e){for(e=e.firstContext;e!==null;){if(!Bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){Oa=e,On=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return Yf(Oa,e)}function ro(e,t){return Oa===null&&za(e),Yf(e,t)}function Yf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},On===null){if(e===null)throw Error(r(308));On=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else On=On.next=t;return n}var Qy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Zy=s.unstable_scheduleCallback,Ky=s.unstable_NormalPriority,at={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gr(){return{controller:new Qy,data:new Map,refCount:0}}function es(e){e.refCount--,e.refCount===0&&Zy(Ky,function(){e.controller.abort()})}var ts=null,pr=0,il=0,rl=null;function Fy(e,t){if(ts===null){var n=ts=[];pr=0,il=vc(),rl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return pr++,t.then(Vf,Vf),t}function Vf(){if(--pr===0&&ts!==null){rl!==null&&(rl.status="fulfilled");var e=ts;ts=null,il=0,rl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Jy(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var Xf=M.S;M.S=function(e,t){Dm=tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fy(e,t),Xf!==null&&Xf(e,t)};var ja=Qe(null);function yr(){var e=ja.current;return e!==null?e:Ve.pooledCache}function co(e,t){t===null?fe(ja,ja.current):fe(ja,t.pool)}function Qf(){var e=yr();return e===null?null:{parent:at._currentValue,pool:e}}var cl=Error(r(460)),br=Error(r(474)),uo=Error(r(542)),fo={then:function(){}};function Zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(En,En),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jf(e),e;default:if(typeof t.status=="string")t.then(En,En);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jf(e),e}throw ka=t,cl}}function Ma(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ka=n,cl):n}}var ka=null;function Ff(){if(ka===null)throw Error(r(459));var e=ka;return ka=null,e}function Jf(e){if(e===cl||e===uo)throw Error(r(483))}var ul=null,ns=0;function mo(e){var t=ns;return ns+=1,ul===null&&(ul=[]),Kf(ul,e,t)}function as(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ho(e,t){throw t.$$typeof===A?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $f(e){function t(T,C){if(e){var O=T.deletions;O===null?(T.deletions=[C],T.flags|=16):O.push(C)}}function n(T,C){if(!e)return null;for(;C!==null;)t(T,C),C=C.sibling;return null}function a(T){for(var C=new Map;T!==null;)T.key!==null?C.set(T.key,T):C.set(T.index,T),T=T.sibling;return C}function l(T,C){return T=Dn(T,C),T.index=0,T.sibling=null,T}function i(T,C,O){return T.index=O,e?(O=T.alternate,O!==null?(O=O.index,O<C?(T.flags|=67108866,C):O):(T.flags|=67108866,C)):(T.flags|=1048576,C)}function f(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function g(T,C,O,Y){return C===null||C.tag!==6?(C=or(O,T.mode,Y),C.return=T,C):(C=l(C,O),C.return=T,C)}function w(T,C,O,Y){var ue=O.type;return ue===U?H(T,C,O.props.children,Y,O.key):C!==null&&(C.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===W&&Ma(ue)===C.type)?(C=l(C,O.props),as(C,O),C.return=T,C):(C=so(O.type,O.key,O.props,null,T.mode,Y),as(C,O),C.return=T,C)}function z(T,C,O,Y){return C===null||C.tag!==4||C.stateNode.containerInfo!==O.containerInfo||C.stateNode.implementation!==O.implementation?(C=ir(O,T.mode,Y),C.return=T,C):(C=l(C,O.children||[]),C.return=T,C)}function H(T,C,O,Y,ue){return C===null||C.tag!==7?(C=Da(O,T.mode,Y,ue),C.return=T,C):(C=l(C,O),C.return=T,C)}function Z(T,C,O){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=or(""+C,T.mode,O),C.return=T,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case N:return O=so(C.type,C.key,C.props,null,T.mode,O),as(O,C),O.return=T,O;case R:return C=ir(C,T.mode,O),C.return=T,C;case W:return C=Ma(C),Z(T,C,O)}if(ie(C)||ye(C))return C=Da(C,T.mode,O,null),C.return=T,C;if(typeof C.then=="function")return Z(T,mo(C),O);if(C.$$typeof===V)return Z(T,ro(T,C),O);ho(T,C)}return null}function k(T,C,O,Y){var ue=C!==null?C.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return ue!==null?null:g(T,C,""+O,Y);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case N:return O.key===ue?w(T,C,O,Y):null;case R:return O.key===ue?z(T,C,O,Y):null;case W:return O=Ma(O),k(T,C,O,Y)}if(ie(O)||ye(O))return ue!==null?null:H(T,C,O,Y,null);if(typeof O.then=="function")return k(T,C,mo(O),Y);if(O.$$typeof===V)return k(T,C,ro(T,O),Y);ho(T,O)}return null}function B(T,C,O,Y,ue){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return T=T.get(O)||null,g(C,T,""+Y,ue);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case N:return T=T.get(Y.key===null?O:Y.key)||null,w(C,T,Y,ue);case R:return T=T.get(Y.key===null?O:Y.key)||null,z(C,T,Y,ue);case W:return Y=Ma(Y),B(T,C,O,Y,ue)}if(ie(Y)||ye(Y))return T=T.get(O)||null,H(C,T,Y,ue,null);if(typeof Y.then=="function")return B(T,C,O,mo(Y),ue);if(Y.$$typeof===V)return B(T,C,O,ro(C,Y),ue);ho(C,Y)}return null}function ae(T,C,O,Y){for(var ue=null,Re=null,oe=C,Se=C=0,Oe=null;oe!==null&&Se<O.length;Se++){oe.index>Se?(Oe=oe,oe=null):Oe=oe.sibling;var Be=k(T,oe,O[Se],Y);if(Be===null){oe===null&&(oe=Oe);break}e&&oe&&Be.alternate===null&&t(T,oe),C=i(Be,C,Se),Re===null?ue=Be:Re.sibling=Be,Re=Be,oe=Oe}if(Se===O.length)return n(T,oe),je&&Nn(T,Se),ue;if(oe===null){for(;Se<O.length;Se++)oe=Z(T,O[Se],Y),oe!==null&&(C=i(oe,C,Se),Re===null?ue=oe:Re.sibling=oe,Re=oe);return je&&Nn(T,Se),ue}for(oe=a(oe);Se<O.length;Se++)Oe=B(oe,T,Se,O[Se],Y),Oe!==null&&(e&&Oe.alternate!==null&&oe.delete(Oe.key===null?Se:Oe.key),C=i(Oe,C,Se),Re===null?ue=Oe:Re.sibling=Oe,Re=Oe);return e&&oe.forEach(function(ga){return t(T,ga)}),je&&Nn(T,Se),ue}function he(T,C,O,Y){if(O==null)throw Error(r(151));for(var ue=null,Re=null,oe=C,Se=C=0,Oe=null,Be=O.next();oe!==null&&!Be.done;Se++,Be=O.next()){oe.index>Se?(Oe=oe,oe=null):Oe=oe.sibling;var ga=k(T,oe,Be.value,Y);if(ga===null){oe===null&&(oe=Oe);break}e&&oe&&ga.alternate===null&&t(T,oe),C=i(ga,C,Se),Re===null?ue=ga:Re.sibling=ga,Re=ga,oe=Oe}if(Be.done)return n(T,oe),je&&Nn(T,Se),ue;if(oe===null){for(;!Be.done;Se++,Be=O.next())Be=Z(T,Be.value,Y),Be!==null&&(C=i(Be,C,Se),Re===null?ue=Be:Re.sibling=Be,Re=Be);return je&&Nn(T,Se),ue}for(oe=a(oe);!Be.done;Se++,Be=O.next())Be=B(oe,T,Se,Be.value,Y),Be!==null&&(e&&Be.alternate!==null&&oe.delete(Be.key===null?Se:Be.key),C=i(Be,C,Se),Re===null?ue=Be:Re.sibling=Be,Re=Be);return e&&oe.forEach(function(ov){return t(T,ov)}),je&&Nn(T,Se),ue}function Ye(T,C,O,Y){if(typeof O=="object"&&O!==null&&O.type===U&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case N:e:{for(var ue=O.key;C!==null;){if(C.key===ue){if(ue=O.type,ue===U){if(C.tag===7){n(T,C.sibling),Y=l(C,O.props.children),Y.return=T,T=Y;break e}}else if(C.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===W&&Ma(ue)===C.type){n(T,C.sibling),Y=l(C,O.props),as(Y,O),Y.return=T,T=Y;break e}n(T,C);break}else t(T,C);C=C.sibling}O.type===U?(Y=Da(O.props.children,T.mode,Y,O.key),Y.return=T,T=Y):(Y=so(O.type,O.key,O.props,null,T.mode,Y),as(Y,O),Y.return=T,T=Y)}return f(T);case R:e:{for(ue=O.key;C!==null;){if(C.key===ue)if(C.tag===4&&C.stateNode.containerInfo===O.containerInfo&&C.stateNode.implementation===O.implementation){n(T,C.sibling),Y=l(C,O.children||[]),Y.return=T,T=Y;break e}else{n(T,C);break}else t(T,C);C=C.sibling}Y=ir(O,T.mode,Y),Y.return=T,T=Y}return f(T);case W:return O=Ma(O),Ye(T,C,O,Y)}if(ie(O))return ae(T,C,O,Y);if(ye(O)){if(ue=ye(O),typeof ue!="function")throw Error(r(150));return O=ue.call(O),he(T,C,O,Y)}if(typeof O.then=="function")return Ye(T,C,mo(O),Y);if(O.$$typeof===V)return Ye(T,C,ro(T,O),Y);ho(T,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,C!==null&&C.tag===6?(n(T,C.sibling),Y=l(C,O),Y.return=T,T=Y):(n(T,C),Y=or(O,T.mode,Y),Y.return=T,T=Y),f(T)):n(T,C)}return function(T,C,O,Y){try{ns=0;var ue=Ye(T,C,O,Y);return ul=null,ue}catch(oe){if(oe===cl||oe===uo)throw oe;var Re=_t(29,oe,null,T.mode);return Re.lanes=Y,Re.return=T,Re}}}var Ra=$f(!0),If=$f(!1),Pn=!1;function vr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ea(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(_e&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=lo(e),Rf(e,null,n),t}return ao(e,a,t,n),lo(e)}function ls(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Gu(e,n)}}function xr(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?l=i=f:i=i.next=f,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var wr=!1;function ss(){if(wr){var e=rl;if(e!==null)throw e}}function os(e,t,n,a){wr=!1;var l=e.updateQueue;Pn=!1;var i=l.firstBaseUpdate,f=l.lastBaseUpdate,g=l.shared.pending;if(g!==null){l.shared.pending=null;var w=g,z=w.next;w.next=null,f===null?i=z:f.next=z,f=w;var H=e.alternate;H!==null&&(H=H.updateQueue,g=H.lastBaseUpdate,g!==f&&(g===null?H.firstBaseUpdate=z:g.next=z,H.lastBaseUpdate=w))}if(i!==null){var Z=l.baseState;f=0,H=z=w=null,g=i;do{var k=g.lane&-536870913,B=k!==g.lane;if(B?(Ne&k)===k:(a&k)===k){k!==0&&k===il&&(wr=!0),H!==null&&(H=H.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ae=e,he=g;k=t;var Ye=n;switch(he.tag){case 1:if(ae=he.payload,typeof ae=="function"){Z=ae.call(Ye,Z,k);break e}Z=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=he.payload,k=typeof ae=="function"?ae.call(Ye,Z,k):ae,k==null)break e;Z=S({},Z,k);break e;case 2:Pn=!0}}k=g.callback,k!==null&&(e.flags|=64,B&&(e.flags|=8192),B=l.callbacks,B===null?l.callbacks=[k]:B.push(k))}else B={lane:k,tag:g.tag,payload:g.payload,callback:g.callback,next:null},H===null?(z=H=B,w=Z):H=H.next=B,f|=k;if(g=g.next,g===null){if(g=l.shared.pending,g===null)break;B=g,g=B.next,B.next=null,l.lastBaseUpdate=B,l.shared.pending=null}}while(!0);H===null&&(w=Z),l.baseState=w,l.firstBaseUpdate=z,l.lastBaseUpdate=H,i===null&&(l.shared.lanes=0),sa|=f,e.lanes=f,e.memoizedState=Z}}function Pf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Wf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Pf(n[e],t)}var fl=Qe(null),go=Qe(0);function ed(e,t){e=Hn,fe(go,e),fe(fl,t),Hn=e|t.baseLanes}function Cr(){fe(go,Hn),fe(fl,fl.current)}function Ar(){Hn=go.current,Ee(fl),Ee(go)}var Ut=Qe(null),Wt=null;function ta(e){var t=e.alternate;fe(Pe,Pe.current&1),fe(Ut,e),Wt===null&&(t===null||fl.current!==null||t.memoizedState!==null)&&(Wt=e)}function Er(e){fe(Pe,Pe.current),fe(Ut,e),Wt===null&&(Wt=e)}function td(e){e.tag===22?(fe(Pe,Pe.current),fe(Ut,e),Wt===null&&(Wt=e)):na()}function na(){fe(Pe,Pe.current),fe(Ut,Ut.current)}function Lt(e){Ee(Ut),Wt===e&&(Wt=null),Ee(Pe)}var Pe=Qe(0);function po(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||jc(n)||Mc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jn=0,ve=null,qe=null,lt=null,yo=!1,dl=!1,Ba=!1,bo=0,is=0,ml=null,$y=0;function Je(){throw Error(r(321))}function Tr(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function Dr(e,t,n,a,l,i){return jn=i,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Ld:Yr,Ba=!1,i=n(a,l),Ba=!1,dl&&(i=ad(t,n,a,l)),nd(e),i}function nd(e){M.H=us;var t=qe!==null&&qe.next!==null;if(jn=0,lt=qe=ve=null,yo=!1,is=0,ml=null,t)throw Error(r(300));e===null||st||(e=e.dependencies,e!==null&&io(e)&&(st=!0))}function ad(e,t,n,a){ve=e;var l=0;do{if(dl&&(ml=null),is=0,dl=!1,25<=l)throw Error(r(301));if(l+=1,lt=qe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}M.H=Hd,i=t(n,a)}while(dl);return i}function Iy(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?rs(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(ve.flags|=1024),t}function Nr(){var e=bo!==0;return bo=0,e}function Or(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function zr(e){if(yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yo=!1}jn=0,lt=qe=ve=null,dl=!1,is=bo=0,ml=null}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?ve.memoizedState=lt=e:lt=lt.next=e,lt}function We(){if(qe===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=lt===null?ve.memoizedState:lt.next;if(t!==null)lt=t,qe=e;else{if(e===null)throw ve.alternate===null?Error(r(467)):Error(r(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},lt===null?ve.memoizedState=lt=e:lt=lt.next=e}return lt}function vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rs(e){var t=is;return is+=1,ml===null&&(ml=[]),e=Kf(ml,e,t),t=ve,(lt===null?t.memoizedState:lt.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Ld:Yr),e}function So(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return rs(e);if(e.$$typeof===V)return gt(e)}throw Error(r(438,String(e)))}function jr(e){var t=null,n=ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=ve.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=vo(),ve.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Ae;return t.index++,n}function Mn(e,t){return typeof t=="function"?t(e):t}function xo(e){var t=We();return Mr(t,qe,e)}function Mr(e,t,n){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var l=e.baseQueue,i=a.pending;if(i!==null){if(l!==null){var f=l.next;l.next=i.next,i.next=f}t.baseQueue=l=i,a.pending=null}if(i=e.baseState,l===null)e.memoizedState=i;else{t=l.next;var g=f=null,w=null,z=t,H=!1;do{var Z=z.lane&-536870913;if(Z!==z.lane?(Ne&Z)===Z:(jn&Z)===Z){var k=z.revertLane;if(k===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),Z===il&&(H=!0);else if((jn&k)===k){z=z.next,k===il&&(H=!0);continue}else Z={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},w===null?(g=w=Z,f=i):w=w.next=Z,ve.lanes|=k,sa|=k;Z=z.action,Ba&&n(i,Z),i=z.hasEagerState?z.eagerState:n(i,Z)}else k={lane:Z,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},w===null?(g=w=k,f=i):w=w.next=k,ve.lanes|=Z,sa|=Z;z=z.next}while(z!==null&&z!==t);if(w===null?f=i:w.next=g,!Bt(i,e.memoizedState)&&(st=!0,H&&(n=rl,n!==null)))throw n;e.memoizedState=i,e.baseState=f,e.baseQueue=w,a.lastRenderedState=i}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function kr(e){var t=We(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var f=l=l.next;do i=e(i,f.action),f=f.next;while(f!==l);Bt(i,t.memoizedState)||(st=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function ld(e,t,n){var a=ve,l=We(),i=je;if(i){if(n===void 0)throw Error(r(407));n=n()}else n=t();var f=!Bt((qe||l).memoizedState,n);if(f&&(l.memoizedState=n,st=!0),l=l.queue,_r(id.bind(null,a,l,e),[e]),l.getSnapshot!==t||f||lt!==null&<.memoizedState.tag&1){if(a.flags|=2048,hl(9,{destroy:void 0},od.bind(null,a,l,n,t),null),Ve===null)throw Error(r(349));i||(jn&127)!==0||sd(a,t,n)}return n}function sd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t=vo(),ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function od(e,t,n,a){t.value=n,t.getSnapshot=a,rd(t)&&cd(e)}function id(e,t,n){return n(function(){rd(t)&&cd(e)})}function rd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function cd(e){var t=Ta(e,2);t!==null&&zt(t,e,2)}function Rr(e){var t=xt();if(typeof e=="function"){var n=e;if(e=n(),Ba){Qn(!0);try{n()}finally{Qn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:e},t}function ud(e,t,n,a){return e.baseState=n,Mr(e,qe,typeof a=="function"?a:Mn)}function Py(e,t,n,a,l){if(Ao(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){i.listeners.push(f)}};M.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,fd(t,i)):(i.next=n.next,t.pending=n.next=i)}}function fd(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var i=M.T,f={};M.T=f;try{var g=n(l,a),w=M.S;w!==null&&w(f,g),dd(e,t,g)}catch(z){Br(e,t,z)}finally{i!==null&&f.types!==null&&(i.types=f.types),M.T=i}}else try{i=n(l,a),dd(e,t,i)}catch(z){Br(e,t,z)}}function dd(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){md(e,t,a)},function(a){return Br(e,t,a)}):md(e,t,n)}function md(e,t,n){t.status="fulfilled",t.value=n,hd(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,fd(e,n)))}function Br(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,hd(t),t=t.next;while(t!==a)}e.action=null}function hd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gd(e,t){return t}function pd(e,t){if(je){var n=Ve.formState;if(n!==null){e:{var a=ve;if(je){if(Ze){t:{for(var l=Ze,i=Pt;l.nodeType!==8;){if(!i){l=null;break t}if(l=en(l.nextSibling),l===null){l=null;break t}}i=l.data,l=i==="F!"||i==="F"?l:null}if(l){Ze=en(l.nextSibling),a=l.data==="F!";break e}}$n(a)}a=!1}a&&(t=n[0])}}return n=xt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gd,lastRenderedState:t},n.queue=a,n=Bd.bind(null,ve,a),a.dispatch=n,a=Rr(!1),i=Gr.bind(null,ve,!1,a.queue),a=xt(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=Py.bind(null,ve,l,i,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function yd(e){var t=We();return bd(t,qe,e)}function bd(e,t,n){if(t=Mr(e,t,gd)[0],e=xo(Mn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=rs(t)}catch(f){throw f===cl?uo:f}else a=t;t=We();var l=t.queue,i=l.dispatch;return n!==t.memoizedState&&(ve.flags|=2048,hl(9,{destroy:void 0},Wy.bind(null,l,n),null)),[a,i,e]}function Wy(e,t){e.action=t}function vd(e){var t=We(),n=qe;if(n!==null)return bd(t,n,e);We(),t=t.memoizedState,n=We();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function hl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=ve.updateQueue,t===null&&(t=vo(),ve.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Sd(){return We().memoizedState}function wo(e,t,n,a){var l=xt();ve.flags|=e,l.memoizedState=hl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Co(e,t,n,a){var l=We();a=a===void 0?null:a;var i=l.memoizedState.inst;qe!==null&&a!==null&&Tr(a,qe.memoizedState.deps)?l.memoizedState=hl(t,i,n,a):(ve.flags|=e,l.memoizedState=hl(1|t,i,n,a))}function xd(e,t){wo(8390656,8,e,t)}function _r(e,t){Co(2048,8,e,t)}function eb(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=vo(),ve.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function wd(e){var t=We().memoizedState;return eb({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Cd(e,t){return Co(4,2,e,t)}function Ad(e,t){return Co(4,4,e,t)}function Ed(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Td(e,t,n){n=n!=null?n.concat([e]):null,Co(4,4,Ed.bind(null,t,e),n)}function Ur(){}function Dd(e,t){var n=We();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Tr(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Nd(e,t){var n=We();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Tr(t,a[1]))return a[0];if(a=e(),Ba){Qn(!0);try{e()}finally{Qn(!1)}}return n.memoizedState=[a,t],a}function Lr(e,t,n){return n===void 0||(jn&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Om(),ve.lanes|=e,sa|=e,n)}function Od(e,t,n,a){return Bt(n,t)?n:fl.current!==null?(e=Lr(e,n,a),Bt(e,t)||(st=!0),e):(jn&42)===0||(jn&1073741824)!==0&&(Ne&261930)===0?(st=!0,e.memoizedState=n):(e=Om(),ve.lanes|=e,sa|=e,t)}function zd(e,t,n,a,l){var i=$.p;$.p=i!==0&&8>i?i:8;var f=M.T,g={};M.T=g,Gr(e,!1,t,n);try{var w=l(),z=M.S;if(z!==null&&z(g,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var H=Jy(w,a);cs(e,t,H,Gt(e))}else cs(e,t,a,Gt(e))}catch(Z){cs(e,t,{then:function(){},status:"rejected",reason:Z},Gt())}finally{$.p=i,f!==null&&g.types!==null&&(f.types=g.types),M.T=f}}function tb(){}function Hr(e,t,n,a){if(e.tag!==5)throw Error(r(476));var l=jd(e).queue;zd(e,l,t,_,n===null?tb:function(){return Md(e),n(a)})}function jd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:_},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Md(e){var t=jd(e);t.next===null&&(t=e.alternate.memoizedState),cs(e,t.next.queue,{},Gt())}function qr(){return gt(Ts)}function kd(){return We().memoizedState}function Rd(){return We().memoizedState}function nb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Gt();e=Wn(n);var a=ea(t,e,n);a!==null&&(zt(a,t,n),ls(a,t,n)),t={cache:gr()},e.payload=t;return}t=t.return}}function ab(e,t,n){var a=Gt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ao(e)?_d(t,n):(n=lr(e,t,n,a),n!==null&&(zt(n,e,a),Ud(n,t,a)))}function Bd(e,t,n){var a=Gt();cs(e,t,n,a)}function cs(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ao(e))_d(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var f=t.lastRenderedState,g=i(f,n);if(l.hasEagerState=!0,l.eagerState=g,Bt(g,f))return ao(e,t,l,0),Ve===null&&no(),!1}catch{}if(n=lr(e,t,l,a),n!==null)return zt(n,e,a),Ud(n,t,a),!0}return!1}function Gr(e,t,n,a){if(a={lane:2,revertLane:vc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ao(e)){if(t)throw Error(r(479))}else t=lr(e,n,a,2),t!==null&&zt(t,e,2)}function Ao(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function _d(e,t){dl=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ud(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Gu(e,n)}}var us={readContext:gt,use:So,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};us.useEffectEvent=Je;var Ld={readContext:gt,use:So,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:xd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,wo(4194308,4,Ed.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wo(4194308,4,e,t)},useInsertionEffect:function(e,t){wo(4,2,e,t)},useMemo:function(e,t){var n=xt();t=t===void 0?null:t;var a=e();if(Ba){Qn(!0);try{e()}finally{Qn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=xt();if(n!==void 0){var l=n(t);if(Ba){Qn(!0);try{n(t)}finally{Qn(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=ab.bind(null,ve,e),[a.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Rr(e);var t=e.queue,n=Bd.bind(null,ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ur,useDeferredValue:function(e,t){var n=xt();return Lr(n,e,t)},useTransition:function(){var e=Rr(!1);return e=zd.bind(null,ve,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ve,l=xt();if(je){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Ve===null)throw Error(r(349));(Ne&127)!==0||sd(a,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,xd(id.bind(null,a,i,e),[e]),a.flags|=2048,hl(9,{destroy:void 0},od.bind(null,a,i,n,t),null),n},useId:function(){var e=xt(),t=Ve.identifierPrefix;if(je){var n=gn,a=hn;n=(a&~(1<<32-Rt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=bo++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=$y++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qr,useFormState:pd,useActionState:pd,useOptimistic:function(e){var t=xt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Gr.bind(null,ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:jr,useCacheRefresh:function(){return xt().memoizedState=nb.bind(null,ve)},useEffectEvent:function(e){var t=xt(),n={impl:e};return t.memoizedState=n,function(){if((_e&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Yr={readContext:gt,use:So,useCallback:Dd,useContext:gt,useEffect:_r,useImperativeHandle:Td,useInsertionEffect:Cd,useLayoutEffect:Ad,useMemo:Nd,useReducer:xo,useRef:Sd,useState:function(){return xo(Mn)},useDebugValue:Ur,useDeferredValue:function(e,t){var n=We();return Od(n,qe.memoizedState,e,t)},useTransition:function(){var e=xo(Mn)[0],t=We().memoizedState;return[typeof e=="boolean"?e:rs(e),t]},useSyncExternalStore:ld,useId:kd,useHostTransitionStatus:qr,useFormState:yd,useActionState:yd,useOptimistic:function(e,t){var n=We();return ud(n,qe,e,t)},useMemoCache:jr,useCacheRefresh:Rd};Yr.useEffectEvent=wd;var Hd={readContext:gt,use:So,useCallback:Dd,useContext:gt,useEffect:_r,useImperativeHandle:Td,useInsertionEffect:Cd,useLayoutEffect:Ad,useMemo:Nd,useReducer:kr,useRef:Sd,useState:function(){return kr(Mn)},useDebugValue:Ur,useDeferredValue:function(e,t){var n=We();return qe===null?Lr(n,e,t):Od(n,qe.memoizedState,e,t)},useTransition:function(){var e=kr(Mn)[0],t=We().memoizedState;return[typeof e=="boolean"?e:rs(e),t]},useSyncExternalStore:ld,useId:kd,useHostTransitionStatus:qr,useFormState:vd,useActionState:vd,useOptimistic:function(e,t){var n=We();return qe!==null?ud(n,qe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:jr,useCacheRefresh:Rd};Hd.useEffectEvent=wd;function Vr(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xr={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Gt(),l=Wn(a);l.payload=t,n!=null&&(l.callback=n),t=ea(e,l,a),t!==null&&(zt(t,e,a),ls(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Gt(),l=Wn(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=ea(e,l,a),t!==null&&(zt(t,e,a),ls(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gt(),a=Wn(n);a.tag=2,t!=null&&(a.callback=t),t=ea(e,a,n),t!==null&&(zt(t,e,n),ls(t,e,n))}};function qd(e,t,n,a,l,i,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,f):t.prototype&&t.prototype.isPureReactComponent?!$l(n,a)||!$l(l,i):!0}function Gd(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Xr.enqueueReplaceState(t,t.state,null)}function _a(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function Yd(e){to(e)}function Vd(e){console.error(e)}function Xd(e){to(e)}function Eo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Qd(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Qr(e,t,n){return n=Wn(n),n.tag=3,n.payload={element:null},n.callback=function(){Eo(e,t)},n}function Zd(e){return e=Wn(e),e.tag=3,e}function Kd(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var i=a.value;e.payload=function(){return l(i)},e.callback=function(){Qd(t,n,a)}}var f=n.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Qd(t,n,a),typeof l!="function"&&(oa===null?oa=new Set([this]):oa.add(this));var g=a.stack;this.componentDidCatch(a.value,{componentStack:g!==null?g:""})})}function lb(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&ol(t,n,l,!0),n=Ut.current,n!==null){switch(n.tag){case 31:case 13:return Wt===null?Uo():n.alternate===null&&$e===0&&($e=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===fo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),pc(e,a,l)),!1;case 22:return n.flags|=65536,a===fo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),pc(e,a,l)),!1}throw Error(r(435,n.tag))}return pc(e,a,l),Uo(),!1}if(je)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==ur&&(e=Error(r(422),{cause:a}),Wl(Jt(e,n)))):(a!==ur&&(t=Error(r(423),{cause:a}),Wl(Jt(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Jt(a,n),l=Qr(e.stateNode,a,l),xr(e,l),$e!==4&&($e=2)),!1;var i=Error(r(520),{cause:a});if(i=Jt(i,n),bs===null?bs=[i]:bs.push(i),$e!==4&&($e=2),t===null)return!0;a=Jt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Qr(n.stateNode,a,e),xr(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(oa===null||!oa.has(i))))return n.flags|=65536,l&=-l,n.lanes|=l,l=Zd(l),Kd(l,e,n,a),xr(n,l),!1}n=n.return}while(n!==null);return!1}var Zr=Error(r(461)),st=!1;function pt(e,t,n,a){t.child=e===null?If(t,null,n,a):Ra(t,e.child,n,a)}function Fd(e,t,n,a,l){n=n.render;var i=t.ref;if("ref"in a){var f={};for(var g in a)g!=="ref"&&(f[g]=a[g])}else f=a;return za(t),a=Dr(e,t,n,f,i,l),g=Nr(),e!==null&&!st?(Or(e,t,l),kn(e,t,l)):(je&&g&&rr(t),t.flags|=1,pt(e,t,a,l),t.child)}function Jd(e,t,n,a,l){if(e===null){var i=n.type;return typeof i=="function"&&!sr(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,$d(e,t,i,a,l)):(e=so(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!ec(e,l)){var f=i.memoizedProps;if(n=n.compare,n=n!==null?n:$l,n(f,a)&&e.ref===t.ref)return kn(e,t,l)}return t.flags|=1,e=Dn(i,a),e.ref=t.ref,e.return=t,t.child=e}function $d(e,t,n,a,l){if(e!==null){var i=e.memoizedProps;if($l(i,a)&&e.ref===t.ref)if(st=!1,t.pendingProps=a=i,ec(e,l))(e.flags&131072)!==0&&(st=!0);else return t.lanes=e.lanes,kn(e,t,l)}return Kr(e,t,n,a,l)}function Id(e,t,n,a){var l=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~i}else a=0,t.child=null;return Pd(e,t,i,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&co(t,i!==null?i.cachePool:null),i!==null?ed(t,i):Cr(),td(t);else return a=t.lanes=536870912,Pd(e,t,i!==null?i.baseLanes|n:n,n,a)}else i!==null?(co(t,i.cachePool),ed(t,i),na(),t.memoizedState=null):(e!==null&&co(t,null),Cr(),na());return pt(e,t,l,n),t.child}function fs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Pd(e,t,n,a,l){var i=yr();return i=i===null?null:{parent:at._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&co(t,null),Cr(),td(t),e!==null&&ol(e,t,a,!0),t.childLanes=l,null}function To(e,t){return t=No({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Wd(e,t,n){return Ra(t,e.child,null,n),e=To(t,t.pendingProps),e.flags|=2,Lt(t),t.memoizedState=null,e}function sb(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(je){if(a.mode==="hidden")return e=To(t,a),t.lanes=536870912,fs(null,e);if(Er(t),(e=Ze)?(e=fh(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fn!==null?{id:hn,overflow:gn}:null,retryLane:536870912,hydrationErrors:null},n=_f(e),n.return=t,t.child=n,ht=t,Ze=null)):e=null,e===null)throw $n(t);return t.lanes=536870912,null}return To(t,a)}var i=e.memoizedState;if(i!==null){var f=i.dehydrated;if(Er(t),l)if(t.flags&256)t.flags&=-257,t=Wd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(st||ol(e,t,n,!1),l=(n&e.childLanes)!==0,st||l){if(a=Ve,a!==null&&(f=Yu(a,n),f!==0&&f!==i.retryLane))throw i.retryLane=f,Ta(e,f),zt(a,e,f),Zr;Uo(),t=Wd(e,t,n)}else e=i.treeContext,Ze=en(f.nextSibling),ht=t,je=!0,Jn=null,Pt=!1,e!==null&&Hf(t,e),t=To(t,a),t.flags|=4096;return t}return e=Dn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Do(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Kr(e,t,n,a,l){return za(t),n=Dr(e,t,n,a,void 0,l),a=Nr(),e!==null&&!st?(Or(e,t,l),kn(e,t,l)):(je&&a&&rr(t),t.flags|=1,pt(e,t,n,l),t.child)}function em(e,t,n,a,l,i){return za(t),t.updateQueue=null,n=ad(t,a,n,l),nd(e),a=Nr(),e!==null&&!st?(Or(e,t,i),kn(e,t,i)):(je&&a&&rr(t),t.flags|=1,pt(e,t,n,i),t.child)}function tm(e,t,n,a,l){if(za(t),t.stateNode===null){var i=nl,f=n.contextType;typeof f=="object"&&f!==null&&(i=gt(f)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Xr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},vr(t),f=n.contextType,i.context=typeof f=="object"&&f!==null?gt(f):nl,i.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(Vr(t,n,f,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(f=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),f!==i.state&&Xr.enqueueReplaceState(i,i.state,null),os(t,a,i,l),ss(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var g=t.memoizedProps,w=_a(n,g);i.props=w;var z=i.context,H=n.contextType;f=nl,typeof H=="object"&&H!==null&&(f=gt(H));var Z=n.getDerivedStateFromProps;H=typeof Z=="function"||typeof i.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(g||z!==f)&&Gd(t,i,a,f),Pn=!1;var k=t.memoizedState;i.state=k,os(t,a,i,l),ss(),z=t.memoizedState,g||k!==z||Pn?(typeof Z=="function"&&(Vr(t,n,Z,a),z=t.memoizedState),(w=Pn||qd(t,n,w,a,k,z,f))?(H||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=z),i.props=a,i.state=z,i.context=f,a=w):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Sr(e,t),f=t.memoizedProps,H=_a(n,f),i.props=H,Z=t.pendingProps,k=i.context,z=n.contextType,w=nl,typeof z=="object"&&z!==null&&(w=gt(z)),g=n.getDerivedStateFromProps,(z=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f!==Z||k!==w)&&Gd(t,i,a,w),Pn=!1,k=t.memoizedState,i.state=k,os(t,a,i,l),ss();var B=t.memoizedState;f!==Z||k!==B||Pn||e!==null&&e.dependencies!==null&&io(e.dependencies)?(typeof g=="function"&&(Vr(t,n,g,a),B=t.memoizedState),(H=Pn||qd(t,n,H,a,k,B,w)||e!==null&&e.dependencies!==null&&io(e.dependencies))?(z||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,B,w),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,B,w)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=B),i.props=a,i.state=B,i.context=w,a=H):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Do(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Ra(t,e.child,null,l),t.child=Ra(t,null,n,l)):pt(e,t,n,l),t.memoizedState=i.state,e=t.child):e=kn(e,t,l),e}function nm(e,t,n,a){return Na(),t.flags|=256,pt(e,t,n,a),t.child}var Fr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jr(e){return{baseLanes:e,cachePool:Qf()}}function $r(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=qt),e}function am(e,t,n){var a=t.pendingProps,l=!1,i=(t.flags&128)!==0,f;if((f=i)||(f=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),f&&(l=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(je){if(l?ta(t):na(),(e=Ze)?(e=fh(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fn!==null?{id:hn,overflow:gn}:null,retryLane:536870912,hydrationErrors:null},n=_f(e),n.return=t,t.child=n,ht=t,Ze=null)):e=null,e===null)throw $n(t);return Mc(e)?t.lanes=32:t.lanes=536870912,null}var g=a.children;return a=a.fallback,l?(na(),l=t.mode,g=No({mode:"hidden",children:g},l),a=Da(a,l,n,null),g.return=t,a.return=t,g.sibling=a,t.child=g,a=t.child,a.memoizedState=Jr(n),a.childLanes=$r(e,f,n),t.memoizedState=Fr,fs(null,a)):(ta(t),Ir(t,g))}var w=e.memoizedState;if(w!==null&&(g=w.dehydrated,g!==null)){if(i)t.flags&256?(ta(t),t.flags&=-257,t=Pr(e,t,n)):t.memoizedState!==null?(na(),t.child=e.child,t.flags|=128,t=null):(na(),g=a.fallback,l=t.mode,a=No({mode:"visible",children:a.children},l),g=Da(g,l,n,null),g.flags|=2,a.return=t,g.return=t,a.sibling=g,t.child=a,Ra(t,e.child,null,n),a=t.child,a.memoizedState=Jr(n),a.childLanes=$r(e,f,n),t.memoizedState=Fr,t=fs(null,a));else if(ta(t),Mc(g)){if(f=g.nextSibling&&g.nextSibling.dataset,f)var z=f.dgst;f=z,a=Error(r(419)),a.stack="",a.digest=f,Wl({value:a,source:null,stack:null}),t=Pr(e,t,n)}else if(st||ol(e,t,n,!1),f=(n&e.childLanes)!==0,st||f){if(f=Ve,f!==null&&(a=Yu(f,n),a!==0&&a!==w.retryLane))throw w.retryLane=a,Ta(e,a),zt(f,e,a),Zr;jc(g)||Uo(),t=Pr(e,t,n)}else jc(g)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,Ze=en(g.nextSibling),ht=t,je=!0,Jn=null,Pt=!1,e!==null&&Hf(t,e),t=Ir(t,a.children),t.flags|=4096);return t}return l?(na(),g=a.fallback,l=t.mode,w=e.child,z=w.sibling,a=Dn(w,{mode:"hidden",children:a.children}),a.subtreeFlags=w.subtreeFlags&65011712,z!==null?g=Dn(z,g):(g=Da(g,l,n,null),g.flags|=2),g.return=t,a.return=t,a.sibling=g,t.child=a,fs(null,a),a=t.child,g=e.child.memoizedState,g===null?g=Jr(n):(l=g.cachePool,l!==null?(w=at._currentValue,l=l.parent!==w?{parent:w,pool:w}:l):l=Qf(),g={baseLanes:g.baseLanes|n,cachePool:l}),a.memoizedState=g,a.childLanes=$r(e,f,n),t.memoizedState=Fr,fs(e.child,a)):(ta(t),n=e.child,e=n.sibling,n=Dn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=n,t.memoizedState=null,n)}function Ir(e,t){return t=No({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function No(e,t){return e=_t(22,e,null,t),e.lanes=0,e}function Pr(e,t,n){return Ra(t,e.child,null,n),e=Ir(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lm(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),mr(e.return,t,n)}function Wr(e,t,n,a,l,i){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:i}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=a,f.tail=n,f.tailMode=l,f.treeForkCount=i)}function sm(e,t,n){var a=t.pendingProps,l=a.revealOrder,i=a.tail;a=a.children;var f=Pe.current,g=(f&2)!==0;if(g?(f=f&1|2,t.flags|=128):f&=1,fe(Pe,f),pt(e,t,a,n),a=je?Pl:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lm(e,n,t);else if(e.tag===19)lm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&po(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Wr(t,!1,l,n,i,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&po(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Wr(t,!0,n,null,i,a);break;case"together":Wr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ol(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Dn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Dn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ec(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&io(e)))}function ob(e,t,n){switch(t.tag){case 3:D(t,t.stateNode.containerInfo),In(t,at,e.memoizedState.cache),Na();break;case 27:case 5:J(t);break;case 4:D(t,t.stateNode.containerInfo);break;case 10:In(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Er(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ta(t),t.flags|=128,null):(n&t.child.childLanes)!==0?am(e,t,n):(ta(t),e=kn(e,t,n),e!==null?e.sibling:null);ta(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(ol(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return sm(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),fe(Pe,Pe.current),a)break;return null;case 22:return t.lanes=0,Id(e,t,n,t.pendingProps);case 24:In(t,at,e.memoizedState.cache)}return kn(e,t,n)}function om(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!ec(e,n)&&(t.flags&128)===0)return st=!1,ob(e,t,n);st=(e.flags&131072)!==0}else st=!1,je&&(t.flags&1048576)!==0&&Lf(t,Pl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ma(t.elementType),t.type=e,typeof e=="function")sr(e)?(a=_a(e,a),t.tag=1,t=tm(null,t,e,a,n)):(t.tag=0,t=Kr(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===X){t.tag=11,t=Fd(null,t,e,a,n);break e}else if(l===ee){t.tag=14,t=Jd(null,t,e,a,n);break e}}throw t=xe(e)||e,Error(r(306,t,""))}}return t;case 0:return Kr(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=_a(a,t.pendingProps),tm(e,t,a,l,n);case 3:e:{if(D(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;l=i.element,Sr(e,t),os(t,a,null,n);var f=t.memoizedState;if(a=f.cache,In(t,at,a),a!==i.cache&&hr(t,[at],n,!0),ss(),a=f.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=nm(e,t,a,n);break e}else if(a!==l){l=Jt(Error(r(424)),t),Wl(l),t=nm(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ze=en(e.firstChild),ht=t,je=!0,Jn=null,Pt=!0,n=If(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Na(),a===l){t=kn(e,t,n);break e}pt(e,t,a,n)}t=t.child}return t;case 26:return Do(e,t),e===null?(n=yh(t.type,null,t.pendingProps,null))?t.memoizedState=n:je||(n=t.type,e=t.pendingProps,a=Xo(Q.current).createElement(n),a[mt]=t,a[At]=e,yt(a,n,e),ft(a),t.stateNode=a):t.memoizedState=yh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),e===null&&je&&(a=t.stateNode=hh(t.type,t.pendingProps,Q.current),ht=t,Pt=!0,l=Ze,ua(t.type)?(kc=l,Ze=en(a.firstChild)):Ze=l),pt(e,t,t.pendingProps.children,n),Do(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&je&&((l=a=Ze)&&(a=_b(a,t.type,t.pendingProps,Pt),a!==null?(t.stateNode=a,ht=t,Ze=en(a.firstChild),Pt=!1,l=!0):l=!1),l||$n(t)),J(t),l=t.type,i=t.pendingProps,f=e!==null?e.memoizedProps:null,a=i.children,Nc(l,i)?a=null:f!==null&&Nc(l,f)&&(t.flags|=32),t.memoizedState!==null&&(l=Dr(e,t,Iy,null,null,n),Ts._currentValue=l),Do(e,t),pt(e,t,a,n),t.child;case 6:return e===null&&je&&((e=n=Ze)&&(n=Ub(n,t.pendingProps,Pt),n!==null?(t.stateNode=n,ht=t,Ze=null,e=!0):e=!1),e||$n(t)),null;case 13:return am(e,t,n);case 4:return D(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ra(t,null,a,n):pt(e,t,a,n),t.child;case 11:return Fd(e,t,t.type,t.pendingProps,n);case 7:return pt(e,t,t.pendingProps,n),t.child;case 8:return pt(e,t,t.pendingProps.children,n),t.child;case 12:return pt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,In(t,t.type,a.value),pt(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,za(t),l=gt(l),a=a(l),t.flags|=1,pt(e,t,a,n),t.child;case 14:return Jd(e,t,t.type,t.pendingProps,n);case 15:return $d(e,t,t.type,t.pendingProps,n);case 19:return sm(e,t,n);case 31:return sb(e,t,n);case 22:return Id(e,t,n,t.pendingProps);case 24:return za(t),a=gt(at),e===null?(l=yr(),l===null&&(l=Ve,i=gr(),l.pooledCache=i,i.refCount++,i!==null&&(l.pooledCacheLanes|=n),l=i),t.memoizedState={parent:a,cache:l},vr(t),In(t,at,l)):((e.lanes&n)!==0&&(Sr(e,t),os(t,null,null,n),ss()),l=e.memoizedState,i=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),In(t,at,a)):(a=i.cache,In(t,at,a),a!==l.cache&&hr(t,[at],n,!0))),pt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Rn(e){e.flags|=4}function tc(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(km())e.flags|=8192;else throw ka=fo,br}else e.flags&=-16777217}function im(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wh(t))if(km())e.flags|=8192;else throw ka=fo,br}function Oo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Hu():536870912,e.lanes|=t,bl|=t)}function ds(e,t){if(!je)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function ib(e,t,n){var a=t.pendingProps;switch(cr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),zn(at),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(sl(t)?Rn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fr())),Ke(t),null;case 26:var l=t.type,i=t.memoizedState;return e===null?(Rn(t),i!==null?(Ke(t),im(t,i)):(Ke(t),tc(t,l,null,a,n))):i?i!==e.memoizedState?(Rn(t),Ke(t),im(t,i)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Rn(t),Ke(t),tc(t,l,e,a,n)),null;case 27:if(te(t),n=Q.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Rn(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ke(t),null}e=be.current,sl(t)?qf(t):(e=hh(l,a,n),t.stateNode=e,Rn(t))}return Ke(t),null;case 5:if(te(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Rn(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ke(t),null}if(i=be.current,sl(t))qf(t);else{var f=Xo(Q.current);switch(i){case 1:i=f.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:i=f.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":i=f.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":i=f.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":i=f.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?f.createElement("select",{is:a.is}):f.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?f.createElement(l,{is:a.is}):f.createElement(l)}}i[mt]=t,i[At]=a;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)i.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=i;e:switch(yt(i,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Rn(t)}}return Ke(t),tc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Rn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=Q.current,sl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=ht,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||ah(e.nodeValue,n)),e||$n(t,!0)}else e=Xo(e).createTextNode(a),e[mt]=t,t.stateNode=e}return Ke(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=sl(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[mt]=t}else Na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else n=fr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Lt(t),t):(Lt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ke(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=sl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(r(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(317));l[mt]=t}else Na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),l=!1}else l=fr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Lt(t),t):(Lt(t),null)}return Lt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Oo(t,t.updateQueue),Ke(t),null);case 4:return K(),e===null&&Cc(t.stateNode.containerInfo),Ke(t),null;case 10:return zn(t.type),Ke(t),null;case 19:if(Ee(Pe),a=t.memoizedState,a===null)return Ke(t),null;if(l=(t.flags&128)!==0,i=a.rendering,i===null)if(l)ds(a,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=po(e),i!==null){for(t.flags|=128,ds(a,!1),e=i.updateQueue,t.updateQueue=e,Oo(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Bf(n,e),n=n.sibling;return fe(Pe,Pe.current&1|2),je&&Nn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&tt()>Ro&&(t.flags|=128,l=!0,ds(a,!1),t.lanes=4194304)}else{if(!l)if(e=po(i),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Oo(t,e),ds(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!je)return Ke(t),null}else 2*tt()-a.renderingStartTime>Ro&&n!==536870912&&(t.flags|=128,l=!0,ds(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=tt(),e.sibling=null,n=Pe.current,fe(Pe,l?n&1|2:n&1),je&&Nn(t,a.treeForkCount),e):(Ke(t),null);case 22:case 23:return Lt(t),Ar(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),n=t.updateQueue,n!==null&&Oo(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&Ee(ja),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zn(at),Ke(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function rb(e,t){switch(cr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zn(at),K(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return te(t),null;case 31:if(t.memoizedState!==null){if(Lt(t),t.alternate===null)throw Error(r(340));Na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Lt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(Pe),null;case 4:return K(),null;case 10:return zn(t.type),null;case 22:case 23:return Lt(t),Ar(),e!==null&&Ee(ja),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zn(at),null;case 25:return null;default:return null}}function rm(e,t){switch(cr(t),t.tag){case 3:zn(at),K();break;case 26:case 27:case 5:te(t);break;case 4:K();break;case 31:t.memoizedState!==null&&Lt(t);break;case 13:Lt(t);break;case 19:Ee(Pe);break;case 10:zn(t.type);break;case 22:case 23:Lt(t),Ar(),e!==null&&Ee(ja);break;case 24:zn(at)}}function ms(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var i=n.create,f=n.inst;a=i(),f.destroy=a}n=n.next}while(n!==l)}}catch(g){He(t,t.return,g)}}function aa(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){var f=a.inst,g=f.destroy;if(g!==void 0){f.destroy=void 0,l=t;var w=n,z=g;try{z()}catch(H){He(l,w,H)}}}a=a.next}while(a!==i)}}catch(H){He(t,t.return,H)}}function cm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wf(t,n)}catch(a){He(e,e.return,a)}}}function um(e,t,n){n.props=_a(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){He(e,t,a)}}function hs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){He(e,t,l)}}function pn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){He(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){He(e,t,l)}else n.current=null}function fm(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){He(e,e.return,l)}}function nc(e,t,n){try{var a=e.stateNode;zb(a,e.type,n,t),a[At]=t}catch(l){He(e,e.return,l)}}function dm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ua(e.type)||e.tag===4}function ac(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ua(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=En));else if(a!==4&&(a===27&&ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(lc(e,t,n),e=e.sibling;e!==null;)lc(e,t,n),e=e.sibling}function zo(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&ua(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(zo(e,t,n),e=e.sibling;e!==null;)zo(e,t,n),e=e.sibling}function mm(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);yt(t,a,n),t[mt]=e,t[At]=n}catch(i){He(e,e.return,i)}}var Bn=!1,ot=!1,sc=!1,hm=typeof WeakSet=="function"?WeakSet:Set,dt=null;function cb(e,t){if(e=e.containerInfo,Tc=Io,e=Tf(e),Pi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var f=0,g=-1,w=-1,z=0,H=0,Z=e,k=null;t:for(;;){for(var B;Z!==n||l!==0&&Z.nodeType!==3||(g=f+l),Z!==i||a!==0&&Z.nodeType!==3||(w=f+a),Z.nodeType===3&&(f+=Z.nodeValue.length),(B=Z.firstChild)!==null;)k=Z,Z=B;for(;;){if(Z===e)break t;if(k===n&&++z===l&&(g=f),k===i&&++H===a&&(w=f),(B=Z.nextSibling)!==null)break;Z=k,k=Z.parentNode}Z=B}n=g===-1||w===-1?null:{start:g,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dc={focusedElem:e,selectionRange:n},Io=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){switch(t=dt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,l=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var ae=_a(n.type,l);e=a.getSnapshotBeforeUpdate(ae,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(he){He(n,n.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)zc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,dt=e;break}dt=t.return}}function gm(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Un(e,n),a&4&&ms(5,n);break;case 1:if(Un(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(f){He(n,n.return,f)}else{var l=_a(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){He(n,n.return,f)}}a&64&&cm(n),a&512&&hs(n,n.return);break;case 3:if(Un(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Wf(e,t)}catch(f){He(n,n.return,f)}}break;case 27:t===null&&a&4&&mm(n);case 26:case 5:Un(e,n),t===null&&a&4&&fm(n),a&512&&hs(n,n.return);break;case 12:Un(e,n);break;case 31:Un(e,n),a&4&&bm(e,n);break;case 13:Un(e,n),a&4&&vm(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bb.bind(null,n),Lb(e,n))));break;case 22:if(a=n.memoizedState!==null||Bn,!a){t=t!==null&&t.memoizedState!==null||ot,l=Bn;var i=ot;Bn=a,(ot=t)&&!i?Ln(e,n,(n.subtreeFlags&8772)!==0):Un(e,n),Bn=l,ot=i}break;case 30:break;default:Un(e,n)}}function pm(e){var t=e.alternate;t!==null&&(e.alternate=null,pm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Bi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fe=null,Tt=!1;function _n(e,t,n){for(n=n.child;n!==null;)ym(e,t,n),n=n.sibling}function ym(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Ll,n)}catch{}switch(n.tag){case 26:ot||pn(n,t),_n(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ot||pn(n,t);var a=Fe,l=Tt;ua(n.type)&&(Fe=n.stateNode,Tt=!1),_n(e,t,n),Cs(n.stateNode),Fe=a,Tt=l;break;case 5:ot||pn(n,t);case 6:if(a=Fe,l=Tt,Fe=null,_n(e,t,n),Fe=a,Tt=l,Fe!==null)if(Tt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(n.stateNode)}catch(i){He(n,t,i)}else try{Fe.removeChild(n.stateNode)}catch(i){He(n,t,i)}break;case 18:Fe!==null&&(Tt?(e=Fe,ch(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Tl(e)):ch(Fe,n.stateNode));break;case 4:a=Fe,l=Tt,Fe=n.stateNode.containerInfo,Tt=!0,_n(e,t,n),Fe=a,Tt=l;break;case 0:case 11:case 14:case 15:aa(2,n,t),ot||aa(4,n,t),_n(e,t,n);break;case 1:ot||(pn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&um(n,t,a)),_n(e,t,n);break;case 21:_n(e,t,n);break;case 22:ot=(a=ot)||n.memoizedState!==null,_n(e,t,n),ot=a;break;default:_n(e,t,n)}}function bm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Tl(e)}catch(n){He(t,t.return,n)}}}function vm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Tl(e)}catch(n){He(t,t.return,n)}}function ub(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hm),t;default:throw Error(r(435,e.tag))}}function jo(e,t){var n=ub(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=vb.bind(null,e,a);a.then(l,l)}})}function Dt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],i=e,f=t,g=f;e:for(;g!==null;){switch(g.tag){case 27:if(ua(g.type)){Fe=g.stateNode,Tt=!1;break e}break;case 5:Fe=g.stateNode,Tt=!1;break e;case 3:case 4:Fe=g.stateNode.containerInfo,Tt=!0;break e}g=g.return}if(Fe===null)throw Error(r(160));ym(i,f,l),Fe=null,Tt=!1,i=l.alternate,i!==null&&(i.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sm(t,e),t=t.sibling}var rn=null;function Sm(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dt(t,e),Nt(e),a&4&&(aa(3,e,e.return),ms(3,e),aa(5,e,e.return));break;case 1:Dt(t,e),Nt(e),a&512&&(ot||n===null||pn(n,n.return)),a&64&&Bn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var l=rn;if(Dt(t,e),Nt(e),a&512&&(ot||n===null||pn(n,n.return)),a&4){var i=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":i=l.getElementsByTagName("title")[0],(!i||i[Gl]||i[mt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=l.createElement(a),l.head.insertBefore(i,l.querySelector("head > title"))),yt(i,a,n),i[mt]=e,ft(i),a=i;break e;case"link":var f=Sh("link","href",l).get(a+(n.href||""));if(f){for(var g=0;g<f.length;g++)if(i=f[g],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){f.splice(g,1);break t}}i=l.createElement(a),yt(i,a,n),l.head.appendChild(i);break;case"meta":if(f=Sh("meta","content",l).get(a+(n.content||""))){for(g=0;g<f.length;g++)if(i=f[g],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){f.splice(g,1);break t}}i=l.createElement(a),yt(i,a,n),l.head.appendChild(i);break;default:throw Error(r(468,a))}i[mt]=e,ft(i),a=i}e.stateNode=a}else xh(l,e.type,e.stateNode);else e.stateNode=vh(l,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?xh(l,e.type,e.stateNode):vh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&nc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Dt(t,e),Nt(e),a&512&&(ot||n===null||pn(n,n.return)),n!==null&&a&4&&nc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Dt(t,e),Nt(e),a&512&&(ot||n===null||pn(n,n.return)),e.flags&32){l=e.stateNode;try{Ja(l,"")}catch(ae){He(e,e.return,ae)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,nc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(sc=!0);break;case 6:if(Dt(t,e),Nt(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ae){He(e,e.return,ae)}}break;case 3:if(Ko=null,l=rn,rn=Qo(t.containerInfo),Dt(t,e),rn=l,Nt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Tl(t.containerInfo)}catch(ae){He(e,e.return,ae)}sc&&(sc=!1,xm(e));break;case 4:a=rn,rn=Qo(e.stateNode.containerInfo),Dt(t,e),Nt(e),rn=a;break;case 12:Dt(t,e),Nt(e);break;case 31:Dt(t,e),Nt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,jo(e,a)));break;case 13:Dt(t,e),Nt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ko=tt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,jo(e,a)));break;case 22:l=e.memoizedState!==null;var w=n!==null&&n.memoizedState!==null,z=Bn,H=ot;if(Bn=z||l,ot=H||w,Dt(t,e),ot=H,Bn=z,Nt(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||w||Bn||ot||Ua(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){w=n=t;try{if(i=w.stateNode,l)f=i.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{g=w.stateNode;var Z=w.memoizedProps.style,k=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;g.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ae){He(w,w.return,ae)}}}else if(t.tag===6){if(n===null){w=t;try{w.stateNode.nodeValue=l?"":w.memoizedProps}catch(ae){He(w,w.return,ae)}}}else if(t.tag===18){if(n===null){w=t;try{var B=w.stateNode;l?uh(B,!0):uh(w.stateNode,!1)}catch(ae){He(w,w.return,ae)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,jo(e,n))));break;case 19:Dt(t,e),Nt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,jo(e,a)));break;case 30:break;case 21:break;default:Dt(t,e),Nt(e)}}function Nt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(dm(a)){n=a;break}a=a.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var l=n.stateNode,i=ac(e);zo(e,i,l);break;case 5:var f=n.stateNode;n.flags&32&&(Ja(f,""),n.flags&=-33);var g=ac(e);zo(e,g,f);break;case 3:case 4:var w=n.stateNode.containerInfo,z=ac(e);lc(e,z,w);break;default:throw Error(r(161))}}catch(H){He(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gm(e,t.alternate,t),t=t.sibling}function Ua(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:aa(4,t,t.return),Ua(t);break;case 1:pn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&um(t,t.return,n),Ua(t);break;case 27:Cs(t.stateNode);case 26:case 5:pn(t,t.return),Ua(t);break;case 22:t.memoizedState===null&&Ua(t);break;case 30:Ua(t);break;default:Ua(t)}e=e.sibling}}function Ln(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,i=t,f=i.flags;switch(i.tag){case 0:case 11:case 15:Ln(l,i,n),ms(4,i);break;case 1:if(Ln(l,i,n),a=i,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(z){He(a,a.return,z)}if(a=i,l=a.updateQueue,l!==null){var g=a.stateNode;try{var w=l.shared.hiddenCallbacks;if(w!==null)for(l.shared.hiddenCallbacks=null,l=0;l<w.length;l++)Pf(w[l],g)}catch(z){He(a,a.return,z)}}n&&f&64&&cm(i),hs(i,i.return);break;case 27:mm(i);case 26:case 5:Ln(l,i,n),n&&a===null&&f&4&&fm(i),hs(i,i.return);break;case 12:Ln(l,i,n);break;case 31:Ln(l,i,n),n&&f&4&&bm(l,i);break;case 13:Ln(l,i,n),n&&f&4&&vm(l,i);break;case 22:i.memoizedState===null&&Ln(l,i,n),hs(i,i.return);break;case 30:break;default:Ln(l,i,n)}t=t.sibling}}function oc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&es(n))}function ic(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&es(e))}function cn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wm(e,t,n,a),t=t.sibling}function wm(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:cn(e,t,n,a),l&2048&&ms(9,t);break;case 1:cn(e,t,n,a);break;case 3:cn(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&es(e)));break;case 12:if(l&2048){cn(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,f=i.id,g=i.onPostCommit;typeof g=="function"&&g(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){He(t,t.return,w)}}else cn(e,t,n,a);break;case 31:cn(e,t,n,a);break;case 13:cn(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,f=t.alternate,t.memoizedState!==null?i._visibility&2?cn(e,t,n,a):gs(e,t):i._visibility&2?cn(e,t,n,a):(i._visibility|=2,gl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&oc(f,t);break;case 24:cn(e,t,n,a),l&2048&&ic(t.alternate,t);break;default:cn(e,t,n,a)}}function gl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,f=t,g=n,w=a,z=f.flags;switch(f.tag){case 0:case 11:case 15:gl(i,f,g,w,l),ms(8,f);break;case 23:break;case 22:var H=f.stateNode;f.memoizedState!==null?H._visibility&2?gl(i,f,g,w,l):gs(i,f):(H._visibility|=2,gl(i,f,g,w,l)),l&&z&2048&&oc(f.alternate,f);break;case 24:gl(i,f,g,w,l),l&&z&2048&&ic(f.alternate,f);break;default:gl(i,f,g,w,l)}t=t.sibling}}function gs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:gs(n,a),l&2048&&oc(a.alternate,a);break;case 24:gs(n,a),l&2048&&ic(a.alternate,a);break;default:gs(n,a)}t=t.sibling}}var ps=8192;function pl(e,t,n){if(e.subtreeFlags&ps)for(e=e.child;e!==null;)Cm(e,t,n),e=e.sibling}function Cm(e,t,n){switch(e.tag){case 26:pl(e,t,n),e.flags&ps&&e.memoizedState!==null&&$b(n,rn,e.memoizedState,e.memoizedProps);break;case 5:pl(e,t,n);break;case 3:case 4:var a=rn;rn=Qo(e.stateNode.containerInfo),pl(e,t,n),rn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=ps,ps=16777216,pl(e,t,n),ps=a):pl(e,t,n));break;default:pl(e,t,n)}}function Am(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ys(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];dt=a,Tm(a,e)}Am(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Em(e),e=e.sibling}function Em(e){switch(e.tag){case 0:case 11:case 15:ys(e),e.flags&2048&&aa(9,e,e.return);break;case 3:ys(e);break;case 12:ys(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Mo(e)):ys(e);break;default:ys(e)}}function Mo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];dt=a,Tm(a,e)}Am(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:aa(8,t,t.return),Mo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Mo(t));break;default:Mo(t)}e=e.sibling}}function Tm(e,t){for(;dt!==null;){var n=dt;switch(n.tag){case 0:case 11:case 15:aa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:es(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,dt=a;else e:for(n=e;dt!==null;){a=dt;var l=a.sibling,i=a.return;if(pm(a),a===n){dt=null;break e}if(l!==null){l.return=i,dt=l;break e}dt=i}}}var fb={getCacheForType:function(e){var t=gt(at),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return gt(at).controller.signal}},db=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ve=null,Te=null,Ne=0,Le=0,Ht=null,la=!1,yl=!1,rc=!1,Hn=0,$e=0,sa=0,La=0,cc=0,qt=0,bl=0,bs=null,Ot=null,uc=!1,ko=0,Dm=0,Ro=1/0,Bo=null,oa=null,rt=0,ia=null,vl=null,qn=0,fc=0,dc=null,Nm=null,vs=0,mc=null;function Gt(){return(_e&2)!==0&&Ne!==0?Ne&-Ne:M.T!==null?vc():Vu()}function Om(){if(qt===0)if((Ne&536870912)===0||je){var e=Ys;Ys<<=1,(Ys&3932160)===0&&(Ys=262144),qt=e}else qt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),qt}function zt(e,t,n){(e===Ve&&(Le===2||Le===9)||e.cancelPendingCommit!==null)&&(Sl(e,0),ra(e,Ne,qt,!1)),ql(e,n),((_e&2)===0||e!==Ve)&&(e===Ve&&((_e&2)===0&&(La|=n),$e===4&&ra(e,Ne,qt,!1)),yn(e))}function zm(e,t,n){if((_e&6)!==0)throw Error(r(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Hl(e,t),l=a?gb(e,t):gc(e,t,!0),i=a;do{if(l===0){yl&&!a&&ra(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!mb(n)){l=gc(e,t,!1),i=!1;continue}if(l===2){if(i=t,e.errorRecoveryDisabledLanes&i)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var g=e;l=bs;var w=g.current.memoizedState.isDehydrated;if(w&&(Sl(g,f).flags|=256),f=gc(g,f,!1),f!==2){if(rc&&!w){g.errorRecoveryDisabledLanes|=i,La|=i,l=4;break e}i=Ot,Ot=l,i!==null&&(Ot===null?Ot=i:Ot.push.apply(Ot,i))}l=f}if(i=!1,l!==2)continue}}if(l===1){Sl(e,0),ra(e,t,0,!0);break}e:{switch(a=e,i=l,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:ra(a,t,qt,!la);break e;case 2:Ot=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(l=ko+300-tt(),10<l)){if(ra(a,t,qt,!la),Xs(a,0,!0)!==0)break e;qn=t,a.timeoutHandle=ih(jm.bind(null,a,n,Ot,Bo,uc,t,qt,La,bl,la,i,"Throttled",-0,0),l);break e}jm(a,n,Ot,Bo,uc,t,qt,La,bl,la,i,null,-0,0)}}break}while(!0);yn(e)}function jm(e,t,n,a,l,i,f,g,w,z,H,Z,k,B){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:En},Cm(t,i,Z);var ae=(i&62914560)===i?ko-tt():(i&4194048)===i?Dm-tt():0;if(ae=Ib(Z,ae),ae!==null){qn=i,e.cancelPendingCommit=ae(Hm.bind(null,e,t,i,n,a,l,f,g,w,H,Z,null,k,B)),ra(e,i,f,!z);return}}Hm(e,t,i,n,a,l,f,g,w)}function mb(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],i=l.getSnapshot;l=l.value;try{if(!Bt(i(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ra(e,t,n,a){t&=~cc,t&=~La,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var i=31-Rt(l),f=1<<i;a[i]=-1,l&=~f}n!==0&&qu(e,n,t)}function _o(){return(_e&6)===0?(Ss(0),!1):!0}function hc(){if(Te!==null){if(Le===0)var e=Te.return;else e=Te,On=Oa=null,zr(e),ul=null,ns=0,e=Te;for(;e!==null;)rm(e.alternate,e),e=e.return;Te=null}}function Sl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,kb(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),qn=0,hc(),Ve=e,Te=n=Dn(e.current,null),Ne=t,Le=0,Ht=null,la=!1,yl=Hl(e,t),rc=!1,bl=qt=cc=La=sa=$e=0,Ot=bs=null,uc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-Rt(a),i=1<<l;t|=e[l],a&=~i}return Hn=t,no(),n}function Mm(e,t){ve=null,M.H=us,t===cl||t===uo?(t=Ff(),Le=3):t===br?(t=Ff(),Le=4):Le=t===Zr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ht=t,Te===null&&($e=1,Eo(e,Jt(t,e.current)))}function km(){var e=Ut.current;return e===null?!0:(Ne&4194048)===Ne?Wt===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Wt:!1}function Rm(){var e=M.H;return M.H=us,e===null?us:e}function Bm(){var e=M.A;return M.A=fb,e}function Uo(){$e=4,la||(Ne&4194048)!==Ne&&Ut.current!==null||(yl=!0),(sa&134217727)===0&&(La&134217727)===0||Ve===null||ra(Ve,Ne,qt,!1)}function gc(e,t,n){var a=_e;_e|=2;var l=Rm(),i=Bm();(Ve!==e||Ne!==t)&&(Bo=null,Sl(e,t)),t=!1;var f=$e;e:do try{if(Le!==0&&Te!==null){var g=Te,w=Ht;switch(Le){case 8:hc(),f=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var z=Le;if(Le=0,Ht=null,xl(e,g,w,z),n&&yl){f=0;break e}break;default:z=Le,Le=0,Ht=null,xl(e,g,w,z)}}hb(),f=$e;break}catch(H){Mm(e,H)}while(!0);return t&&e.shellSuspendCounter++,On=Oa=null,_e=a,M.H=l,M.A=i,Te===null&&(Ve=null,Ne=0,no()),f}function hb(){for(;Te!==null;)_m(Te)}function gb(e,t){var n=_e;_e|=2;var a=Rm(),l=Bm();Ve!==e||Ne!==t?(Bo=null,Ro=tt()+500,Sl(e,t)):yl=Hl(e,t);e:do try{if(Le!==0&&Te!==null){t=Te;var i=Ht;t:switch(Le){case 1:Le=0,Ht=null,xl(e,t,i,1);break;case 2:case 9:if(Zf(i)){Le=0,Ht=null,Um(t);break}t=function(){Le!==2&&Le!==9||Ve!==e||(Le=7),yn(e)},i.then(t,t);break e;case 3:Le=7;break e;case 4:Le=5;break e;case 7:Zf(i)?(Le=0,Ht=null,Um(t)):(Le=0,Ht=null,xl(e,t,i,7));break;case 5:var f=null;switch(Te.tag){case 26:f=Te.memoizedState;case 5:case 27:var g=Te;if(f?wh(f):g.stateNode.complete){Le=0,Ht=null;var w=g.sibling;if(w!==null)Te=w;else{var z=g.return;z!==null?(Te=z,Lo(z)):Te=null}break t}}Le=0,Ht=null,xl(e,t,i,5);break;case 6:Le=0,Ht=null,xl(e,t,i,6);break;case 8:hc(),$e=6;break e;default:throw Error(r(462))}}pb();break}catch(H){Mm(e,H)}while(!0);return On=Oa=null,M.H=a,M.A=l,_e=n,Te!==null?0:(Ve=null,Ne=0,no(),$e)}function pb(){for(;Te!==null&&!ze();)_m(Te)}function _m(e){var t=om(e.alternate,e,Hn);e.memoizedProps=e.pendingProps,t===null?Lo(e):Te=t}function Um(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=em(n,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=em(n,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:zr(t);default:rm(n,t),t=Te=Bf(t,Hn),t=om(n,t,Hn)}e.memoizedProps=e.pendingProps,t===null?Lo(e):Te=t}function xl(e,t,n,a){On=Oa=null,zr(t),ul=null,ns=0;var l=t.return;try{if(lb(e,l,t,n,Ne)){$e=1,Eo(e,Jt(n,e.current)),Te=null;return}}catch(i){if(l!==null)throw Te=l,i;$e=1,Eo(e,Jt(n,e.current)),Te=null;return}t.flags&32768?(je||a===1?e=!0:yl||(Ne&536870912)!==0?e=!1:(la=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ut.current,a!==null&&a.tag===13&&(a.flags|=16384))),Lm(t,e)):Lo(t)}function Lo(e){var t=e;do{if((t.flags&32768)!==0){Lm(t,la);return}e=t.return;var n=ib(t.alternate,t,Hn);if(n!==null){Te=n;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);$e===0&&($e=5)}function Lm(e,t){do{var n=rb(e.alternate,e);if(n!==null){n.flags&=32767,Te=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=n}while(e!==null);$e=6,Te=null}function Hm(e,t,n,a,l,i,f,g,w){e.cancelPendingCommit=null;do Ho();while(rt!==0);if((_e&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=ar,Jp(e,n,i,f,g,w),e===Ve&&(Te=Ve=null,Ne=0),vl=t,ia=e,qn=n,fc=i,dc=l,Nm=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Sb(ke,function(){return Xm(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null,l=$.p,$.p=2,f=_e,_e|=4;try{cb(e,t,n)}finally{_e=f,$.p=l,M.T=a}}rt=1,qm(),Gm(),Ym()}}function qm(){if(rt===1){rt=0;var e=ia,t=vl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null;var a=$.p;$.p=2;var l=_e;_e|=4;try{Sm(t,e);var i=Dc,f=Tf(e.containerInfo),g=i.focusedElem,w=i.selectionRange;if(f!==g&&g&&g.ownerDocument&&Ef(g.ownerDocument.documentElement,g)){if(w!==null&&Pi(g)){var z=w.start,H=w.end;if(H===void 0&&(H=z),"selectionStart"in g)g.selectionStart=z,g.selectionEnd=Math.min(H,g.value.length);else{var Z=g.ownerDocument||document,k=Z&&Z.defaultView||window;if(k.getSelection){var B=k.getSelection(),ae=g.textContent.length,he=Math.min(w.start,ae),Ye=w.end===void 0?he:Math.min(w.end,ae);!B.extend&&he>Ye&&(f=Ye,Ye=he,he=f);var T=Af(g,he),C=Af(g,Ye);if(T&&C&&(B.rangeCount!==1||B.anchorNode!==T.node||B.anchorOffset!==T.offset||B.focusNode!==C.node||B.focusOffset!==C.offset)){var O=Z.createRange();O.setStart(T.node,T.offset),B.removeAllRanges(),he>Ye?(B.addRange(O),B.extend(C.node,C.offset)):(O.setEnd(C.node,C.offset),B.addRange(O))}}}}for(Z=[],B=g;B=B.parentNode;)B.nodeType===1&&Z.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<Z.length;g++){var Y=Z[g];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Io=!!Tc,Dc=Tc=null}finally{_e=l,$.p=a,M.T=n}}e.current=t,rt=2}}function Gm(){if(rt===2){rt=0;var e=ia,t=vl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=M.T,M.T=null;var a=$.p;$.p=2;var l=_e;_e|=4;try{gm(e,t.alternate,t)}finally{_e=l,$.p=a,M.T=n}}rt=3}}function Ym(){if(rt===4||rt===3){rt=0,Qt();var e=ia,t=vl,n=qn,a=Nm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?rt=5:(rt=0,vl=ia=null,Vm(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(oa=null),ki(n),t=t.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Ll,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=M.T,l=$.p,$.p=2,M.T=null;try{for(var i=e.onRecoverableError,f=0;f<a.length;f++){var g=a[f];i(g.value,{componentStack:g.stack})}}finally{M.T=t,$.p=l}}(qn&3)!==0&&Ho(),yn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===mc?vs++:(vs=0,mc=e):vs=0,Ss(0)}}function Vm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,es(t)))}function Ho(){return qm(),Gm(),Ym(),Xm()}function Xm(){if(rt!==5)return!1;var e=ia,t=fc;fc=0;var n=ki(qn),a=M.T,l=$.p;try{$.p=32>n?32:n,M.T=null,n=dc,dc=null;var i=ia,f=qn;if(rt=0,vl=ia=null,qn=0,(_e&6)!==0)throw Error(r(331));var g=_e;if(_e|=4,Em(i.current),wm(i,i.current,f,n),_e=g,Ss(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Ll,i)}catch{}return!0}finally{$.p=l,M.T=a,Vm(e,t)}}function Qm(e,t,n){t=Jt(n,t),t=Qr(e.stateNode,t,2),e=ea(e,t,2),e!==null&&(ql(e,2),yn(e))}function He(e,t,n){if(e.tag===3)Qm(e,e,n);else for(;t!==null;){if(t.tag===3){Qm(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(oa===null||!oa.has(a))){e=Jt(n,e),n=Zd(2),a=ea(t,n,2),a!==null&&(Kd(n,a,t,e),ql(a,2),yn(a));break}}t=t.return}}function pc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new db;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(rc=!0,l.add(n),e=yb.bind(null,e,t,n),t.then(e,e))}function yb(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ve===e&&(Ne&n)===n&&($e===4||$e===3&&(Ne&62914560)===Ne&&300>tt()-ko?(_e&2)===0&&Sl(e,0):cc|=n,bl===Ne&&(bl=0)),yn(e)}function Zm(e,t){t===0&&(t=Hu()),e=Ta(e,t),e!==null&&(ql(e,t),yn(e))}function bb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zm(e,n)}function vb(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Zm(e,n)}function Sb(e,t){return St(e,t)}var qo=null,wl=null,yc=!1,Go=!1,bc=!1,ca=0;function yn(e){e!==wl&&e.next===null&&(wl===null?qo=wl=e:wl=wl.next=e),Go=!0,yc||(yc=!0,wb())}function Ss(e,t){if(!bc&&Go){bc=!0;do for(var n=!1,a=qo;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var i=0;else{var f=a.suspendedLanes,g=a.pingedLanes;i=(1<<31-Rt(42|e)+1)-1,i&=l&~(f&~g),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,$m(a,i))}else i=Ne,i=Xs(a,a===Ve?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Hl(a,i)||(n=!0,$m(a,i));a=a.next}while(n);bc=!1}}function xb(){Km()}function Km(){Go=yc=!1;var e=0;ca!==0&&Mb()&&(e=ca);for(var t=tt(),n=null,a=qo;a!==null;){var l=a.next,i=Fm(a,t);i===0?(a.next=null,n===null?qo=l:n.next=l,l===null&&(wl=n)):(n=a,(e!==0||(i&3)!==0)&&(Go=!0)),a=l}rt!==0&&rt!==5||Ss(e),ca!==0&&(ca=0)}function Fm(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var f=31-Rt(i),g=1<<f,w=l[f];w===-1?((g&n)===0||(g&a)!==0)&&(l[f]=Fp(g,t)):w<=t&&(e.expiredLanes|=g),i&=~g}if(t=Ve,n=Ne,n=Xs(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Le===2||Le===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&pe(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Hl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&pe(a),ki(n)){case 2:case 8:n=zi;break;case 32:n=ke;break;case 268435456:n=nt;break;default:n=ke}return a=Jm.bind(null,e),n=St(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&pe(a),e.callbackPriority=2,e.callbackNode=null,2}function Jm(e,t){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ho()&&e.callbackNode!==n)return null;var a=Ne;return a=Xs(e,e===Ve?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(zm(e,a,t),Fm(e,tt()),e.callbackNode!=null&&e.callbackNode===n?Jm.bind(null,e):null)}function $m(e,t){if(Ho())return null;zm(e,t,!0)}function wb(){Rb(function(){(_e&6)!==0?St(mn,xb):Km()})}function vc(){if(ca===0){var e=il;e===0&&(e=Gs,Gs<<=1,(Gs&261888)===0&&(Gs=256)),ca=e}return ca}function Im(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Fs(""+e)}function Pm(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Cb(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var i=Im((l[At]||null).action),f=a.submitter;f&&(t=(t=f[At]||null)?Im(t.formAction):f.getAttribute("formAction"),t!==null&&(i=t,f=null));var g=new Ps("action","action",null,a,l);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ca!==0){var w=f?Pm(l,f):new FormData(l);Hr(n,{pending:!0,data:w,method:l.method,action:i},null,w)}}else typeof i=="function"&&(g.preventDefault(),w=f?Pm(l,f):new FormData(l),Hr(n,{pending:!0,data:w,method:l.method,action:i},i,w))},currentTarget:l}]})}}for(var Sc=0;Sc<nr.length;Sc++){var xc=nr[Sc],Ab=xc.toLowerCase(),Eb=xc[0].toUpperCase()+xc.slice(1);on(Ab,"on"+Eb)}on(Of,"onAnimationEnd"),on(zf,"onAnimationIteration"),on(jf,"onAnimationStart"),on("dblclick","onDoubleClick"),on("focusin","onFocus"),on("focusout","onBlur"),on(Gy,"onTransitionRun"),on(Yy,"onTransitionStart"),on(Vy,"onTransitionCancel"),on(Mf,"onTransitionEnd"),Ka("onMouseEnter",["mouseout","mouseover"]),Ka("onMouseLeave",["mouseout","mouseover"]),Ka("onPointerEnter",["pointerout","pointerover"]),Ka("onPointerLeave",["pointerout","pointerover"]),wa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wa("onBeforeInput",["compositionend","keypress","textInput","paste"]),wa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xs="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(" "),Tb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xs));function Wm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var f=a.length-1;0<=f;f--){var g=a[f],w=g.instance,z=g.currentTarget;if(g=g.listener,w!==i&&l.isPropagationStopped())break e;i=g,l.currentTarget=z;try{i(l)}catch(H){to(H)}l.currentTarget=null,i=w}else for(f=0;f<a.length;f++){if(g=a[f],w=g.instance,z=g.currentTarget,g=g.listener,w!==i&&l.isPropagationStopped())break e;i=g,l.currentTarget=z;try{i(l)}catch(H){to(H)}l.currentTarget=null,i=w}}}}function De(e,t){var n=t[Ri];n===void 0&&(n=t[Ri]=new Set);var a=e+"__bubble";n.has(a)||(eh(t,e,2,!1),n.add(a))}function wc(e,t,n){var a=0;t&&(a|=4),eh(n,e,a,t)}var Yo="_reactListening"+Math.random().toString(36).slice(2);function Cc(e){if(!e[Yo]){e[Yo]=!0,Zu.forEach(function(n){n!=="selectionchange"&&(Tb.has(n)||wc(n,!1,e),wc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yo]||(t[Yo]=!0,wc("selectionchange",!1,t))}}function eh(e,t,n,a){switch(Oh(t)){case 2:var l=ev;break;case 8:l=tv;break;default:l=Lc}n=l.bind(null,t,n,e),l=void 0,!Vi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ac(e,t,n,a,l){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var f=a.tag;if(f===3||f===4){var g=a.stateNode.containerInfo;if(g===l)break;if(f===4)for(f=a.return;f!==null;){var w=f.tag;if((w===3||w===4)&&f.stateNode.containerInfo===l)return;f=f.return}for(;g!==null;){if(f=Xa(g),f===null)return;if(w=f.tag,w===5||w===6||w===26||w===27){a=i=f;continue e}g=g.parentNode}}a=a.return}lf(function(){var z=i,H=Gi(n),Z=[];e:{var k=kf.get(e);if(k!==void 0){var B=Ps,ae=e;switch(e){case"keypress":if($s(n)===0)break e;case"keydown":case"keyup":B=vy;break;case"focusin":ae="focus",B=Ki;break;case"focusout":ae="blur",B=Ki;break;case"beforeblur":case"afterblur":B=Ki;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=rf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=iy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=wy;break;case Of:case zf:case jf:B=uy;break;case Mf:B=Ay;break;case"scroll":case"scrollend":B=sy;break;case"wheel":B=Ty;break;case"copy":case"cut":case"paste":B=dy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=uf;break;case"toggle":case"beforetoggle":B=Ny}var he=(t&4)!==0,Ye=!he&&(e==="scroll"||e==="scrollend"),T=he?k!==null?k+"Capture":null:k;he=[];for(var C=z,O;C!==null;){var Y=C;if(O=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||O===null||T===null||(Y=Vl(C,T),Y!=null&&he.push(ws(C,Y,O))),Ye)break;C=C.return}0<he.length&&(k=new B(k,ae,null,n,H),Z.push({event:k,listeners:he}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",k&&n!==qi&&(ae=n.relatedTarget||n.fromElement)&&(Xa(ae)||ae[Va]))break e;if((B||k)&&(k=H.window===H?H:(k=H.ownerDocument)?k.defaultView||k.parentWindow:window,B?(ae=n.relatedTarget||n.toElement,B=z,ae=ae?Xa(ae):null,ae!==null&&(Ye=d(ae),he=ae.tag,ae!==Ye||he!==5&&he!==27&&he!==6)&&(ae=null)):(B=null,ae=z),B!==ae)){if(he=rf,Y="onMouseLeave",T="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(he=uf,Y="onPointerLeave",T="onPointerEnter",C="pointer"),Ye=B==null?k:Yl(B),O=ae==null?k:Yl(ae),k=new he(Y,C+"leave",B,n,H),k.target=Ye,k.relatedTarget=O,Y=null,Xa(H)===z&&(he=new he(T,C+"enter",ae,n,H),he.target=O,he.relatedTarget=Ye,Y=he),Ye=Y,B&&ae)t:{for(he=Db,T=B,C=ae,O=0,Y=T;Y;Y=he(Y))O++;Y=0;for(var ue=C;ue;ue=he(ue))Y++;for(;0<O-Y;)T=he(T),O--;for(;0<Y-O;)C=he(C),Y--;for(;O--;){if(T===C||C!==null&&T===C.alternate){he=T;break t}T=he(T),C=he(C)}he=null}else he=null;B!==null&&th(Z,k,B,he,!1),ae!==null&&Ye!==null&&th(Z,Ye,ae,he,!0)}}e:{if(k=z?Yl(z):window,B=k.nodeName&&k.nodeName.toLowerCase(),B==="select"||B==="input"&&k.type==="file")var Re=bf;else if(pf(k))if(vf)Re=Ly;else{Re=_y;var oe=By}else B=k.nodeName,!B||B.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?z&&Hi(z.elementType)&&(Re=bf):Re=Uy;if(Re&&(Re=Re(e,z))){yf(Z,Re,n,H);break e}oe&&oe(e,k,z),e==="focusout"&&z&&k.type==="number"&&z.memoizedProps.value!=null&&Li(k,"number",k.value)}switch(oe=z?Yl(z):window,e){case"focusin":(pf(oe)||oe.contentEditable==="true")&&(Wa=oe,Wi=z,Il=null);break;case"focusout":Il=Wi=Wa=null;break;case"mousedown":er=!0;break;case"contextmenu":case"mouseup":case"dragend":er=!1,Df(Z,n,H);break;case"selectionchange":if(qy)break;case"keydown":case"keyup":Df(Z,n,H)}var Se;if(Ji)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Pa?hf(e,n)&&(Oe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Oe="onCompositionStart");Oe&&(ff&&n.locale!=="ko"&&(Pa||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Pa&&(Se=sf()):(Kn=H,Xi="value"in Kn?Kn.value:Kn.textContent,Pa=!0)),oe=Vo(z,Oe),0<oe.length&&(Oe=new cf(Oe,e,null,n,H),Z.push({event:Oe,listeners:oe}),Se?Oe.data=Se:(Se=gf(n),Se!==null&&(Oe.data=Se)))),(Se=zy?jy(e,n):My(e,n))&&(Oe=Vo(z,"onBeforeInput"),0<Oe.length&&(oe=new cf("onBeforeInput","beforeinput",null,n,H),Z.push({event:oe,listeners:Oe}),oe.data=Se)),Cb(Z,e,z,n,H)}Wm(Z,t)})}function ws(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vo(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,i=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||i===null||(l=Vl(e,n),l!=null&&a.unshift(ws(e,l,i)),l=Vl(e,t),l!=null&&a.push(ws(e,l,i))),e.tag===3)return a;e=e.return}return[]}function Db(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function th(e,t,n,a,l){for(var i=t._reactName,f=[];n!==null&&n!==a;){var g=n,w=g.alternate,z=g.stateNode;if(g=g.tag,w!==null&&w===a)break;g!==5&&g!==26&&g!==27||z===null||(w=z,l?(z=Vl(n,i),z!=null&&f.unshift(ws(n,z,w))):l||(z=Vl(n,i),z!=null&&f.push(ws(n,z,w)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var Nb=/\r\n?/g,Ob=/\u0000|\uFFFD/g;function nh(e){return(typeof e=="string"?e:""+e).replace(Nb,`
|
|
10
|
+
`).replace(Ob,"")}function ah(e,t){return t=nh(t),nh(e)===t}function Ge(e,t,n,a,l,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ja(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ja(e,""+a);break;case"className":Zs(e,"class",a);break;case"tabIndex":Zs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Zs(e,n,a);break;case"style":nf(e,a,i);break;case"data":if(t!=="object"){Zs(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Fs(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Ge(e,t,"name",l.name,l,null),Ge(e,t,"formEncType",l.formEncType,l,null),Ge(e,t,"formMethod",l.formMethod,l,null),Ge(e,t,"formTarget",l.formTarget,l,null)):(Ge(e,t,"encType",l.encType,l,null),Ge(e,t,"method",l.method,l,null),Ge(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Fs(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=En);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=Fs(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":De("beforetoggle",e),De("toggle",e),Qs(e,"popover",a);break;case"xlinkActuate":An(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":An(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":An(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":An(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":An(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":An(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":An(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":An(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":An(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Qs(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=ay.get(n)||n,Qs(e,n,a))}}function Ec(e,t,n,a,l,i){switch(n){case"style":nf(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Ja(e,a):(typeof a=="number"||typeof a=="bigint")&&Ja(e,""+a);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"onClick":a!=null&&(e.onclick=En);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ku.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),i=e[At]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,l),typeof a=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Qs(e,n,a)}}}function yt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var a=!1,l=!1,i;for(i in n)if(n.hasOwnProperty(i)){var f=n[i];if(f!=null)switch(i){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ge(e,t,i,f,n,null)}}l&&Ge(e,t,"srcSet",n.srcSet,n,null),a&&Ge(e,t,"src",n.src,n,null);return;case"input":De("invalid",e);var g=i=f=l=null,w=null,z=null;for(a in n)if(n.hasOwnProperty(a)){var H=n[a];if(H!=null)switch(a){case"name":l=H;break;case"type":f=H;break;case"checked":w=H;break;case"defaultChecked":z=H;break;case"value":i=H;break;case"defaultValue":g=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:Ge(e,t,a,H,n,null)}}Pu(e,i,g,w,z,f,l,!1);return;case"select":De("invalid",e),a=f=i=null;for(l in n)if(n.hasOwnProperty(l)&&(g=n[l],g!=null))switch(l){case"value":i=g;break;case"defaultValue":f=g;break;case"multiple":a=g;default:Ge(e,t,l,g,n,null)}t=i,n=f,e.multiple=!!a,t!=null?Fa(e,!!a,t,!1):n!=null&&Fa(e,!!a,n,!0);return;case"textarea":De("invalid",e),i=l=a=null;for(f in n)if(n.hasOwnProperty(f)&&(g=n[f],g!=null))switch(f){case"value":a=g;break;case"defaultValue":l=g;break;case"children":i=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:Ge(e,t,f,g,n,null)}ef(e,a,l,i);return;case"option":for(w in n)n.hasOwnProperty(w)&&(a=n[w],a!=null)&&(w==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ge(e,t,w,a,n,null));return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(a=0;a<xs.length;a++)De(xs[a],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in n)if(n.hasOwnProperty(z)&&(a=n[z],a!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ge(e,t,z,a,n,null)}return;default:if(Hi(t)){for(H in n)n.hasOwnProperty(H)&&(a=n[H],a!==void 0&&Ec(e,t,H,a,n,void 0));return}}for(g in n)n.hasOwnProperty(g)&&(a=n[g],a!=null&&Ge(e,t,g,a,n,null))}function zb(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,i=null,f=null,g=null,w=null,z=null,H=null;for(B in n){var Z=n[B];if(n.hasOwnProperty(B)&&Z!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":w=Z;default:a.hasOwnProperty(B)||Ge(e,t,B,null,a,Z)}}for(var k in a){var B=a[k];if(Z=n[k],a.hasOwnProperty(k)&&(B!=null||Z!=null))switch(k){case"type":i=B;break;case"name":l=B;break;case"checked":z=B;break;case"defaultChecked":H=B;break;case"value":f=B;break;case"defaultValue":g=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:B!==Z&&Ge(e,t,k,B,a,Z)}}Ui(e,f,g,w,z,H,i,l);return;case"select":B=f=g=k=null;for(i in n)if(w=n[i],n.hasOwnProperty(i)&&w!=null)switch(i){case"value":break;case"multiple":B=w;default:a.hasOwnProperty(i)||Ge(e,t,i,null,a,w)}for(l in a)if(i=a[l],w=n[l],a.hasOwnProperty(l)&&(i!=null||w!=null))switch(l){case"value":k=i;break;case"defaultValue":g=i;break;case"multiple":f=i;default:i!==w&&Ge(e,t,l,i,a,w)}t=g,n=f,a=B,k!=null?Fa(e,!!n,k,!1):!!a!=!!n&&(t!=null?Fa(e,!!n,t,!0):Fa(e,!!n,n?[]:"",!1));return;case"textarea":B=k=null;for(g in n)if(l=n[g],n.hasOwnProperty(g)&&l!=null&&!a.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:Ge(e,t,g,null,a,l)}for(f in a)if(l=a[f],i=n[f],a.hasOwnProperty(f)&&(l!=null||i!=null))switch(f){case"value":k=l;break;case"defaultValue":B=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(r(91));break;default:l!==i&&Ge(e,t,f,l,a,i)}Wu(e,k,B);return;case"option":for(var ae in n)k=n[ae],n.hasOwnProperty(ae)&&k!=null&&!a.hasOwnProperty(ae)&&(ae==="selected"?e.selected=!1:Ge(e,t,ae,null,a,k));for(w in a)k=a[w],B=n[w],a.hasOwnProperty(w)&&k!==B&&(k!=null||B!=null)&&(w==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":Ge(e,t,w,k,a,B));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var he in n)k=n[he],n.hasOwnProperty(he)&&k!=null&&!a.hasOwnProperty(he)&&Ge(e,t,he,null,a,k);for(z in a)if(k=a[z],B=n[z],a.hasOwnProperty(z)&&k!==B&&(k!=null||B!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,t));break;default:Ge(e,t,z,k,a,B)}return;default:if(Hi(t)){for(var Ye in n)k=n[Ye],n.hasOwnProperty(Ye)&&k!==void 0&&!a.hasOwnProperty(Ye)&&Ec(e,t,Ye,void 0,a,k);for(H in a)k=a[H],B=n[H],!a.hasOwnProperty(H)||k===B||k===void 0&&B===void 0||Ec(e,t,H,k,a,B);return}}for(var T in n)k=n[T],n.hasOwnProperty(T)&&k!=null&&!a.hasOwnProperty(T)&&Ge(e,t,T,null,a,k);for(Z in a)k=a[Z],B=n[Z],!a.hasOwnProperty(Z)||k===B||k==null&&B==null||Ge(e,t,Z,k,a,B)}function lh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],i=l.transferSize,f=l.initiatorType,g=l.duration;if(i&&g&&lh(f)){for(f=0,g=l.responseEnd,a+=1;a<n.length;a++){var w=n[a],z=w.startTime;if(z>g)break;var H=w.transferSize,Z=w.initiatorType;H&&lh(Z)&&(w=w.responseEnd,f+=H*(w<g?1:(g-z)/(w-z)))}if(--a,t+=8*(i+f)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Tc=null,Dc=null;function Xo(e){return e.nodeType===9?e:e.ownerDocument}function sh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function oh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Nc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Oc=null;function Mb(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var ih=typeof setTimeout=="function"?setTimeout:void 0,kb=typeof clearTimeout=="function"?clearTimeout:void 0,rh=typeof Promise=="function"?Promise:void 0,Rb=typeof queueMicrotask=="function"?queueMicrotask:typeof rh<"u"?function(e){return rh.resolve(null).then(e).catch(Bb)}:ih;function Bb(e){setTimeout(function(){throw e})}function ua(e){return e==="head"}function ch(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),Tl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Cs(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Cs(n);for(var i=n.firstChild;i;){var f=i.nextSibling,g=i.nodeName;i[Gl]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=f}}else n==="body"&&Cs(e.ownerDocument.body);n=l}while(n);Tl(t)}function uh(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function zc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":zc(n),Bi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function _b(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Gl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=en(e.nextSibling),e===null)break}return null}function Ub(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=en(e.nextSibling),e===null))return null;return e}function fh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=en(e.nextSibling),e===null))return null;return e}function jc(e){return e.data==="$?"||e.data==="$~"}function Mc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Lb(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function en(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var kc=null;function dh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return en(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function mh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function hh(e,t,n){switch(t=Xo(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Cs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Bi(e)}var tn=new Map,gh=new Set;function Qo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Gn=$.d;$.d={f:Hb,r:qb,D:Gb,C:Yb,L:Vb,m:Xb,X:Zb,S:Qb,M:Kb};function Hb(){var e=Gn.f(),t=_o();return e||t}function qb(e){var t=Qa(e);t!==null&&t.tag===5&&t.type==="form"?Md(t):Gn.r(e)}var Cl=typeof document>"u"?null:document;function ph(e,t,n){var a=Cl;if(a&&typeof t=="string"&&t){var l=Kt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),gh.has(l)||(gh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),yt(t,"link",e),ft(t),a.head.appendChild(t)))}}function Gb(e){Gn.D(e),ph("dns-prefetch",e,null)}function Yb(e,t){Gn.C(e,t),ph("preconnect",e,t)}function Vb(e,t,n){Gn.L(e,t,n);var a=Cl;if(a&&e&&t){var l='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Kt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Kt(n.imageSizes)+'"]')):l+='[href="'+Kt(e)+'"]';var i=l;switch(t){case"style":i=Al(e);break;case"script":i=El(e)}tn.has(i)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),tn.set(i,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(As(i))||t==="script"&&a.querySelector(Es(i))||(t=a.createElement("link"),yt(t,"link",e),ft(t),a.head.appendChild(t)))}}function Xb(e,t){Gn.m(e,t);var n=Cl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Kt(a)+'"][href="'+Kt(e)+'"]',i=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=El(e)}if(!tn.has(i)&&(e=S({rel:"modulepreload",href:e},t),tn.set(i,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Es(i)))return}a=n.createElement("link"),yt(a,"link",e),ft(a),n.head.appendChild(a)}}}function Qb(e,t,n){Gn.S(e,t,n);var a=Cl;if(a&&e){var l=Za(a).hoistableStyles,i=Al(e);t=t||"default";var f=l.get(i);if(!f){var g={loading:0,preload:null};if(f=a.querySelector(As(i)))g.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=tn.get(i))&&Rc(e,n);var w=f=a.createElement("link");ft(w),yt(w,"link",e),w._p=new Promise(function(z,H){w.onload=z,w.onerror=H}),w.addEventListener("load",function(){g.loading|=1}),w.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Zo(f,t,a)}f={type:"stylesheet",instance:f,count:1,state:g},l.set(i,f)}}}function Zb(e,t){Gn.X(e,t);var n=Cl;if(n&&e){var a=Za(n).hoistableScripts,l=El(e),i=a.get(l);i||(i=n.querySelector(Es(l)),i||(e=S({src:e,async:!0},t),(t=tn.get(l))&&Bc(e,t),i=n.createElement("script"),ft(i),yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Kb(e,t){Gn.M(e,t);var n=Cl;if(n&&e){var a=Za(n).hoistableScripts,l=El(e),i=a.get(l);i||(i=n.querySelector(Es(l)),i||(e=S({src:e,async:!0,type:"module"},t),(t=tn.get(l))&&Bc(e,t),i=n.createElement("script"),ft(i),yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function yh(e,t,n,a){var l=(l=Q.current)?Qo(l):null;if(!l)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Al(n.href),n=Za(l).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Al(n.href);var i=Za(l).hoistableStyles,f=i.get(e);if(f||(l=l.ownerDocument||l,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,f),(i=l.querySelector(As(e)))&&!i._p&&(f.instance=i,f.state.loading=5),tn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},tn.set(e,n),i||Fb(l,e,n,f.state))),t&&a===null)throw Error(r(528,""));return f}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=El(n),n=Za(l).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Al(e){return'href="'+Kt(e)+'"'}function As(e){return'link[rel="stylesheet"]['+e+"]"}function bh(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Fb(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),yt(t,"link",n),ft(t),e.head.appendChild(t))}function El(e){return'[src="'+Kt(e)+'"]'}function Es(e){return"script[async]"+e}function vh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Kt(n.href)+'"]');if(a)return t.instance=a,ft(a),a;var l=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ft(a),yt(a,"style",l),Zo(a,n.precedence,e),t.instance=a;case"stylesheet":l=Al(n.href);var i=e.querySelector(As(l));if(i)return t.state.loading|=4,t.instance=i,ft(i),i;a=bh(n),(l=tn.get(l))&&Rc(a,l),i=(e.ownerDocument||e).createElement("link"),ft(i);var f=i;return f._p=new Promise(function(g,w){f.onload=g,f.onerror=w}),yt(i,"link",a),t.state.loading|=4,Zo(i,n.precedence,e),t.instance=i;case"script":return i=El(n.src),(l=e.querySelector(Es(i)))?(t.instance=l,ft(l),l):(a=n,(l=tn.get(i))&&(a=S({},n),Bc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),ft(l),yt(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Zo(a,n.precedence,e));return t.instance}function Zo(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,i=l,f=0;f<a.length;f++){var g=a[f];if(g.dataset.precedence===t)i=g;else if(i!==l)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Bc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ko=null;function Sh(e,t,n){if(Ko===null){var a=new Map,l=Ko=new Map;l.set(n,a)}else l=Ko,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var i=n[l];if(!(i[Gl]||i[mt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var f=i.getAttribute(t)||"";f=e+f;var g=a.get(f);g?g.push(i):a.set(f,[i])}}return a}function xh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Jb(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function wh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $b(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Al(a.href),i=t.querySelector(As(l));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Fo.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ft(i);return}i=t.ownerDocument||t,a=bh(a),(l=tn.get(l))&&Rc(a,l),i=i.createElement("link"),ft(i);var f=i;f._p=new Promise(function(g,w){f.onload=g,f.onerror=w}),yt(i,"link",a),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Fo.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var _c=0;function Ib(e,t){return e.stylesheets&&e.count===0&&$o(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&$o(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&_c===0&&(_c=62500*jb());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$o(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>_c?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function Fo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$o(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Jo=null;function $o(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Jo=new Map,t.forEach(Pb,e),Jo=null,Fo.call(e))}function Pb(e,t){if(!(t.state.loading&4)){var n=Jo.get(e);if(n)var a=n.get(null);else{n=new Map,Jo.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<l.length;i++){var f=l[i];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),a=f)}a&&n.set(null,a)}l=t.instance,f=l.getAttribute("data-precedence"),i=n.get(f)||a,i===a&&n.set(null,l),n.set(f,l),this.count++,a=Fo.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),i?i.parentNode.insertBefore(l,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Ts={$$typeof:V,Provider:null,Consumer:null,_currentValue:_,_currentValue2:_,_threadCount:0};function Wb(e,t,n,a,l,i,f,g,w){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ji(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ji(0),this.hiddenUpdates=ji(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=i,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Ch(e,t,n,a,l,i,f,g,w,z,H,Z){return e=new Wb(e,t,n,f,w,z,H,Z,g),t=1,i===!0&&(t|=24),i=_t(3,null,null,t),e.current=i,i.stateNode=e,t=gr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},vr(i),e}function Ah(e){return e?(e=nl,e):nl}function Eh(e,t,n,a,l,i){l=Ah(l),a.context===null?a.context=l:a.pendingContext=l,a=Wn(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=ea(e,a,t),n!==null&&(zt(n,e,t),ls(n,e,t))}function Th(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Uc(e,t){Th(e,t),(e=e.alternate)&&Th(e,t)}function Dh(e){if(e.tag===13||e.tag===31){var t=Ta(e,67108864);t!==null&&zt(t,e,67108864),Uc(e,67108864)}}function Nh(e){if(e.tag===13||e.tag===31){var t=Gt();t=Mi(t);var n=Ta(e,t);n!==null&&zt(n,e,t),Uc(e,t)}}var Io=!0;function ev(e,t,n,a){var l=M.T;M.T=null;var i=$.p;try{$.p=2,Lc(e,t,n,a)}finally{$.p=i,M.T=l}}function tv(e,t,n,a){var l=M.T;M.T=null;var i=$.p;try{$.p=8,Lc(e,t,n,a)}finally{$.p=i,M.T=l}}function Lc(e,t,n,a){if(Io){var l=Hc(a);if(l===null)Ac(e,t,a,Po,n),zh(e,a);else if(av(l,e,t,n,a))a.stopPropagation();else if(zh(e,a),t&4&&-1<nv.indexOf(e)){for(;l!==null;){var i=Qa(l);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var f=xa(i.pendingLanes);if(f!==0){var g=i;for(g.pendingLanes|=2,g.entangledLanes|=2;f;){var w=1<<31-Rt(f);g.entanglements[1]|=w,f&=~w}yn(i),(_e&6)===0&&(Ro=tt()+500,Ss(0))}}break;case 31:case 13:g=Ta(i,2),g!==null&&zt(g,i,2),_o(),Uc(i,2)}if(i=Hc(a),i===null&&Ac(e,t,a,Po,n),i===l)break;l=i}l!==null&&a.stopPropagation()}else Ac(e,t,a,null,n)}}function Hc(e){return e=Gi(e),qc(e)}var Po=null;function qc(e){if(Po=null,e=Xa(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=y(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Po=e,null}function Oh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Oi()){case mn:return 2;case zi:return 8;case ke:case ne:return 32;case nt:return 268435456;default:return 32}default:return 32}}var Gc=!1,fa=null,da=null,ma=null,Ds=new Map,Ns=new Map,ha=[],nv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function zh(e,t){switch(e){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":da=null;break;case"mouseover":case"mouseout":ma=null;break;case"pointerover":case"pointerout":Ds.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ns.delete(t.pointerId)}}function Os(e,t,n,a,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[l]},t!==null&&(t=Qa(t),t!==null&&Dh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function av(e,t,n,a,l){switch(t){case"focusin":return fa=Os(fa,e,t,n,a,l),!0;case"dragenter":return da=Os(da,e,t,n,a,l),!0;case"mouseover":return ma=Os(ma,e,t,n,a,l),!0;case"pointerover":var i=l.pointerId;return Ds.set(i,Os(Ds.get(i)||null,e,t,n,a,l)),!0;case"gotpointercapture":return i=l.pointerId,Ns.set(i,Os(Ns.get(i)||null,e,t,n,a,l)),!0}return!1}function jh(e){var t=Xa(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,Xu(e.priority,function(){Nh(n)});return}}else if(t===31){if(t=y(n),t!==null){e.blockedOn=t,Xu(e.priority,function(){Nh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Hc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);qi=a,n.target.dispatchEvent(a),qi=null}else return t=Qa(n),t!==null&&Dh(t),e.blockedOn=n,!1;t.shift()}return!0}function Mh(e,t,n){Wo(e)&&n.delete(t)}function lv(){Gc=!1,fa!==null&&Wo(fa)&&(fa=null),da!==null&&Wo(da)&&(da=null),ma!==null&&Wo(ma)&&(ma=null),Ds.forEach(Mh),Ns.forEach(Mh)}function ei(e,t){e.blockedOn===t&&(e.blockedOn=null,Gc||(Gc=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,lv)))}var ti=null;function kh(e){ti!==e&&(ti=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){ti===e&&(ti=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(qc(a||n)===null)continue;break}var i=Qa(n);i!==null&&(e.splice(t,3),t-=3,Hr(i,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Tl(e){function t(w){return ei(w,e)}fa!==null&&ei(fa,e),da!==null&&ei(da,e),ma!==null&&ei(ma,e),Ds.forEach(t),Ns.forEach(t);for(var n=0;n<ha.length;n++){var a=ha[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ha.length&&(n=ha[0],n.blockedOn===null);)jh(n),n.blockedOn===null&&ha.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],i=n[a+1],f=l[At]||null;if(typeof i=="function")f||kh(n);else if(f){var g=null;if(i&&i.hasAttribute("formAction")){if(l=i,f=i[At]||null)g=f.formAction;else if(qc(l)!==null)continue}else g=f.action;typeof g=="function"?n[a+1]=g:(n.splice(a,3),a-=3),kh(n)}}}function Rh(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(f){return l=f})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Yc(e){this._internalRoot=e}ni.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,a=Gt();Eh(n,a,e,t,null,null)},ni.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Eh(e.current,2,null,e,null,null),_o(),t[Va]=null}};function ni(e){this._internalRoot=e}ni.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ha.length&&t!==0&&t<ha[n].priority;n++);ha.splice(n,0,e),n===0&&jh(e)}};var Bh=o.version;if(Bh!=="19.2.4")throw Error(r(527,Bh,"19.2.4"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=b(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var sv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ai=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ai.isDisabled&&ai.supportsFiber)try{Ll=ai.inject(sv),kt=ai}catch{}}return zs.createRoot=function(e,t){if(!u(e))throw Error(r(299));var n=!1,a="",l=Yd,i=Vd,f=Xd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Ch(e,1,!1,null,null,n,a,null,l,i,f,Rh),e[Va]=t.current,Cc(e),new Yc(t)},zs.hydrateRoot=function(e,t,n){if(!u(e))throw Error(r(299));var a=!1,l="",i=Yd,f=Vd,g=Xd,w=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(g=n.onRecoverableError),n.formState!==void 0&&(w=n.formState)),t=Ch(e,1,!0,t,n??null,a,l,w,i,f,g,Rh),t.context=Ah(null),n=t.current,a=Gt(),a=Mi(a),l=Wn(a),l.callback=null,ea(n,l,a),n=a,t.current.lanes=n,ql(t,n),yn(t),e[Va]=t.current,Cc(e),new ni(t)},zs.version="19.2.4",zs}var Vh;function Pv(){if(Vh)return Vc.exports;Vh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),Vc.exports=Iv(),Vc.exports}var Wv=Pv();const e0=kg(Wv),t0="modulepreload",n0=function(s,o){return new URL(s,o).href},Xh={},xn=function(o,c,r){let u=Promise.resolve();if(c&&c.length>0){let b=function(v){return Promise.all(v.map(S=>Promise.resolve(S).then(A=>({status:"fulfilled",value:A}),A=>({status:"rejected",reason:A}))))};const m=document.getElementsByTagName("link"),y=document.querySelector("meta[property=csp-nonce]"),p=y?.nonce||y?.getAttribute("nonce");u=b(c.map(v=>{if(v=n0(v,r),v in Xh)return;Xh[v]=!0;const S=v.endsWith(".css"),A=S?'[rel="stylesheet"]':"";if(r)for(let R=m.length-1;R>=0;R--){const U=m[R];if(U.href===v&&(!S||U.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${v}"]${A}`))return;const N=document.createElement("link");if(N.rel=S?"stylesheet":t0,S||(N.as="script"),N.crossOrigin="",N.href=v,p&&N.setAttribute("nonce",p),document.head.appendChild(N),S)return new Promise((R,U)=>{N.addEventListener("load",R),N.addEventListener("error",()=>U(new Error(`Unable to preload CSS for ${v}`)))})}))}function d(m){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=m,window.dispatchEvent(y),!y.defaultPrevented)throw m}return u.then(m=>{for(const y of m||[])y.status==="rejected"&&d(y.reason);return o().catch(d)})};var Zc={exports:{}},Kc,Qh;function a0(){if(Qh)return Kc;Qh=1,Kc=s;function s(o){return Object.defineProperties(c,{defaultLabel:{value:"",writable:!0},labelPadding:{value:!0,writable:!0},maxLabelLength:{value:0,writable:!0},labelLength:{get(){switch(typeof c.labelPadding){case"boolean":return c.labelPadding?c.maxLabelLength:0;case"number":return c.labelPadding;default:return 0}}}});function c(r){c.maxLabelLength=Math.max(c.maxLabelLength,r.length);const u={};for(const d of o.levels)u[d]=(...m)=>o.logData(m,{level:d,scope:r});return u.log=u.info,u}}return Kc}var Fc,Zh;function l0(){if(Zh)return Fc;Zh=1;class s{constructor({processMessage:c}){this.processMessage=c,this.buffer=[],this.enabled=!1,this.begin=this.begin.bind(this),this.commit=this.commit.bind(this),this.reject=this.reject.bind(this)}addMessage(c){this.buffer.push(c)}begin(){this.enabled=[]}commit(){this.enabled=!1,this.buffer.forEach(c=>this.processMessage(c)),this.buffer=[]}reject(){this.enabled=!1,this.buffer=[]}}return Fc=s,Fc}var Jc,Kh;function s0(){if(Kh)return Jc;Kh=1;const s=a0(),o=l0();class c{static instances={};dependencies={};errorHandler=null;eventLogger=null;functions={};hooks=[];isDev=!1;levels=null;logId=null;scope=null;transports={};variables={};constructor({allowUnknownLevel:u=!1,dependencies:d={},errorHandler:m,eventLogger:y,initializeFn:p,isDev:b=!1,levels:v=["error","warn","info","verbose","debug","silly"],logId:S,transportFactories:A={},variables:N}={}){this.addLevel=this.addLevel.bind(this),this.create=this.create.bind(this),this.initialize=this.initialize.bind(this),this.logData=this.logData.bind(this),this.processMessage=this.processMessage.bind(this),this.allowUnknownLevel=u,this.buffering=new o(this),this.dependencies=d,this.initializeFn=p,this.isDev=b,this.levels=v,this.logId=S,this.scope=s(this),this.transportFactories=A,this.variables=N||{};for(const R of this.levels)this.addLevel(R,!1);this.log=this.info,this.functions.log=this.log,this.errorHandler=m,m?.setOptions({...d,logFn:this.error}),this.eventLogger=y,y?.setOptions({...d,logger:this});for(const[R,U]of Object.entries(A))this.transports[R]=U(this,d);c.instances[S]=this}static getInstance({logId:u}){return this.instances[u]||this.instances.default}addLevel(u,d=this.levels.length){d!==!1&&this.levels.splice(d,0,u),this[u]=(...m)=>this.logData(m,{level:u}),this.functions[u]=this[u]}catchErrors(u){return this.processMessage({data:["log.catchErrors is deprecated. Use log.errorHandler instead"],level:"warn"},{transports:["console"]}),this.errorHandler.startCatching(u)}create(u){return typeof u=="string"&&(u={logId:u}),new c({dependencies:this.dependencies,errorHandler:this.errorHandler,initializeFn:this.initializeFn,isDev:this.isDev,transportFactories:this.transportFactories,variables:{...this.variables},...u})}compareLevels(u,d,m=this.levels){const y=m.indexOf(u),p=m.indexOf(d);return p===-1||y===-1?!0:p<=y}initialize(u={}){this.initializeFn({logger:this,...this.dependencies,...u})}logData(u,d={}){this.buffering.enabled?this.buffering.addMessage({data:u,date:new Date,...d}):this.processMessage({data:u,...d})}processMessage(u,{transports:d=this.transports}={}){if(u.cmd==="errorHandler"){this.errorHandler.handle(u.error,{errorName:u.errorName,processType:"renderer",showDialog:!!u.showDialog});return}let m=u.level;this.allowUnknownLevel||(m=this.levels.includes(u.level)?u.level:"info");const y={date:new Date,logId:this.logId,...u,level:m,variables:{...this.variables,...u.variables}};for(const[p,b]of this.transportEntries(d))if(!(typeof b!="function"||b.level===!1)&&this.compareLevels(b.level,u.level))try{const v=this.hooks.reduce((S,A)=>S&&A(S,b,p),y);v&&b({...v,data:[...v.data]})}catch(v){this.processInternalErrorFn(v)}}processInternalErrorFn(u){}transportEntries(u=this.transports){return(Array.isArray(u)?u:Object.entries(u)).map(m=>{switch(typeof m){case"string":return this.transports[m]?[m,this.transports[m]]:null;case"function":return[m.name,m];default:return Array.isArray(m)?m:null}}).filter(Boolean)}}return Jc=c,Jc}var $c,Fh;function o0(){if(Fh)return $c;Fh=1;const s=console.error;class o{logFn=null;onError=null;showDialog=!1;preventDefault=!0;constructor({logFn:r=null}={}){this.handleError=this.handleError.bind(this),this.handleRejection=this.handleRejection.bind(this),this.startCatching=this.startCatching.bind(this),this.logFn=r}handle(r,{logFn:u=this.logFn,errorName:d="",onError:m=this.onError,showDialog:y=this.showDialog}={}){try{m?.({error:r,errorName:d,processType:"renderer"})!==!1&&u({error:r,errorName:d,showDialog:y})}catch{s(r)}}setOptions({logFn:r,onError:u,preventDefault:d,showDialog:m}){typeof r=="function"&&(this.logFn=r),typeof u=="function"&&(this.onError=u),typeof d=="boolean"&&(this.preventDefault=d),typeof m=="boolean"&&(this.showDialog=m)}startCatching({onError:r,showDialog:u}={}){this.isActive||(this.isActive=!0,this.setOptions({onError:r,showDialog:u}),window.addEventListener("error",d=>{this.preventDefault&&d.preventDefault?.(),this.handleError(d.error||d)}),window.addEventListener("unhandledrejection",d=>{this.preventDefault&&d.preventDefault?.(),this.handleRejection(d.reason||d)}))}handleError(r){this.handle(r,{errorName:"Unhandled"})}handleRejection(r){const u=r instanceof Error?r:new Error(JSON.stringify(r));this.handle(u,{errorName:"Unhandled rejection"})}}return $c=o,$c}var Ic,Jh;function _g(){if(Jh)return Ic;Jh=1,Ic={transform:s};function s({logger:o,message:c,transport:r,initialData:u=c?.data||[],transforms:d=r?.transforms}){return d.reduce((m,y)=>typeof y=="function"?y({data:m,logger:o,message:c,transport:r}):m,u)}return Ic}var Pc,$h;function i0(){if($h)return Pc;$h=1;const{transform:s}=_g();Pc=c;const o={error:console.error,warn:console.warn,info:console.info,verbose:console.info,debug:console.debug,silly:console.debug,log:console.log};function c(u){return Object.assign(d,{format:"{h}:{i}:{s}.{ms}{scope} › {text}",transforms:[r],writeFn({message:{level:m,data:y}}){const p=o[m]||o.info;setTimeout(()=>p(...y))}});function d(m){d.writeFn({message:{...m,data:s({logger:u,message:m,transport:d})}})}}function r({data:u=[],logger:d={},message:m={},transport:y={}}){if(typeof y.format=="function")return y.format({data:u,level:m?.level||"info",logger:d,message:m,transport:y});if(typeof y.format!="string")return u;u.unshift(y.format),typeof u[1]=="string"&&u[1].match(/%[1cdfiOos]/)&&(u=[`${u[0]}${u[1]}`,...u.slice(2)]);const p=m.date||new Date;return u[0]=u[0].replace(/\{(\w+)}/g,(b,v)=>{switch(v){case"level":return m.level;case"logId":return m.logId;case"scope":{const S=m.scope||d.scope?.defaultLabel;return S?` (${S})`:""}case"text":return"";case"y":return p.getFullYear().toString(10);case"m":return(p.getMonth()+1).toString(10).padStart(2,"0");case"d":return p.getDate().toString(10).padStart(2,"0");case"h":return p.getHours().toString(10).padStart(2,"0");case"i":return p.getMinutes().toString(10).padStart(2,"0");case"s":return p.getSeconds().toString(10).padStart(2,"0");case"ms":return p.getMilliseconds().toString(10).padStart(3,"0");case"iso":return p.toISOString();default:return m.variables?.[v]||b}}).trim(),u}return Pc}var Wc,Ih;function r0(){if(Ih)return Wc;Ih=1;const{transform:s}=_g();Wc=c;const o=new Set([Promise,WeakMap,WeakSet]);function c(d){return Object.assign(m,{depth:5,transforms:[u]});function m(y){if(!window.__electronLog){d.processMessage({data:["electron-log: logger isn't initialized in the main process"],level:"error"},{transports:["console"]});return}try{const p=s({initialData:y,logger:d,message:y,transport:m});__electronLog.sendToMain(p)}catch(p){d.transports.console({data:["electronLog.transports.ipc",p,"data:",y.data],level:"error"})}}}function r(d){return Object(d)!==d}function u({data:d,depth:m,seen:y=new WeakSet,transport:p={}}={}){const b=m||p.depth||5;return y.has(d)?"[Circular]":b<1?r(d)?d:Array.isArray(d)?"[Array]":`[${typeof d}]`:["function","symbol"].includes(typeof d)?d.toString():r(d)?d:o.has(d.constructor)?`[${d.constructor.name}]`:Array.isArray(d)?d.map(v=>u({data:v,depth:b-1,seen:y})):d instanceof Date?d.toISOString():d instanceof Error?d.stack:d instanceof Map?new Map(Array.from(d).map(([v,S])=>[u({data:v,depth:b-1,seen:y}),u({data:S,depth:b-1,seen:y})])):d instanceof Set?new Set(Array.from(d).map(v=>u({data:v,depth:b-1,seen:y}))):(y.add(d),Object.fromEntries(Object.entries(d).map(([v,S])=>[v,u({data:S,depth:b-1,seen:y})])))}return Wc}var Ph;function c0(){return Ph||(Ph=1,(function(s){const o=s0(),c=o0(),r=i0(),u=r0();typeof process=="object"&&process.type==="browser"&&console.warn("electron-log/renderer is loaded in the main process. It could cause unexpected behaviour."),s.exports=d(),s.exports.Logger=o,s.exports.default=s.exports;function d(){const m=new o({allowUnknownLevel:!0,errorHandler:new c,initializeFn:()=>{},logId:"default",transportFactories:{console:r,ipc:u},variables:{processType:"renderer"}});return m.errorHandler.setOptions({logFn({error:y,errorName:p,showDialog:b}){m.transports.console({data:[p,y].filter(Boolean),level:"error"}),m.transports.ipc({cmd:"errorHandler",error:{cause:y?.cause,code:y?.code,name:y?.name,message:y?.message,stack:y?.stack},errorName:p,logId:m.logId,showDialog:b})}}),typeof window=="object"&&window.addEventListener("message",y=>{const{cmd:p,logId:b,...v}=y.data||{},S=o.getInstance({logId:b});p==="message"&&S.processMessage(v,{transports:["console"]})}),new Proxy(m,{get(y,p){return typeof y[p]<"u"?y[p]:(...b)=>m.logData(b,{level:p})}})}})(Zc)),Zc.exports}var u0=c0();const Ue=kg(u0),f0=typeof window<"u"&&typeof document<"u",ks=!f0;if(ks){if(process.stdout&&typeof process.stdout.on=="function"&&process.stdout.on("error",s=>{s?.code}),process.stderr&&typeof process.stderr.on=="function"&&process.stderr.on("error",s=>{s?.code}),Ue.transports?.file&&(Ue.transports.file.level="info",Ue.transports.file.maxSize=5*1024*1024,Ue.transports.file.archiveLogFn=s=>{const o=new Date().toISOString().replace(/[:.]/g,"-");return s.toString().replace(/\.log$/,`-${o}.log`)},Ue.transports.file.format="[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}] {text}"),Ue.transports?.console){Ue.transports.console.level="warn";const s=Ue.transports.console.writeFn;typeof s=="function"&&(Ue.transports.console.writeFn=function(...o){try{return s.apply(this,o)}catch(c){if(c?.code==="EPIPE")return;throw c}}),Ue.transports.console.format="[{level}] {text}"}}else Ue.transports?.console&&(Ue.transports.console.level="warn",Ue.transports.console.format="[{h}:{i}:{s}.{ms}] [{level}] {text}"),Ue.transports?.file&&(Ue.transports.file.level=!1);function ya(s){if(s==null)return s;if(typeof s=="string"){let o=s;return o=o.replace(/[A-Z]:\\[^\s"'<>|*?]+/gi,"[REDACTED_PATH]"),o=o.replace(/\\\\[^\s"'<>|*?]+/g,"[REDACTED_PATH]"),o=o.replace(/\/(home|Users|var|tmp|opt)\/[\w\s\-./]+/gi,"[REDACTED_PATH]"),o=o.replace(/(https?:\/\/[^/\s]+)(\/[^\s]*)/gi,"$1/[REDACTED_URL]"),o.length>500&&(o=o.substring(0,500)+"... [TRUNCATED]"),o}if(Array.isArray(s))return s.map(o=>ya(o));if(typeof s=="object"){const o={},c=["apiEndpoint","apiUrl","filePath","documentPath","path","fullPath","token","accessToken","refreshToken","apiKey","password","secret","clientSecret","authorization","bearer","cookie","sessionId","userId","email","username","connectionString","privateKey","credential"];for(const[r,u]of Object.entries(s))c.some(d=>r.toLowerCase().includes(d.toLowerCase()))?o[r]="[REDACTED]":o[r]=ya(u);return o}return s}function Wh(s){const c=ks?Ue.scope(s):null;return{debug(r,...u){},info(r,...u){{const d=u.map(ya),m=ya(r);c?c.info(m,...d):console.info(`[${s}] [INFO] ${m}`,...d)}},warn(r,...u){{const d=u.map(ya),m=ya(r);c?c.warn(m,...d):console.warn(`[${s}] [WARN] ${m}`,...d)}},error(r,...u){const d=u.map(ya),m=ya(r);c?c.error(m,...d):console.error(`[${s}] [ERROR] ${m}`,...d)},verbose(r,...u){},silly(r,...u){}}}const F={debug(s,...o){},info(s,...o){ks?Ue.info(s,...o):console.info(`[INFO] ${s}`,...o)},warn(s,...o){ks?Ue.warn(s,...o):console.warn(`[WARN] ${s}`,...o)},error(s,...o){ks?Ue.error(s,...o):console.error(`[ERROR] ${s}`,...o)},verbose(s,...o){},namespace(s){return Wh(s)},scope(s){return Wh(s)},getLogPath(){return Ue.transports?.file?Ue.transports.file.getFile().path:"Logs not available in renderer"},setLevel(s){Ue.transports?.file&&(Ue.transports.file.level=s),Ue.transports?.console&&(Ue.transports.console.level=s)},setFileLogging(s){Ue.transports?.file&&(Ue.transports.file.level=s?"info":!1)},async clearLogs(){try{if(!Ue.transports?.file?.getFile)throw new Error("File logging not available");const s=await xn(()=>import("./promises-ID_B9S-h.js"),[],import.meta.url),o=await xn(()=>import("./path-BkOl0AGO.js"),[],import.meta.url),c=Ue.transports.file.getFile().path,r=o.dirname(c),u=await s.readdir(r);for(const d of u)d.endsWith(".log")&&await s.unlink(o.join(r,d));Ue.info("Log files cleared")}catch(s){Ue.error("Failed to clear logs:",s)}}},d0={SESSION_STATE:"debug:sessionState"};function eg(s){return typeof window>"u"||typeof localStorage>"u"?!1:localStorage.getItem(s)==="true"}function m0(s,o){const c=F.namespace(o);return{debug:(...r)=>{eg(s)&&c.debug(...r)},info:(...r)=>{eg(s)&&c.info(...r)},warn:(...r)=>{c.warn(...r)},error:(...r)=>{c.error(...r)}}}function nn(s){try{if(!s||typeof s!="string")return F.error("[ColorConvert] Invalid hex color input:",s),"0 0% 50%";if(s=s.replace(/^#/,""),!/^[0-9A-Fa-f]{6}$/.test(s))return F.error("[ColorConvert] Invalid hex format:",s),"0 0% 50%";const o=parseInt(s.substring(0,2),16)/255,c=parseInt(s.substring(2,4),16)/255,r=parseInt(s.substring(4,6),16)/255;if(isNaN(o)||isNaN(c)||isNaN(r))return F.error("[ColorConvert] Failed to parse hex values:",s),"0 0% 50%";const u=Math.max(o,c,r),d=Math.min(o,c,r);let m=0,y=0;const p=(u+d)/2;if(u!==d){const A=u-d;switch(y=p>.5?A/(2-u-d):A/(u+d),u){case o:m=((c-r)/A+(c<r?6:0))/6;break;case c:m=((r-o)/A+2)/6;break;case r:m=((o-c)/A+4)/6;break}}const b=Math.round(m*360),v=Math.round(y*100),S=Math.round(p*100);return isNaN(b)||isNaN(v)||isNaN(S)?(F.error("[ColorConvert] Invalid HSL values calculated from:",s),"0 0% 50%"):`${b} ${v}% ${S}%`}catch(o){return F.error("[ColorConvert] Unexpected error in hexToHSL:",o,"Input:",s),"0 0% 50%"}}function mi(s){try{if(!s||typeof s!="string")return F.error("[ColorConvert] Invalid hex input for luminance:",s),.5;if(s=s.replace(/^#/,""),!/^[0-9A-Fa-f]{6}$/.test(s))return F.error("[ColorConvert] Invalid hex format for luminance:",s),.5;const o=parseInt(s.substring(0,2),16)/255,c=parseInt(s.substring(2,4),16)/255,r=parseInt(s.substring(4,6),16)/255;if(isNaN(o)||isNaN(c)||isNaN(r))return F.error("[ColorConvert] Failed to parse RGB for luminance:",s),.5;const u=b=>b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4),d=u(o),m=u(c),y=u(r),p=.2126*d+.7152*m+.0722*y;return isNaN(p)?(F.error("[ColorConvert] Invalid luminance calculated from:",s),.5):p}catch(o){return F.error("[ColorConvert] Unexpected error in calculateLuminance:",o,"Input:",s),.5}}function li(s){try{return!s||typeof s!="string"?(F.error("[ColorConvert] Invalid background color for contrast:",s),"#000000"):mi(s)>.5?"#000000":"#FFFFFF"}catch(o){return F.error("[ColorConvert] Unexpected error in getContrastTextColor:",o,"Input:",s),"#000000"}}function h0(s){try{return!s||typeof s!="string"?(F.error("[ColorConvert] Invalid primary text color for secondary:",s),"#4D4D4D"):s.toUpperCase()==="#FFFFFF"||s.toUpperCase()==="FFFFFF"?"#D9D9D9":"#4D4D4D"}catch(o){return F.error("[ColorConvert] Unexpected error in getSecondaryTextColor:",o,"Input:",s),"#4D4D4D"}}function g0(s){return s=s.replace(/^#/,""),{r:parseInt(s.substring(0,2),16),g:parseInt(s.substring(2,4),16),b:parseInt(s.substring(4,6),16)}}function p0(s,o,c){const r=u=>Math.max(0,Math.min(255,Math.round(u)));return`#${r(s).toString(16).padStart(2,"0")}${r(o).toString(16).padStart(2,"0")}${r(c).toString(16).padStart(2,"0")}`}function y0(s,o,c){const{r,g:u,b:d}=g0(s),m=c==="darken"?0:255;return p0(r+(m-r)*o,u+(m-u)*o,d+(m-d)*o)}function tg(s,o){const c=mi(s),r=mi(o),u=Math.max(c,r),d=Math.min(c,r);return(u+.05)/(d+.05)}function b0(s,o){try{if(!s||!o)return F.error("[ColorConvert] Invalid inputs for ensureReadablePrimary:",{primaryHex:s,backgroundHex:o}),s||"#3B82F6";if(tg(s,o)>=3)return s;const r=mi(o),u=r>.5?"darken":"lighten";for(let d=.05;d<=1;d+=.05){const m=y0(s,d,u);if(tg(m,o)>=3)return m}return r>.5?"#000000":"#FFFFFF"}catch(c){return F.error("[ColorConvert] Error in ensureReadablePrimary:",c),s||"#3B82F6"}}const Ug=x.createContext(void 0);function v0({children:s}){const o=F.namespace("ThemeContext"),[c,r]=x.useState(()=>localStorage.getItem("theme")||"system"),[u,d]=x.useState(()=>localStorage.getItem("accentColor")||"blue"),[m,y]=x.useState(()=>localStorage.getItem("customAccentColor")||"#8b5cf6"),[p,b]=x.useState(()=>localStorage.getItem("customPrimaryColor")||"#3b82f6"),[v,S]=x.useState(()=>localStorage.getItem("customBackgroundColor")||"#ffffff"),[A,N]=x.useState(()=>localStorage.getItem("customForegroundColor")||"#020817"),[R,U]=x.useState(()=>localStorage.getItem("customHeaderColor")||"#f8fafc"),[E,q]=x.useState(()=>localStorage.getItem("customSidebarColor")||"#ffffff"),[G,V]=x.useState(()=>localStorage.getItem("customBorderColor")||"#e2e8f0"),[X,j]=x.useState(()=>localStorage.getItem("useCustomColors")==="true"),[I,ee]=x.useState(()=>{const D=localStorage.getItem("fontSize");return D?parseInt(D):15}),[W,re]=x.useState(()=>localStorage.getItem("fontFamily")||"system-ui"),[Ae,de]=x.useState(()=>localStorage.getItem("fontWeight")||"400"),[ye,Me]=x.useState(()=>localStorage.getItem("fontStyle")||"normal"),[xe,ie]=x.useState(()=>{const D=localStorage.getItem("letterSpacing");return D?parseFloat(D):0}),[M,$]=x.useState(()=>{const D=localStorage.getItem("lineHeight");return D?parseFloat(D):1.5}),[_,me]=x.useState(()=>localStorage.getItem("density")||"comfortable"),[ge,Qe]=x.useState(()=>localStorage.getItem("animations")!=="false"),[Ee,fe]=x.useState(()=>localStorage.getItem("blur")!=="false"),[be,Ie]=x.useState(()=>{const D=localStorage.getItem("reduceMotion");return D===null?window.matchMedia("(prefers-reduced-motion: reduce)").matches:D==="true"}),[Q,L]=x.useState("light");return x.useEffect(()=>{const D=window.document.documentElement,K=()=>{let J;c==="system"?J=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":J=c,D.classList.remove("light","dark"),D.classList.add(J),L(J),o.info("Theme applied",{theme:c,effectiveTheme:J})};if(K(),localStorage.setItem("theme",c),c==="system"){const J=window.matchMedia("(prefers-color-scheme: dark)"),te=()=>K();return J.addEventListener("change",te),()=>J.removeEventListener("change",te)}},[c,o]),x.useEffect(()=>{const D=window.document.documentElement;if(u==="custom"){D.setAttribute("data-accent","custom");const K=nn(m);D.style.setProperty("--custom-accent",K),localStorage.setItem("customAccentColor",m),o.info("Custom accent color applied",{customAccentColor:m})}else u!=="blue"?(D.setAttribute("data-accent",u),D.style.removeProperty("--custom-accent"),o.info("Preset accent color applied",{accentColor:u})):(D.removeAttribute("data-accent"),D.style.removeProperty("--custom-accent"),o.info("Default accent color applied",{accentColor:"blue"}));localStorage.setItem("accentColor",u)},[u,m,o]),x.useEffect(()=>{const D=window.document.documentElement;if(X)try{D.setAttribute("data-custom-colors","true"),o.debug("[ThemeContext] Applying custom colors...");const K=li(v),J=li(R),te=li(E),P=li(p),ce=h0(K),we=b0(p,v);D.style.setProperty("--custom-primary",nn(p)),D.style.setProperty("--custom-primary-text",nn(P)),D.style.setProperty("--custom-primary-readable",nn(we)),D.style.setProperty("--custom-background",nn(v)),D.style.setProperty("--custom-foreground",nn(K)),D.style.setProperty("--custom-header",nn(R)),D.style.setProperty("--custom-header-text",nn(J)),D.style.setProperty("--custom-sidebar",nn(E)),D.style.setProperty("--custom-sidebar-text",nn(te)),D.style.setProperty("--custom-border",nn(G)),D.style.setProperty("--custom-secondary-font",nn(ce)),o.debug("[ThemeContext] Custom colors applied successfully")}catch(K){o.error("[ThemeContext] Error applying custom colors:",K),o.error("[ThemeContext] Color values:",{customPrimaryColor:p,customBackgroundColor:v,customHeaderColor:R,customSidebarColor:E,customBorderColor:G}),j(!1),D.removeAttribute("data-custom-colors")}else D.removeAttribute("data-custom-colors"),D.style.removeProperty("--custom-primary"),D.style.removeProperty("--custom-primary-text"),D.style.removeProperty("--custom-primary-readable"),D.style.removeProperty("--custom-background"),D.style.removeProperty("--custom-foreground"),D.style.removeProperty("--custom-header"),D.style.removeProperty("--custom-header-text"),D.style.removeProperty("--custom-sidebar"),D.style.removeProperty("--custom-sidebar-text"),D.style.removeProperty("--custom-border"),D.style.removeProperty("--custom-secondary-font");localStorage.setItem("useCustomColors",String(X)),X&&(localStorage.setItem("customPrimaryColor",p),localStorage.setItem("customBackgroundColor",v),localStorage.setItem("customHeaderColor",R),localStorage.setItem("customSidebarColor",E),localStorage.setItem("customBorderColor",G))},[X,p,v,R,E,G]),x.useEffect(()=>{window.document.documentElement.setAttribute("data-density",_),localStorage.setItem("density",_),o.info("Density mode changed",{density:_})},[_,o]),x.useEffect(()=>{const D=window.document.documentElement;ge?D.classList.remove("no-animations"):D.classList.add("no-animations"),localStorage.setItem("animations",String(ge)),o.debug("Animations toggled",{enabled:ge})},[ge,o]),x.useEffect(()=>{const D=window.document.documentElement;Ee?D.classList.remove("no-blur"):D.classList.add("no-blur"),localStorage.setItem("blur",String(Ee)),o.debug("Blur effects toggled",{enabled:Ee})},[Ee,o]),x.useEffect(()=>{const D=window.document.documentElement;be?D.classList.add("reduce-motion"):D.classList.remove("reduce-motion"),localStorage.setItem("reduceMotion",String(be)),o.debug("Reduce motion toggled",{enabled:be})},[be,o]),x.useEffect(()=>{const D=requestAnimationFrame(()=>{const K=window.document.documentElement;K.style.setProperty("--custom-font-size",`${I}px`),K.style.setProperty("--custom-font-family",W),K.style.setProperty("--custom-font-weight",Ae),K.style.setProperty("--custom-font-style",ye),K.style.setProperty("--custom-letter-spacing",`${xe}em`),K.style.setProperty("--custom-line-height",String(M)),localStorage.setItem("fontSize",String(I)),localStorage.setItem("fontFamily",W),localStorage.setItem("fontWeight",Ae),localStorage.setItem("fontStyle",ye),localStorage.setItem("letterSpacing",String(xe)),localStorage.setItem("lineHeight",String(M))});return()=>cancelAnimationFrame(D)},[I,W,Ae,ye,xe,M]),h.jsx(Ug.Provider,{value:{theme:c,setTheme:r,resolvedTheme:Q,accentColor:u,setAccentColor:d,customAccentColor:m,setCustomAccentColor:y,customPrimaryColor:p,setCustomPrimaryColor:b,customBackgroundColor:v,setCustomBackgroundColor:S,customHeaderColor:R,setCustomHeaderColor:U,customSidebarColor:E,setCustomSidebarColor:q,customBorderColor:G,setCustomBorderColor:V,useCustomColors:X,setUseCustomColors:j,density:_,setDensity:me,animations:ge,setAnimations:Qe,blur:Ee,setBlur:fe,reduceMotion:be,setReduceMotion:Ie,fontSize:I,setFontSize:ee,fontFamily:W,setFontFamily:re,fontWeight:Ae,setFontWeight:de,fontStyle:ye,setFontStyle:Me,letterSpacing:xe,setLetterSpacing:ie,lineHeight:M,setLineHeight:$},children:s})}function Lg(){const s=x.useContext(Ug);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s}const S0="DocHub_Snapshots",x0=1,it="documentSnapshots",w0=10080*60*1e3,si=100*1024*1024;class C0{db=null;isConnecting=!1;connectionPromise=null;async getConnection(){if(this.db)try{const o=this.db.objectStoreNames;return this.db}catch{this.db=null}if(this.isConnecting&&this.connectionPromise)return this.connectionPromise;this.isConnecting=!0,this.connectionPromise=this.createConnection();try{return this.db=await this.connectionPromise,this.db}finally{this.isConnecting=!1,this.connectionPromise=null}}createConnection(){return new Promise((o,c)=>{const r=indexedDB.open(S0,x0);r.onerror=()=>{F.error("[SnapshotDB] Connection failed:",r.error),c(new Error(`Failed to open snapshot database: ${r.error?.message}`))},r.onsuccess=()=>{const u=r.result;F.info("[SnapshotDB] Connection established"),u.onerror=d=>{F.error("[SnapshotDB] Database error:",d)},u.onclose=()=>{F.info("[SnapshotDB] Connection closed"),this.db=null},o(u)},r.onupgradeneeded=u=>{const d=u.target.result;if(!d.objectStoreNames.contains(it)){const m=d.createObjectStore(it,{keyPath:["sessionId","documentId"]});m.createIndex("sessionId","sessionId",{unique:!1}),m.createIndex("timestamp","timestamp",{unique:!1}),F.info("[SnapshotDB] Created document snapshots store")}}})}close(){this.db&&(this.db.close(),this.db=null)}}const bn=new C0;typeof window<"u"&&window.addEventListener("beforeunload",()=>{bn.close()});class A0{static async captureSnapshot(o,c,r,u,d=[]){try{const m=await bn.getConnection(),y={documentId:r,sessionId:c,timestamp:new Date().toISOString(),buffer:o,textContent:u,hyperlinkSnapshot:d};return new Promise((p,b)=>{const A=m.transaction([it],"readwrite").objectStore(it).put(y);A.onsuccess=()=>{F.info(`[SnapshotDB] Captured snapshot for document ${r} (${u.length} paragraphs, ${(o.byteLength/1024).toFixed(1)}KB)`),p()},A.onerror=()=>{F.error("[SnapshotDB] Failed to capture snapshot:",A.error),b(new Error(`Failed to capture snapshot: ${A.error?.message}`))}})}catch(m){throw F.error("[SnapshotDB] Error capturing snapshot:",m),m}}static async getSnapshot(o,c){try{const r=await bn.getConnection();return new Promise((u,d)=>{const p=r.transaction([it],"readonly").objectStore(it).get([o,c]);p.onsuccess=()=>{const b=p.result;if(b){const v={...b,timestamp:new Date(b.timestamp)};u(v)}else u(null)},p.onerror=()=>{F.error("[SnapshotDB] Failed to get snapshot:",p.error),d(new Error(`Failed to get snapshot: ${p.error?.message}`))}})}catch(r){return F.error("[SnapshotDB] Error getting snapshot:",r),null}}static async deleteSnapshot(o,c){try{const r=await bn.getConnection();return new Promise((u,d)=>{const p=r.transaction([it],"readwrite").objectStore(it).delete([o,c]);p.onsuccess=()=>{F.info(`[SnapshotDB] Deleted snapshot for document ${c}`),u()},p.onerror=()=>{F.error("[SnapshotDB] Failed to delete snapshot:",p.error),d(new Error(`Failed to delete snapshot: ${p.error?.message}`))}})}catch(r){throw F.error("[SnapshotDB] Error deleting snapshot:",r),r}}static async cleanupSessionSnapshots(o){try{const c=await bn.getConnection();return new Promise((r,u)=>{const m=c.transaction([it],"readwrite").objectStore(it),p=m.index("sessionId").getAllKeys(o);p.onsuccess=()=>{const b=p.result;let v=0;if(b.length===0){r(0);return}for(const S of b){const A=m.delete(S);A.onsuccess=()=>{v++,v===b.length&&(F.info(`[SnapshotDB] Cleaned up ${v} snapshots for session ${o}`),r(v))}}},p.onerror=()=>{u(new Error(`Failed to cleanup session snapshots: ${p.error?.message}`))}})}catch(c){return F.error("[SnapshotDB] Error cleaning up session snapshots:",c),0}}static async cleanupOldSnapshots(){try{const o=await bn.getConnection(),c=new Date(Date.now()-w0).toISOString();return new Promise((r,u)=>{const m=o.transaction([it],"readwrite").objectStore(it),y=m.index("timestamp"),p=IDBKeyRange.upperBound(c),b=y.getAllKeys(p);b.onsuccess=()=>{const v=b.result;let S=0;if(v.length===0){r(0);return}for(const A of v){const N=m.delete(A);N.onsuccess=()=>{S++,S===v.length&&(F.info(`[SnapshotDB] Cleaned up ${S} old snapshots`),r(S))}}},b.onerror=()=>{u(new Error(`Failed to cleanup old snapshots: ${b.error?.message}`))}})}catch(o){return F.error("[SnapshotDB] Error cleaning up old snapshots:",o),0}}static async getSessionSnapshots(o){try{const c=await bn.getConnection();return new Promise((r,u)=>{const p=c.transaction([it],"readonly").objectStore(it).index("sessionId").getAll(o);p.onsuccess=()=>{const v=p.result.map(S=>({...S,timestamp:new Date(S.timestamp)}));r(v)},p.onerror=()=>{u(new Error(`Failed to get session snapshots: ${p.error?.message}`))}})}catch(c){return F.error("[SnapshotDB] Error getting session snapshots:",c),[]}}static async hasSnapshot(o,c){return await this.getSnapshot(o,c)!==null}static async calculateStorageSize(){try{const o=await bn.getConnection();return new Promise((c,r)=>{const m=o.transaction([it],"readonly").objectStore(it).getAll();m.onsuccess=()=>{const y=m.result;let p=0;for(const b of y)p+=b.buffer.byteLength,p+=JSON.stringify({...b,buffer:null}).length*2;c(p)},m.onerror=()=>{r(new Error(`Failed to calculate storage size: ${m.error?.message}`))}})}catch(o){return F.error("[SnapshotDB] Error calculating storage size:",o),0}}static async getOldestSnapshots(o){try{const c=await bn.getConnection();return new Promise((r,u)=>{const p=c.transaction([it],"readonly").objectStore(it).index("timestamp").getAll();p.onsuccess=()=>{const v=p.result.sort((S,A)=>new Date(S.timestamp).getTime()-new Date(A.timestamp).getTime()).slice(0,o);r(v)},p.onerror=()=>{u(new Error(`Failed to get oldest snapshots: ${p.error?.message}`))}})}catch(c){return F.error("[SnapshotDB] Error getting oldest snapshots:",c),[]}}static async deleteSnapshots(o){if(o.length===0)return 0;try{const c=await bn.getConnection();let r=0;return new Promise((u,d)=>{const m=c.transaction([it],"readwrite"),y=m.objectStore(it);for(const{sessionId:p,documentId:b}of o){const v=y.delete([p,b]);v.onsuccess=()=>{r++}}m.oncomplete=()=>{F.info(`[SnapshotDB] Deleted ${r} snapshots`),u(r)},m.onerror=()=>{d(new Error(`Failed to delete snapshots: ${m.error?.message}`))}})}catch(c){return F.error("[SnapshotDB] Error deleting snapshots:",c),0}}static async ensureStorageLimit(){const o=await this.calculateStorageSize();if(o>si){F.warn(`[SnapshotDB] Storage ${(o/1024/1024).toFixed(2)}MB exceeds limit ${(si/1024/1024).toFixed(0)}MB`),await this.cleanupOldSnapshots();let c=await this.calculateStorageSize(),r=0;const u=10;for(;c>si&&r<u;){F.warn("[SnapshotDB] Still over limit, deleting oldest snapshots");const d=await this.getOldestSnapshots(5);if(d.length===0){F.warn("[SnapshotDB] No more snapshots to delete");break}const m=d.map(p=>({sessionId:p.sessionId,documentId:p.documentId})),y=await this.deleteSnapshots(m);F.info(`[SnapshotDB] Deleted ${y} oldest snapshots to free space`),c=await this.calculateStorageSize(),F.debug(`[SnapshotDB] Size after cleanup: ${(c/1024/1024).toFixed(2)}MB`),r++}r>=u?F.warn("[SnapshotDB] Max cleanup iterations reached"):c<=si&&F.info("[SnapshotDB] Storage now within limits")}}}function E0(){return typeof window<"u"&&typeof window.electronAPI<"u"}function eu(s){if(!E0())throw new Error(`Electron API not available - ${s} requires running in the Electron desktop application.`);return window.electronAPI}function qa(s,o,c){if(!s)return o;try{return JSON.parse(s)}catch(r){const u=F.namespace("SafeJsonParse");return u.error(`Failed to parse JSON${c?` in ${c}`:""}:`,r instanceof Error?r.message:"Unknown error"),u.debug("Invalid JSON string:",s.substring(0,100)),o}}function jt(s,o,c){try{return JSON.stringify(s,null,o)}catch(r){return F.namespace("SafeJsonStringify").error(`Failed to stringify JSON${c?` in ${c}`:""}:`,r instanceof Error?r.message:"Unknown error"),null}}const T0="DocHubDB",ng=1,ln="sessions";class D0{db=null;isConnecting=!1;connectionPromise=null;lastError=null;reconnectAttempts=0;MAX_RECONNECT_ATTEMPTS=3;RECONNECT_DELAY=1e3;async getConnection(){if(this.db&&this.db.objectStoreNames.length>0)try{const o=this.db.objectStoreNames;return this.db}catch{F.warn("[IndexedDB Pool] Connection invalid, reconnecting..."),this.db=null}if(this.isConnecting&&this.connectionPromise)return this.connectionPromise;this.isConnecting=!0,this.connectionPromise=this.createConnection();try{return this.db=await this.connectionPromise,this.reconnectAttempts=0,this.db}finally{this.isConnecting=!1,this.connectionPromise=null}}createConnection(){return new Promise((o,c)=>{const r=indexedDB.open(T0,ng);r.onerror=()=>{const u=new Error(`Failed to open database: ${r.error?.message||"Unknown error"}`);this.lastError=u,F.error("[IndexedDB Pool] Connection failed:",u),c(u)},r.onsuccess=()=>{const u=r.result;F.info("[IndexedDB Pool] Connection established"),u.onerror=d=>{F.error("[IndexedDB Pool] Database error:",d),this.handleConnectionError()},u.onclose=()=>{F.info("[IndexedDB Pool] Connection closed"),this.db=null},o(u)},r.onupgradeneeded=u=>{const d=u.target.result;if(!d.objectStoreNames.contains(ln)){const m=d.createObjectStore(ln,{keyPath:"id"});m.createIndex("status","status",{unique:!1}),m.createIndex("lastModified","lastModified",{unique:!1}),m.createIndex("createdAt","createdAt",{unique:!1}),F.info("[IndexedDB Pool] Database upgraded to version",ng)}},r.onblocked=()=>{F.warn("[IndexedDB Pool] Database upgrade blocked by other tabs")}})}async handleConnectionError(){if(this.db=null,this.reconnectAttempts<this.MAX_RECONNECT_ATTEMPTS){this.reconnectAttempts++,F.info(`[IndexedDB Pool] Attempting reconnection (${this.reconnectAttempts}/${this.MAX_RECONNECT_ATTEMPTS})...`),await new Promise(o=>setTimeout(o,this.RECONNECT_DELAY*this.reconnectAttempts));try{await this.getConnection(),F.info("[IndexedDB Pool] Reconnection successful")}catch(o){F.error("[IndexedDB Pool] Reconnection failed:",o)}}else F.error("[IndexedDB Pool] Max reconnection attempts reached")}close(){this.db&&(F.info("[IndexedDB Pool] Closing connection"),this.db.close(),this.db=null)}getStats(){return{connected:this.db!==null,reconnectAttempts:this.reconnectAttempts,lastError:this.lastError}}}const kl=new D0;class N0{db=null;isConnecting=!1;connectionPromise=null;lastError=null;reconnectAttempts=0;MAX_RECONNECT_ATTEMPTS=3;RECONNECT_DELAY=1e3;DB_NAME="DocHub_GlobalStats";DB_VERSION=1;STATS_STORE="stats";async getConnection(){if(this.db&&this.db.objectStoreNames.length>0)try{const o=this.db.objectStoreNames;return this.db}catch{F.warn("[GlobalStats Pool] Connection invalid, reconnecting..."),this.db=null}if(this.isConnecting&&this.connectionPromise)return this.connectionPromise;this.isConnecting=!0,this.connectionPromise=this.createConnection();try{return this.db=await this.connectionPromise,this.reconnectAttempts=0,this.db}finally{this.isConnecting=!1,this.connectionPromise=null}}createConnection(){return new Promise((o,c)=>{const r=indexedDB.open(this.DB_NAME,this.DB_VERSION);r.onerror=()=>{const u=new Error(`Failed to open GlobalStats database: ${r.error?.message||"Unknown error"}`);this.lastError=u,F.error("[GlobalStats Pool] Connection failed:",u),c(u)},r.onsuccess=()=>{const u=r.result;F.info("[GlobalStats Pool] Connection established"),u.onerror=d=>{F.error("[GlobalStats Pool] Database error:",d),this.handleConnectionError()},u.onclose=()=>{F.info("[GlobalStats Pool] Connection closed"),this.db=null},o(u)},r.onupgradeneeded=u=>{const d=u.target.result;d.objectStoreNames.contains(this.STATS_STORE)||(d.createObjectStore(this.STATS_STORE),F.info("[GlobalStats Pool] Database upgraded to version",this.DB_VERSION))},r.onblocked=()=>{F.warn("[GlobalStats Pool] Database upgrade blocked by other tabs")}})}async handleConnectionError(){if(this.db=null,this.reconnectAttempts<this.MAX_RECONNECT_ATTEMPTS){this.reconnectAttempts++,F.info(`[GlobalStats Pool] Attempting reconnection (${this.reconnectAttempts}/${this.MAX_RECONNECT_ATTEMPTS})...`),await new Promise(o=>setTimeout(o,this.RECONNECT_DELAY*this.reconnectAttempts));try{await this.getConnection(),F.info("[GlobalStats Pool] Reconnection successful")}catch(o){F.error("[GlobalStats Pool] Reconnection failed:",o)}}else F.error("[GlobalStats Pool] Max reconnection attempts reached")}close(){this.db&&(F.info("[GlobalStats Pool] Closing connection"),this.db.close(),this.db=null)}getStats(){return{connected:this.db!==null,reconnectAttempts:this.reconnectAttempts,lastError:this.lastError}}}const Tu=new N0;typeof window<"u"&&window.addEventListener("beforeunload",()=>{kl.close(),Tu.close()});async function Rs(s){const o=await kl.getConnection();return new Promise((c,r)=>{const u=o.transaction([ln],"readwrite"),m=u.objectStore(ln).put(s);m.onsuccess=()=>{c()},m.onerror=()=>{m.error?.name==="QuotaExceededError"?(F.error(`[IndexedDB] Quota exceeded for session: ${s.id}`),r(new Error("DATABASE_QUOTA_EXCEEDED"))):r(new Error(`Failed to save session: ${s.id}`))},u.onerror=()=>{u.error?.name==="QuotaExceededError"?(F.error(`[IndexedDB] Transaction quota exceeded for session: ${s.id}`),r(new Error("DATABASE_QUOTA_EXCEEDED"))):r(new Error(`Transaction failed for session: ${s.id}`))}})}async function Du(){const s=await kl.getConnection();return new Promise((o,c)=>{const d=s.transaction([ln],"readonly").objectStore(ln).getAll();d.onsuccess=()=>{o(d.result||[])},d.onerror=()=>{c(new Error("Failed to load sessions"))}})}async function O0(s){const o=await kl.getConnection();return new Promise((c,r)=>{const m=o.transaction([ln],"readwrite").objectStore(ln).delete(s);m.onsuccess=()=>{c()},m.onerror=()=>{r(new Error(`Failed to delete session: ${s}`))}})}async function z0(){try{const s=localStorage.getItem("sessions");if(!s){F.debug("[IndexedDB] No sessions found in localStorage to migrate");return}const o=qa(s,[],"localStorage migration");if(!Array.isArray(o)||o.length===0){F.debug("[IndexedDB] No valid sessions to migrate");return}F.info(`[IndexedDB] Migrating ${o.length} session(s) from localStorage...`);for(const c of o)await Rs(c);F.info("[IndexedDB] Migration completed successfully")}catch(s){throw F.error("[IndexedDB] Migration failed:",s),s}}async function gu(){try{const s=await Du(),o=JSON.stringify(s),r=new Blob([o]).size/(1024*1024);return F.debug(`[IndexedDB] Database size: ${r.toFixed(2)}MB (${s.length} sessions)`),r}catch(s){return F.error("[IndexedDB] Failed to calculate database size:",s),0}}async function Hg(s){const o=await kl.getConnection();return new Promise((c,r)=>{const m=o.transaction([ln],"readonly").objectStore(ln).getAll();m.onsuccess=()=>{const p=(m.result||[]).filter(b=>b.status==="closed"&&b.closedAt).sort((b,v)=>{const S=new Date(b.closedAt).getTime(),A=new Date(v.closedAt).getTime();return S-A}).slice(0,s);c(p)},m.onerror=()=>{r(new Error("Failed to get oldest closed sessions"))}})}async function qg(s){const o=await kl.getConnection();let c=0;return new Promise((r,u)=>{const d=o.transaction([ln],"readwrite"),m=d.objectStore(ln);for(const y of s){const p=m.delete(y);p.onsuccess=()=>{c++}}d.oncomplete=()=>{F.info(`[IndexedDB] Deleted ${c} session(s)`),r(c)},d.onerror=()=>{u(new Error("Failed to delete sessions"))}})}async function j0(s=200){try{const o=await gu();if(o<=s)return;F.warn(`[IndexedDB] Database size (${o.toFixed(2)}MB) exceeds limit (${s}MB)`),F.info("[IndexedDB] Starting cleanup of oldest closed sessions...");let c=0;const r=10;for(;c<r;){const u=await Hg(10);if(u.length===0){F.debug("[IndexedDB] No more closed sessions to delete");break}const d=u.map(y=>y.id);await qg(d);const m=await gu();if(F.debug(`[IndexedDB] Size after cleanup: ${m.toFixed(2)}MB`),m<=s){F.info("[IndexedDB] Database size now under limit");break}c++}c>=r&&F.warn("[IndexedDB] Max cleanup iterations reached, size may still exceed limit")}catch(o){F.error("[IndexedDB] Failed to ensure database size limit:",o)}}function Gg(s,o=100){return s.documents?{...s,documents:s.documents.map(c=>c.processingResult?.changes&&c.processingResult.changes.length>o?{...c,processingResult:{...c.processingResult,changes:c.processingResult.changes.slice(0,o)}}:c)}:s}async function M0(s,o,c=2){let r=0;for(;r<=c;)try{await s();return}catch(u){if(u instanceof Error&&u.message==="DATABASE_QUOTA_EXCEEDED")if(r<c){F.warn(`[IndexedDB] Quota exceeded, attempting cleanup (attempt ${r+1}/${c})`);const d=await Hg(20);if(d.length>0){const m=d.map(y=>y.id);await qg(m),F.info(`[IndexedDB] Deleted ${d.length} session(s) to free up space`)}else{const y=(await Du()).filter(p=>p.status==="active");for(const p of y.slice(0,5)){const b=Gg(p,50);await Rs(b)}F.info("[IndexedDB] Truncated change history in active sessions")}r++}else{const d=await gu(),m=new Error(`DATABASE_QUOTA_EXCEEDED_PERMANENTLY: Database is ${d.toFixed(2)}MB. Please archive old sessions or export data to free up space.`);throw F.error("[IndexedDB] Permanent quota exceeded:",m),m}else throw u}}const hi="stats",Yg="global";async function k0(){try{const s=await Tu.getConnection();return new Promise((o,c)=>{const d=s.transaction([hi],"readonly").objectStore(hi).get(Yg);d.onsuccess=()=>{o(d.result||null)},d.onerror=()=>{c(new Error("Failed to load global stats"))}})}catch(s){throw F.error("[GlobalStats] Failed to load stats:",s),s}}async function fi(s){try{const o=await Tu.getConnection();return new Promise((c,r)=>{const m=o.transaction([hi],"readwrite").objectStore(hi).put(s,Yg);m.onsuccess=()=>{c()},m.onerror=()=>{r(new Error("Failed to save global stats"))}})}catch(o){throw F.error("[GlobalStats] Failed to save stats:",o),o}}async function R0(s){try{await fi(s),F.info("[GlobalStats] Stats reset to default values")}catch(o){throw F.error("[GlobalStats] Failed to reset stats:",o),o}}const an=F.namespace("PathSecurity");function B0(s,o){if(!s||typeof s!="string")return an.warn("Invalid path: empty or not a string"),!1;if(s.includes("\0"))return an.error("Security: Path contains null byte",s),!1;const c=["/../","\\..\\","%2e%2e%2f","%2e%2e%5c","%252e%252e","%c0%ae%c0%ae","0x2e0x2e"],r=s.toLowerCase();for(const b of c)if(r.includes(b))return an.error("Security: Path contains traversal pattern",{path:s,pattern:b}),!1;if(r.startsWith("../")||r.startsWith("..\\"))return an.error("Security: Path starts with parent directory traversal",s),!1;if(r.endsWith("/..")||r.endsWith("\\.."))return an.error("Security: Path ends with parent directory traversal",s),!1;if(!(s.startsWith("/")||s.startsWith("\\")||/^[a-zA-Z]:[\\/]/.test(s)))return an.warn("Security: Path is not absolute",s),!1;if(o&&o.length>0&&!o.some(v=>s.toLowerCase().endsWith(v.toLowerCase())))return an.error("Security: File extension not allowed",{path:s,allowedExtensions:o}),!1;const d=[".docx.exe",".docx.scr",".docx.bat",".docx.cmd",".docx.com",".docx.pif",".docx.vbs",".docx.js"];for(const b of d)if(r.endsWith(b))return an.error("Security: Suspicious double extension detected",{path:s,extension:b}),!1;s.length>260&&an.warn("Path exceeds maximum length (260 characters)",s.length);const m=["CON","PRN","AUX","NUL","COM1","COM2","COM3","COM4","COM5","COM6","COM7","COM8","COM9","LPT1","LPT2","LPT3","LPT4","LPT5","LPT6","LPT7","LPT8","LPT9"],y=s.split(/[\\/]/).pop()?.split(".")[0]?.toUpperCase();if(y&&m.includes(y))return an.error("Security: Windows device name detected",{path:s,deviceName:y}),!1;const p=["file://","http://","https://","ftp://","javascript:","data:"];for(const b of p)if(r.includes(b))return an.error("Security: URL protocol in file path",{path:s,protocol:b}),!1;return an.debug("Path validation passed",s),!0}const Vg=s=>({date:s,documentsProcessed:0,hyperlinksChecked:0,feedbackImported:0,timeSaved:0}),Xg=(s,o)=>({weekStart:s,weekEnd:o,documentsProcessed:0,hyperlinksChecked:0,feedbackImported:0,timeSaved:0,dailyBreakdown:[]}),Qg=s=>({month:s,documentsProcessed:0,hyperlinksChecked:0,feedbackImported:0,timeSaved:0,weeklyBreakdown:[]}),tu=()=>{const s=new Date().toISOString().split("T")[0],o=Zg(new Date).toISOString().split("T")[0],c=_0(new Date).toISOString().split("T")[0],r=s.substring(0,7);return{allTime:{documentsProcessed:0,hyperlinksChecked:0,feedbackImported:0,timeSaved:0},today:Vg(s),currentWeek:Xg(o,c),currentMonth:Qg(r),dailyHistory:[],weeklyHistory:[],monthlyHistory:[],lastUpdated:new Date().toISOString(),version:1}};function Zg(s){const o=new Date(s),c=o.getDay(),r=o.getDate()-c+(c===0?-6:1);return new Date(o.setDate(r))}function _0(s){const o=Zg(s),c=new Date(o);return c.setDate(o.getDate()+6),c}const Kg=x.createContext(void 0),nu=s=>{const o=s.getFullYear(),c=String(s.getMonth()+1).padStart(2,"0"),r=String(s.getDate()).padStart(2,"0");return`${o}-${c}-${r}`},U0=s=>{const o=s.getFullYear(),c=String(s.getMonth()+1).padStart(2,"0");return`${o}-${c}`};function L0({children:s}){const o=F.namespace("GlobalStats"),[c,r]=x.useState(tu()),[u,d]=x.useState(!0),m=x.useRef(null),y=x.useRef(c);x.useEffect(()=>{y.current=c},[c]),x.useEffect(()=>{let j=!0;return(async()=>{try{const ee=await k0();if(!j)return;if(ee){const W=p(ee);r(W),W!==ee&&await fi(W)}else{const W=tu();await fi(W),r(W)}}catch(ee){j&&o.error("Failed to initialize GlobalStats:",ee)}finally{j&&d(!1)}})(),()=>{j=!1,m.current&&clearTimeout(m.current)}},[]);const p=j=>{const I=new Date,ee=nu(I),W=U0(I);let re={...j};re.today.date!==ee&&(re.dailyHistory=[re.today,...re.dailyHistory].slice(0,30),re.today=Vg(ee));const Ae=nu(Jg(I));if(re.currentWeek.weekStart!==Ae){re.weeklyHistory=[re.currentWeek,...re.weeklyHistory].slice(0,12);const de=nu(H0(I));re.currentWeek=Xg(Ae,de)}return re.currentMonth.month!==W&&(re.monthlyHistory=[re.currentMonth,...re.monthlyHistory].slice(0,12),re.currentMonth=Qg(W)),re},b=x.useCallback(async j=>{r(I=>{const ee={...I};j.documentsProcessed&&(ee.allTime.documentsProcessed+=j.documentsProcessed),j.hyperlinksChecked&&(ee.allTime.hyperlinksChecked+=j.hyperlinksChecked),j.feedbackImported&&(ee.allTime.feedbackImported+=j.feedbackImported),j.timeSaved&&(ee.allTime.timeSaved+=j.timeSaved);const W=new Date().toISOString();return ee.allTime.firstActivityDate||(ee.allTime.firstActivityDate=W),ee.allTime.lastActivityDate=W,j.documentsProcessed&&(ee.today.documentsProcessed+=j.documentsProcessed),j.hyperlinksChecked&&(ee.today.hyperlinksChecked+=j.hyperlinksChecked),j.feedbackImported&&(ee.today.feedbackImported+=j.feedbackImported),j.timeSaved&&(ee.today.timeSaved+=j.timeSaved),j.documentsProcessed&&(ee.currentWeek.documentsProcessed+=j.documentsProcessed),j.hyperlinksChecked&&(ee.currentWeek.hyperlinksChecked+=j.hyperlinksChecked),j.feedbackImported&&(ee.currentWeek.feedbackImported+=j.feedbackImported),j.timeSaved&&(ee.currentWeek.timeSaved+=j.timeSaved),j.documentsProcessed&&(ee.currentMonth.documentsProcessed+=j.documentsProcessed),j.hyperlinksChecked&&(ee.currentMonth.hyperlinksChecked+=j.hyperlinksChecked),j.feedbackImported&&(ee.currentMonth.feedbackImported+=j.feedbackImported),j.timeSaved&&(ee.currentMonth.timeSaved+=j.timeSaved),ee.lastUpdated=W,m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{fi(y.current).catch(re=>o.error("Failed to save stats:",re))},1e3),ee})},[o]),v=x.useCallback(()=>c.today,[c]),S=x.useCallback(()=>c.currentWeek,[c]),A=x.useCallback(()=>c.currentMonth,[c]),N=x.useCallback((j=30)=>[c.today,...c.dailyHistory].slice(0,j),[c]),R=x.useCallback((j=12)=>[c.currentWeek,...c.weeklyHistory].slice(0,j),[c]),U=x.useCallback((j=12)=>[c.currentMonth,...c.monthlyHistory].slice(0,j),[c]),E=x.useCallback(()=>{const j=c.dailyHistory[0];return j?{documentsProcessed:c.today.documentsProcessed-j.documentsProcessed,hyperlinksChecked:c.today.hyperlinksChecked-j.hyperlinksChecked,feedbackImported:c.today.feedbackImported-j.feedbackImported,timeSaved:c.today.timeSaved-j.timeSaved}:{documentsProcessed:c.today.documentsProcessed,hyperlinksChecked:c.today.hyperlinksChecked,feedbackImported:c.today.feedbackImported,timeSaved:c.today.timeSaved}},[c]),q=x.useCallback(()=>{const j=c.weeklyHistory[0];return j?{documentsProcessed:c.currentWeek.documentsProcessed-j.documentsProcessed,hyperlinksChecked:c.currentWeek.hyperlinksChecked-j.hyperlinksChecked,feedbackImported:c.currentWeek.feedbackImported-j.feedbackImported,timeSaved:c.currentWeek.timeSaved-j.timeSaved}:{documentsProcessed:c.currentWeek.documentsProcessed,hyperlinksChecked:c.currentWeek.hyperlinksChecked,feedbackImported:c.currentWeek.feedbackImported,timeSaved:c.currentWeek.timeSaved}},[c]),G=x.useCallback(()=>{const j=c.monthlyHistory[0];return j?{documentsProcessed:c.currentMonth.documentsProcessed-j.documentsProcessed,hyperlinksChecked:c.currentMonth.hyperlinksChecked-j.hyperlinksChecked,feedbackImported:c.currentMonth.feedbackImported-j.feedbackImported,timeSaved:c.currentMonth.timeSaved-j.timeSaved}:{documentsProcessed:c.currentMonth.documentsProcessed,hyperlinksChecked:c.currentMonth.hyperlinksChecked,feedbackImported:c.currentMonth.feedbackImported,timeSaved:c.currentMonth.timeSaved}},[c]),V=x.useCallback(async()=>{const j=tu();r(j),await R0(j)},[]),X=x.useMemo(()=>({stats:c,updateStats:b,getTodayStats:v,getWeekStats:S,getMonthStats:A,getDailyHistory:N,getWeeklyHistory:R,getMonthlyHistory:U,getTodayChange:E,getWeekChange:q,getMonthChange:G,resetAllStats:V,isLoading:u}),[c,b,v,S,A,N,R,U,E,q,G,V,u]);return h.jsx(Kg.Provider,{value:X,children:s})}function Fg(){const s=x.useContext(Kg);if(s===void 0)throw new Error("useGlobalStats must be used within a GlobalStatsProvider");return s}function Jg(s){const o=new Date(s),c=o.getDay(),r=o.getDate()-c+(c===0?-6:1);return new Date(o.setDate(r))}function H0(s){const o=Jg(s),c=new Date(o);return c.setDate(o.getDate()+6),c}const $g=x.createContext(void 0),q0=(s,o,c)=>Promise.race([s,new Promise((r,u)=>setTimeout(()=>u(new Error(`${c} timed out after ${o}ms`)),o))]),ag=3e5,au=101,lu=60,pu=()=>({enabled:!0,indentationLevels:[{level:0,symbolIndent:.25,textIndent:.5,bulletChar:"•",numberedFormat:"1."},{level:1,symbolIndent:.75,textIndent:1,bulletChar:"○",numberedFormat:"a."},{level:2,symbolIndent:1.25,textIndent:1.5,bulletChar:"•",numberedFormat:"i."},{level:3,symbolIndent:1.75,textIndent:2,bulletChar:"○",numberedFormat:"A."},{level:4,symbolIndent:2.25,textIndent:2.5,bulletChar:"•",numberedFormat:"I."}]}),yu=[{id:"header1",name:"Heading 1",fontSize:18,fontFamily:"Verdana",bold:!0,italic:!1,underline:!1,alignment:"left",spaceBefore:0,spaceAfter:12,lineSpacing:1,color:"#000000"},{id:"header2",name:"Heading 2",fontSize:14,fontFamily:"Verdana",bold:!0,italic:!1,underline:!1,alignment:"left",spaceBefore:6,spaceAfter:6,lineSpacing:1,color:"#000000"},{id:"header3",name:"Heading 3",fontSize:12,fontFamily:"Verdana",bold:!0,italic:!1,underline:!1,alignment:"left",spaceBefore:3,spaceAfter:3,lineSpacing:1,color:"#000000"},{id:"normal",name:"Normal",fontSize:12,fontFamily:"Verdana",bold:!1,italic:!1,underline:!1,preserveBold:!0,preserveItalic:!1,preserveUnderline:!1,preserveCenterAlignment:!0,alignment:"left",spaceBefore:3,spaceAfter:3,lineSpacing:1,color:"#000000",noSpaceBetweenSame:!1},{id:"listParagraph",name:"List Paragraph",fontSize:12,fontFamily:"Verdana",bold:!1,italic:!1,underline:!1,preserveBold:!0,preserveItalic:!1,preserveUnderline:!1,alignment:"left",spaceBefore:0,spaceAfter:6,lineSpacing:1,color:"#000000",noSpaceBetweenSame:!0}],oi={validateUrls:!0,createBackup:!0,processInternalLinks:!0,processExternalLinks:!0,autoAcceptRevisions:!1,enabledOperations:["remove-italics","normalize-dashes","replace-outdated-titles","validate-document-styles","update-top-hyperlinks","update-toc-hyperlinks","force-remove-heading1-toc","fix-internal-hyperlinks","fix-content-ids","center-border-images","remove-whitespace","remove-paragraph-lines","remove-headers-footers","add-document-warning","validate-header2-tables","set-landscape-margins","list-indentation","bullet-uniformity","normalize-table-lists","smart-tables","adjust-table-padding","standardize-table-borders","correct-misapplied-styles"]},lg={header2Shading:"#BFBFBF",otherShading:"#DFDFDF",imageBorderWidth:1,padding1x1Top:0,padding1x1Bottom:0,padding1x1Left:.08,padding1x1Right:.08,paddingOtherTop:0,paddingOtherBottom:0,paddingOtherLeft:.08,paddingOtherRight:.08,cellBorderThickness:.5},Ig="dochub_custom_defaults",G0=()=>{try{const s=localStorage.getItem(Ig);if(!s)return null;const o=qa(s,null,"loadCustomDefaults");return!o||!o.styles&&!o.listBulletSettings&&!o.processingOptions&&!o.tableShadingSettings?null:o}catch(s){return F.warn("[SessionContext] Failed to load custom defaults:",s),null}},sg=s=>!s.listBulletSettings||!s.listBulletSettings.indentationLevels||s.listBulletSettings.indentationLevels.length===0?{...s,listBulletSettings:pu()}:s,og=s=>!s.styles||!Array.isArray(s.styles)||s.styles.length===0?{...s,styles:[...yu]}:s,Y0=s=>{const o=["remove-italics","normalize-dashes","validate-document-styles","replace-outdated-titles","update-top-hyperlinks","update-toc-hyperlinks","force-remove-heading1-toc","fix-internal-hyperlinks","fix-content-ids","center-border-images","remove-whitespace","remove-paragraph-lines","remove-headers-footers","add-document-warning","validate-header2-tables","set-landscape-margins","list-indentation","bullet-uniformity","normalize-table-lists","smart-tables","adjust-table-padding","standardize-table-borders","correct-misapplied-styles"],c=s.processingOptions?.enabledOperations||[],r=o.filter(u=>!c.includes(u));return r.length===0?s:{...s,processingOptions:{validateUrls:s.processingOptions?.validateUrls??!0,createBackup:s.processingOptions?.createBackup??!0,processInternalLinks:s.processingOptions?.processInternalLinks??!0,processExternalLinks:s.processingOptions?.processExternalLinks??!0,...s.processingOptions,enabledOperations:[...c,...r]}}};function V0({children:s}){const o=F.namespace("SessionContext"),c=m0(d0.SESSION_STATE,"SessionState"),[r,u]=x.useState([]),[d,m]=x.useState([]),[y,p]=x.useState(null),{updateStats:b}=Fg(),v=x.useRef(null),S=x.useRef(r),A=x.useRef(d),N=x.useRef(!1),R=x.useCallback(async()=>{if(N.current){o.warn("[Session] loadSessionsFromStorage called but already loaded - skipping to prevent race condition");return}N.current=!0;try{const Q=localStorage.getItem("sessions_emergency_backup");if(Q){o.warn("[Session] Found emergency backup - attempting recovery...");try{const J=qa(Q,null,"SessionContext.emergencyRecover");if(J&&J.sessions&&J.timestamp){const te=Date.now()-J.timestamp,P=Math.floor(te/6e4);if(o.info(`[Session] Emergency backup is ${P} minutes old`),te<300*1e3){o.info(`[Session] Restoring ${J.sessions.length} sessions from emergency backup`);for(const ce of J.sessions)await Rs(ce).catch(we=>o.error(`Failed to restore session ${ce.id}:`,we));o.info("[Session] Emergency backup successfully restored to IndexedDB")}else o.info("[Session] Emergency backup too old - using IndexedDB instead")}localStorage.removeItem("sessions_emergency_backup")}catch(J){o.error("[Session] Failed to restore emergency backup:",J),localStorage.removeItem("sessions_emergency_backup")}}localStorage.getItem("sessions")&&(o.info("[Session] Found sessions in localStorage, migrating to IndexedDB..."),await z0(),localStorage.removeItem("sessions"),localStorage.removeItem("activeSessions"));const D=await Du(),K=localStorage.getItem("activeSessions");if(D&&D.length>0){const te=D.map(pe=>({...pe,createdAt:new Date(pe.createdAt),lastModified:new Date(pe.lastModified),closedAt:pe.closedAt?new Date(pe.closedAt):void 0,documents:pe.documents.map(ze=>({...ze,processedAt:ze.processedAt?new Date(ze.processedAt):void 0}))})),P=new Date;P.setDate(P.getDate()-30);const ce=te.filter(pe=>{if(pe.status==="active")return!0;if(pe.status==="closed"&&pe.closedAt){const ze=pe.closedAt>P;return ze||O0(pe.id).catch(Qt=>o.error(`Failed to delete old session ${pe.id}:`,Qt)),ze}return!0}),we=te.length-ce.length;we>0&&o.info(`[Session] Cleaned up ${we} old session(s) (>30 days)`);const ut=ce.map(sg),vt=ut.filter((pe,ze)=>pe.listBulletSettings!==ce[ze].listBulletSettings).length;vt>0&&o.info(`[Session] Backfilled ${vt} session(s) with default list bullet settings`);const wt=ut.map(og),Ct=wt.filter((pe,ze)=>pe.styles!==ut[ze].styles).length;Ct>0&&o.info(`[Session] Backfilled ${Ct} session(s) with default styles`);const bt=wt.map(Y0),St=bt.filter((pe,ze)=>pe.processingOptions?.enabledOperations?.length!==wt[ze].processingOptions?.enabledOperations?.length).length;if(St>0&&o.info(`[Session] Backfilled ${St} session(s) with default processing options`),u(bt),K){const pe=qa(K,[],"SessionContext.activeSessions"),ze=bt.filter(Qt=>pe.includes(Qt.id));m(ze),ze.length>0&&p(ze[0])}}}catch(Q){o.error("Failed to load sessions from storage",Q)}},[o]);x.useEffect(()=>{R()},[]),x.useEffect(()=>{S.current=r},[r]),x.useEffect(()=>{A.current=d},[d]);const U=x.useCallback(async()=>{try{await j0(200);const Q=S.current,L=A.current,D=Q.map(J=>({...J,createdAt:J.createdAt.toISOString(),lastModified:J.lastModified.toISOString(),closedAt:J.closedAt?J.closedAt.toISOString():void 0,documents:J.documents.map(te=>({...te,processedAt:te.processedAt?te.processedAt.toISOString():void 0}))}));for(const J of D){const te=Gg(J,100);await M0(async()=>Rs(te),J.id)}const K=jt(L.map(J=>J.id),void 0,"SessionContext.saveActiveSessions");K&&localStorage.setItem("activeSessions",K)}catch(Q){Q instanceof Error&&Q.message.includes("DATABASE_QUOTA_EXCEEDED")?o.error("Database quota exceeded - archive old sessions or export data to free up space",Q):o.error("Failed to persist sessions:",Q)}},[o]);x.useEffect(()=>(r.length>0&&(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{U()},3e3)),()=>{v.current&&(clearTimeout(v.current),v.current=null)}),[r,d,U]),x.useEffect(()=>{const Q=()=>{v.current&&(clearTimeout(v.current),v.current=null);const L=S.current,D=A.current;if(L.length>0){o.info("[beforeunload] Flushing pending session saves...");const K=jt(D.map(J=>J.id),void 0,"SessionContext.beforeunload");K&&localStorage.setItem("activeSessions",K);try{const J=P=>({...P,createdAt:P.createdAt.toISOString(),lastModified:P.lastModified.toISOString(),closedAt:P.closedAt?.toISOString(),documents:P.documents.map(ce=>({...ce,processedAt:ce.processedAt?.toISOString()}))}),te=jt({sessions:L.map(J),activeSessions:D.map(J),timestamp:Date.now(),reason:"beforeunload_emergency_backup"},void 0,"SessionContext.emergencyBackup");te&&(localStorage.setItem("sessions_emergency_backup",te),o.info("[beforeunload] Emergency backup saved to localStorage"))}catch(J){o.error("[beforeunload] Failed to create emergency backup:",J)}U().catch(J=>{o.error("[beforeunload] Failed to flush sessions:",J)})}};return window.addEventListener("beforeunload",Q),()=>{window.removeEventListener("beforeunload",Q)}},[U,o]);const E=Q=>{const L=G0();L!==null&&o.info("[createSession] Using custom defaults for new session");const K={id:`session-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,name:Q,createdAt:new Date,lastModified:new Date,documents:[],stats:{documentsProcessed:0,hyperlinksChecked:0,feedbackImported:0,timeSaved:0},status:"active",styles:L?.styles?[...L.styles]:[...yu],listBulletSettings:L?.listBulletSettings?{...L.listBulletSettings,indentationLevels:[...L.listBulletSettings.indentationLevels]}:pu(),tableShadingSettings:L?.tableShadingSettings?{...L.tableShadingSettings}:{...lg},processingOptions:L?.processingOptions?{...L.processingOptions,enabledOperations:[...L.processingOptions.enabledOperations||[]]}:{...oi,enabledOperations:[...oi.enabledOperations]}};c.debug("Creating session - state before update",{sessionCount:r.length,activeCount:d.length,currentSessionId:y?.id}),u(te=>[...te,K]),m(te=>[...te,K]),p(K),c.debug("Session created - state after update",{newSessionId:K.id,sessionCount:r.length+1,activeCount:d.length+1});const J={...K,createdAt:K.createdAt.toISOString(),lastModified:K.lastModified.toISOString(),closedAt:void 0,documents:[]};return Rs(J).catch(te=>{o.error(`[createSession] Failed to immediately save session "${Q}":`,te)}),o.info(`[createSession] Created and immediately saved session: ${Q} (${K.id})`),K},q=Q=>{const L=r.find(D=>D.id===Q);if(L)if(d.find(D=>D.id===Q))p(L);else if(L.status==="closed"){o.warn(`[loadSession] Attempted to load closed session: ${Q}. Use reopenSession() instead.`);return}else m(D=>[...D,L]),p(L)},G=Q=>{const L=r.find(D=>D.id===Q);if(L&&L.status==="closed"){const D={...L,status:"active",lastModified:new Date};u(K=>K.map(J=>J.id===Q?D:J)),m(K=>[...K,D]),p(D),o.info(`[reopenSession] Reopened session: ${L.name}`)}},V=Q=>{const L=r.find(K=>K.id===Q),D=new Date;if(c.debug("Closing session - state before",{closingSessionId:Q,closingSessionName:L?.name,activeCount:d.length,isCurrentSession:y?.id===Q}),m(K=>K.filter(J=>J.id!==Q)),y?.id===Q){const K=d.filter(J=>J.id!==Q);p(K.length>0?K[0]:null)}u(K=>K.map(J=>J.id===Q?{...J,status:"closed",lastModified:new Date,closedAt:D}:J)),L&&o.info("[Session] Closed:",{id:L.id,name:L.name,closedAt:D.toISOString(),documentsProcessed:L.documents.length})},X=Q=>{const L=r.find(D=>D.id===Q);u(D=>D.filter(K=>K.id!==Q)),m(D=>D.filter(K=>K.id!==Q)),y?.id===Q&&p(null),localStorage.removeItem(`session_${Q}`),L&&o.info("[Session] Deleted:",{id:L.id,name:L.name,status:L.status,createdAt:L.createdAt.toISOString()})},j=Q=>{const L=d.find(D=>D.id===Q);L&&p(L)},I=async(Q,L)=>{const D=[],K=[];o.info(`[addDocuments] Processing ${L.length} file(s) for session ${Q}`);for(const J of L){const te=J;if(o.debug(`[addDocuments] File: "${J.name}"`,{path:te.path,size:J.size,type:J.type,hasPathProperty:"path"in J,pathValue:te.path}),!te.path||te.path.trim()===""){const P="No file path provided";o.error(`[addDocuments] File "${J.name}" rejected: ${P}`),K.push({name:J.name,reason:P});continue}if(!B0(te.path,[".docx",".doc"])){const P=`Failed security validation for path: "${te.path}"`;o.error(`[addDocuments] File "${J.name}" rejected: ${P}`),K.push({name:J.name,reason:P});continue}D.push({id:`doc-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,name:J.name,path:te.path,size:J.size||0,type:J.type,status:"pending"})}if(K.length>0&&(o.warn(`[addDocuments] Rejected ${K.length} file(s):`),K.forEach(({name:J,reason:te})=>{o.warn(` - ${J}: ${te}`)})),D.length>0&&(o.info(`[addDocuments] ✅ Successfully added ${D.length} valid document(s)`),D.forEach(J=>{o.debug(` ✓ ${J.name} (${J.size} bytes)`)})),D.length===0){o.error("[addDocuments] ❌ No valid documents to add - all files were rejected");return}u(J=>J.map(te=>te.id===Q?{...te,documents:[...te.documents,...D],lastModified:new Date}:te)),m(J=>J.map(te=>te.id===Q?{...te,documents:[...te.documents,...D],lastModified:new Date}:te))},ee=(Q,L)=>{u(D=>D.map(K=>K.id===Q?{...K,documents:K.documents.filter(J=>J.id!==L),lastModified:new Date}:K))},W=x.useCallback(async(Q,L)=>{const D=r.find(ce=>ce.id===Q),K=D?.documents.find(ce=>ce.id===L),J=Date.now();if(o.info("═══════════════════════════════════════════════════════════════════════"),o.info("[SessionContext] DOCUMENT PROCESSING STARTED"),o.info("═══════════════════════════════════════════════════════════════════════"),o.info(`[SessionContext] Timestamp: ${new Date().toISOString()}`),o.info(`[SessionContext] Session ID: ${Q}`),o.info(`[SessionContext] Document ID: ${L}`),o.info(`[SessionContext] Document Name: ${K?.name||"Unknown"}`),o.info(`[SessionContext] Document Path: ${K?.path||"No path"}`),c.debug("Processing document - starting",{sessionId:Q,documentId:L,documentName:K?.name,documentPath:K?.path?"[path exists]":"[no path]"}),!D||!K||!K.path){o.error("[SessionContext] ERROR: Session, document, or document path not found"),o.error(`[SessionContext] Session exists: ${!!D}`),o.error(`[SessionContext] Document exists: ${!!K}`),o.error(`[SessionContext] Document path exists: ${!!K?.path}`);return}const te=og(sg(D));te!==D&&(o.info("[Session] Backfilled session with missing styles or list settings during processing"),u(ce=>ce.map(we=>we.id===Q?te:we)));const P=te;u(ce=>ce.map(we=>we.id===Q?{...we,documents:we.documents.map(ut=>ut.id===L?{...ut,status:"processing",errors:void 0,errorType:void 0}:ut),lastModified:new Date}:we));try{const ce=localStorage.getItem("userSettings"),we=qa(ce,{apiConnections:{powerAutomateUrl:""},profile:{}},"SessionContext.processDocument.userSettings");o.debug("Processing document with PowerAutomate URL:",we.apiConnections.powerAutomateUrl);const ut=we.profile?{firstName:we.profile.firstName||"",lastName:we.profile.lastName||"",email:we.profile.email||""}:void 0;o.debug("Processing document with user profile:",ut),o.debug(`
|
|
11
|
+
=== SESSION CONTEXT: Extracting Style Spacing ===`),o.debug("sessionToProcess.styles:",P.styles);const vt={header1:{spaceBefore:0,spaceAfter:12,lineSpacing:1},header2:{spaceBefore:6,spaceAfter:6,lineSpacing:1},normal:{spaceBefore:3,spaceAfter:3,lineSpacing:1}},wt=P.styles&&P.styles.length>0;wt||(o.debug(" No styles configured in session - using default spacing values"),o.debug(" Default Header 1: 0pt before, 12pt after, 1.0 line spacing"),o.debug(" Default Header 2: 6pt before, 6pt after, 1.0 line spacing"),o.debug(" Default Normal: 3pt before, 3pt after, 1.0 line spacing"));const Ct=P.styles?.find(ne=>ne.id==="header1"),bt=P.styles?.find(ne=>ne.id==="header2"),St=P.styles?.find(ne=>ne.id==="normal");o.debug("Found header1Style:",Ct),o.debug("Found header2Style:",bt),o.debug("Found normalStyle:",St);const pe={};Ct&&(Ct.spaceBefore!==void 0||Ct.spaceAfter!==void 0||Ct.lineSpacing!==void 0)?(pe.header1={spaceBefore:Ct.spaceBefore??0,spaceAfter:Ct.spaceAfter??0,lineSpacing:Ct.lineSpacing??1},o.debug("✓ Added header1 spacing from session:",pe.header1)):wt||(pe.header1=vt.header1,o.debug("✓ Added header1 spacing from defaults:",pe.header1)),bt&&(bt.spaceBefore!==void 0||bt.spaceAfter!==void 0||bt.lineSpacing!==void 0)?(pe.header2={spaceBefore:bt.spaceBefore??0,spaceAfter:bt.spaceAfter??0,lineSpacing:bt.lineSpacing??1},o.debug("✓ Added header2 spacing from session:",pe.header2)):wt||(pe.header2=vt.header2,o.debug("✓ Added header2 spacing from defaults:",pe.header2)),St&&(St.spaceBefore!==void 0||St.spaceAfter!==void 0||St.lineSpacing!==void 0)?(pe.normal={spaceBefore:St.spaceBefore??0,spaceAfter:St.spaceAfter??0,lineSpacing:St.lineSpacing??1},o.debug("✓ Added normal spacing from session:",pe.normal)):wt||(pe.normal=vt.normal,o.debug("✓ Added normal spacing from defaults:",pe.normal)),o.debug("Final customStyleSpacing object:",pe),o.debug("Will pass to processor:",Object.keys(pe).length>0?pe:void 0),o.info(`
|
|
12
|
+
=== PROCESSING DOCUMENT - OPTIONS DEBUG ===`),o.info("Session enabled operations:",P.processingOptions?.enabledOperations||[]);const ze={apiEndpoint:we.apiConnections.powerAutomateUrl||"",userProfile:ut,operations:{fixContentIds:P.processingOptions?.enabledOperations?.includes("fix-content-ids"),updateTitles:P.processingOptions?.enabledOperations?.includes("replace-outdated-titles"),replaceOutdatedTitles:P.processingOptions?.enabledOperations?.includes("replace-outdated-titles"),fixInternalHyperlinks:P.processingOptions?.enabledOperations?.includes("fix-internal-hyperlinks"),updateTopHyperlinks:P.processingOptions?.enabledOperations?.includes("update-top-hyperlinks"),updateTocHyperlinks:!0,standardizeHyperlinkColor:!0,validateHeader2Tables:P.processingOptions?.enabledOperations?.includes("validate-header2-tables"),validateDocumentStyles:P.processingOptions?.enabledOperations?.includes("validate-document-styles")},textReplacements:P.replacements?.filter(ne=>ne.enabled)||[],styles:P.styles&&Array.isArray(P.styles)&&P.styles.length>0?P.styles.map(ne=>({id:ne.id,name:ne.name,fontFamily:ne.fontFamily,fontSize:ne.fontSize,bold:ne.bold??!1,italic:ne.italic??!1,underline:ne.underline??!1,preserveBold:ne.preserveBold,preserveItalic:ne.preserveItalic,preserveUnderline:ne.preserveUnderline,preserveCenterAlignment:ne.preserveCenterAlignment,alignment:ne.alignment,color:ne.color,spaceBefore:ne.spaceBefore??0,spaceAfter:ne.spaceAfter??0,lineSpacing:ne.lineSpacing??1,noSpaceBetweenSame:ne.noSpaceBetweenSame,indentation:ne.indentation?{left:ne.indentation.left,firstLine:ne.indentation.firstLine}:void 0})):[],customStyleSpacing:Object.keys(pe).length>0?pe:void 0,removeWhitespace:P.processingOptions?.enabledOperations?.includes("remove-whitespace"),removeParagraphLines:P.processingOptions?.enabledOperations?.includes("remove-paragraph-lines"),removeItalics:P.processingOptions?.enabledOperations?.includes("remove-italics"),preserveRedFont:P.processingOptions?.enabledOperations?.includes("preserve-red-font"),normalizeDashes:P.processingOptions?.enabledOperations?.includes("normalize-dashes"),standardizeHyperlinkFormatting:!0,standardizeListPrefixFormatting:!0,correctMisappliedStyles:P.processingOptions?.enabledOperations?.includes("correct-misapplied-styles"),assignStyles:!0,centerAndBorderImages:!0,removeHeadersFooters:P.processingOptions?.enabledOperations?.includes("remove-headers-footers"),addDocumentWarning:P.processingOptions?.enabledOperations?.includes("add-document-warning"),listBulletSettings:P.processingOptions?.enabledOperations?.includes("list-indentation")?{enabled:!0,indentationLevels:P.listBulletSettings?.indentationLevels||[]}:void 0,bulletUniformity:P.processingOptions?.enabledOperations?.includes("bullet-uniformity"),normalizeTableLists:P.processingOptions?.enabledOperations?.includes("normalize-table-lists"),tableUniformity:P.processingOptions?.enabledOperations?.includes("smart-tables"),smartTables:P.processingOptions?.enabledOperations?.includes("smart-tables"),standardizeTableBorders:P.processingOptions?.enabledOperations?.includes("standardize-table-borders"),setLandscapeMargins:P.processingOptions?.enabledOperations?.includes("set-landscape-margins"),tableShadingSettings:(()=>{const ne=P.styles?.find(Mt=>Mt.id==="normal"),nt=P.styles?.find(Mt=>Mt.id==="header2");return P.tableShadingSettings?{header2Shading:P.tableShadingSettings.header2Shading,otherShading:P.tableShadingSettings.otherShading,imageBorderWidth:P.tableShadingSettings.imageBorderWidth??1,padding1x1Top:P.tableShadingSettings.padding1x1Top??0,padding1x1Bottom:P.tableShadingSettings.padding1x1Bottom??0,padding1x1Left:P.tableShadingSettings.padding1x1Left??.08,padding1x1Right:P.tableShadingSettings.padding1x1Right??.08,paddingOtherTop:P.tableShadingSettings.paddingOtherTop??0,paddingOtherBottom:P.tableShadingSettings.paddingOtherBottom??0,paddingOtherLeft:P.tableShadingSettings.paddingOtherLeft??.08,paddingOtherRight:P.tableShadingSettings.paddingOtherRight??.08,cellBorderThickness:P.tableShadingSettings.cellBorderThickness??.5,heading2FontFamily:nt?.fontFamily||"Verdana",heading2FontSize:nt?.fontSize||14,normalAlignment:ne?.alignment||"left",normalFontFamily:ne?.fontFamily||"Verdana",normalFontSize:ne?.fontSize||12,normalSpaceBefore:ne?.spaceBefore??3,normalSpaceAfter:ne?.spaceAfter??3,normalLineSpacing:ne?.lineSpacing??1,preserveBold:ne?.preserveBold??!0,preserveCenterAlignment:ne?.preserveCenterAlignment??!0}:void 0})(),enabledOperations:P.processingOptions?.enabledOperations,tableOfContentsSettings:P.tableOfContentsSettings,revisionHandlingMode:P.processingOptions?.revisionHandlingMode||"accept_all",revisionAuthor:P.processingOptions?.revisionAuthor,autoAcceptRevisions:P.processingOptions?.autoAcceptRevisions??!1,trackChanges:!0,tableUniformitySettings:P.tableUniformitySettings,localDictionary:we.localDictionary?.enabled?{enabled:!0,totalEntries:we.localDictionary.totalEntries||0}:void 0};o.info("Operations object being passed to WordDocumentProcessor:"),o.info(" - updateTocHyperlinks:",ze.operations?.updateTocHyperlinks),o.info(" - validateDocumentStyles:",ze.operations?.validateDocumentStyles),o.info(" - validateHeader2Tables:",ze.operations?.validateHeader2Tables),o.info(" - styles length:",ze.styles?.length||0),ze.styles&&ze.styles.length>0&&o.info(" - Available style IDs:",ze.styles.map(ne=>ne.id).join(", ")),o.info(" - tableOfContentsSettings.enabled:",ze.tableOfContentsSettings?.enabled??!1),o.info(" - listBulletSettings enabled:",ze.listBulletSettings?.enabled),o.info(" - listBulletSettings indentationLevels length:",ze.listBulletSettings?.indentationLevels?.length||0),ze.listBulletSettings?.indentationLevels&&ze.listBulletSettings.indentationLevels.forEach((ne,nt)=>{o.info(` - Level ${ne.level}: symbol=${ne.symbolIndent}", text=${ne.textIndent}", char="${ne.bulletChar}"`)}),o.info("Session state right before IPC:"),o.info(" - Session has listBulletSettings?",!!P.listBulletSettings),o.info(" - Session listBulletSettings enabled?",P.listBulletSettings?.enabled),o.info(" - Session indentationLevels length:",P.listBulletSettings?.indentationLevels?.length||0),P.listBulletSettings?.indentationLevels&&P.listBulletSettings.indentationLevels.forEach((ne,nt)=>{o.info(` - Session Level ${ne.level}: symbol=${ne.symbolIndent}", text=${ne.textIndent}", char="${ne.bulletChar}"`)}),o.info(" - Enabled operations:",P.processingOptions?.enabledOperations||[]);const Qt=ze.styles?.find(ne=>ne.id==="normal"),tt=ze.styles?.find(ne=>ne.id==="listParagraph");(Qt||tt)&&(o.info(" - Formatting Preservation (bold & alignment only):"),Qt&&o.info(` - Normal: bold=${Qt.bold}, alignment=${Qt.alignment} (undefined = preserve), italic=${Qt.italic}, underline=${Qt.underline}`),tt&&o.info(` - ListParagraph: bold=${tt.bold}, alignment=${tt.alignment} (undefined = preserve), italic=${tt.italic}, underline=${tt.underline}`));try{o.info(`[SessionContext] Capturing pre-processing snapshot for ${K.name}`);const ne=eu("snapshot capture"),nt=await ne.readFileAsBuffer(K.path),Mt=await ne.extractDocumentText(K.path),sn=Mt.success&&Mt.textContent?Mt.textContent:[];await A0.captureSnapshot(nt,Q,L,sn,[]),o.info(`[SessionContext] Snapshot captured: ${sn.length} paragraphs, ${(nt.byteLength/1024).toFixed(1)}KB`)}catch(ne){o.warn("[SessionContext] Failed to capture snapshot (comparison will be unavailable):",ne)}o.info("───────────────────────────────────────────────────────────────────────"),o.info("[SessionContext] Sending document to main process for processing"),o.info(`[SessionContext] API Endpoint: ${ze.apiEndpoint?"Configured":"NOT CONFIGURED"}`),o.info(`[SessionContext] Operations enabled: ${P.processingOptions?.enabledOperations?.join(", ")||"None"}`),o.info(`[SessionContext] IPC Timeout: ${ag}ms`),o.info("───────────────────────────────────────────────────────────────────────");const Oi=eu("document processing"),mn=await q0(Oi.processHyperlinkDocument(K.path,ze),ag,"Document processing");if(!mn||typeof mn!="object")throw new Error("Invalid response from document processor: expected an object");if(!("success"in mn&&"totalHyperlinks"in mn&&typeof mn.success=="boolean"&&typeof mn.totalHyperlinks=="number"))throw new Error("Invalid response from document processor: missing required fields (success, totalHyperlinks)");const ke=mn;if(u(ne=>ne.map(nt=>nt.id===Q?{...nt,documents:nt.documents.map(Mt=>Mt.id===L?{...Mt,status:ke.success?"completed":"error",processedAt:new Date,errors:ke.errorMessages,errorType:ke.success?void 0:ke.errorMessages?.some(sn=>sn.toLowerCase().includes("close the file"))?"file_locked":ke.errorMessages?.some(sn=>sn.toLowerCase().includes("timeout"))?"api_timeout":ke.errorMessages?.some(sn=>sn.toLowerCase().includes("compatibility_mode")||sn.toLowerCase().includes("outdated functions"))?"word_compatibility":"general",previousRevisions:ke.previousRevisions,wordRevisions:ke.wordRevisions,processingResult:{hyperlinksProcessed:ke.processedHyperlinks,hyperlinksModified:ke.modifiedHyperlinks,contentIdsAppended:ke.appendedContentIds||ke.processedHyperlinks,backupPath:ke.backupPath,duration:ke.duration,changes:ke.changes||[]}}:Mt),stats:{...nt.stats,documentsProcessed:nt.stats.documentsProcessed+(ke.success?1:0),hyperlinksChecked:nt.stats.hyperlinksChecked+ke.totalHyperlinks,feedbackImported:nt.stats.feedbackImported,timeSaved:nt.stats.timeSaved+Math.round(ke.totalHyperlinks*au/lu)},lastModified:new Date}:nt)),ke.success){await b({documentsProcessed:1,hyperlinksChecked:ke.totalHyperlinks,timeSaved:Math.round(ke.totalHyperlinks*au/lu)});const ne=Date.now()-J;o.info("═══════════════════════════════════════════════════════════════════════"),o.info("[SessionContext] DOCUMENT PROCESSING COMPLETE - SUCCESS"),o.info("═══════════════════════════════════════════════════════════════════════"),o.info(`[SessionContext] Document: ${K.name}`),o.info(`[SessionContext] Location: ${K.path}`),o.info(`[SessionContext] Hyperlinks Processed: ${ke.totalHyperlinks}`),o.info(`[SessionContext] Hyperlinks Modified: ${ke.modifiedHyperlinks}`),o.info(`[SessionContext] Content IDs Appended: ${ke.appendedContentIds||0}`),o.info(`[SessionContext] Processor Duration: ${ke.duration}ms`),o.info(`[SessionContext] Total Duration: ${ne}ms`),o.info(`[SessionContext] Time Saved: ${Math.round(ke.totalHyperlinks*au/lu)} seconds`),o.info("═══════════════════════════════════════════════════════════════════════")}else{const ne=Date.now()-J;o.error("═══════════════════════════════════════════════════════════════════════"),o.error("[SessionContext] DOCUMENT PROCESSING COMPLETE - FAILED"),o.error("═══════════════════════════════════════════════════════════════════════"),o.error(`[SessionContext] Document: ${K.name}`),o.error(`[SessionContext] Errors: ${ke.errorMessages?.join(", ")||"Unknown error"}`),o.error(`[SessionContext] Duration: ${ne}ms`),o.error("═══════════════════════════════════════════════════════════════════════")}}catch(ce){const we=Date.now()-J;o.error("═══════════════════════════════════════════════════════════════════════"),o.error("[SessionContext] DOCUMENT PROCESSING EXCEPTION"),o.error("═══════════════════════════════════════════════════════════════════════"),o.error(`[SessionContext] Document: ${K.name}`),o.error(`[SessionContext] Error: ${ce instanceof Error?ce.message:String(ce)}`),ce instanceof Error&&ce.stack&&(o.error("[SessionContext] Stack Trace:"),ce.stack.split(`
|
|
13
|
+
`).forEach(ut=>{o.error(`[SessionContext] ${ut}`)})),o.error(`[SessionContext] Duration: ${we}ms`),o.error("═══════════════════════════════════════════════════════════════════════"),o.error("Error processing document:",ce),u(ut=>ut.map(vt=>vt.id===Q?{...vt,documents:vt.documents.map(wt=>wt.id===L?{...wt,status:"error",errors:[ce instanceof Error?ce.message:"Processing failed"],errorType:ce instanceof Error&&ce.message.toLowerCase().includes("close the file")?"file_locked":ce instanceof Error&&ce.message.toLowerCase().includes("timeout")?"api_timeout":ce instanceof Error&&(ce.message.toLowerCase().includes("compatibility_mode")||ce.message.toLowerCase().includes("outdated functions"))?"word_compatibility":"general"}:wt),lastModified:new Date}:vt))}},[r,o,b]),re=async(Q,L,D)=>{const K=r.find(te=>te.id===Q),J=K?.documents.find(te=>te.id===L);if(!K||!J){o.error("Session or document not found");return}u(te=>te.map(P=>P.id===Q?{...P,documents:P.documents.map(ce=>ce.id===L&&ce.processingResult?{...ce,processingResult:{...ce.processingResult,changes:ce.processingResult.changes?.filter(we=>we.id!==D)||[]}}:ce),lastModified:new Date}:P)),o.info(`[Session] Reverted change ${D} from document ${L}`)},Ae=async(Q,L)=>{const D=r.find(te=>te.id===Q),K=D?.documents.find(te=>te.id===L);if(!D||!K||!K.path){o.error("Session, document, or document path not found");return}const J=K.processingResult?.backupPath;if(!J)throw o.error("No backup path found for document"),new Error("No backup available for this document");try{await eu("backup restore").restoreFromBackup(J,K.path),u(P=>P.map(ce=>ce.id===Q?{...ce,documents:ce.documents.map(we=>we.id===L?{...we,status:"pending",processedAt:void 0,errors:void 0,processingResult:void 0}:we),lastModified:new Date}:ce)),o.info(`[Session] Reverted all changes for document ${L} from backup ${J}`)}catch(te){throw o.error("Error reverting all changes:",te),te}},de=x.useCallback((Q,L)=>{const D=K=>K.map(J=>J.id===Q?L(J):J);u(D),m(D),p(K=>K?.id===Q?L(K):K)},[]),ye=x.useCallback((Q,L)=>{de(Q,D=>({...D,stats:{...D.stats,...L},lastModified:new Date}))},[de]),Me=x.useCallback((Q,L)=>{de(Q,D=>({...D,name:L,lastModified:new Date}))},[de]),xe=x.useCallback((Q,L)=>{o.info("[SessionContext] Updating session options for session:",Q),o.info(" - Enabled operations:",L?.enabledOperations||[]),o.info(" - Options object:",L),de(Q,D=>({...D,processingOptions:L,lastModified:new Date}))},[de,o]),ie=x.useCallback((Q,L)=>{de(Q,D=>({...D,replacements:L,lastModified:new Date}))},[de]),M=x.useCallback((Q,L)=>{de(Q,D=>({...D,styles:L,lastModified:new Date}))},[de]),$=x.useCallback((Q,L)=>{de(Q,D=>({...D,listBulletSettings:L,lastModified:new Date}))},[de]),_=x.useCallback((Q,L)=>{de(Q,D=>({...D,tableUniformitySettings:L,lastModified:new Date}))},[de]),me=x.useCallback((Q,L)=>{de(Q,D=>({...D,tableShadingSettings:L,lastModified:new Date}))},[de]),ge=x.useCallback((Q,L)=>{o.info("[SessionContext] Updating Table of Contents settings for session:",Q),de(Q,D=>({...D,tableOfContentsSettings:L,lastModified:new Date}))},[de,o]),Qe=Q=>{const L=jt(Q,void 0,"SessionContext.saveSession");L&&localStorage.setItem(`session_${Q.id}`,L)},Ee=Q=>{const L=localStorage.getItem(`session_${Q}`);if(L){const D=qa(L,null,"SessionContext.loadSessionFromStorage");if(D)return{...D,createdAt:new Date(D.createdAt),lastModified:new Date(D.lastModified)}}return null},fe=Q=>{o.info("[SessionContext] Resetting session to defaults:",Q),de(Q,L=>({...L,styles:[...yu],listBulletSettings:pu(),processingOptions:{...oi,enabledOperations:[...oi.enabledOperations]},tableShadingSettings:{...lg},lastModified:new Date})),o.info("[SessionContext] Session reset to defaults")},be=Q=>{const L=r.find(J=>J.id===Q);if(!L){o.error("[SessionContext] Session not found for saving defaults:",Q);return}o.info("[SessionContext] Saving session settings as custom defaults:",Q);const D={styles:L.styles,listBulletSettings:L.listBulletSettings,processingOptions:L.processingOptions,tableShadingSettings:L.tableShadingSettings},K=jt(D,void 0,"SessionContext.saveAsCustomDefaults");K&&(localStorage.setItem(Ig,K),o.info("[SessionContext] Custom defaults saved successfully"))},Ie=r.sort((Q,L)=>L.lastModified.getTime()-Q.lastModified.getTime()).slice(0,5);return h.jsx($g.Provider,{value:{sessions:r,activeSessions:d,currentSession:y,recentSessions:Ie,createSession:E,loadSession:q,reopenSession:G,closeSession:V,deleteSession:X,switchSession:j,addDocuments:I,removeDocument:ee,processDocument:W,revertChange:re,revertAllChanges:Ae,updateSessionStats:ye,updateSessionName:Me,updateSessionOptions:xe,updateSessionReplacements:ie,updateSessionStyles:M,updateSessionListBulletSettings:$,updateSessionTableUniformitySettings:_,updateSessionTableShadingSettings:me,updateSessionTableOfContentsSettings:ge,saveSession:Qe,loadSessionFromStorage:Ee,resetSessionToDefaults:fe,saveAsCustomDefaults:be},children:s})}function X0(){const s=x.useContext($g);if(s===void 0)throw new Error("useSession must be used within a SessionProvider");return s}const su={profile:{firstName:"John",lastName:"Doe",email:"john.doe@example.com"},notifications:{emailNotifications:!1,pushNotifications:!1,projectUpdates:!1,teamMentions:!1,weeklyDigest:!1},apiConnections:{powerAutomateUrl:"https://www.example.com",bugReportUrl:"https://www.example.com",submitIdeaUrl:"https://www.example.com"},language:"English (US)",timezone:"UTC-05:00 Eastern Time (ET)",dateFormat:"MM/DD/YYYY",updateSettings:{autoUpdateOnLaunch:!0,checkForPreReleases:!1,useSharePointSource:!1,sharePointFolderUrl:""},localDictionary:{enabled:!1,sharePointFileUrl:"",lastRetrievalTime:null,lastRetrievalSuccess:!1,totalEntries:0},backupSettings:{enabled:!0},displaySettings:{comparisonMonitorId:0}},Pg=x.createContext(void 0),un="userSettings";function Q0({children:s}){const o=F.namespace("UserSettings"),[c,r]=x.useState(su),[u,d]=x.useState(!0),m=x.useCallback(()=>{d(!0);try{const G=localStorage.getItem(un),V=qa(G,{},"UserSettings.loadSettings");r({...su,...V})}finally{d(!1)}},[]),y=x.useCallback(async()=>{const G=jt(c,void 0,"UserSettings.saveSettings");if(G)try{return localStorage.setItem(un,G),!0}catch(V){return o.error("Failed to save user settings to localStorage:",V),!1}return!1},[c,o]),p=x.useCallback(G=>{r(V=>{const X={...V,...G},j=jt(X,void 0,"UserSettings.updateSettings");if(j)try{localStorage.setItem(un,j)}catch{}return X})},[]),b=x.useCallback(G=>{r(V=>{const X={...V,profile:{...V.profile,...G}},j=jt(X,void 0,"UserSettings.updateProfile");if(j)try{localStorage.setItem(un,j)}catch{}return X})},[]),v=x.useCallback(G=>{r(V=>{const X={...V,notifications:{...V.notifications,...G}},j=jt(X,void 0,"UserSettings.updateNotifications");if(j)try{localStorage.setItem(un,j)}catch{}return X})},[]),S=x.useCallback(G=>{r(V=>{const X={...V,apiConnections:{...V.apiConnections,...G}},j=jt(X,void 0,"UserSettings.updateApiConnections");if(j)try{localStorage.setItem(un,j)}catch{}return X})},[]),A=x.useCallback(G=>{r(V=>{const X={...V,updateSettings:{...V.updateSettings,...G}},j=jt(X,void 0,"UserSettings.updateUpdateSettings");if(j)try{localStorage.setItem(un,j)}catch{}return X})},[]),N=x.useCallback(G=>{r(V=>{const X={...V,localDictionary:{...V.localDictionary,...G}},j=jt(X,void 0,"UserSettings.updateLocalDictionary");if(j)try{localStorage.setItem(un,j)}catch{}return X})},[]),R=x.useCallback(G=>{r(V=>{const X={...V,backupSettings:{...V.backupSettings,...G}},j=jt(X,void 0,"UserSettings.updateBackupSettings");if(j)try{localStorage.setItem(un,j)}catch{}return X})},[]),U=x.useCallback(G=>{r(V=>{const X={...V,displaySettings:{...V.displaySettings,...G}},j=jt(X,void 0,"UserSettings.updateDisplaySettings");if(j)try{localStorage.setItem(un,j)}catch{}return X})},[]),E=x.useCallback(()=>{r(su),localStorage.removeItem(un)},[]);x.useEffect(()=>{m()},[m]);const q=x.useMemo(()=>({settings:c,isLoading:u,updateSettings:p,updateProfile:b,updateNotifications:v,updateApiConnections:S,updateUpdateSettings:A,updateLocalDictionary:N,updateBackupSettings:R,updateDisplaySettings:U,saveSettings:y,loadSettings:m,resetSettings:E}),[c,u,p,b,v,S,A,N,R,U,y,m,E]);return h.jsx(Pg.Provider,{value:q,children:s})}function Z0(){const s=x.useContext(Pg);if(!s)throw new Error("useUserSettings must be used within a UserSettingsProvider");return s}const K0=(s,o)=>{const c=new Array(s.length+o.length);for(let r=0;r<s.length;r++)c[r]=s[r];for(let r=0;r<o.length;r++)c[s.length+r]=o[r];return c},F0=(s,o)=>({classGroupId:s,validator:o}),Wg=(s=new Map,o=null,c)=>({nextPart:s,validators:o,classGroupId:c}),gi="-",ig=[],J0="arbitrary..",$0=s=>{const o=P0(s),{conflictingClassGroups:c,conflictingClassGroupModifiers:r}=s;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return I0(m);const y=m.split(gi),p=y[0]===""&&y.length>1?1:0;return ep(y,p,o)},getConflictingClassGroupIds:(m,y)=>{if(y){const p=r[m],b=c[m];return p?b?K0(b,p):p:b||ig}return c[m]||ig}}},ep=(s,o,c)=>{if(s.length-o===0)return c.classGroupId;const u=s[o],d=c.nextPart.get(u);if(d){const b=ep(s,o+1,d);if(b)return b}const m=c.validators;if(m===null)return;const y=o===0?s.join(gi):s.slice(o).join(gi),p=m.length;for(let b=0;b<p;b++){const v=m[b];if(v.validator(y))return v.classGroupId}},I0=s=>s.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=s.slice(1,-1),c=o.indexOf(":"),r=o.slice(0,c);return r?J0+r:void 0})(),P0=s=>{const{theme:o,classGroups:c}=s;return W0(c,o)},W0=(s,o)=>{const c=Wg();for(const r in s){const u=s[r];Nu(u,c,r,o)}return c},Nu=(s,o,c,r)=>{const u=s.length;for(let d=0;d<u;d++){const m=s[d];eS(m,o,c,r)}},eS=(s,o,c,r)=>{if(typeof s=="string"){tS(s,o,c);return}if(typeof s=="function"){nS(s,o,c,r);return}aS(s,o,c,r)},tS=(s,o,c)=>{const r=s===""?o:tp(o,s);r.classGroupId=c},nS=(s,o,c,r)=>{if(lS(s)){Nu(s(r),o,c,r);return}o.validators===null&&(o.validators=[]),o.validators.push(F0(c,s))},aS=(s,o,c,r)=>{const u=Object.entries(s),d=u.length;for(let m=0;m<d;m++){const[y,p]=u[m];Nu(p,tp(o,y),c,r)}},tp=(s,o)=>{let c=s;const r=o.split(gi),u=r.length;for(let d=0;d<u;d++){const m=r[d];let y=c.nextPart.get(m);y||(y=Wg(),c.nextPart.set(m,y)),c=y}return c},lS=s=>"isThemeGetter"in s&&s.isThemeGetter===!0,sS=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,c=Object.create(null),r=Object.create(null);const u=(d,m)=>{c[d]=m,o++,o>s&&(o=0,r=c,c=Object.create(null))};return{get(d){let m=c[d];if(m!==void 0)return m;if((m=r[d])!==void 0)return u(d,m),m},set(d,m){d in c?c[d]=m:u(d,m)}}},bu="!",rg=":",oS=[],cg=(s,o,c,r,u)=>({modifiers:s,hasImportantModifier:o,baseClassName:c,maybePostfixModifierPosition:r,isExternal:u}),iS=s=>{const{prefix:o,experimentalParseClassName:c}=s;let r=u=>{const d=[];let m=0,y=0,p=0,b;const v=u.length;for(let U=0;U<v;U++){const E=u[U];if(m===0&&y===0){if(E===rg){d.push(u.slice(p,U)),p=U+1;continue}if(E==="/"){b=U;continue}}E==="["?m++:E==="]"?m--:E==="("?y++:E===")"&&y--}const S=d.length===0?u:u.slice(p);let A=S,N=!1;S.endsWith(bu)?(A=S.slice(0,-1),N=!0):S.startsWith(bu)&&(A=S.slice(1),N=!0);const R=b&&b>p?b-p:void 0;return cg(d,N,A,R)};if(o){const u=o+rg,d=r;r=m=>m.startsWith(u)?d(m.slice(u.length)):cg(oS,!1,m,void 0,!0)}if(c){const u=r;r=d=>c({className:d,parseClassName:u})}return r},rS=s=>{const o=new Map;return s.orderSensitiveModifiers.forEach((c,r)=>{o.set(c,1e6+r)}),c=>{const r=[];let u=[];for(let d=0;d<c.length;d++){const m=c[d],y=m[0]==="[",p=o.has(m);y||p?(u.length>0&&(u.sort(),r.push(...u),u=[]),r.push(m)):u.push(m)}return u.length>0&&(u.sort(),r.push(...u)),r}},cS=s=>({cache:sS(s.cacheSize),parseClassName:iS(s),sortModifiers:rS(s),...$0(s)}),uS=/\s+/,fS=(s,o)=>{const{parseClassName:c,getClassGroupId:r,getConflictingClassGroupIds:u,sortModifiers:d}=o,m=[],y=s.trim().split(uS);let p="";for(let b=y.length-1;b>=0;b-=1){const v=y[b],{isExternal:S,modifiers:A,hasImportantModifier:N,baseClassName:R,maybePostfixModifierPosition:U}=c(v);if(S){p=v+(p.length>0?" "+p:p);continue}let E=!!U,q=r(E?R.substring(0,U):R);if(!q){if(!E){p=v+(p.length>0?" "+p:p);continue}if(q=r(R),!q){p=v+(p.length>0?" "+p:p);continue}E=!1}const G=A.length===0?"":A.length===1?A[0]:d(A).join(":"),V=N?G+bu:G,X=V+q;if(m.indexOf(X)>-1)continue;m.push(X);const j=u(q,E);for(let I=0;I<j.length;++I){const ee=j[I];m.push(V+ee)}p=v+(p.length>0?" "+p:p)}return p},dS=(...s)=>{let o=0,c,r,u="";for(;o<s.length;)(c=s[o++])&&(r=np(c))&&(u&&(u+=" "),u+=r);return u},np=s=>{if(typeof s=="string")return s;let o,c="";for(let r=0;r<s.length;r++)s[r]&&(o=np(s[r]))&&(c&&(c+=" "),c+=o);return c},mS=(s,...o)=>{let c,r,u,d;const m=p=>{const b=o.reduce((v,S)=>S(v),s());return c=cS(b),r=c.cache.get,u=c.cache.set,d=y,y(p)},y=p=>{const b=r(p);if(b)return b;const v=fS(p,c);return u(p,v),v};return d=m,(...p)=>d(dS(...p))},hS=[],ct=s=>{const o=c=>c[s]||hS;return o.isThemeGetter=!0,o},ap=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,gS=/^\d+\/\d+$/,pS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yS=/\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$/,bS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ol=s=>gS.test(s),Ce=s=>!!s&&!Number.isNaN(Number(s)),pa=s=>!!s&&Number.isInteger(Number(s)),ou=s=>s.endsWith("%")&&Ce(s.slice(0,-1)),Yn=s=>pS.test(s),xS=()=>!0,wS=s=>yS.test(s)&&!bS.test(s),sp=()=>!1,CS=s=>vS.test(s),AS=s=>SS.test(s),ES=s=>!le(s)&&!se(s),TS=s=>Rl(s,rp,sp),le=s=>ap.test(s),Ha=s=>Rl(s,cp,wS),iu=s=>Rl(s,jS,Ce),ug=s=>Rl(s,op,sp),DS=s=>Rl(s,ip,AS),ii=s=>Rl(s,up,CS),se=s=>lp.test(s),js=s=>Bl(s,cp),NS=s=>Bl(s,MS),fg=s=>Bl(s,op),OS=s=>Bl(s,rp),zS=s=>Bl(s,ip),ri=s=>Bl(s,up,!0),Rl=(s,o,c)=>{const r=ap.exec(s);return r?r[1]?o(r[1]):c(r[2]):!1},Bl=(s,o,c=!1)=>{const r=lp.exec(s);return r?r[1]?o(r[1]):c:!1},op=s=>s==="position"||s==="percentage",ip=s=>s==="image"||s==="url",rp=s=>s==="length"||s==="size"||s==="bg-size",cp=s=>s==="length",jS=s=>s==="number",MS=s=>s==="family-name",up=s=>s==="shadow",kS=()=>{const s=ct("color"),o=ct("font"),c=ct("text"),r=ct("font-weight"),u=ct("tracking"),d=ct("leading"),m=ct("breakpoint"),y=ct("container"),p=ct("spacing"),b=ct("radius"),v=ct("shadow"),S=ct("inset-shadow"),A=ct("text-shadow"),N=ct("drop-shadow"),R=ct("blur"),U=ct("perspective"),E=ct("aspect"),q=ct("ease"),G=ct("animate"),V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...X(),se,le],I=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto","contain","none"],W=()=>[se,le,p],re=()=>[Ol,"full","auto",...W()],Ae=()=>[pa,"none","subgrid",se,le],de=()=>["auto",{span:["full",pa,se,le]},pa,se,le],ye=()=>[pa,"auto",se,le],Me=()=>["auto","min","max","fr",se,le],xe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...W()],$=()=>[Ol,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...W()],_=()=>[s,se,le],me=()=>[...X(),fg,ug,{position:[se,le]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Qe=()=>["auto","cover","contain",OS,TS,{size:[se,le]}],Ee=()=>[ou,js,Ha],fe=()=>["","none","full",b,se,le],be=()=>["",Ce,js,Ha],Ie=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>[Ce,ou,fg,ug],D=()=>["","none",R,se,le],K=()=>["none",Ce,se,le],J=()=>["none",Ce,se,le],te=()=>[Ce,se,le],P=()=>[Ol,"full",...W()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yn],breakpoint:[Yn],color:[xS],container:[Yn],"drop-shadow":[Yn],ease:["in","out","in-out"],font:[ES],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yn],shadow:[Yn],spacing:["px",Ce],text:[Yn],"text-shadow":[Yn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ol,le,se,E]}],container:["container"],columns:[{columns:[Ce,le,se,y]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:j()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[pa,"auto",se,le]}],basis:[{basis:[Ol,"full","auto",y,...W()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,Ol,"auto","initial","none",le]}],grow:[{grow:["",Ce,se,le]}],shrink:[{shrink:["",Ce,se,le]}],order:[{order:[pa,"first","last","none",se,le]}],"grid-cols":[{"grid-cols":Ae()}],"col-start-end":[{col:de()}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":Ae()}],"row-start-end":[{row:de()}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:W()}],"gap-x":[{"gap-x":W()}],"gap-y":[{"gap-y":W()}],"justify-content":[{justify:[...xe(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...xe()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":xe()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:W()}],px:[{px:W()}],py:[{py:W()}],ps:[{ps:W()}],pe:[{pe:W()}],pt:[{pt:W()}],pr:[{pr:W()}],pb:[{pb:W()}],pl:[{pl:W()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":W()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":W()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[y,"screen",...$()]}],"min-w":[{"min-w":[y,"screen","none",...$()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[m]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",c,js,Ha]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,se,iu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ou,le]}],"font-family":[{font:[NS,le,o]}],"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:[u,se,le]}],"line-clamp":[{"line-clamp":[Ce,"none",se,iu]}],leading:[{leading:[d,...W()]}],"list-image":[{"list-image":["none",se,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",se,Ha]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Ce,"auto",se,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,le]}],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",se,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ge()}],"bg-size":[{bg:Qe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pa,se,le],radial:["",se,le],conic:[pa,se,le]},zS,DS]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:Ee()}],"gradient-via-pos":[{via:Ee()}],"gradient-to-pos":[{to:Ee()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:be()}],"border-w-x":[{"border-x":be()}],"border-w-y":[{"border-y":be()}],"border-w-s":[{"border-s":be()}],"border-w-e":[{"border-e":be()}],"border-w-t":[{"border-t":be()}],"border-w-r":[{"border-r":be()}],"border-w-b":[{"border-b":be()}],"border-w-l":[{"border-l":be()}],"divide-x":[{"divide-x":be()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":be()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ie(),"hidden","none"]}],"divide-style":[{divide:[...Ie(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...Ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,se,le]}],"outline-w":[{outline:["",Ce,js,Ha]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",v,ri,ii]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",S,ri,ii]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Ce,Ha]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":be()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",A,ri,ii]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[Ce,se,le]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"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":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[se,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"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":X()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:Qe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,le]}],filter:[{filter:["","none",se,le]}],blur:[{blur:D()}],brightness:[{brightness:[Ce,se,le]}],contrast:[{contrast:[Ce,se,le]}],"drop-shadow":[{"drop-shadow":["","none",N,ri,ii]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",Ce,se,le]}],"hue-rotate":[{"hue-rotate":[Ce,se,le]}],invert:[{invert:["",Ce,se,le]}],saturate:[{saturate:[Ce,se,le]}],sepia:[{sepia:["",Ce,se,le]}],"backdrop-filter":[{"backdrop-filter":["","none",se,le]}],"backdrop-blur":[{"backdrop-blur":D()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,se,le]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,se,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,se,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,se,le]}],"backdrop-invert":[{"backdrop-invert":["",Ce,se,le]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,se,le]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,se,le]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,se,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":W()}],"border-spacing-x":[{"border-spacing-x":W()}],"border-spacing-y":[{"border-spacing-y":W()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",se,le]}],ease:[{ease:["linear","initial",q,se,le]}],delay:[{delay:[Ce,se,le]}],animate:[{animate:["none",G,se,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[U,se,le]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:te()}],"skew-x":[{"skew-x":te()}],"skew-y":[{"skew-y":te()}],transform:[{transform:[se,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:P()}],"translate-x":[{"translate-x":P()}],"translate-y":[{"translate-y":P()}],"translate-z":[{"translate-z":P()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"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",se,le]}],"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":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,le]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Ce,js,Ha,iu]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},RS=mS(kS);function et(...s){return RS(Bg(s))}const BS=["top","right","bottom","left"],va=Math.min,Yt=Math.max,pi=Math.round,ci=Math.floor,Sn=s=>({x:s,y:s}),_S={left:"right",right:"left",bottom:"top",top:"bottom"},US={start:"end",end:"start"};function vu(s,o,c){return Yt(s,va(o,c))}function Vn(s,o){return typeof s=="function"?s(o):s}function Xn(s){return s.split("-")[0]}function _l(s){return s.split("-")[1]}function Ou(s){return s==="x"?"y":"x"}function zu(s){return s==="y"?"height":"width"}const LS=new Set(["top","bottom"]);function vn(s){return LS.has(Xn(s))?"y":"x"}function ju(s){return Ou(vn(s))}function HS(s,o,c){c===void 0&&(c=!1);const r=_l(s),u=ju(s),d=zu(u);let m=u==="x"?r===(c?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[d]>o.floating[d]&&(m=yi(m)),[m,yi(m)]}function qS(s){const o=yi(s);return[Su(s),o,Su(o)]}function Su(s){return s.replace(/start|end/g,o=>US[o])}const dg=["left","right"],mg=["right","left"],GS=["top","bottom"],YS=["bottom","top"];function VS(s,o,c){switch(s){case"top":case"bottom":return c?o?mg:dg:o?dg:mg;case"left":case"right":return o?GS:YS;default:return[]}}function XS(s,o,c,r){const u=_l(s);let d=VS(Xn(s),c==="start",r);return u&&(d=d.map(m=>m+"-"+u),o&&(d=d.concat(d.map(Su)))),d}function yi(s){return s.replace(/left|right|bottom|top/g,o=>_S[o])}function QS(s){return{top:0,right:0,bottom:0,left:0,...s}}function fp(s){return typeof s!="number"?QS(s):{top:s,right:s,bottom:s,left:s}}function bi(s){const{x:o,y:c,width:r,height:u}=s;return{width:r,height:u,top:c,left:o,right:o+r,bottom:c+u,x:o,y:c}}function hg(s,o,c){let{reference:r,floating:u}=s;const d=vn(o),m=ju(o),y=zu(m),p=Xn(o),b=d==="y",v=r.x+r.width/2-u.width/2,S=r.y+r.height/2-u.height/2,A=r[y]/2-u[y]/2;let N;switch(p){case"top":N={x:v,y:r.y-u.height};break;case"bottom":N={x:v,y:r.y+r.height};break;case"right":N={x:r.x+r.width,y:S};break;case"left":N={x:r.x-u.width,y:S};break;default:N={x:r.x,y:r.y}}switch(_l(o)){case"start":N[m]-=A*(c&&b?-1:1);break;case"end":N[m]+=A*(c&&b?-1:1);break}return N}async function ZS(s,o){var c;o===void 0&&(o={});const{x:r,y:u,platform:d,rects:m,elements:y,strategy:p}=s,{boundary:b="clippingAncestors",rootBoundary:v="viewport",elementContext:S="floating",altBoundary:A=!1,padding:N=0}=Vn(o,s),R=fp(N),E=y[A?S==="floating"?"reference":"floating":S],q=bi(await d.getClippingRect({element:(c=await(d.isElement==null?void 0:d.isElement(E)))==null||c?E:E.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(y.floating)),boundary:b,rootBoundary:v,strategy:p})),G=S==="floating"?{x:r,y:u,width:m.floating.width,height:m.floating.height}:m.reference,V=await(d.getOffsetParent==null?void 0:d.getOffsetParent(y.floating)),X=await(d.isElement==null?void 0:d.isElement(V))?await(d.getScale==null?void 0:d.getScale(V))||{x:1,y:1}:{x:1,y:1},j=bi(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:y,rect:G,offsetParent:V,strategy:p}):G);return{top:(q.top-j.top+R.top)/X.y,bottom:(j.bottom-q.bottom+R.bottom)/X.y,left:(q.left-j.left+R.left)/X.x,right:(j.right-q.right+R.right)/X.x}}const KS=async(s,o,c)=>{const{placement:r="bottom",strategy:u="absolute",middleware:d=[],platform:m}=c,y=d.filter(Boolean),p=await(m.isRTL==null?void 0:m.isRTL(o));let b=await m.getElementRects({reference:s,floating:o,strategy:u}),{x:v,y:S}=hg(b,r,p),A=r,N={},R=0;for(let E=0;E<y.length;E++){var U;const{name:q,fn:G}=y[E],{x:V,y:X,data:j,reset:I}=await G({x:v,y:S,initialPlacement:r,placement:A,strategy:u,middlewareData:N,rects:b,platform:{...m,detectOverflow:(U=m.detectOverflow)!=null?U:ZS},elements:{reference:s,floating:o}});v=V??v,S=X??S,N={...N,[q]:{...N[q],...j}},I&&R<=50&&(R++,typeof I=="object"&&(I.placement&&(A=I.placement),I.rects&&(b=I.rects===!0?await m.getElementRects({reference:s,floating:o,strategy:u}):I.rects),{x:v,y:S}=hg(b,A,p)),E=-1)}return{x:v,y:S,placement:A,strategy:u,middlewareData:N}},FS=s=>({name:"arrow",options:s,async fn(o){const{x:c,y:r,placement:u,rects:d,platform:m,elements:y,middlewareData:p}=o,{element:b,padding:v=0}=Vn(s,o)||{};if(b==null)return{};const S=fp(v),A={x:c,y:r},N=ju(u),R=zu(N),U=await m.getDimensions(b),E=N==="y",q=E?"top":"left",G=E?"bottom":"right",V=E?"clientHeight":"clientWidth",X=d.reference[R]+d.reference[N]-A[N]-d.floating[R],j=A[N]-d.reference[N],I=await(m.getOffsetParent==null?void 0:m.getOffsetParent(b));let ee=I?I[V]:0;(!ee||!await(m.isElement==null?void 0:m.isElement(I)))&&(ee=y.floating[V]||d.floating[R]);const W=X/2-j/2,re=ee/2-U[R]/2-1,Ae=va(S[q],re),de=va(S[G],re),ye=Ae,Me=ee-U[R]-de,xe=ee/2-U[R]/2+W,ie=vu(ye,xe,Me),M=!p.arrow&&_l(u)!=null&&xe!==ie&&d.reference[R]/2-(xe<ye?Ae:de)-U[R]/2<0,$=M?xe<ye?xe-ye:xe-Me:0;return{[N]:A[N]+$,data:{[N]:ie,centerOffset:xe-ie-$,...M&&{alignmentOffset:$}},reset:M}}}),JS=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(o){var c,r;const{placement:u,middlewareData:d,rects:m,initialPlacement:y,platform:p,elements:b}=o,{mainAxis:v=!0,crossAxis:S=!0,fallbackPlacements:A,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:U=!0,...E}=Vn(s,o);if((c=d.arrow)!=null&&c.alignmentOffset)return{};const q=Xn(u),G=vn(y),V=Xn(y)===y,X=await(p.isRTL==null?void 0:p.isRTL(b.floating)),j=A||(V||!U?[yi(y)]:qS(y)),I=R!=="none";!A&&I&&j.push(...XS(y,U,R,X));const ee=[y,...j],W=await p.detectOverflow(o,E),re=[];let Ae=((r=d.flip)==null?void 0:r.overflows)||[];if(v&&re.push(W[q]),S){const xe=HS(u,m,X);re.push(W[xe[0]],W[xe[1]])}if(Ae=[...Ae,{placement:u,overflows:re}],!re.every(xe=>xe<=0)){var de,ye;const xe=(((de=d.flip)==null?void 0:de.index)||0)+1,ie=ee[xe];if(ie&&(!(S==="alignment"?G!==vn(ie):!1)||Ae.every(_=>vn(_.placement)===G?_.overflows[0]>0:!0)))return{data:{index:xe,overflows:Ae},reset:{placement:ie}};let M=(ye=Ae.filter($=>$.overflows[0]<=0).sort(($,_)=>$.overflows[1]-_.overflows[1])[0])==null?void 0:ye.placement;if(!M)switch(N){case"bestFit":{var Me;const $=(Me=Ae.filter(_=>{if(I){const me=vn(_.placement);return me===G||me==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(me=>me>0).reduce((me,ge)=>me+ge,0)]).sort((_,me)=>_[1]-me[1])[0])==null?void 0:Me[0];$&&(M=$);break}case"initialPlacement":M=y;break}if(u!==M)return{reset:{placement:M}}}return{}}}};function gg(s,o){return{top:s.top-o.height,right:s.right-o.width,bottom:s.bottom-o.height,left:s.left-o.width}}function pg(s){return BS.some(o=>s[o]>=0)}const $S=function(s){return s===void 0&&(s={}),{name:"hide",options:s,async fn(o){const{rects:c,platform:r}=o,{strategy:u="referenceHidden",...d}=Vn(s,o);switch(u){case"referenceHidden":{const m=await r.detectOverflow(o,{...d,elementContext:"reference"}),y=gg(m,c.reference);return{data:{referenceHiddenOffsets:y,referenceHidden:pg(y)}}}case"escaped":{const m=await r.detectOverflow(o,{...d,altBoundary:!0}),y=gg(m,c.floating);return{data:{escapedOffsets:y,escaped:pg(y)}}}default:return{}}}}},dp=new Set(["left","top"]);async function IS(s,o){const{placement:c,platform:r,elements:u}=s,d=await(r.isRTL==null?void 0:r.isRTL(u.floating)),m=Xn(c),y=_l(c),p=vn(c)==="y",b=dp.has(m)?-1:1,v=d&&p?-1:1,S=Vn(o,s);let{mainAxis:A,crossAxis:N,alignmentAxis:R}=typeof S=="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};return y&&typeof R=="number"&&(N=y==="end"?R*-1:R),p?{x:N*v,y:A*b}:{x:A*b,y:N*v}}const PS=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(o){var c,r;const{x:u,y:d,placement:m,middlewareData:y}=o,p=await IS(o,s);return m===((c=y.offset)==null?void 0:c.placement)&&(r=y.arrow)!=null&&r.alignmentOffset?{}:{x:u+p.x,y:d+p.y,data:{...p,placement:m}}}}},WS=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(o){const{x:c,y:r,placement:u,platform:d}=o,{mainAxis:m=!0,crossAxis:y=!1,limiter:p={fn:q=>{let{x:G,y:V}=q;return{x:G,y:V}}},...b}=Vn(s,o),v={x:c,y:r},S=await d.detectOverflow(o,b),A=vn(Xn(u)),N=Ou(A);let R=v[N],U=v[A];if(m){const q=N==="y"?"top":"left",G=N==="y"?"bottom":"right",V=R+S[q],X=R-S[G];R=vu(V,R,X)}if(y){const q=A==="y"?"top":"left",G=A==="y"?"bottom":"right",V=U+S[q],X=U-S[G];U=vu(V,U,X)}const E=p.fn({...o,[N]:R,[A]:U});return{...E,data:{x:E.x-c,y:E.y-r,enabled:{[N]:m,[A]:y}}}}}},ex=function(s){return s===void 0&&(s={}),{options:s,fn(o){const{x:c,y:r,placement:u,rects:d,middlewareData:m}=o,{offset:y=0,mainAxis:p=!0,crossAxis:b=!0}=Vn(s,o),v={x:c,y:r},S=vn(u),A=Ou(S);let N=v[A],R=v[S];const U=Vn(y,o),E=typeof U=="number"?{mainAxis:U,crossAxis:0}:{mainAxis:0,crossAxis:0,...U};if(p){const V=A==="y"?"height":"width",X=d.reference[A]-d.floating[V]+E.mainAxis,j=d.reference[A]+d.reference[V]-E.mainAxis;N<X?N=X:N>j&&(N=j)}if(b){var q,G;const V=A==="y"?"width":"height",X=dp.has(Xn(u)),j=d.reference[S]-d.floating[V]+(X&&((q=m.offset)==null?void 0:q[S])||0)+(X?0:E.crossAxis),I=d.reference[S]+d.reference[V]+(X?0:((G=m.offset)==null?void 0:G[S])||0)-(X?E.crossAxis:0);R<j?R=j:R>I&&(R=I)}return{[A]:N,[S]:R}}}},tx=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(o){var c,r;const{placement:u,rects:d,platform:m,elements:y}=o,{apply:p=()=>{},...b}=Vn(s,o),v=await m.detectOverflow(o,b),S=Xn(u),A=_l(u),N=vn(u)==="y",{width:R,height:U}=d.floating;let E,q;S==="top"||S==="bottom"?(E=S,q=A===(await(m.isRTL==null?void 0:m.isRTL(y.floating))?"start":"end")?"left":"right"):(q=S,E=A==="end"?"top":"bottom");const G=U-v.top-v.bottom,V=R-v.left-v.right,X=va(U-v[E],G),j=va(R-v[q],V),I=!o.middlewareData.shift;let ee=X,W=j;if((c=o.middlewareData.shift)!=null&&c.enabled.x&&(W=V),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(ee=G),I&&!A){const Ae=Yt(v.left,0),de=Yt(v.right,0),ye=Yt(v.top,0),Me=Yt(v.bottom,0);N?W=R-2*(Ae!==0||de!==0?Ae+de:Yt(v.left,v.right)):ee=U-2*(ye!==0||Me!==0?ye+Me:Yt(v.top,v.bottom))}await p({...o,availableWidth:W,availableHeight:ee});const re=await m.getDimensions(y.floating);return R!==re.width||U!==re.height?{reset:{rects:!0}}:{}}}};function Ci(){return typeof window<"u"}function Ul(s){return mp(s)?(s.nodeName||"").toLowerCase():"#document"}function Xt(s){var o;return(s==null||(o=s.ownerDocument)==null?void 0:o.defaultView)||window}function Cn(s){var o;return(o=(mp(s)?s.ownerDocument:s.document)||window.document)==null?void 0:o.documentElement}function mp(s){return Ci()?s instanceof Node||s instanceof Xt(s).Node:!1}function fn(s){return Ci()?s instanceof Element||s instanceof Xt(s).Element:!1}function wn(s){return Ci()?s instanceof HTMLElement||s instanceof Xt(s).HTMLElement:!1}function yg(s){return!Ci()||typeof ShadowRoot>"u"?!1:s instanceof ShadowRoot||s instanceof Xt(s).ShadowRoot}const nx=new Set(["inline","contents"]);function Hs(s){const{overflow:o,overflowX:c,overflowY:r,display:u}=dn(s);return/auto|scroll|overlay|hidden|clip/.test(o+r+c)&&!nx.has(u)}const ax=new Set(["table","td","th"]);function lx(s){return ax.has(Ul(s))}const sx=[":popover-open",":modal"];function Ai(s){return sx.some(o=>{try{return s.matches(o)}catch{return!1}})}const ox=["transform","translate","scale","rotate","perspective"],ix=["transform","translate","scale","rotate","perspective","filter"],rx=["paint","layout","strict","content"];function Mu(s){const o=ku(),c=fn(s)?dn(s):s;return ox.some(r=>c[r]?c[r]!=="none":!1)||(c.containerType?c.containerType!=="normal":!1)||!o&&(c.backdropFilter?c.backdropFilter!=="none":!1)||!o&&(c.filter?c.filter!=="none":!1)||ix.some(r=>(c.willChange||"").includes(r))||rx.some(r=>(c.contain||"").includes(r))}function cx(s){let o=Sa(s);for(;wn(o)&&!jl(o);){if(Mu(o))return o;if(Ai(o))return null;o=Sa(o)}return null}function ku(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ux=new Set(["html","body","#document"]);function jl(s){return ux.has(Ul(s))}function dn(s){return Xt(s).getComputedStyle(s)}function Ei(s){return fn(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function Sa(s){if(Ul(s)==="html")return s;const o=s.assignedSlot||s.parentNode||yg(s)&&s.host||Cn(s);return yg(o)?o.host:o}function hp(s){const o=Sa(s);return jl(o)?s.ownerDocument?s.ownerDocument.body:s.body:wn(o)&&Hs(o)?o:hp(o)}function Bs(s,o,c){var r;o===void 0&&(o=[]),c===void 0&&(c=!0);const u=hp(s),d=u===((r=s.ownerDocument)==null?void 0:r.body),m=Xt(u);if(d){const y=xu(m);return o.concat(m,m.visualViewport||[],Hs(u)?u:[],y&&c?Bs(y):[])}return o.concat(u,Bs(u,[],c))}function xu(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function gp(s){const o=dn(s);let c=parseFloat(o.width)||0,r=parseFloat(o.height)||0;const u=wn(s),d=u?s.offsetWidth:c,m=u?s.offsetHeight:r,y=pi(c)!==d||pi(r)!==m;return y&&(c=d,r=m),{width:c,height:r,$:y}}function Ru(s){return fn(s)?s:s.contextElement}function zl(s){const o=Ru(s);if(!wn(o))return Sn(1);const c=o.getBoundingClientRect(),{width:r,height:u,$:d}=gp(o);let m=(d?pi(c.width):c.width)/r,y=(d?pi(c.height):c.height)/u;return(!m||!Number.isFinite(m))&&(m=1),(!y||!Number.isFinite(y))&&(y=1),{x:m,y}}const fx=Sn(0);function pp(s){const o=Xt(s);return!ku()||!o.visualViewport?fx:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function dx(s,o,c){return o===void 0&&(o=!1),!c||o&&c!==Xt(s)?!1:o}function Ga(s,o,c,r){o===void 0&&(o=!1),c===void 0&&(c=!1);const u=s.getBoundingClientRect(),d=Ru(s);let m=Sn(1);o&&(r?fn(r)&&(m=zl(r)):m=zl(s));const y=dx(d,c,r)?pp(d):Sn(0);let p=(u.left+y.x)/m.x,b=(u.top+y.y)/m.y,v=u.width/m.x,S=u.height/m.y;if(d){const A=Xt(d),N=r&&fn(r)?Xt(r):r;let R=A,U=xu(R);for(;U&&r&&N!==R;){const E=zl(U),q=U.getBoundingClientRect(),G=dn(U),V=q.left+(U.clientLeft+parseFloat(G.paddingLeft))*E.x,X=q.top+(U.clientTop+parseFloat(G.paddingTop))*E.y;p*=E.x,b*=E.y,v*=E.x,S*=E.y,p+=V,b+=X,R=Xt(U),U=xu(R)}}return bi({width:v,height:S,x:p,y:b})}function Ti(s,o){const c=Ei(s).scrollLeft;return o?o.left+c:Ga(Cn(s)).left+c}function yp(s,o){const c=s.getBoundingClientRect(),r=c.left+o.scrollLeft-Ti(s,c),u=c.top+o.scrollTop;return{x:r,y:u}}function mx(s){let{elements:o,rect:c,offsetParent:r,strategy:u}=s;const d=u==="fixed",m=Cn(r),y=o?Ai(o.floating):!1;if(r===m||y&&d)return c;let p={scrollLeft:0,scrollTop:0},b=Sn(1);const v=Sn(0),S=wn(r);if((S||!S&&!d)&&((Ul(r)!=="body"||Hs(m))&&(p=Ei(r)),wn(r))){const N=Ga(r);b=zl(r),v.x=N.x+r.clientLeft,v.y=N.y+r.clientTop}const A=m&&!S&&!d?yp(m,p):Sn(0);return{width:c.width*b.x,height:c.height*b.y,x:c.x*b.x-p.scrollLeft*b.x+v.x+A.x,y:c.y*b.y-p.scrollTop*b.y+v.y+A.y}}function hx(s){return Array.from(s.getClientRects())}function gx(s){const o=Cn(s),c=Ei(s),r=s.ownerDocument.body,u=Yt(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),d=Yt(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let m=-c.scrollLeft+Ti(s);const y=-c.scrollTop;return dn(r).direction==="rtl"&&(m+=Yt(o.clientWidth,r.clientWidth)-u),{width:u,height:d,x:m,y}}const bg=25;function px(s,o){const c=Xt(s),r=Cn(s),u=c.visualViewport;let d=r.clientWidth,m=r.clientHeight,y=0,p=0;if(u){d=u.width,m=u.height;const v=ku();(!v||v&&o==="fixed")&&(y=u.offsetLeft,p=u.offsetTop)}const b=Ti(r);if(b<=0){const v=r.ownerDocument,S=v.body,A=getComputedStyle(S),N=v.compatMode==="CSS1Compat"&&parseFloat(A.marginLeft)+parseFloat(A.marginRight)||0,R=Math.abs(r.clientWidth-S.clientWidth-N);R<=bg&&(d-=R)}else b<=bg&&(d+=b);return{width:d,height:m,x:y,y:p}}const yx=new Set(["absolute","fixed"]);function bx(s,o){const c=Ga(s,!0,o==="fixed"),r=c.top+s.clientTop,u=c.left+s.clientLeft,d=wn(s)?zl(s):Sn(1),m=s.clientWidth*d.x,y=s.clientHeight*d.y,p=u*d.x,b=r*d.y;return{width:m,height:y,x:p,y:b}}function vg(s,o,c){let r;if(o==="viewport")r=px(s,c);else if(o==="document")r=gx(Cn(s));else if(fn(o))r=bx(o,c);else{const u=pp(s);r={x:o.x-u.x,y:o.y-u.y,width:o.width,height:o.height}}return bi(r)}function bp(s,o){const c=Sa(s);return c===o||!fn(c)||jl(c)?!1:dn(c).position==="fixed"||bp(c,o)}function vx(s,o){const c=o.get(s);if(c)return c;let r=Bs(s,[],!1).filter(y=>fn(y)&&Ul(y)!=="body"),u=null;const d=dn(s).position==="fixed";let m=d?Sa(s):s;for(;fn(m)&&!jl(m);){const y=dn(m),p=Mu(m);!p&&y.position==="fixed"&&(u=null),(d?!p&&!u:!p&&y.position==="static"&&!!u&&yx.has(u.position)||Hs(m)&&!p&&bp(s,m))?r=r.filter(v=>v!==m):u=y,m=Sa(m)}return o.set(s,r),r}function Sx(s){let{element:o,boundary:c,rootBoundary:r,strategy:u}=s;const m=[...c==="clippingAncestors"?Ai(o)?[]:vx(o,this._c):[].concat(c),r],y=m[0],p=m.reduce((b,v)=>{const S=vg(o,v,u);return b.top=Yt(S.top,b.top),b.right=va(S.right,b.right),b.bottom=va(S.bottom,b.bottom),b.left=Yt(S.left,b.left),b},vg(o,y,u));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function xx(s){const{width:o,height:c}=gp(s);return{width:o,height:c}}function wx(s,o,c){const r=wn(o),u=Cn(o),d=c==="fixed",m=Ga(s,!0,d,o);let y={scrollLeft:0,scrollTop:0};const p=Sn(0);function b(){p.x=Ti(u)}if(r||!r&&!d)if((Ul(o)!=="body"||Hs(u))&&(y=Ei(o)),r){const N=Ga(o,!0,d,o);p.x=N.x+o.clientLeft,p.y=N.y+o.clientTop}else u&&b();d&&!r&&u&&b();const v=u&&!r&&!d?yp(u,y):Sn(0),S=m.left+y.scrollLeft-p.x-v.x,A=m.top+y.scrollTop-p.y-v.y;return{x:S,y:A,width:m.width,height:m.height}}function ru(s){return dn(s).position==="static"}function Sg(s,o){if(!wn(s)||dn(s).position==="fixed")return null;if(o)return o(s);let c=s.offsetParent;return Cn(s)===c&&(c=c.ownerDocument.body),c}function vp(s,o){const c=Xt(s);if(Ai(s))return c;if(!wn(s)){let u=Sa(s);for(;u&&!jl(u);){if(fn(u)&&!ru(u))return u;u=Sa(u)}return c}let r=Sg(s,o);for(;r&&lx(r)&&ru(r);)r=Sg(r,o);return r&&jl(r)&&ru(r)&&!Mu(r)?c:r||cx(s)||c}const Cx=async function(s){const o=this.getOffsetParent||vp,c=this.getDimensions,r=await c(s.floating);return{reference:wx(s.reference,await o(s.floating),s.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ax(s){return dn(s).direction==="rtl"}const Ex={convertOffsetParentRelativeRectToViewportRelativeRect:mx,getDocumentElement:Cn,getClippingRect:Sx,getOffsetParent:vp,getElementRects:Cx,getClientRects:hx,getDimensions:xx,getScale:zl,isElement:fn,isRTL:Ax};function Sp(s,o){return s.x===o.x&&s.y===o.y&&s.width===o.width&&s.height===o.height}function Tx(s,o){let c=null,r;const u=Cn(s);function d(){var y;clearTimeout(r),(y=c)==null||y.disconnect(),c=null}function m(y,p){y===void 0&&(y=!1),p===void 0&&(p=1),d();const b=s.getBoundingClientRect(),{left:v,top:S,width:A,height:N}=b;if(y||o(),!A||!N)return;const R=ci(S),U=ci(u.clientWidth-(v+A)),E=ci(u.clientHeight-(S+N)),q=ci(v),V={rootMargin:-R+"px "+-U+"px "+-E+"px "+-q+"px",threshold:Yt(0,va(1,p))||1};let X=!0;function j(I){const ee=I[0].intersectionRatio;if(ee!==p){if(!X)return m();ee?m(!1,ee):r=setTimeout(()=>{m(!1,1e-7)},1e3)}ee===1&&!Sp(b,s.getBoundingClientRect())&&m(),X=!1}try{c=new IntersectionObserver(j,{...V,root:u.ownerDocument})}catch{c=new IntersectionObserver(j,V)}c.observe(s)}return m(!0),d}function Dx(s,o,c,r){r===void 0&&(r={});const{ancestorScroll:u=!0,ancestorResize:d=!0,elementResize:m=typeof ResizeObserver=="function",layoutShift:y=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,b=Ru(s),v=u||d?[...b?Bs(b):[],...Bs(o)]:[];v.forEach(q=>{u&&q.addEventListener("scroll",c,{passive:!0}),d&&q.addEventListener("resize",c)});const S=b&&y?Tx(b,c):null;let A=-1,N=null;m&&(N=new ResizeObserver(q=>{let[G]=q;G&&G.target===b&&N&&(N.unobserve(o),cancelAnimationFrame(A),A=requestAnimationFrame(()=>{var V;(V=N)==null||V.observe(o)})),c()}),b&&!p&&N.observe(b),N.observe(o));let R,U=p?Ga(s):null;p&&E();function E(){const q=Ga(s);U&&!Sp(U,q)&&c(),U=q,R=requestAnimationFrame(E)}return c(),()=>{var q;v.forEach(G=>{u&&G.removeEventListener("scroll",c),d&&G.removeEventListener("resize",c)}),S?.(),(q=N)==null||q.disconnect(),N=null,p&&cancelAnimationFrame(R)}}const Nx=PS,Ox=WS,zx=JS,jx=tx,Mx=$S,xg=FS,kx=ex,Rx=(s,o,c)=>{const r=new Map,u={platform:Ex,...c},d={...u.platform,_c:r};return KS(s,o,{...u,platform:d})};var Bx=typeof document<"u",_x=function(){},di=Bx?x.useLayoutEffect:_x;function vi(s,o){if(s===o)return!0;if(typeof s!=typeof o)return!1;if(typeof s=="function"&&s.toString()===o.toString())return!0;let c,r,u;if(s&&o&&typeof s=="object"){if(Array.isArray(s)){if(c=s.length,c!==o.length)return!1;for(r=c;r--!==0;)if(!vi(s[r],o[r]))return!1;return!0}if(u=Object.keys(s),c=u.length,c!==Object.keys(o).length)return!1;for(r=c;r--!==0;)if(!{}.hasOwnProperty.call(o,u[r]))return!1;for(r=c;r--!==0;){const d=u[r];if(!(d==="_owner"&&s.$$typeof)&&!vi(s[d],o[d]))return!1}return!0}return s!==s&&o!==o}function xp(s){return typeof window>"u"?1:(s.ownerDocument.defaultView||window).devicePixelRatio||1}function wg(s,o){const c=xp(s);return Math.round(o*c)/c}function cu(s){const o=x.useRef(s);return di(()=>{o.current=s}),o}function Ux(s){s===void 0&&(s={});const{placement:o="bottom",strategy:c="absolute",middleware:r=[],platform:u,elements:{reference:d,floating:m}={},transform:y=!0,whileElementsMounted:p,open:b}=s,[v,S]=x.useState({x:0,y:0,strategy:c,placement:o,middlewareData:{},isPositioned:!1}),[A,N]=x.useState(r);vi(A,r)||N(r);const[R,U]=x.useState(null),[E,q]=x.useState(null),G=x.useCallback(_=>{_!==I.current&&(I.current=_,U(_))},[]),V=x.useCallback(_=>{_!==ee.current&&(ee.current=_,q(_))},[]),X=d||R,j=m||E,I=x.useRef(null),ee=x.useRef(null),W=x.useRef(v),re=p!=null,Ae=cu(p),de=cu(u),ye=cu(b),Me=x.useCallback(()=>{if(!I.current||!ee.current)return;const _={placement:o,strategy:c,middleware:A};de.current&&(_.platform=de.current),Rx(I.current,ee.current,_).then(me=>{const ge={...me,isPositioned:ye.current!==!1};xe.current&&!vi(W.current,ge)&&(W.current=ge,Xv.flushSync(()=>{S(ge)}))})},[A,o,c,de,ye]);di(()=>{b===!1&&W.current.isPositioned&&(W.current.isPositioned=!1,S(_=>({..._,isPositioned:!1})))},[b]);const xe=x.useRef(!1);di(()=>(xe.current=!0,()=>{xe.current=!1}),[]),di(()=>{if(X&&(I.current=X),j&&(ee.current=j),X&&j){if(Ae.current)return Ae.current(X,j,Me);Me()}},[X,j,Me,Ae,re]);const ie=x.useMemo(()=>({reference:I,floating:ee,setReference:G,setFloating:V}),[G,V]),M=x.useMemo(()=>({reference:X,floating:j}),[X,j]),$=x.useMemo(()=>{const _={position:c,left:0,top:0};if(!M.floating)return _;const me=wg(M.floating,v.x),ge=wg(M.floating,v.y);return y?{..._,transform:"translate("+me+"px, "+ge+"px)",...xp(M.floating)>=1.5&&{willChange:"transform"}}:{position:c,left:me,top:ge}},[c,y,M.floating,v.x,v.y]);return x.useMemo(()=>({...v,update:Me,refs:ie,elements:M,floatingStyles:$}),[v,Me,ie,M,$])}const Lx=s=>{function o(c){return{}.hasOwnProperty.call(c,"current")}return{name:"arrow",options:s,fn(c){const{element:r,padding:u}=typeof s=="function"?s(c):s;return r&&o(r)?r.current!=null?xg({element:r.current,padding:u}).fn(c):{}:r?xg({element:r,padding:u}).fn(c):{}}}},Hx=(s,o)=>({...Nx(s),options:[s,o]}),qx=(s,o)=>({...Ox(s),options:[s,o]}),Gx=(s,o)=>({...kx(s),options:[s,o]}),Yx=(s,o)=>({...zx(s),options:[s,o]}),Vx=(s,o)=>({...jx(s),options:[s,o]}),Xx=(s,o)=>({...Mx(s),options:[s,o]}),Qx=(s,o)=>({...Lx(s),options:[s,o]});var Zx="Arrow",wp=x.forwardRef((s,o)=>{const{children:c,width:r=10,height:u=5,...d}=s;return h.jsx(Ls.svg,{...d,ref:o,width:r,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:s.asChild?c:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});wp.displayName=Zx;var Kx=wp;function Fx(s){const[o,c]=x.useState(void 0);return fu(()=>{if(s){c({width:s.offsetWidth,height:s.offsetHeight});const r=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const d=u[0];let m,y;if("borderBoxSize"in d){const p=d.borderBoxSize,b=Array.isArray(p)?p[0]:p;m=b.inlineSize,y=b.blockSize}else m=s.offsetWidth,y=s.offsetHeight;c({width:m,height:y})});return r.observe(s,{box:"border-box"}),()=>r.unobserve(s)}else c(void 0)},[s]),o}var Bu="Popper",[Cp,Ap]=Dg(Bu),[Jx,Ep]=Cp(Bu),Tp=s=>{const{__scopePopper:o,children:c}=s,[r,u]=x.useState(null);return h.jsx(Jx,{scope:o,anchor:r,onAnchorChange:u,children:c})};Tp.displayName=Bu;var Dp="PopperAnchor",Np=x.forwardRef((s,o)=>{const{__scopePopper:c,virtualRef:r,...u}=s,d=Ep(Dp,c),m=x.useRef(null),y=Si(o,m),p=x.useRef(null);return x.useEffect(()=>{const b=p.current;p.current=r?.current||m.current,b!==p.current&&d.onAnchorChange(p.current)}),r?null:h.jsx(Ls.div,{...u,ref:y})});Np.displayName=Dp;var _u="PopperContent",[$x,Ix]=Cp(_u),Op=x.forwardRef((s,o)=>{const{__scopePopper:c,side:r="bottom",sideOffset:u=0,align:d="center",alignOffset:m=0,arrowPadding:y=0,avoidCollisions:p=!0,collisionBoundary:b=[],collisionPadding:v=0,sticky:S="partial",hideWhenDetached:A=!1,updatePositionStrategy:N="optimized",onPlaced:R,...U}=s,E=Ep(_u,c),[q,G]=x.useState(null),V=Si(o,L=>G(L)),[X,j]=x.useState(null),I=Fx(X),ee=I?.width??0,W=I?.height??0,re=r+(d!=="center"?"-"+d:""),Ae=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},de=Array.isArray(b)?b:[b],ye=de.length>0,Me={padding:Ae,boundary:de.filter(Wx),altBoundary:ye},{refs:xe,floatingStyles:ie,placement:M,isPositioned:$,middlewareData:_}=Ux({strategy:"fixed",placement:re,whileElementsMounted:(...L)=>Dx(...L,{animationFrame:N==="always"}),elements:{reference:E.anchor},middleware:[Hx({mainAxis:u+W,alignmentAxis:m}),p&&qx({mainAxis:!0,crossAxis:!1,limiter:S==="partial"?Gx():void 0,...Me}),p&&Yx({...Me}),Vx({...Me,apply:({elements:L,rects:D,availableWidth:K,availableHeight:J})=>{const{width:te,height:P}=D.reference,ce=L.floating.style;ce.setProperty("--radix-popper-available-width",`${K}px`),ce.setProperty("--radix-popper-available-height",`${J}px`),ce.setProperty("--radix-popper-anchor-width",`${te}px`),ce.setProperty("--radix-popper-anchor-height",`${P}px`)}}),X&&Qx({element:X,padding:y}),e1({arrowWidth:ee,arrowHeight:W}),A&&Xx({strategy:"referenceHidden",...Me})]}),[me,ge]=Mp(M),Qe=iv(R);fu(()=>{$&&Qe?.()},[$,Qe]);const Ee=_.arrow?.x,fe=_.arrow?.y,be=_.arrow?.centerOffset!==0,[Ie,Q]=x.useState();return fu(()=>{q&&Q(window.getComputedStyle(q).zIndex)},[q]),h.jsx("div",{ref:xe.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:$?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ie,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:s.dir,children:h.jsx($x,{scope:c,placedSide:me,onArrowChange:j,arrowX:Ee,arrowY:fe,shouldHideArrow:be,children:h.jsx(Ls.div,{"data-side":me,"data-align":ge,...U,ref:V,style:{...U.style,animation:$?void 0:"none"}})})})});Op.displayName=_u;var zp="PopperArrow",Px={top:"bottom",right:"left",bottom:"top",left:"right"},jp=x.forwardRef(function(o,c){const{__scopePopper:r,...u}=o,d=Ix(zp,r),m=Px[d.placedSide];return h.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[m]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:h.jsx(Kx,{...u,ref:c,style:{...u.style,display:"block"}})})});jp.displayName=zp;function Wx(s){return s!==null}var e1=s=>({name:"transformOrigin",options:s,fn(o){const{placement:c,rects:r,middlewareData:u}=o,m=u.arrow?.centerOffset!==0,y=m?0:s.arrowWidth,p=m?0:s.arrowHeight,[b,v]=Mp(c),S={start:"0%",center:"50%",end:"100%"}[v],A=(u.arrow?.x??0)+y/2,N=(u.arrow?.y??0)+p/2;let R="",U="";return b==="bottom"?(R=m?S:`${A}px`,U=`${-p}px`):b==="top"?(R=m?S:`${A}px`,U=`${r.floating.height+p}px`):b==="right"?(R=`${-p}px`,U=m?S:`${N}px`):b==="left"&&(R=`${r.floating.width+p}px`,U=m?S:`${N}px`),{data:{x:R,y:U}}}});function Mp(s){const[o,c="center"]=s.split("-");return[o,c]}var t1=Tp,n1=Np,a1=Op,l1=jp,s1=Symbol("radix.slottable");function o1(s){const o=({children:c})=>h.jsx(h.Fragment,{children:c});return o.displayName=`${s}.Slottable`,o.__radixId=s1,o}var i1=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"}),r1="VisuallyHidden",kp=x.forwardRef((s,o)=>h.jsx(Ls.span,{...s,ref:o,style:{...i1,...s.style}}));kp.displayName=r1;var c1=kp,[Di]=Dg("Tooltip",[Ap]),Ni=Ap(),Rp="TooltipProvider",u1=700,wu="tooltip.open",[f1,Uu]=Di(Rp),Bp=s=>{const{__scopeTooltip:o,delayDuration:c=u1,skipDelayDuration:r=300,disableHoverableContent:u=!1,children:d}=s,m=x.useRef(!0),y=x.useRef(!1),p=x.useRef(0);return x.useEffect(()=>{const b=p.current;return()=>window.clearTimeout(b)},[]),h.jsx(f1,{scope:o,isOpenDelayedRef:m,delayDuration:c,onOpen:x.useCallback(()=>{window.clearTimeout(p.current),m.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>m.current=!0,r)},[r]),isPointerInTransitRef:y,onPointerInTransitChange:x.useCallback(b=>{y.current=b},[]),disableHoverableContent:u,children:d})};Bp.displayName=Rp;var _s="Tooltip",[d1,qs]=Di(_s),_p=s=>{const{__scopeTooltip:o,children:c,open:r,defaultOpen:u,onOpenChange:d,disableHoverableContent:m,delayDuration:y}=s,p=Uu(_s,s.__scopeTooltip),b=Ni(o),[v,S]=x.useState(null),A=uv(),N=x.useRef(0),R=m??p.disableHoverableContent,U=y??p.delayDuration,E=x.useRef(!1),[q,G]=fv({prop:r,defaultProp:u??!1,onChange:ee=>{ee?(p.onOpen(),document.dispatchEvent(new CustomEvent(wu))):p.onClose(),d?.(ee)},caller:_s}),V=x.useMemo(()=>q?E.current?"delayed-open":"instant-open":"closed",[q]),X=x.useCallback(()=>{window.clearTimeout(N.current),N.current=0,E.current=!1,G(!0)},[G]),j=x.useCallback(()=>{window.clearTimeout(N.current),N.current=0,G(!1)},[G]),I=x.useCallback(()=>{window.clearTimeout(N.current),N.current=window.setTimeout(()=>{E.current=!0,G(!0),N.current=0},U)},[U,G]);return x.useEffect(()=>()=>{N.current&&(window.clearTimeout(N.current),N.current=0)},[]),h.jsx(t1,{...b,children:h.jsx(d1,{scope:o,contentId:A,open:q,stateAttribute:V,trigger:v,onTriggerChange:S,onTriggerEnter:x.useCallback(()=>{p.isOpenDelayedRef.current?I():X()},[p.isOpenDelayedRef,I,X]),onTriggerLeave:x.useCallback(()=>{R?j():(window.clearTimeout(N.current),N.current=0)},[j,R]),onOpen:X,onClose:j,disableHoverableContent:R,children:c})})};_p.displayName=_s;var Cu="TooltipTrigger",Up=x.forwardRef((s,o)=>{const{__scopeTooltip:c,...r}=s,u=qs(Cu,c),d=Uu(Cu,c),m=Ni(c),y=x.useRef(null),p=Si(o,y,u.onTriggerChange),b=x.useRef(!1),v=x.useRef(!1),S=x.useCallback(()=>b.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",S),[S]),h.jsx(n1,{asChild:!0,...m,children:h.jsx(Ls.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...r,ref:p,onPointerMove:Dl(s.onPointerMove,A=>{A.pointerType!=="touch"&&!v.current&&!d.isPointerInTransitRef.current&&(u.onTriggerEnter(),v.current=!0)}),onPointerLeave:Dl(s.onPointerLeave,()=>{u.onTriggerLeave(),v.current=!1}),onPointerDown:Dl(s.onPointerDown,()=>{u.open&&u.onClose(),b.current=!0,document.addEventListener("pointerup",S,{once:!0})}),onFocus:Dl(s.onFocus,()=>{b.current||u.onOpen()}),onBlur:Dl(s.onBlur,u.onClose),onClick:Dl(s.onClick,u.onClose)})})});Up.displayName=Cu;var Lu="TooltipPortal",[m1,h1]=Di(Lu,{forceMount:void 0}),Lp=s=>{const{__scopeTooltip:o,forceMount:c,children:r,container:u}=s,d=qs(Lu,o);return h.jsx(m1,{scope:o,forceMount:c,children:h.jsx(Ng,{present:c||d.open,children:h.jsx(rv,{asChild:!0,container:u,children:r})})})};Lp.displayName=Lu;var Ml="TooltipContent",Hp=x.forwardRef((s,o)=>{const c=h1(Ml,s.__scopeTooltip),{forceMount:r=c.forceMount,side:u="top",...d}=s,m=qs(Ml,s.__scopeTooltip);return h.jsx(Ng,{present:r||m.open,children:m.disableHoverableContent?h.jsx(qp,{side:u,...d,ref:o}):h.jsx(g1,{side:u,...d,ref:o})})}),g1=x.forwardRef((s,o)=>{const c=qs(Ml,s.__scopeTooltip),r=Uu(Ml,s.__scopeTooltip),u=x.useRef(null),d=Si(o,u),[m,y]=x.useState(null),{trigger:p,onClose:b}=c,v=u.current,{onPointerInTransitChange:S}=r,A=x.useCallback(()=>{y(null),S(!1)},[S]),N=x.useCallback((R,U)=>{const E=R.currentTarget,q={x:R.clientX,y:R.clientY},G=S1(q,E.getBoundingClientRect()),V=x1(q,G),X=w1(U.getBoundingClientRect()),j=A1([...V,...X]);y(j),S(!0)},[S]);return x.useEffect(()=>()=>A(),[A]),x.useEffect(()=>{if(p&&v){const R=E=>N(E,v),U=E=>N(E,p);return p.addEventListener("pointerleave",R),v.addEventListener("pointerleave",U),()=>{p.removeEventListener("pointerleave",R),v.removeEventListener("pointerleave",U)}}},[p,v,N,A]),x.useEffect(()=>{if(m){const R=U=>{const E=U.target,q={x:U.clientX,y:U.clientY},G=p?.contains(E)||v?.contains(E),V=!C1(q,m);G?A():V&&(A(),b())};return document.addEventListener("pointermove",R),()=>document.removeEventListener("pointermove",R)}},[p,v,m,b,A]),h.jsx(qp,{...s,ref:d})}),[p1,y1]=Di(_s,{isInside:!1}),b1=o1("TooltipContent"),qp=x.forwardRef((s,o)=>{const{__scopeTooltip:c,children:r,"aria-label":u,onEscapeKeyDown:d,onPointerDownOutside:m,...y}=s,p=qs(Ml,c),b=Ni(c),{onClose:v}=p;return x.useEffect(()=>(document.addEventListener(wu,v),()=>document.removeEventListener(wu,v)),[v]),x.useEffect(()=>{if(p.trigger){const S=A=>{A.target?.contains(p.trigger)&&v()};return window.addEventListener("scroll",S,{capture:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})}},[p.trigger,v]),h.jsx(cv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:S=>S.preventDefault(),onDismiss:v,children:h.jsxs(a1,{"data-state":p.stateAttribute,...b,...y,ref:o,style:{...y.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(b1,{children:r}),h.jsx(p1,{scope:c,isInside:!0,children:h.jsx(c1,{id:p.contentId,role:"tooltip",children:u||r})})]})})});Hp.displayName=Ml;var Gp="TooltipArrow",v1=x.forwardRef((s,o)=>{const{__scopeTooltip:c,...r}=s,u=Ni(c);return y1(Gp,c).isInside?null:h.jsx(l1,{...u,...r,ref:o})});v1.displayName=Gp;function S1(s,o){const c=Math.abs(o.top-s.y),r=Math.abs(o.bottom-s.y),u=Math.abs(o.right-s.x),d=Math.abs(o.left-s.x);switch(Math.min(c,r,u,d)){case d:return"left";case u:return"right";case c:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function x1(s,o,c=5){const r=[];switch(o){case"top":r.push({x:s.x-c,y:s.y+c},{x:s.x+c,y:s.y+c});break;case"bottom":r.push({x:s.x-c,y:s.y-c},{x:s.x+c,y:s.y-c});break;case"left":r.push({x:s.x+c,y:s.y-c},{x:s.x+c,y:s.y+c});break;case"right":r.push({x:s.x-c,y:s.y-c},{x:s.x-c,y:s.y+c});break}return r}function w1(s){const{top:o,right:c,bottom:r,left:u}=s;return[{x:u,y:o},{x:c,y:o},{x:c,y:r},{x:u,y:r}]}function C1(s,o){const{x:c,y:r}=s;let u=!1;for(let d=0,m=o.length-1;d<o.length;m=d++){const y=o[d],p=o[m],b=y.x,v=y.y,S=p.x,A=p.y;v>r!=A>r&&c<(S-b)*(r-v)/(A-v)+b&&(u=!u)}return u}function A1(s){const o=s.slice();return o.sort((c,r)=>c.x<r.x?-1:c.x>r.x?1:c.y<r.y?-1:c.y>r.y?1:0),E1(o)}function E1(s){if(s.length<=1)return s.slice();const o=[];for(let r=0;r<s.length;r++){const u=s[r];for(;o.length>=2;){const d=o[o.length-1],m=o[o.length-2];if((d.x-m.x)*(u.y-m.y)>=(d.y-m.y)*(u.x-m.x))o.pop();else break}o.push(u)}o.pop();const c=[];for(let r=s.length-1;r>=0;r--){const u=s[r];for(;c.length>=2;){const d=c[c.length-1],m=c[c.length-2];if((d.x-m.x)*(u.y-m.y)>=(d.y-m.y)*(u.x-m.x))c.pop();else break}c.push(u)}return c.pop(),o.length===1&&c.length===1&&o[0].x===c[0].x&&o[0].y===c[0].y?o:o.concat(c)}var T1=Bp,D1=_p,N1=Up,O1=Lp,Yp=Hp;const Vp=T1,z1=D1,j1=N1,Xp=x.forwardRef(({className:s,sideOffset:o=4,...c},r)=>h.jsx(O1,{children:h.jsx(Yp,{ref:r,sideOffset:o,className:et("z-50 overflow-hidden rounded-md bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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","border border-border",s),...c})}));Xp.displayName=Yp.displayName;function Us({content:s,children:o,side:c="top",align:r="center",delayDuration:u=300,className:d,shortcut:m}){return h.jsxs(z1,{delayDuration:u,children:[h.jsx(j1,{asChild:!0,children:o}),h.jsx(Xp,{side:c,align:r,className:d,children:h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{children:s}),m&&h.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-mono bg-muted rounded border border-border",children:m})]})})]})}function M1(){const[s,o]=x.useState(!1),[c,r]=x.useState(!1),[u,d]=x.useState("win32"),[m,y]=x.useState(0),[p,b]=x.useState(!1),v=x.useRef(void 0);x.useEffect(()=>{if(typeof window.electronAPI>"u"){console.warn("TitleBar: electronAPI not available (running in browser mode?)");return}window.electronAPI.getPlatform().then(j=>d(j)),window.electronAPI.isMaximized().then(o),window.electronAPI.isAlwaysOnTop().then(r);const G=window.electronAPI.onWindowMaximized(()=>o(!0)),V=window.electronAPI.onWindowUnmaximized(()=>o(!1)),X=window.electronAPI.onAlwaysOnTopChanged(j=>r(j));return()=>{G(),V(),X()}},[]);const S=()=>window.electronAPI?.minimizeWindow(),A=()=>window.electronAPI?.maximizeWindow(),N=()=>window.electronAPI?.closeWindow(),R=()=>{window.electronAPI?.setAlwaysOnTop(!c)},U=()=>{v.current&&clearTimeout(v.current);const G=m+1;y(G),G===5?(window.electronAPI?.openDevTools(),b(!0),setTimeout(()=>b(!1),3e3),y(0)):v.current=setTimeout(()=>{y(0)},2e3)};x.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const E=u==="win32",q=u==="darwin";return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"h-8 bg-background/80 backdrop-blur-xl border-b border-border flex items-center justify-between drag-region relative",children:[h.jsxs("button",{onClick:U,className:"flex items-center gap-2 px-3 no-drag hover:bg-muted/50 transition-colors",children:[h.jsx("div",{className:"w-4 h-4 rounded bg-primary/20"}),h.jsx("span",{className:"text-xs font-medium text-muted-foreground select-none",children:"Documentation Hub"})]}),E&&h.jsx(Vp,{children:h.jsxs("div",{className:"flex no-drag",children:[h.jsx(Us,{content:c?"Unpin from top":"Pin on top",children:h.jsx("button",{onClick:R,className:et("px-3 h-8 hover:bg-muted transition-colors","focus:outline-none focus-visible:bg-muted",c&&"text-primary bg-primary/10"),"aria-label":c?"Unpin from top":"Pin on top",children:c?h.jsx(dv,{className:"w-3 h-3"}):h.jsx(mv,{className:"w-3 h-3"})})}),h.jsx("button",{onClick:S,className:et("px-4 h-8 hover:bg-muted transition-colors","focus:outline-none focus-visible:bg-muted"),"aria-label":"Minimize",children:h.jsx(hv,{className:"w-3 h-3"})}),h.jsx("button",{onClick:A,className:et("px-4 h-8 hover:bg-muted transition-colors","focus:outline-none focus-visible:bg-muted"),"aria-label":s?"Restore":"Maximize",children:h.jsx(gv,{className:"w-2.5 h-2.5"})}),h.jsx("button",{onClick:N,className:et("px-4 h-8 hover:bg-destructive hover:text-destructive-foreground transition-colors","focus:outline-none focus-visible:bg-destructive focus-visible:text-destructive-foreground"),"aria-label":"Close",children:h.jsx(Ya,{className:"w-3.5 h-3.5"})})]})}),q&&h.jsxs("div",{className:"flex gap-2 px-3 no-drag",children:[h.jsx("button",{onClick:N,className:"w-3 h-3 rounded-full bg-red-500 hover:bg-red-600 transition-colors","aria-label":"Close"}),h.jsx("button",{onClick:S,className:"w-3 h-3 rounded-full bg-yellow-500 hover:bg-yellow-600 transition-colors","aria-label":"Minimize"}),h.jsx("button",{onClick:A,className:"w-3 h-3 rounded-full bg-green-500 hover:bg-green-600 transition-colors","aria-label":"Maximize"})]})]}),h.jsx(ba,{children:p&&h.jsx(Xe.div,{initial:{opacity:0,y:-50},animate:{opacity:1,y:0},exit:{opacity:0,y:-50},className:"fixed top-12 left-1/2 transform -translate-x-1/2 z-[9999]",children:h.jsx("div",{className:"bg-primary text-primary-foreground px-4 py-2 rounded-lg shadow-lg flex items-center gap-2",children:h.jsx("span",{className:"text-sm font-medium",children:"🔧 Debug Mode Activated"})})})})]})}const Cg=""+new URL("../icon.png",import.meta.url).href,k1=x.memo(function(){const[o,c]=x.useState(!1),[r,u]=x.useState(0),d=x.useRef(null),m=wi(),y=Rg(),{sessions:p,activeSessions:b,closeSession:v}=X0();x.useEffect(()=>(r>0&&(d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(0)},2e3)),()=>{d.current&&clearTimeout(d.current)}),[r]),x.useEffect(()=>{const E=q=>{(q.ctrlKey||q.metaKey)&&q.key==="q"&&(q.preventDefault(),c(G=>!G))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const S=x.useCallback(()=>{const E=r+1;u(E),E===5&&(window.electronAPI.openDevTools(),u(0))},[r]),A=x.useCallback(E=>{m(E)},[m]),N=x.useMemo(()=>{const E=[],q=[{id:"home",label:"Dashboard",icon:Au,path:"/",shortcut:"Ctrl+1"}];return b.forEach(G=>{q.push({id:`session-${G.id}`,label:G.name,icon:_h,path:`/session/${G.id}`,indented:!0,closeable:!0,onClose:()=>v(G.id)})}),E.push({items:q}),E.push({title:"Workspace",items:[{id:"sessions",label:"Sessions",icon:Og,path:"/sessions",shortcut:"Ctrl+2"},{id:"analytics",label:"Analytics",icon:pv,path:"/analytics",shortcut:"Ctrl+3"},{id:"documents",label:"Documents",icon:zg,path:"/documents",shortcut:"Ctrl+4"},{id:"reporting",label:"Reporting",icon:yv,path:"/reporting",shortcut:"Ctrl+5"}]}),E},[b,v]),R=x.useMemo(()=>[{id:"settings",label:"Settings",icon:jg,path:"/settings",shortcut:"Ctrl+,"}],[]),U=E=>{const q=E.icon,G=y.pathname===E.path,V=h.jsx("div",{className:et("relative group",E.indented&&!o&&"ml-4",E.indented&&o&&"ml-0"),children:h.jsxs("button",{type:"button",onClick:()=>A(E.path),className:et("w-full flex items-center gap-3 px-3 py-2 rounded-lg transition-all duration-200","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",G&&"bg-primary text-primary-foreground hover:bg-primary/90",o&&"justify-center"),children:[h.jsxs("div",{className:"flex items-center gap-3 flex-1 pointer-events-none",children:[E.indented&&!o&&h.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:h.jsx(_h,{className:"w-2 h-2"})}),(!E.indented||o)&&h.jsx(q,{className:et("w-4 h-4 flex-shrink-0",o&&"w-5 h-5")}),h.jsx(ba,{mode:"wait",children:!o&&h.jsx(Xe.span,{initial:{opacity:0,width:0},animate:{opacity:1,width:"auto"},exit:{opacity:0,width:0},transition:{duration:.2},className:"text-sm font-medium whitespace-nowrap overflow-hidden flex-1 text-left",children:E.label})})]}),E.closeable&&!o&&h.jsx("div",{role:"button",tabIndex:0,onClick:X=>{X.stopPropagation(),E.onClose?.()},onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),X.stopPropagation(),E.onClose?.())},className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded hover:bg-background/20 pointer-events-none group-hover:pointer-events-auto",children:h.jsx(Ya,{className:"w-3 h-3"})}),E.badge&&!o&&h.jsx("span",{className:"ml-auto px-1.5 py-0.5 text-xs bg-destructive text-destructive-foreground rounded-full",children:E.badge}),E.badge&&o&&h.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 bg-destructive rounded-full"})]})});return o&&!E.indented?h.jsx(Us,{content:E.label,side:"right",children:V},E.id):h.jsx("div",{children:V},E.id)};return h.jsxs(Xe.aside,{initial:{width:240},animate:{width:o?64:240},transition:{duration:.3,ease:"easeInOut"},className:"sidebar-bg h-full bg-background/50 backdrop-blur-xl border-r border-border flex flex-col relative",children:[h.jsxs("div",{className:"p-4 flex items-center justify-between",children:[h.jsx(ba,{mode:"wait",children:!o&&h.jsxs(Xe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center gap-2",children:[h.jsx(Xe.div,{onClick:S,whileTap:{scale:.9},className:"w-8 h-8 rounded-lg cursor-pointer hover:opacity-90 transition-opacity overflow-hidden",children:h.jsx("img",{src:Cg,alt:"DocHub",className:"w-full h-full"})}),h.jsx("span",{className:"font-semibold text-sm",children:"DocHub"})]})}),o&&h.jsx(Xe.div,{onClick:S,whileTap:{scale:.9},className:"w-8 h-8 rounded-lg cursor-pointer hover:opacity-90 transition-opacity overflow-hidden",children:h.jsx("img",{src:Cg,alt:"DocHub",className:"w-full h-full"})})]}),h.jsx("div",{className:"mx-4 mb-3 h-px bg-border/50"}),h.jsx("nav",{className:"flex-1 px-3 pb-3 overflow-y-auto",children:h.jsx("div",{className:"space-y-4",children:N.map((E,q)=>h.jsxs("div",{children:[E.title&&!o&&h.jsx("div",{className:"px-3 mb-2",children:h.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/70",children:E.title})}),E.title&&o&&h.jsx("div",{className:"mx-auto my-2 w-6 h-px bg-border/50"}),h.jsx("div",{className:"space-y-1",children:E.items.map(U)})]},E.title||q))})}),h.jsx("div",{className:"px-3 pb-3 space-y-1 border-t border-border pt-3",children:R.map(U)}),h.jsx(Us,{content:o?"Expand sidebar (Ctrl+Q)":"Collapse sidebar (Ctrl+Q)",side:"right",children:h.jsx(Xe.button,{onClick:()=>c(!o),whileHover:{scale:1.1},whileTap:{scale:.9},className:et("absolute -right-4 top-1/2 -translate-y-1/2 w-8 h-8 rounded-full","bg-background border-2 border-border","hover:border-primary hover:shadow-lg transition-all","flex items-center justify-center","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring","group"),children:h.jsx(Xe.div,{animate:{rotate:o?0:180},transition:{duration:.3},children:h.jsx(Mg,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors"})})})})]})}),R1={"/":"Dashboard","/projects":"Projects","/analytics":"Analytics","/team":"Team","/documents":"Documents","/plugins":"Plugins","/notifications":"Notifications","/search":"Search","/profile":"Profile","/settings":"Settings","/sessions":"Sessions"},B1={"/":"Manage your document processing sessions","/projects":"View and manage your projects","/analytics":"Track performance and insights","/team":"Collaborate with your team members","/documents":"Browse and manage documents","/plugins":"Extend functionality with plugins","/notifications":"View your notifications","/search":"Search across your workspace","/profile":"Manage your profile","/settings":"Manage your account and application preferences","/sessions":"View and manage all sessions"},_1=x.memo(function({onCommandPalette:o}){const{theme:c,setTheme:r}=Lg(),[u,d]=x.useState(!1),[m,y]=x.useState(new Date),p=Rg(),b=wi();x.useEffect(()=>{const E=setInterval(()=>{y(new Date)},1e3);return()=>clearInterval(E)},[]);const v=x.useCallback(E=>E.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),[]),S=x.useMemo(()=>{const E=p.pathname.split("/").filter(Boolean),q=[];let G="";for(const V of E)G+=`/${V}`,q.push({label:R1[G]||V,path:G});return q.length===0&&q.push({label:"Dashboard",path:"/"}),q},[p.pathname]),A=p.pathname,N=B1[A]||"",R=x.useCallback(()=>{d(E=>!E)},[]),U=x.useCallback(E=>{r(E),d(!1)},[r]);return h.jsx("header",{className:"header-bg border-b border-border bg-background/50 backdrop-blur-xl px-6 py-2",children:h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsx("div",{className:"flex items-center gap-2",children:S.map((E,q)=>h.jsxs("div",{className:"flex items-center gap-2",children:[q>0&&h.jsx(Mg,{className:"w-4 h-4 text-muted-foreground"}),h.jsx("button",{onClick:()=>q<S.length-1&&b(E.path),className:et("text-base font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 rounded-sm",q===S.length-1?"text-foreground cursor-default pointer-events-none":"text-muted-foreground hover:text-foreground cursor-pointer"),disabled:q===S.length-1,"aria-current":q===S.length-1?"page":void 0,children:E.label})]},E.path))}),N&&h.jsx("p",{className:"text-sm text-muted-foreground",children:N})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("div",{className:"clock-widget flex items-center gap-2 px-3 py-1.5 rounded-md bg-muted/50 text-sm",children:[h.jsx(bv,{className:"w-4 h-4"}),h.jsx("span",{className:"font-mono",children:v(m)})]}),h.jsx("div",{className:"w-px h-6 bg-border"}),h.jsx(Us,{content:"Quick actions (Ctrl+K)",children:h.jsx("button",{onClick:o,className:et("p-2 rounded-md","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Quick actions (Ctrl+K)",children:h.jsx(vv,{className:"w-4 h-4"})})}),h.jsx(Us,{content:`Theme: ${c==="light"?"Light":c==="dark"?"Dark":"System"}`,children:h.jsxs("div",{className:"relative",children:[h.jsxs("button",{onClick:R,className:et("p-2 rounded-md","hover:bg-accent hover:text-accent-foreground transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Theme switcher",children:[c==="light"&&h.jsx(du,{className:"w-4 h-4"}),c==="dark"&&h.jsx(mu,{className:"w-4 h-4"}),c==="system"&&h.jsx(Uh,{className:"w-4 h-4"})]}),u&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>d(!1)}),h.jsx("div",{className:"absolute right-0 top-full mt-2 w-36 rounded-md border border-border bg-popover p-1 shadow-md z-20",children:[{value:"light",icon:du,label:"Light"},{value:"dark",icon:mu,label:"Dark"},{value:"system",icon:Uh,label:"System"}].map(({value:E,icon:q,label:G})=>h.jsxs("button",{onClick:()=>U(E),className:et("w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground transition-colors",c===E&&"bg-accent text-accent-foreground"),children:[h.jsx(q,{className:"w-3 h-3"}),h.jsx("span",{children:G})]},E))})]})]})})]})]})})});function U1({open:s,onOpenChange:o}){const[c,r]=x.useState(""),u=wi(),{setTheme:d}=Lg(),m=x.useCallback(v=>{u(v),o(!1)},[u,o]),y=x.useMemo(()=>[{id:"home",label:"Go to Dashboard",category:"Navigation",icon:Au,action:()=>m("/"),keywords:["dashboard","home","main"]},{id:"projects",label:"Open Projects",category:"Navigation",icon:Og,action:()=>m("/projects"),keywords:["project","folder","workspace"]},{id:"documents",label:"Browse Documents",category:"Navigation",icon:zg,action:()=>m("/documents"),keywords:["docs","files","text"]},{id:"plugins",label:"View Plugins",category:"Navigation",icon:Sv,action:()=>m("/plugins"),keywords:["plugins","extensions","addons","modules"]},{id:"profile",label:"View Profile",category:"Account",icon:xv,action:()=>m("/profile"),keywords:["user","account","me"]},{id:"settings",label:"Open Settings",category:"Account",icon:jg,action:()=>m("/settings"),keywords:["preferences","config","options"]},{id:"theme-light",label:"Switch to Light Theme",category:"Theme",icon:du,action:()=>{d("light"),o(!1)},keywords:["light","bright","day"]},{id:"theme-dark",label:"Switch to Dark Theme",category:"Theme",icon:mu,action:()=>{d("dark"),o(!1)},keywords:["dark","night","dim"]}],[m,d,o]),p=y.reduce((v,S)=>(v[S.category]||(v[S.category]=[]),v[S.category].push(S),v),{});x.useEffect(()=>{const v=S=>{(S.metaKey||S.ctrlKey)&&S.key==="k"&&(S.preventDefault(),o(!s)),S.key==="Escape"&&o(!1)};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[s,o]);const b=x.useCallback(v=>{const S=y.find(A=>A.id===v);S&&S.action()},[y]);return h.jsx(ba,{children:s&&h.jsxs(h.Fragment,{children:[h.jsx(Xe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-background/80 backdrop-blur-xs z-50",onClick:()=>o(!1)}),h.jsx(Xe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},className:"fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-2xl z-50",children:h.jsxs(Nl,{className:"rounded-xl border border-border bg-popover shadow-2xl",children:[h.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[h.jsx(wv,{className:"w-4 h-4 text-muted-foreground mr-2 shrink-0"}),h.jsx(Nl.Input,{value:c,onValueChange:r,placeholder:"Type a command or search...",className:"flex-1 py-3 text-sm bg-transparent outline-none placeholder:text-muted-foreground"}),h.jsx("button",{onClick:()=>o(!1),className:"p-1 rounded hover:bg-accent","aria-label":"Close",children:h.jsx(Ya,{className:"w-4 h-4"})})]}),h.jsxs(Nl.List,{className:"max-h-96 overflow-y-auto p-2",children:[h.jsx(Nl.Empty,{className:"py-6 text-center text-sm text-muted-foreground",children:"No results found."}),Object.entries(p).map(([v,S])=>h.jsxs(Nl.Group,{heading:v,className:"px-2 pb-2",children:[h.jsx("div",{className:"text-xs text-muted-foreground font-medium mb-1 px-2",children:v}),S.map(A=>{const N=A.icon;return h.jsxs(Nl.Item,{value:`${A.label} ${A.keywords?.join(" ")||""}`,onSelect:()=>b(A.id),className:et("flex items-center gap-3 px-2 py-2 rounded-md cursor-pointer","hover:bg-accent hover:text-accent-foreground","aria-selected:bg-accent aria-selected:text-accent-foreground"),children:[h.jsx(N,{className:"w-4 h-4 text-muted-foreground"}),h.jsx("span",{className:"flex-1",children:A.label}),h.jsx(Cv,{className:"w-3 h-3 text-muted-foreground"})]},A.id)})]},v))]})]})})]})})}const L1=[{title:"General",shortcuts:[{keys:["Ctrl","K"],description:"Open command palette"},{keys:["Ctrl","Q"],description:"Toggle sidebar"},{keys:["?"],description:"Show keyboard shortcuts"},{keys:["Esc"],description:"Close dialogs / Cancel"}]},{title:"Navigation",shortcuts:[{keys:["Ctrl","1"],description:"Go to Dashboard"},{keys:["Ctrl","2"],description:"Go to Sessions"},{keys:["Ctrl","3"],description:"Go to Analytics"},{keys:["Ctrl","4"],description:"Go to Documents"},{keys:["Ctrl",","],description:"Open Settings"}]},{title:"Session Actions",shortcuts:[{keys:["Ctrl","N"],description:"New session"},{keys:["Ctrl","O"],description:"Add documents"},{keys:["Ctrl","Enter"],description:"Process all documents"},{keys:["Ctrl","S"],description:"Save session"}]},{title:"Document Actions",shortcuts:[{keys:["Delete"],description:"Remove selected document"},{keys:["Ctrl","Click"],description:"Multi-select documents"},{keys:["Shift","Click"],description:"Range select documents"}]}],uu=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function H1(s){return uu&&s==="Ctrl"?"⌘":s==="Shift"?"⇧":s==="Alt"?uu?"⌥":"Alt":s==="Enter"?"⏎":s==="Esc"?"Esc":s==="Delete"?uu?"⌫":"Del":s}function q1({open:s,onOpenChange:o}){return h.jsx(Av,{open:s,onOpenChange:o,children:h.jsx(ba,{children:s&&h.jsxs(Ev,{forceMount:!0,children:[h.jsx(Tv,{asChild:!0,children:h.jsx(Xe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50"})}),h.jsx(Dv,{asChild:!0,children:h.jsxs(Xe.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},transition:{type:"spring",duration:.3},className:et("fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-50","w-full max-w-2xl max-h-[85vh] overflow-hidden","bg-background rounded-xl border border-border shadow-2xl","flex flex-col"),children:[h.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"p-2 rounded-lg bg-primary/10",children:h.jsx(Nv,{className:"w-5 h-5 text-primary"})}),h.jsxs("div",{children:[h.jsx(Ov,{className:"text-lg font-semibold",children:"Keyboard Shortcuts"}),h.jsx(zv,{className:"text-sm text-muted-foreground",children:"Quick reference for all available shortcuts"})]})]}),h.jsx(jv,{asChild:!0,children:h.jsx("button",{className:"p-2 rounded-lg hover:bg-muted transition-colors","aria-label":"Close",children:h.jsx(Ya,{className:"w-4 h-4"})})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:L1.map(c=>h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-semibold text-muted-foreground mb-3 uppercase tracking-wider",children:c.title}),h.jsx("div",{className:"space-y-2",children:c.shortcuts.map((r,u)=>h.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg hover:bg-muted/50 transition-colors",children:[h.jsx("span",{className:"text-sm",children:r.description}),h.jsx("div",{className:"flex items-center gap-1",children:r.keys.map((d,m)=>h.jsxs("span",{className:"flex items-center gap-1",children:[h.jsx("kbd",{className:"min-w-[24px] h-6 px-1.5 flex items-center justify-center text-xs font-mono bg-muted rounded border border-border shadow-sm",children:H1(d)}),m<r.keys.length-1&&h.jsx("span",{className:"text-muted-foreground text-xs",children:"+"})]},m))})]},u))})]},c.title))})}),h.jsx("div",{className:"px-6 py-3 border-t border-border bg-muted/30",children:h.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["Press ",h.jsx("kbd",{className:"px-1 py-0.5 text-[10px] font-mono bg-muted rounded border border-border",children:"?"})," anytime to show this dialog"]})})]})})]})})})}const Ag=s=>typeof s=="boolean"?`${s}`:s===0?"0":s,Eg=Bg,G1=(s,o)=>c=>{var r;if(o?.variants==null)return Eg(s,c?.class,c?.className);const{variants:u,defaultVariants:d}=o,m=Object.keys(u).map(b=>{const v=c?.[b],S=d?.[b];if(v===null)return null;const A=Ag(v)||Ag(S);return u[b][A]}),y=c&&Object.entries(c).reduce((b,v)=>{let[S,A]=v;return A===void 0||(b[S]=A),b},{}),p=o==null||(r=o.compoundVariants)===null||r===void 0?void 0:r.reduce((b,v)=>{let{class:S,className:A,...N}=v;return Object.entries(N).every(R=>{let[U,E]=R;return Array.isArray(E)?E.includes({...d,...y}[U]):{...d,...y}[U]===E})?[...b,S,A]:b},[]);return Eg(s,m,p,c?.class,c?.className)},Y1=G1("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",gradient:"bg-linear-to-r from-blue-500 to-purple-600 text-white hover:from-blue-600 hover:to-purple-700"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",xs:"h-7 px-2 text-xs rounded"}},defaultVariants:{variant:"default",size:"default"}}),Vt=x.forwardRef(({className:s,variant:o,size:c,loading:r,icon:u,children:d,disabled:m,showSuccess:y,onSuccess:p,...b},v)=>{const{asChild:S,...A}=b,[N,R]=x.useState(!1);return x.useEffect(()=>{if(y){R(!0);const U=setTimeout(()=>{R(!1),p?.()},2e3);return()=>clearTimeout(U)}else R(!1)},[y,p]),h.jsx(Xe.button,{className:et(Y1({variant:o,size:c,className:s}),N&&"bg-green-500 hover:bg-green-500 text-green-50"),ref:v,disabled:m||r||N,whileHover:{scale:m||r||N?1:1.02},whileTap:{scale:m||r||N?1:.98},animate:N?{scale:[1,1.05,1]}:{},transition:{duration:.2},...A,children:N?h.jsxs(Xe.div,{initial:{scale:0},animate:{scale:1},className:"flex items-center gap-2",children:[h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx(Xe.path,{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.3}})}),"Saved!"]}):r?h.jsxs(h.Fragment,{children:[h.jsxs("svg",{className:"mr-2 h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):h.jsxs(h.Fragment,{children:[u&&h.jsx("span",{className:"mr-2",children:u}),d]})})});Vt.displayName="Button";function V1({isOpen:s,onClose:o}){const{settings:c}=Z0(),[r,u]=x.useState(""),[d,m]=x.useState(""),[y,p]=x.useState(!1),b=async()=>{if(!r.trim()||!d.trim())return;p(!0);const S={Type:"Bug Report",Email:c.profile.email,Title:r,Description:d},A=c.apiConnections.bugReportUrl;if(A==="https://www.example.com"||!A){const N=encodeURIComponent(`Bug Report: ${r}`),R=encodeURIComponent(`
|
|
14
|
+
Bug Report
|
|
15
|
+
----------
|
|
16
|
+
Email: ${c.profile.email}
|
|
17
|
+
Title: ${r}
|
|
18
|
+
|
|
19
|
+
Description of Issue:
|
|
20
|
+
${d}
|
|
21
|
+
|
|
22
|
+
Submitted: ${new Date().toLocaleString()}
|
|
23
|
+
`);window.location.href=`mailto:support@example.com?subject=${N}&body=${R}`,u(""),m(""),p(!1),o(),alert("Your bug report has been sent to the Documentation Hub Admin");return}try{(await fetch(A,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)})).ok?(u(""),m(""),o(),alert("Your bug report has been sent to the Documentation Hub Admin")):alert("Failed to submit bug report. Please try again.")}catch(N){F.error("Error submitting bug report:",N),alert("Failed to submit bug report. Please check your API configuration.")}finally{p(!1)}},v=()=>{u(""),m(""),o()};return h.jsx(ba,{children:s&&h.jsxs(h.Fragment,{children:[h.jsx(Xe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50",onClick:v}),h.jsx(Xe.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},transition:{type:"spring",damping:20,stiffness:300},className:"fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-lg z-50",children:h.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-xl overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border bg-muted/30",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-8 h-8 rounded-lg bg-linear-to-br from-red-500 to-orange-600 flex items-center justify-center",children:h.jsx(Eu,{className:"w-4 h-4 text-white"})}),h.jsx("h2",{className:"text-lg font-semibold",children:"Report a Bug"})]}),h.jsx("button",{onClick:v,className:"p-1 rounded-md hover:bg-muted transition-colors","aria-label":"Close dialog",children:h.jsx(Ya,{className:"w-5 h-5"})})]}),h.jsxs("div",{className:"p-6 space-y-4",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"bug-title",className:"block text-sm font-medium mb-2",children:"Title"}),h.jsx("input",{id:"bug-title",type:"text",value:r,onChange:S=>u(S.target.value),placeholder:"Brief description of the issue",className:"w-full px-3 py-2 rounded-md border border-input bg-background focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20",autoFocus:!0})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"bug-description",className:"block text-sm font-medium mb-2",children:"Description of Issue"}),h.jsx("textarea",{id:"bug-description",value:d,onChange:S=>m(S.target.value),placeholder:"Please provide details about the bug, steps to reproduce, and any error messages...",rows:6,className:"w-full px-3 py-2 rounded-md border border-input bg-background resize-none focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20"})]}),h.jsx("div",{className:"text-xs text-muted-foreground bg-muted/30 p-3 rounded-md",children:h.jsxs("p",{children:[h.jsx("strong",{children:"Note:"})," Your email (",c.profile.email,") will be included with this report so we can follow up if needed."]})})]}),h.jsxs("div",{className:"flex items-center justify-end gap-2 p-4 border-t border-border bg-muted/30",children:[h.jsx(Vt,{variant:"outline",onClick:v,children:"Cancel"}),h.jsx(Vt,{onClick:b,disabled:!r.trim()||!d.trim()||y,icon:h.jsx(Mv,{className:"w-4 h-4"}),children:y?"Sending...":"Send Report"})]})]})})]})})}function X1(){const[s,o]=x.useState(!1);return h.jsxs(h.Fragment,{children:[h.jsx(V1,{isOpen:s,onClose:()=>o(!1)}),h.jsxs(Xe.button,{onClick:()=>o(!0),initial:{scale:0},animate:{scale:1},whileHover:{scale:1.1,rotate:10},whileTap:{scale:.9},className:et("fixed bottom-4 right-4 z-50","w-10 h-10 rounded-full","bg-linear-to-br from-red-500 to-orange-600","shadow-lg hover:shadow-xl","flex items-center justify-center","group transition-all duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Report a bug",title:"Report a bug",children:[h.jsx(Eu,{className:"w-5 h-5 text-white"}),h.jsx(Xe.div,{className:"absolute -top-8 right-0 px-2 py-1 bg-popover text-popover-foreground text-xs rounded shadow-md pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap",initial:{y:10,opacity:0},whileHover:{y:0,opacity:1},children:"Report a Bug"})]})]})}function Q1(){const[s,o]=x.useState(!1),[c,r]=x.useState(null),[u,d]=x.useState(0),[m,y]=x.useState(!1),[p,b]=x.useState(!1),[v,S]=x.useState(!1),[A,N]=x.useState(!1),[R,U]=x.useState(""),[E,q]=x.useState(!1),[G,V]=x.useState(0);x.useEffect(()=>{if(typeof window.electronAPI>"u"){console.warn("UpdateNotification: electronAPI not available (running in browser mode?)");return}const W=window.electronAPI.onUpdateAvailable(ie=>{r(ie),o(!0)}),re=window.electronAPI.onUpdateDownloadProgress(ie=>{d(ie.percent)}),Ae=window.electronAPI.onUpdateDownloaded(ie=>{y(!1),N(!1),b(!0),r({...ie,fallbackUsed:ie.fallbackUsed}),ie.fallbackUsed&&U("Update ready to install (downloaded as compressed archive)")}),de=window.electronAPI.onUpdateError(ie=>{y(!1),N(!1),V(me=>me+1);const M=ie.message?.toLowerCase().includes("certificate")||ie.message?.toLowerCase().includes("issuer")||ie.message?.toLowerCase().includes("unable to verify"),$=ie.message?.toLowerCase().includes("econnreset")||ie.message?.toLowerCase().includes("connection reset")||ie.message?.toLowerCase().includes("mutual"),_=ie.message?.toLowerCase().includes("proxy")||ie.message?.toLowerCase().includes("firewall")||ie.message?.toLowerCase().includes("localhost:8005");ie.message?.includes("Fallback download failed")||G>=2?(q(!0),U($?"Enterprise network detected (Mutual TLS required). Your network requires special certificates. Please use manual download or contact IT.":M?"Certificate validation failed. Your organization may use custom certificates. Please download manually.":_?"Corporate proxy/firewall blocking download. Please use manual download or check with IT.":"Unable to download automatically. Please try manual download.")):U($?"Enterprise network detected. Trying PowerShell download method...":M?"Certificate issue detected. Attempting alternative download method...":"Connection issue: Trying alternative method...")}),ye=window.electronAPI.onUpdateFallbackMode?.(ie=>{S(!0),U(ie.message||"Using alternative download method...")}),Me=window.electronAPI.onUpdateExtracting?.(ie=>{N(!0),U(ie.message||"Extracting update...")}),xe=window.electronAPI.onUpdateStatus?.(ie=>{U(ie.message||"")});return()=>{W(),re(),Ae(),de(),ye?.(),Me?.(),xe?.()}},[G]);const X=async()=>{y(!0),q(!1),V(0);try{await window.electronAPI?.downloadUpdate()}catch{y(!1)}},j=()=>{window.electronAPI?.installUpdate()},I=()=>{o(!1)},ee=async()=>{try{await window.electronAPI?.openUpdateInBrowser()}catch{const re=c?.version?`https://github.com/ItMeDiaTech/Documentation_Hub/releases/tag/v${c.version}`:"https://github.com/ItMeDiaTech/Documentation_Hub/releases/latest";window.open(re,"_blank")}};return h.jsx(ba,{children:s&&h.jsx(Xe.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},className:"fixed bottom-4 right-4 z-50",children:h.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg p-4 w-96",children:[h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[v?h.jsx(kv,{className:"w-5 h-5 text-primary"}):h.jsx(Rv,{className:"w-5 h-5 text-primary"}),h.jsx("h3",{className:"font-semibold",children:"Update Available"})]}),h.jsx("button",{onClick:I,className:"text-muted-foreground hover:text-foreground transition-colors",children:h.jsx(Ya,{className:"w-4 h-4"})})]}),c&&h.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Version ",c.version," is now available"]}),R&&h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Bv,{className:"w-4 h-4 text-blue-500"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:R})]}),!m&&!p&&h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Vt,{onClick:X,variant:"default",size:"sm",className:"flex-1",icon:h.jsx(hu,{className:"w-4 h-4"}),children:"Download"}),h.jsx(Vt,{onClick:I,variant:"outline",size:"sm",children:"Later"})]}),m&&h.jsxs("div",{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center justify-between text-sm",children:[h.jsx("span",{children:A?"Extracting...":v?"Downloading compressed update...":"Downloading..."}),!A&&h.jsxs("span",{className:"text-muted-foreground",children:[Math.round(u),"%"]})]}),h.jsx("div",{className:"w-full bg-muted rounded-full h-2 overflow-hidden",children:h.jsx("div",{className:`h-full ${A?"bg-blue-500":"bg-primary"} transition-all duration-300`,style:{width:A?"100%":`${u}%`}})}),v&&!A&&h.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Using compressed download to bypass network restrictions"})]}),p&&h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Vt,{onClick:j,variant:"default",size:"sm",className:"flex-1 bg-green-600 hover:bg-green-700",children:"Install & Restart"}),h.jsx(Vt,{onClick:I,variant:"outline",size:"sm",children:"Later"})]}),E&&!m&&!p&&h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center gap-2 text-yellow-600 dark:text-yellow-400",children:[h.jsx(xi,{className:"w-4 h-4"}),h.jsx("p",{className:"text-xs font-medium",children:"Network Security Issue"})]}),R&&h.jsx("p",{className:"text-xs text-muted-foreground",children:R}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Vt,{onClick:ee,variant:"default",size:"sm",className:"flex-1",icon:h.jsx(_v,{className:"w-4 h-4"}),children:"Download Manually"}),h.jsx(Vt,{onClick:X,variant:"outline",size:"sm",icon:h.jsx(hu,{className:"w-4 h-4"}),children:"Retry"})]}),h.jsxs("div",{className:"bg-muted/50 rounded p-2 text-xs space-y-1",children:[h.jsx("p",{className:"font-medium",children:"Troubleshooting Tips:"}),h.jsxs("ul",{className:"list-disc list-inside text-muted-foreground space-y-0.5",children:[h.jsx("li",{children:"Disconnect from VPN if connected"}),h.jsx("li",{children:"Check with IT about proxy settings"}),h.jsx("li",{children:"Use manual download for immediate access"})]})]})]})]})})})}function Z1(){const[s,o]=x.useState(!1),[c,r]=x.useState([]),[u,d]=x.useState("all"),m=x.useRef(null),[y,p]=x.useState(!0);x.useEffect(()=>{const E=I=>{I.ctrlKey&&I.shiftKey&&I.key==="D"&&o(!s)};window.addEventListener("keydown",E);const q=window.electronAPI?.onDebugNetworkRequest?.(I=>{b("network",`${I.method} ${I.url}`,I)}),G=window.electronAPI?.onDebugCertError?.(I=>{b("cert-error",`Certificate Error: ${I.url}`,I)}),V=window.electronAPI?.onDebugNetworkError?.(I=>{b("network-error",`Network Error: ${I.error}`,I)}),X=window.electronAPI?.onDebugTLSError?.(I=>{b("tls-error",`TLS Error: ${I.message}`,I)}),j=window.electronAPI?.onUpdateStatus?.(I=>{(I.message?.includes("PowerShell")||I.message?.includes("Mutual TLS"))&&b("info",`Update: ${I.message}`,I)});return()=>{window.removeEventListener("keydown",E),q?.(),G?.(),V?.(),X?.(),j?.()}},[s]),x.useEffect(()=>{y&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[c,y]);const b=(E,q,G)=>{const V={id:`${Date.now()}-${Math.random()}`,timestamp:new Date().toISOString(),type:E,message:q,details:G};r(X=>[...X.slice(-200),V])},v=()=>{r([])},S=()=>{const E=JSON.stringify(c,null,2),q=new Blob([E],{type:"application/json"}),G=URL.createObjectURL(q),V=document.createElement("a");V.href=G,V.download=`debug-logs-${Date.now()}.json`,V.click(),URL.revokeObjectURL(G)},A=()=>{const E=c.map(q=>`[${q.timestamp}] [${q.type.toUpperCase()}] ${q.message}`).join(`
|
|
24
|
+
`);navigator.clipboard.writeText(E)},N=c.filter(E=>u==="all"?!0:u==="network"?E.type==="network":u==="errors"?E.type.includes("error"):!0),R=E=>{switch(E){case"network":return h.jsx(qv,{className:"w-3 h-3"});case"cert-error":return h.jsx(Hv,{className:"w-3 h-3 text-red-500"});case"network-error":case"tls-error":return h.jsx(xi,{className:"w-3 h-3 text-yellow-500"});default:return h.jsx(Lh,{className:"w-3 h-3"})}},U=E=>{switch(E){case"cert-error":case"tls-error":return"text-red-400";case"network-error":return"text-yellow-400";case"network":return"text-blue-400";default:return"text-muted-foreground"}};return h.jsx(ba,{children:s&&h.jsxs(Xe.div,{initial:{opacity:0,y:100},animate:{opacity:1,y:0},exit:{opacity:0,y:100},className:"fixed bottom-4 right-4 z-[999] w-[600px] h-[400px] bg-background/95 backdrop-blur-xl border border-border rounded-lg shadow-2xl flex flex-col",children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Lh,{className:"w-4 h-4 text-primary"}),h.jsx("span",{className:"text-sm font-semibold",children:"Debug Console"}),h.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",N.length," logs)"]})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{onClick:()=>d("all"),className:et("px-2 py-1 text-xs rounded transition-colors",u==="all"?"bg-primary text-primary-foreground":"hover:bg-muted"),children:"All"}),h.jsx("button",{onClick:()=>d("network"),className:et("px-2 py-1 text-xs rounded transition-colors",u==="network"?"bg-primary text-primary-foreground":"hover:bg-muted"),children:"Network"}),h.jsx("button",{onClick:()=>d("errors"),className:et("px-2 py-1 text-xs rounded transition-colors",u==="errors"?"bg-primary text-primary-foreground":"hover:bg-muted"),children:"Errors"}),h.jsx("div",{className:"w-px h-4 bg-border mx-1"}),h.jsx("button",{onClick:A,className:"p-1 hover:bg-muted rounded transition-colors",title:"Copy logs",children:h.jsx(Uv,{className:"w-3.5 h-3.5"})}),h.jsx("button",{onClick:S,className:"p-1 hover:bg-muted rounded transition-colors",title:"Export logs",children:h.jsx(hu,{className:"w-3.5 h-3.5"})}),h.jsx("button",{onClick:v,className:"p-1 hover:bg-muted rounded transition-colors",title:"Clear logs",children:h.jsx(Lv,{className:"w-3.5 h-3.5"})}),h.jsx("button",{onClick:()=>o(!1),className:"p-1 hover:bg-muted rounded transition-colors ml-2",children:h.jsx(Ya,{className:"w-4 h-4"})})]})]}),h.jsx("div",{ref:m,className:"flex-1 overflow-y-auto p-2 font-mono text-[11px] space-y-0.5",onScroll:E=>{const q=E.target,G=q.scrollHeight-q.scrollTop===q.clientHeight;p(G)},children:N.length===0?h.jsx("div",{className:"text-center text-muted-foreground py-8",children:"No logs to display. Press Ctrl+Shift+D to toggle this console."}):N.map(E=>h.jsxs("div",{className:"flex items-start gap-2 hover:bg-muted/30 px-2 py-0.5 rounded",children:[h.jsx("span",{className:"flex-shrink-0 mt-0.5",children:R(E.type)}),h.jsx("span",{className:"text-muted-foreground flex-shrink-0",children:E.timestamp.split("T")[1].split(".")[0]}),h.jsx("span",{className:et("flex-1 break-all",U(E.type)),children:E.message})]},E.id))}),h.jsxs("div",{className:"px-4 py-2 border-t border-border flex items-center justify-between",children:[h.jsx("div",{className:"flex items-center gap-2",children:h.jsxs("label",{className:"flex items-center gap-1 text-xs",children:[h.jsx("input",{type:"checkbox",checked:y,onChange:E=>p(E.target.checked),className:"w-3 h-3"}),"Auto-scroll"]})}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Press ",h.jsx("kbd",{className:"px-1 py-0.5 bg-muted rounded text-[10px]",children:"Ctrl"}),"+",h.jsx("kbd",{className:"px-1 py-0.5 bg-muted rounded text-[10px]",children:"Shift"}),"+",h.jsx("kbd",{className:"px-1 py-0.5 bg-muted rounded text-[10px]",children:"D"})," to toggle"]})]})]})})}function K1({error:s,errorInfo:o,onReset:c}){const r=()=>{window.location.reload()},u=()=>{window.location.hash="#/",window.location.reload()},d=()=>{const m={error:s?.toString(),stack:s?.stack,componentStack:o?.componentStack};F.debug("Bug Report Details:",m)};return h.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:h.jsxs("div",{className:"w-full max-w-2xl rounded-lg border border-destructive/20 bg-card p-8 shadow-lg",children:[h.jsxs("div",{className:"mb-6 flex items-start gap-4",children:[h.jsx("div",{className:"rounded-full bg-destructive/10 p-3",children:h.jsx(xi,{className:"h-8 w-8 text-destructive"})}),h.jsxs("div",{className:"flex-1",children:[h.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Oops! Something went wrong"}),h.jsx("p",{className:"mt-2 text-muted-foreground",children:"The application encountered an unexpected error. Don't worry, your data is safe."})]})]}),s&&h.jsxs("details",{className:"mb-6 rounded-md border border-border bg-muted/30 p-4",children:[h.jsx("summary",{className:"cursor-pointer font-medium text-foreground",children:"Error Details"}),h.jsxs("div",{className:"mt-3 space-y-2",children:[h.jsx("div",{className:"rounded bg-destructive/5 p-3",children:h.jsx("p",{className:"text-sm font-mono text-destructive",children:s.toString()})}),s.stack&&h.jsx("div",{className:"max-h-48 overflow-y-auto rounded bg-muted p-3",children:h.jsx("pre",{className:"text-xs text-muted-foreground",children:s.stack})}),o?.componentStack&&h.jsxs("div",{className:"max-h-48 overflow-y-auto rounded bg-muted p-3",children:[h.jsx("p",{className:"mb-2 text-xs font-semibold text-foreground",children:"Component Stack:"}),h.jsx("pre",{className:"text-xs text-muted-foreground",children:o.componentStack})]})]})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsx("p",{className:"text-sm text-muted-foreground",children:"What would you like to do?"}),h.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[c&&h.jsxs(Vt,{onClick:c,variant:"outline",className:"w-full",children:[h.jsx(Hh,{className:"mr-2 h-4 w-4"}),"Try Again"]}),h.jsxs(Vt,{onClick:r,variant:"default",className:"w-full",children:[h.jsx(Hh,{className:"mr-2 h-4 w-4"}),"Reload Application"]}),h.jsxs(Vt,{onClick:u,variant:"outline",className:"w-full",children:[h.jsx(Au,{className:"mr-2 h-4 w-4"}),"Go to Dashboard"]}),h.jsxs(Vt,{onClick:d,variant:"outline",className:"w-full",children:[h.jsx(Eu,{className:"mr-2 h-4 w-4"}),"Report Issue"]})]})]}),h.jsx("div",{className:"mt-6 rounded-md bg-muted/50 p-4",children:h.jsxs("p",{className:"text-sm text-muted-foreground",children:[h.jsx("strong",{children:"Tip:"})," If this error persists, try restarting the application or clearing your browser cache. Your session data is automatically saved."]})})]})})}const F1={theme:{name:"Theme System",description:"Unable to load theme settings. The application will use default styling."},settings:{name:"User Settings",description:"Unable to load your preferences. Default settings will be used."},stats:{name:"Statistics",description:"Unable to load statistics data. Your session data is still safe."},session:{name:"Session Manager",description:"Unable to load session data. Please try reloading the application."}};function ui({context:s,error:o}){const c=F1[s]||{name:"Unknown",description:"An error occurred."},r=()=>{window.location.reload()},u=()=>{s==="theme"?(localStorage.removeItem("theme"),localStorage.removeItem("density"),localStorage.removeItem("accentColor")):s==="settings"?localStorage.removeItem("userSettings"):s==="stats"||s==="session"&&localStorage.removeItem("sessions-emergency-backup"),window.location.reload()};return h.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-100 dark:bg-gray-900 p-4",children:h.jsxs("div",{className:"w-full max-w-md rounded-lg border border-red-200 dark:border-red-800 bg-white dark:bg-gray-800 p-6 shadow-lg",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[h.jsx(xi,{className:"h-6 w-6 text-red-500"}),h.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:[c.name," Error"]})]}),h.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mb-4",children:c.description}),o&&h.jsxs("details",{className:"mb-4 rounded border border-gray-200 dark:border-gray-700 p-2",children:[h.jsx("summary",{className:"cursor-pointer text-sm text-gray-500 dark:text-gray-400",children:"Technical Details"}),h.jsx("pre",{className:"mt-2 text-xs text-red-600 dark:text-red-400 overflow-auto max-h-32",children:o.message})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{onClick:r,className:"flex-1 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 text-sm font-medium",children:"Reload App"}),h.jsx("button",{onClick:u,className:"flex-1 px-4 py-2 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200 rounded hover:bg-gray-300 dark:hover:bg-gray-600 text-sm font-medium",children:"Reset & Reload"})]})]})})}class Ms extends x.Component{constructor(o){super(o),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,c){F.error("React Error Boundary caught an error:",{error:o.toString(),componentStack:c.componentStack,errorInfo:c}),this.setState({errorInfo:c}),this.props.onError&&this.props.onError(o,c)}handleReset=()=>{this.setState({hasError:!1,error:null,errorInfo:null})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:h.jsx(K1,{error:this.state.error,errorInfo:this.state.errorInfo,onReset:this.handleReset}):this.props.children}}function J1({message:s="Initializing Documentation Hub..."}){return h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background",children:h.jsxs(Xe.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.3},className:"flex flex-col items-center space-y-6",children:[h.jsx(Xe.div,{animate:{scale:[1,1.05,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"text-4xl font-bold text-primary",children:"Documentation Hub"}),h.jsx(Xe.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},children:h.jsx(Gv,{className:"h-12 w-12 text-primary"})}),h.jsx(Xe.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.3},className:"text-sm text-muted-foreground",children:s}),h.jsx("div",{className:"flex space-x-2",children:[0,1,2].map(o=>h.jsx(Xe.div,{animate:{scale:[1,1.3,1],opacity:[.3,1,.3]},transition:{duration:1.5,repeat:1/0,delay:o*.2},className:"h-2 w-2 rounded-full bg-primary"},o))})]})})}const $1=x.lazy(()=>xn(()=>import("./Dashboard-C_5gMb0q.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url).then(s=>({default:s.Dashboard}))),I1=x.lazy(()=>xn(()=>import("./Settings-DUEHGURa.js"),__vite__mapDeps([7,1,2,5,8,6]),import.meta.url).then(s=>({default:s.Settings}))),P1=x.lazy(()=>xn(()=>import("./CurrentSession-B-rFkHvf.js"),__vite__mapDeps([9,1,2,3,10,8,6]),import.meta.url).then(s=>({default:s.CurrentSession}))),W1=x.lazy(()=>xn(()=>import("./Sessions-ClZOPYNc.js"),__vite__mapDeps([11,1,2,3,5,4,6]),import.meta.url).then(s=>({default:s.Sessions}))),ew=x.lazy(()=>xn(()=>import("./Documents-CqZ25axS.js"),__vite__mapDeps([12,1,2,3,5,6]),import.meta.url).then(s=>({default:s.Documents}))),tw=x.lazy(()=>xn(()=>import("./Analytics-BpsG9895.js"),__vite__mapDeps([13,1,2,3,6]),import.meta.url).then(s=>({default:s.Analytics}))),nw=x.lazy(()=>xn(()=>import("./Reporting-DqdHJY_a.js"),__vite__mapDeps([14,1,2,3,10,6]),import.meta.url).then(s=>({default:s.Reporting}))),aw=x.lazy(()=>xn(()=>import("./Search-XNbu5z_3.js"),__vite__mapDeps([15,1,2,16,3,5,6]),import.meta.url).then(s=>({default:s.Search})));function lw(){return h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),h.jsx("p",{className:"text-muted-foreground",children:"Loading..."})]})})}function Tg({title:s}){return h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsxs("div",{className:"text-center",children:[h.jsx("h2",{className:"text-2xl font-bold mb-2",children:s}),h.jsx("p",{className:"text-muted-foreground",children:"This page is under construction"})]})})}function sw(){const[s,o]=x.useState(!1),[c,r]=x.useState(!1),{isLoading:u}=Fg(),[d,m]=x.useState(!1),y=wi(),p=x.useCallback(b=>{const v=b.target;if(v.tagName==="INPUT"||v.tagName==="TEXTAREA"||v.isContentEditable)return;if(b.key==="?"&&!b.ctrlKey&&!b.metaKey){b.preventDefault(),r(!0);return}const S=b.ctrlKey||b.metaKey;if(S&&b.key==="k"){b.preventDefault(),o(!0);return}if(S&&b.key>="1"&&b.key<="4"){b.preventDefault();const A=["/","/sessions","/analytics","/documents"],N=parseInt(b.key)-1;A[N]&&y(A[N]);return}if(S&&b.key===","){b.preventDefault(),y("/settings");return}},[y]);return x.useEffect(()=>(window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)),[p]),x.useEffect(()=>{if(!u&&!d){const b=setTimeout(()=>{m(!0)},300);return()=>clearTimeout(b)}},[u,d]),d?h.jsxs("div",{className:"h-screen flex flex-col overflow-hidden bg-background",children:[h.jsx(M1,{}),h.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[h.jsx(k1,{}),h.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h.jsx(_1,{onCommandPalette:()=>o(!0)}),h.jsx("main",{className:"flex-1 overflow-auto",children:h.jsx(x.Suspense,{fallback:h.jsx(lw,{}),children:h.jsx(Kv,{})})})]})]}),h.jsx(U1,{open:s,onOpenChange:o}),h.jsx(q1,{open:c,onOpenChange:r}),h.jsx(X1,{}),h.jsx(Q1,{}),h.jsx(Z1,{})]}):h.jsx(J1,{message:"Loading your workspace..."})}const ow=Qv([{path:"/",element:h.jsx(sw,{}),children:[{index:!0,element:h.jsx($1,{})},{path:"sessions",element:h.jsx(W1,{})},{path:"session/:id",element:h.jsx(P1,{})},{path:"analytics",element:h.jsx(tw,{})},{path:"team",element:h.jsx(Tg,{title:"Team"})},{path:"documents",element:h.jsx(ew,{})},{path:"reporting",element:h.jsx(nw,{})},{path:"search",element:h.jsx(aw,{})},{path:"profile",element:h.jsx(Tg,{title:"Profile"})},{path:"settings",element:h.jsx(I1,{})}]}],{future:{v7_startTransition:!0,v7_relativeSplatPath:!0,v7_fetcherPersist:!0,v7_normalizeFormMethod:!0,v7_partialHydration:!0,v7_skipActionErrorRevalidation:!0}});function iw(){return h.jsx(Ms,{children:h.jsx(Ms,{fallback:h.jsx(ui,{context:"theme"}),children:h.jsx(v0,{children:h.jsx(Ms,{fallback:h.jsx(ui,{context:"settings"}),children:h.jsx(Q0,{children:h.jsx(Ms,{fallback:h.jsx(ui,{context:"stats"}),children:h.jsx(L0,{children:h.jsx(Ms,{fallback:h.jsx(ui,{context:"session"}),children:h.jsx(V0,{children:h.jsx(Vp,{children:h.jsx(Zv,{router:ow})})})})})})})})})})})}e0.createRoot(document.getElementById("root")).render(h.jsx(Fv.StrictMode,{children:h.jsx(iw,{})}));export{Vt as B,kp as V,Fg as a,Fx as b,et as c,Z0 as d,Lg as e,li as g,F as l,X0 as u};
|