@gientech/modual 1.4.4 → 1.4.6
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/.editorconfig +38 -0
- package/.prettierignore +16 -0
- package/.prettierrc +17 -0
- package/README.md +129 -129
- package/USAGE.md +191 -0
- package/bash.exe.stackdump +40 -0
- package/components.json +21 -0
- package/dist/README.md +129 -0
- package/dist/assets/AppLoading-mci3gLZt.js +414 -0
- package/{assets/GientechStreamReader-A8zHypyu.js → dist/assets/GientechStreamReader-4496nAm0.js} +2 -2
- package/{assets → dist/assets}/database.svg +11 -11
- package/{assets → dist/assets}/database_add.svg +53 -53
- package/{assets → dist/assets}/database_connect.svg +66 -66
- package/{assets → dist/assets}/database_upload.svg +29 -29
- package/{assets → dist/assets}/defaultWeLogo.svg +14 -14
- package/{assets/index-B7u9FawR.js → dist/assets/index-7rZAt9P3.js} +1 -1
- package/dist/assets/index-BVENTW1Q.js +13 -0
- package/dist/assets/index-Bb8_WB-l.js +1 -0
- package/{assets/index-rydP_SDR.js → dist/assets/index-BpJ9Bm5x.js} +6 -6
- package/dist/assets/index-CNxDI4h-.js +1078 -0
- package/{assets/index-EcdpegTC.js → dist/assets/index-CWzpBU29.js} +1 -1
- package/{assets/index-DiQ4Me9J.js → dist/assets/index-D1m34Ij7.js} +124 -124
- package/{assets/index-CFlRqq2H.js → dist/assets/index-_gBtdXQV.js} +2 -2
- package/{assets/MySQL.svg → dist/assets/mysql.svg} +14 -14
- package/{assets/plus-ufD39rmY.js → dist/assets/plus-CrtEUXaQ.js} +1 -1
- package/dist/assets/style3.css +1 -0
- package/{assets/x-_1-UpSBt.js → dist/assets/x-Dr3EBTzJ.js} +1 -1
- package/{chat.d.ts → dist/chat.d.ts} +1 -1
- package/dist/chat.js +142 -0
- package/dist/database.js +20 -0
- package/{databaseId.js → dist/databaseId.js} +2 -2
- package/dist/databaseTable.js +6 -0
- package/{index.js → dist/index.js} +3 -3
- package/{modelManage.js → dist/modelManage.js} +1 -1
- package/dist/package.json +63 -0
- package/{sensitive.js → dist/sensitive.js} +1 -1
- package/dist/streamFilesReader.js +1 -0
- package/{worker → dist/worker}/pdf.worker.min.js +21 -21
- package/doc_assets/2.png +0 -0
- package/doc_assets/demo.md +27 -0
- package/doc_assets/demos/dist-app/assets/index.Dh-ZAS9Z.css +2 -0
- package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js +23699 -0
- package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js.map +1 -0
- package/doc_assets/demos/dist-app/index.html +14 -0
- package/doc_assets/demos/dist-app/vite.svg +1 -0
- package/doc_assets/images/1.png +0 -0
- package/doc_assets/images/3.png +0 -0
- package/doc_assets/images/component-screenshot.png +1 -0
- package/doc_assets/install.md +5 -0
- package/eslint.config.js +92 -0
- package/index.html +13 -0
- package/package.json +99 -44
- package/package.json.demo-backup +109 -0
- package/postcss.config.cjs +19 -0
- package/public/vite.svg +1 -0
- package/public/worker/pdf.worker.min.js +22 -0
- package/scripts/README.md +133 -0
- package/scripts/build-demo.js +88 -0
- package/scripts/demo-selector.js +216 -0
- package/scripts/dev-demo.js +76 -0
- package/scripts/preview-demo.js +130 -0
- package/scripts/run-demo.bat +34 -0
- package/src/assets/img/downArrow.png +0 -0
- package/src/assets/img/excel.png +0 -0
- package/src/assets/img/img.png +0 -0
- package/src/assets/img/pdf.png +0 -0
- package/src/assets/img/ppt.png +0 -0
- package/src/assets/img/txt.png +0 -0
- package/src/assets/img/word.png +0 -0
- package/src/assets/login/homeBg.png +0 -0
- package/src/assets/login/left.jpg +0 -0
- package/src/assets/login/logoImg.png +0 -0
- package/src/examples/Demo/index.tsx +12 -0
- package/src/examples/LoginPage/index.tsx +18 -0
- package/src/examples/chat/components/DrawerGraphPreview.tsx +78 -0
- package/src/examples/chat/index.tsx +177 -0
- package/src/examples/chat/logo03.png +0 -0
- package/src/examples/gientechStreamFilesReader/index.tsx +950 -0
- package/src/examples/ragDatabaseDataPage/index.tsx +36 -0
- package/src/examples/ragDatabaseIdPage/index.tsx +44 -0
- package/src/examples/ragDatabasePage/index.tsx +36 -0
- package/src/examples/ragModelManagePage/index.tsx +37 -0
- package/src/examples/ragSearchPage/index.tsx +0 -0
- package/src/examples/ragSensitiveWordsPage/index.tsx +32 -0
- package/src/examples/streamFiles/index.tsx +384 -0
- package/src/lib_enter.ts +40 -0
- package/src/main.tsx +5 -0
- package/src/main.tsx.backup +5 -0
- package/src/modules/chat/Conversations/Item.tsx +167 -0
- package/src/modules/chat/Conversations/List.tsx +206 -0
- package/src/modules/chat/Conversations/groupByTime.ts +39 -0
- package/src/modules/chat/Conversations/index.tsx +217 -0
- package/src/modules/chat/constants.tsx +33 -0
- package/src/modules/chat/data.txt +82 -0
- package/src/modules/chat/index.tsx +2024 -0
- package/src/modules/chat/types.ts +17 -0
- package/src/modules/database/CreateModal.tsx +398 -0
- package/src/modules/database/assets/Doris.png +0 -0
- package/src/modules/database/assets/PostgreSQL.png +0 -0
- package/src/modules/database/assets/SQLServer.png +0 -0
- package/src/modules/database/assets/database.svg +11 -0
- package/src/modules/database/assets/database_add.svg +53 -0
- package/src/modules/database/assets/database_connect.svg +66 -0
- package/src/modules/database/assets/database_upload.svg +29 -0
- package/src/modules/database/assets/empty.png +0 -0
- package/src/modules/database/assets/mysql.svg +14 -0
- package/src/modules/database/index.tsx +466 -0
- package/src/modules/database/server.ts +196 -0
- package/src/modules/databaseId/CustomCom.tsx +156 -0
- package/src/modules/databaseId/EditConfig.tsx +268 -0
- package/src/modules/databaseId/UploadDrawer.tsx +520 -0
- package/src/modules/databaseId/assets/aiOptimize.svg +10 -0
- package/src/modules/databaseId/assets/empty.png +0 -0
- package/src/modules/databaseId/assets/template.svg +6 -0
- package/src/modules/databaseId/assets/upload.svg +9 -0
- package/src/modules/databaseId/assets/useTemp.svg +6 -0
- package/src/modules/databaseId/index.tsx +734 -0
- package/src/modules/databaseId/server.ts +286 -0
- package/src/modules/databaseId/style.css +5 -0
- package/src/modules/databaseTable/EditRowDrawer.tsx +119 -0
- package/src/modules/databaseTable/index.tsx +357 -0
- package/src/modules/databaseTable/server.ts +180 -0
- package/src/modules/headlessChat/constants.tsx +32 -0
- package/src/modules/headlessChat/index.tsx +1063 -0
- package/src/modules/headlessChat/types.ts +23 -0
- package/src/modules/login/components/Login/LoginBox/index.tsx +102 -0
- package/src/modules/login/components/Login/RegisterBox/index.tsx +180 -0
- package/src/modules/login/components/Login/index.tsx +100 -0
- package/src/modules/login/index.tsx +106 -0
- package/src/modules/login/style.css +3 -0
- package/src/modules/login/useServices.ts +53 -0
- package/src/modules/login/utils.ts +42 -0
- package/src/modules/modelManage/ConfigDrawer.tsx +249 -0
- package/src/modules/modelManage/assets/empty.png +0 -0
- package/src/modules/modelManage/const.ts +50 -0
- package/src/modules/modelManage/index.tsx +439 -0
- package/src/modules/modelManage/server.ts +185 -0
- package/src/modules/nodegraph/index.tsx +1 -0
- package/src/modules/search/assets/Icon-history.svg +8 -0
- package/src/modules/search/assets/answerAwartar.png +0 -0
- package/src/modules/search/assets/doc.png +0 -0
- package/src/modules/search/assets/genera.gif +0 -0
- package/src/modules/search/assets/icon-robot.svg +9 -0
- package/src/modules/search/assets/icon-search-bar.svg +14 -0
- package/src/modules/search/assets/icon-sub-title.svg +3 -0
- package/src/modules/search/assets/icon-title.svg +9 -0
- package/src/modules/search/assets/icon-zoomOut.svg +9 -0
- package/src/modules/search/assets/iconAi.svg +9 -0
- package/src/modules/search/assets/pdf.png +0 -0
- package/src/modules/search/assets/ppt.png +0 -0
- package/src/modules/search/assets/search.svg +3 -0
- package/src/modules/search/assets/selected.svg +4 -0
- package/src/modules/search/assets/txt.png +0 -0
- package/src/modules/search/assets/xls.png +0 -0
- package/src/modules/search/components/AssisSelect.tsx +137 -0
- package/src/modules/search/components/Editor/ChatViewEditor.tsx +261 -0
- package/src/modules/search/components/Editor/aichat.css +1 -0
- package/src/modules/search/components/Editor/constant.ts +13 -0
- package/src/modules/search/components/Editor/index.tsx +113 -0
- package/src/modules/search/components/Editor/plugins/autofomatRules.ts +332 -0
- package/src/modules/search/components/Editor/plugins/convertImgPlugins.tsx +20 -0
- package/src/modules/search/components/Editor/plugins/createIndexes.tsx +38 -0
- package/src/modules/search/components/Editor/plugins/displayer.ts +298 -0
- package/src/modules/search/components/Editor/plugins/imageClick.tsx +32 -0
- package/src/modules/search/components/Editor/plugins/myplugin.tsx +98 -0
- package/src/modules/search/components/Editor/ui/avatar.tsx +19 -0
- package/src/modules/search/components/Editor/ui/blockquote-element.tsx +21 -0
- package/src/modules/search/components/Editor/ui/button.tsx +58 -0
- package/src/modules/search/components/Editor/ui/calendar.tsx +68 -0
- package/src/modules/search/components/Editor/ui/caption.tsx +46 -0
- package/src/modules/search/components/Editor/ui/checkbox.tsx +27 -0
- package/src/modules/search/components/Editor/ui/code-block-combobox.tsx +188 -0
- package/src/modules/search/components/Editor/ui/code-block-element.css +434 -0
- package/src/modules/search/components/Editor/ui/code-block-element.tsx +39 -0
- package/src/modules/search/components/Editor/ui/code-leaf.tsx +24 -0
- package/src/modules/search/components/Editor/ui/code-line-element.tsx +10 -0
- package/src/modules/search/components/Editor/ui/code-syntax-leaf.tsx +21 -0
- package/src/modules/search/components/Editor/ui/column-element.tsx +30 -0
- package/src/modules/search/components/Editor/ui/column-group-element.tsx +94 -0
- package/src/modules/search/components/Editor/ui/command.tsx +75 -0
- package/src/modules/search/components/Editor/ui/comment-avatar.tsx +22 -0
- package/src/modules/search/components/Editor/ui/comment-create-form.tsx +37 -0
- package/src/modules/search/components/Editor/ui/comment-item.tsx +74 -0
- package/src/modules/search/components/Editor/ui/comment-leaf.tsx +49 -0
- package/src/modules/search/components/Editor/ui/comment-more-dropdown.tsx +42 -0
- package/src/modules/search/components/Editor/ui/comment-reply-items.tsx +22 -0
- package/src/modules/search/components/Editor/ui/comment-resolve-button.tsx +32 -0
- package/src/modules/search/components/Editor/ui/comment-value.tsx +34 -0
- package/src/modules/search/components/Editor/ui/comments-popover.tsx +63 -0
- package/src/modules/search/components/Editor/ui/date-element.tsx +83 -0
- package/src/modules/search/components/Editor/ui/dialog.tsx +63 -0
- package/src/modules/search/components/Editor/ui/draggable.tsx +177 -0
- package/src/modules/search/components/Editor/ui/dropdown-menu.tsx +180 -0
- package/src/modules/search/components/Editor/ui/emoji-input-element.tsx +85 -0
- package/src/modules/search/components/Editor/ui/excalidraw-element.tsx +28 -0
- package/src/modules/search/components/Editor/ui/fixed-toolbar-buttons.tsx +76 -0
- package/src/modules/search/components/Editor/ui/fixed-toolbar.tsx +8 -0
- package/src/modules/search/components/Editor/ui/floating-toolbar-buttons.tsx +51 -0
- package/src/modules/search/components/Editor/ui/floating-toolbar.tsx +77 -0
- package/src/modules/search/components/Editor/ui/heading-element.tsx +48 -0
- package/src/modules/search/components/Editor/ui/highlight-leaf.tsx +17 -0
- package/src/modules/search/components/Editor/ui/hr-element.tsx +30 -0
- package/src/modules/search/components/Editor/ui/icons.tsx +267 -0
- package/src/modules/search/components/Editor/ui/image-element.tsx +74 -0
- package/src/modules/search/components/Editor/ui/inline-combobox.tsx +368 -0
- package/src/modules/search/components/Editor/ui/input.tsx +25 -0
- package/src/modules/search/components/Editor/ui/insert-dropdown-menu.tsx +218 -0
- package/src/modules/search/components/Editor/ui/kbd-leaf.tsx +20 -0
- package/src/modules/search/components/Editor/ui/link-element.tsx +29 -0
- package/src/modules/search/components/Editor/ui/link-floating-toolbar.tsx +161 -0
- package/src/modules/search/components/Editor/ui/list-element.tsx +30 -0
- package/src/modules/search/components/Editor/ui/mark-toolbar-button.tsx +24 -0
- package/src/modules/search/components/Editor/ui/media-embed-element.tsx +133 -0
- package/src/modules/search/components/Editor/ui/media-popover.tsx +97 -0
- package/src/modules/search/components/Editor/ui/mention-element.tsx +43 -0
- package/src/modules/search/components/Editor/ui/mention-input-element.tsx +141 -0
- package/src/modules/search/components/Editor/ui/mode-dropdown-menu.tsx +93 -0
- package/src/modules/search/components/Editor/ui/more-dropdown-menu.tsx +67 -0
- package/src/modules/search/components/Editor/ui/paragraph-element.tsx +4 -0
- package/src/modules/search/components/Editor/ui/placeholder.tsx +52 -0
- package/src/modules/search/components/Editor/ui/popover.tsx +32 -0
- package/src/modules/search/components/Editor/ui/resizable.tsx +66 -0
- package/src/modules/search/components/Editor/ui/separator.tsx +25 -0
- package/src/modules/search/components/Editor/ui/style.less +12 -0
- package/src/modules/search/components/Editor/ui/table-cell-element.tsx +143 -0
- package/src/modules/search/components/Editor/ui/table-element.tsx +243 -0
- package/src/modules/search/components/Editor/ui/table-row-element.tsx +22 -0
- package/src/modules/search/components/Editor/ui/tableValue.tsx +135 -0
- package/src/modules/search/components/Editor/ui/todo-list-element.tsx +43 -0
- package/src/modules/search/components/Editor/ui/toggle-element.tsx +31 -0
- package/src/modules/search/components/Editor/ui/toolbar.tsx +157 -0
- package/src/modules/search/components/Editor/ui/tooltip.tsx +65 -0
- package/src/modules/search/components/Editor/ui/turn-into-dropdown-menu.tsx +160 -0
- package/src/modules/search/components/Editor/ui/with-draggables.tsx +175 -0
- package/src/modules/search/components/FileList.tsx +287 -0
- package/src/modules/search/components/ImageGroupView/index.tsx +85 -0
- package/src/modules/search/components/ResultContent.tsx +232 -0
- package/src/modules/search/components/SearchInput.tsx +232 -0
- package/src/modules/search/components/SearchLanding.tsx +74 -0
- package/src/modules/search/components/SearchView.tsx +563 -0
- package/src/modules/search/components/SimpleEditor.tsx +158 -0
- package/src/modules/search/components/SimpleFileList.tsx +215 -0
- package/src/modules/search/index.tsx +10 -0
- package/src/modules/search/reademe.md +1 -0
- package/src/modules/search/servers/apis.tsx +19 -0
- package/src/modules/search/servers/index.ts +184 -0
- package/src/modules/search/style.less +503 -0
- package/src/modules/search/type.ts +22 -0
- package/src/modules/search/utils.ts +34 -0
- package/src/modules/sensitive/index.tsx +313 -0
- package/src/modules/sensitive/server.ts +122 -0
- package/src/modules/streamFilesReader/GientechStreamReader.tsx +1619 -0
- package/src/modules/streamFilesReader/components/Header/Toolbar.tsx +0 -0
- package/src/modules/streamFilesReader/components/Header/index.tsx +297 -0
- package/src/modules/streamFilesReader/index.tsx +3 -0
- package/src/style.css +6 -0
- package/src/type.d.ts +0 -0
- package/src/utils/commonFn.tsx +111 -0
- package/src/utils/gientechCommon/components/AppError.tsx +32 -0
- package/src/utils/gientechCommon/components/AppLoading.tsx +75 -0
- package/src/utils/gientechCommon/components/DeleteModal.tsx +75 -0
- package/src/utils/gientechCommon/components/DisplayError.tsx +33 -0
- package/src/utils/gientechCommon/components/DisplayLoading.tsx +38 -0
- package/src/utils/gientechCommon/components/FeedBackModal.tsx +310 -0
- package/src/utils/gientechCommon/components/FileCardCommon.tsx +82 -0
- package/src/utils/gientechCommon/components/FileManager/index.tsx +390 -0
- package/src/utils/gientechCommon/components/FileManager/style.css +5 -0
- package/src/utils/gientechCommon/components/Messages/GientechNewChatWelcome.tsx +296 -0
- package/src/utils/gientechCommon/components/Messages/ReferenceCard.tsx +339 -0
- package/src/utils/gientechCommon/components/Messages/RetriveItem.tsx +245 -0
- package/src/utils/gientechCommon/components/Messages/WebRetriveItem.tsx +209 -0
- package/src/utils/gientechCommon/components/Messages/defaultBot.png +0 -0
- package/src/utils/gientechCommon/components/Messages/defaultStyleSet.tsx +148 -0
- package/src/utils/gientechCommon/components/Messages/defaultWeLogo.svg +14 -0
- package/src/utils/gientechCommon/components/RenameModal.tsx +86 -0
- package/src/utils/gientechCommon/components/style.less +11 -0
- package/src/utils/gientechCommon/configs/commonConfig.ts +2 -0
- package/src/utils/gientechCommon/configs/senderConfig.ts +0 -0
- package/src/utils/gientechCommon/configs/stylesConfig.ts +142 -0
- package/src/utils/gientechCommon/hooks/AichatUseController.tsx +345 -0
- package/src/utils/gientechCommon/slate/converters/deserializers.ts +763 -0
- package/src/utils/gientechCommon/slate/converters/mockData.ts +232 -0
- package/src/utils/gientechCommon/slate/converters/slateConverters.ts +258 -0
- package/src/utils/gientechCommon/slate/richElements/index.tsx +499 -0
- package/src/utils/gientechCommon/utils/request.ts +37 -0
- package/src/utils/gientechCommon/utils/serverFn.ts +172 -0
- package/src/utils/index.tsx +126 -0
- package/src/utils/testconfigs/demologin/index.tsx +32 -0
- package/src/utils/testconfigs/index.ts +53 -0
- package/src/vite-env.d.ts +11 -0
- package/stats.html +4949 -0
- package/tailwind.config.js +170 -0
- package/tsconfig.app.json +30 -0
- package/tsconfig.app.tsbuildinfo +11 -0
- package/tsconfig.json +13 -0
- package/tsconfig.node.json +22 -0
- package/tsconfig.node.tsbuildinfo +1 -0
- package/vite.config.ts +216 -0
- package/workflows/release.yml +60 -0
- package/assets/AppLoading-BpA2wf4Z.js +0 -414
- package/assets/LeftOutlined-BdBZ6FSD.js +0 -1
- package/assets/index-CNJZ9j4J.js +0 -1
- package/assets/index-DfSHCQcq.js +0 -1289
- package/assets/style3.css +0 -1
- package/chat.js +0 -151
- package/database.js +0 -20
- package/databaseTable.js +0 -18
- package/streamFilesReader.js +0 -1
- /package/{assets → dist/assets}/Doris.png +0 -0
- /package/{assets → dist/assets}/PostgreSQL.png +0 -0
- /package/{assets → dist/assets}/SQLServer.png +0 -0
- /package/{assets → dist/assets}/empty.png +0 -0
- /package/{assets → dist/assets}/homeBg.png +0 -0
- /package/{assets → dist/assets}/index-CpW6Dhpp.js +0 -0
- /package/{assets → dist/assets}/left.jpg +0 -0
- /package/{assets → dist/assets}/logoImg.png +0 -0
- /package/{assets → dist/assets}/style.css +0 -0
- /package/{assets → dist/assets}/style2.css +0 -0
- /package/{assets → dist/assets}/style4.css +0 -0
- /package/{database.d.ts → dist/database.d.ts} +0 -0
- /package/{databaseId.d.ts → dist/databaseId.d.ts} +0 -0
- /package/{databaseTable.d.ts → dist/databaseTable.d.ts} +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{modelManage.d.ts → dist/modelManage.d.ts} +0 -0
- /package/{sensitive.d.ts → dist/sensitive.d.ts} +0 -0
- /package/{streamFilesReader.d.ts → dist/streamFilesReader.d.ts} +0 -0
- /package/{vite.svg → dist/vite.svg} +0 -0
|
@@ -0,0 +1,1078 @@
|
|
|
1
|
+
import*as m from"react";import he,{useState as ut,useCallback as ze,useImperativeHandle as ps,forwardRef as Zr,useMemo as Je,useRef as ct,createContext as jr,useEffect as yt,createElement as Pa,useContext as Ho,useLayoutEffect as dg,useReducer as fg,Component as pg,memo as hg}from"react";import Dl,{flushSync as gg,unstable_batchedUpdates as mg,createPortal as vg}from"react-dom";import{bf as gr,b7 as bg,aJ as yf,K as Rt,a0 as Cf,bg as hs,bh as Ra,L as Bt,S as Ve,h as Ne,bi as xf,N as Ke,V as ie,bj as gs,bk as vn,U as be,_ as et,bl as Df,k as In,Q as kr,M as wf,aK as _r,a_ as Ef,a$ as Sf,b0 as kf,b2 as Bf,bm as xo,bn as Wo,w as Af,ah as yr,ag as Cr,C as Jr,o as zn,T as Ta,bo as yg,a2 as Cg,t as De,aj as $f,b3 as Ff,g as oi,b as Fo,b5 as Nf,bp as Ia,i as Of,aO as wl,r as qo,aW as un,bq as xg,a1 as Pf,av as vr,ax as ms,b8 as Rf,br as Dg,bs as wg,bt as Eg,bu as Sg,d as kg,bv as gu,$ as mu,f as Bg,e as Ag,aC as ai,aq as vs,bw as $g,a3 as Fg,bx as Ng,u as Og,by as Pg,bz as Rg,bA as Tg,H as ja,W as Gr,bB as bs,bC as ys,bD as vu,bE as Cs,bF as bu,bG as yu,O as _a,bH as Tf,bI as Ma,bJ as Ig,bK as If,b1 as lt,bL as jg,q as _g,ay as Mg,b9 as Lg,bM as zg,bN as Kg,z as jf,bO as Cu,bP as Hg,A as Wg,aR as qg,y as Ug,G as Vg,ad as Gg,bQ as ii,ab as na}from"./index-D1m34Ij7.js";import{R as Yg,a as Xg,S as _f,P as Mf}from"./index-BVENTW1Q.js";function El(e){return e!=null&&e===e.window}const Zg=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return El(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!El(e)&&typeof n!="number"&&(n=(r=((t=e.ownerDocument)!==null&&t!==void 0?t:e).documentElement)===null||r===void 0?void 0:r.scrollTop),n};function Jg(e,t,r,n){const o=r-t;return e/=n/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function Qg(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),l=Zg(a),i=Date.now(),u=()=>{const c=Date.now()-i,p=Jg(c>o?o:c,l,e,o);El(a)?a.scrollTo(window.pageXOffset,p):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=p:a.scrollTop=p,c<o?gr(u):typeof n=="function"&&n()};gr(u)}const em=e=>{const[t,r]=ut(null);return[ze((o,a,l)=>{const i=t??o,u=Math.min(i||0,o),s=Math.max(i||0,o),c=a.slice(u,s+1).map(e),p=c.some(h=>!l.has(h)),d=[];return c.forEach(h=>{p?(l.has(h)||d.push(h),l.add(h)):(l.delete(h),d.push(h))}),r(p?s:null),d},[t]),r]};function tm(e,t){return e._antProxy=e._antProxy||{},Object.keys(t).forEach(r=>{if(!(r in e._antProxy)){const n=e[r];e._antProxy[r]=n,e[r]=t[r]}}),e}const rm=(e,t)=>ps(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(o,a){return r[a]?r[a]:Reflect.get(o,a)}}):tm(n,r)}),nm=e=>{const t=m.useRef(e),[,r]=bg();return[()=>t.current,n=>{t.current=n,r()}]};var Lf=function(t){if(yf()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(o){return o in n.style})}return!1},om=function(t,r){if(!Lf(t))return!1;var n=document.createElement("div"),o=n.style[t];return n.style[t]=r,n.style[t]!==o};function am(e,t){return!Array.isArray(e)&&t!==void 0?om(e,t):Lf(e)}var im=Rt.ESC,lm=Rt.TAB;function sm(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,l=m.useRef(!1),i=function(){if(t){var p,d;(p=r.current)===null||p===void 0||(d=p.focus)===null||d===void 0||d.call(p),n==null||n(!1)}},u=function(){var p;return(p=a.current)!==null&&p!==void 0&&p.focus?(a.current.focus(),l.current=!0,!0):!1},s=function(p){switch(p.keyCode){case im:i();break;case lm:{var d=!1;l.current||(d=u()),d?p.preventDefault():i();break}}};m.useEffect(function(){return t?(window.addEventListener("keydown",s),o&&gr(u,3),function(){window.removeEventListener("keydown",s),l.current=!1}):function(){l.current=!1}},[t])}var um=Zr(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=Je(function(){var i;return typeof r=="function"?i=r():i=r,i},[r]),l=Cf(t,hs(a));return he.createElement(he.Fragment,null,n&&he.createElement("div",{className:"".concat(o,"-arrow")}),he.cloneElement(a,{ref:Ra(a)?l:void 0}))}),$n={adjustX:1,adjustY:1},Fn=[0,0],cm={topLeft:{points:["bl","tl"],overflow:$n,offset:[0,-4],targetOffset:Fn},top:{points:["bc","tc"],overflow:$n,offset:[0,-4],targetOffset:Fn},topRight:{points:["br","tr"],overflow:$n,offset:[0,-4],targetOffset:Fn},bottomLeft:{points:["tl","bl"],overflow:$n,offset:[0,4],targetOffset:Fn},bottom:{points:["tc","bc"],overflow:$n,offset:[0,4],targetOffset:Fn},bottomRight:{points:["tr","br"],overflow:$n,offset:[0,4],targetOffset:Fn}},dm=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function fm(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,l=a===void 0?"rc-dropdown":a,i=e.transitionName,u=e.animation,s=e.align,c=e.placement,p=c===void 0?"bottomLeft":c,d=e.placements,h=d===void 0?cm:d,g=e.getPopupContainer,v=e.showAction,f=e.hideAction,b=e.overlayClassName,C=e.overlayStyle,y=e.visible,x=e.trigger,B=x===void 0?["hover"]:x,A=e.autoFocus,$=e.overlay,F=e.children,w=e.onVisibleChange,j=Bt(e,dm),N=he.useState(),I=Ve(N,2),T=I[0],E=I[1],k="visible"in e?y:T,O=he.useRef(null),S=he.useRef(null),P=he.useRef(null);he.useImperativeHandle(t,function(){return O.current});var _=function(W){E(W),w==null||w(W)};sm({visible:k,triggerRef:P,onVisibleChange:_,autoFocus:A,overlayRef:S});var H=function(W){var K=e.onOverlayClick;E(!1),K&&K(W)},z=function(){return he.createElement(um,{ref:S,overlay:$,prefixCls:l,arrow:o})},q=function(){return typeof $=="function"?z:z()},V=function(){var W=e.minOverlayWidthMatchTrigger,K=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?W:!K},Z=function(){var W=e.openClassName;return W!==void 0?W:"".concat(l,"-open")},ae=he.cloneElement(F,{className:Ne((r=F.props)===null||r===void 0?void 0:r.className,k&&Z()),ref:Ra(F)?Cf(P,hs(F)):void 0}),R=f;return!R&&B.indexOf("contextMenu")!==-1&&(R=["click"]),he.createElement(xf,Ke({builtinPlacements:h},j,{prefixCls:l,ref:O,popupClassName:Ne(b,ie({},"".concat(l,"-show-arrow"),o)),popupStyle:C,action:B,showAction:v,hideAction:R,popupPlacement:p,popupAlign:s,popupTransitionName:i,popupAnimation:u,popupVisible:k,stretch:V()?"minWidth":"",popup:q(),onPopupVisibleChange:_,onPopupClick:H,getPopupContainer:g}),ae)}const pm=he.forwardRef(fm),hm=e=>typeof e!="object"&&typeof e!="function"||e===null;var zf=m.createContext(null);function Kf(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function Hf(e){var t=m.useContext(zf);return Kf(t,e)}var gm=["children","locked"],br=m.createContext(null);function mm(e,t){var r=be({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function No(e){var t=e.children,r=e.locked,n=Bt(e,gm),o=m.useContext(br),a=gs(function(){return mm(o,n)},[o,n],function(l,i){return!r&&(l[0]!==i[0]||!vn(l[1],i[1],!0))});return m.createElement(br.Provider,{value:a},t)}var vm=[],Wf=m.createContext(null);function li(){return m.useContext(Wf)}var qf=m.createContext(vm);function Xn(e){var t=m.useContext(qf);return m.useMemo(function(){return e!==void 0?[].concat(et(t),[e]):t},[t,e])}var Uf=m.createContext(null),xs=m.createContext({});function xu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Df(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),l=null;return o&&!Number.isNaN(a)?l=a:n&&l===null&&(l=0),n&&e.disabled&&(l=null),l!==null&&(l>=0||t&&l<0)}return!1}function bm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=et(e.querySelectorAll("*")).filter(function(n){return xu(n,t)});return xu(e,t)&&r.unshift(e),r}var Sl=Rt.LEFT,kl=Rt.RIGHT,Bl=Rt.UP,Ca=Rt.DOWN,xa=Rt.ENTER,Vf=Rt.ESC,co=Rt.HOME,fo=Rt.END,Du=[Bl,Ca,Sl,kl];function ym(e,t,r,n){var o,a="prev",l="next",i="children",u="parent";if(e==="inline"&&n===xa)return{inlineTrigger:!0};var s=ie(ie({},Bl,a),Ca,l),c=ie(ie(ie(ie({},Sl,r?l:a),kl,r?a:l),Ca,i),xa,i),p=ie(ie(ie(ie(ie(ie({},Bl,a),Ca,l),xa,i),Vf,u),Sl,r?i:u),kl,r?u:i),d={inline:s,horizontal:c,vertical:p,inlineSub:s,horizontalSub:p,verticalSub:p},h=(o=d["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(h){case a:return{offset:-1,sibling:!0};case l:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case i:return{offset:1,sibling:!1};default:return null}}function Cm(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function xm(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function Ds(e,t){var r=bm(e,!0);return r.filter(function(n){return t.has(n)})}function wu(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=Ds(e,t),a=o.length,l=o.findIndex(function(i){return r===i});return n<0?l===-1?l=a-1:l-=1:n>0&&(l+=1),l=(l+a)%a,o[l]}var Al=function(t,r){var n=new Set,o=new Map,a=new Map;return t.forEach(function(l){var i=document.querySelector("[data-menu-id='".concat(Kf(r,l),"']"));i&&(n.add(i),a.set(i,l),o.set(l,i))}),{elements:n,key2element:o,element2key:a}};function Dm(e,t,r,n,o,a,l,i,u,s){var c=m.useRef(),p=m.useRef();p.current=t;var d=function(){gr.cancel(c.current)};return m.useEffect(function(){return function(){d()}},[]),function(h){var g=h.which;if([].concat(Du,[xa,Vf,co,fo]).includes(g)){var v=a(),f=Al(v,n),b=f,C=b.elements,y=b.key2element,x=b.element2key,B=y.get(t),A=xm(B,C),$=x.get(A),F=ym(e,l($,!0).length===1,r,g);if(!F&&g!==co&&g!==fo)return;(Du.includes(g)||[co,fo].includes(g))&&h.preventDefault();var w=function(S){if(S){var P=S,_=S.querySelector("a");_!=null&&_.getAttribute("href")&&(P=_);var H=x.get(S);i(H),d(),c.current=gr(function(){p.current===H&&P.focus()})}};if([co,fo].includes(g)||F.sibling||!A){var j;!A||e==="inline"?j=o.current:j=Cm(A);var N,I=Ds(j,C);g===co?N=I[0]:g===fo?N=I[I.length-1]:N=wu(j,C,A,F.offset),w(N)}else if(F.inlineTrigger)u($);else if(F.offset>0)u($,!0),d(),c.current=gr(function(){f=Al(v,n);var O=A.getAttribute("aria-controls"),S=document.getElementById(O),P=wu(S,f.elements);w(P)},5);else if(F.offset<0){var T=l($,!0),E=T[T.length-2],k=y.get(E);u(E,!1),w(k)}}s==null||s(h)}}function wm(e){Promise.resolve().then(e)}var ws="__RC_UTIL_PATH_SPLIT__",Eu=function(t){return t.join(ws)},Em=function(t){return t.split(ws)},$l="rc-menu-more";function Sm(){var e=m.useState({}),t=Ve(e,2),r=t[1],n=ct(new Map),o=ct(new Map),a=m.useState([]),l=Ve(a,2),i=l[0],u=l[1],s=ct(0),c=ct(!1),p=function(){c.current||r({})},d=ze(function(y,x){var B=Eu(x);o.current.set(B,y),n.current.set(y,B),s.current+=1;var A=s.current;wm(function(){A===s.current&&p()})},[]),h=ze(function(y,x){var B=Eu(x);o.current.delete(B),n.current.delete(y)},[]),g=ze(function(y){u(y)},[]),v=ze(function(y,x){var B=n.current.get(y)||"",A=Em(B);return x&&i.includes(A[0])&&A.unshift($l),A},[i]),f=ze(function(y,x){return y.filter(function(B){return B!==void 0}).some(function(B){var A=v(B,!0);return A.includes(x)})},[v]),b=function(){var x=et(n.current.keys());return i.length&&x.push($l),x},C=ze(function(y){var x="".concat(n.current.get(y)).concat(ws),B=new Set;return et(o.current.keys()).forEach(function(A){A.startsWith(x)&&B.add(o.current.get(A))}),B},[]);return m.useEffect(function(){return function(){c.current=!0}},[]),{registerPath:d,unregisterPath:h,refreshOverflowKeys:g,isSubPathKey:f,getKeyPath:v,getKeys:b,getSubPathKeys:C}}function vo(e){var t=m.useRef(e);t.current=e;var r=m.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var km=Math.random().toFixed(5).toString().slice(2),Su=0;function Bm(e){var t=In(e,{value:e}),r=Ve(t,2),n=r[0],o=r[1];return m.useEffect(function(){Su+=1;var a="".concat(km,"-").concat(Su);o("rc-menu-uuid-".concat(a))},[]),n}function Gf(e,t,r,n){var o=m.useContext(br),a=o.activeKey,l=o.onActive,i=o.onInactive,u={active:a===e};return t||(u.onMouseEnter=function(s){r==null||r({key:e,domEvent:s}),l(e)},u.onMouseLeave=function(s){n==null||n({key:e,domEvent:s}),i(e)}),u}function Yf(e){var t=m.useContext(br),r=t.mode,n=t.rtl,o=t.inlineIndent;if(r!=="inline")return null;var a=e;return n?{paddingRight:a*o}:{paddingLeft:a*o}}function Xf(e){var t=e.icon,r=e.props,n=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=m.createElement(t,be({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var Am=["item"];function La(e){var t=e.item,r=Bt(e,Am);return Object.defineProperty(r,"item",{get:function(){return kr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var $m=["title","attribute","elementRef"],Fm=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Nm=["active"],Om=(function(e){Ef(r,e);var t=Sf(r);function r(){return kf(this,r),t.apply(this,arguments)}return Bf(r,[{key:"render",value:function(){var o=this.props,a=o.title,l=o.attribute,i=o.elementRef,u=Bt(o,$m),s=_r(u,["eventKey","popupClassName","popupOffset","onTitleClick"]);return kr(!l,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),m.createElement(xo.Item,Ke({},l,{title:typeof a=="string"?a:void 0},s,{ref:i}))}}]),r})(m.Component),Pm=m.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.eventKey;e.warnKey;var a=e.disabled,l=e.itemIcon,i=e.children,u=e.role,s=e.onMouseEnter,c=e.onMouseLeave,p=e.onClick,d=e.onKeyDown,h=e.onFocus,g=Bt(e,Fm),v=Hf(o),f=m.useContext(br),b=f.prefixCls,C=f.onItemClick,y=f.disabled,x=f.overflowDisabled,B=f.itemIcon,A=f.selectedKeys,$=f.onActive,F=m.useContext(xs),w=F._internalRenderMenuItem,j="".concat(b,"-item"),N=m.useRef(),I=m.useRef(),T=y||a,E=wf(t,I),k=Xn(o),O=function(K){return{key:o,keyPath:et(k).reverse(),item:N.current,domEvent:K}},S=l||B,P=Gf(o,T,s,c),_=P.active,H=Bt(P,Nm),z=A.includes(o),q=Yf(k.length),V=function(K){if(!T){var J=O(K);p==null||p(La(J)),C(J)}},Z=function(K){if(d==null||d(K),K.which===Rt.ENTER){var J=O(K);p==null||p(La(J)),C(J)}},ae=function(K){$(o),h==null||h(K)},R={};e.role==="option"&&(R["aria-selected"]=z);var U=m.createElement(Om,Ke({ref:N,elementRef:E,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":x&&v?null:v},_r(g,["extra"]),H,R,{component:"li","aria-disabled":a,style:be(be({},q),r),className:Ne(j,ie(ie(ie({},"".concat(j,"-active"),_),"".concat(j,"-selected"),z),"".concat(j,"-disabled"),T),n),onClick:V,onKeyDown:Z,onFocus:ae}),i,m.createElement(Xf,{props:be(be({},e),{},{isSelected:z}),icon:S}));return w&&(U=w(U,e,{selected:z})),U});function Rm(e,t){var r=e.eventKey,n=li(),o=Xn(r);return m.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:m.createElement(Pm,Ke({},e,{ref:t}))}const si=m.forwardRef(Rm);var Tm=["className","children"],Im=function(t,r){var n=t.className,o=t.children,a=Bt(t,Tm),l=m.useContext(br),i=l.prefixCls,u=l.mode,s=l.rtl;return m.createElement("ul",Ke({className:Ne(i,s&&"".concat(i,"-rtl"),"".concat(i,"-sub"),"".concat(i,"-").concat(u==="inline"?"inline":"vertical"),n),role:"menu"},a,{"data-menu-list":!0,ref:r}),o)},Es=m.forwardRef(Im);Es.displayName="SubMenuList";function Ss(e,t){return Wo(e).map(function(r,n){if(m.isValidElement(r)){var o,a,l=r.key,i=(o=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&o!==void 0?o:l,u=i==null;u&&(i="tmp_key-".concat([].concat(et(t),[n]).join("-")));var s={key:i,eventKey:i};return m.cloneElement(r,s)}return r})}var Ut={adjustX:1,adjustY:1},jm={topLeft:{points:["bl","tl"],overflow:Ut},topRight:{points:["br","tr"],overflow:Ut},bottomLeft:{points:["tl","bl"],overflow:Ut},bottomRight:{points:["tr","br"],overflow:Ut},leftTop:{points:["tr","tl"],overflow:Ut},leftBottom:{points:["br","bl"],overflow:Ut},rightTop:{points:["tl","tr"],overflow:Ut},rightBottom:{points:["bl","br"],overflow:Ut}},_m={topLeft:{points:["bl","tl"],overflow:Ut},topRight:{points:["br","tr"],overflow:Ut},bottomLeft:{points:["tl","bl"],overflow:Ut},bottomRight:{points:["tr","br"],overflow:Ut},rightTop:{points:["tr","tl"],overflow:Ut},rightBottom:{points:["br","bl"],overflow:Ut},leftTop:{points:["tl","tr"],overflow:Ut},leftBottom:{points:["bl","br"],overflow:Ut}};function Zf(e,t,r){if(t)return t;if(r)return r[e]||r.other}var Mm={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Lm(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,l=e.popupClassName,i=e.popupOffset,u=e.disabled,s=e.mode,c=e.onVisibleChange,p=m.useContext(br),d=p.getPopupContainer,h=p.rtl,g=p.subMenuOpenDelay,v=p.subMenuCloseDelay,f=p.builtinPlacements,b=p.triggerSubMenuAction,C=p.forceSubMenuRender,y=p.rootClassName,x=p.motion,B=p.defaultMotions,A=m.useState(!1),$=Ve(A,2),F=$[0],w=$[1],j=h?be(be({},_m),f):be(be({},jm),f),N=Mm[s],I=Zf(s,x,B),T=m.useRef(I);s!=="inline"&&(T.current=I);var E=be(be({},T.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),k=m.useRef();return m.useEffect(function(){return k.current=gr(function(){w(r)}),function(){gr.cancel(k.current)}},[r]),m.createElement(xf,{prefixCls:t,popupClassName:Ne("".concat(t,"-popup"),ie({},"".concat(t,"-rtl"),h),l,y),stretch:s==="horizontal"?"minWidth":null,getPopupContainer:d,builtinPlacements:j,popupPlacement:N,popupVisible:F,popup:o,popupStyle:a,popupAlign:i&&{offset:i},action:u?[]:[b],mouseEnterDelay:g,mouseLeaveDelay:v,onPopupVisibleChange:c,forceRender:C,popupMotion:E,fresh:!0},n)}function zm(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",l=m.useContext(br),i=l.prefixCls,u=l.forceSubMenuRender,s=l.motion,c=l.defaultMotions,p=l.mode,d=m.useRef(!1);d.current=p===a;var h=m.useState(!d.current),g=Ve(h,2),v=g[0],f=g[1],b=d.current?r:!1;m.useEffect(function(){d.current&&f(!1)},[p]);var C=be({},Zf(a,s,c));n.length>1&&(C.motionAppear=!1);var y=C.onVisibleChanged;return C.onVisibleChanged=function(x){return!d.current&&!x&&f(!0),y==null?void 0:y(x)},v?null:m.createElement(No,{mode:a,locked:!d.current},m.createElement(Af,Ke({visible:b},C,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(i,"-hidden")}),function(x){var B=x.className,A=x.style;return m.createElement(Es,{id:t,className:B,style:A},o)}))}var Km=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Hm=["active"],Wm=m.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.title,a=e.eventKey;e.warnKey;var l=e.disabled,i=e.internalPopupClose,u=e.children,s=e.itemIcon,c=e.expandIcon,p=e.popupClassName,d=e.popupOffset,h=e.popupStyle,g=e.onClick,v=e.onMouseEnter,f=e.onMouseLeave,b=e.onTitleClick,C=e.onTitleMouseEnter,y=e.onTitleMouseLeave,x=Bt(e,Km),B=Hf(a),A=m.useContext(br),$=A.prefixCls,F=A.mode,w=A.openKeys,j=A.disabled,N=A.overflowDisabled,I=A.activeKey,T=A.selectedKeys,E=A.itemIcon,k=A.expandIcon,O=A.onItemClick,S=A.onOpenChange,P=A.onActive,_=m.useContext(xs),H=_._internalRenderSubMenuItem,z=m.useContext(Uf),q=z.isSubPathKey,V=Xn(),Z="".concat($,"-submenu"),ae=j||l,R=m.useRef(),U=m.useRef(),W=s??E,K=c??k,J=w.includes(a),Q=!N&&J,ee=q(T,a),oe=Gf(a,ae,C,y),re=oe.active,ne=Bt(oe,Hm),de=m.useState(!1),ce=Ve(de,2),Se=ce[0],We=ce[1],qe=function(Me){ae||We(Me)},ue=function(Me){qe(!0),v==null||v({key:a,domEvent:Me})},ve=function(Me){qe(!1),f==null||f({key:a,domEvent:Me})},we=m.useMemo(function(){return re||(F!=="inline"?Se||q([I],a):!1)},[F,re,I,Se,a,q]),Le=Yf(V.length),$e=function(Me){ae||(b==null||b({key:a,domEvent:Me}),F==="inline"&&S(a,!J))},Oe=vo(function(Ze){g==null||g(La(Ze)),O(Ze)}),Qe=function(Me){F!=="inline"&&S(a,Me)},Ge=function(){P(a)},Re=B&&"".concat(B,"-popup"),je=m.useMemo(function(){return m.createElement(Xf,{icon:F!=="horizontal"?K:void 0,props:be(be({},e),{},{isOpen:Q,isSubMenu:!0})},m.createElement("i",{className:"".concat(Z,"-arrow")}))},[F,K,e,Q,Z]),xe=m.createElement("div",Ke({role:"menuitem",style:Le,className:"".concat(Z,"-title"),tabIndex:ae?null:-1,ref:R,title:typeof o=="string"?o:null,"data-menu-id":N&&B?null:B,"aria-expanded":Q,"aria-haspopup":!0,"aria-controls":Re,"aria-disabled":ae,onClick:$e,onFocus:Ge},ne),o,je),ye=m.useRef(F);if(F!=="inline"&&V.length>1?ye.current="vertical":ye.current=F,!N){var _e=ye.current;xe=m.createElement(Lm,{mode:_e,prefixCls:Z,visible:!i&&Q&&F!=="inline",popupClassName:p,popupOffset:d,popupStyle:h,popup:m.createElement(No,{mode:_e==="horizontal"?"vertical":_e},m.createElement(Es,{id:Re,ref:U},u)),disabled:ae,onVisibleChange:Qe},xe)}var Ue=m.createElement(xo.Item,Ke({ref:t,role:"none"},x,{component:"li",style:r,className:Ne(Z,"".concat(Z,"-").concat(F),n,ie(ie(ie(ie({},"".concat(Z,"-open"),Q),"".concat(Z,"-active"),we),"".concat(Z,"-selected"),ee),"".concat(Z,"-disabled"),ae)),onMouseEnter:ue,onMouseLeave:ve}),xe,!N&&m.createElement(zm,{id:Re,open:Q,keyPath:V},u));return H&&(Ue=H(Ue,e,{selected:ee,active:we,open:Q,disabled:ae})),m.createElement(No,{onItemClick:Oe,mode:F==="horizontal"?"vertical":F,itemIcon:W,expandIcon:K},Ue)}),ui=m.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=Xn(r),a=Ss(n,o),l=li();m.useEffect(function(){if(l)return l.registerPath(r,o),function(){l.unregisterPath(r,o)}},[o]);var i;return l?i=a:i=m.createElement(Wm,Ke({ref:t},e),a),m.createElement(qf.Provider,{value:o},i)});function ks(e){var t=e.className,r=e.style,n=m.useContext(br),o=n.prefixCls,a=li();return a?null:m.createElement("li",{role:"separator",className:Ne("".concat(o,"-item-divider"),t),style:r})}var qm=["className","title","eventKey","children"],Um=m.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var o=e.children,a=Bt(e,qm),l=m.useContext(br),i=l.prefixCls,u="".concat(i,"-item-group");return m.createElement("li",Ke({ref:t,role:"presentation"},a,{onClick:function(c){return c.stopPropagation()},className:Ne(u,r)}),m.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof n=="string"?n:void 0},n),m.createElement("ul",{role:"group",className:"".concat(u,"-list")},o))}),Bs=m.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=Xn(r),a=Ss(n,o),l=li();return l?a:m.createElement(Um,Ke({ref:t},_r(e,["warnKey"])),a)}),Vm=["label","children","key","type","extra"];function Fl(e,t,r){var n=t.item,o=t.group,a=t.submenu,l=t.divider;return(e||[]).map(function(i,u){if(i&&yr(i)==="object"){var s=i,c=s.label,p=s.children,d=s.key,h=s.type,g=s.extra,v=Bt(s,Vm),f=d??"tmp-".concat(u);return p||h==="group"?h==="group"?m.createElement(o,Ke({key:f},v,{title:c}),Fl(p,t,r)):m.createElement(a,Ke({key:f},v,{title:c}),Fl(p,t,r)):h==="divider"?m.createElement(l,Ke({key:f},v)):m.createElement(n,Ke({key:f},v,{extra:g}),c,(!!g||g===0)&&m.createElement("span",{className:"".concat(r,"-item-extra")},g))}return null}).filter(function(i){return i})}function ku(e,t,r,n,o){var a=e,l=be({divider:ks,item:si,group:Bs,submenu:ui},n);return t&&(a=Fl(t,l,o)),Ss(a,r)}var Gm=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],an=[],Ym=m.forwardRef(function(e,t){var r,n=e,o=n.prefixCls,a=o===void 0?"rc-menu":o,l=n.rootClassName,i=n.style,u=n.className,s=n.tabIndex,c=s===void 0?0:s,p=n.items,d=n.children,h=n.direction,g=n.id,v=n.mode,f=v===void 0?"vertical":v,b=n.inlineCollapsed,C=n.disabled,y=n.disabledOverflow,x=n.subMenuOpenDelay,B=x===void 0?.1:x,A=n.subMenuCloseDelay,$=A===void 0?.1:A,F=n.forceSubMenuRender,w=n.defaultOpenKeys,j=n.openKeys,N=n.activeKey,I=n.defaultActiveFirst,T=n.selectable,E=T===void 0?!0:T,k=n.multiple,O=k===void 0?!1:k,S=n.defaultSelectedKeys,P=n.selectedKeys,_=n.onSelect,H=n.onDeselect,z=n.inlineIndent,q=z===void 0?24:z,V=n.motion,Z=n.defaultMotions,ae=n.triggerSubMenuAction,R=ae===void 0?"hover":ae,U=n.builtinPlacements,W=n.itemIcon,K=n.expandIcon,J=n.overflowedIndicator,Q=J===void 0?"...":J,ee=n.overflowedIndicatorPopupClassName,oe=n.getPopupContainer,re=n.onClick,ne=n.onOpenChange,de=n.onKeyDown;n.openAnimation,n.openTransitionName;var ce=n._internalRenderMenuItem,Se=n._internalRenderSubMenuItem,We=n._internalComponents,qe=Bt(n,Gm),ue=m.useMemo(function(){return[ku(d,p,an,We,a),ku(d,p,an,{},a)]},[d,p,We]),ve=Ve(ue,2),we=ve[0],Le=ve[1],$e=m.useState(!1),Oe=Ve($e,2),Qe=Oe[0],Ge=Oe[1],Re=m.useRef(),je=Bm(g),xe=h==="rtl",ye=In(w,{value:j,postState:function(dt){return dt||an}}),_e=Ve(ye,2),Ue=_e[0],Ze=_e[1],Me=function(dt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function qt(){Ze(dt),ne==null||ne(dt)}bt?gg(qt):qt()},vt=m.useState(Ue),Ye=Ve(vt,2),mt=Ye[0],Dt=Ye[1],nt=m.useRef(!1),it=m.useMemo(function(){return(f==="inline"||f==="vertical")&&b?["vertical",b]:[f,!1]},[f,b]),Qt=Ve(it,2),Tt=Qt[0],lr=Qt[1],zt=Tt==="inline",Y=m.useState(Tt),me=Ve(Y,2),Fe=me[0],Ce=me[1],fe=m.useState(lr),Be=Ve(fe,2),ke=Be[0],se=Be[1];m.useEffect(function(){Ce(Tt),se(lr),nt.current&&(zt?Ze(mt):Me(an))},[Tt,lr]);var X=m.useState(0),G=Ve(X,2),Ae=G[0],tt=G[1],Ie=Ae>=we.length-1||Fe!=="horizontal"||y;m.useEffect(function(){zt&&Dt(Ue)},[Ue]),m.useEffect(function(){return nt.current=!0,function(){nt.current=!1}},[]);var pe=Sm(),He=pe.registerPath,ft=pe.unregisterPath,$t=pe.refreshOverflowKeys,Nt=pe.isSubPathKey,er=pe.getKeyPath,Wt=pe.getKeys,en=pe.getSubPathKeys,oo=m.useMemo(function(){return{registerPath:He,unregisterPath:ft}},[He,ft]),En=m.useMemo(function(){return{isSubPathKey:Nt}},[Nt]);m.useEffect(function(){$t(Ie?an:we.slice(Ae+1).map(function(Ct){return Ct.key}))},[Ae,Ie]);var Lr=In(N||I&&((r=we[0])===null||r===void 0?void 0:r.key),{value:N}),Ft=Ve(Lr,2),Br=Ft[0],Sn=Ft[1],Bi=vo(function(Ct){Sn(Ct)}),Jo=vo(function(){Sn(void 0)});ps(t,function(){return{list:Re.current,focus:function(dt){var bt,qt=Wt(),It=Al(qt,je),rn=It.elements,lo=It.key2element,ra=It.element2key,kn=Ds(Re.current,rn),so=Br??(kn[0]?ra.get(kn[0]):(bt=we.find(function(Pi){return!Pi.props.disabled}))===null||bt===void 0?void 0:bt.key),$r=lo.get(so);if(so&&$r){var Bn;$r==null||(Bn=$r.focus)===null||Bn===void 0||Bn.call($r,dt)}}}});var Ai=In(S||[],{value:P,postState:function(dt){return Array.isArray(dt)?dt:dt==null?an:[dt]}}),ao=Ve(Ai,2),Ar=ao[0],Qo=ao[1],$i=function(dt){if(E){var bt=dt.key,qt=Ar.includes(bt),It;O?qt?It=Ar.filter(function(lo){return lo!==bt}):It=[].concat(et(Ar),[bt]):It=[bt],Qo(It);var rn=be(be({},dt),{},{selectedKeys:It});qt?H==null||H(rn):_==null||_(rn)}!O&&Ue.length&&Fe!=="inline"&&Me(an)},ea=vo(function(Ct){re==null||re(La(Ct)),$i(Ct)}),io=vo(function(Ct,dt){var bt=Ue.filter(function(It){return It!==Ct});if(dt)bt.push(Ct);else if(Fe!=="inline"){var qt=en(Ct);bt=bt.filter(function(It){return!qt.has(It)})}vn(Ue,bt,!0)||Me(bt,!0)}),Fi=function(dt,bt){var qt=bt??!Ue.includes(dt);io(dt,qt)},Ni=Dm(Fe,Br,xe,je,Re,Wt,er,Sn,Fi,de);m.useEffect(function(){Ge(!0)},[]);var Oi=m.useMemo(function(){return{_internalRenderMenuItem:ce,_internalRenderSubMenuItem:Se}},[ce,Se]),ta=Fe!=="horizontal"||y?we:we.map(function(Ct,dt){return m.createElement(No,{key:Ct.key,overflowDisabled:dt>Ae},Ct)}),tn=m.createElement(xo,Ke({id:g,ref:Re,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:si,className:Ne(a,"".concat(a,"-root"),"".concat(a,"-").concat(Fe),u,ie(ie({},"".concat(a,"-inline-collapsed"),ke),"".concat(a,"-rtl"),xe),l),dir:h,style:i,role:"menu",tabIndex:c,data:ta,renderRawItem:function(dt){return dt},renderRawRest:function(dt){var bt=dt.length,qt=bt?we.slice(-bt):null;return m.createElement(ui,{eventKey:$l,title:Q,disabled:Ie,internalPopupClose:bt===0,popupClassName:ee},qt)},maxCount:Fe!=="horizontal"||y?xo.INVALIDATE:xo.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(dt){tt(dt)},onKeyDown:Ni},qe));return m.createElement(xs.Provider,{value:Oi},m.createElement(zf.Provider,{value:je},m.createElement(No,{prefixCls:a,rootClassName:l,mode:Fe,openKeys:Ue,rtl:xe,disabled:C,motion:Qe?V:null,defaultMotions:Qe?Z:null,activeKey:Br,onActive:Bi,onInactive:Jo,selectedKeys:Ar,inlineIndent:q,subMenuOpenDelay:B,subMenuCloseDelay:$,forceSubMenuRender:F,builtinPlacements:U,triggerSubMenuAction:R,getPopupContainer:oe,itemIcon:W,expandIcon:K,onItemClick:ea,onOpenChange:io},m.createElement(Uf.Provider,{value:En},tn),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(Wf.Provider,{value:oo},Le)))))}),Uo=Ym;Uo.Item=si;Uo.SubMenu=ui;Uo.ItemGroup=Bs;Uo.Divider=ks;const Jf=m.createContext({});var Xm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Zm=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:Xm}))},Qf=m.forwardRef(Zm);const za=jr({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var Jm=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const ep=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=Jm(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=m.useContext(Jr),l=a("menu",t),i=Ne({[`${l}-item-divider-dashed`]:!!n},r);return m.createElement(ks,Object.assign({className:i},o))},tp=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:l,extra:i}=e,{prefixCls:u,firstLevel:s,direction:c,disableMenuItemTitleTooltip:p,inlineCollapsed:d}=m.useContext(za),h=y=>{const x=n==null?void 0:n[0],B=m.createElement("span",{className:Ne(`${u}-title-content`,{[`${u}-title-content-with-extra`]:!!i||i===0})},n);return(!o||m.isValidElement(n)&&n.type==="span")&&n&&y&&s&&typeof x=="string"?m.createElement("div",{className:`${u}-inline-collapsed-noicon`},x.charAt(0)):B},{siderCollapsed:g}=m.useContext(Jf);let v=a;typeof a>"u"?v=s?n:"":a===!1&&(v="");const f={title:v};!g&&!d&&(f.title=null,f.open=!1);const b=Wo(n).length;let C=m.createElement(si,Object.assign({},_r(e,["title","icon","danger"]),{className:Ne({[`${u}-item-danger`]:l,[`${u}-item-only-child`]:(o?b+1:b)===1},r),title:typeof a=="string"?a:void 0}),zn(o,{className:Ne(m.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${u}-item-icon`)}),h(d));return p||(C=m.createElement(Ta,Object.assign({},f,{placement:c==="rtl"?"left":"right",classNames:{root:`${u}-inline-collapsed-tooltip`}}),C)),C};var Qm=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Ka=m.createContext(null),rp=m.forwardRef((e,t)=>{const{children:r}=e,n=Qm(e,["children"]),o=m.useContext(Ka),a=m.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),l=yg(r),i=wf(t,l?hs(r):null);return m.createElement(Ka.Provider,{value:a},m.createElement(Cg,{space:!0},l?m.cloneElement(r,{ref:i}):r))}),ev=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:a,lineType:l,itemPaddingInline:i}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${De(a)} ${l} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:i},[`> ${t}-item:hover,
|
|
2
|
+
> ${t}-item-active,
|
|
3
|
+
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},tv=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
4
|
+
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${De(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${De(t)})`}}}}),Bu=e=>$f(e),Au=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:l,itemBg:i,subMenuItemBg:u,itemSelectedBg:s,activeBarHeight:c,activeBarWidth:p,activeBarBorderWidth:d,motionDurationSlow:h,motionEaseInOut:g,motionEaseOut:v,itemPaddingInline:f,motionDurationMid:b,itemHoverColor:C,lineType:y,colorSplit:x,itemDisabledColor:B,dangerItemColor:A,dangerItemHoverColor:$,dangerItemSelectedColor:F,dangerItemActiveBg:w,dangerItemSelectedBg:j,popupBg:N,itemHoverBg:I,itemActiveBg:T,menuSubMenuBg:E,horizontalItemSelectedColor:k,horizontalItemSelectedBg:O,horizontalItemBorderRadius:S,horizontalItemHoverBg:P}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:i,[`&${r}-root:focus-visible`]:Object.assign({},Bu(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:l}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:a},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},Bu(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${B} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:C}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:I},"&:active":{backgroundColor:T}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:I},"&:active":{backgroundColor:T}}},[`${r}-item-danger`]:{color:A,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:$}},[`&${r}-item:active`]:{background:w}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:F},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:s,[`&${r}-item-danger`]:{backgroundColor:j}},[`&${r}-submenu > ${r}`]:{backgroundColor:E},[`&${r}-popup > ${r}`]:{backgroundColor:N},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:N},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:d,marginTop:e.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:S,"&::after":{position:"absolute",insetInline:f,bottom:0,borderBottom:`${De(c)} solid transparent`,transition:`border-color ${h} ${g}`,content:'""'},"&:hover, &-active, &-open":{background:P,"&::after":{borderBottomWidth:c,borderBottomColor:k}},"&-selected":{color:k,backgroundColor:O,"&:hover":{backgroundColor:O},"&::after":{borderBottomWidth:c,borderBottomColor:k}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${De(d)} ${y} ${x}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:u},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${De(p)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${b} ${v}`,`opacity ${b} ${v}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:F}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${b} ${g}`,`opacity ${b} ${g}`].join(",")}}}}}},$u=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:l,itemMarginBlock:i,itemWidth:u,itemPaddingInline:s}=e,c=e.calc(a).add(o).add(l).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:De(r),paddingInline:s,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:i,width:u},[`> ${t}-item,
|
|
5
|
+
> ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:De(r)},[`${t}-item-group-list ${t}-submenu-title,
|
|
6
|
+
${t}-submenu-title`]:{paddingInlineEnd:c}}},rv=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:l,motionEaseOut:i,paddingXL:u,itemMarginInline:s,fontSizeLG:c,motionDurationFast:p,motionDurationSlow:d,paddingXS:h,boxShadowSecondary:g,collapsedWidth:v,collapsedIconSize:f}=e,b={height:n,lineHeight:De(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},$u(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},$u(e)),{boxShadow:g})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${De(e.calc(l).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${d}`,`background ${d}`,`padding ${p} ${i}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:b,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:b}},{[`${t}-inline-collapsed`]:{width:v,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:c,textAlign:"center"}}},[`> ${t}-item,
|
|
7
|
+
> ${t}-item-group > ${t}-item-group-list > ${t}-item,
|
|
8
|
+
> ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
|
|
9
|
+
> ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${De(e.calc(f).div(2).equal())} - ${De(s)})`,textOverflow:"clip",[`
|
|
10
|
+
${t}-submenu-arrow,
|
|
11
|
+
${t}-submenu-expand-icon
|
|
12
|
+
`]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:f,lineHeight:De(n),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},Ff),{paddingInline:h})}}]},Fu=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:l,iconSize:i,iconMarginInlineEnd:u}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${l}`]:{minWidth:i,fontSize:i,transition:[`font-size ${n} ${a}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},xg()),[`&${t}-item-only-child`]:{[`> ${l}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Nu=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:a,menuArrowOffset:l}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${r} ${n}, opacity ${r}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${De(e.calc(l).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${De(l)})`}}}}},nv=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:l,paddingXS:i,padding:u,colorSplit:s,lineWidth:c,zIndexPopup:p,borderRadiusLG:d,subMenuItemBorderRadius:h,menuArrowSize:g,menuArrowOffset:v,lineType:f,groupTitleLineHeight:b,groupTitleFontSize:C}=e;return[{"":{[r]:Object.assign(Object.assign({},wl()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qo(e)),wl()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${De(i)} ${De(u)}`,fontSize:C,lineHeight:b,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${o} ${l}`,`background ${o} ${l}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o} ${l}`,`background ${o} ${l}`,`padding ${a} ${l}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${o} ${l}`,`padding ${o} ${l}`].join(",")},[`${r}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:s,borderStyle:f,borderWidth:0,borderTopWidth:c,marginBlock:c,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Fu(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${De(e.calc(n).mul(2).equal())} ${De(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,borderRadius:d,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:Object.assign(Object.assign(Object.assign({borderRadius:d},Fu(e)),Nu(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:h},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${l}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),Nu(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
|
|
13
|
+
&-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${De(v)})`},"&::after":{transform:`rotate(45deg) translateX(${De(e.calc(v).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${De(e.calc(g).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${De(e.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${De(v)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},ov=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:l,colorErrorBg:i,colorText:u,colorTextDescription:s,colorBgContainer:c,colorFillAlter:p,colorFillContent:d,lineWidth:h,lineWidthBold:g,controlItemBgActive:v,colorBgTextHover:f,controlHeightLG:b,lineHeight:C,colorBgElevated:y,marginXXS:x,padding:B,fontSize:A,controlHeightSM:$,fontSizeLG:F,colorTextLightSolid:w,colorErrorHover:j}=e,N=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,I=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:h,T=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,E=new un(w).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:u,itemColor:u,colorItemTextHover:u,itemHoverColor:u,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:c,itemBg:c,colorItemBgHover:f,itemHoverBg:f,colorItemBgActive:d,itemActiveBg:v,colorSubItemBg:p,subMenuItemBg:p,colorItemBgSelected:v,itemSelectedBg:v,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:g,activeBarHeight:g,colorActiveBarBorderSize:h,activeBarBorderWidth:I,colorItemTextDisabled:l,itemDisabledColor:l,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:T,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:C,collapsedWidth:b*2,popupBg:y,itemMarginBlock:x,itemPaddingInline:B,horizontalLineHeight:`${b*1.15}px`,iconSize:A,iconMarginInlineEnd:$-A,collapsedIconSize:F,groupTitleFontSize:A,darkItemDisabledColor:new un(w).setA(.25).toRgbString(),darkItemColor:E,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:w,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:E,darkItemHoverColor:w,darkDangerItemHoverColor:j,darkDangerItemSelectedColor:w,darkDangerItemActiveBg:a,itemWidth:N?`calc(100% + ${I}px)`:`calc(100% - ${T*2}px)`}},av=(e,t=e,r=!0)=>oi("Menu",o=>{const{colorBgElevated:a,controlHeightLG:l,fontSize:i,darkItemColor:u,darkDangerItemColor:s,darkItemBg:c,darkSubMenuItemBg:p,darkItemSelectedColor:d,darkItemSelectedBg:h,darkDangerItemSelectedBg:g,darkItemHoverBg:v,darkGroupTitleColor:f,darkItemHoverColor:b,darkItemDisabledColor:C,darkDangerItemHoverColor:y,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:B,popupBg:A,darkPopupBg:$}=o,F=o.calc(i).div(7).mul(5).equal(),w=Fo(o,{menuArrowSize:F,menuHorizontalHeight:o.calc(l).mul(1.15).equal(),menuArrowOffset:o.calc(F).mul(.25).equal(),menuSubMenuBg:a,calc:o.calc,popupBg:A}),j=Fo(w,{itemColor:u,itemHoverColor:b,groupTitleColor:f,itemSelectedColor:d,subMenuItemSelectedColor:d,itemBg:c,popupBg:$,subMenuItemBg:p,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:C,dangerItemColor:s,dangerItemHoverColor:y,dangerItemSelectedColor:x,dangerItemActiveBg:B,dangerItemSelectedBg:g,menuSubMenuBg:p,horizontalItemSelectedColor:d,horizontalItemSelectedBg:h});return[nv(w),ev(w),rv(w),Au(w,"light"),Au(j,"dark"),tv(w),Nf(w),Ia(w,"slide-up"),Ia(w,"slide-down"),Of(w,"zoom-big")]},ov,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),np=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,l=m.useContext(za),{prefixCls:i,inlineCollapsed:u,theme:s}=l,c=Xn();let p;if(!n)p=u&&!c.length&&o&&typeof o=="string"?m.createElement("div",{className:`${i}-inline-collapsed-noicon`},o.charAt(0)):m.createElement("span",{className:`${i}-title-content`},o);else{const g=m.isValidElement(o)&&o.type==="span";p=m.createElement(m.Fragment,null,zn(n,{className:Ne(m.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${i}-item-icon`)}),g?o:m.createElement("span",{className:`${i}-title-content`},o))}const d=m.useMemo(()=>Object.assign(Object.assign({},l),{firstLevel:!1}),[l]),[h]=Pf("Menu");return m.createElement(za.Provider,{value:d},m.createElement(ui,Object.assign({},_r(e,["icon"]),{title:p,popupClassName:Ne(i,r,`${i}-${a||s}`),popupStyle:Object.assign({zIndex:h},e.popupStyle)})))};var iv=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function Ti(e){return e===null||e===!1}const lv={item:tp,submenu:np,divider:ep},sv=Zr((e,t)=>{var r;const n=m.useContext(Ka),o=n||{},{getPrefixCls:a,getPopupContainer:l,direction:i,menu:u}=m.useContext(Jr),s=a(),{prefixCls:c,className:p,style:d,theme:h="light",expandIcon:g,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:f,siderCollapsed:b,rootClassName:C,mode:y,selectable:x,onClick:B,overflowedIndicatorPopupClassName:A}=e,$=iv(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),F=_r($,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:y});const w=vr((...q)=>{var V;B==null||B.apply(void 0,q),(V=o.onClick)===null||V===void 0||V.call(o)}),j=o.mode||y,N=x??o.selectable,I=f??b,T={horizontal:{motionName:`${s}-slide-up`},inline:Rf(s),other:{motionName:`${s}-zoom-big`}},E=a("menu",c||o.prefixCls),k=ms(E),[O,S,P]=av(E,k,!n),_=Ne(`${E}-${h}`,u==null?void 0:u.className,p),H=m.useMemo(()=>{var q,V;if(typeof g=="function"||Ti(g))return g||null;if(typeof o.expandIcon=="function"||Ti(o.expandIcon))return o.expandIcon||null;if(typeof(u==null?void 0:u.expandIcon)=="function"||Ti(u==null?void 0:u.expandIcon))return(u==null?void 0:u.expandIcon)||null;const Z=(q=g??(o==null?void 0:o.expandIcon))!==null&&q!==void 0?q:u==null?void 0:u.expandIcon;return zn(Z,{className:Ne(`${E}-submenu-expand-icon`,m.isValidElement(Z)?(V=Z.props)===null||V===void 0?void 0:V.className:void 0)})},[g,o==null?void 0:o.expandIcon,u==null?void 0:u.expandIcon,E]),z=m.useMemo(()=>({prefixCls:E,inlineCollapsed:I||!1,direction:i,firstLevel:!0,theme:h,mode:j,disableMenuItemTitleTooltip:v}),[E,I,i,v,h]);return O(m.createElement(Ka.Provider,{value:null},m.createElement(za.Provider,{value:z},m.createElement(Uo,Object.assign({getPopupContainer:l,overflowedIndicator:m.createElement(Qf,null),overflowedIndicatorPopupClassName:Ne(E,`${E}-${h}`,A),mode:j,selectable:N,onClick:w},F,{inlineCollapsed:I,style:Object.assign(Object.assign({},u==null?void 0:u.style),d),className:_,prefixCls:E,direction:i,defaultMotions:T,expandIcon:H,ref:t,rootClassName:Ne(C,S,o.rootClassName,P,k),_internalComponents:lv})))))}),Zn=Zr((e,t)=>{const r=ct(null),n=m.useContext(Jf);return ps(t,()=>({menu:r.current,focus:o=>{var a;(a=r.current)===null||a===void 0||a.focus(o)}})),m.createElement(sv,Object.assign({ref:r},e,n))});Zn.Item=tp;Zn.SubMenu=np;Zn.Divider=ep;Zn.ItemGroup=Bs;const uv=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:o}=e,a=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:n,"&:hover":{color:o,backgroundColor:n}}}}}},cv=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:a,antCls:l,iconCls:i,motionDurationMid:u,paddingBlock:s,fontSize:c,dropdownEdgeChildPadding:p,colorTextDisabled:d,fontSizeIcon:h,controlPaddingHorizontal:g,colorBgElevated:v}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${l}-btn`]:{[`& > ${i}-down, & > ${l}-btn-icon > ${i}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${l}-btn > ${i}-down`]:{fontSize:h},[`${i}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${i}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
14
|
+
&${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
15
|
+
&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom,
|
|
16
|
+
&${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom,
|
|
17
|
+
&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight,
|
|
18
|
+
&${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Sg},[`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft,
|
|
19
|
+
&${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft,
|
|
20
|
+
&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top,
|
|
21
|
+
&${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top,
|
|
22
|
+
&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight,
|
|
23
|
+
&${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Eg},[`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
24
|
+
&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom,
|
|
25
|
+
&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:wg},[`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft,
|
|
26
|
+
&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top,
|
|
27
|
+
&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Dg}}},kg(e,v,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},qo(e)),{[r]:Object.assign(Object.assign({padding:p,listStyleType:"none",backgroundColor:v,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},mu(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${De(s)} ${De(g)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:c,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${De(s)} ${De(g)}`,color:e.colorText,fontWeight:"normal",fontSize:c,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},mu(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:d,cursor:"not-allowed","&:hover":{color:d,backgroundColor:v,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${De(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:h,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${De(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(g).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:d,backgroundColor:v,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ia(e,"slide-up"),Ia(e,"slide-down"),gu(e,"move-up"),gu(e,"move-down"),Of(e,"zoom-big")]]},dv=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},Bg({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Ag(e)),fv=oi("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=Fo(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[cv(a),uv(a)]},dv,{resetStyle:!1}),ci=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:l,disabled:i,dropdownRender:u,popupRender:s,getPopupContainer:c,overlayClassName:p,rootClassName:d,overlayStyle:h,open:g,onOpenChange:v,visible:f,onVisibleChange:b,mouseEnterDelay:C=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:x=!0,placement:B="",overlay:A,transitionName:$,destroyOnHidden:F,destroyPopupOnHide:w}=e,{getPopupContainer:j,getPrefixCls:N,direction:I,dropdown:T}=m.useContext(Jr),E=s||u;ai();const k=m.useMemo(()=>{const ce=N();return $!==void 0?$:B.includes("top")?`${ce}-slide-down`:`${ce}-slide-up`},[N,B,$]),O=m.useMemo(()=>B?B.includes("Center")?B.slice(0,B.indexOf("Center")):B:I==="rtl"?"bottomRight":"bottomLeft",[B,I]),S=N("dropdown",o),P=ms(S),[_,H,z]=fv(S,P),[,q]=vs(),V=m.Children.only(hm(a)?m.createElement("span",null,a):a),Z=zn(V,{className:Ne(`${S}-trigger`,{[`${S}-rtl`]:I==="rtl"},V.props.className),disabled:(t=V.props.disabled)!==null&&t!==void 0?t:i}),ae=i?[]:l,R=!!(ae!=null&&ae.includes("contextMenu")),[U,W]=In(!1,{value:g??f}),K=vr(ce=>{v==null||v(ce,{source:"trigger"}),b==null||b(ce),W(ce)}),J=Ne(p,d,H,z,P,T==null?void 0:T.className,{[`${S}-rtl`]:I==="rtl"}),Q=$g({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:x,offset:q.marginXXS,arrowWidth:n?q.sizePopupArrow:0,borderRadius:q.borderRadius}),ee=vr(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(v==null||v(!1,{source:"menu"}),W(!1))}),oe=()=>{let ce;return r!=null&&r.items?ce=m.createElement(Zn,Object.assign({},r)):typeof A=="function"?ce=A():ce=A,E&&(ce=E(ce)),ce=m.Children.only(typeof ce=="string"?m.createElement("span",null,ce):ce),m.createElement(rp,{prefixCls:`${S}-menu`,rootClassName:Ne(z,P),expandIcon:m.createElement("span",{className:`${S}-menu-submenu-arrow`},I==="rtl"?m.createElement(Yg,{className:`${S}-menu-submenu-arrow-icon`}):m.createElement(Xg,{className:`${S}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ee,validator:({mode:Se})=>{}},ce)},[re,ne]=Pf("Dropdown",h==null?void 0:h.zIndex);let de=m.createElement(pm,Object.assign({alignPoint:R},_r(e,["rootClassName"]),{mouseEnterDelay:C,mouseLeaveDelay:y,visible:U,builtinPlacements:Q,arrow:!!n,overlayClassName:J,prefixCls:S,getPopupContainer:c||j,transitionName:k,trigger:ae,overlay:oe,placement:O,onVisibleChange:K,overlayStyle:Object.assign(Object.assign(Object.assign({},T==null?void 0:T.style),h),{zIndex:re}),autoDestroy:F??w}),Z);return re&&(de=m.createElement(Fg.Provider,{value:ne},de)),_(de)},pv=Ng(ci,"align",void 0,"dropdown",e=>e),hv=e=>m.createElement(pv,Object.assign({},e),m.createElement("span",null));ci._InternalPanelDoNotUseOrYouWillBeFired=hv;function rr(e,t){return e[t]}var gv=["children"];function op(e,t){return"".concat(e,"-").concat(t)}function mv(e){return e&&e.type&&e.type.isTreeNode}function Vo(e,t){return e??t}function Kn(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,l=r||"title";return{title:l,_title:n||[l],key:o||"key",children:a||"children"}}function ap(e){function t(r){var n=Wo(r);return n.map(function(o){if(!mv(o))return kr(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,l=o.props,i=l.children,u=Bt(l,gv),s=be({key:a},u),c=t(i);return c.length&&(s.children=c),s}).filter(function(o){return o})}return t(e)}function Ii(e,t,r){var n=Kn(r),o=n._title,a=n.key,l=n.children,i=new Set(t===!0?[]:t),u=[];function s(c){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(d,h){for(var g=op(p?p.pos:"0",h),v=Vo(d[a],g),f,b=0;b<o.length;b+=1){var C=o[b];if(d[C]!==void 0){f=d[C];break}}var y=Object.assign(_r(d,[].concat(et(o),[a,l])),{title:f,key:v,parent:p,pos:g,children:null,data:d,isStart:[].concat(et(p?p.isStart:[]),[h===0]),isEnd:[].concat(et(p?p.isEnd:[]),[h===c.length-1])});return u.push(y),t===!0||i.has(v)?y.children=s(d[l]||[],y):y.children=[],y})}return s(e),u}function vv(e,t,r){var n={};yr(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,l=o.externalGetKey,i=o.fieldNames,u=Kn(i),s=u.key,c=u.children,p=a||c,d;l?typeof l=="string"?d=function(v){return v[l]}:typeof l=="function"&&(d=function(v){return l(v)}):d=function(v,f){return Vo(v[s],f)};function h(g,v,f,b){var C=g?g[p]:e,y=g?op(f.pos,v):"0",x=g?[].concat(et(b),[g]):[];if(g){var B=d(g,y),A={node:g,index:v,pos:y,key:B,parentPos:f.node?f.pos:null,level:f.level+1,nodes:x};t(A)}C&&C.forEach(function($,F){h($,F,{node:g,pos:y,level:f?f.level+1:-1},x)})}h(null)}function As(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,l=t.childrenPropName,i=t.fieldNames,u=arguments.length>2?arguments[2]:void 0,s=a||u,c={},p={},d={posEntities:c,keyEntities:p};return r&&(d=r(d)||d),vv(e,function(h){var g=h.node,v=h.index,f=h.pos,b=h.key,C=h.parentPos,y=h.level,x=h.nodes,B={node:g,nodes:x,index:v,key:b,pos:f,level:y},A=Vo(b,f);c[f]=B,p[A]=B,B.parent=c[C],B.parent&&(B.parent.children=B.parent.children||[],B.parent.children.push(B)),n&&n(B,d)},{externalGetKey:s,childrenPropName:l,fieldNames:i}),o&&o(d),d}function Do(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,l=t.checkedKeys,i=t.halfCheckedKeys,u=t.dragOverNodeKey,s=t.dropPosition,c=t.keyEntities,p=rr(c,e),d={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:l.indexOf(e)!==-1,halfChecked:i.indexOf(e)!==-1,pos:String(p?p.pos:""),dragOver:u===e&&s===0,dragOverGapTop:u===e&&s===-1,dragOverGapBottom:u===e&&s===1};return d}function Ot(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,l=e.loading,i=e.halfChecked,u=e.dragOver,s=e.dragOverGapTop,c=e.dragOverGapBottom,p=e.pos,d=e.active,h=e.eventKey,g=be(be({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:l,halfChecked:i,dragOver:u,dragOverGapTop:s,dragOverGapBottom:c,pos:p,active:d,key:h});return"props"in g||Object.defineProperty(g,"props",{get:function(){return kr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),g}function ip(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function bv(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function yv(e,t,r,n){for(var o=new Set(e),a=new Set,l=0;l<=r;l+=1){var i=t.get(l)||new Set;i.forEach(function(p){var d=p.key,h=p.node,g=p.children,v=g===void 0?[]:g;o.has(d)&&!n(h)&&v.filter(function(f){return!n(f.node)}).forEach(function(f){o.add(f.key)})})}for(var u=new Set,s=r;s>=0;s-=1){var c=t.get(s)||new Set;c.forEach(function(p){var d=p.parent,h=p.node;if(!(n(h)||!p.parent||u.has(p.parent.key))){if(n(p.parent.node)){u.add(d.key);return}var g=!0,v=!1;(d.children||[]).filter(function(f){return!n(f.node)}).forEach(function(f){var b=f.key,C=o.has(b);g&&!C&&(g=!1),!v&&(C||a.has(b))&&(v=!0)}),g&&o.add(d.key),v&&a.add(d.key),u.add(d.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(ip(a,o))}}function Cv(e,t,r,n,o){for(var a=new Set(e),l=new Set(t),i=0;i<=n;i+=1){var u=r.get(i)||new Set;u.forEach(function(d){var h=d.key,g=d.node,v=d.children,f=v===void 0?[]:v;!a.has(h)&&!l.has(h)&&!o(g)&&f.filter(function(b){return!o(b.node)}).forEach(function(b){a.delete(b.key)})})}l=new Set;for(var s=new Set,c=n;c>=0;c-=1){var p=r.get(c)||new Set;p.forEach(function(d){var h=d.parent,g=d.node;if(!(o(g)||!d.parent||s.has(d.parent.key))){if(o(d.parent.node)){s.add(h.key);return}var v=!0,f=!1;(h.children||[]).filter(function(b){return!o(b.node)}).forEach(function(b){var C=b.key,y=a.has(C);v&&!y&&(v=!1),!f&&(y||l.has(C))&&(f=!0)}),v||a.delete(h.key),f&&l.add(h.key),s.add(h.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(ip(l,a))}}function jn(e,t,r,n){var o=[],a;n?a=n:a=bv;var l=new Set(e.filter(function(c){var p=!!rr(r,c);return p||o.push(c),p})),i=new Map,u=0;Object.keys(r).forEach(function(c){var p=r[c],d=p.level,h=i.get(d);h||(h=new Set,i.set(d,h)),h.add(p),u=Math.max(u,d)}),kr(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var s;return t===!0?s=yv(l,i,u,a):s=Cv(l,t.halfCheckedKeys,i,u,a),s}function Ou(e){return["small","middle","large"].includes(e)}function Pu(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const lp=he.createContext({latestIndex:0}),xv=lp.Provider,Dv=({className:e,index:t,children:r,split:n,style:o})=>{const{latestIndex:a}=m.useContext(lp);return r==null?null:m.createElement(m.Fragment,null,m.createElement("div",{className:e,style:o},r),t<a&&n&&m.createElement("span",{className:`${e}-split`},n))};var wv=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Ev=m.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,size:a,className:l,style:i,classNames:u,styles:s}=Og("space"),{size:c=a??"small",align:p,className:d,rootClassName:h,children:g,direction:v="horizontal",prefixCls:f,split:b,style:C,wrap:y=!1,classNames:x,styles:B}=e,A=wv(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[$,F]=Array.isArray(c)?c:[c,c],w=Ou(F),j=Ou($),N=Pu(F),I=Pu($),T=Wo(g,{keepEmpty:!0}),E=p===void 0&&v==="horizontal"?"center":p,k=n("space",f),[O,S,P]=Pg(k),_=Ne(k,l,S,`${k}-${v}`,{[`${k}-rtl`]:o==="rtl",[`${k}-align-${E}`]:E,[`${k}-gap-row-${F}`]:w,[`${k}-gap-col-${$}`]:j},d,h,P),H=Ne(`${k}-item`,(r=x==null?void 0:x.item)!==null&&r!==void 0?r:u.item),z=Object.assign(Object.assign({},s.item),B==null?void 0:B.item),q=T.map((ae,R)=>{const U=(ae==null?void 0:ae.key)||`${H}-${R}`;return m.createElement(Dv,{className:H,key:U,index:R,split:b,style:z},ae)}),V=m.useMemo(()=>({latestIndex:T.reduce((R,U,W)=>U!=null?W:R,0)}),[T]);if(T.length===0)return null;const Z={};return y&&(Z.flexWrap="wrap"),!j&&I&&(Z.columnGap=$),!w&&N&&(Z.rowGap=F),O(m.createElement("div",Object.assign({ref:t,className:_,style:Object.assign(Object.assign(Object.assign({},Z),i),C)},A),m.createElement(xv,{value:V},q)))}),sp=Ev;sp.Compact=Rg;var Sv=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const up=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=m.useContext(Jr),{prefixCls:o,type:a="default",danger:l,disabled:i,loading:u,onClick:s,htmlType:c,children:p,className:d,menu:h,arrow:g,autoFocus:v,overlay:f,trigger:b,align:C,open:y,onOpenChange:x,placement:B,getPopupContainer:A,href:$,icon:F=m.createElement(Qf,null),title:w,buttonsRender:j=Q=>Q,mouseEnterDelay:N,mouseLeaveDelay:I,overlayClassName:T,overlayStyle:E,destroyOnHidden:k,destroyPopupOnHide:O,dropdownRender:S,popupRender:P}=e,_=Sv(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),H=r("dropdown",o),z=`${H}-button`,V={menu:h,arrow:g,autoFocus:v,align:C,disabled:i,trigger:i?[]:b,onOpenChange:x,getPopupContainer:A||t,mouseEnterDelay:N,mouseLeaveDelay:I,overlayClassName:T,overlayStyle:E,destroyOnHidden:k,popupRender:P||S},{compactSize:Z,compactItemClassnames:ae}=Tg(H,n),R=Ne(z,ae,d);"destroyPopupOnHide"in e&&(V.destroyPopupOnHide=O),"overlay"in e&&(V.overlay=f),"open"in e&&(V.open=y),"placement"in e?V.placement=B:V.placement=n==="rtl"?"bottomLeft":"bottomRight";const U=m.createElement(ja,{type:a,danger:l,disabled:i,loading:u,onClick:s,htmlType:c,href:$,title:w},p),W=m.createElement(ja,{type:a,danger:l,icon:F}),[K,J]=j([U,W]);return m.createElement(sp.Compact,Object.assign({className:R,size:Z,block:!0},_),K,m.createElement(ci,Object.assign({},V),J))};up.__ANT_BUTTON=!0;const $s=ci;$s.Button=up;function Ru(e,t,r,n){var o=Dl.unstable_batchedUpdates?function(l){Dl.unstable_batchedUpdates(r,l)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var Wr={},Go="rc-table-internal-hook";function Fs(e){var t=m.createContext(void 0),r=function(o){var a=o.value,l=o.children,i=m.useRef(a);i.current=a;var u=m.useState(function(){return{getValue:function(){return i.current},listeners:new Set}}),s=Ve(u,1),c=s[0];return Gr(function(){mg(function(){c.listeners.forEach(function(p){p(a)})})},[a]),m.createElement(t.Provider,{value:c},l)};return{Context:t,Provider:r,defaultValue:e}}function Lt(e,t){var r=vr(typeof t=="function"?t:function(p){if(t===void 0)return p;if(!Array.isArray(t))return p[t];var d={};return t.forEach(function(h){d[h]=p[h]}),d}),n=m.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,l=o.getValue,i=m.useRef();i.current=r(n?l():e==null?void 0:e.defaultValue);var u=m.useState({}),s=Ve(u,2),c=s[1];return Gr(function(){if(!n)return;function p(d){var h=r(d);vn(i.current,h,!0)||c({})}return a.add(p),function(){a.delete(p)}},[n]),i.current}function kv(){var e=m.createContext(null);function t(){return m.useContext(e)}function r(o,a){var l=Ra(o),i=function(s,c){var p=l?{ref:c}:{},d=m.useRef(0),h=m.useRef(s),g=t();return g!==null?m.createElement(o,Ke({},s,p)):((!a||a(h.current,s))&&(d.current+=1),h.current=s,m.createElement(e.Provider,{value:d.current},m.createElement(o,Ke({},s,p))))};return l?m.forwardRef(i):i}function n(o,a){var l=Ra(o),i=function(s,c){var p=l?{ref:c}:{};return t(),m.createElement(o,Ke({},s,p))};return l?m.memo(m.forwardRef(i),a):m.memo(i,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var Ns=kv(),cp=Ns.makeImmutable,Jn=Ns.responseImmutable,Bv=Ns.useImmutableMark,Gt=Fs(),dp=m.createContext({renderWithProps:!1}),Av="RC_TABLE_KEY";function $v(e){return e==null?[]:Array.isArray(e)?e:[e]}function di(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,l=o.dataIndex,i=a||$v(l).join("-")||Av;r[i];)i="".concat(i,"_next");r[i]=!0,t.push(i)}),t}function Nl(e){return e!=null}function Fv(e){return typeof e=="number"&&!Number.isNaN(e)}function Nv(e){return e&&yr(e)==="object"&&!Array.isArray(e)&&!m.isValidElement(e)}function Ov(e,t,r,n,o,a){var l=m.useContext(dp),i=Bv(),u=gs(function(){if(Nl(n))return[n];var s=t==null||t===""?[]:Array.isArray(t)?t:[t],c=bs(e,s),p=c,d=void 0;if(o){var h=o(c,e,r);Nv(h)?(p=h.children,d=h.props,l.renderWithProps=!0):p=h}return[p,d]},[i,e,n,t,o,r],function(s,c){if(a){var p=Ve(s,2),d=p[1],h=Ve(c,2),g=h[1];return a(g,d)}return l.renderWithProps?!0:!vn(s,c,!0)});return u}function Pv(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function Rv(e,t){return Lt(Gt,function(r){var n=Pv(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var Tv=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,a,l=r===!0?{showTitle:!0}:r;return l&&(l.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?a=o.toString():m.isValidElement(o)&&typeof o.props.children=="string"&&(a=o.props.children)),a};function Iv(e){var t,r,n,o,a,l,i,u,s=e.component,c=e.children,p=e.ellipsis,d=e.scope,h=e.prefixCls,g=e.className,v=e.align,f=e.record,b=e.render,C=e.dataIndex,y=e.renderIndex,x=e.shouldCellUpdate,B=e.index,A=e.rowType,$=e.colSpan,F=e.rowSpan,w=e.fixLeft,j=e.fixRight,N=e.firstFixLeft,I=e.lastFixLeft,T=e.firstFixRight,E=e.lastFixRight,k=e.appendNode,O=e.additionalProps,S=O===void 0?{}:O,P=e.isSticky,_="".concat(h,"-cell"),H=Lt(Gt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),z=H.supportSticky,q=H.allColumnsFixedLeft,V=H.rowHoverable,Z=Ov(f,C,y,c,b,x),ae=Ve(Z,2),R=ae[0],U=ae[1],W={},K=typeof w=="number"&&z,J=typeof j=="number"&&z;K&&(W.position="sticky",W.left=w),J&&(W.position="sticky",W.right=j);var Q=(t=(r=(n=U==null?void 0:U.colSpan)!==null&&n!==void 0?n:S.colSpan)!==null&&r!==void 0?r:$)!==null&&t!==void 0?t:1,ee=(o=(a=(l=U==null?void 0:U.rowSpan)!==null&&l!==void 0?l:S.rowSpan)!==null&&a!==void 0?a:F)!==null&&o!==void 0?o:1,oe=Rv(B,ee),re=Ve(oe,2),ne=re[0],de=re[1],ce=vr(function(Le){var $e;f&&de(B,B+ee-1),S==null||($e=S.onMouseEnter)===null||$e===void 0||$e.call(S,Le)}),Se=vr(function(Le){var $e;f&&de(-1,-1),S==null||($e=S.onMouseLeave)===null||$e===void 0||$e.call(S,Le)});if(Q===0||ee===0)return null;var We=(i=S.title)!==null&&i!==void 0?i:Tv({rowType:A,ellipsis:p,children:R}),qe=Ne(_,g,(u={},ie(ie(ie(ie(ie(ie(ie(ie(ie(ie(u,"".concat(_,"-fix-left"),K&&z),"".concat(_,"-fix-left-first"),N&&z),"".concat(_,"-fix-left-last"),I&&z),"".concat(_,"-fix-left-all"),I&&q&&z),"".concat(_,"-fix-right"),J&&z),"".concat(_,"-fix-right-first"),T&&z),"".concat(_,"-fix-right-last"),E&&z),"".concat(_,"-ellipsis"),p),"".concat(_,"-with-append"),k),"".concat(_,"-fix-sticky"),(K||J)&&P&&z),ie(u,"".concat(_,"-row-hover"),!U&&ne)),S.className,U==null?void 0:U.className),ue={};v&&(ue.textAlign=v);var ve=be(be(be(be({},U==null?void 0:U.style),W),ue),S.style),we=R;return yr(we)==="object"&&!Array.isArray(we)&&!m.isValidElement(we)&&(we=null),p&&(I||T)&&(we=m.createElement("span",{className:"".concat(_,"-content")},we)),m.createElement(s,Ke({},U,S,{className:qe,style:ve,title:We,scope:d,onMouseEnter:V?ce:void 0,onMouseLeave:V?Se:void 0,colSpan:Q!==1?Q:null,rowSpan:ee!==1?ee:null}),k,we)}const Qn=m.memo(Iv);function Os(e,t,r,n,o){var a=r[e]||{},l=r[t]||{},i,u;a.fixed==="left"?i=n.left[o==="rtl"?t:e]:l.fixed==="right"&&(u=n.right[o==="rtl"?e:t]);var s=!1,c=!1,p=!1,d=!1,h=r[t+1],g=r[e-1],v=h&&!h.fixed||g&&!g.fixed||r.every(function(x){return x.fixed==="left"});if(o==="rtl"){if(i!==void 0){var f=g&&g.fixed==="left";d=!f&&v}else if(u!==void 0){var b=h&&h.fixed==="right";p=!b&&v}}else if(i!==void 0){var C=h&&h.fixed==="left";s=!C&&v}else if(u!==void 0){var y=g&&g.fixed==="right";c=!y&&v}return{fixLeft:i,fixRight:u,lastFixLeft:s,firstFixRight:c,lastFixRight:p,firstFixLeft:d,isSticky:n.isSticky}}var fp=m.createContext({});function jv(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,l=e.rowSpan,i=e.align,u=Lt(Gt,["prefixCls","direction"]),s=u.prefixCls,c=u.direction,p=m.useContext(fp),d=p.scrollColumnIndex,h=p.stickyOffsets,g=p.flattenColumns,v=r+a-1,f=v+1===d?a+1:a,b=Os(r,r+f-1,g,h,c);return m.createElement(Qn,Ke({className:t,index:r,component:"td",prefixCls:s,record:null,dataIndex:null,align:i,colSpan:f,rowSpan:l,render:function(){return n}},b))}var _v=["children"];function Mv(e){var t=e.children,r=Bt(e,_v);return m.createElement("tr",r,t)}function fi(e){var t=e.children;return t}fi.Row=Mv;fi.Cell=jv;function Lv(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Lt(Gt,"prefixCls"),a=n.length-1,l=n[a],i=m.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:l!=null&&l.scrollbar?a:null}},[l,n,a,r]);return m.createElement(fp.Provider,{value:i},m.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const oa=Jn(Lv);var pp=fi;function zv(e){return null}function Kv(e){return null}function hp(e,t,r,n,o,a,l){var i=a(t,l);e.push({record:t,indent:r,index:l,rowKey:i});var u=o==null?void 0:o.has(i);if(t&&Array.isArray(t[n])&&u)for(var s=0;s<t[n].length;s+=1)hp(e,t[n][s],r+1,n,o,a,s)}function gp(e,t,r,n){var o=m.useMemo(function(){if(r!=null&&r.size){for(var a=[],l=0;l<(e==null?void 0:e.length);l+=1){var i=e[l];hp(a,i,0,t,r,n,l)}return a}return e==null?void 0:e.map(function(u,s){return{record:u,indent:0,index:s,rowKey:n(u,s)}})},[e,t,r,n]);return o}function mp(e,t,r,n){var o=Lt(Gt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,l=o.expandableType,i=o.expandedKeys,u=o.childrenColumnName,s=o.onTriggerExpand,c=o.rowExpandable,p=o.onRow,d=o.expandRowByClick,h=o.rowClassName,g=l==="nest",v=l==="row"&&(!c||c(e)),f=v||g,b=i&&i.has(t),C=u&&e&&e[u],y=vr(s),x=p==null?void 0:p(e,r),B=x==null?void 0:x.onClick,A=function(j){d&&f&&s(e,j);for(var N=arguments.length,I=new Array(N>1?N-1:0),T=1;T<N;T++)I[T-1]=arguments[T];B==null||B.apply(void 0,[j].concat(I))},$;typeof h=="string"?$=h:typeof h=="function"&&($=h(e,r,n));var F=di(a);return be(be({},o),{},{columnsKey:F,nestExpandable:g,expanded:b,hasNestChildren:C,record:e,onTriggerExpand:y,rowSupportExpand:v,expandable:f,rowProps:be(be({},x),{},{className:Ne($,x==null?void 0:x.className),onClick:A})})}function vp(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,l=e.expanded,i=e.colSpan,u=e.isEmpty,s=e.stickyOffset,c=s===void 0?0:s,p=Lt(Gt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),d=p.scrollbarSize,h=p.fixHeader,g=p.fixColumn,v=p.componentWidth,f=p.horizonScroll,b=r;return(u?f&&v:g)&&(b=m.createElement("div",{style:{width:v-c-(h&&!u?d:0),position:"sticky",left:c,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},b)),m.createElement(n,{className:a,style:{display:l?null:"none"}},m.createElement(Qn,{component:o,prefixCls:t,colSpan:i},b))}function Hv(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,l="".concat(t,"-row-expand-icon");if(!a)return m.createElement("span",{className:Ne(l,"".concat(t,"-row-spaced"))});var i=function(s){n(r,s),s.stopPropagation()};return m.createElement("span",{className:Ne(l,ie(ie({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:i})}function Wv(e,t,r){var n=[];function o(a){(a||[]).forEach(function(l,i){n.push(t(l,i)),o(l[r])})}return o(e),n}function bp(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function yp(e,t,r,n,o){var a,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,u=e.record,s=e.prefixCls,c=e.columnsKey,p=e.fixedInfoList,d=e.expandIconColumnIndex,h=e.nestExpandable,g=e.indentSize,v=e.expandIcon,f=e.expanded,b=e.hasNestChildren,C=e.onTriggerExpand,y=e.expandable,x=e.expandedKeys,B=c[r],A=p[r],$;r===(d||0)&&h&&($=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(g*n,"px")},className:"".concat(s,"-row-indent indent-level-").concat(n)}),v({prefixCls:s,expanded:f,expandable:b,record:u,onExpand:C})));var F=((a=t.onCell)===null||a===void 0?void 0:a.call(t,u,o))||{};if(i){var w=F.rowSpan,j=w===void 0?1:w;if(y&&j&&r<i){for(var N=j,I=o;I<o+j;I+=1){var T=l[I];x.has(T)&&(N+=1)}F.rowSpan=N}}return{key:B,fixedInfo:A,appendCellNode:$,additionalCellProps:F}}function qv(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,l=e.rowKey,i=e.rowKeys,u=e.indent,s=u===void 0?0:u,c=e.rowComponent,p=e.cellComponent,d=e.scopeCellComponent,h=e.expandedRowInfo,g=mp(n,l,o,s),v=g.prefixCls,f=g.flattenColumns,b=g.expandedRowClassName,C=g.expandedRowRender,y=g.rowProps,x=g.expanded,B=g.rowSupportExpand,A=m.useRef(!1);A.current||(A.current=x);var $=bp(b,n,o,s),F=m.createElement(c,Ke({},y,{"data-row-key":l,className:Ne(t,"".concat(v,"-row"),"".concat(v,"-row-level-").concat(s),y==null?void 0:y.className,ie({},$,s>=1)),style:be(be({},r),y==null?void 0:y.style)}),f.map(function(N,I){var T=N.render,E=N.dataIndex,k=N.className,O=yp(g,N,I,s,o,i,h==null?void 0:h.offset),S=O.key,P=O.fixedInfo,_=O.appendCellNode,H=O.additionalCellProps;return m.createElement(Qn,Ke({className:k,ellipsis:N.ellipsis,align:N.align,scope:N.rowScope,component:N.rowScope?d:p,prefixCls:v,key:S,record:n,index:o,renderIndex:a,dataIndex:E,render:T,shouldCellUpdate:N.shouldCellUpdate},P,{appendNode:_,additionalProps:H}))})),w;if(B&&(A.current||x)){var j=C(n,o,s+1,x);w=m.createElement(vp,{expanded:x,className:Ne("".concat(v,"-expanded-row"),"".concat(v,"-expanded-row-level-").concat(s+1),$),prefixCls:v,component:c,cellComponent:p,colSpan:h?h.colSpan:f.length,stickyOffset:h==null?void 0:h.sticky,isEmpty:!1},j)}return m.createElement(m.Fragment,null,F,w)}const Uv=Jn(qv);function Vv(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=m.useRef();return Gr(function(){a.current&&r(t,a.current.offsetWidth)},[]),m.createElement(ys,{data:t},m.createElement("th",{ref:a,className:"".concat(n,"-measure-cell")},m.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function Gv(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,a=m.useRef(null),l=Lt(Gt,["measureRowRender"]),i=l.measureRowRender,u=m.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:a,tabIndex:-1},m.createElement(ys.Collection,{onBatchResize:function(c){Df(a.current)&&c.forEach(function(p){var d=p.data,h=p.size;n(d,h.offsetWidth)})}},r.map(function(s){var c=o.find(function(h){return h.key===s}),p=c==null?void 0:c.title,d=m.isValidElement(p)?m.cloneElement(p,{ref:null}):p;return m.createElement(Vv,{prefixCls:t,key:s,columnKey:s,onColumnResize:n,title:d})})));return i?i(u):u}function Yv(e){var t=e.data,r=e.measureColumnWidth,n=Lt(Gt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,l=n.onColumnResize,i=n.flattenColumns,u=n.getRowKey,s=n.expandedKeys,c=n.childrenColumnName,p=n.emptyNode,d=n.expandedRowOffset,h=d===void 0?0:d,g=n.colWidths,v=gp(t,c,s,u),f=m.useMemo(function(){return v.map(function(w){return w.rowKey})},[v]),b=m.useRef({renderWithProps:!1}),C=m.useMemo(function(){for(var w=i.length-h,j=0,N=0;N<h;N+=1)j+=g[N]||0;return{offset:h,colSpan:w,sticky:j}},[i.length,h,g]),y=a(["body","wrapper"],"tbody"),x=a(["body","row"],"tr"),B=a(["body","cell"],"td"),A=a(["body","cell"],"th"),$;t.length?$=v.map(function(w,j){var N=w.record,I=w.indent,T=w.index,E=w.rowKey;return m.createElement(Uv,{key:E,rowKey:E,rowKeys:f,record:N,index:j,renderIndex:T,rowComponent:x,cellComponent:B,scopeCellComponent:A,indent:I,expandedRowInfo:C})}):$=m.createElement(vp,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:x,cellComponent:B,colSpan:i.length,isEmpty:!0},p);var F=di(i);return m.createElement(dp.Provider,{value:b.current},m.createElement(y,{className:"".concat(o,"-tbody")},r&&m.createElement(Gv,{prefixCls:o,columnsKey:F,onColumnResize:l,columns:i}),$))}const Xv=Jn(Yv);var Zv=["expandable"],wo="RC_TABLE_INTERNAL_COL_DEFINE";function Jv(e){var t=e.expandable,r=Bt(e,Zv),n;return"expandable"in e?n=be(be({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var Qv=["columnType"];function Cp(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Lt(Gt,["tableLayout"]),a=o.tableLayout,l=[],i=n||r.length,u=!1,s=i-1;s>=0;s-=1){var c=t[s],p=r&&r[s],d=void 0,h=void 0;if(p&&(d=p[wo],a==="auto"&&(h=p.minWidth)),c||h||d||u){var g=d||{};g.columnType;var v=Bt(g,Qv);l.unshift(m.createElement("col",Ke({key:s,style:{width:c,minWidth:h}},v))),u=!0}}return l.length>0?m.createElement("colgroup",null,l):null}var e0=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function t0(e,t){return Je(function(){for(var r=[],n=0;n<t;n+=1){var o=e[n];if(o!==void 0)r[n]=o;else return null}return r},[e.join("_"),t])}var r0=m.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,l=e.colWidths,i=e.colGroup,u=e.columCount,s=e.stickyOffsets,c=e.direction,p=e.fixHeader,d=e.stickyTopOffset,h=e.stickyBottomOffset,g=e.stickyClassName,v=e.scrollX,f=e.tableLayout,b=f===void 0?"fixed":f,C=e.onScroll,y=e.children,x=Bt(e,e0),B=Lt(Gt,["prefixCls","scrollbarSize","isSticky","getComponent"]),A=B.prefixCls,$=B.scrollbarSize,F=B.isSticky,w=B.getComponent,j=w(["header","table"],"table"),N=F&&!p?0:$,I=m.useRef(null),T=m.useCallback(function(z){vu(t,z),vu(I,z)},[]);m.useEffect(function(){function z(V){var Z=V,ae=Z.currentTarget,R=Z.deltaX;R&&(C({currentTarget:ae,scrollLeft:ae.scrollLeft+R}),V.preventDefault())}var q=I.current;return q==null||q.addEventListener("wheel",z,{passive:!1}),function(){q==null||q.removeEventListener("wheel",z)}},[]);var E=a[a.length-1],k={fixed:E?E.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(A,"-cell-scrollbar")}}},O=Je(function(){return N?[].concat(et(o),[k]):o},[N,o]),S=Je(function(){return N?[].concat(et(a),[k]):a},[N,a]),P=Je(function(){var z=s.right,q=s.left;return be(be({},s),{},{left:c==="rtl"?[].concat(et(q.map(function(V){return V+N})),[0]):q,right:c==="rtl"?z:[].concat(et(z.map(function(V){return V+N})),[0]),isSticky:F})},[N,s,F]),_=t0(l,u),H=Je(function(){var z=!_||!_.length||_.every(function(q){return!q});return n||z},[n,_]);return m.createElement("div",{style:be({overflow:"hidden"},F?{top:d,bottom:h}:{}),ref:T,className:Ne(r,ie({},g,!!g))},m.createElement(j,{style:{tableLayout:b,minWidth:"100%",width:v}},H?i:m.createElement(Cp,{colWidths:[].concat(et(_),[N]),columCount:u+1,columns:S}),y(be(be({},x),{},{stickyOffsets:P,columns:O,flattenColumns:S}))))});const Tu=m.memo(r0);var n0=function(t){var r=t.cells,n=t.stickyOffsets,o=t.flattenColumns,a=t.rowComponent,l=t.cellComponent,i=t.onHeaderRow,u=t.index,s=Lt(Gt,["prefixCls","direction"]),c=s.prefixCls,p=s.direction,d;i&&(d=i(r.map(function(g){return g.column}),u));var h=di(r.map(function(g){return g.column}));return m.createElement(a,d,r.map(function(g,v){var f=g.column,b=Os(g.colStart,g.colEnd,o,n,p),C;return f&&f.onHeaderCell&&(C=g.column.onHeaderCell(f)),m.createElement(Qn,Ke({},g,{scope:f.title?g.colSpan>1?"colgroup":"col":null,ellipsis:f.ellipsis,align:f.align,component:l,prefixCls:c,key:h[v]},b,{additionalProps:C,rowType:"header"}))}))};function o0(e){var t=[];function r(l,i){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[u]=t[u]||[];var s=i,c=l.filter(Boolean).map(function(p){var d={key:p.key,className:p.className||"",children:p.title,column:p,colStart:s},h=1,g=p.children;return g&&g.length>0&&(h=r(g,s,u+1).reduce(function(v,f){return v+f},0),d.hasSubColumns=!0),"colSpan"in p&&(h=p.colSpan),"rowSpan"in p&&(d.rowSpan=p.rowSpan),d.colSpan=h,d.colEnd=d.colStart+h-1,t[u].push(d),s+=h,h});return c}r(e,0);for(var n=t.length,o=function(i){t[i].forEach(function(u){!("rowSpan"in u)&&!u.hasSubColumns&&(u.rowSpan=n-i)})},a=0;a<n;a+=1)o(a);return t}var a0=function(t){var r=t.stickyOffsets,n=t.columns,o=t.flattenColumns,a=t.onHeaderRow,l=Lt(Gt,["prefixCls","getComponent"]),i=l.prefixCls,u=l.getComponent,s=m.useMemo(function(){return o0(n)},[n]),c=u(["header","wrapper"],"thead"),p=u(["header","row"],"tr"),d=u(["header","cell"],"th");return m.createElement(c,{className:"".concat(i,"-thead")},s.map(function(h,g){var v=m.createElement(n0,{key:g,flattenColumns:o,cells:h,stickyOffsets:r,rowComponent:p,cellComponent:d,onHeaderRow:a,index:g});return v}))};const Iu=Jn(a0);function ju(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function i0(e,t,r){return m.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(d){var h=ju(t,d.width);h?n+=h:o+=1});var a=Math.max(t,r),l=Math.max(a-n,o),i=o,u=l/o,s=0,c=e.map(function(d){var h=be({},d),g=ju(t,h.width);if(g)h.width=g;else{var v=Math.floor(u);h.width=i===1?l:v,l-=v,i-=1}return s+=h.width,h});if(s<a){var p=a/s;l=a,c.forEach(function(d,h){var g=Math.floor(d.width*p);d.width=h===c.length-1?l:g,l-=g})}return[c,Math.max(s,a)]}return[e,t]},[e,t,r])}var l0=["children"],s0=["fixed"];function Ps(e){return Wo(e).filter(function(t){return m.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=Bt(n,l0),l=be({key:r},a);return o&&(l.children=Ps(o)),l})}function xp(e){return e.filter(function(t){return t&&yr(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?be(be({},t),{},{children:xp(r)}):t})}function Ol(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&yr(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,l=a===!0?"left":a,i="".concat(t,"-").concat(o),u=n.children;return u&&u.length>0?[].concat(et(r),et(Ol(u,i).map(function(s){var c;return be(be({},s),{},{fixed:(c=s.fixed)!==null&&c!==void 0?c:l})}))):[].concat(et(r),[be(be({key:i},n),{},{fixed:l})])},[])}function u0(e){return e.map(function(t){var r=t.fixed,n=Bt(t,s0),o=r;return r==="left"?o="right":r==="right"&&(o="left"),be({fixed:o},n)})}function c0(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,l=e.expandedKeys,i=e.columnTitle,u=e.getRowKey,s=e.onTriggerExpand,c=e.expandIcon,p=e.rowExpandable,d=e.expandIconColumnIndex,h=e.expandedRowOffset,g=h===void 0?0:h,v=e.direction,f=e.expandRowByClick,b=e.columnWidth,C=e.fixed,y=e.scrollWidth,x=e.clientWidth,B=m.useMemo(function(){var E=n||Ps(o)||[];return xp(E.slice())},[n,o]),A=m.useMemo(function(){if(a){var E=B.slice();if(!E.includes(Wr)){var k=d||0,O=k===0&&C==="right"?B.length:k;O>=0&&E.splice(O,0,Wr)}var S=E.indexOf(Wr);E=E.filter(function(z,q){return z!==Wr||q===S});var P=B[S],_;C?_=C:_=P?P.fixed:null;var H=ie(ie(ie(ie(ie(ie({},wo,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",i),"fixed",_),"className","".concat(r,"-row-expand-icon-cell")),"width",b),"render",function(q,V,Z){var ae=u(V,Z),R=l.has(ae),U=p?p(V):!0,W=c({prefixCls:r,expanded:R,expandable:U,record:V,onExpand:s});return f?m.createElement("span",{onClick:function(J){return J.stopPropagation()}},W):W});return E.map(function(z,q){var V=z===Wr?H:z;return q<g?be(be({},V),{},{fixed:V.fixed||"left"}):V})}return B.filter(function(z){return z!==Wr})},[a,B,u,l,c,v,g]),$=m.useMemo(function(){var E=A;return t&&(E=t(E)),E.length||(E=[{render:function(){return null}}]),E},[t,A,v]),F=m.useMemo(function(){return v==="rtl"?u0(Ol($)):Ol($)},[$,v,y]),w=m.useMemo(function(){for(var E=-1,k=F.length-1;k>=0;k-=1){var O=F[k].fixed;if(O==="left"||O===!0){E=k;break}}if(E>=0)for(var S=0;S<=E;S+=1){var P=F[S].fixed;if(P!=="left"&&P!==!0)return!0}var _=F.findIndex(function(q){var V=q.fixed;return V==="right"});if(_>=0)for(var H=_;H<F.length;H+=1){var z=F[H].fixed;if(z!=="right")return!0}return!1},[F]),j=i0(F,y,x),N=Ve(j,2),I=N[0],T=N[1];return[$,I,T,w]}function d0(e,t,r){var n=Jv(e),o=n.expandIcon,a=n.expandedRowKeys,l=n.defaultExpandedRowKeys,i=n.defaultExpandAllRows,u=n.expandedRowRender,s=n.onExpand,c=n.onExpandedRowsChange,p=n.childrenColumnName,d=o||Hv,h=p||"children",g=m.useMemo(function(){return u?"row":e.expandable&&e.internalHooks===Go&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(B){return B&&yr(B)==="object"&&B[h]})?"nest":!1},[!!u,t]),v=m.useState(function(){return l||(i?Wv(t,r,h):[])}),f=Ve(v,2),b=f[0],C=f[1],y=m.useMemo(function(){return new Set(a||b||[])},[a,b]),x=m.useCallback(function(B){var A=r(B,t.indexOf(B)),$,F=y.has(A);F?(y.delete(A),$=et(y)):$=[].concat(et(y),[A]),C($),s&&s(!F,B),c&&c($)},[r,y,t,s,c]);return[n,g,y,d,h,x]}function f0(e,t,r){var n=e.map(function(o,a){return Os(a,a,e,t,r)});return gs(function(){return n},[n],function(o,a){return!vn(o,a)})}function p0(e){var t=ct(e),r=ut({}),n=Ve(r,2),o=n[1],a=ct(null),l=ct([]);function i(u){l.current.push(u);var s=Promise.resolve();a.current=s,s.then(function(){if(a.current===s){var c=l.current,p=t.current;l.current=[],c.forEach(function(d){t.current=d(t.current)}),a.current=null,p!==t.current&&o({})}})}return yt(function(){return function(){a.current=null}},[]),[t.current,i]}function h0(e){var t=ct(null),r=ct();function n(){window.clearTimeout(r.current)}function o(l){t.current=l,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return yt(function(){return n},[]),[o,a]}function g0(){var e=m.useState(-1),t=Ve(e,2),r=t[0],n=t[1],o=m.useState(-1),a=Ve(o,2),l=a[0],i=a[1],u=m.useCallback(function(s,c){n(s),i(c)},[]);return[r,l,u]}var _u=yf()?window:null;function m0(e,t){var r=yr(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,l=a===void 0?0:a,i=r.offsetScroll,u=i===void 0?0:i,s=r.getContainer,c=s===void 0?function(){return _u}:s,p=c()||_u,d=!!e;return m.useMemo(function(){return{isSticky:d,stickyClassName:d?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:l,offsetScroll:u,container:p}},[d,u,o,l,t,p])}function v0(e,t,r){var n=Je(function(){var o=t.length,a=function(s,c,p){for(var d=[],h=0,g=s;g!==c;g+=p)d.push(h),t[g].fixed&&(h+=e[g]||0);return d},l=a(0,o,1),i=a(o-1,-1,-1).reverse();return r==="rtl"?{left:i,right:l}:{left:l,right:i}},[e,t,r]);return n}function Mu(e){var t=e.className,r=e.children;return m.createElement("div",{className:t},r)}function Lu(e){var t=Cs(e),r=t.getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var b0=function(t,r){var n,o,a=t.scrollBodyRef,l=t.onScroll,i=t.offsetScroll,u=t.container,s=t.direction,c=Lt(Gt,"prefixCls"),p=((n=a.current)===null||n===void 0?void 0:n.scrollWidth)||0,d=((o=a.current)===null||o===void 0?void 0:o.clientWidth)||0,h=p&&d*(d/p),g=m.useRef(),v=p0({scrollLeft:0,isHiddenScrollBar:!0}),f=Ve(v,2),b=f[0],C=f[1],y=m.useRef({delta:0,x:0}),x=m.useState(!1),B=Ve(x,2),A=B[0],$=B[1],F=m.useRef(null);m.useEffect(function(){return function(){gr.cancel(F.current)}},[]);var w=function(){$(!1)},j=function(k){k.persist(),y.current.delta=k.pageX-b.scrollLeft,y.current.x=0,$(!0),k.preventDefault()},N=function(k){var O,S=k||((O=window)===null||O===void 0?void 0:O.event),P=S.buttons;if(!A||P===0){A&&$(!1);return}var _=y.current.x+k.pageX-y.current.x-y.current.delta,H=s==="rtl";_=Math.max(H?h-d:0,Math.min(H?0:d-h,_));var z=!H||Math.abs(_)+Math.abs(h)<d;z&&(l({scrollLeft:_/d*(p+2)}),y.current.x=k.pageX)},I=function(){gr.cancel(F.current),F.current=gr(function(){if(a.current){var k=Lu(a.current).top,O=k+a.current.offsetHeight,S=u===window?document.documentElement.scrollTop+window.innerHeight:Lu(u).top+u.clientHeight;C(function(P){return be(be({},P),{},{isHiddenScrollBar:O-bu()<=S||k>=S-i})})}})},T=function(k){C(function(O){return be(be({},O),{},{scrollLeft:p?k/p*d:0})})};return m.useImperativeHandle(r,function(){return{setScrollLeft:T,checkScrollBarVisible:I}}),m.useEffect(function(){var E=Ru(document.body,"mouseup",w,!1),k=Ru(document.body,"mousemove",N,!1);return I(),function(){E.remove(),k.remove()}},[h,A]),m.useEffect(function(){if(a.current){for(var E=[],k=Cs(a.current);k;)E.push(k),k=k.parentElement;return E.forEach(function(O){return O.addEventListener("scroll",I,!1)}),window.addEventListener("resize",I,!1),window.addEventListener("scroll",I,!1),u.addEventListener("scroll",I,!1),function(){E.forEach(function(O){return O.removeEventListener("scroll",I)}),window.removeEventListener("resize",I),window.removeEventListener("scroll",I),u.removeEventListener("scroll",I)}}},[u]),m.useEffect(function(){b.isHiddenScrollBar||C(function(E){var k=a.current;return k?be(be({},E),{},{scrollLeft:k.scrollLeft/k.scrollWidth*k.clientWidth}):E})},[b.isHiddenScrollBar]),p<=d||!h||b.isHiddenScrollBar?null:m.createElement("div",{style:{height:bu(),width:d,bottom:i},className:"".concat(c,"-sticky-scroll")},m.createElement("div",{onMouseDown:j,ref:g,className:Ne("".concat(c,"-sticky-scroll-bar"),ie({},"".concat(c,"-sticky-scroll-bar-active"),A)),style:{width:"".concat(h,"px"),transform:"translate3d(".concat(b.scrollLeft,"px, 0, 0)")}}))};const y0=m.forwardRef(b0);var Dp="rc-table",C0=[],x0={};function D0(){return"No Data"}function w0(e,t){var r=be({rowKey:"key",prefixCls:Dp,emptyText:D0},e),n=r.prefixCls,o=r.className,a=r.rowClassName,l=r.style,i=r.data,u=r.rowKey,s=r.scroll,c=r.tableLayout,p=r.direction,d=r.title,h=r.footer,g=r.summary,v=r.caption,f=r.id,b=r.showHeader,C=r.components,y=r.emptyText,x=r.onRow,B=r.onHeaderRow,A=r.measureRowRender,$=r.onScroll,F=r.internalHooks,w=r.transformColumns,j=r.internalRefs,N=r.tailor,I=r.getContainerWidth,T=r.sticky,E=r.rowHoverable,k=E===void 0?!0:E,O=i||C0,S=!!O.length,P=F===Go,_=m.useCallback(function(ot,st){return bs(C,ot)||st},[C]),H=m.useMemo(function(){return typeof u=="function"?u:function(ot){var st=ot&&ot[u];return st}},[u]),z=_(["body"]),q=g0(),V=Ve(q,3),Z=V[0],ae=V[1],R=V[2],U=d0(r,O,H),W=Ve(U,6),K=W[0],J=W[1],Q=W[2],ee=W[3],oe=W[4],re=W[5],ne=s==null?void 0:s.x,de=m.useState(0),ce=Ve(de,2),Se=ce[0],We=ce[1],qe=c0(be(be(be({},r),K),{},{expandable:!!K.expandedRowRender,columnTitle:K.columnTitle,expandedKeys:Q,getRowKey:H,onTriggerExpand:re,expandIcon:ee,expandIconColumnIndex:K.expandIconColumnIndex,direction:p,scrollWidth:P&&N&&typeof ne=="number"?ne:null,clientWidth:Se}),P?w:null),ue=Ve(qe,4),ve=ue[0],we=ue[1],Le=ue[2],$e=ue[3],Oe=Le??ne,Qe=m.useMemo(function(){return{columns:ve,flattenColumns:we}},[ve,we]),Ge=m.useRef(),Re=m.useRef(),je=m.useRef(),xe=m.useRef();m.useImperativeHandle(t,function(){return{nativeElement:Ge.current,scrollTo:function(st){var Kt;if(je.current instanceof HTMLElement){var sr=st.index,Ht=st.top,An=st.key;if(Fv(Ht)){var nn;(nn=je.current)===null||nn===void 0||nn.scrollTo({top:Ht})}else{var on,uo=An??H(O[sr]);(on=je.current.querySelector('[data-row-key="'.concat(uo,'"]')))===null||on===void 0||on.scrollIntoView()}}else(Kt=je.current)!==null&&Kt!==void 0&&Kt.scrollTo&&je.current.scrollTo(st)}}});var ye=m.useRef(),_e=m.useState(!1),Ue=Ve(_e,2),Ze=Ue[0],Me=Ue[1],vt=m.useState(!1),Ye=Ve(vt,2),mt=Ye[0],Dt=Ye[1],nt=m.useState(new Map),it=Ve(nt,2),Qt=it[0],Tt=it[1],lr=di(we),zt=lr.map(function(ot){return Qt.get(ot)}),Y=m.useMemo(function(){return zt},[zt.join("_")]),me=v0(Y,we,p),Fe=s&&Nl(s.y),Ce=s&&Nl(Oe)||!!K.fixed,fe=Ce&&we.some(function(ot){var st=ot.fixed;return st}),Be=m.useRef(),ke=m0(T,n),se=ke.isSticky,X=ke.offsetHeader,G=ke.offsetSummary,Ae=ke.offsetScroll,tt=ke.stickyClassName,Ie=ke.container,pe=m.useMemo(function(){return g==null?void 0:g(O)},[g,O]),He=(Fe||se)&&m.isValidElement(pe)&&pe.type===fi&&pe.props.fixed,ft,$t,Nt;Fe&&($t={overflowY:S?"scroll":"auto",maxHeight:s.y}),Ce&&(ft={overflowX:"auto"},Fe||($t={overflowY:"hidden"}),Nt={width:Oe===!0?"auto":Oe,minWidth:"100%"});var er=m.useCallback(function(ot,st){Tt(function(Kt){if(Kt.get(ot)!==st){var sr=new Map(Kt);return sr.set(ot,st),sr}return Kt})},[]),Wt=h0(),en=Ve(Wt,2),oo=en[0],En=en[1];function Lr(ot,st){st&&(typeof st=="function"?st(ot):st.scrollLeft!==ot&&(st.scrollLeft=ot,st.scrollLeft!==ot&&setTimeout(function(){st.scrollLeft=ot},0)))}var Ft=vr(function(ot){var st=ot.currentTarget,Kt=ot.scrollLeft,sr=p==="rtl",Ht=typeof Kt=="number"?Kt:st.scrollLeft,An=st||x0;if(!En()||En()===An){var nn;oo(An),Lr(Ht,Re.current),Lr(Ht,je.current),Lr(Ht,ye.current),Lr(Ht,(nn=Be.current)===null||nn===void 0?void 0:nn.setScrollLeft)}var on=st||Re.current;if(on){var uo=P&&N&&typeof Oe=="number"?Oe:on.scrollWidth,Ri=on.clientWidth;if(uo===Ri){Me(!1),Dt(!1);return}sr?(Me(-Ht<uo-Ri),Dt(-Ht>0)):(Me(Ht>0),Dt(Ht<uo-Ri))}}),Br=vr(function(ot){Ft(ot),$==null||$(ot)}),Sn=function(){if(Ce&&je.current){var st;Ft({currentTarget:Cs(je.current),scrollLeft:(st=je.current)===null||st===void 0?void 0:st.scrollLeft})}else Me(!1),Dt(!1)},Bi=function(st){var Kt,sr=st.width;(Kt=Be.current)===null||Kt===void 0||Kt.checkScrollBarVisible();var Ht=Ge.current?Ge.current.offsetWidth:sr;P&&I&&Ge.current&&(Ht=I(Ge.current,Ht)||Ht),Ht!==Se&&(Sn(),We(Ht))},Jo=m.useRef(!1);m.useEffect(function(){Jo.current&&Sn()},[Ce,i,ve.length]),m.useEffect(function(){Jo.current=!0},[]);var Ai=m.useState(0),ao=Ve(Ai,2),Ar=ao[0],Qo=ao[1],$i=m.useState(!0),ea=Ve($i,2),io=ea[0],Fi=ea[1];Gr(function(){(!N||!P)&&(je.current instanceof Element?Qo(yu(je.current).width):Qo(yu(xe.current).width)),Fi(am("position","sticky"))},[]),m.useEffect(function(){P&&j&&(j.body.current=je.current)});var Ni=m.useCallback(function(ot){return m.createElement(m.Fragment,null,m.createElement(Iu,ot),He==="top"&&m.createElement(oa,ot,pe))},[He,pe]),Oi=m.useCallback(function(ot){return m.createElement(oa,ot,pe)},[pe]),ta=_(["table"],"table"),tn=m.useMemo(function(){return c||(fe?Oe==="max-content"?"auto":"fixed":Fe||se||we.some(function(ot){var st=ot.ellipsis;return st})?"fixed":"auto")},[Fe,fe,we,c,se]),Ct,dt={colWidths:Y,columCount:we.length,stickyOffsets:me,onHeaderRow:B,fixHeader:Fe,scroll:s},bt=m.useMemo(function(){return S?null:typeof y=="function"?y():y},[S,y]),qt=m.createElement(Xv,{data:O,measureColumnWidth:Fe||Ce||se}),It=m.createElement(Cp,{colWidths:we.map(function(ot){var st=ot.width;return st}),columns:we}),rn=v!=null?m.createElement("caption",{className:"".concat(n,"-caption")},v):void 0,lo=_a(r,{data:!0}),ra=_a(r,{aria:!0});if(Fe||se){var kn;typeof z=="function"?(kn=z(O,{scrollbarSize:Ar,ref:je,onScroll:Ft}),dt.colWidths=we.map(function(ot,st){var Kt=ot.width,sr=st===we.length-1?Kt-Ar:Kt;return typeof sr=="number"&&!Number.isNaN(sr)?sr:0})):kn=m.createElement("div",{style:be(be({},ft),$t),onScroll:Br,ref:je,className:Ne("".concat(n,"-body"))},m.createElement(ta,Ke({style:be(be({},Nt),{},{tableLayout:tn})},ra),rn,It,qt,!He&&pe&&m.createElement(oa,{stickyOffsets:me,flattenColumns:we},pe)));var so=be(be(be({noData:!O.length},dt),Qe),{},{direction:p,stickyClassName:tt,scrollX:Oe,tableLayout:tn,onScroll:Ft});Ct=m.createElement(m.Fragment,null,b!==!1&&m.createElement(Tu,Ke({},so,{stickyTopOffset:X,className:"".concat(n,"-header"),ref:Re,colGroup:It}),Ni),kn,He&&He!=="top"&&m.createElement(Tu,Ke({},so,{stickyBottomOffset:G,className:"".concat(n,"-summary"),ref:ye,colGroup:It}),Oi),se&&je.current&&je.current instanceof Element&&m.createElement(y0,{ref:Be,offsetScroll:Ae,scrollBodyRef:je,onScroll:Ft,container:Ie,direction:p}))}else Ct=m.createElement("div",{style:be(be({},ft),$t),className:Ne("".concat(n,"-content")),onScroll:Ft,ref:je},m.createElement(ta,Ke({style:be(be({},Nt),{},{tableLayout:tn})},ra),rn,It,b!==!1&&m.createElement(Iu,Ke({},dt,Qe)),qt,pe&&m.createElement(oa,{stickyOffsets:me,flattenColumns:we},pe)));var $r=m.createElement("div",Ke({className:Ne(n,o,ie(ie(ie(ie(ie(ie(ie(ie(ie(ie({},"".concat(n,"-rtl"),p==="rtl"),"".concat(n,"-ping-left"),Ze),"".concat(n,"-ping-right"),mt),"".concat(n,"-layout-fixed"),c==="fixed"),"".concat(n,"-fixed-header"),Fe),"".concat(n,"-fixed-column"),fe),"".concat(n,"-fixed-column-gapped"),fe&&$e),"".concat(n,"-scroll-horizontal"),Ce),"".concat(n,"-has-fix-left"),we[0]&&we[0].fixed),"".concat(n,"-has-fix-right"),we[we.length-1]&&we[we.length-1].fixed==="right")),style:l,id:f,ref:Ge},lo),d&&m.createElement(Mu,{className:"".concat(n,"-title")},d(O)),m.createElement("div",{ref:xe,className:"".concat(n,"-container")},Ct),h&&m.createElement(Mu,{className:"".concat(n,"-footer")},h(O)));Ce&&($r=m.createElement(ys,{onResize:Bi},$r));var Bn=f0(we,me,p),Pi=m.useMemo(function(){return{scrollX:Oe,prefixCls:n,getComponent:_,scrollbarSize:Ar,direction:p,fixedInfoList:Bn,isSticky:se,supportSticky:io,componentWidth:Se,fixHeader:Fe,fixColumn:fe,horizonScroll:Ce,tableLayout:tn,rowClassName:a,expandedRowClassName:K.expandedRowClassName,expandIcon:ee,expandableType:J,expandRowByClick:K.expandRowByClick,expandedRowRender:K.expandedRowRender,expandedRowOffset:K.expandedRowOffset,onTriggerExpand:re,expandIconColumnIndex:K.expandIconColumnIndex,indentSize:K.indentSize,allColumnsFixedLeft:we.every(function(ot){return ot.fixed==="left"}),emptyNode:bt,columns:ve,flattenColumns:we,onColumnResize:er,colWidths:Y,hoverStartRow:Z,hoverEndRow:ae,onHover:R,rowExpandable:K.rowExpandable,onRow:x,getRowKey:H,expandedKeys:Q,childrenColumnName:oe,rowHoverable:k,measureRowRender:A}},[Oe,n,_,Ar,p,Bn,se,io,Se,Fe,fe,Ce,tn,a,K.expandedRowClassName,ee,J,K.expandRowByClick,K.expandedRowRender,K.expandedRowOffset,re,K.expandIconColumnIndex,K.indentSize,bt,ve,we,er,Y,Z,ae,R,K.rowExpandable,x,H,Q,oe,k,A]);return m.createElement(Gt.Provider,{value:Pi},$r)}var E0=m.forwardRef(w0);function wp(e){return cp(E0,e)}var eo=wp();eo.EXPAND_COLUMN=Wr;eo.INTERNAL_HOOKS=Go;eo.Column=zv;eo.ColumnGroup=Kv;eo.Summary=pp;var Rs=Fs(null),Ep=Fs(null);function S0(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function k0(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,l=e.component,i=e.renderIndex,u=e.record,s=e.style,c=e.className,p=e.inverse,d=e.getHeight,h=r.render,g=r.dataIndex,v=r.className,f=r.width,b=Lt(Ep,["columnsOffset"]),C=b.columnsOffset,y=yp(t,r,n,o,a),x=y.key,B=y.fixedInfo,A=y.appendCellNode,$=y.additionalCellProps,F=$.style,w=$.colSpan,j=w===void 0?1:w,N=$.rowSpan,I=N===void 0?1:N,T=n-1,E=S0(T,j,C),k=j>1?f-E:0,O=be(be(be({},F),s),{},{flex:"0 0 ".concat(E,"px"),width:"".concat(E,"px"),marginRight:k,pointerEvents:"auto"}),S=m.useMemo(function(){return p?I<=1:j===0||I===0||I>1},[I,j,p]);S?O.visibility="hidden":p&&(O.height=d==null?void 0:d(I));var P=S?function(){return null}:h,_={};return(I===0||j===0)&&(_.rowSpan=1,_.colSpan=1),m.createElement(Qn,Ke({className:Ne(v,c),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:l,prefixCls:t.prefixCls,key:x,record:u,index:a,renderIndex:i,dataIndex:g,render:P,shouldCellUpdate:r.shouldCellUpdate},B,{appendNode:A,additionalProps:be(be({},$),{},{style:O},_)}))}var B0=["data","index","className","rowKey","style","extra","getHeight"],A0=m.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,l=e.style,i=e.extra,u=e.getHeight,s=Bt(e,B0),c=r.record,p=r.indent,d=r.index,h=Lt(Gt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),g=h.scrollX,v=h.flattenColumns,f=h.prefixCls,b=h.fixColumn,C=h.componentWidth,y=Lt(Rs,["getComponent"]),x=y.getComponent,B=mp(c,a,n,p),A=x(["body","row"],"div"),$=x(["body","cell"],"div"),F=B.rowSupportExpand,w=B.expanded,j=B.rowProps,N=B.expandedRowRender,I=B.expandedRowClassName,T;if(F&&w){var E=N(c,n,p+1,w),k=bp(I,c,n,p),O={};b&&(O={style:ie({},"--virtual-width","".concat(C,"px"))});var S="".concat(f,"-expanded-row-cell");T=m.createElement(A,{className:Ne("".concat(f,"-expanded-row"),"".concat(f,"-expanded-row-level-").concat(p+1),k)},m.createElement(Qn,{component:$,prefixCls:f,className:Ne(S,ie({},"".concat(S,"-fixed"),b)),additionalProps:O},E))}var P=be(be({},l),{},{width:g});i&&(P.position="absolute",P.pointerEvents="none");var _=m.createElement(A,Ke({},j,s,{"data-row-key":a,ref:F?null:t,className:Ne(o,"".concat(f,"-row"),j==null?void 0:j.className,ie({},"".concat(f,"-row-extra"),i)),style:be(be({},P),j==null?void 0:j.style)}),v.map(function(H,z){return m.createElement(k0,{key:z,component:$,rowInfo:B,column:H,colIndex:z,indent:p,index:n,renderIndex:d,record:c,inverse:i,getHeight:u})}));return F?m.createElement("div",{ref:t},_,T):_}),zu=Jn(A0),$0=m.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Lt(Gt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,l=o.onColumnResize,i=o.getRowKey,u=o.expandedKeys,s=o.prefixCls,c=o.childrenColumnName,p=o.scrollX,d=o.direction,h=Lt(Rs),g=h.sticky,v=h.scrollY,f=h.listItemHeight,b=h.getComponent,C=h.onScroll,y=m.useRef(),x=gp(r,c,u,i),B=m.useMemo(function(){var T=0;return a.map(function(E){var k=E.width,O=E.minWidth,S=E.key,P=Math.max(k||0,O||0);return T+=P,[S,P,T]})},[a]),A=m.useMemo(function(){return B.map(function(T){return T[2]})},[B]);m.useEffect(function(){B.forEach(function(T){var E=Ve(T,2),k=E[0],O=E[1];l(k,O)})},[B]),m.useImperativeHandle(t,function(){var T,E={scrollTo:function(O){var S;(S=y.current)===null||S===void 0||S.scrollTo(O)},nativeElement:(T=y.current)===null||T===void 0?void 0:T.nativeElement};return Object.defineProperty(E,"scrollLeft",{get:function(){var O;return((O=y.current)===null||O===void 0?void 0:O.getScrollInfo().x)||0},set:function(O){var S;(S=y.current)===null||S===void 0||S.scrollTo({left:O})}}),Object.defineProperty(E,"scrollTop",{get:function(){var O;return((O=y.current)===null||O===void 0?void 0:O.getScrollInfo().y)||0},set:function(O){var S;(S=y.current)===null||S===void 0||S.scrollTo({top:O})}}),E});var $=function(E,k){var O,S=(O=x[k])===null||O===void 0?void 0:O.record,P=E.onCell;if(P){var _,H=P(S,k);return(_=H==null?void 0:H.rowSpan)!==null&&_!==void 0?_:1}return 1},F=function(E){var k=E.start,O=E.end,S=E.getSize,P=E.offsetY;if(O<0)return null;for(var _=a.filter(function(Q){return $(Q,k)===0}),H=k,z=function(ee){if(_=_.filter(function(oe){return $(oe,ee)===0}),!_.length)return H=ee,1},q=k;q>=0&&!z(q);q-=1);for(var V=a.filter(function(Q){return $(Q,O)!==1}),Z=O,ae=function(ee){if(V=V.filter(function(oe){return $(oe,ee)!==1}),!V.length)return Z=Math.max(ee-1,O),1},R=O;R<x.length&&!ae(R);R+=1);for(var U=[],W=function(ee){var oe=x[ee];if(!oe)return 1;a.some(function(re){return $(re,ee)>1})&&U.push(ee)},K=H;K<=Z;K+=1)W(K);var J=U.map(function(Q){var ee=x[Q],oe=i(ee.record,Q),re=function(ce){var Se=Q+ce-1,We=i(x[Se].record,Se),qe=S(oe,We);return qe.bottom-qe.top},ne=S(oe);return m.createElement(zu,{key:Q,data:ee,rowKey:oe,index:Q,style:{top:-P+ne.top},extra:!0,getHeight:re})});return J},w=m.useMemo(function(){return{columnsOffset:A}},[A]),j="".concat(s,"-tbody"),N=b(["body","wrapper"]),I={};return g&&(I.position="sticky",I.bottom=0,yr(g)==="object"&&g.offsetScroll&&(I.bottom=g.offsetScroll)),m.createElement(Ep.Provider,{value:w},m.createElement(Tf,{fullHeight:!1,ref:y,prefixCls:"".concat(j,"-virtual"),styles:{horizontalScrollBar:I},className:j,height:v,itemHeight:f||24,data:x,itemKey:function(E){return i(E.record)},component:N,scrollWidth:p,direction:d,onVirtualScroll:function(E){var k,O=E.x;n({currentTarget:(k=y.current)===null||k===void 0?void 0:k.nativeElement,scrollLeft:O})},onScroll:C,extraRender:F},function(T,E,k){var O=i(T.record,E);return m.createElement(zu,{data:T,rowKey:O,index:E,style:k.style})}))}),F0=Jn($0),N0=function(t,r){var n=r.ref,o=r.onScroll;return m.createElement(F0,{ref:n,data:t,onScroll:o})};function O0(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,l=e.prefixCls,i=l===void 0?Dp:l,u=e.className,s=e.listItemHeight,c=e.components,p=e.onScroll,d=o||{},h=d.x,g=d.y;typeof h!="number"&&(h=1),typeof g!="number"&&(g=500);var v=vr(function(C,y){return bs(c,C)||y}),f=vr(p),b=m.useMemo(function(){return{sticky:a,scrollY:g,listItemHeight:s,getComponent:v,onScroll:f}},[a,g,s,v,f]);return m.createElement(Rs.Provider,{value:b},m.createElement(eo,Ke({},e,{className:Ne(u,"".concat(i,"-virtual")),scroll:be(be({},o),{},{x:h}),components:be(be({},c),{},{body:r!=null&&r.length?N0:void 0}),columns:n,internalHooks:Go,tailor:!0,ref:t})))}var P0=m.forwardRef(O0);function Sp(e){return cp(P0,e)}Sp();const R0=e=>null,T0=e=>null;var Ts=m.createContext(null),I0=m.createContext({}),j0=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,a=t.isEnd,l="".concat(r,"-indent-unit"),i=[],u=0;u<n;u+=1)i.push(m.createElement("span",{key:u,className:Ne(l,ie(ie({},"".concat(l,"-start"),o[u]),"".concat(l,"-end"),a[u]))}));return m.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},i)};const _0=m.memo(j0);var M0=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Ku="open",Hu="close",L0="---",Oo=function(t){var r,n,o,a=t.eventKey,l=t.className,i=t.style,u=t.dragOver,s=t.dragOverGapTop,c=t.dragOverGapBottom,p=t.isLeaf,d=t.isStart,h=t.isEnd,g=t.expanded,v=t.selected,f=t.checked,b=t.halfChecked,C=t.loading,y=t.domRef,x=t.active,B=t.data,A=t.onMouseMove,$=t.selectable,F=Bt(t,M0),w=he.useContext(Ts),j=he.useContext(I0),N=he.useRef(null),I=he.useState(!1),T=Ve(I,2),E=T[0],k=T[1],O=!!(w.disabled||t.disabled||(r=j.nodeDisabled)!==null&&r!==void 0&&r.call(j,B)),S=he.useMemo(function(){return!w.checkable||t.checkable===!1?!1:w.checkable},[w.checkable,t.checkable]),P=function(ye){O||w.onNodeSelect(ye,Ot(t))},_=function(ye){O||!S||t.disableCheckbox||w.onNodeCheck(ye,Ot(t),!f)},H=he.useMemo(function(){return typeof $=="boolean"?$:w.selectable},[$,w.selectable]),z=function(ye){w.onNodeClick(ye,Ot(t)),H?P(ye):_(ye)},q=function(ye){w.onNodeDoubleClick(ye,Ot(t))},V=function(ye){w.onNodeMouseEnter(ye,Ot(t))},Z=function(ye){w.onNodeMouseLeave(ye,Ot(t))},ae=function(ye){w.onNodeContextMenu(ye,Ot(t))},R=he.useMemo(function(){return!!(w.draggable&&(!w.draggable.nodeDraggable||w.draggable.nodeDraggable(B)))},[w.draggable,B]),U=function(ye){ye.stopPropagation(),k(!0),w.onNodeDragStart(ye,t);try{ye.dataTransfer.setData("text/plain","")}catch{}},W=function(ye){ye.preventDefault(),ye.stopPropagation(),w.onNodeDragEnter(ye,t)},K=function(ye){ye.preventDefault(),ye.stopPropagation(),w.onNodeDragOver(ye,t)},J=function(ye){ye.stopPropagation(),w.onNodeDragLeave(ye,t)},Q=function(ye){ye.stopPropagation(),k(!1),w.onNodeDragEnd(ye,t)},ee=function(ye){ye.preventDefault(),ye.stopPropagation(),k(!1),w.onNodeDrop(ye,t)},oe=function(ye){C||w.onNodeExpand(ye,Ot(t))},re=he.useMemo(function(){var xe=rr(w.keyEntities,a)||{},ye=xe.children;return!!(ye||[]).length},[w.keyEntities,a]),ne=he.useMemo(function(){return p===!1?!1:p||!w.loadData&&!re||w.loadData&&t.loaded&&!re},[p,w.loadData,re,t.loaded]);he.useEffect(function(){C||typeof w.loadData=="function"&&g&&!ne&&!t.loaded&&w.onNodeLoad(Ot(t))},[C,w.loadData,w.onNodeLoad,g,ne,t]);var de=he.useMemo(function(){var xe;return(xe=w.draggable)!==null&&xe!==void 0&&xe.icon?he.createElement("span",{className:"".concat(w.prefixCls,"-draggable-icon")},w.draggable.icon):null},[w.draggable]),ce=function(ye){var _e=t.switcherIcon||w.switcherIcon;return typeof _e=="function"?_e(be(be({},t),{},{isLeaf:ye})):_e},Se=function(){if(ne){var ye=ce(!0);return ye!==!1?he.createElement("span",{className:Ne("".concat(w.prefixCls,"-switcher"),"".concat(w.prefixCls,"-switcher-noop"))},ye):null}var _e=ce(!1);return _e!==!1?he.createElement("span",{onClick:oe,className:Ne("".concat(w.prefixCls,"-switcher"),"".concat(w.prefixCls,"-switcher_").concat(g?Ku:Hu))},_e):null},We=he.useMemo(function(){if(!S)return null;var xe=typeof S!="boolean"?S:null;return he.createElement("span",{className:Ne("".concat(w.prefixCls,"-checkbox"),ie(ie(ie({},"".concat(w.prefixCls,"-checkbox-checked"),f),"".concat(w.prefixCls,"-checkbox-indeterminate"),!f&&b),"".concat(w.prefixCls,"-checkbox-disabled"),O||t.disableCheckbox)),onClick:_,role:"checkbox","aria-checked":b?"mixed":f,"aria-disabled":O||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},xe)},[S,f,b,O,t.disableCheckbox,t.title]),qe=he.useMemo(function(){return ne?null:g?Ku:Hu},[ne,g]),ue=he.useMemo(function(){return he.createElement("span",{className:Ne("".concat(w.prefixCls,"-iconEle"),"".concat(w.prefixCls,"-icon__").concat(qe||"docu"),ie({},"".concat(w.prefixCls,"-icon_loading"),C))})},[w.prefixCls,qe,C]),ve=he.useMemo(function(){var xe=!!w.draggable,ye=!t.disabled&&xe&&w.dragOverNodeKey===a;return ye?w.dropIndicatorRender({dropPosition:w.dropPosition,dropLevelOffset:w.dropLevelOffset,indent:w.indent,prefixCls:w.prefixCls,direction:w.direction}):null},[w.dropPosition,w.dropLevelOffset,w.indent,w.prefixCls,w.direction,w.draggable,w.dragOverNodeKey,w.dropIndicatorRender]),we=he.useMemo(function(){var xe=t.title,ye=xe===void 0?L0:xe,_e="".concat(w.prefixCls,"-node-content-wrapper"),Ue;if(w.showIcon){var Ze=t.icon||w.icon;Ue=Ze?he.createElement("span",{className:Ne("".concat(w.prefixCls,"-iconEle"),"".concat(w.prefixCls,"-icon__customize"))},typeof Ze=="function"?Ze(t):Ze):ue}else w.loadData&&C&&(Ue=ue);var Me;return typeof ye=="function"?Me=ye(B):w.titleRender?Me=w.titleRender(B):Me=ye,he.createElement("span",{ref:N,title:typeof ye=="string"?ye:"",className:Ne(_e,"".concat(_e,"-").concat(qe||"normal"),ie({},"".concat(w.prefixCls,"-node-selected"),!O&&(v||E))),onMouseEnter:V,onMouseLeave:Z,onContextMenu:ae,onClick:z,onDoubleClick:q},Ue,he.createElement("span",{className:"".concat(w.prefixCls,"-title")},Me),ve)},[w.prefixCls,w.showIcon,t,w.icon,ue,w.titleRender,B,qe,V,Z,ae,z,q]),Le=_a(F,{aria:!0,data:!0}),$e=rr(w.keyEntities,a)||{},Oe=$e.level,Qe=h[h.length-1],Ge=!O&&R,Re=w.draggingNodeKey===a,je=$!==void 0?{"aria-selected":!!$}:void 0;return he.createElement("div",Ke({ref:y,role:"treeitem","aria-expanded":p?void 0:g,className:Ne(l,"".concat(w.prefixCls,"-treenode"),(o={},ie(ie(ie(ie(ie(ie(ie(ie(ie(ie(o,"".concat(w.prefixCls,"-treenode-disabled"),O),"".concat(w.prefixCls,"-treenode-switcher-").concat(g?"open":"close"),!p),"".concat(w.prefixCls,"-treenode-checkbox-checked"),f),"".concat(w.prefixCls,"-treenode-checkbox-indeterminate"),b),"".concat(w.prefixCls,"-treenode-selected"),v),"".concat(w.prefixCls,"-treenode-loading"),C),"".concat(w.prefixCls,"-treenode-active"),x),"".concat(w.prefixCls,"-treenode-leaf-last"),Qe),"".concat(w.prefixCls,"-treenode-draggable"),R),"dragging",Re),ie(ie(ie(ie(ie(ie(ie(o,"drop-target",w.dropTargetKey===a),"drop-container",w.dropContainerKey===a),"drag-over",!O&&u),"drag-over-gap-top",!O&&s),"drag-over-gap-bottom",!O&&c),"filter-node",(n=w.filterTreeNode)===null||n===void 0?void 0:n.call(w,Ot(t))),"".concat(w.prefixCls,"-treenode-leaf"),ne))),style:i,draggable:Ge,onDragStart:Ge?U:void 0,onDragEnter:R?W:void 0,onDragOver:R?K:void 0,onDragLeave:R?J:void 0,onDrop:R?ee:void 0,onDragEnd:R?Q:void 0,onMouseMove:A},je,Le),he.createElement(_0,{prefixCls:w.prefixCls,level:Oe,isStart:d,isEnd:h}),de,Se(),We,we)};Oo.isTreeNode=1;function Dr(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function Nr(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function Is(e){return e.split("-")}function z0(e,t){var r=[],n=rr(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(l){var i=l.key,u=l.children;r.push(i),o(u)})}return o(n.children),r}function K0(e){if(e.parent){var t=Is(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function H0(e){var t=Is(e.pos);return Number(t[t.length-1])===0}function Wu(e,t,r,n,o,a,l,i,u,s){var c,p=e.clientX,d=e.clientY,h=e.target.getBoundingClientRect(),g=h.top,v=h.height,f=(s==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-p),b=(f-12)/n,C=u.filter(function(O){var S;return(S=i[O])===null||S===void 0||(S=S.children)===null||S===void 0?void 0:S.length}),y=rr(i,r.eventKey);if(d<g+v/2){var x=l.findIndex(function(O){return O.key===y.key}),B=x<=0?0:x-1,A=l[B].key;y=rr(i,A)}var $=y.key,F=y,w=y.key,j=0,N=0;if(!C.includes($))for(var I=0;I<b&&K0(y);I+=1)y=y.parent,N+=1;var T=t.data,E=y.node,k=!0;return H0(y)&&y.level===0&&d<g+v/2&&a({dragNode:T,dropNode:E,dropPosition:-1})&&y.key===r.eventKey?j=-1:(F.children||[]).length&&C.includes(w)?a({dragNode:T,dropNode:E,dropPosition:0})?j=0:k=!1:N===0?b>-1.5?a({dragNode:T,dropNode:E,dropPosition:1})?j=1:k=!1:a({dragNode:T,dropNode:E,dropPosition:0})?j=0:a({dragNode:T,dropNode:E,dropPosition:1})?j=1:k=!1:a({dragNode:T,dropNode:E,dropPosition:1})?j=1:k=!1,{dropPosition:j,dropLevelOffset:N,dropTargetKey:y.key,dropTargetPos:y.pos,dragOverNodeKey:w,dropContainerKey:j===0?null:((c=y.parent)===null||c===void 0?void 0:c.key)||null,dropAllowed:k}}function qu(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function ji(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(yr(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return kr(!1,"`checkedKeys` is not an array or an object"),null;return t}function Pl(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=rr(t,o);if(a){r.add(o);var l=a.parent,i=a.node;i.disabled||l&&n(l.key)}}}return(e||[]).forEach(function(o){n(o)}),et(r)}const Kr={},Rl="SELECT_ALL",Tl="SELECT_INVERT",Il="SELECT_NONE",Uu=[],kp=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&kp(e,n[e],r)}),r),W0=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:l,onChange:i,onSelect:u,onSelectAll:s,onSelectInvert:c,onSelectNone:p,onSelectMultiple:d,columnWidth:h,type:g,selections:v,fixed:f,renderCell:b,hideSelectAll:C,checkStrictly:y=!0}=t||{},{prefixCls:x,data:B,pageData:A,getRecordByKey:$,getRowKey:F,expandType:w,childrenColumnName:j,locale:N,getPopupContainer:I}=e,T=ai(),[E,k]=em(ee=>ee),[O,S]=In(n||o||Uu,{value:n}),P=m.useRef(new Map),_=ze(ee=>{if(r){const oe=new Map;ee.forEach(re=>{let ne=$(re);!ne&&P.current.has(re)&&(ne=P.current.get(re)),oe.set(re,ne)}),P.current=oe}},[$,r]);m.useEffect(()=>{_(O)},[O]);const H=Je(()=>kp(j,A),[j,A]),{keyEntities:z}=Je(()=>{if(y)return{keyEntities:null};let ee=B;if(r){const oe=new Set(H.map((ne,de)=>F(ne,de))),re=Array.from(P.current).reduce((ne,[de,ce])=>oe.has(de)?ne:ne.concat(ce),[]);ee=[].concat(et(ee),et(re))}return As(ee,{externalGetKey:F,childrenPropName:j})},[B,F,y,j,r,H]),q=Je(()=>{const ee=new Map;return H.forEach((oe,re)=>{const ne=F(oe,re),de=(a?a(oe):null)||{};ee.set(ne,de)}),ee},[H,F,a]),V=ze(ee=>{const oe=F(ee);let re;return q.has(oe)?re=q.get(F(ee)):re=a?a(ee):void 0,!!(re!=null&&re.disabled)},[q,F]),[Z,ae]=Je(()=>{if(y)return[O||[],[]];const{checkedKeys:ee,halfCheckedKeys:oe}=jn(O,!0,z,V);return[ee||[],oe]},[O,y,z,V]),R=Je(()=>{const ee=g==="radio"?Z.slice(0,1):Z;return new Set(ee)},[Z,g]),U=Je(()=>g==="radio"?new Set:new Set(ae),[ae,g]);m.useEffect(()=>{t||S(Uu)},[!!t]);const W=ze((ee,oe)=>{let re,ne;_(ee),r?(re=ee,ne=ee.map(de=>P.current.get(de))):(re=[],ne=[],ee.forEach(de=>{const ce=$(de);ce!==void 0&&(re.push(de),ne.push(ce))})),S(re),i==null||i(re,ne,{type:oe})},[S,$,i,r]),K=ze((ee,oe,re,ne)=>{if(u){const de=re.map(ce=>$(ce));u($(ee),oe,de,ne)}W(re,"single")},[u,$,W]),J=Je(()=>!v||C?null:(v===!0?[Rl,Tl,Il]:v).map(oe=>oe===Rl?{key:"all",text:N.selectionAll,onSelect(){W(B.map((re,ne)=>F(re,ne)).filter(re=>{const ne=q.get(re);return!(ne!=null&&ne.disabled)||R.has(re)}),"all")}}:oe===Tl?{key:"invert",text:N.selectInvert,onSelect(){const re=new Set(R);A.forEach((de,ce)=>{const Se=F(de,ce),We=q.get(Se);We!=null&&We.disabled||(re.has(Se)?re.delete(Se):re.add(Se))});const ne=Array.from(re);c&&(T.deprecated(!1,"onSelectInvert","onChange"),c(ne)),W(ne,"invert")}}:oe===Il?{key:"none",text:N.selectNone,onSelect(){p==null||p(),W(Array.from(R).filter(re=>{const ne=q.get(re);return ne==null?void 0:ne.disabled}),"none")}}:oe).map(oe=>Object.assign(Object.assign({},oe),{onSelect:(...re)=>{var ne,de;(de=oe.onSelect)===null||de===void 0||(ne=de).call.apply(ne,[oe].concat(re)),k(null)}})),[v,R,A,F,c,W]);return[ze(ee=>{var oe;if(!t)return ee.filter(xe=>xe!==Kr);let re=et(ee);const ne=new Set(R),de=H.map(F).filter(xe=>!q.get(xe).disabled),ce=de.every(xe=>ne.has(xe)),Se=de.some(xe=>ne.has(xe)),We=()=>{const xe=[];ce?de.forEach(_e=>{ne.delete(_e),xe.push(_e)}):de.forEach(_e=>{ne.has(_e)||(ne.add(_e),xe.push(_e))});const ye=Array.from(ne);s==null||s(!ce,ye.map(_e=>$(_e)),xe.map(_e=>$(_e))),W(ye,"all"),k(null)};let qe,ue;if(g!=="radio"){let xe;if(J){const mt={getPopupContainer:I,items:J.map((Dt,nt)=>{const{key:it,text:Qt,onSelect:Tt}=Dt;return{key:it??nt,onClick:()=>{Tt==null||Tt(de)},label:Qt}})};xe=m.createElement("div",{className:`${x}-selection-extra`},m.createElement($s,{menu:mt,getPopupContainer:I},m.createElement("span",null,m.createElement(Ig,null))))}const ye=H.map((mt,Dt)=>{const nt=F(mt,Dt),it=q.get(nt)||{};return Object.assign({checked:ne.has(nt)},it)}).filter(({disabled:mt})=>mt),_e=!!ye.length&&ye.length===H.length,Ue=_e&&ye.every(({checked:mt})=>mt),Ze=_e&&ye.some(({checked:mt})=>mt),Me=(l==null?void 0:l())||{},{onChange:vt,disabled:Ye}=Me;ue=m.createElement(Ma,Object.assign({"aria-label":xe?"Custom selection":"Select all"},Me,{checked:_e?Ue:!!H.length&&ce,indeterminate:_e?!Ue&&Ze:!ce&&Se,onChange:mt=>{We(),vt==null||vt(mt)},disabled:Ye??(H.length===0||_e),skipGroup:!0})),qe=!C&&m.createElement("div",{className:`${x}-selection`},ue,xe)}let ve;g==="radio"?ve=(xe,ye,_e)=>{const Ue=F(ye,_e),Ze=ne.has(Ue),Me=q.get(Ue);return{node:m.createElement(If,Object.assign({},Me,{checked:Ze,onClick:vt=>{var Ye;vt.stopPropagation(),(Ye=Me==null?void 0:Me.onClick)===null||Ye===void 0||Ye.call(Me,vt)},onChange:vt=>{var Ye;ne.has(Ue)||K(Ue,!0,[Ue],vt.nativeEvent),(Ye=Me==null?void 0:Me.onChange)===null||Ye===void 0||Ye.call(Me,vt)}})),checked:Ze}}:ve=(xe,ye,_e)=>{var Ue;const Ze=F(ye,_e),Me=ne.has(Ze),vt=U.has(Ze),Ye=q.get(Ze);let mt;return w==="nest"?mt=vt:mt=(Ue=Ye==null?void 0:Ye.indeterminate)!==null&&Ue!==void 0?Ue:vt,{node:m.createElement(Ma,Object.assign({},Ye,{indeterminate:mt,checked:Me,skipGroup:!0,onClick:Dt=>{var nt;Dt.stopPropagation(),(nt=Ye==null?void 0:Ye.onClick)===null||nt===void 0||nt.call(Ye,Dt)},onChange:Dt=>{var nt;const{nativeEvent:it}=Dt,{shiftKey:Qt}=it,Tt=de.indexOf(Ze),lr=Z.some(zt=>de.includes(zt));if(Qt&&y&&lr){const zt=E(Tt,de,ne),Y=Array.from(ne);d==null||d(!Me,Y.map(me=>$(me)),zt.map(me=>$(me))),W(Y,"multiple")}else{const zt=Z;if(y){const Y=Me?Dr(zt,Ze):Nr(zt,Ze);K(Ze,!Me,Y,it)}else{const Y=jn([].concat(et(zt),[Ze]),!0,z,V),{checkedKeys:me,halfCheckedKeys:Fe}=Y;let Ce=me;if(Me){const fe=new Set(me);fe.delete(Ze),Ce=jn(Array.from(fe),{halfCheckedKeys:Fe},z,V).checkedKeys}K(Ze,!Me,Ce,it)}}k(Me?null:Tt),(nt=Ye==null?void 0:Ye.onChange)===null||nt===void 0||nt.call(Ye,Dt)}})),checked:Me}};const we=(xe,ye,_e)=>{const{node:Ue,checked:Ze}=ve(xe,ye,_e);return b?b(Ze,ye,_e,Ue):Ue};if(!re.includes(Kr))if(re.findIndex(xe=>{var ye;return((ye=xe[wo])===null||ye===void 0?void 0:ye.columnType)==="EXPAND_COLUMN"})===0){const[xe,...ye]=re;re=[xe,Kr].concat(et(ye))}else re=[Kr].concat(et(re));const Le=re.indexOf(Kr);re=re.filter((xe,ye)=>xe!==Kr||ye===Le);const $e=re[Le-1],Oe=re[Le+1];let Qe=f;Qe===void 0&&((Oe==null?void 0:Oe.fixed)!==void 0?Qe=Oe.fixed:($e==null?void 0:$e.fixed)!==void 0&&(Qe=$e.fixed)),Qe&&$e&&((oe=$e[wo])===null||oe===void 0?void 0:oe.columnType)==="EXPAND_COLUMN"&&$e.fixed===void 0&&($e.fixed=Qe);const Ge=Ne(`${x}-selection-col`,{[`${x}-selection-col-with-dropdown`]:v&&g==="checkbox"}),Re=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(ue):t.columnTitle:qe,je={fixed:Qe,width:h,className:`${x}-selection-column`,title:Re(),render:we,onCell:t.onCell,align:t.align,[wo]:{className:Ge}};return re.map(xe=>xe===Kr?je:xe)},[F,H,t,Z,R,U,h,J,w,q,d,K,V]),R]};function q0(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:l}=t,i=`${r}-row-expand-icon`;return m.createElement("button",{type:"button",onClick:u=>{n(o,u),u.stopPropagation()},className:Ne(i,{[`${i}-spaced`]:!l,[`${i}-expanded`]:l&&a,[`${i}-collapsed`]:l&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function U0(e){return(r,n)=>{const o=r.querySelector(`.${e}-container`);let a=n;if(o){const l=getComputedStyle(o),i=Number.parseInt(l.borderLeftWidth,10),u=Number.parseInt(l.borderRightWidth,10);a=n-i-u}return a}}const Yr=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function to(e,t){return t?`${t}-${e}`:`${e}`}const pi=(e,t)=>typeof e=="function"?e(t):e,V0=(e,t)=>{const r=pi(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var G0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},Y0=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:G0}))},X0=m.forwardRef(Y0),Z0=function(t){var r=t.dropPosition,n=t.dropLevelOffset,o=t.indent,a={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(r){case-1:a.top=0,a.left=-n*o;break;case 1:a.bottom=0,a.left=-n*o;break;case 0:a.bottom=0,a.left=o;break}return he.createElement("div",{style:a})};function Bp(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function J0(e,t){var r=m.useState(!1),n=Ve(r,2),o=n[0],a=n[1];Gr(function(){if(o)return e(),function(){t()}},[o]),Gr(function(){return a(!0),function(){a(!1)}},[])}var Q0=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],eb=m.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,l=e.motionType,i=e.onMotionStart,u=e.onMotionEnd,s=e.active,c=e.treeNodeRequiredProps,p=Bt(e,Q0),d=m.useState(!0),h=Ve(d,2),g=h[0],v=h[1],f=m.useContext(Ts),b=f.prefixCls,C=a&&l!=="hide";Gr(function(){a&&C!==g&&v(C)},[a]);var y=function(){a&&i()},x=m.useRef(!1),B=function(){a&&!x.current&&(x.current=!0,u())};J0(y,B);var A=function(F){C===F&&B()};return a?m.createElement(Af,Ke({ref:t,visible:g},o,{motionAppear:l==="show",onVisibleChanged:A}),function($,F){var w=$.className,j=$.style;return m.createElement("div",{ref:F,className:Ne("".concat(b,"-treenode-motion"),w),style:j},a.map(function(N){var I=Object.assign({},(Bp(N.data),N.data)),T=N.title,E=N.key,k=N.isStart,O=N.isEnd;delete I.children;var S=Do(E,c);return m.createElement(Oo,Ke({},I,S,{title:T,active:s,data:N.data,key:E,isStart:k,isEnd:O}))}))}):m.createElement(Oo,Ke({domRef:t,className:r,style:n},p,{active:s}))});function tb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function o(a,l){var i=new Map;a.forEach(function(s){i.set(s,!0)});var u=l.filter(function(s){return!i.has(s)});return u.length===1?u[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function Vu(e,t,r){var n=e.findIndex(function(i){return i.key===r}),o=e[n+1],a=t.findIndex(function(i){return i.key===r});if(o){var l=t.findIndex(function(i){return i.key===o.key});return t.slice(a+1,l)}return t.slice(a+1)}var rb=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Gu={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},nb=function(){},bn="RC_TREE_MOTION_".concat(Math.random()),jl={key:bn},Ap={key:bn,level:0,index:0,pos:"0",node:jl,nodes:[jl]},Yu={parent:null,children:[],pos:Ap.pos,data:jl,title:null,key:bn,isStart:[],isEnd:[]};function Xu(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function Zu(e){var t=e.key,r=e.pos;return Vo(t,r)}function ob(e){for(var t=String(e.data.key),r=e;r.parent;)r=r.parent,t="".concat(r.data.key," > ").concat(t);return t}var ab=m.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,l=e.checkedKeys,i=e.loadedKeys,u=e.loadingKeys,s=e.halfCheckedKeys,c=e.keyEntities,p=e.disabled,d=e.dragging,h=e.dragOverNodeKey,g=e.dropPosition,v=e.motion,f=e.height,b=e.itemHeight,C=e.virtual,y=e.scrollWidth,x=e.focusable,B=e.activeItem,A=e.focused,$=e.tabIndex,F=e.onKeyDown,w=e.onFocus,j=e.onBlur,N=e.onActiveChange,I=e.onListChangeStart,T=e.onListChangeEnd,E=Bt(e,rb),k=m.useRef(null),O=m.useRef(null);m.useImperativeHandle(t,function(){return{scrollTo:function(ve){k.current.scrollTo(ve)},getIndentWidth:function(){return O.current.offsetWidth}}});var S=m.useState(o),P=Ve(S,2),_=P[0],H=P[1],z=m.useState(n),q=Ve(z,2),V=q[0],Z=q[1],ae=m.useState(n),R=Ve(ae,2),U=R[0],W=R[1],K=m.useState([]),J=Ve(K,2),Q=J[0],ee=J[1],oe=m.useState(null),re=Ve(oe,2),ne=re[0],de=re[1],ce=m.useRef(n);ce.current=n;function Se(){var ue=ce.current;Z(ue),W(ue),ee([]),de(null),T()}Gr(function(){H(o);var ue=tb(_,o);if(ue.key!==null)if(ue.add){var ve=V.findIndex(function(Ge){var Re=Ge.key;return Re===ue.key}),we=Xu(Vu(V,n,ue.key),C,f,b),Le=V.slice();Le.splice(ve+1,0,Yu),W(Le),ee(we),de("show")}else{var $e=n.findIndex(function(Ge){var Re=Ge.key;return Re===ue.key}),Oe=Xu(Vu(n,V,ue.key),C,f,b),Qe=n.slice();Qe.splice($e+1,0,Yu),W(Qe),ee(Oe),de("hide")}else V!==n&&(Z(n),W(n))},[o,n]),m.useEffect(function(){d||Se()},[d]);var We=v?U:n,qe={expandedKeys:o,selectedKeys:a,loadedKeys:i,loadingKeys:u,checkedKeys:l,halfCheckedKeys:s,dragOverNodeKey:h,dropPosition:g,keyEntities:c};return m.createElement(m.Fragment,null,A&&B&&m.createElement("span",{style:Gu,"aria-live":"assertive"},ob(B)),m.createElement("div",null,m.createElement("input",{style:Gu,disabled:x===!1||p,tabIndex:x!==!1?$:null,onKeyDown:F,onFocus:w,onBlur:j,value:"",onChange:nb,"aria-label":"for screen reader"})),m.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},m.createElement("div",{className:"".concat(r,"-indent")},m.createElement("div",{ref:O,className:"".concat(r,"-indent-unit")}))),m.createElement(Tf,Ke({},E,{data:We,itemKey:Zu,height:f,fullHeight:!1,virtual:C,itemHeight:b,scrollWidth:y,prefixCls:"".concat(r,"-list"),ref:k,role:"tree",onVisibleChange:function(ve){ve.every(function(we){return Zu(we)!==bn})&&Se()}}),function(ue){var ve=ue.pos,we=Object.assign({},(Bp(ue.data),ue.data)),Le=ue.title,$e=ue.key,Oe=ue.isStart,Qe=ue.isEnd,Ge=Vo($e,ve);delete we.key,delete we.children;var Re=Do(Ge,qe);return m.createElement(eb,Ke({},we,Re,{title:Le,active:!!B&&$e===B.key,pos:ve,data:ue.data,isStart:Oe,isEnd:Qe,motion:v,motionNodes:$e===bn?Q:null,motionType:ne,onMotionStart:I,onMotionEnd:Se,treeNodeRequiredProps:qe,onMouseMove:function(){N(null)}}))}))}),ib=10,js=(function(e){Ef(r,e);var t=Sf(r);function r(){var n;kf(this,r);for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return n=t.call.apply(t,[this].concat(a)),ie(lt(n),"destroyed",!1),ie(lt(n),"delayedDragEnterLogic",void 0),ie(lt(n),"loadingRetryTimes",{}),ie(lt(n),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Kn()}),ie(lt(n),"dragStartMousePosition",null),ie(lt(n),"dragNodeProps",null),ie(lt(n),"currentMouseOverDroppableNodeKey",null),ie(lt(n),"listRef",m.createRef()),ie(lt(n),"onNodeDragStart",function(i,u){var s=n.state,c=s.expandedKeys,p=s.keyEntities,d=n.props.onDragStart,h=u.eventKey;n.dragNodeProps=u,n.dragStartMousePosition={x:i.clientX,y:i.clientY};var g=Dr(c,h);n.setState({draggingNodeKey:h,dragChildrenKeys:z0(h,p),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(g),window.addEventListener("dragend",n.onWindowDragEnd),d==null||d({event:i,node:Ot(u)})}),ie(lt(n),"onNodeDragEnter",function(i,u){var s=n.state,c=s.expandedKeys,p=s.keyEntities,d=s.dragChildrenKeys,h=s.flattenNodes,g=s.indent,v=n.props,f=v.onDragEnter,b=v.onExpand,C=v.allowDrop,y=v.direction,x=u.pos,B=u.eventKey;if(n.currentMouseOverDroppableNodeKey!==B&&(n.currentMouseOverDroppableNodeKey=B),!n.dragNodeProps){n.resetDragState();return}var A=Wu(i,n.dragNodeProps,u,g,n.dragStartMousePosition,C,h,p,c,y),$=A.dropPosition,F=A.dropLevelOffset,w=A.dropTargetKey,j=A.dropContainerKey,N=A.dropTargetPos,I=A.dropAllowed,T=A.dragOverNodeKey;if(d.includes(w)||!I){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(E){clearTimeout(n.delayedDragEnterLogic[E])}),n.dragNodeProps.eventKey!==u.eventKey&&(i.persist(),n.delayedDragEnterLogic[x]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var E=et(c),k=rr(p,u.eventKey);k&&(k.children||[]).length&&(E=Nr(c,u.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(E),b==null||b(E,{node:Ot(u),expanded:!0,nativeEvent:i.nativeEvent})}},800)),n.dragNodeProps.eventKey===w&&F===0){n.resetDragState();return}n.setState({dragOverNodeKey:T,dropPosition:$,dropLevelOffset:F,dropTargetKey:w,dropContainerKey:j,dropTargetPos:N,dropAllowed:I}),f==null||f({event:i,node:Ot(u),expandedKeys:c})}),ie(lt(n),"onNodeDragOver",function(i,u){var s=n.state,c=s.dragChildrenKeys,p=s.flattenNodes,d=s.keyEntities,h=s.expandedKeys,g=s.indent,v=n.props,f=v.onDragOver,b=v.allowDrop,C=v.direction;if(n.dragNodeProps){var y=Wu(i,n.dragNodeProps,u,g,n.dragStartMousePosition,b,p,d,h,C),x=y.dropPosition,B=y.dropLevelOffset,A=y.dropTargetKey,$=y.dropContainerKey,F=y.dropTargetPos,w=y.dropAllowed,j=y.dragOverNodeKey;c.includes(A)||!w||(n.dragNodeProps.eventKey===A&&B===0?n.state.dropPosition===null&&n.state.dropLevelOffset===null&&n.state.dropTargetKey===null&&n.state.dropContainerKey===null&&n.state.dropTargetPos===null&&n.state.dropAllowed===!1&&n.state.dragOverNodeKey===null||n.resetDragState():x===n.state.dropPosition&&B===n.state.dropLevelOffset&&A===n.state.dropTargetKey&&$===n.state.dropContainerKey&&F===n.state.dropTargetPos&&w===n.state.dropAllowed&&j===n.state.dragOverNodeKey||n.setState({dropPosition:x,dropLevelOffset:B,dropTargetKey:A,dropContainerKey:$,dropTargetPos:F,dropAllowed:w,dragOverNodeKey:j}),f==null||f({event:i,node:Ot(u)}))}}),ie(lt(n),"onNodeDragLeave",function(i,u){n.currentMouseOverDroppableNodeKey===u.eventKey&&!i.currentTarget.contains(i.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var s=n.props.onDragLeave;s==null||s({event:i,node:Ot(u)})}),ie(lt(n),"onWindowDragEnd",function(i){n.onNodeDragEnd(i,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),ie(lt(n),"onNodeDragEnd",function(i,u){var s=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),s==null||s({event:i,node:Ot(u)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),ie(lt(n),"onNodeDrop",function(i,u){var s,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=n.state,d=p.dragChildrenKeys,h=p.dropPosition,g=p.dropTargetKey,v=p.dropTargetPos,f=p.dropAllowed;if(f){var b=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),g!==null){var C=be(be({},Do(g,n.getTreeNodeRequiredProps())),{},{active:((s=n.getActiveItem())===null||s===void 0?void 0:s.key)===g,data:rr(n.state.keyEntities,g).node}),y=d.includes(g);kr(!y,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var x=Is(v),B={event:i,node:Ot(C),dragNode:n.dragNodeProps?Ot(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(d),dropToGap:h!==0,dropPosition:h+Number(x[x.length-1])};c||b==null||b(B),n.dragNodeProps=null}}}),ie(lt(n),"cleanDragState",function(){var i=n.state.draggingNodeKey;i!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),ie(lt(n),"triggerExpandActionExpand",function(i,u){var s=n.state,c=s.expandedKeys,p=s.flattenNodes,d=u.expanded,h=u.key,g=u.isLeaf;if(!(g||i.shiftKey||i.metaKey||i.ctrlKey)){var v=p.filter(function(b){return b.key===h})[0],f=Ot(be(be({},Do(h,n.getTreeNodeRequiredProps())),{},{data:v.data}));n.setExpandedKeys(d?Dr(c,h):Nr(c,h)),n.onNodeExpand(i,f)}}),ie(lt(n),"onNodeClick",function(i,u){var s=n.props,c=s.onClick,p=s.expandAction;p==="click"&&n.triggerExpandActionExpand(i,u),c==null||c(i,u)}),ie(lt(n),"onNodeDoubleClick",function(i,u){var s=n.props,c=s.onDoubleClick,p=s.expandAction;p==="doubleClick"&&n.triggerExpandActionExpand(i,u),c==null||c(i,u)}),ie(lt(n),"onNodeSelect",function(i,u){var s=n.state.selectedKeys,c=n.state,p=c.keyEntities,d=c.fieldNames,h=n.props,g=h.onSelect,v=h.multiple,f=u.selected,b=u[d.key],C=!f;C?v?s=Nr(s,b):s=[b]:s=Dr(s,b);var y=s.map(function(x){var B=rr(p,x);return B?B.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:s}),g==null||g(s,{event:"select",selected:C,node:u,selectedNodes:y,nativeEvent:i.nativeEvent})}),ie(lt(n),"onNodeCheck",function(i,u,s){var c=n.state,p=c.keyEntities,d=c.checkedKeys,h=c.halfCheckedKeys,g=n.props,v=g.checkStrictly,f=g.onCheck,b=u.key,C,y={event:"check",node:u,checked:s,nativeEvent:i.nativeEvent};if(v){var x=s?Nr(d,b):Dr(d,b),B=Dr(h,b);C={checked:x,halfChecked:B},y.checkedNodes=x.map(function(N){return rr(p,N)}).filter(Boolean).map(function(N){return N.node}),n.setUncontrolledState({checkedKeys:x})}else{var A=jn([].concat(et(d),[b]),!0,p),$=A.checkedKeys,F=A.halfCheckedKeys;if(!s){var w=new Set($);w.delete(b);var j=jn(Array.from(w),{halfCheckedKeys:F},p);$=j.checkedKeys,F=j.halfCheckedKeys}C=$,y.checkedNodes=[],y.checkedNodesPositions=[],y.halfCheckedKeys=F,$.forEach(function(N){var I=rr(p,N);if(I){var T=I.node,E=I.pos;y.checkedNodes.push(T),y.checkedNodesPositions.push({node:T,pos:E})}}),n.setUncontrolledState({checkedKeys:$},!1,{halfCheckedKeys:F})}f==null||f(C,y)}),ie(lt(n),"onNodeLoad",function(i){var u,s=i.key,c=n.state.keyEntities,p=rr(c,s);if(!(p!=null&&(u=p.children)!==null&&u!==void 0&&u.length)){var d=new Promise(function(h,g){n.setState(function(v){var f=v.loadedKeys,b=f===void 0?[]:f,C=v.loadingKeys,y=C===void 0?[]:C,x=n.props,B=x.loadData,A=x.onLoad;if(!B||b.includes(s)||y.includes(s))return null;var $=B(i);return $.then(function(){var F=n.state.loadedKeys,w=Nr(F,s);A==null||A(w,{event:"load",node:i}),n.setUncontrolledState({loadedKeys:w}),n.setState(function(j){return{loadingKeys:Dr(j.loadingKeys,s)}}),h()}).catch(function(F){if(n.setState(function(j){return{loadingKeys:Dr(j.loadingKeys,s)}}),n.loadingRetryTimes[s]=(n.loadingRetryTimes[s]||0)+1,n.loadingRetryTimes[s]>=ib){var w=n.state.loadedKeys;kr(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Nr(w,s)}),h()}g(F)}),{loadingKeys:Nr(y,s)}})});return d.catch(function(){}),d}}),ie(lt(n),"onNodeMouseEnter",function(i,u){var s=n.props.onMouseEnter;s==null||s({event:i,node:u})}),ie(lt(n),"onNodeMouseLeave",function(i,u){var s=n.props.onMouseLeave;s==null||s({event:i,node:u})}),ie(lt(n),"onNodeContextMenu",function(i,u){var s=n.props.onRightClick;s&&(i.preventDefault(),s({event:i,node:u}))}),ie(lt(n),"onFocus",function(){var i=n.props.onFocus;n.setState({focused:!0});for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];i==null||i.apply(void 0,s)}),ie(lt(n),"onBlur",function(){var i=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];i==null||i.apply(void 0,s)}),ie(lt(n),"getTreeNodeRequiredProps",function(){var i=n.state,u=i.expandedKeys,s=i.selectedKeys,c=i.loadedKeys,p=i.loadingKeys,d=i.checkedKeys,h=i.halfCheckedKeys,g=i.dragOverNodeKey,v=i.dropPosition,f=i.keyEntities;return{expandedKeys:u||[],selectedKeys:s||[],loadedKeys:c||[],loadingKeys:p||[],checkedKeys:d||[],halfCheckedKeys:h||[],dragOverNodeKey:g,dropPosition:v,keyEntities:f}}),ie(lt(n),"setExpandedKeys",function(i){var u=n.state,s=u.treeData,c=u.fieldNames,p=Ii(s,i,c);n.setUncontrolledState({expandedKeys:i,flattenNodes:p},!0)}),ie(lt(n),"onNodeExpand",function(i,u){var s=n.state.expandedKeys,c=n.state,p=c.listChanging,d=c.fieldNames,h=n.props,g=h.onExpand,v=h.loadData,f=u.expanded,b=u[d.key];if(!p){var C=s.includes(b),y=!f;if(kr(f&&C||!f&&!C,"Expand state not sync with index check"),s=y?Nr(s,b):Dr(s,b),n.setExpandedKeys(s),g==null||g(s,{node:u,expanded:y,nativeEvent:i.nativeEvent}),y&&v){var x=n.onNodeLoad(u);x&&x.then(function(){var B=Ii(n.state.treeData,s,d);n.setUncontrolledState({flattenNodes:B})}).catch(function(){var B=n.state.expandedKeys,A=Dr(B,b);n.setExpandedKeys(A)})}}}),ie(lt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),ie(lt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),ie(lt(n),"onActiveChange",function(i){var u=n.state.activeKey,s=n.props,c=s.onActiveChange,p=s.itemScrollOffset,d=p===void 0?0:p;u!==i&&(n.setState({activeKey:i}),i!==null&&n.scrollTo({key:i,offset:d}),c==null||c(i))}),ie(lt(n),"getActiveItem",function(){var i=n.state,u=i.activeKey,s=i.flattenNodes;return u===null?null:s.find(function(c){var p=c.key;return p===u})||null}),ie(lt(n),"offsetActiveKey",function(i){var u=n.state,s=u.flattenNodes,c=u.activeKey,p=s.findIndex(function(g){var v=g.key;return v===c});p===-1&&i<0&&(p=s.length),p=(p+i+s.length)%s.length;var d=s[p];if(d){var h=d.key;n.onActiveChange(h)}else n.onActiveChange(null)}),ie(lt(n),"onKeyDown",function(i){var u=n.state,s=u.activeKey,c=u.expandedKeys,p=u.checkedKeys,d=u.fieldNames,h=n.props,g=h.onKeyDown,v=h.checkable,f=h.selectable;switch(i.which){case Rt.UP:{n.offsetActiveKey(-1),i.preventDefault();break}case Rt.DOWN:{n.offsetActiveKey(1),i.preventDefault();break}}var b=n.getActiveItem();if(b&&b.data){var C=n.getTreeNodeRequiredProps(),y=b.data.isLeaf===!1||!!(b.data[d.children]||[]).length,x=Ot(be(be({},Do(s,C)),{},{data:b.data,active:!0}));switch(i.which){case Rt.LEFT:{y&&c.includes(s)?n.onNodeExpand({},x):b.parent&&n.onActiveChange(b.parent.key),i.preventDefault();break}case Rt.RIGHT:{y&&!c.includes(s)?n.onNodeExpand({},x):b.children&&b.children.length&&n.onActiveChange(b.children[0].key),i.preventDefault();break}case Rt.ENTER:case Rt.SPACE:{v&&!x.disabled&&x.checkable!==!1&&!x.disableCheckbox?n.onNodeCheck({},x,!p.includes(s)):!v&&f&&!x.disabled&&x.selectable!==!1&&n.onNodeSelect({},x);break}}}g==null||g(i)}),ie(lt(n),"setUncontrolledState",function(i){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var c=!1,p=!0,d={};Object.keys(i).forEach(function(h){if(n.props.hasOwnProperty(h)){p=!1;return}c=!0,d[h]=i[h]}),c&&(!u||p)&&n.setState(be(be({},d),s))}}),ie(lt(n),"scrollTo",function(i){n.listRef.current.scrollTo(i)}),n}return Bf(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var o=this.props,a=o.activeKey,l=o.itemScrollOffset,i=l===void 0?0:l;a!==void 0&&a!==this.state.activeKey&&(this.setState({activeKey:a}),a!==null&&this.scrollTo({key:a,offset:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var o=this.state,a=o.focused,l=o.flattenNodes,i=o.keyEntities,u=o.draggingNodeKey,s=o.activeKey,c=o.dropLevelOffset,p=o.dropContainerKey,d=o.dropTargetKey,h=o.dropPosition,g=o.dragOverNodeKey,v=o.indent,f=this.props,b=f.prefixCls,C=f.className,y=f.style,x=f.showLine,B=f.focusable,A=f.tabIndex,$=A===void 0?0:A,F=f.selectable,w=f.showIcon,j=f.icon,N=f.switcherIcon,I=f.draggable,T=f.checkable,E=f.checkStrictly,k=f.disabled,O=f.motion,S=f.loadData,P=f.filterTreeNode,_=f.height,H=f.itemHeight,z=f.scrollWidth,q=f.virtual,V=f.titleRender,Z=f.dropIndicatorRender,ae=f.onContextMenu,R=f.onScroll,U=f.direction,W=f.rootClassName,K=f.rootStyle,J=_a(this.props,{aria:!0,data:!0}),Q;I&&(yr(I)==="object"?Q=I:typeof I=="function"?Q={nodeDraggable:I}:Q={});var ee={prefixCls:b,selectable:F,showIcon:w,icon:j,switcherIcon:N,draggable:Q,draggingNodeKey:u,checkable:T,checkStrictly:E,disabled:k,keyEntities:i,dropLevelOffset:c,dropContainerKey:p,dropTargetKey:d,dropPosition:h,dragOverNodeKey:g,indent:v,direction:U,dropIndicatorRender:Z,loadData:S,filterTreeNode:P,titleRender:V,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return m.createElement(Ts.Provider,{value:ee},m.createElement("div",{className:Ne(b,C,W,ie(ie(ie({},"".concat(b,"-show-line"),x),"".concat(b,"-focused"),a),"".concat(b,"-active-focused"),s!==null)),style:K},m.createElement(ab,Ke({ref:this.listRef,prefixCls:b,style:y,data:l,disabled:k,selectable:F,checkable:!!T,motion:O,dragging:u!==null,height:_,itemHeight:H,virtual:q,focusable:B,focused:a,tabIndex:$,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ae,onScroll:R,scrollWidth:z},this.getTreeNodeRequiredProps(),J))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var l=a.prevProps,i={prevProps:o};function u($){return!l&&o.hasOwnProperty($)||l&&l[$]!==o[$]}var s,c=a.fieldNames;if(u("fieldNames")&&(c=Kn(o.fieldNames),i.fieldNames=c),u("treeData")?s=o.treeData:u("children")&&(kr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),s=ap(o.children)),s){i.treeData=s;var p=As(s,{fieldNames:c});i.keyEntities=be(ie({},bn,Ap),p.keyEntities)}var d=i.keyEntities||a.keyEntities;if(u("expandedKeys")||l&&u("autoExpandParent"))i.expandedKeys=o.autoExpandParent||!l&&o.defaultExpandParent?Pl(o.expandedKeys,d):o.expandedKeys;else if(!l&&o.defaultExpandAll){var h=be({},d);delete h[bn];var g=[];Object.keys(h).forEach(function($){var F=h[$];F.children&&F.children.length&&g.push(F.key)}),i.expandedKeys=g}else!l&&o.defaultExpandedKeys&&(i.expandedKeys=o.autoExpandParent||o.defaultExpandParent?Pl(o.defaultExpandedKeys,d):o.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,s||i.expandedKeys){var v=Ii(s||a.treeData,i.expandedKeys||a.expandedKeys,c);i.flattenNodes=v}if(o.selectable&&(u("selectedKeys")?i.selectedKeys=qu(o.selectedKeys,o):!l&&o.defaultSelectedKeys&&(i.selectedKeys=qu(o.defaultSelectedKeys,o))),o.checkable){var f;if(u("checkedKeys")?f=ji(o.checkedKeys)||{}:!l&&o.defaultCheckedKeys?f=ji(o.defaultCheckedKeys)||{}:s&&(f=ji(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),f){var b=f,C=b.checkedKeys,y=C===void 0?[]:C,x=b.halfCheckedKeys,B=x===void 0?[]:x;if(!o.checkStrictly){var A=jn(y,!0,d);y=A.checkedKeys,B=A.halfCheckedKeys}i.checkedKeys=y,i.halfCheckedKeys=B}}return u("loadedKeys")&&(i.loadedKeys=o.loadedKeys),i}}]),r})(m.Component);ie(js,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Z0,allowDrop:function(){return!0},expandAction:!1});ie(js,"TreeNode",Oo);var lb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},sb=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:lb}))},$p=m.forwardRef(sb),ub={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},cb=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:ub}))},db=m.forwardRef(cb),fb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},pb=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:fb}))},hb=m.forwardRef(pb),gb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},mb=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:gb}))},vb=m.forwardRef(mb);const bb=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:l})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:a},"&:hover:before":{background:l}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),yb=new _g("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Cb=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),xb=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${De(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Db=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:l,nodeSelectedBg:i,nodeHoverBg:u,colorTextQuaternary:s,controlItemBgActiveDisabled:c}=t;return{[r]:Object.assign(Object.assign({},qo(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${r}-active-focused)`]:$f(t),[`${r}-list-holder-inner`]:{alignItems:"flex-start"},[`&${r}-block-node`]:{[`${r}-list-holder-inner`]:{alignItems:"stretch",[`${r}-node-content-wrapper`]:{flex:"auto"},[`${n}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:yb,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:De(a),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:o},[`&-disabled ${r}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:c},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:s},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:l}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},Cb(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:a,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},xb(e,t)),{"&:hover":{backgroundColor:u},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:i},[`${r}-iconEle`]:{display:"inline-block",width:a,height:a,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${r}-unselectable ${r}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${r}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${n}-leaf-last ${r}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${De(t.calc(a).div(2).equal())} !important`}})}},wb=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),l=Fo(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[Db(e,l),r&&bb(l)].filter(Boolean)},Eb=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,o=t;return{titleHeight:o,indentSize:o,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},Sb=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},Eb(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},kb=oi("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:jg(`${t}-checkbox`,e)},wb(t,e),Nf(e)],Sb),Ju=4;function Bb(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,l=a==="ltr"?"left":"right",i=a==="ltr"?"right":"left",u={[l]:-r*o+Ju,[i]:0};switch(t){case-1:u.top=-3;break;case 1:u.bottom=-3;break;default:u.bottom=-3,u[l]=o+Ju;break}return he.createElement("div",{style:u,className:`${n}-drop-indicator`})}var Ab={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},$b=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:Ab}))},Fb=m.forwardRef($b),Nb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},Ob=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:Nb}))},Pb=m.forwardRef(Ob),Rb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},Tb=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:Rb}))},Ib=m.forwardRef(Tb);const jb=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:l,switcherLoadingIcon:i}=e,{isLeaf:u,expanded:s,loading:c}=a;if(c)return m.isValidElement(i)?i:m.createElement(Mg,{className:`${n}-switcher-loading-icon`});let p;if(l&&typeof l=="object"&&(p=l.showLeafIcon),u){if(!l)return null;if(typeof p!="boolean"&&p){const g=typeof p=="function"?p(a):p,v=`${n}-switcher-line-custom-icon`;return m.isValidElement(g)?zn(g,{className:Ne((t=g.props)===null||t===void 0?void 0:t.className,v)}):g}return p?m.createElement($p,{className:`${n}-switcher-line-icon`}):m.createElement("span",{className:`${n}-switcher-leaf-line`})}const d=`${n}-switcher-icon`,h=typeof o=="function"?o(a):o;return m.isValidElement(h)?zn(h,{className:Ne((r=h.props)===null||r===void 0?void 0:r.className,d)}):h!==void 0?h:l?s?m.createElement(Pb,{className:`${n}-switcher-line-icon`}):m.createElement(Ib,{className:`${n}-switcher-line-icon`}):m.createElement(Fb,{className:d})},Fp=he.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:l}=he.useContext(Jr),{prefixCls:i,className:u,showIcon:s=!1,showLine:c,switcherIcon:p,switcherLoadingIcon:d,blockNode:h=!1,children:g,checkable:v=!1,selectable:f=!0,draggable:b,disabled:C,motion:y,style:x}=e,B=n("tree",i),A=n(),$=he.useContext(Lg),F=C??$,w=y??Object.assign(Object.assign({},Rf(A)),{motionAppear:!1}),j=Object.assign(Object.assign({},e),{checkable:v,selectable:f,showIcon:s,motion:w,blockNode:h,disabled:F,showLine:!!c,dropIndicatorRender:Bb}),[N,I,T]=kb(B),[,E]=vs(),k=E.paddingXS/2+(((r=E.Tree)===null||r===void 0?void 0:r.titleHeight)||E.controlHeightSM),O=he.useMemo(()=>{if(!b)return!1;let P={};switch(typeof b){case"function":P.nodeDraggable=b;break;case"object":P=Object.assign({},b);break}return P.icon!==!1&&(P.icon=P.icon||he.createElement(vb,null)),P},[b]),S=P=>he.createElement(jb,{prefixCls:B,switcherIcon:p,switcherLoadingIcon:d,treeNodeProps:P,showLine:c});return N(he.createElement(js,Object.assign({itemHeight:k,ref:t,virtual:a},j,{style:Object.assign(Object.assign({},l==null?void 0:l.style),x),prefixCls:B,className:Ne({[`${B}-icon-hide`]:!s,[`${B}-block-node`]:h,[`${B}-unselectable`]:!f,[`${B}-rtl`]:o==="rtl",[`${B}-disabled`]:F},l==null?void 0:l.className,u,I,T),direction:o,checkable:v&&he.createElement("span",{className:`${B}-checkbox-inner`}),selectable:f,switcherIcon:S,draggable:O}),g))}),Qu=0,_i=1,ec=2;function _s(e,t,r){const{key:n,children:o}=r;function a(l){const i=l[n],u=l[o];t(i,l)!==!1&&_s(u||[],t,r)}e.forEach(a)}function _b({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let l=Qu;if(r&&r===n)return[r];if(!r||!n)return[];function i(u){return u===r||u===n}return _s(e,u=>{if(l===ec)return!1;if(i(u)){if(a.push(u),l===Qu)l=_i;else if(l===_i)return l=ec,!1}else l===_i&&a.push(u);return t.includes(u)},Kn(o)),a}function Mi(e,t,r){const n=et(t),o=[];return _s(e,(a,l)=>{const i=n.indexOf(a);return i!==-1&&(o.push(l),n.splice(i,1)),!!n.length},Kn(r)),o}var tc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function Mb(e){const{isLeaf:t,expanded:r}=e;return t?m.createElement($p,null):r?m.createElement(db,null):m.createElement(hb,null)}function rc({treeData:e,children:t}){return e||ap(t)}const Lb=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=tc(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const l=m.useRef(null),i=m.useRef(null),u=()=>{const{keyEntities:F}=As(rc(a),{fieldNames:a.fieldNames});let w;return r?w=Object.keys(F):n?w=Pl(a.expandedKeys||o||[],F):w=a.expandedKeys||o||[],w},[s,c]=m.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[p,d]=m.useState(()=>u());m.useEffect(()=>{"selectedKeys"in a&&c(a.selectedKeys)},[a.selectedKeys]),m.useEffect(()=>{"expandedKeys"in a&&d(a.expandedKeys)},[a.expandedKeys]);const h=(F,w)=>{var j;return"expandedKeys"in a||d(F),(j=a.onExpand)===null||j===void 0?void 0:j.call(a,F,w)},g=(F,w)=>{var j;const{multiple:N,fieldNames:I}=a,{node:T,nativeEvent:E}=w,{key:k=""}=T,O=rc(a),S=Object.assign(Object.assign({},w),{selected:!0}),P=(E==null?void 0:E.ctrlKey)||(E==null?void 0:E.metaKey),_=E==null?void 0:E.shiftKey;let H;N&&P?(H=F,l.current=k,i.current=H,S.selectedNodes=Mi(O,H,I)):N&&_?(H=Array.from(new Set([].concat(et(i.current||[]),et(_b({treeData:O,expandedKeys:p,startKey:k,endKey:l.current,fieldNames:I}))))),S.selectedNodes=Mi(O,H,I)):(H=[k],l.current=k,i.current=H,S.selectedNodes=Mi(O,H,I)),(j=a.onSelect)===null||j===void 0||j.call(a,H,S),"selectedKeys"in a||c(H)},{getPrefixCls:v,direction:f}=m.useContext(Jr),{prefixCls:b,className:C,showIcon:y=!0,expandAction:x="click"}=a,B=tc(a,["prefixCls","className","showIcon","expandAction"]),A=v("tree",b),$=Ne(`${A}-directory`,{[`${A}-directory-rtl`]:f==="rtl"},C);return m.createElement(Fp,Object.assign({icon:Mb,ref:t,blockNode:!0},B,{showIcon:y,expandAction:x,prefixCls:A,className:$,expandedKeys:p,selectedKeys:s,onSelect:g,onExpand:h}))},zb=m.forwardRef(Lb),Ms=Fp;Ms.DirectoryTree=zb;Ms.TreeNode=Oo;const nc=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?m.createElement("div",{className:`${n}-filter-dropdown-search`},m.createElement(zg,{prefix:m.createElement(Kg,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},Kb=e=>{const{keyCode:t}=e;t===Rt.ENTER&&e.stopPropagation()},Hb=m.forwardRef((e,t)=>m.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:Kb,ref:t},e.children));function _n(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(et(t),et(_n(n))))}),t}function Wb(e){return e.some(({children:t})=>t)}function Np(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Op({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((l,i)=>{const u=String(l.value);if(l.children)return{key:u||i,label:l.text,popupClassName:`${t}-dropdown-submenu`,children:Op({filters:l.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const s=n?Ma:If,c={key:l.value!==void 0?u:i,label:m.createElement(m.Fragment,null,m.createElement(s,{checked:r.includes(u)}),m.createElement("span",null,l.text))};return o.trim()?typeof a=="function"?a(o,l)?c:null:Np(o,l.text)?c:null:c})}function Li(e){return e||[]}const qb=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:l,column:i,dropdownPrefixCls:u,columnKey:s,filterOnClose:c,filterMultiple:p,filterMode:d="menu",filterSearch:h=!1,filterState:g,triggerFilter:v,locale:f,children:b,getPopupContainer:C,rootClassName:y}=e,{filterResetToDefaultFilteredValue:x,defaultFilteredValue:B,filterDropdownProps:A={},filterDropdownOpen:$,filterDropdownVisible:F,onFilterDropdownVisibleChange:w,onFilterDropdownOpenChange:j}=i,[N,I]=m.useState(!1),T=!!(g&&(!((t=g.filteredKeys)===null||t===void 0)&&t.length||g.forceFiltered)),E=ue=>{var ve;I(ue),(ve=A.onOpenChange)===null||ve===void 0||ve.call(A,ue),j==null||j(ue),w==null||w(ue)},k=(o=(n=(r=A.open)!==null&&r!==void 0?r:$)!==null&&n!==void 0?n:F)!==null&&o!==void 0?o:N,O=g==null?void 0:g.filteredKeys,[S,P]=nm(Li(O)),_=({selectedKeys:ue})=>{P(ue)},H=(ue,{node:ve,checked:we})=>{_(p?{selectedKeys:ue}:{selectedKeys:we&&ve.key?[ve.key]:[]})};m.useEffect(()=>{N&&_({selectedKeys:Li(O)})},[O]);const[z,q]=m.useState([]),V=ue=>{q(ue)},[Z,ae]=m.useState(""),R=ue=>{const{value:ve}=ue.target;ae(ve)};m.useEffect(()=>{N||ae("")},[N]);const U=ue=>{const ve=ue!=null&&ue.length?ue:null;if(ve===null&&(!g||!g.filteredKeys)||vn(ve,g==null?void 0:g.filteredKeys,!0))return null;v({column:i,key:s,filteredKeys:ve})},W=()=>{E(!1),U(S())},K=({confirm:ue,closeDropdown:ve}={confirm:!1,closeDropdown:!1})=>{ue&&U([]),ve&&E(!1),ae(""),P(x?(B||[]).map(we=>String(we)):[])},J=({closeDropdown:ue}={closeDropdown:!0})=>{ue&&E(!1),U(S())},Q=(ue,ve)=>{ve.source==="trigger"&&(ue&&O!==void 0&&P(Li(O)),E(ue),!ue&&!i.filterDropdown&&c&&W())},ee=Ne({[`${u}-menu-without-submenu`]:!Wb(i.filters||[])}),oe=ue=>{if(ue.target.checked){const ve=_n(i==null?void 0:i.filters).map(we=>String(we));P(ve)}else P([])},re=({filters:ue})=>(ue||[]).map((ve,we)=>{const Le=String(ve.value),$e={title:ve.text,key:ve.value!==void 0?Le:String(we)};return ve.children&&($e.children=re({filters:ve.children})),$e}),ne=ue=>{var ve;return Object.assign(Object.assign({},ue),{text:ue.title,value:ue.key,children:((ve=ue.children)===null||ve===void 0?void 0:ve.map(we=>ne(we)))||[]})};let de;const{direction:ce,renderEmpty:Se}=m.useContext(Jr);if(typeof i.filterDropdown=="function")de=i.filterDropdown({prefixCls:`${u}-custom`,setSelectedKeys:ue=>_({selectedKeys:ue}),selectedKeys:S(),confirm:J,clearFilters:K,filters:i.filters,visible:k,close:()=>{E(!1)}});else if(i.filterDropdown)de=i.filterDropdown;else{const ue=S()||[],ve=()=>{var Le,$e;const Oe=(Le=Se==null?void 0:Se("Table.filter"))!==null&&Le!==void 0?Le:m.createElement(Cu,{image:Cu.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((i.filters||[]).length===0)return Oe;if(d==="tree")return m.createElement(m.Fragment,null,m.createElement(nc,{filterSearch:h,value:Z,onChange:R,tablePrefixCls:a,locale:f}),m.createElement("div",{className:`${a}-filter-dropdown-tree`},p?m.createElement(Ma,{checked:ue.length===_n(i.filters).length,indeterminate:ue.length>0&&ue.length<_n(i.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:oe},($e=f==null?void 0:f.filterCheckall)!==null&&$e!==void 0?$e:f==null?void 0:f.filterCheckAll):null,m.createElement(Ms,{checkable:!0,selectable:!1,blockNode:!0,multiple:p,checkStrictly:!p,className:`${u}-menu`,onCheck:H,checkedKeys:ue,selectedKeys:ue,showIcon:!1,treeData:re({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Z.trim()?Re=>typeof h=="function"?h(Z,ne(Re)):Np(Z,Re.title):void 0})));const Qe=Op({filters:i.filters||[],filterSearch:h,prefixCls:l,filteredKeys:S(),filterMultiple:p,searchValue:Z}),Ge=Qe.every(Re=>Re===null);return m.createElement(m.Fragment,null,m.createElement(nc,{filterSearch:h,value:Z,onChange:R,tablePrefixCls:a,locale:f}),Ge?Oe:m.createElement(Zn,{selectable:!0,multiple:p,prefixCls:`${u}-menu`,className:ee,onSelect:_,onDeselect:_,selectedKeys:ue,getPopupContainer:C,openKeys:z,onOpenChange:V,items:Qe}))},we=()=>x?vn((B||[]).map(Le=>String(Le)),ue,!0):ue.length===0;de=m.createElement(m.Fragment,null,ve(),m.createElement("div",{className:`${l}-dropdown-btns`},m.createElement(ja,{type:"link",size:"small",disabled:we(),onClick:()=>K()},f.filterReset),m.createElement(ja,{type:"primary",size:"small",onClick:W},f.filterConfirm)))}i.filterDropdown&&(de=m.createElement(rp,{selectable:void 0},de)),de=m.createElement(Hb,{className:`${l}-dropdown`},de);const qe=jf({trigger:["click"],placement:ce==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let ue;return typeof i.filterIcon=="function"?ue=i.filterIcon(T):i.filterIcon?ue=i.filterIcon:ue=m.createElement(X0,null),m.createElement("span",{role:"button",tabIndex:-1,className:Ne(`${l}-trigger`,{active:T}),onClick:ve=>{ve.stopPropagation()}},ue)})(),getPopupContainer:C},Object.assign(Object.assign({},A),{rootClassName:Ne(y,A.rootClassName),open:k,onOpenChange:Q,popupRender:()=>typeof(A==null?void 0:A.dropdownRender)=="function"?A.dropdownRender(de):de}));return m.createElement("div",{className:`${l}-column`},m.createElement("span",{className:`${a}-column-title`},b),m.createElement($s,Object.assign({},qe)))},_l=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var l;const i=to(a,r),u=o.filterDropdown!==void 0;if(o.filters||u||"onFilter"in o)if("filteredValue"in o){let s=o.filteredValue;u||(s=(l=s==null?void 0:s.map(String))!==null&&l!==void 0?l:s),n.push({column:o,key:Yr(o,i),filteredKeys:s,forceFiltered:o.filtered})}else n.push({column:o,key:Yr(o,i),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(et(n),et(_l(o.children,t,i))))}),n};function Pp(e,t,r,n,o,a,l,i,u){return r.map((s,c)=>{const p=to(c,i),{filterOnClose:d=!0,filterMultiple:h=!0,filterMode:g,filterSearch:v}=s;let f=s;if(f.filters||f.filterDropdown){const b=Yr(f,p),C=n.find(({key:y})=>b===y);f=Object.assign(Object.assign({},f),{title:y=>m.createElement(qb,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:f,columnKey:b,filterState:C,filterOnClose:d,filterMultiple:h,filterMode:g,filterSearch:v,triggerFilter:a,locale:o,getPopupContainer:l,rootClassName:u},pi(s.title,y))})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:Pp(e,t,f.children,n,o,a,l,p,u)})),f})}const oc=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:l,filterDropdown:i}=o;if(i)t[a]=n||null;else if(Array.isArray(n)){const u=_n(l);t[a]=u.filter(s=>n.includes(String(s)))}else t[a]=null}),t},Ml=(e,t,r)=>t.reduce((o,a)=>{const{column:{onFilter:l,filters:i},filteredKeys:u}=a;return l&&u&&u.length?o.map(s=>Object.assign({},s)).filter(s=>u.some(c=>{const p=_n(i),d=p.findIndex(g=>String(g)===String(c)),h=d!==-1?p[d]:c;return s[r]&&(s[r]=Ml(s[r],t,r)),l(h,s)})):o},e),Rp=e=>e.flatMap(t=>"children"in t?[t].concat(et(Rp(t.children||[]))):[t]),Ub=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:l,rootClassName:i}=e;ai();const u=m.useMemo(()=>Rp(n||[]),[n]),[s,c]=m.useState(()=>_l(u,!0)),p=m.useMemo(()=>{const v=_l(u,!1);if(v.length===0)return v;let f=!0;if(v.forEach(({filteredKeys:b})=>{b!==void 0&&(f=!1)}),f){const b=(u||[]).map((C,y)=>Yr(C,to(y)));return s.filter(({key:C})=>b.includes(C)).map(C=>{const y=u[b.indexOf(C.key)];return Object.assign(Object.assign({},C),{column:Object.assign(Object.assign({},C.column),y),forceFiltered:y.filtered})})}return v},[u,s]),d=m.useMemo(()=>oc(p),[p]),h=v=>{const f=p.filter(({key:b})=>b!==v.key);f.push(v),c(f),o(oc(f),f)};return[v=>Pp(t,r,v,p,l,h,a,void 0,i),p,d]},Vb=(e,t,r)=>{const n=m.useRef({});function o(a){var l;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let u=function(s){s.forEach((c,p)=>{const d=r(c,p);i.set(d,c),c&&typeof c=="object"&&t in c&&u(c[t]||[])})};const i=new Map;u(e),n.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:r}}return(l=n.current.kvMap)===null||l===void 0?void 0:l.get(a)}return[o]};var Gb=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Tp=10;function Yb(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(o=>{const a=e[o];typeof a!="function"&&(r[o]=a)}),r}function Xb(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=Gb(n,["total"]),[l,i]=ut(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:Tp})),u=jf(l,a,{total:o>0?o:e}),s=Math.ceil((o||e)/u.pageSize);u.current>s&&(u.current=s||1);const c=(d,h)=>{i({current:d??1,pageSize:h||u.pageSize})},p=(d,h)=>{var g;r&&((g=r.onChange)===null||g===void 0||g.call(r,d,h)),c(d,h),t(d,h||(u==null?void 0:u.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},u),{onChange:p}),c]}var Zb={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},Jb=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:Zb}))},Qb=m.forwardRef(Jb),ey={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},ty=function(t,r){return m.createElement(Cr,Ke({},t,{ref:r,icon:ey}))},ry=m.forwardRef(ty);const Da="ascend",zi="descend",Ha=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,ac=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,ny=(e,t)=>t?e[e.indexOf(t)+1]:e[0],Ll=(e,t,r)=>{let n=[];const o=(a,l)=>{n.push({column:a,key:Yr(a,l),multiplePriority:Ha(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,l)=>{const i=to(l,r);a.children?("sortOrder"in a&&o(a,i),n=[].concat(et(n),et(Ll(a.children,t,i)))):a.sorter&&("sortOrder"in a?o(a,i):t&&a.defaultSortOrder&&n.push({column:a,key:Yr(a,i),multiplePriority:Ha(a),sortOrder:a.defaultSortOrder}))}),n},Ip=(e,t,r,n,o,a,l,i)=>(t||[]).map((s,c)=>{const p=to(c,i);let d=s;if(d.sorter){const h=d.sortDirections||o,g=d.showSorterTooltip===void 0?l:d.showSorterTooltip,v=Yr(d,p),f=r.find(({key:w})=>w===v),b=f?f.sortOrder:null,C=ny(h,b);let y;if(s.sortIcon)y=s.sortIcon({sortOrder:b});else{const w=h.includes(Da)&&m.createElement(ry,{className:Ne(`${e}-column-sorter-up`,{active:b===Da})}),j=h.includes(zi)&&m.createElement(Qb,{className:Ne(`${e}-column-sorter-down`,{active:b===zi})});y=m.createElement("span",{className:Ne(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(w&&j)})},m.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},w,j))}const{cancelSort:x,triggerAsc:B,triggerDesc:A}=a||{};let $=x;C===zi?$=A:C===Da&&($=B);const F=typeof g=="object"?Object.assign({title:$},g):{title:$};d=Object.assign(Object.assign({},d),{className:Ne(d.className,{[`${e}-column-sort`]:b}),title:w=>{const j=`${e}-column-sorters`,N=m.createElement("span",{className:`${e}-column-title`},pi(s.title,w)),I=m.createElement("div",{className:j},N,y);return g?typeof g!="boolean"&&(g==null?void 0:g.target)==="sorter-icon"?m.createElement("div",{className:`${j} ${e}-column-sorters-tooltip-target-sorter`},N,m.createElement(Ta,Object.assign({},F),y)):m.createElement(Ta,Object.assign({},F),I):I},onHeaderCell:w=>{var j;const N=((j=s.onHeaderCell)===null||j===void 0?void 0:j.call(s,w))||{},I=N.onClick,T=N.onKeyDown;N.onClick=O=>{n({column:s,key:v,sortOrder:C,multiplePriority:Ha(s)}),I==null||I(O)},N.onKeyDown=O=>{O.keyCode===Rt.ENTER&&(n({column:s,key:v,sortOrder:C,multiplePriority:Ha(s)}),T==null||T(O))};const E=V0(s.title,{}),k=E==null?void 0:E.toString();return b&&(N["aria-sort"]=b==="ascend"?"ascending":"descending"),N["aria-label"]=k||"",N.className=Ne(N.className,`${e}-column-has-sorters`),N.tabIndex=0,s.ellipsis&&(N.title=(E??"").toString()),N}})}return"children"in d&&(d=Object.assign(Object.assign({},d),{children:Ip(e,d.children,r,n,o,a,l,p)})),d}),ic=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},lc=e=>{const t=e.filter(({sortOrder:r})=>r).map(ic);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},ic(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},zl=(e,t,r)=>{const n=t.slice().sort((l,i)=>i.multiplePriority-l.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:l},sortOrder:i})=>ac(l)&&i);return a.length?o.sort((l,i)=>{for(let u=0;u<a.length;u+=1){const s=a[u],{column:{sorter:c},sortOrder:p}=s,d=ac(c);if(d&&p){const h=d(l,i,p);if(h!==0)return p===Da?h:-h}}return 0}).map(l=>{const i=l[r];return i?Object.assign(Object.assign({},l),{[r]:zl(i,t,r)}):l}):o},oy=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:l}=e,[i,u]=m.useState(()=>Ll(r,!0)),s=(v,f)=>{const b=[];return v.forEach((C,y)=>{const x=to(y,f);if(b.push(Yr(C,x)),Array.isArray(C.children)){const B=s(C.children,x);b.push.apply(b,et(B))}}),b},c=m.useMemo(()=>{let v=!0;const f=Ll(r,!1);if(!f.length){const x=s(r);return i.filter(({key:B})=>x.includes(B))}const b=[];function C(x){v?b.push(x):b.push(Object.assign(Object.assign({},x),{sortOrder:null}))}let y=null;return f.forEach(x=>{y===null?(C(x),x.sortOrder&&(x.multiplePriority===!1?v=!1:y=!0)):(y&&x.multiplePriority!==!1||(v=!1),C(x))}),b},[r,i]),p=m.useMemo(()=>{var v,f;const b=c.map(({column:C,sortOrder:y})=>({column:C,order:y}));return{sortColumns:b,sortColumn:(v=b[0])===null||v===void 0?void 0:v.column,sortOrder:(f=b[0])===null||f===void 0?void 0:f.order}},[c]),d=v=>{let f;v.multiplePriority===!1||!c.length||c[0].multiplePriority===!1?f=[v]:f=[].concat(et(c.filter(({key:b})=>b!==v.key)),[v]),u(f),l(lc(f),f)};return[v=>Ip(t,v,c,d,n,o,a),c,p,()=>lc(c)]},jp=(e,t)=>e.map(n=>{const o=Object.assign({},n);return o.title=pi(n.title,t),"children"in o&&(o.children=jp(o.children,t)),o}),ay=e=>[m.useCallback(r=>jp(r,e),[e])],iy=wp((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),ly=Sp((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),sy=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:l,tablePaddingHorizontal:i,calc:u}=e,s=`${De(r)} ${n} ${o}`,c=(p,d,h)=>({[`&${t}-${p}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${De(u(d).mul(-1).equal())}
|
|
28
|
+
${De(u(u(h).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:s,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:s,borderTop:s,[`
|
|
29
|
+
> ${t}-content,
|
|
30
|
+
> ${t}-header,
|
|
31
|
+
> ${t}-body,
|
|
32
|
+
> ${t}-summary
|
|
33
|
+
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:s},"> thead":{"> tr:not(:last-child) > th":{borderBottom:s},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:s}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${De(u(l).mul(-1).equal())} ${De(u(u(i).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:s,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
|
|
34
|
+
> tr${t}-expanded-row,
|
|
35
|
+
> tr${t}-placeholder
|
|
36
|
+
`]:{"> th, > td":{borderInlineEnd:0}}}}}},c("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),c("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:s,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${De(r)} 0 ${De(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:s}}}},uy=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},Ff),{wordBreak:"keep-all",[`
|
|
37
|
+
&${t}-cell-fix-left-last,
|
|
38
|
+
&${t}-cell-fix-right-first
|
|
39
|
+
`]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},cy=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},dy=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:l,tableBorderColor:i,tableExpandIconBg:u,tableExpandColumnWidth:s,borderRadius:c,tablePaddingVertical:p,tablePaddingHorizontal:d,tableExpandedRowBg:h,paddingXXS:g,expandIconMarginTop:v,expandIconSize:f,expandIconHalfInner:b,expandIconScale:C,calc:y}=e,x=`${De(o)} ${l} ${i}`,B=y(g).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:s},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},Hg(e)),{position:"relative",float:"left",width:f,height:f,color:"inherit",lineHeight:De(f),background:u,border:x,borderRadius:c,transform:`scale(${C})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:b,insetInlineEnd:B,insetInlineStart:B,height:o},"&::after":{top:B,bottom:B,insetInlineStart:b,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:v,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:h}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${De(y(p).mul(-1).equal())} ${De(y(d).mul(-1).equal())}`,padding:`${De(p)} ${De(d)}`}}}},fy=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:l,paddingXS:i,colorText:u,lineWidth:s,lineType:c,tableBorderColor:p,headerIconColor:d,fontSizeSM:h,tablePaddingHorizontal:g,borderRadius:v,motionDurationSlow:f,colorIcon:b,colorPrimary:C,tableHeaderFilterActiveBg:y,colorTextDisabled:x,tableFilterDropdownBg:B,tableFilterDropdownHeight:A,controlItemBgHover:$,controlItemBgActive:F,boxShadowSecondary:w,filterDropdownMenuBg:j,calc:N}=e,I=`${r}-dropdown`,T=`${t}-filter-dropdown`,E=`${r}-tree`,k=`${De(s)} ${c} ${p}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:N(l).mul(-1).equal(),marginInline:`${De(l)} ${De(N(g).div(2).mul(-1).equal())}`,padding:`0 ${De(l)}`,color:d,fontSize:h,borderRadius:v,cursor:"pointer",transition:`all ${f}`,"&:hover":{color:b,background:y},"&.active":{color:C}}}},{[`${r}-dropdown`]:{[T]:Object.assign(Object.assign({},qo(e)),{minWidth:o,backgroundColor:B,borderRadius:v,boxShadow:w,overflow:"hidden",[`${I}-menu`]:{maxHeight:A,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:j,"&:empty::after":{display:"block",padding:`${De(i)} 0`,color:x,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${T}-tree`]:{paddingBlock:`${De(i)} 0`,paddingInline:i,[E]:{padding:0},[`${E}-treenode ${E}-node-content-wrapper:hover`]:{backgroundColor:$},[`${E}-treenode-checkbox-checked ${E}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:F}}},[`${T}-search`]:{padding:i,borderBottom:k,"&-input":{input:{minWidth:a},[n]:{color:x}}},[`${T}-checkall`]:{width:"100%",marginBottom:l,marginInlineStart:l},[`${T}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${De(N(i).sub(s).equal())} ${De(i)}`,overflow:"hidden",borderTop:k}})}},{[`${r}-dropdown ${T}, ${T}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:i,color:u},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},py=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:l,zIndexTableSticky:i,calc:u}=e,s=n;return{[`${t}-wrapper`]:{[`
|
|
40
|
+
${t}-cell-fix-left,
|
|
41
|
+
${t}-cell-fix-right
|
|
42
|
+
`]:{position:"sticky !important",zIndex:a,background:l},[`
|
|
43
|
+
${t}-cell-fix-left-first::after,
|
|
44
|
+
${t}-cell-fix-left-last::after
|
|
45
|
+
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:u(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
46
|
+
${t}-cell-fix-right-first::after,
|
|
47
|
+
${t}-cell-fix-right-last::after
|
|
48
|
+
`]:{position:"absolute",top:0,bottom:u(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:u(i).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`
|
|
49
|
+
${t}-cell-fix-left-first::after,
|
|
50
|
+
${t}-cell-fix-left-last::after
|
|
51
|
+
`]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${s}`},[`
|
|
52
|
+
${t}-cell-fix-right-first::after,
|
|
53
|
+
${t}-cell-fix-right-last::after
|
|
54
|
+
`]:{boxShadow:`inset -10px 0 8px -8px ${s}`}},[`${t}-fixed-column-gapped`]:{[`
|
|
55
|
+
${t}-cell-fix-left-first::after,
|
|
56
|
+
${t}-cell-fix-left-last::after,
|
|
57
|
+
${t}-cell-fix-right-first::after,
|
|
58
|
+
${t}-cell-fix-right-last::after
|
|
59
|
+
`]:{boxShadow:"none"}}}}},hy=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${De(n)} 0`}}},gy=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${De(r)} ${De(r)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:r,borderStartEndRadius:r,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:r},"> *:last-child":{borderStartEndRadius:r}}},"&-footer":{borderRadius:`0 0 ${De(r)} ${De(r)}`}}}}},my=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},vy=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:l,headerIconColor:i,headerIconHoverColor:u,tableSelectionColumnWidth:s,tableSelectedRowBg:c,tableSelectedRowHoverBg:p,tableRowHoverBg:d,tablePaddingHorizontal:h,calc:g}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:s,[`&${t}-selection-col-with-dropdown`]:{width:g(s).add(o).add(g(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:g(s).add(g(l).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:g(s).add(o).add(g(a).div(4)).add(g(l).mul(2)).equal()}},[`
|
|
60
|
+
table tr th${t}-selection-column,
|
|
61
|
+
table tr td${t}-selection-column,
|
|
62
|
+
${t}-selection-column
|
|
63
|
+
`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:g(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:De(g(h).div(4).equal()),[n]:{color:i,fontSize:o,verticalAlign:"baseline","&:hover":{color:u}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:c,"&-row-hover":{background:p}}},[`> ${t}-cell-row-hover`]:{background:d}}}}}},by=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,l,i,u)=>({[`${t}${t}-${a}`]:{fontSize:u,[`
|
|
64
|
+
${t}-title,
|
|
65
|
+
${t}-footer,
|
|
66
|
+
${t}-cell,
|
|
67
|
+
${t}-thead > tr > th,
|
|
68
|
+
${t}-tbody > tr > th,
|
|
69
|
+
${t}-tbody > tr > td,
|
|
70
|
+
tfoot > tr > th,
|
|
71
|
+
tfoot > tr > td
|
|
72
|
+
`]:{padding:`${De(l)} ${De(i)}`},[`${t}-filter-trigger`]:{marginInlineEnd:De(n(i).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${De(n(l).mul(-1).equal())} ${De(n(i).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:De(n(l).mul(-1).equal()),marginInline:`${De(n(r).sub(i).equal())} ${De(n(i).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:De(n(i).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},yy=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:o,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`
|
|
73
|
+
&${t}-cell-fix-left:hover,
|
|
74
|
+
&${t}-cell-fix-right:hover
|
|
75
|
+
`]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:r,color:o,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},Cy=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:l,zIndexTableSticky:i,stickyScrollBarBorderRadius:u,lineWidth:s,lineType:c,tableBorderColor:p}=e,d=`${De(s)} ${c} ${p}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:i,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${De(a)} !important`,zIndex:i,display:"flex",alignItems:"center",background:l,borderTop:d,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:u,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},sc=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${De(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${De(o(r).mul(-1).equal())} 0 ${n}`}}}},xy=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:l}=e,i=`${De(n)} ${o} ${a}`,u=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
|
|
76
|
+
& > ${t}-row,
|
|
77
|
+
& > div:not(${t}-row) > ${t}-row
|
|
78
|
+
`]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:i,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${u}${u}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${De(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:i,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:i,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:l(n).mul(-1).equal(),borderInlineStart:i}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:i,borderBottom:i}}}}}},Dy=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:l,lineType:i,tableBorderColor:u,tableFontSize:s,tableBg:c,tableRadius:p,tableHeaderTextColor:d,motionDurationMid:h,tableHeaderBg:g,tableHeaderCellSplitColor:v,tableFooterTextColor:f,tableFooterBg:b,calc:C}=e,y=`${De(l)} ${i} ${u}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},wl()),{[t]:Object.assign(Object.assign({},qo(e)),{fontSize:s,background:c,borderRadius:`${De(p)} ${De(p)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${De(p)} ${De(p)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
79
|
+
${t}-cell,
|
|
80
|
+
${t}-thead > tr > th,
|
|
81
|
+
${t}-tbody > tr > th,
|
|
82
|
+
${t}-tbody > tr > td,
|
|
83
|
+
tfoot > tr > th,
|
|
84
|
+
tfoot > tr > td
|
|
85
|
+
`]:{position:"relative",padding:`${De(n)} ${De(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${De(n)} ${De(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:d,fontWeight:r,textAlign:"start",background:g,borderBottom:y,transition:`background ${h} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:v,transform:"translateY(-50%)",transition:`background-color ${h}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${h}, border-color ${h}`,borderBottom:y,[`
|
|
86
|
+
> ${t}-wrapper:only-child,
|
|
87
|
+
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
88
|
+
`]:{[t]:{marginBlock:De(C(n).mul(-1).equal()),marginInline:`${De(C(a).sub(o).equal())}
|
|
89
|
+
${De(C(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:d,fontWeight:r,textAlign:"start",background:g,borderBottom:y,transition:`background ${h} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${De(n)} ${De(o)}`,color:f,background:b}})}},wy=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:l,controlItemBgActiveHover:i,padding:u,paddingSM:s,paddingXS:c,colorBorderSecondary:p,borderRadiusLG:d,controlHeight:h,colorTextPlaceholder:g,fontSize:v,fontSizeSM:f,lineHeight:b,lineWidth:C,colorIcon:y,colorIconHover:x,opacityLoading:B,controlInteractiveSize:A}=e,$=new un(o).onBackground(r).toHexString(),F=new un(a).onBackground(r).toHexString(),w=new un(t).onBackground(r).toHexString(),j=new un(y),N=new un(x),I=A/2-C,T=I*2+C*3;return{headerBg:w,headerColor:n,headerSortActiveBg:$,headerSortHoverBg:F,bodySortBg:w,rowHoverBg:w,rowSelectedBg:l,rowSelectedHoverBg:i,rowExpandedBg:t,cellPaddingBlock:u,cellPaddingInline:u,cellPaddingBlockMD:s,cellPaddingInlineMD:c,cellPaddingBlockSM:c,cellPaddingInlineSM:c,borderColor:p,headerBorderRadius:d,footerBg:w,footerColor:n,cellFontSize:v,cellFontSizeMD:v,cellFontSizeSM:v,headerSplitColor:p,fixedHeaderSortActiveBg:$,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:h,stickyScrollBarBg:g,stickyScrollBarBorderRadius:100,expandIconMarginTop:(v*b-C*3)/2-Math.ceil((f*1.4-C*3)/2),headerIconColor:j.clone().setA(j.a*B).toRgbString(),headerIconHoverColor:N.clone().setA(N.a*B).toRgbString(),expandIconHalfInner:I,expandIconSize:T,expandIconScale:A/T}},uc=2,Ey=oi("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:l,headerSortActiveBg:i,headerSortHoverBg:u,bodySortBg:s,rowHoverBg:c,rowSelectedBg:p,rowSelectedHoverBg:d,rowExpandedBg:h,cellPaddingBlock:g,cellPaddingInline:v,cellPaddingBlockMD:f,cellPaddingInlineMD:b,cellPaddingBlockSM:C,cellPaddingInlineSM:y,borderColor:x,footerBg:B,footerColor:A,headerBorderRadius:$,cellFontSize:F,cellFontSizeMD:w,cellFontSizeSM:j,headerSplitColor:N,fixedHeaderSortActiveBg:I,headerFilterHoverBg:T,filterDropdownBg:E,expandIconBg:k,selectionColumnWidth:O,stickyScrollBarBg:S,calc:P}=e,_=Fo(e,{tableFontSize:F,tableBg:n,tableRadius:$,tablePaddingVertical:g,tablePaddingHorizontal:v,tablePaddingVerticalMiddle:f,tablePaddingHorizontalMiddle:b,tablePaddingVerticalSmall:C,tablePaddingHorizontalSmall:y,tableBorderColor:x,tableHeaderTextColor:l,tableHeaderBg:a,tableFooterTextColor:A,tableFooterBg:B,tableHeaderCellSplitColor:N,tableHeaderSortBg:i,tableHeaderSortHoverBg:u,tableBodySortBg:s,tableFixedHeaderSortActiveBg:I,tableHeaderFilterActiveBg:T,tableFilterDropdownBg:E,tableRowHoverBg:c,tableSelectedRowBg:p,tableSelectedRowHoverBg:d,zIndexTableFixed:uc,zIndexTableSticky:P(uc).add(1).equal({unit:!1}),tableFontSizeMiddle:w,tableFontSizeSmall:j,tableSelectionColumnWidth:O,tableExpandIconBg:k,tableExpandColumnWidth:P(o).add(P(e.padding).mul(2)).equal(),tableExpandedRowBg:h,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:S,tableScrollThumbBgHover:t,tableScrollBg:r});return[Dy(_),hy(_),sc(_),yy(_),fy(_),sy(_),gy(_),dy(_),sc(_),cy(_),vy(_),py(_),Cy(_),uy(_),by(_),my(_),xy(_)]},wy,{unitless:{expandIconScale:!0}}),cc=[],Sy=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:l,style:i,size:u,bordered:s,dropdownPrefixCls:c,dataSource:p,pagination:d,rowSelection:h,rowKey:g="key",rowClassName:v,columns:f,children:b,childrenColumnName:C,onChange:y,getPopupContainer:x,loading:B,expandIcon:A,expandable:$,expandedRowRender:F,expandIconColumnIndex:w,indentSize:j,scroll:N,sortDirections:I,locale:T,showSorterTooltip:E={target:"full-header"},virtual:k}=e;ai();const O=m.useMemo(()=>f||Ps(b),[f,b]),S=m.useMemo(()=>O.some(Ie=>Ie.responsive),[O]),P=Wg(S),_=m.useMemo(()=>{const Ie=new Set(Object.keys(P).filter(pe=>P[pe]));return O.filter(pe=>!pe.responsive||pe.responsive.some(He=>Ie.has(He)))},[O,P]),H=_r(e,["className","style","columns"]),{locale:z=qg,direction:q,table:V,renderEmpty:Z,getPrefixCls:ae,getPopupContainer:R}=m.useContext(Jr),U=Ug(u),W=Object.assign(Object.assign({},z.Table),T),K=p||cc,J=ae("table",o),Q=ae("dropdown",c),[,ee]=vs(),oe=ms(J),[re,ne,de]=Ey(J,oe),ce=Object.assign(Object.assign({childrenColumnName:C,expandIconColumnIndex:w},$),{expandIcon:(r=$==null?void 0:$.expandIcon)!==null&&r!==void 0?r:(n=V==null?void 0:V.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:Se="children"}=ce,We=m.useMemo(()=>K.some(Ie=>Ie==null?void 0:Ie[Se])?"nest":F||$!=null&&$.expandedRowRender?"row":null,[K]),qe={body:m.useRef(null)},ue=U0(J),ve=m.useRef(null),we=m.useRef(null);rm(t,()=>Object.assign(Object.assign({},we.current),{nativeElement:ve.current}));const Le=m.useMemo(()=>typeof g=="function"?g:Ie=>Ie==null?void 0:Ie[g],[g]),[$e]=Vb(K,Se,Le),Oe={},Qe=(Ie,pe,He=!1)=>{var ft,$t,Nt,er;const Wt=Object.assign(Object.assign({},Oe),Ie);He&&((ft=Oe.resetPagination)===null||ft===void 0||ft.call(Oe),!(($t=Wt.pagination)===null||$t===void 0)&&$t.current&&(Wt.pagination.current=1),d&&((Nt=d.onChange)===null||Nt===void 0||Nt.call(d,1,(er=Wt.pagination)===null||er===void 0?void 0:er.pageSize))),N&&N.scrollToFirstRowOnChange!==!1&&qe.body.current&&Qg(0,{getContainer:()=>qe.body.current}),y==null||y(Wt.pagination,Wt.filters,Wt.sorter,{currentDataSource:Ml(zl(K,Wt.sorterStates,Se),Wt.filterStates,Se),action:pe})},Ge=(Ie,pe)=>{Qe({sorter:Ie,sorterStates:pe},"sort",!1)},[Re,je,xe,ye]=oy({prefixCls:J,mergedColumns:_,onSorterChange:Ge,sortDirections:I||["ascend","descend"],tableLocale:W,showSorterTooltip:E}),_e=m.useMemo(()=>zl(K,je,Se),[K,je]);Oe.sorter=ye(),Oe.sorterStates=je;const Ue=(Ie,pe)=>{Qe({filters:Ie,filterStates:pe},"filter",!0)},[Ze,Me,vt]=Ub({prefixCls:J,locale:W,dropdownPrefixCls:Q,mergedColumns:_,onFilterChange:Ue,getPopupContainer:x||R,rootClassName:Ne(l,oe)}),Ye=Ml(_e,Me,Se);Oe.filters=vt,Oe.filterStates=Me;const mt=m.useMemo(()=>{const Ie={};return Object.keys(vt).forEach(pe=>{vt[pe]!==null&&(Ie[pe]=vt[pe])}),Object.assign(Object.assign({},xe),{filters:Ie})},[xe,vt]),[Dt]=ay(mt),nt=(Ie,pe)=>{Qe({pagination:Object.assign(Object.assign({},Oe.pagination),{current:Ie,pageSize:pe})},"paginate")},[it,Qt]=Xb(Ye.length,nt,d);Oe.pagination=d===!1?{}:Yb(it,d),Oe.resetPagination=Qt;const Tt=m.useMemo(()=>{if(d===!1||!it.pageSize)return Ye;const{current:Ie=1,total:pe,pageSize:He=Tp}=it;return Ye.length<pe?Ye.length>He?Ye.slice((Ie-1)*He,Ie*He):Ye:Ye.slice((Ie-1)*He,Ie*He)},[!!d,Ye,it==null?void 0:it.current,it==null?void 0:it.pageSize,it==null?void 0:it.total]),[lr,zt]=W0({prefixCls:J,data:Ye,pageData:Tt,getRowKey:Le,getRecordByKey:$e,expandType:We,childrenColumnName:Se,locale:W,getPopupContainer:x||R},h),Y=(Ie,pe,He)=>{let ft;return typeof v=="function"?ft=Ne(v(Ie,pe,He)):ft=Ne(v),Ne({[`${J}-row-selected`]:zt.has(Le(Ie,pe))},ft)};ce.__PARENT_RENDER_ICON__=ce.expandIcon,ce.expandIcon=ce.expandIcon||A||q0(W),We==="nest"&&ce.expandIconColumnIndex===void 0?ce.expandIconColumnIndex=h?1:0:ce.expandIconColumnIndex>0&&h&&(ce.expandIconColumnIndex-=1),typeof ce.indentSize!="number"&&(ce.indentSize=typeof j=="number"?j:15);const me=m.useCallback(Ie=>Dt(lr(Ze(Re(Ie)))),[Re,Ze,lr]),Fe=()=>{if(d===!1||!(it!=null&&it.total))return{};const Ie=()=>it.size||(U==="small"||U==="middle"?"small":void 0),pe=Ft=>{const Br=Ft==="left"?"start":Ft==="right"?"end":Ft;return m.createElement(Mf,Object.assign({},it,{align:it.align||Br,className:Ne(`${J}-pagination`,it.className),size:Ie()}))},He=q==="rtl"?"left":"right",ft=it.position;if(ft===null||!Array.isArray(ft))return{bottom:pe(He)};const $t=ft.find(Ft=>typeof Ft=="string"&&Ft.toLowerCase().includes("top")),Nt=ft.find(Ft=>typeof Ft=="string"&&Ft.toLowerCase().includes("bottom")),er=ft.every(Ft=>`${Ft}`=="none"),Wt=$t?$t.toLowerCase().replace("top",""):"",en=Nt?Nt.toLowerCase().replace("bottom",""):"",oo=!$t&&!Nt&&!er,En=()=>Wt?pe(Wt):void 0,Lr=()=>{if(en)return pe(en);if(oo)return pe(He)};return{top:En(),bottom:Lr()}},Ce=m.useMemo(()=>typeof B=="boolean"?{spinning:B}:typeof B=="object"&&B!==null?Object.assign({spinning:!0},B):void 0,[B]),fe=Ne(de,oe,`${J}-wrapper`,V==null?void 0:V.className,{[`${J}-wrapper-rtl`]:q==="rtl"},a,l,ne),Be=Object.assign(Object.assign({},V==null?void 0:V.style),i),ke=m.useMemo(()=>Ce!=null&&Ce.spinning&&K===cc?null:typeof(T==null?void 0:T.emptyText)<"u"?T.emptyText:(Z==null?void 0:Z("Table"))||m.createElement(Vg,{componentName:"Table"}),[Ce==null?void 0:Ce.spinning,K,T==null?void 0:T.emptyText,Z]),se=k?ly:iy,X={},G=m.useMemo(()=>{const{fontSize:Ie,lineHeight:pe,lineWidth:He,padding:ft,paddingXS:$t,paddingSM:Nt}=ee,er=Math.floor(Ie*pe);switch(U){case"middle":return Nt*2+er+He;case"small":return $t*2+er+He;default:return ft*2+er+He}},[ee,U]);k&&(X.listItemHeight=G);const{top:Ae,bottom:tt}=Fe();return re(m.createElement("div",{ref:ve,className:fe,style:Be},m.createElement(_f,Object.assign({spinning:!1},Ce),Ae,m.createElement(se,Object.assign({},X,H,{ref:we,columns:_,direction:q,expandable:ce,prefixCls:J,className:Ne({[`${J}-middle`]:U==="middle",[`${J}-small`]:U==="small",[`${J}-bordered`]:s,[`${J}-empty`]:K.length===0},de,oe,ne),data:Tt,rowKey:Le,rowClassName:Y,emptyText:ke,internalHooks:Go,internalRefs:qe,transformColumns:me,getContainerWidth:ue,measureRowRender:Ie=>m.createElement(Gg,{getPopupContainer:pe=>pe},Ie)})),tt)))},ky=m.forwardRef(Sy),By=(e,t)=>{const r=m.useRef(0);return r.current+=1,m.createElement(ky,Object.assign({},e,{ref:t,_renderTimes:r.current}))},Mr=m.forwardRef(By);Mr.SELECTION_COLUMN=Kr;Mr.EXPAND_COLUMN=Wr;Mr.SELECTION_ALL=Rl;Mr.SELECTION_INVERT=Tl;Mr.SELECTION_NONE=Il;Mr.Column=R0;Mr.ColumnGroup=T0;Mr.Summary=pp;var or={},Ay=Object.defineProperty,$y=(e,t,r)=>t in e?Ay(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>$y(e,typeof t!="symbol"?t+"":t,r),aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dc={exports:{}},po={};/**
|
|
90
|
+
* @license React
|
|
91
|
+
* react-jsx-runtime.production.min.js
|
|
92
|
+
*
|
|
93
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the MIT license found in the
|
|
96
|
+
* LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/var fc;function Fy(){if(fc)return po;fc=1;var e=he,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(i,u,s){var c,p={},d=null,h=null;s!==void 0&&(d=""+s),u.key!==void 0&&(d=""+u.key),u.ref!==void 0&&(h=u.ref);for(c in u)n.call(u,c)&&!a.hasOwnProperty(c)&&(p[c]=u[c]);if(i&&i.defaultProps)for(c in u=i.defaultProps,u)p[c]===void 0&&(p[c]=u[c]);return{$$typeof:t,type:i,key:d,ref:h,props:p,_owner:o.current}}return po.Fragment=r,po.jsx=l,po.jsxs=l,po}var pc;function Ny(){return pc||(pc=1,dc.exports=Fy()),dc.exports}var M=Ny();/*!
|
|
98
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
99
|
+
*
|
|
100
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
101
|
+
* Released under the MIT License.
|
|
102
|
+
*/function hc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vt(e){var t,r;return hc(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(hc(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var _p=Symbol.for("immer-nothing"),gc=Symbol.for("immer-draftable"),ar=Symbol.for("immer-state");function pr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Po=Object.getPrototypeOf;function yn(e){return!!e&&!!e[ar]}function Cn(e){var t;return e?Mp(e)||Array.isArray(e)||!!e[gc]||!!((t=e.constructor)!=null&&t[gc])||Yo(e)||mi(e):!1}var Oy=Object.prototype.constructor.toString(),mc=new WeakMap;function Mp(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=mc.get(r);return n===void 0&&(n=Function.toString.call(r),mc.set(r,n)),n===Oy}function Wa(e,t,r=!0){gi(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,o)=>t(o,n,e))}function gi(e){const t=e[ar];return t?t.type_:Array.isArray(e)?1:Yo(e)?2:mi(e)?3:0}function Kl(e,t){return gi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Lp(e,t,r){const n=gi(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Py(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yo(e){return e instanceof Map}function mi(e){return e instanceof Set}function ln(e){return e.copy_||e.base_}function Hl(e,t){if(Yo(e))return new Map(e);if(mi(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=Mp(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[ar];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const l=o[a],i=n[l];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[l]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[l]})}return Object.create(Po(e),n)}else{const n=Po(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function Ls(e,t=!1){return vi(e)||yn(e)||!Cn(e)||(gi(e)>1&&Object.defineProperties(e,{set:ia,add:ia,clear:ia,delete:ia}),Object.freeze(e),t&&Object.values(e).forEach(r=>Ls(r,!0))),e}function Ry(){pr(2)}var ia={value:Ry};function vi(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Ty={};function xn(e){const t=Ty[e];return t||pr(0,e),t}var Ro;function zp(){return Ro}function Iy(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vc(e,t){t&&(xn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wl(e){ql(e),e.drafts_.forEach(jy),e.drafts_=null}function ql(e){e===Ro&&(Ro=e.parent_)}function bc(e){return Ro=Iy(Ro,e)}function jy(e){const t=e[ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function yc(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ar].modified_&&(Wl(t),pr(4)),Cn(e)&&(e=qa(t,e),t.parent_||Ua(t,e)),t.patches_&&xn("Patches").generateReplacementPatches_(r[ar].base_,e,t.patches_,t.inversePatches_)):e=qa(t,r,[]),Wl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==_p?e:void 0}function qa(e,t,r){if(vi(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[ar];if(!o)return Wa(t,(a,l)=>Cc(e,o,t,a,l,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Ua(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const a=o.copy_;let l=a,i=!1;o.type_===3&&(l=new Set(a),a.clear(),i=!0),Wa(l,(u,s)=>Cc(e,o,a,u,s,r,i),n),Ua(e,a,!1),r&&e.patches_&&xn("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Cc(e,t,r,n,o,a,l){if(o==null||typeof o!="object"&&!l)return;const i=vi(o);if(!(i&&!l)){if(yn(o)){const u=a&&t&&t.type_!==3&&!Kl(t.assigned_,n)?a.concat(n):void 0,s=qa(e,o,u);if(Lp(r,n,s),yn(s))e.canAutoFreeze_=!1;else return}else l&&r.add(o);if(Cn(o)&&!i){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&i)return;qa(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Yo(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Ua(e,o)}}}function Ua(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ls(t,r)}function _y(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:zp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=zs;r&&(o=[n],a=To);const{revoke:l,proxy:i}=Proxy.revocable(o,a);return n.draft_=i,n.revoke_=l,i}var zs={get(e,t){if(t===ar)return e;const r=ln(e);if(!Kl(r,t))return My(e,r,t);const n=r[t];return e.finalized_||!Cn(n)?n:n===Ki(e.base_,t)?(Hi(e),e.copy_[t]=Vl(n,e)):n},has(e,t){return t in ln(e)},ownKeys(e){return Reflect.ownKeys(ln(e))},set(e,t,r){const n=Kp(ln(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Ki(ln(e),t),a=o==null?void 0:o[ar];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Py(r,o)&&(r!==void 0||Kl(e.base_,t)))return!0;Hi(e),Ul(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Ki(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Hi(e),Ul(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ln(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){pr(11)},getPrototypeOf(e){return Po(e.base_)},setPrototypeOf(){pr(12)}},To={};Wa(zs,(e,t)=>{To[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});To.deleteProperty=function(e,t){return To.set.call(this,e,t,void 0)};To.set=function(e,t,r){return zs.set.call(this,e[0],t,r,e[0])};function Ki(e,t){const r=e[ar];return(r?ln(r):e)[t]}function My(e,t,r){var o;const n=Kp(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Kp(e,t){if(!(t in e))return;let r=Po(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Po(r)}}function Ul(e){e.modified_||(e.modified_=!0,e.parent_&&Ul(e.parent_))}function Hi(e){e.copy_||(e.copy_=Hl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ly=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const l=this;return function(i=a,...u){return l.produce(i,s=>r.call(this,s,...u))}}typeof r!="function"&&pr(6),n!==void 0&&typeof n!="function"&&pr(7);let o;if(Cn(t)){const a=bc(this),l=Vl(t,void 0);let i=!0;try{o=r(l),i=!1}finally{i?Wl(a):ql(a)}return vc(a,n),yc(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===_p&&(o=void 0),this.autoFreeze_&&Ls(o,!0),n){const a=[],l=[];xn("Patches").generateReplacementPatches_(t,o,a,l),n(a,l)}return o}else pr(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...l)=>this.produceWithPatches(a,i=>t(i,...l));let n,o;return[this.produce(t,r,(a,l)=>{n=a,o=l}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Cn(e)||pr(8),yn(e)&&(e=zy(e));const t=bc(this),r=Vl(e,void 0);return r[ar].isManual_=!0,ql(t),r}finishDraft(e,t){const r=e&&e[ar];(!r||!r.isManual_)&&pr(9);const{scope_:n}=r;return vc(n,t),yc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=xn("Patches").applyPatches_;return yn(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Vl(e,t){const r=Yo(e)?xn("MapSet").proxyMap_(e,t):mi(e)?xn("MapSet").proxySet_(e,t):_y(e,t);return(t?t.scope_:zp()).drafts_.push(r),r}function zy(e){return yn(e)||pr(10,e),Hp(e)}function Hp(e){if(!Cn(e)||vi(e))return e;const t=e[ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Hl(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Hl(e,!0);return Wa(r,(o,a)=>{Lp(r,o,Hp(a))},n),t&&(t.finalized_=!1),r}var Io=new Ly,Ks=Io.produce,xc=Io.createDraft.bind(Io),Dc=Io.finishDraft.bind(Io),Ky={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=L.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Hy={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=at.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Wy={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=te.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Va=new WeakMap,Ga=new WeakMap,Eo=new WeakMap,Wp=new WeakMap,wc=new WeakMap,Ec=new WeakMap,Sc=new WeakMap,L={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=L.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n],a=t[n];if(o!==a)break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],l=t[r];return L.equals(n,o)&&a>l},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return L.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],l=t[r];return L.equals(n,o)&&a<l},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return L.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&L.compare(e,t)===0},isBefore(e,t){return L.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&L.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&L.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&L.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&L.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),o=e[e.length-1],a=t[t.length-1];return o!==a&&L.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!L.isAncestor(t,e)&&!L.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:a}=t;(L.equals(a,n)||L.endsBefore(a,n)||L.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:l}=t;if(L.equals(l,n)||L.isAncestor(l,n))return null;L.endsBefore(l,n)&&(n[l.length-1]-=1);break}case"merge_node":{var{path:i,position:u}=t;L.equals(i,n)||L.endsBefore(i,n)?n[i.length-1]-=1:L.isAncestor(i,n)&&(n[i.length-1]-=1,n[i.length]+=u);break}case"split_node":{var{path:s,position:c}=t;if(L.equals(s,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else L.endsBefore(s,n)?n[s.length-1]+=1:L.isAncestor(s,n)&&e[s.length]>=c&&(n[s.length-1]+=1,n[s.length]-=c);break}case"move_node":{var{path:p,newPath:d}=t;if(L.equals(p,d))return n;if(L.isAncestor(p,n)||L.equals(p,n)){var h=d.slice();return L.endsBefore(p,d)&&p.length<d.length&&(h[p.length-1]-=1),h.concat(n.slice(p.length))}else L.isSibling(p,d)&&(L.isAncestor(d,n)||L.equals(d,n))?L.endsBefore(p,n)?n[p.length-1]-=1:n[p.length-1]+=1:L.endsBefore(d,n)||L.equals(d,n)||L.isAncestor(d,n)?(L.endsBefore(p,n)&&(n[p.length-1]-=1),n[d.length-1]+=1):L.endsBefore(p,n)&&(L.equals(d,n)&&(n[d.length-1]+=1),n[p.length-1]-=1);break}}return n}};function jo(e){"@babel/helpers - typeof";return jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo(e)}function qy(e,t){if(jo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uy(e){var t=qy(e,"string");return jo(t)==="symbol"?t:String(t)}function Jt(e,t,r){return t=Uy(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Vy=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Ee.parent(e,n),l=n[n.length-1];if(l>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(a.children.splice(l,0,o),t)for(var[i,u]of te.points(t))t[u]=at.transform(i,r);break}case"insert_text":{var{path:s,offset:c,text:p}=r;if(p.length===0)break;var d=Ee.leaf(e,s),h=d.text.slice(0,c),g=d.text.slice(c);if(d.text=h+p+g,t)for(var[v,f]of te.points(t))t[f]=at.transform(v,r);break}case"merge_node":{var{path:b}=r,C=Ee.get(e,b),y=L.previous(b),x=Ee.get(e,y),B=Ee.parent(e,b),A=b[b.length-1];if(Pe.isText(C)&&Pe.isText(x))x.text+=C.text;else if(!Pe.isText(C)&&!Pe.isText(x))x.children.push(...C.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b,"] to nodes of different interfaces: ").concat(Mt.stringify(C)," ").concat(Mt.stringify(x)));if(B.children.splice(A,1),t)for(var[$,F]of te.points(t))t[F]=at.transform($,r);break}case"move_node":{var{path:w,newPath:j}=r;if(L.isAncestor(w,j))throw new Error("Cannot move a path [".concat(w,"] to new path [").concat(j,"] because the destination is inside itself."));var N=Ee.get(e,w),I=Ee.parent(e,w),T=w[w.length-1];I.children.splice(T,1);var E=L.transform(w,r),k=Ee.get(e,L.parent(E)),O=E[E.length-1];if(k.children.splice(O,0,N),t)for(var[S,P]of te.points(t))t[P]=at.transform(S,r);break}case"remove_node":{var{path:_}=r,H=_[_.length-1],z=Ee.parent(e,_);if(z.children.splice(H,1),t)for(var[q,V]of te.points(t)){var Z=at.transform(q,r);if(t!=null&&Z!=null)t[V]=Z;else{var ae=void 0,R=void 0;for(var[U,W]of Ee.texts(e))if(L.compare(W,_)===-1)ae=[U,W];else{R=[U,W];break}var K=!1;ae&&R&&(L.equals(R[1],_)?K=!L.hasPrevious(R[1]):K=L.common(ae[1],_).length<L.common(R[1],_).length),ae&&!K?(q.path=ae[1],q.offset=ae[0].text.length):R?(q.path=R[1],q.offset=0):t=null}}break}case"remove_text":{var{path:J,offset:Q,text:ee}=r;if(ee.length===0)break;var oe=Ee.leaf(e,J),re=oe.text.slice(0,Q),ne=oe.text.slice(Q+ee.length);if(oe.text=re+ne,t)for(var[de,ce]of te.points(t))t[ce]=at.transform(de,r);break}case"set_node":{var{path:Se,properties:We,newProperties:qe}=r;if(Se.length===0)throw new Error("Cannot set properties on the root node!");var ue=Ee.get(e,Se);for(var ve in qe){if(ve==="children"||ve==="text")throw new Error('Cannot set the "'.concat(ve,'" property of nodes!'));var we=qe[ve];we==null?delete ue[ve]:ue[ve]=we}for(var Le in We)qe.hasOwnProperty(Le)||delete ue[Le];break}case"set_selection":{var{newProperties:$e}=r;if($e==null)t=$e;else{if(t==null){if(!te.isRange($e))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Mt.stringify($e)," when there is no current selection."));t=ho({},$e)}for(var Oe in $e){var Qe=$e[Oe];if(Qe==null){if(Oe==="anchor"||Oe==="focus")throw new Error('Cannot remove the "'.concat(Oe,'" selection property'));delete t[Oe]}else t[Oe]=Qe}}break}case"split_node":{var{path:Ge,position:Re,properties:je}=r;if(Ge.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Ge,"] because the root node cannot be split."));var xe=Ee.get(e,Ge),ye=Ee.parent(e,Ge),_e=Ge[Ge.length-1],Ue;if(Pe.isText(xe)){var Ze=xe.text.slice(0,Re),Me=xe.text.slice(Re);xe.text=Ze,Ue=ho(ho({},je),{},{text:Me})}else{var vt=xe.children.slice(0,Re),Ye=xe.children.slice(Re);xe.children=vt,Ue=ho(ho({},je),{},{children:Ye})}if(ye.children.splice(_e+1,0,Ue),t)for(var[mt,Dt]of te.points(t))t[Dt]=at.transform(mt,r);break}}return t},Gy={transform(e,t){e.children=xc(e.children);var r=e.selection&&xc(e.selection);try{r=Vy(e,r,t)}finally{e.children=Dc(e.children),r?e.selection=yn(r)?Dc(r):r:e.selection=null}}},Yy={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},Xy={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},qp=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Vt(n)&&Vt(o)){if(!qp(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==o[a])return!1}else if(n!==o)return!1}for(var l in t)if(e[l]===void 0&&t[l]!==void 0)return!1;return!0};function Zy(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Ir(e,t){if(e==null)return{};var r=Zy(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Jy=["anchor","focus"];function Bc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Qy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var te={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return te.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=te.edges(e);return t},equals(e,t){return at.equals(e.anchor,t.anchor)&&at.equals(e.focus,t.focus)},includes(e,t){if(te.isRange(t)){if(te.includes(e,t.anchor)||te.includes(e,t.focus))return!0;var[r,n]=te.edges(e),[o,a]=te.edges(t);return at.isBefore(r,o)&&at.isAfter(n,a)}var[l,i]=te.edges(e),u=!1,s=!1;return at.isPoint(t)?(u=at.compare(t,l)>=0,s=at.compare(t,i)<=0):(u=L.compare(t,l.path)>=0,s=L.compare(t,i.path)<=0),u&&s},intersection(e,t){var r=Ir(e,Jy),[n,o]=te.edges(e),[a,l]=te.edges(t),i=at.isBefore(n,a)?a:n,u=at.isBefore(o,l)?o:l;return at.isBefore(u,i)?null:Qy({anchor:i,focus:u},r)},isBackward(e){var{anchor:t,focus:r}=e;return at.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return at.equals(t,r)},isExpanded(e){return!te.isCollapsed(e)},isForward(e){return!te.isBackward(e)},isRange(e){return Vt(e)&&at.isPoint(e.anchor)&&at.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=te.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ks(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,l;if(o==="inward"){var i=te.isCollapsed(n);te.isForward(n)?(a="forward",l=i?a:"backward"):(a="backward",l=i?a:"forward")}else o==="outward"?te.isForward(n)?(a="backward",l="forward"):(a="forward",l="backward"):(a=o,l=o);var u=at.transform(n.anchor,t,{affinity:a}),s=at.transform(n.focus,t,{affinity:l});if(!u||!s)return null;n.anchor=u,n.focus=s})}},Ac=e=>Vt(e)&&Ee.isNodeList(e.children)&&!D.isEditor(e),Te={isAncestor(e){return Vt(e)&&Ee.isNodeList(e.children)},isElement:Ac,isElementList(e){return Array.isArray(e)&&e.every(t=>Te.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Ac(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},eC=["children"],tC=["text"],$c=new WeakMap,Ee={ancestor(e,t){var r=Ee.get(e,t);if(Pe.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Mt.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of L.ancestors(t,r)){var o=Ee.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(Pe.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Mt.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Mt.stringify(e)));return r},children(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var{reverse:n=!1}=r,o=Ee.ancestor(e,t),{children:a}=o,l=n?a.length-1:0;n?l>=0:l<a.length;){var i=Ee.child(o,l),u=t.concat(l);yield[i,u],l=n?l-1:l+1}})()},common(e,t,r){var n=L.common(t,r),o=Ee.get(e,n);return[o,n]},descendant(e,t){var r=Ee.get(e,t);if(D.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Mt.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ee.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ee.nodes(e,t))Te.isElement(r)&&(yield[r,n])})()},extractProps(e){if(Te.isAncestor(e)){var t=Ir(e,eC);return t}else{var t=Ir(e,tC);return t}},first(e,t){for(var r=t.slice(),n=Ee.get(e,r);n&&!(Pe.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(Pe.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Mt.stringify(e)));var r=Ks({children:e.children},n=>{var[o,a]=te.edges(t),l=Ee.nodes(n,{reverse:!0,pass:d=>{var[,h]=d;return!te.includes(t,h)}});for(var[,i]of l){if(!te.includes(t,i)){var u=Ee.parent(n,i),s=i[i.length-1];u.children.splice(s,1)}if(L.equals(i,a.path)){var c=Ee.leaf(n,i);c.text=c.text.slice(0,a.offset)}if(L.equals(i,o.path)){var p=Ee.leaf(n,i);p.text=p.text.slice(o.offset)}}D.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Pe.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Mt.stringify(e)));r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Pe.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return Pe.isText(e)||Te.isElement(e)||D.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=$c.get(e);if(t!==void 0)return t;var r=e.every(n=>Ee.isNode(n));return $c.set(e,r),r},last(e,t){for(var r=t.slice(),n=Ee.get(e,r);n&&!(Pe.isText(n)||n.children.length===0);){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=Ee.get(e,t);if(!Pe.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Mt.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of L.levels(t,r)){var o=Ee.get(e,n);yield[o,n]}})()},matches(e,t){return Te.isElement(e)&&Te.isElementProps(t)&&Te.matches(e,t)||Pe.isText(e)&&Pe.isTextProps(t)&&Pe.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:a}=t,l=new Set,i=[],u=e;!(a&&(n?L.isBefore(i,a):L.isAfter(i,a)));){if(l.has(u)||(yield[u,i]),!l.has(u)&&!Pe.isText(u)&&u.children.length!==0&&(r==null||r([u,i])===!1)){l.add(u);var s=n?u.children.length-1:0;L.isAncestor(i,o)&&(s=o[i.length]),i=i.concat(s),u=Ee.get(e,i);continue}if(i.length===0)break;if(!n){var c=L.next(i);if(Ee.has(e,c)){i=c,u=Ee.get(e,i);continue}}if(n&&i[i.length-1]!==0){var p=L.previous(i);i=p,u=Ee.get(e,i);continue}i=L.parent(i),u=Ee.get(e,i),l.add(u)}})()},parent(e,t){var r=L.parent(t),n=Ee.get(e,r);if(Pe.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return Pe.isText(e)?e.text:e.children.map(Ee.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ee.nodes(e,t))Pe.isText(r)&&(yield[r,n])})()}};function Fc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var bo={isNodeOperation(e){return bo.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Vt(e))return!1;switch(e.type){case"insert_node":return L.isPath(e.path)&&Ee.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&L.isPath(e.path);case"merge_node":return typeof e.position=="number"&&L.isPath(e.path)&&Vt(e.properties);case"move_node":return L.isPath(e.path)&&L.isPath(e.newPath);case"remove_node":return L.isPath(e.path)&&Ee.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&L.isPath(e.path);case"set_node":return L.isPath(e.path)&&Vt(e.properties)&&Vt(e.newProperties);case"set_selection":return e.properties===null&&te.isRange(e.newProperties)||e.newProperties===null&&te.isRange(e.properties)||Vt(e.properties)&&Vt(e.newProperties);case"split_node":return L.isPath(e.path)&&typeof e.position=="number"&&Vt(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>bo.isOperation(t))},isSelectionOperation(e){return bo.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return bo.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Et(Et({},e),{},{type:"remove_node"});case"insert_text":return Et(Et({},e),{},{type:"remove_text"});case"merge_node":return Et(Et({},e),{},{type:"split_node",path:L.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(L.equals(t,r))return e;if(L.isSibling(r,t))return Et(Et({},e),{},{path:t,newPath:r});var n=L.transform(r,e),o=L.transform(L.next(r),e);return Et(Et({},e),{},{path:n,newPath:o})}case"remove_node":return Et(Et({},e),{},{type:"insert_node"});case"remove_text":return Et(Et({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:l}=e;return Et(Et({},e),{},{properties:l,newProperties:a})}case"set_selection":{var{properties:i,newProperties:u}=e;return i==null?Et(Et({},e),{},{properties:u,newProperties:null}):u==null?Et(Et({},e),{},{properties:null,newProperties:i}):Et(Et({},e),{},{properties:u,newProperties:i})}case"split_node":return Et(Et({},e),{},{type:"merge_node",path:L.next(e.path)})}}},Nc=new WeakMap,rC=e=>{var t=Nc.get(e);if(t!==void 0)return t;if(!Vt(e))return!1;var r=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Vt(e.marks))&&(e.selection===null||te.isRange(e.selection))&&Ee.isNodeList(e.children)&&bo.isOperationList(e.operations);return Nc.set(e,r),r},D={above(e,t){return e.above(t)},addMark(e,t,r){e.addMark(t,r)},after(e,t,r){return e.after(t,r)},before(e,t,r){return e.before(t,r)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,r){return e.isEdge(t,r)},isEditor(e){return rC(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,r){return e.isEnd(t,r)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,r){return e.isStart(t,r)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,r){return e.leaf(t,r)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,r){return e.node(t,r)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,r){return e.parent(t,r)},path(e,t,r){return e.path(t,r)},pathRef(e,t,r){return e.pathRef(t,r)},pathRefs(e){return e.pathRefs()},point(e,t,r){return e.point(t,r)},pointRef(e,t,r){return e.pointRef(t,r)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,r){return e.range(t,r)},rangeRef(e,t,r){return e.rangeRef(t,r)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,r){return e.string(t,r)},unhangRange(e,t,r){return e.unhangRange(t,r)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)},nC={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(L.isPath)}};function Oc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Pc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var at={compare(e,t){var r=L.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return at.compare(e,t)===1},isBefore(e,t){return at.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&L.equals(e.path,t.path)},isPoint(e){return Vt(e)&&typeof e.offset=="number"&&L.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ks(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:l}=n;switch(t.type){case"insert_node":case"move_node":{n.path=L.transform(a,t,r);break}case"insert_text":{L.equals(t.path,a)&&(t.offset<l||t.offset===l&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{L.equals(t.path,a)&&(n.offset+=t.position),n.path=L.transform(a,t,r);break}case"remove_text":{L.equals(t.path,a)&&t.offset<=l&&(n.offset-=Math.min(l-t.offset,t.text.length));break}case"remove_node":{if(L.equals(t.path,a)||L.isAncestor(t.path,a))return null;n.path=L.transform(a,t,r);break}case"split_node":{if(L.equals(t.path,a)){if(t.position===l&&o==null)return null;(t.position<l||t.position===l&&o==="forward")&&(n.offset-=t.position,n.path=L.transform(a,t,Pc(Pc({},r),{},{affinity:"forward"})))}else n.path=L.transform(a,t,r);break}}})}},Rc=void 0,Mt={setScrubber(e){Rc=e},stringify(e){return JSON.stringify(e,Rc)}},oC=["text"],aC=["anchor","focus"];function Tc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Pe={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var l=Ir(a,oC);return l}return qp(n?o(e):e,n?o(t):t)},isText(e){return Vt(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>Pe.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[Fr({},e)];for(var n of t){var o=Ir(n,aC),[a,l]=te.edges(n),i=[],u=0,s=a.offset,c=l.offset;for(var p of r){var{length:d}=p.text,h=u;if(u+=d,s<=h&&u<=c){Object.assign(p,o),i.push(p);continue}if(s!==c&&(s===u||c===h)||s>u||c<h||c===h&&h!==0){i.push(p);continue}var g=p,v=void 0,f=void 0;if(c<u){var b=c-h;f=Fr(Fr({},g),{},{text:g.text.slice(b)}),g=Fr(Fr({},g),{},{text:g.text.slice(0,b)})}if(s>h){var C=s-h;v=Fr(Fr({},g),{},{text:g.text.slice(0,C)}),g=Fr(Fr({},g),{},{text:g.text.slice(C)})}Object.assign(g,o),v&&i.push(v),i.push(g),f&&i.push(f)}r=i}return r}},Hs=e=>e.selection?e.selection:e.children.length>0?D.end(e,[]):[0],ro=(e,t)=>{var[r]=D.node(e,t);return n=>n===r},Ws=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?dC(e):e,o=Xe.None,a=Xe.None,l=0,i=null,u=null;for(var s of n){var c=s.codePointAt(0);if(!c)break;var p=wC(s,c);if([o,a]=r?[a,p]:[p,o],Pn(o,Xe.ZWJ)&&Pn(a,Xe.ExtPict)&&(r?i=Ic(e.substring(0,l)):i=Ic(e.substring(0,e.length-l)),!i)||Pn(o,Xe.RI)&&Pn(a,Xe.RI)&&(u!==null?u=!u:r?u=!0:u=AC(e.substring(0,e.length-l)),!u)||o!==Xe.None&&a!==Xe.None&&SC(o,a))break;l+=s.length}return l||1},iC=/\s/,lC=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,sC=/['\u2018\u2019]/,uC=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=Ws(e,t),[a,l]=qs(e,o,t);if(cC(a,l,t))n=!0,r+=o;else if(!n)r+=o;else break;e=l}return r},qs=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},cC=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(iC.test(t))return!1;if(sC.test(t)){var o=Ws(r,n),[a,l]=qs(r,o,n);if(e(a,l,n))return!0}return!lC.test(t)},dC=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(pC(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(fC(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},fC=e=>e>=55296&&e<=56319,pC=e=>e>=56320&&e<=57343,Xe;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(Xe||(Xe={}));var hC=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,gC=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,mC=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,vC=/^[\u1100-\u115F\uA960-\uA97C]$/,bC=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,yC=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,CC=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,xC=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,DC=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,wC=(e,t)=>{var r=Xe.Any;return e.search(hC)!==-1&&(r|=Xe.Extend),t===8205&&(r|=Xe.ZWJ),t>=127462&&t<=127487&&(r|=Xe.RI),e.search(gC)!==-1&&(r|=Xe.Prepend),e.search(mC)!==-1&&(r|=Xe.SpacingMark),e.search(vC)!==-1&&(r|=Xe.L),e.search(bC)!==-1&&(r|=Xe.V),e.search(yC)!==-1&&(r|=Xe.T),e.search(CC)!==-1&&(r|=Xe.LV),e.search(xC)!==-1&&(r|=Xe.LVT),e.search(DC)!==-1&&(r|=Xe.ExtPict),r};function Pn(e,t){return(e&t)!==0}var EC=[[Xe.L,Xe.L|Xe.V|Xe.LV|Xe.LVT],[Xe.LV|Xe.V,Xe.V|Xe.T],[Xe.LVT|Xe.T,Xe.T],[Xe.Any,Xe.Extend|Xe.ZWJ],[Xe.Any,Xe.SpacingMark],[Xe.Prepend,Xe.Any],[Xe.ZWJ,Xe.ExtPict],[Xe.RI,Xe.RI]];function SC(e,t){return EC.findIndex(r=>Pn(e,r[0])&&Pn(t,r[1]))===-1}var kC=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Ic=e=>e.search(kC)!==-1,BC=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,AC=e=>{var t=e.match(BC);if(t===null)return!1;var r=t[0].length/2;return r%2===1},$C={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=Hs(e)}=r;if(L.isPath(o)&&(o=D.range(e,o)),te.isRange(o))if(te.isCollapsed(o))o=o.anchor;else{var a=te.end(o);if(!n&&D.void(e,{at:a}))return;var l=te.start(o),i=D.pointRef(e,l),u=D.pointRef(e,a);ge.delete(e,{at:o,voids:n});var s=i.unref(),c=u.unref();o=s||c,ge.setSelection(e,{anchor:o,focus:o})}if(!(!n&&D.void(e,{at:o})||D.elementReadOnly(e,{at:o}))){var{path:p,offset:d}=o;t.length>0&&e.apply({type:"insert_text",path:p,offset:d,text:t})}})}};function jc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function la(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ge=la(la(la(la({},Gy),Yy),Xy),$C),wa=new WeakMap,FC=e=>wa.get(e)||!1,NC=(e,t,r)=>{var n=wa.get(e)||!1;wa.set(e,!0);try{t(),r()}finally{wa.set(e,n)}};function Up(e,t,r){var n=Va.get(e)||[],o=Ga.get(e)||new Set,a,l,i=p=>{if(p){var d=p.join(",");l.has(d)||(l.add(d),a.push(p))}};if(r){a=[],l=new Set;for(var u of n){var s=r(u);i(s)}}else a=n,l=o;for(var c of t)i(c);Va.set(e,a),Ga.set(e,l)}var OC=(e,t)=>{for(var r of D.pathRefs(e))Ky.transform(r,t);for(var n of D.pointRefs(e))Hy.transform(n,t);for(var o of D.rangeRefs(e))Wy.transform(o,t);if(!FC(e)){var a=L.operationCanTransformPath(t)?l=>L.transform(l,t):void 0;Up(e,e.getDirtyPaths(t),a)}ge.transform(e,t),e.operations.push(t),D.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Eo.get(e)||(Eo.set(e,!0),Promise.resolve().then(()=>{Eo.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},PC=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return L.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=L.levels(o),l=Pe.isText(n)?[]:Array.from(Ee.nodes(n),j=>{var[,N]=j;return o.concat(N)});return[...a,...l]}case"merge_node":{var{path:i}=t,u=L.ancestors(i),s=L.previous(i);return[...u,s]}case"move_node":{var{path:c,newPath:p}=t;if(L.equals(c,p))return[];var d=[],h=[];for(var g of L.ancestors(c)){var v=L.transform(g,t);d.push(v)}for(var f of L.ancestors(p)){var b=L.transform(f,t);h.push(b)}var C=h[h.length-1],y=p[p.length-1],x=C.concat(y);return[...d,...h,x]}case"remove_node":{var{path:B}=t,A=L.ancestors(B);return[...A]}case"split_node":{var{path:$}=t,F=L.levels($),w=L.next($);return[...F,w]}default:return[]}},RC=e=>{var{selection:t}=e;return t?Ee.fragment(e,t):[]},TC=(e,t)=>{var[r,n]=t;if(!Pe.isText(r)){if(Te.isElement(r)&&r.children.length===0){var o={text:""};ge.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=D.isEditor(r)?!1:Te.isElement(r)&&(e.isInline(r)||r.children.length===0||Pe.isText(r.children[0])||e.isInline(r.children[0])),l=0,i=0;i<r.children.length;i++,l++){var u=Ee.get(e,n);if(!Pe.isText(u)){var s=u.children[l],c=u.children[l-1],p=i===r.children.length-1,d=Pe.isText(s)||Te.isElement(s)&&e.isInline(s);if(d!==a)ge.removeNodes(e,{at:n.concat(l),voids:!0}),l--;else if(Te.isElement(s)){if(e.isInline(s)){if(c==null||!Pe.isText(c)){var h={text:""};ge.insertNodes(e,h,{at:n.concat(l),voids:!0}),l++}else if(p){var g={text:""};ge.insertNodes(e,g,{at:n.concat(l+1),voids:!0}),l++}}}else{if(!Pe.isText(s)&&!("children"in s)){var v=s;v.children=[]}c!=null&&Pe.isText(c)&&(Pe.equals(s,c,{loose:!0})?(ge.mergeNodes(e,{at:n.concat(l),voids:!0}),l--):c.text===""?(ge.removeNodes(e,{at:n.concat(l-1),voids:!0}),l--):s.text===""&&(ge.removeNodes(e,{at:n.concat(l),voids:!0}),l--))}}}}},IC=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,o=n*42;if(r>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},jC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:o=e.selection,match:a}=t;if(o){var l=D.path(e,o),i=n==="lowest";for(var[u,s]of D.levels(e,{at:l,voids:r,match:a,reverse:i}))if(!Pe.isText(u)){if(te.isRange(o)){if(L.isAncestor(s,o.anchor.path)&&L.isAncestor(s,o.focus.path))return[u,s]}else if(!L.equals(l,s))return[u,s]}}};function _c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Mc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_c(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_c(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _C=(e,t,r)=>{var{selection:n}=e;if(n){var o=(p,d)=>{if(!Pe.isText(p))return!1;var[h,g]=D.parent(e,d);return!e.isVoid(h)||e.markableVoid(h)},a=te.isExpanded(n),l=!1;if(!a){var[i,u]=D.node(e,n);if(i&&o(i,u)){var[s]=D.parent(e,u);l=s&&e.markableVoid(s)}}if(a||l)ge.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var c=Mc(Mc({},D.marks(e)||{}),{},{[t]:r});e.marks=c,Eo.get(e)||e.onChange()}}};function Lc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function zc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var MC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=D.point(e,t,{edge:"end"}),o=D.end(e,[]),a={anchor:n,focus:o},{distance:l=1}=r,i=0,u;for(var s of D.positions(e,zc(zc({},r),{},{at:a}))){if(i>l)break;i!==0&&(u=s),i++}return u};function Kc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Hc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var LC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=D.start(e,[]),o=D.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:l=1}=r,i=0,u;for(var s of D.positions(e,Hc(Hc({},r),{},{at:a,reverse:!0}))){if(i>l)break;i!==0&&(u=s),i++}return u},zC=(e,t)=>{var{selection:r}=e;r&&te.isCollapsed(r)&&ge.delete(e,{unit:t,reverse:!0})},KC=(e,t)=>{var{selection:r}=e;r&&te.isCollapsed(r)&&ge.delete(e,{unit:t})},HC=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&te.isExpanded(r)&&ge.delete(e,{reverse:t==="backward"})},WC=(e,t)=>[D.start(e,t),D.end(e,t)];function Wc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return D.above(e,qc(qc({},t),{},{match:r=>Te.isElement(r)&&D.isElementReadOnly(e,r)}))},UC=(e,t)=>D.point(e,t,{edge:"end"}),VC=(e,t)=>{var r=D.path(e,t,{edge:"start"});return D.node(e,r)},GC=(e,t)=>{var r=D.range(e,t);return Ee.fragment(e,r)};function Uc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var YC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return D.above(e,Vc(Vc({},t),{},{match:r=>Te.isElement(r)&&D.isVoid(e,r)}))},XC=(e,t)=>t.children.some(r=>Te.isElement(r)&&D.isBlock(e,r)),ZC=(e,t)=>t.children.some(r=>Pe.isText(r)||D.isInline(e,r)),JC=(e,t)=>Ee.has(e,t),QC=(e,t)=>t.children.every(r=>Pe.isText(r)),ex=e=>{ge.splitNodes(e,{always:!0})},tx=(e,t,r)=>{ge.insertNodes(e,t,r)},rx=e=>{ge.splitNodes(e,{always:!0})};function Gc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function nx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ox=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:o}=e;if(n){if(o){var a=nx({text:t},o);ge.insertNodes(e,a,{at:r.at,voids:r.voids})}else ge.insertText(e,t,r);e.marks=null}},ax=(e,t)=>!e.isInline(t),ix=(e,t,r)=>D.isStart(e,t,r)||D.isEnd(e,t,r),lx=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&Pe.isText(n)&&n.text===""&&!e.isVoid(t)},sx=(e,t,r)=>{var n=D.end(e,r);return at.equals(t,n)},ux=e=>{var t=Wp.get(e);return t===void 0?!0:t},cx=(e,t,r)=>{if(t.offset!==0)return!1;var n=D.start(e,r);return at.equals(t,n)},dx=(e,t)=>{var r=D.path(e,t,{edge:"end"});return D.node(e,r)},fx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=D.path(e,t,r),o=Ee.leaf(e,n);return[o,n]};function px(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:o=!1}=t,{match:a}=t;if(a==null&&(a=()=>!0),!!r){var l=[],i=D.path(e,r);for(var[u,s]of Ee.levels(e,i))if(a(u,s)&&(l.push([u,s]),!o&&Te.isElement(u)&&D.isVoid(e,u)))break;n&&l.reverse(),yield*l}})()}var hx=["text"],gx=["text"],mx=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(te.isExpanded(r)){var a=D.isEnd(e,n,n.path);if(a){var l=D.after(e,n);l&&(n=l)}var[i]=D.nodes(e,{match:Pe.isText,at:{anchor:n,focus:o}});if(i){var[u]=i,s=Ir(u,hx);return s}else return{}}var{path:c}=n,[p]=D.leaf(e,c);if(n.offset===0){var d=D.previous(e,{at:c,match:Pe.isText}),h=D.above(e,{match:y=>Te.isElement(y)&&D.isVoid(e,y)&&e.markableVoid(y)});if(!h){var g=D.above(e,{match:y=>Te.isElement(y)&&D.isBlock(e,y)});if(d&&g){var[v,f]=d,[,b]=g;L.isAncestor(b,f)&&(p=v)}}}var C=Ir(p,gx);return C},vx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var l=D.after(e,a,{voids:n});if(l){var[,i]=D.last(e,[]),u=[l.path,i];if(L.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(L.isPath(a)){var[s]=D.parent(e,a);o=p=>s.children.includes(p)}else o=()=>!0;var[c]=D.nodes(e,{at:u,match:o,mode:r,voids:n});return c}}},bx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=D.path(e,t,r),o=Ee.get(e,n);return[o,n]};function yx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:o=!1,reverse:a=!1,voids:l=!1,ignoreNonSelectable:i=!1}=t,{match:u}=t;if(u||(u=()=>!0),!!r){var s,c;if(nC.isSpan(r))s=r[0],c=r[1];else{var p=D.path(e,r,{edge:"start"}),d=D.path(e,r,{edge:"end"});s=a?d:p,c=a?p:d}var h=Ee.nodes(e,{reverse:a,from:s,to:c,pass:x=>{var[B]=x;return Te.isElement(B)?!!(!l&&(D.isVoid(e,B)||D.isElementReadOnly(e,B))||i&&!D.isSelectable(e,B)):!1}}),g=[],v;for(var[f,b]of h)if(!(i&&Te.isElement(f)&&!D.isSelectable(e,f))){var C=v&&L.compare(b,v[1])===0;if(!(n==="highest"&&C)){if(!u(f,b)){if(o&&!C&&Pe.isText(f))return;continue}if(n==="lowest"&&C){v=[f,b];continue}var y=n==="lowest"?v:[f,b];y&&(o?g.push(y):yield y),v=[f,b]}}n==="lowest"&&v&&(o?g.push(v):yield v),o&&(yield*g)}})()}var Cx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=s=>Va.get(s)||[],a=s=>Ga.get(s)||new Set,l=s=>{var c=o(s).pop(),p=c.join(",");return a(s).delete(p),c};if(D.isNormalizing(e)){if(r){var i=Array.from(Ee.nodes(e),s=>{var[,c]=s;return c}),u=new Set(i.map(s=>s.join(",")));Va.set(e,i),Ga.set(e,u)}o(e).length!==0&&D.withoutNormalizing(e,()=>{for(var s of o(e))if(Ee.has(e,s)){var c=D.node(e,s),[p,d]=c;Te.isElement(p)&&p.children.length===0&&e.normalizeNode(c,{operation:n})}for(var h=o(e),g=h.length,v=0;h.length!==0;){if(!e.shouldNormalize({dirtyPaths:h,iteration:v,initialDirtyPathsLength:g,operation:n}))return;var f=l(e);if(Ee.has(e,f)){var b=D.node(e,f);e.normalizeNode(b,{operation:n})}v++,h=o(e)}})}},xx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=D.path(e,t,r),o=L.parent(n),a=D.node(e,o);return a},Dx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=D.pathRefs(e);return i.delete(o),o.current=null,l}},a=D.pathRefs(e);return a.add(o),o},wx=e=>{var t=wc.get(e);return t||(t=new Set,wc.set(e,t)),t},Ex=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(L.isPath(t)){if(o==="start"){var[,a]=Ee.first(e,t);t=a}else if(o==="end"){var[,l]=Ee.last(e,t);t=l}}return te.isRange(t)&&(o==="start"?t=te.start(t):o==="end"?t=te.end(t):t=L.common(t.anchor.path,t.focus.path)),at.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},Sx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=D.pointRefs(e);return i.delete(o),o.current=null,l}},a=D.pointRefs(e);return a.add(o),o},kx=e=>{var t=Ec.get(e);return t||(t=new Set,Ec.set(e,t)),t},Bx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(L.isPath(t)){var o;if(n==="end"){var[,a]=Ee.last(e,t);o=a}else{var[,l]=Ee.first(e,t);o=l}var i=Ee.get(e,o);if(!Pe.isText(i))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:n==="end"?i.text.length:0}}if(te.isRange(t)){var[u,s]=te.edges(t);return n==="start"?u:s}return t};function Ax(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:o=!1,voids:a=!1,ignoreNonSelectable:l=!1}=t;if(!r)return;var i=D.range(e,r),[u,s]=te.edges(i),c=o?s:u,p=!1,d="",h=0,g=0,v=0;for(var[f,b]of D.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:l})){if(Te.isElement(f)){if(!a&&(e.isVoid(f)||e.isElementReadOnly(f))){yield D.start(e,b);continue}if(e.isInline(f))continue;if(D.hasInlines(e,f)){var C=L.isAncestor(b,s.path)?s:D.end(e,b),y=L.isAncestor(b,u.path)?u:D.start(e,b);d=D.string(e,{anchor:y,focus:C},{voids:a}),p=!0}}if(Pe.isText(f)){var x=L.equals(b,c.path);for(x?(g=o?c.offset:f.text.length-c.offset,v=c.offset):(g=f.text.length,v=o?g:0),(x||p||n==="offset")&&(yield{path:b,offset:v},p=!1);;){if(h===0){if(d==="")break;h=B(d,n,o),d=qs(d,h,o)[1]}if(v=o?v-h:v+h,g=g-h,g<0){h=-g;break}h=0,yield{path:b,offset:v}}}}function B(A,$,F){return $==="character"?Ws(A,F):$==="word"?uC(A,F):$==="line"||$==="block"?A.length:1}})()}var $x=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var l=D.before(e,a,{voids:n});if(l){var[,i]=D.first(e,[]),u=[l.path,i];if(L.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(L.isPath(a)){var[s]=D.parent(e,a);o=p=>s.children.includes(p)}else o=()=>!0;var[c]=D.nodes(e,{reverse:!0,at:u,match:o,mode:r,voids:n});return c}}},Fx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=D.rangeRefs(e);return i.delete(o),o.current=null,l}},a=D.rangeRefs(e);return a.add(o),o},Nx=e=>{var t=Sc.get(e);return t||(t=new Set,Sc.set(e,t)),t},Ox=(e,t,r)=>{if(te.isRange(t)&&!r)return t;var n=D.start(e,t),o=D.end(e,r||t);return{anchor:n,focus:o}};function Yc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Px(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rx=(e,t)=>{var{selection:r}=e;if(r){var n=(c,p)=>{if(!Pe.isText(c))return!1;var[d,h]=D.parent(e,p);return!e.isVoid(d)||e.markableVoid(d)},o=te.isExpanded(r),a=!1;if(!o){var[l,i]=D.node(e,r);if(l&&n(l,i)){var[u]=D.parent(e,i);a=u&&e.markableVoid(u)}}if(o||a)ge.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var s=Px({},D.marks(e)||{});delete s[t],e.marks=s,Eo.get(e)||e.onChange()}}},Tx=(e,t)=>{Wp.set(e,t)},Ix=(e,t)=>D.point(e,t,{edge:"start"}),jx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=D.range(e,t),[a,l]=te.edges(o),i="";for(var[u,s]of D.nodes(e,{at:o,match:Pe.isText,voids:n})){var c=u.text;L.equals(s,l.path)&&(c=c.slice(0,l.offset)),L.equals(s,a.path)&&(c=c.slice(a.offset)),i+=c}return i},_x=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,a]=te.edges(t);if(o.offset!==0||a.offset!==0||te.isCollapsed(t)||L.hasPrevious(a.path))return t;var l=D.above(e,{at:a,match:h=>Te.isElement(h)&&D.isBlock(e,h),voids:n}),i=l?l[1]:[],u=D.start(e,o),s={anchor:u,focus:a},c=!0;for(var[p,d]of D.nodes(e,{at:s,match:Pe.isText,reverse:!0,voids:n})){if(c){c=!1;continue}if(p.text!==""||L.isBefore(d,i)){a={path:d,offset:p.text.length};break}}return{anchor:o,focus:a}},Mx=(e,t)=>{var r=D.isNormalizing(e);D.setNormalizing(e,!1);try{t()}finally{D.setNormalizing(e,r)}D.normalize(e)},Lx=(e,t,r)=>{var[n,o]=t;return Te.isElement(n)&&D.isEmpty(e,n)||Pe.isText(n)&&n.text===""&&o[o.length-1]!==0},zx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:l=1,voids:i=!1}=t,{at:u=e.selection,hanging:s=!1}=t;if(u){var c=!1;if(te.isRange(u)&&te.isCollapsed(u)&&(c=!0,u=u.anchor),at.isPoint(u)){var p=D.void(e,{at:u,mode:"highest"});if(!i&&p){var[,d]=p;u=d}else{var h={unit:a,distance:l},g=o?D.before(e,u,h)||D.start(e,[]):D.after(e,u,h)||D.end(e,[]);u={anchor:u,focus:g},s=!0}}if(L.isPath(u)){ge.removeNodes(e,{at:u,voids:i});return}if(!te.isCollapsed(u)){if(!s){var[,v]=te.edges(u),f=D.end(e,[]);at.equals(v,f)||(u=D.unhangRange(e,u,{voids:i}))}var[b,C]=te.edges(u),y=D.above(e,{match:oe=>Te.isElement(oe)&&D.isBlock(e,oe),at:b,voids:i}),x=D.above(e,{match:oe=>Te.isElement(oe)&&D.isBlock(e,oe),at:C,voids:i}),B=y&&x&&!L.equals(y[1],x[1]),A=L.equals(b.path,C.path),$=i?null:(r=D.void(e,{at:b,mode:"highest"}))!==null&&r!==void 0?r:D.elementReadOnly(e,{at:b,mode:"highest"}),F=i?null:(n=D.void(e,{at:C,mode:"highest"}))!==null&&n!==void 0?n:D.elementReadOnly(e,{at:C,mode:"highest"});if($){var w=D.before(e,b);w&&y&&L.isAncestor(y[1],w.path)&&(b=w)}if(F){var j=D.after(e,C);j&&x&&L.isAncestor(x[1],j.path)&&(C=j)}var N=[],I;for(var T of D.nodes(e,{at:u,voids:i})){var[E,k]=T;I&&L.compare(k,I)===0||(!i&&Te.isElement(E)&&(D.isVoid(e,E)||D.isElementReadOnly(e,E))||!L.isCommon(k,b.path)&&!L.isCommon(k,C.path))&&(N.push(T),I=k)}var O=Array.from(N,oe=>{var[,re]=oe;return D.pathRef(e,re)}),S=D.pointRef(e,b),P=D.pointRef(e,C),_="";if(!A&&!$){var H=S.current,[z]=D.leaf(e,H),{path:q}=H,{offset:V}=b,Z=z.text.slice(V);Z.length>0&&(e.apply({type:"remove_text",path:q,offset:V,text:Z}),_=Z)}if(O.reverse().map(oe=>oe.unref()).filter(oe=>oe!==null).forEach(oe=>ge.removeNodes(e,{at:oe,voids:i})),!F){var ae=P.current,[R]=D.leaf(e,ae),{path:U}=ae,W=A?b.offset:0,K=R.text.slice(W,C.offset);K.length>0&&(e.apply({type:"remove_text",path:U,offset:W,text:K}),_=K)}!A&&B&&P.current&&S.current&&ge.mergeNodes(e,{at:P.current,hanging:!0,voids:i}),c&&o&&a==="character"&&_.length>1&&_.match(/[\u0E00-\u0E7F]+/)&&ge.insertText(e,_.slice(0,_.length-l));var J=S.unref(),Q=P.unref(),ee=o?J||Q:Q||J;t.at==null&&ee&&ge.select(e,ee)}}})},Kx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=Hs(e),batchDirty:l=!0}=r;if(t.length){if(te.isRange(a))if(n||(a=D.unhangRange(e,a,{voids:o})),te.isCollapsed(a))a=a.anchor;else{var[,i]=te.edges(a);if(!o&&D.void(e,{at:i}))return;var u=D.pointRef(e,i);ge.delete(e,{at:a}),a=u.unref()}else L.isPath(a)&&(a=D.start(e,a));if(!(!o&&D.void(e,{at:a}))){var s=D.above(e,{at:a,match:Z=>Te.isElement(Z)&&D.isInline(e,Z),mode:"highest",voids:o});if(s){var[,c]=s;if(D.isEnd(e,a,c)){var p=D.after(e,c);a=p}else if(D.isStart(e,a,c)){var d=D.before(e,c);a=d}}var h=D.above(e,{match:Z=>Te.isElement(Z)&&D.isBlock(e,Z),at:a,voids:o}),[,g]=h,v=D.isStart(e,a,g),f=D.isEnd(e,a,g),b=v&&f,C=!v||v&&f,y=!f,[,x]=Ee.first({children:t},[]),[,B]=Ee.last({children:t},[]),A=[],$=Z=>{var[ae,R]=Z,U=R.length===0;return U?!1:b?!0:!(C&&L.isAncestor(R,x)&&Te.isElement(ae)&&!e.isVoid(ae)&&!e.isInline(ae)||y&&L.isAncestor(R,B)&&Te.isElement(ae)&&!e.isVoid(ae)&&!e.isInline(ae))};for(var F of Ee.nodes({children:t},{pass:$}))$(F)&&A.push(F);var w=[],j=[],N=[],I=!0,T=!1;for(var[E]of A)Te.isElement(E)&&!e.isInline(E)?(I=!1,T=!0,j.push(E)):I?w.push(E):N.push(E);var[k]=D.nodes(e,{at:a,match:Z=>Pe.isText(Z)||D.isInline(e,Z),mode:"highest",voids:o}),[,O]=k,S=D.isStart(e,a,O),P=D.isEnd(e,a,O),_=D.pathRef(e,f&&!N.length?L.next(g):g),H=D.pathRef(e,P?L.next(O):O);ge.splitNodes(e,{at:a,match:Z=>T?Te.isElement(Z)&&D.isBlock(e,Z):Pe.isText(Z)||D.isInline(e,Z),mode:T?"lowest":"highest",always:T&&(!v||w.length>0)&&(!f||N.length>0),voids:o});var z=D.pathRef(e,!S||S&&P?L.next(O):O);if(ge.insertNodes(e,w,{at:z.current,match:Z=>Pe.isText(Z)||D.isInline(e,Z),mode:"highest",voids:o,batchDirty:l}),b&&!w.length&&j.length&&!N.length&&ge.delete(e,{at:g,voids:o}),ge.insertNodes(e,j,{at:_.current,match:Z=>Te.isElement(Z)&&D.isBlock(e,Z),mode:"lowest",voids:o,batchDirty:l}),ge.insertNodes(e,N,{at:H.current,match:Z=>Pe.isText(Z)||D.isInline(e,Z),mode:"highest",voids:o,batchDirty:l}),!r.at){var q;if(N.length>0&&H.current?q=L.previous(H.current):j.length>0&&_.current?q=L.previous(_.current):z.current&&(q=L.previous(z.current)),q){var V=D.end(e,q);ge.select(e,V)}}z.unref(),_.unref(),H.unref()}}})},Hx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")ge.select(e,n.anchor);else if(r==="focus")ge.select(e,n.focus);else if(r==="start"){var[o]=te.edges(n);ge.select(e,o)}else if(r==="end"){var[,a]=te.edges(n);ge.select(e,a)}}else return},Wx=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},qx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:o="character",reverse:a=!1}=t,{edge:l=null}=t;if(r){l==="start"&&(l=te.isBackward(r)?"focus":"anchor"),l==="end"&&(l=te.isBackward(r)?"anchor":"focus");var{anchor:i,focus:u}=r,s={distance:n,unit:o,ignoreNonSelectable:!0},c={};if(l==null||l==="anchor"){var p=a?D.before(e,i,s):D.after(e,i,s);p&&(c.anchor=p)}if(l==null||l==="focus"){var d=a?D.before(e,u,s):D.after(e,u,s);d&&(c.focus=d)}ge.setSelection(e,c)}},Ux=(e,t)=>{var{selection:r}=e;if(t=D.range(e,t),r){ge.setSelection(e,t);return}if(!te.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Mt.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function Xc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Zc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Vx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:o="both"}=r;if(n){o==="start"&&(o=te.isBackward(n)?"focus":"anchor"),o==="end"&&(o=te.isBackward(n)?"anchor":"focus");var{anchor:a,focus:l}=n,i=o==="anchor"?a:l;ge.setSelection(e,{[o==="anchor"?"anchor":"focus"]:Zc(Zc({},i),t)})}},Gx=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!at.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!at.equals(t.focus,r.focus)||a!=="anchor"&&a!=="focus"&&t[a]!==r[a])&&(n[a]=r[a],o[a]=t[a]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}},Yx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:l=!0}=r,{at:i,match:u,select:s}=r;if(Ee.isNode(t)&&(t=[t]),t.length!==0){var[c]=t;if(i||(i=Hs(e),s!==!1&&(s=!0)),s==null&&(s=!1),te.isRange(i))if(n||(i=D.unhangRange(e,i,{voids:o})),te.isCollapsed(i))i=i.anchor;else{var[,p]=te.edges(i),d=D.pointRef(e,p);ge.delete(e,{at:i}),i=d.unref()}if(at.isPoint(i)){u==null&&(Pe.isText(c)?u=w=>Pe.isText(w):e.isInline(c)?u=w=>Pe.isText(w)||D.isInline(e,w):u=w=>Te.isElement(w)&&D.isBlock(e,w));var[h]=D.nodes(e,{at:i.path,match:u,mode:a,voids:o});if(h){var[,g]=h,v=D.pathRef(e,g),f=D.isEnd(e,i,g);ge.splitNodes(e,{at:i,match:u,mode:a,voids:o});var b=v.unref();i=f?L.next(b):b}else return}var C=L.parent(i),y=i[i.length-1];if(!(!o&&D.void(e,{at:C}))){if(l){var x=[],B=L.levels(C);NC(e,()=>{var w=function(){var N=C.concat(y);y++;var I={type:"insert_node",path:N,node:j};e.apply(I),i=L.next(i),x.push(I),Pe.isText?B.push(...Array.from(Ee.nodes(j),T=>{var[,E]=T;return N.concat(E)})):B.push(N)};for(var j of t)w()},()=>{Up(e,B,w=>{var j=w;for(var N of x)if(L.operationCanTransformPath(N)&&(j=L.transform(j,N),!j))return null;return j})})}else for(var A of t){var $=C.concat(y);y++,e.apply({type:"insert_node",path:$,node:A}),i=L.next(i)}if(i=L.previous(i),s){var F=D.end(e,i);F&&ge.select(e,F)}}}})},Xx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=L.isPath(r)?ro(e,r):y=>Te.isElement(y)&&D.isBlock(e,y)),!!r){var l=D.nodes(e,{at:r,match:a,mode:n,voids:o}),i=Array.from(l,y=>{var[,x]=y;return D.pathRef(e,x)});for(var u of i){var s=u.unref();if(s.length<2)throw new Error("Cannot lift node at a path [".concat(s,"] because it has a depth of less than `2`."));var c=D.node(e,L.parent(s)),[p,d]=c,h=s[s.length-1],{length:g}=p.children;if(g===1){var v=L.next(d);ge.moveNodes(e,{at:s,to:v,voids:o}),ge.removeNodes(e,{at:d,voids:o})}else if(h===0)ge.moveNodes(e,{at:s,to:d,voids:o});else if(h===g-1){var f=L.next(d);ge.moveNodes(e,{at:s,to:f,voids:o})}else{var b=L.next(s),C=L.next(d);ge.splitNodes(e,{at:b,voids:o}),ge.moveNodes(e,{at:s,to:C,voids:o})}}}})},Zx=["text"],Jx=["children"],Vp=(e,t)=>{if(Te.isElement(t)){var r=t;return D.isVoid(e,t)?!0:r.children.length===1?Vp(e,r.children[0]):!1}else return!D.isEditor(t)},Qx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:l="lowest"}=t;if(n){if(r==null)if(L.isPath(n)){var[i]=D.parent(e,n);r=w=>i.children.includes(w)}else r=w=>Te.isElement(w)&&D.isBlock(e,w);if(!o&&te.isRange(n)&&(n=D.unhangRange(e,n,{voids:a})),te.isRange(n))if(te.isCollapsed(n))n=n.anchor;else{var[,u]=te.edges(n),s=D.pointRef(e,u);ge.delete(e,{at:n}),n=s.unref(),t.at==null&&ge.select(e,n)}var[c]=D.nodes(e,{at:n,match:r,voids:a,mode:l}),p=D.previous(e,{at:n,match:r,voids:a,mode:l});if(!(!c||!p)){var[d,h]=c,[g,v]=p;if(!(h.length===0||v.length===0)){var f=L.next(v),b=L.common(h,v),C=L.isSibling(h,v),y=Array.from(D.levels(e,{at:h}),w=>{var[j]=w;return j}).slice(b.length).slice(0,-1),x=D.above(e,{at:h,mode:"highest",match:w=>y.includes(w)&&Vp(e,w)}),B=x&&D.pathRef(e,x[1]),A,$;if(Pe.isText(d)&&Pe.isText(g)){var F=Ir(d,Zx);$=g.text.length,A=F}else if(Te.isElement(d)&&Te.isElement(g)){var F=Ir(d,Jx);$=g.children.length,A=F}else throw new Error("Cannot merge the node at path [".concat(h,"] with the previous sibling because it is not the same kind: ").concat(Mt.stringify(d)," ").concat(Mt.stringify(g)));C||ge.moveNodes(e,{at:h,to:f,voids:a}),B&&ge.removeNodes(e,{at:B.current,voids:a}),D.shouldMergeNodesRemovePrevNode(e,p,c)?ge.removeNodes(e,{at:v,voids:a}):e.apply({type:"merge_node",path:f,position:$,properties:A}),B&&B.unref()}}}})},e1=(e,t)=>{D.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:l}=t;if(n){l==null&&(l=L.isPath(n)?ro(e,n):h=>Te.isElement(h)&&D.isBlock(e,h));var i=D.pathRef(e,r),u=D.nodes(e,{at:n,match:l,mode:o,voids:a}),s=Array.from(u,h=>{var[,g]=h;return D.pathRef(e,g)});for(var c of s){var p=c.unref(),d=i.current;p.length!==0&&e.apply({type:"move_node",path:p,newPath:d}),i.current&&L.isSibling(d,p)&&L.isAfter(d,p)&&(i.current=L.next(i.current))}i.unref()}})},t1=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:l}=t;if(a){l==null&&(l=L.isPath(a)?ro(e,a):d=>Te.isElement(d)&&D.isBlock(e,d)),!r&&te.isRange(a)&&(a=D.unhangRange(e,a,{voids:n}));var i=D.nodes(e,{at:a,match:l,mode:o,voids:n}),u=Array.from(i,d=>{var[,h]=d;return D.pathRef(e,h)});for(var s of u){var c=s.unref();if(c){var[p]=D.node(e,c);e.apply({type:"remove_node",path:c,node:p})}}}})},r1=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:l}=r,{hanging:i=!1,mode:u="lowest",split:s=!1,voids:c=!1}=r;if(o){if(n==null&&(n=L.isPath(o)?ro(e,o):$=>Te.isElement($)&&D.isBlock(e,$)),!i&&te.isRange(o)&&(o=D.unhangRange(e,o,{voids:c})),s&&te.isRange(o)){if(te.isCollapsed(o)&&D.leaf(e,o.anchor)[0].text.length>0)return;var p=D.rangeRef(e,o,{affinity:"inward"}),[d,h]=te.edges(o),g=u==="lowest"?"lowest":"highest",v=D.isEnd(e,h,h.path);ge.splitNodes(e,{at:h,match:n,mode:g,voids:c,always:!v});var f=D.isStart(e,d,d.path);ge.splitNodes(e,{at:d,match:n,mode:g,voids:c,always:!f}),o=p.unref(),r.at==null&&ge.select(e,o)}a||(a=($,F)=>$!==F);for(var[b,C]of D.nodes(e,{at:o,match:n,mode:u,voids:c})){var y={},x={};if(C.length!==0){var B=!1;for(var A in t)A==="children"||A==="text"||a(t[A],b[A])&&(B=!0,b.hasOwnProperty(A)&&(y[A]=b[A]),l?t[A]!=null&&(x[A]=l(b[A],t[A])):t[A]!=null&&(x[A]=t[A]));B&&e.apply({type:"set_node",path:C,properties:y,newProperties:x})}}}})},n1=(e,t)=>{if(te.isCollapsed(t))return t.anchor;var[,r]=te.edges(t),n=D.pointRef(e,r);return ge.delete(e,{at:t}),n.unref()},o1=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:l=0,always:i=!1}=t;if(o==null&&(o=P=>Te.isElement(P)&&D.isBlock(e,P)),te.isRange(a)&&(a=n1(e,a)),L.isPath(a)){var u=a,s=D.point(e,u),[c]=D.parent(e,u);o=P=>P===c,l=s.path.length-u.length+1,a=s,i=!0}if(a){var p=D.pointRef(e,a,{affinity:"backward"}),d;try{var[h]=D.nodes(e,{at:a,match:o,mode:r,voids:n});if(!h)return;var g=D.void(e,{at:a,mode:"highest"}),v=0;if(!n&&g){var[f,b]=g;if(Te.isElement(f)&&e.isInline(f)){var C=D.after(e,b);if(!C){var y={text:""},x=L.next(b);ge.insertNodes(e,y,{at:x,voids:n}),C=D.point(e,x)}a=C,i=!0}var B=a.path.length-b.length;l=B+1,i=!0}d=D.pointRef(e,a);var A=a.path.length-l,[,$]=h,F=a.path.slice(0,A),w=l===0?a.offset:a.path[A]+v;for(var[j,N]of D.levels(e,{at:F,reverse:!0,voids:n})){var I=!1;if(N.length<$.length||N.length===0||!n&&Te.isElement(j)&&D.isVoid(e,j))break;var T=p.current,E=D.isEnd(e,T,N);if(i||!p||!D.isEdge(e,T,N)){I=!0;var k=Ee.extractProps(j);e.apply({type:"split_node",path:N,position:w,properties:k})}w=N[N.length-1]+(I||E?1:0)}if(t.at==null){var O=d.current||D.end(e,[]);ge.select(e,O)}}finally{var S;p.unref(),(S=d)===null||S===void 0||S.unref()}}})},a1=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var o of t)n[o]=null;ge.setNodes(e,n,r)},i1=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};D.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:l}=t;if(a){l==null&&(l=L.isPath(a)?ro(e,a):d=>Te.isElement(d)&&D.isBlock(e,d)),L.isPath(a)&&(a=D.range(e,a));var i=te.isRange(a)?D.rangeRef(e,a):null,u=D.nodes(e,{at:a,match:l,mode:r,voids:o}),s=Array.from(u,d=>{var[,h]=d;return D.pathRef(e,h)}).reverse(),c=function(){var d=p.unref(),[h]=D.node(e,d),g=D.range(e,d);n&&i&&(g=te.intersection(i.current,g)),ge.liftNodes(e,{at:g,match:v=>Te.isAncestor(h)&&h.children.includes(v),voids:o})};for(var p of s)c();i&&i.unref()}})};function Jc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Qc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var l1=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};D.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:l,at:i=e.selection}=r;if(i){if(l==null&&(L.isPath(i)?l=ro(e,i):e.isInline(t)?l=g=>Te.isElement(g)&&D.isInline(e,g)||Pe.isText(g):l=g=>Te.isElement(g)&&D.isBlock(e,g)),o&&te.isRange(i)){var[u,s]=te.edges(i),c=D.rangeRef(e,i,{affinity:"inward"});ge.splitNodes(e,{at:s,match:l,voids:a}),ge.splitNodes(e,{at:u,match:l,voids:a}),i=c.unref(),r.at==null&&ge.select(e,i)}var p=Array.from(D.nodes(e,{at:i,match:e.isInline(t)?g=>Te.isElement(g)&&D.isBlock(e,g):g=>D.isEditor(g),mode:"lowest",voids:a})),d=function(){var g=te.isRange(i)?te.intersection(i,D.range(e,h)):i;if(!g)return 0;var v=Array.from(D.nodes(e,{at:g,match:l,mode:n,voids:a}));if(v.length>0){var[f]=v,b=v[v.length-1],[,C]=f,[,y]=b;if(C.length===0&&y.length===0)return 0;var x=L.equals(C,y)?L.parent(C):L.common(C,y),B=D.range(e,C,y),A=D.node(e,x),[$]=A,F=x.length+1,w=L.next(y.slice(0,F)),j=Qc(Qc({},t),{},{children:[]});ge.insertNodes(e,j,{at:w,voids:a}),ge.moveNodes(e,{at:B,match:N=>Te.isAncestor($)&&$.children.includes(N),to:w.concat(0),voids:a})}};for(var[,h]of p)d()}})},s1=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return OC(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _C(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zC(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return KC(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return HC(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return RC(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ex(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rx(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kx(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tx(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ox(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return TC(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Rx(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return PC(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return IC(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jC(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return MC(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return LC(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hx(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zx(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wx(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return WC(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qC(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return UC(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return VC(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return GC(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mx(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return XC(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ZC(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return JC(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return QC(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yx(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ax(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ix(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lx(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sx(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ux(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cx(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dx(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fx(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return px(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xx(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qx(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qx(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e1(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vx(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bx(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yx(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cx(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xx(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ex(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dx(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wx(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bx(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sx(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kx(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ax(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $x(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ox(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fx(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Nx(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return t1(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ux(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r1(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tx(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vx(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gx(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o1(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ix(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jx(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _x(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a1(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i1(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return YC(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mx(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return l1(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lx(e,...r)}};return e},Wi,ed;function u1(){if(ed)return Wi;ed=1,Wi=o;var e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",t="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",r=new RegExp("^[^"+t+"]*["+e+"]"),n=new RegExp("^[^"+e+"]*["+t+"]");function o(a){return a=String(a||""),r.test(a)?"rtl":n.test(a)?"ltr":"neutral"}return Wi}var c1=u1();const Gp=hi(c1);var qi,td;function Us(){if(td)return qi;td=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return qi=e,qi}var Ui,rd;function d1(){if(rd)return Ui;rd=1;var e=typeof aa=="object"&&aa&&aa.Object===Object&&aa;return Ui=e,Ui}var Vi,nd;function Yp(){if(nd)return Vi;nd=1;var e=d1(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Vi=r,Vi}var Gi,od;function f1(){if(od)return Gi;od=1;var e=Yp(),t=function(){return e.Date.now()};return Gi=t,Gi}var Yi,ad;function p1(){if(ad)return Yi;ad=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Yi=t,Yi}var Xi,id;function h1(){if(id)return Xi;id=1;var e=p1(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Xi=r,Xi}var Zi,ld;function Xp(){if(ld)return Zi;ld=1;var e=Yp(),t=e.Symbol;return Zi=t,Zi}var Ji,sd;function g1(){if(sd)return Ji;sd=1;var e=Xp(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(l){var i=r.call(l,o),u=l[o];try{l[o]=void 0;var s=!0}catch{}var c=n.call(l);return s&&(i?l[o]=u:delete l[o]),c}return Ji=a,Ji}var Qi,ud;function m1(){if(ud)return Qi;ud=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Qi=r,Qi}var el,cd;function v1(){if(cd)return el;cd=1;var e=Xp(),t=g1(),r=m1(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function l(i){return i==null?i===void 0?o:n:a&&a in Object(i)?t(i):r(i)}return el=l,el}var tl,dd;function b1(){if(dd)return tl;dd=1;function e(t){return t!=null&&typeof t=="object"}return tl=e,tl}var rl,fd;function y1(){if(fd)return rl;fd=1;var e=v1(),t=b1(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return rl=n,rl}var nl,pd;function C1(){if(pd)return nl;pd=1;var e=h1(),t=Us(),r=y1(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,i=parseInt;function u(s){if(typeof s=="number")return s;if(r(s))return n;if(t(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=t(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=e(s);var p=a.test(s);return p||l.test(s)?i(s.slice(2),p?2:8):o.test(s)?n:+s}return nl=u,nl}var ol,hd;function Zp(){if(hd)return ol;hd=1;var e=Us(),t=f1(),r=C1(),n="Expected a function",o=Math.max,a=Math.min;function l(i,u,s){var c,p,d,h,g,v,f=0,b=!1,C=!1,y=!0;if(typeof i!="function")throw new TypeError(n);u=r(u)||0,e(s)&&(b=!!s.leading,C="maxWait"in s,d=C?o(r(s.maxWait)||0,u):d,y="trailing"in s?!!s.trailing:y);function x(T){var E=c,k=p;return c=p=void 0,f=T,h=i.apply(k,E),h}function B(T){return f=T,g=setTimeout(F,u),b?x(T):h}function A(T){var E=T-v,k=T-f,O=u-E;return C?a(O,d-k):O}function $(T){var E=T-v,k=T-f;return v===void 0||E>=u||E<0||C&&k>=d}function F(){var T=t();if($(T))return w(T);g=setTimeout(F,A(T))}function w(T){return g=void 0,y&&c?x(T):(c=p=void 0,h)}function j(){g!==void 0&&clearTimeout(g),f=0,c=v=p=g=void 0}function N(){return g===void 0?h:w(t())}function I(){var T=t(),E=$(T);if(c=arguments,p=this,v=T,E){if(g===void 0)return B(v);if(C)return clearTimeout(g),g=setTimeout(F,u),x(v)}return g===void 0&&(g=setTimeout(F,u)),h}return I.cancel=j,I.flush=N,I}return ol=l,ol}var x1=Zp();const D1=hi(x1);var al,gd;function w1(){if(gd)return al;gd=1;var e=Zp(),t=Us(),r="Expected a function";function n(o,a,l){var i=!0,u=!0;if(typeof o!="function")throw new TypeError(r);return t(l)&&(i="leading"in l?!!l.leading:i,u="trailing"in l?!!l.trailing:u),e(o,a,{leading:i,maxWait:a,trailing:u})}return al=n,al}var E1=w1();const S1=hi(E1),md=e=>typeof e=="object"&&e!=null&&e.nodeType===1,vd=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",sa=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return vd(r.overflowY,t)||vd(r.overflowX,t)||(n=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},ua=(e,t,r,n,o,a,l,i)=>a<e&&l>t||a>e&&l<t?0:a<=e&&i<=r||l>=t&&i>=r?a-e-n:l>t&&i<r||a<e&&i>r?l-t+o:0,k1=e=>e.parentElement??(e.getRootNode().host||null),bd=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:l,block:i,inline:u,boundary:s,skipOverflowHiddenElements:c}=t,p=typeof s=="function"?s:O=>O!==s;if(!md(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let g=e;for(;md(g)&&p(g);){if(g=k1(g),g===d){h.push(g);break}g!=null&&g===document.body&&sa(g)&&!sa(document.documentElement)||g!=null&&sa(g,c)&&h.push(g)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,f=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:b,scrollY:C}=window,{height:y,width:x,top:B,right:A,bottom:$,left:F}=e.getBoundingClientRect(),{top:w,right:j,bottom:N,left:I}=(O=>{const S=window.getComputedStyle(O);return{top:parseFloat(S.scrollMarginTop)||0,right:parseFloat(S.scrollMarginRight)||0,bottom:parseFloat(S.scrollMarginBottom)||0,left:parseFloat(S.scrollMarginLeft)||0}})(e);let T=i==="start"||i==="nearest"?B-w:i==="end"?$+N:B+y/2-w+N,E=u==="center"?F+x/2-I+j:u==="end"?A+j:F-I;const k=[];for(let O=0;O<h.length;O++){const S=h[O],{height:P,width:_,top:H,right:z,bottom:q,left:V}=S.getBoundingClientRect();if(l==="if-needed"&&B>=0&&F>=0&&$<=f&&A<=v&&(S===d&&!sa(S)||B>=H&&$<=q&&F>=V&&A<=z))return k;const Z=getComputedStyle(S),ae=parseInt(Z.borderLeftWidth,10),R=parseInt(Z.borderTopWidth,10),U=parseInt(Z.borderRightWidth,10),W=parseInt(Z.borderBottomWidth,10);let K=0,J=0;const Q="offsetWidth"in S?S.offsetWidth-S.clientWidth-ae-U:0,ee="offsetHeight"in S?S.offsetHeight-S.clientHeight-R-W:0,oe="offsetWidth"in S?S.offsetWidth===0?0:_/S.offsetWidth:0,re="offsetHeight"in S?S.offsetHeight===0?0:P/S.offsetHeight:0;if(d===S)K=i==="start"?T:i==="end"?T-f:i==="nearest"?ua(C,C+f,f,R,W,C+T,C+T+y,y):T-f/2,J=u==="start"?E:u==="center"?E-v/2:u==="end"?E-v:ua(b,b+v,v,ae,U,b+E,b+E+x,x),K=Math.max(0,K+C),J=Math.max(0,J+b);else{K=i==="start"?T-H-R:i==="end"?T-q+W+ee:i==="nearest"?ua(H,q,P,R,W+ee,T,T+y,y):T-(H+P/2)+ee/2,J=u==="start"?E-V-ae:u==="center"?E-(V+_/2)+Q/2:u==="end"?E-z+U+Q:ua(V,z,_,ae,U+Q,E,E+x,x);const{scrollLeft:ne,scrollTop:de}=S;K=re===0?0:Math.max(0,Math.min(de+K/re,S.scrollHeight-P/re+ee)),J=oe===0?0:Math.max(0,Math.min(ne+J/oe,S.scrollWidth-_/oe+Q)),T+=de-K,E+=ne-J}k.push({el:S,top:K,left:J})}return k},B1=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function A1(e,t){if(!e.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(e))return;const r=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(bd(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:l}of bd(e,B1(t))){const i=a-r.top+r.bottom,u=l-r.left+r.right;o.scroll({top:i,left:u,behavior:n})}}var fn=[],$1=function(){return fn.some(function(e){return e.activeTargets.length>0})},F1=function(){return fn.some(function(e){return e.skippedTargets.length>0})},yd="ResizeObserver loop completed with undelivered notifications.",N1=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:yd}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=yd),window.dispatchEvent(e)},_o;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_o||(_o={}));var pn=function(e){return Object.freeze(e)},O1=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,pn(this)}return e})(),Jp=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,pn(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,l=t.bottom,i=t.left,u=t.width,s=t.height;return{x:r,y:n,top:o,right:a,bottom:l,left:i,width:u,height:s}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),Vs=function(e){return e instanceof SVGElement&&"getBBox"in e},Qp=function(e){if(Vs(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,l=o.offsetHeight;return!(a||l||e.getClientRects().length)},Cd=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},P1=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},So=typeof window<"u"?window:{},ca=new WeakMap,xd=/auto|scroll/,R1=/^tb|vertical/,T1=/msie|trident/i.test(So.navigator&&So.navigator.userAgent),xr=function(e){return parseFloat(e||"0")},Mn=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new O1((r?t:e)||0,(r?e:t)||0)},Dd=pn({devicePixelContentBoxSize:Mn(),borderBoxSize:Mn(),contentBoxSize:Mn(),contentRect:new Jp(0,0,0,0)}),eh=function(e,t){if(t===void 0&&(t=!1),ca.has(e)&&!t)return ca.get(e);if(Qp(e))return ca.set(e,Dd),Dd;var r=getComputedStyle(e),n=Vs(e)&&e.ownerSVGElement&&e.getBBox(),o=!T1&&r.boxSizing==="border-box",a=R1.test(r.writingMode||""),l=!n&&xd.test(r.overflowY||""),i=!n&&xd.test(r.overflowX||""),u=n?0:xr(r.paddingTop),s=n?0:xr(r.paddingRight),c=n?0:xr(r.paddingBottom),p=n?0:xr(r.paddingLeft),d=n?0:xr(r.borderTopWidth),h=n?0:xr(r.borderRightWidth),g=n?0:xr(r.borderBottomWidth),v=n?0:xr(r.borderLeftWidth),f=p+s,b=u+c,C=v+h,y=d+g,x=i?e.offsetHeight-y-e.clientHeight:0,B=l?e.offsetWidth-C-e.clientWidth:0,A=o?f+C:0,$=o?b+y:0,F=n?n.width:xr(r.width)-A-B,w=n?n.height:xr(r.height)-$-x,j=F+f+B+C,N=w+b+x+y,I=pn({devicePixelContentBoxSize:Mn(Math.round(F*devicePixelRatio),Math.round(w*devicePixelRatio),a),borderBoxSize:Mn(j,N,a),contentBoxSize:Mn(F,w,a),contentRect:new Jp(p,u,F,w)});return ca.set(e,I),I},th=function(e,t,r){var n=eh(e,r),o=n.borderBoxSize,a=n.contentBoxSize,l=n.devicePixelContentBoxSize;switch(t){case _o.DEVICE_PIXEL_CONTENT_BOX:return l;case _o.BORDER_BOX:return o;default:return a}},I1=(function(){function e(t){var r=eh(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=pn([r.borderBoxSize]),this.contentBoxSize=pn([r.contentBoxSize]),this.devicePixelContentBoxSize=pn([r.devicePixelContentBoxSize])}return e})(),rh=function(e){if(Qp(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},j1=function(){var e=1/0,t=[];fn.forEach(function(a){if(a.activeTargets.length!==0){var l=[];a.activeTargets.forEach(function(i){var u=new I1(i.target),s=rh(i.target);l.push(u),i.lastReportedSize=th(i.target,i.observedBox),s<e&&(e=s)}),t.push(function(){a.callback.call(a.observer,l,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},wd=function(e){fn.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(rh(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},_1=function(){var e=0;for(wd(e);$1();)e=j1(),wd(e);return F1()&&N1(),e>0},il,nh=[],M1=function(){return nh.splice(0).forEach(function(e){return e()})},L1=function(e){if(!il){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return M1()}).observe(r,n),il=function(){r.textContent="".concat(t?t--:t++)}}nh.push(e),il()},z1=function(e){L1(function(){requestAnimationFrame(e)})},Ea=0,K1=function(){return!!Ea},H1=250,W1={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ed=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Sd=function(e){return e===void 0&&(e=0),Date.now()+e},ll=!1,q1=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=H1),!ll){ll=!0;var n=Sd(t);z1(function(){var o=!1;try{o=_1()}finally{if(ll=!1,t=n-Sd(),!K1())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,W1)};document.body?r():So.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ed.forEach(function(r){return So.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ed.forEach(function(r){return So.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Gl=new q1,kd=function(e){!Ea&&e>0&&Gl.start(),Ea+=e,!Ea&&Gl.stop()},U1=function(e){return!Vs(e)&&!P1(e)&&getComputedStyle(e).display==="inline"},V1=(function(){function e(t,r){this.target=t,this.observedBox=r||_o.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=th(this.target,this.observedBox,!0);return U1(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),G1=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),da=new WeakMap,Bd=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},fa=(function(){function e(){}return e.connect=function(t,r){var n=new G1(t,r);da.set(t,n)},e.observe=function(t,r,n){var o=da.get(t),a=o.observationTargets.length===0;Bd(o.observationTargets,r)<0&&(a&&fn.push(o),o.observationTargets.push(new V1(r,n&&n.box)),kd(1),Gl.schedule())},e.unobserve=function(t,r){var n=da.get(t),o=Bd(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&fn.splice(fn.indexOf(n),1),n.observationTargets.splice(o,1),kd(-1))},e.disconnect=function(t){var r=this,n=da.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),Y1=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");fa.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Cd(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");fa.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Cd(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");fa.unobserve(this,t)},e.prototype.disconnect=function(){fa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),fr={},Ad;function X1(){if(Ad)return fr;Ad=1,Object.defineProperty(fr,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},n={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)n["f"+o]=111+o;function a(d,h,g){h&&!("byKey"in h)&&(g=h,h=null),Array.isArray(d)||(d=[d]);var v=d.map(function(C){return u(C,h)}),f=function(C){return v.some(function(y){return s(y,C)})},b=g==null?f:f(g);return b}function l(d,h){return a(d,h)}function i(d,h){return a(d,{byKey:!0},h)}function u(d,h){var g=h&&h.byKey,v={};d=d.replace("++","+add");var f=d.split("+"),b=f.length;for(var C in t)v[t[C]]=!1;var y=!0,x=!1,B=void 0;try{for(var A=f[Symbol.iterator](),$;!(y=($=A.next()).done);y=!0){var F=$.value,w=F.endsWith("?")&&F.length>1;w&&(F=F.slice(0,-1));var j=p(F),N=t[j];if(F.length>1&&!N&&!r[F]&&!n[j])throw new TypeError('Unknown modifier: "'+F+'"');(b===1||!N)&&(g?v.key=j:v.which=c(F)),N&&(v[N]=w?null:!0)}}catch(I){x=!0,B=I}finally{try{!y&&A.return&&A.return()}finally{if(x)throw B}}return v}function s(d,h){for(var g in d){var v=d[g],f=void 0;if(v!=null&&(g==="key"&&h.key!=null?f=h.key.toLowerCase():g==="which"?f=v===91&&h.which===93?91:h.which:f=h[g],!(f==null&&v===!1)&&f!==v))return!1}return!0}function c(d){d=p(d);var h=n[d]||d.toUpperCase().charCodeAt(0);return h}function p(d){return d=d.toLowerCase(),d=r[d]||d,d}return fr.default=a,fr.isHotkey=a,fr.isCodeHotkey=l,fr.isKeyHotkey=i,fr.parseHotkey=u,fr.compareHotkey=s,fr.toKeyCode=c,fr.toKeyName=p,fr}var sl=X1();function Z1(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Hn(e,t){if(e==null)return{};var r=Z1(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mo(e){"@babel/helpers - typeof";return Mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(e)}function J1(e,t){if(Mo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q1(e){var t=J1(e,"string");return Mo(t)==="symbol"?t:String(t)}function cr(e,t,r){return t=Q1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Gs=jr(null),Qr=()=>{var e=Ho(Gs);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},ul,cl,oh=parseInt(he.version.split(".")[0],10),ah=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,$d=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Xt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Rn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),sn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),eD=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ih=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),tD=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),rD=Xt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),nD=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),oD=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),aD=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Sa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(ul=navigator.userAgent.match(/Version\/(\d+)/))!==null&&ul!==void 0&&ul[1]&&parseInt((cl=navigator.userAgent.match(/Version\/(\d+)/))===null||cl===void 0?void 0:cl[1],10)<17;var zr=(!tD||!rD)&&!eD&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Ln=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,lh=new WeakMap,ka=new WeakMap,Yl=new WeakMap,Lo=new WeakMap,hn=new WeakMap,Ya=new WeakMap,bi=new WeakMap,Xl=new WeakMap,Vr=new WeakMap,cn=new WeakMap,ko=new WeakMap,Zl=new WeakMap,Zs=new WeakMap,hr=new WeakMap,Pr=new WeakMap,tr=new WeakMap,qr=new WeakMap,Ur=new WeakMap,sh=new WeakMap,Wn=Symbol("placeholder"),uh=Symbol("mark-placeholder"),ch=globalThis.Node,iD=globalThis.Text,Js=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,lD=e=>Xr(e)&&e.nodeType===8,ur=e=>Xr(e)&&e.nodeType===1,Xr=e=>{var t=Js(e);return!!t&&e instanceof t.Node},Jl=e=>{var t=e&&e.anchorNode&&Js(e.anchorNode);return!!t&&e instanceof t.Selection},dh=e=>Xr(e)&&e.nodeType===3,sD=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,uD=e=>{var[t,r]=e;if(ur(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=fh(t,o,n?"backward":"forward"),n=o<r;ur(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=dD(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},cD=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},fh=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,l=!1,i=!1;(lD(o)||ur(o)&&o.childNodes.length===0||ur(o)&&o.getAttribute("contenteditable")==="false")&&!(l&&i);){if(a>=n.length){l=!0,a=t-1,r="backward";continue}if(a<0){i=!0,a=t+1,r="forward";continue}o=n[a],t=a,a+=r==="forward"?1:-1}return[o,t]},dD=(e,t,r)=>{var[n]=fh(e,t,r);return n},ph=e=>{var t="";if(dh(e)&&e.nodeValue)return e.nodeValue;if(ur(e)){for(var r of Array.from(e.childNodes))t+=ph(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
103
|
+
`)}return t},fD=/data-slate-fragment="(.+?)"/m,pD=e=>{var t=e.getData("text/html"),[,r]=t.match(fD)||[];return r},Bo=e=>e.getSelection!=null?e.getSelection():document.getSelection(),Qs=(e,t,r)=>{var{target:n}=t;if(ur(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=le.getWindow(e);if(o.contains(n))return le.hasDOMNode(e,n,{editable:!0});var a=r.find(l=>{var{addedNodes:i,removedNodes:u}=l;for(var s of i)if(s===n||s.contains(n))return!0;for(var c of u)if(c===n||c.contains(n))return!0});return!a||a===t?!1:Qs(e,a,r)},hD=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(r=e.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var t,r,n;e=(n=e)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return e},Fd=(e,t)=>!!(e.compareDocumentPosition(t)&ch.DOCUMENT_POSITION_PRECEDING),gD=(e,t)=>!!(e.compareDocumentPosition(t)&ch.DOCUMENT_POSITION_FOLLOWING),mD=0;class vD{constructor(){cr(this,"id",void 0),this.id="".concat(mD++)}}var le={androidPendingDiffs:e=>tr.get(e),androidScheduleFlush:e=>{var t;(t=Zs.get(e))===null||t===void 0||t()},blur:e=>{var t=le.toDOMNode(e,e),r=le.findDocumentOrShadowRoot(e);Vr.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=le.findDocumentOrShadowRoot(e),n=Bo(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&ge.deselect(e)},findDocumentOrShadowRoot:e=>{var t=le.toDOMNode(e,e),r=t.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:r,clientY:n,target:o}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var a=le.toSlateNode(e,t.target),l=le.findPath(e,a);if(Te.isElement(a)&&D.isVoid(e,a)){var i=o.getBoundingClientRect(),u=e.isInline(a)?r-i.left<i.left+i.width-r:n-i.top<i.top+i.height-n,s=D.point(e,l,{edge:u?"start":"end"}),c=u?D.before(e,s):D.after(e,s);if(c){var p=D.range(e,c);return p}}var d,{document:h}=le.getWindow(e);if(h.caretRangeFromPoint)d=h.caretRangeFromPoint(r,n);else{var g=h.caretPositionFromPoint(r,n);g&&(d=h.createRange(),d.setStart(g.offsetNode,g.offset),d.setEnd(g.offsetNode,g.offset))}if(!d)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var v=le.toSlateRange(e,d,{exactMatch:!1,suppressThrow:!1});return v},findKey:(e,t)=>{var r=Ya.get(t);return r||(r=new vD,Ya.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=Xs.get(n);if(o==null){if(D.isEditor(n))return r;break}var a=Ys.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Mt.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Vr.get(e)){if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{le.focus(e,{retries:t.retries-1})},10);return}var r=le.toDOMNode(e,e),n=le.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Bo(n),a=le.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||ge.select(e,D.start(e,[])),Vr.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=lh.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:n=!1}=r,o=le.toDOMNode(e,e),a;try{a=ur(t)?t:t.parentElement}catch(l){if(l instanceof Error&&!l.message.includes('Permission denied to access property "nodeType"'))throw l}return a?a.closest("[data-slate-editor]")===o&&(!n||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&a.closest('[contenteditable="false"]')===o||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>Xr(t)&&le.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return D.hasPath(e,r.path)&&D.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>le.hasEditableTarget(e,t)||le.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Xr(t)&&le.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!cn.get(e),isFocused:e=>!!Vr.get(e),isReadOnly:e=>!!Xl.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(Xl.get(e))return!1;var r=le.hasTarget(e,t)&&le.toSlateNode(e,t);return Te.isElement(r)&&D.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=bi.get(e),n=D.isEditor(t)?ka.get(e):r==null?void 0:r.get(le.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Mt.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=D.node(e,t.path),n=le.toDOMNode(e,r),o;D.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",l=Array.from(n.querySelectorAll(a)),i=0,u=0;u<l.length;u++){var s=l[u],c=s.childNodes[0];if(!(c==null||c.textContent==null)){var{length:p}=c.textContent,d=s.getAttribute("data-slate-length"),h=d==null?p:parseInt(d,10),g=i+h,v=l[u+1];if(t.offset===g&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var f,b=v.childNodes[0];o=[b instanceof iD?b:v,(f=v.textContent)!==null&&f!==void 0&&f.startsWith("\uFEFF")?1:0];break}if(t.offset<=g){var C=Math.min(p,Math.max(0,t.offset-i));o=[c,C];break}i=g}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Mt.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=te.isBackward(t),a=le.toDOMPoint(e,r),l=te.isCollapsed(t)?a:le.toDOMPoint(e,n),i=le.getWindow(e),u=i.document.createRange(),[s,c]=o?l:a,[p,d]=o?a:l,h=ur(s)?s:s.parentElement,g=!!h.getAttribute("data-slate-zero-width"),v=ur(p)?p:p.parentElement,f=!!v.getAttribute("data-slate-zero-width");return u.setStart(s,g?1:c),u.setEnd(p,f?1:d),u},toSlateNode:(e,t)=>{var r=ur(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Lo.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(e,t,r)=>{var{exactMatch:n,suppressThrow:o,searchDirection:a="backward"}=r,[l,i]=n?t:uD(t),u=l.parentNode,s=null,c=0;if(u){var p,d,h=le.toDOMNode(e,e),g=u.closest('[data-slate-void="true"]'),v=g&&h.contains(g)?g:null,f=u.closest('[contenteditable="false"]'),b=f&&h.contains(f)?f:null,C=u.closest("[data-slate-leaf]"),y=null;if(C){if(s=C.closest('[data-slate-node="text"]'),s){var x=le.getWindow(e),B=x.document.createRange();B.setStart(s,0),B.setEnd(l,i);var A=B.cloneContents(),$=[...Array.prototype.slice.call(A.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(A.querySelectorAll("[contenteditable=false]"))];$.forEach(V=>{if(Xt&&!n&&V.hasAttribute("data-slate-zero-width")&&V.textContent.length>0&&V.textContext!=="\uFEFF"){V.textContent.startsWith("\uFEFF")&&(V.textContent=V.textContent.slice(1));return}V.parentNode.removeChild(V)}),c=A.textContent.length,y=s}}else if(v){for(var F=v.querySelectorAll("[data-slate-leaf]"),w=0;w<F.length;w++){var j=F[w];if(le.hasDOMNode(e,j)){C=j;break}}C?(s=C.closest('[data-slate-node="text"]'),y=C,c=y.textContent.length,y.querySelectorAll("[data-slate-zero-width]").forEach(V=>{c-=V.textContent.length})):c=1}else if(b){var N=V=>V?V.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],I=b.closest('[data-slate-node="element"]');if(a==="forward"){var T,E=[...N(I),...N(I==null?void 0:I.nextElementSibling)];C=(T=E.find(V=>gD(b,V)))!==null&&T!==void 0?T:null}else{var k,O=[...N(I==null?void 0:I.previousElementSibling),...N(I)];C=(k=O.findLast(V=>Fd(b,V)))!==null&&k!==void 0?k:null}C&&(s=C.closest('[data-slate-node="text"]'),y=C,a==="forward"?c=0:(c=y.textContent.length,y.querySelectorAll("[data-slate-zero-width]").forEach(V=>{c-=V.textContent.length})))}y&&c===y.textContent.length&&Xt&&y.getAttribute("data-slate-zero-width")==="z"&&(p=y.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Rn&&(d=y.textContent)!==null&&d!==void 0&&d.endsWith(`
|
|
104
|
+
|
|
105
|
+
`))&&c--}if(Xt&&!s&&!n){var S=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(S&&le.hasDOMNode(e,S,{editable:!0})){var P=le.toSlateNode(e,S),{path:_,offset:H}=D.start(e,le.findPath(e,P));return S.querySelector("[data-slate-leaf]")||(H=i),{path:_,offset:H}}}if(!s){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var z=le.toSlateNode(e,s),q=le.findPath(e,z);return{path:q,offset:c}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,l=Jl(t)?t.anchorNode:t.startContainer,i,u,s,c,p;if(l)if(Jl(t)){if(Rn&&t.rangeCount>1){s=t.focusNode;var d=t.getRangeAt(0),h=t.getRangeAt(t.rangeCount-1);if(s instanceof HTMLTableRowElement&&d.startContainer instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement){let A=function($){return $.childElementCount>0?A($.children[0]):$};var g=d.startContainer,v=h.startContainer,f=A(g.children[d.startOffset]),b=A(v.children[h.startOffset]);c=0,b.childNodes.length>0?i=b.childNodes[0]:i=b,f.childNodes.length>0?s=f.childNodes[0]:s=f,b instanceof HTMLElement?u=b.innerHTML.length:u=0}else d.startContainer===s?(i=h.endContainer,u=h.endOffset,c=d.startOffset):(i=d.startContainer,u=d.endOffset,c=h.startOffset)}else i=t.anchorNode,u=t.anchorOffset,s=t.focusNode,c=t.focusOffset;ih&&cD(i)||Rn?p=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:p=t.isCollapsed}else i=t.startContainer,u=t.startOffset,s=t.endContainer,c=t.endOffset,p=t.collapsed;if(i==null||s==null||u==null||c==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Rn&&(n=s.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
106
|
+
|
|
107
|
+
`)&&c===s.textContent.length&&c--;var C=le.toSlatePoint(e,[i,u],{exactMatch:o,suppressThrow:a});if(!C)return null;var y=Fd(i,s)||i===s&&c<u,x=p?C:le.toSlatePoint(e,[s,c],{exactMatch:o,suppressThrow:a,searchDirection:y?"forward":"backward"});if(!x)return null;var B={anchor:C,focus:x};return te.isExpanded(B)&&te.isForward(B)&&ur(s)&&D.void(e,{at:B.focus,mode:"highest"})&&(B=D.unhangRange(e,B,{voids:!0})),B}};function bD(e,t){var{path:r,diff:n}=t;if(!D.hasPath(e,r))return!1;var o=Ee.get(e,r);if(!Pe.isText(o))return!1;if(n.start!==o.text.length||n.text.length===0)return o.text.slice(n.start,n.start+n.text.length)===n.text;var a=L.next(r);if(!D.hasPath(e,a))return!1;var l=Ee.get(e,a);return Pe.isText(l)&&l.text.startsWith(n.text)}function hh(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((o,a)=>o.slice(0,a.start)+a.text+o.slice(a.end),e)}function yD(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n))return n;return r}function CD(e,t,r){for(var n=Math.min(e.length,t.length,r),o=0;o<n;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return n}function gh(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),l=yD(a,o),i=Math.min(a.length-l,o.length-l),u=CD(a,o,i),s={start:r+l,end:n-u,text:o.slice(l,o.length-u)};return s.start===s.end&&s.text.length===0?null:s}function xD(e,t,r){var n=Math.min(t.start,r.start),o=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),a=hh(e,t,r),l=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),i=a.slice(n,l),u=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return gh(e,{start:n,end:u,text:i})}function DD(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function Ql(e,t){var{path:r,offset:n}=t;if(!D.hasPath(e,r))return null;var o=Ee.get(e,r);if(!Pe.isText(o))return null;var a=D.above(e,{match:i=>Te.isElement(i)&&D.isBlock(e,i),at:r});if(!a)return null;for(;n>o.text.length;){var l=D.next(e,{at:r,match:Pe.isText});if(!l||!L.isDescendant(l[1],a[1]))return null;n-=o.text.length,o=l[0],r=l[1]}return{path:r,offset:n}}function Nd(e,t){var r=Ql(e,t.anchor);if(!r)return null;if(te.isCollapsed(t))return{anchor:r,focus:r};var n=Ql(e,t.focus);return n?{anchor:r,focus:n}:null}function es(e,t,r){var n=tr.get(e),o=n==null?void 0:n.find(c=>{var{path:p}=c;return L.equals(p,t.path)});if(!o||t.offset<=o.diff.start)return at.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var l={path:t.path,offset:a.start},i=at.transform(l,r,{affinity:"backward"});return i?{path:i.path,offset:i.offset+t.offset-a.start}:null}var u={path:t.path,offset:t.offset-a.text.length+a.end-a.start},s=at.transform(u,r,{affinity:"backward"});return s?r.type==="split_node"&&L.equals(r.path,t.path)&&u.offset<r.position&&a.start<r.position?s:{path:s.path,offset:s.offset+a.text.length-a.end+a.start}:null}function Od(e,t,r){var n=es(e,t.anchor,r);if(!n)return null;if(te.isCollapsed(t))return{anchor:n,focus:n};var o=es(e,t.focus,r);return o?{anchor:n,focus:o}:null}function wD(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!L.equals(t.path,r)||t.offset>=n.end?e:t.offset<=n.start?{diff:{start:t.text.length+n.start,end:t.text.length+n.end,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:o,path:r};case"remove_text":return!L.equals(t.path,r)||t.offset>=n.end?e:t.offset+t.text.length<=n.start?{diff:{start:n.start-t.text.length,end:n.end-t.text.length,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:o,path:r};case"split_node":return!L.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:L.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:o,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:o,path:L.transform(r,t,{affinity:"forward"})};case"merge_node":return L.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:L.transform(r,t)}:{diff:n,id:o,path:L.transform(r,t)}}var a=L.transform(r,t);return a?{diff:n,path:a,id:o}:null}function Pd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pd(Object(r),!0).forEach(function(n){cr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ED=25,SD=200,kD=function(){},BD=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function AD(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,l=null,i=null,u=0,s=!1,c=()=>{var I=Ur.get(t);if(Ur.delete(t),I){var{selection:T}=t,E=Nd(t,I);E&&(!T||!te.equals(E,T))&&ge.select(t,E)}},p=()=>{var I=qr.get(t);if(qr.delete(t),!!I){if(I.at){var T=at.isPoint(I.at)?Ql(t,I.at):Nd(t,I.at);if(!T)return;var E=D.range(t,T);(!t.selection||!te.equals(t.selection,E))&&ge.select(t,T)}I.run()}},d=()=>{if(l&&(clearTimeout(l),l=null),i&&(clearTimeout(i),i=null),!x()&&!y()){c();return}o||(o=!0,setTimeout(()=>o=!1)),y()&&(o="action");var I=t.selection&&D.rangeRef(t,t.selection,{affinity:"forward"});Pr.set(t,t.marks),kD("flush",qr.get(t),tr.get(t));for(var T=x(),E;E=(k=tr.get(t))===null||k===void 0?void 0:k[0];){var k,O,S=hr.get(t);S!==void 0&&(hr.delete(t),t.marks=S),S&&s===!1&&(s=null);var P=DD(E);(!t.selection||!te.equals(t.selection,P))&&ge.select(t,P),E.diff.text?D.insertText(t,E.diff.text):D.deleteFragment(t),tr.set(t,(O=tr.get(t))===null||O===void 0?void 0:O.filter(z=>{var{id:q}=z;return q!==E.id})),bD(t,E)||(T=!1,qr.delete(t),Pr.delete(t),o="action",Ur.delete(t),r.cancel(),n.cancel(),I==null||I.unref())}var _=I==null?void 0:I.unref();if(_&&!Ur.get(t)&&(!t.selection||!te.equals(_,t.selection))&&ge.select(t,_),y()){p();return}T&&r(),r.flush(),n.flush(),c();var H=Pr.get(t);Pr.delete(t),H!==void 0&&(t.marks=H,t.onChange())},h=I=>{a&&clearTimeout(a),a=setTimeout(()=>{cn.set(t,!1),d()},ED)},g=I=>{cn.set(t,!0),a&&(clearTimeout(a),a=null)},v=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,T=Yl.get(t);if(T){if(x()||I){T.style.display="none";return}T.style.removeProperty("display")}},f=(I,T)=>{var E,k=(E=tr.get(t))!==null&&E!==void 0?E:[];tr.set(t,k);var O=Ee.leaf(t,I),S=k.findIndex(H=>L.equals(H.path,I));if(S<0){var P=gh(O.text,T);P&&k.push({path:I,diff:T,id:u++}),v();return}var _=xD(O.text,k[S].diff,T);if(!_){k.splice(S,1),v();return}k[S]=pa(pa({},k[S]),{},{diff:_})},b=function(I){var{at:T}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s=!1,Ur.delete(t),r.cancel(),n.cancel(),y()&&d(),qr.set(t,{at:T,run:I}),i=setTimeout(d)},C=I=>{var T;if(l&&(clearTimeout(l),l=null),!Ln.get(t)){var{inputType:E}=I,k=null,O=I.dataTransfer||I.data||void 0;s!==!1&&E!=="insertText"&&E!=="insertCompositionText"&&(s=!1);var[S]=I.getTargetRanges();S&&(k=le.toSlateRange(t,S,{exactMatch:!1,suppressThrow:!0}));var P=le.getWindow(t),_=P.getSelection();if(!k&&_&&(S=_,k=le.toSlateRange(t,_,{exactMatch:!1,suppressThrow:!0})),k=(T=k)!==null&&T!==void 0?T:t.selection,!!k){var H=!0;if(E.startsWith("delete")){if(te.isExpanded(k)){var[z,q]=te.edges(k),V=Ee.leaf(t,z.path);if(V.text.length===z.offset&&q.offset===0){var Z=D.next(t,{at:z.path,match:Pe.isText});Z&&L.equals(Z[1],q.path)&&(k={anchor:q,focus:q})}}var ae=E.endsWith("Backward")?"backward":"forward",[R,U]=te.edges(k),[W,K]=D.leaf(t,R.path),J={text:"",start:R.offset,end:U.offset},Q=tr.get(t),ee=Q==null?void 0:Q.find(Ge=>L.equals(Ge.path,K)),oe=ee?[ee.diff,J]:[J],re=hh(W.text,...oe);if(re.length===0&&(H=!1),te.isExpanded(k)){if(H&&L.equals(k.anchor.path,k.focus.path)){var ne={path:k.anchor.path,offset:R.offset},de=D.range(t,ne,ne);return $(de),f(k.anchor.path,{text:"",end:U.offset,start:R.offset})}return b(()=>D.deleteFragment(t,{direction:ae}),{at:k})}}switch(E){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return b(()=>D.deleteFragment(t),{at:k});case"deleteContent":case"deleteContentForward":{var{anchor:ce}=k;if(H&&te.isCollapsed(k)){var Se=Ee.leaf(t,ce.path);if(ce.offset<Se.text.length)return f(ce.path,{text:"",start:ce.offset,end:ce.offset+1})}return b(()=>D.deleteForward(t),{at:k})}case"deleteContentBackward":{var We,{anchor:qe}=k,ue=Jl(S)?S.isCollapsed:!!((We=S)!==null&&We!==void 0&&We.collapsed);return H&&ue&&te.isCollapsed(k)&&qe.offset>0?f(qe.path,{text:"",start:qe.offset-1,end:qe.offset}):b(()=>D.deleteBackward(t),{at:k})}case"deleteEntireSoftLine":return b(()=>{D.deleteBackward(t,{unit:"line"}),D.deleteForward(t,{unit:"line"})},{at:k});case"deleteHardLineBackward":return b(()=>D.deleteBackward(t,{unit:"block"}),{at:k});case"deleteSoftLineBackward":return b(()=>D.deleteBackward(t,{unit:"line"}),{at:k});case"deleteHardLineForward":return b(()=>D.deleteForward(t,{unit:"block"}),{at:k});case"deleteSoftLineForward":return b(()=>D.deleteForward(t,{unit:"line"}),{at:k});case"deleteWordBackward":return b(()=>D.deleteBackward(t,{unit:"word"}),{at:k});case"deleteWordForward":return b(()=>D.deleteForward(t,{unit:"word"}),{at:k});case"insertLineBreak":return b(()=>D.insertSoftBreak(t),{at:k});case"insertParagraph":return b(()=>D.insertBreak(t),{at:k});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(BD(O))return b(()=>le.insertData(t,O),{at:k});var ve=O??"";if(hr.get(t)&&(ve=ve.replace("\uFEFF","")),E==="insertText"&&/.*\n.*\n$/.test(ve)&&(ve=ve.slice(0,-1)),ve.includes(`
|
|
108
|
+
`))return b(()=>{var Ge=ve.split(`
|
|
109
|
+
`);Ge.forEach((Re,je)=>{Re&&D.insertText(t,Re),je!==Ge.length-1&&D.insertSoftBreak(t)})},{at:k});if(L.equals(k.anchor.path,k.focus.path)){var[we,Le]=te.edges(k),$e={start:we.offset,end:Le.offset,text:ve};if(ve&&s&&E==="insertCompositionText"){var Oe=s.start+s.text.search(/\S|$/),Qe=$e.start+$e.text.search(/\S|$/);Qe===Oe+1&&$e.end===s.start+s.text.length?($e.start-=1,s=null,j()):s=!1}else E==="insertText"?s===null?s=$e:s&&te.isCollapsed(k)&&s.end+s.text.length===we.offset?s=pa(pa({},s),{},{text:s.text+ve}):s=!1:s=!1;if(H){f(we.path,$e);return}}return b(()=>D.insertText(t,ve),{at:k})}}}}},y=()=>!!qr.get(t),x=()=>{var I;return!!((I=tr.get(t))!==null&&I!==void 0&&I.length)},B=()=>y()||x(),A=()=>o,$=I=>{Ur.set(t,I),l&&(clearTimeout(l),l=null);var{selection:T}=t;if(I){var E=!T||!L.equals(T.anchor.path,I.anchor.path),k=!T||!L.equals(T.anchor.path.slice(0,-1),I.anchor.path.slice(0,-1));(E&&s||k)&&(s=!1),(E||x())&&(l=setTimeout(d,SD))}},F=()=>{(y()||!x())&&d()},w=I=>{x()||(v(!0),setTimeout(v))},j=()=>{y()||(i=setTimeout(d))},N=I=>{if(!(x()||y())&&I.some(E=>Qs(t,E,I))){var T;(T=sh.get(t))===null||T===void 0||T()}};return{flush:d,scheduleFlush:j,hasPendingDiffs:x,hasPendingAction:y,hasPendingChanges:B,isFlushing:A,handleUserSelect:$,handleCompositionEnd:h,handleCompositionStart:g,handleDOMBeforeInput:C,handleKeyDown:w,handleDomMutations:N,handleInput:F}}function $D(){var e=ct(!1);return yt(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var zo=Sa?dg:yt;function FD(e,t,r){var[n]=ut(()=>new MutationObserver(t));zo(()=>{n.takeRecords()}),yt(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(e.current,r),()=>n.disconnect()},[n,e,r])}var ND=["node"];function Rd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function OD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rd(Object(r),!0).forEach(function(n){cr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var PD={subtree:!0,childList:!0,characterData:!0},RD=Xt?e=>{var{node:t}=e,r=Hn(e,ND);if(!Xt)return null;var n=Qr(),o=$D(),[a]=ut(()=>AD(OD({editor:n},r)));return FD(t,a.handleDomMutations,PD),Zs.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,TD=["anchor","focus"],ID=["anchor","focus"],jD=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),mh=(e,t)=>{var r=Hn(e,TD),n=Hn(t,ID);return e[Wn]===t[Wn]&&jD(r,n)},_D=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(!te.equals(n,o)||!mh(n,o))return!1}return!0},MD=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(n.anchor.offset!==o.anchor.offset||n.focus.offset!==o.focus.offset||!mh(n,o))return!1}return!0};function Td(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function LD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Td(Object(r),!0).forEach(function(n){cr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Td(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zD=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=Qr(),l=le.findPath(a,o),i=L.parent(l),u=!!r[uh];return a.isVoid(n)?he.createElement(dl,{length:Ee.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&D.string(a,i)===""?he.createElement(dl,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?he.createElement(dl,{isMarkPlaceholder:u}):t&&r.text.slice(-1)===`
|
|
110
|
+
`?he.createElement(Id,{isTrailing:!0,text:r.text}):he.createElement(Id,{text:r.text})},Id=e=>{var{text:t,isTrailing:r=!1}=e,n=ct(null),o=()=>"".concat(t??"").concat(r?`
|
|
111
|
+
`:""),[a]=ut(o);return zo(()=>{var l=o();n.current&&n.current.textContent!==l&&(n.current.textContent=l)}),he.createElement(KD,{ref:n},a)},KD=hg(Zr((e,t)=>he.createElement("span",{"data-slate-string":!0,ref:t},e.children))),dl=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,o={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(o["data-slate-mark-placeholder"]=!0),he.createElement("span",LD({},o),!(Xt||ah)||!r?"\uFEFF":null,r?he.createElement("br",null):null)};function jd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jd(Object(r),!0).forEach(function(n){cr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var HD=Xt?300:0;function WD(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function _d(e){e.current&&(clearTimeout(e.current),e.current=null)}var qD=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:l=C=>he.createElement(VD,vh({},C))}=e,i=Qr(),u=ct(null),s=ct(null),[c,p]=ut(!1),d=ct(null),h=ze(C=>{if(WD(u,C==null),C==null){var y;Yl.delete(i),(y=t.onPlaceholderResize)===null||y===void 0||y.call(t,null)}else{if(Yl.set(i,C),!u.current){var x=window.ResizeObserver||Y1;u.current=new x(()=>{var B;(B=t.onPlaceholderResize)===null||B===void 0||B.call(t,C)})}u.current.observe(C),s.current=C}},[s,t,i]),g=he.createElement(zD,{isLast:r,leaf:t,parent:o,text:n}),v=!!t[Wn];if(yt(()=>(v?d.current||(d.current=setTimeout(()=>{p(!0),d.current=null},HD)):(_d(d),p(!1)),()=>_d(d)),[v,p]),v&&c){var f={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:sn?"inherit":void 0},contentEditable:!1,ref:h}};g=he.createElement(he.Fragment,null,a(f),g)}var b={"data-slate-leaf":!0};return l({attributes:b,children:g,leaf:t,text:n})},UD=he.memo(qD,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Pe.equals(t.leaf,e.leaf)&&t.leaf[Wn]===e.leaf[Wn]),VD=e=>{var{attributes:t,children:r}=e;return he.createElement("span",vh({},t),r)},GD=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:l}=e,i=Qr(),u=ct(null),s=Pe.decorations(l,t),c=le.findKey(i,l),p=[],d=0;d<s.length;d++){var h=s[d];p.push(he.createElement(UD,{isLast:r&&d===s.length-1,key:"".concat(c.id,"-").concat(d),renderPlaceholder:o,leaf:h,text:l,parent:n,renderLeaf:a}))}var g=ze(v=>{var f=bi.get(i);v?(f==null||f.set(c,v),hn.set(l,v),Lo.set(v,l)):(f==null||f.delete(c),hn.delete(l),u.current&&Lo.delete(u.current)),u.current=v},[u,i,c,l]);return he.createElement("span",{"data-slate-node":"text",ref:g},p)},bh=he.memo(GD,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&MD(t.decorations,e.decorations));function Md(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ts(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Md(Object(r),!0).forEach(function(n){cr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Md(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var YD=e=>{var{decorations:t,element:r,renderElement:n=C=>he.createElement(ZD,ts({},C)),renderPlaceholder:o,renderLeaf:a,selection:l}=e,i=Qr(),u=ew(),s=i.isInline(r),c=le.findKey(i,r),p=ze(C=>{var y=bi.get(i);C?(y==null||y.set(c,C),hn.set(r,C),Lo.set(C,r)):(y==null||y.delete(c),hn.delete(r))},[i,c,r]),d=Ch({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:l}),h={"data-slate-node":"element",ref:p};if(s&&(h["data-slate-inline"]=!0),!s&&D.hasInlines(i,r)){var g=Ee.string(r),v=Gp(g);v==="rtl"&&(h.dir=v)}if(D.isVoid(i,r)){h["data-slate-void"]=!0,!u&&s&&(h.contentEditable=!1);var f=s?"span":"div",[[b]]=Ee.texts(r);d=he.createElement(f,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},he.createElement(bh,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:b})),Ys.set(b,0),Xs.set(b,r)}return n({attributes:h,children:d,element:r})},XD=he.memo(YD,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&_D(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&te.equals(e.selection,t.selection))),ZD=e=>{var{attributes:t,children:r,element:n}=e,o=Qr(),a=o.isInline(n)?"span":"div";return he.createElement(a,ts(ts({},t),{},{style:{position:"relative"}}),r)},yh=jr(()=>[]),JD=()=>Ho(yh),QD=jr(!1),Ch=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:l}=e,i=JD(),u=Qr();Ln.set(u,!1);for(var s=le.findPath(u,r),c=[],p=Te.isElement(r)&&!u.isInline(r)&&D.hasInlines(u,r),d=0;d<r.children.length;d++){var h=s.concat(d),g=r.children[d],v=le.findKey(u,g),f=D.range(u,h),b=l&&te.intersection(f,l),C=i([g,h]);for(var y of t){var x=te.intersection(y,f);x&&C.push(x)}Te.isElement(g)?c.push(he.createElement(QD.Provider,{key:"provider-".concat(v.id),value:!!b},he.createElement(XD,{decorations:C,element:g,key:v.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:b}))):c.push(he.createElement(bh,{decorations:C,key:v.id,isLast:p&&d===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:g})),Ys.set(g,d),Xs.set(g,r)}return c},xh=jr(!1),ew=()=>Ho(xh),Dh=jr(null),wh=()=>{var e=Ho(Dh);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function tw(){var e=Qr(),t=ct(!1),r=ct(0),n=ze(()=>{if(!t.current){t.current=!0;var o=le.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return yt(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var rw=3,nw={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},ow={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},aw={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},St=e=>{var t=nw[e],r=ow[e],n=aw[e],o=t&&sl.isHotkey(t),a=r&&sl.isHotkey(r),l=n&&sl.isHotkey(n);return i=>!!(o&&o(i)||$d&&a&&a(i)||!$d&&l&&l(i))},kt={isBold:St("bold"),isCompose:St("compose"),isMoveBackward:St("moveBackward"),isMoveForward:St("moveForward"),isDeleteBackward:St("deleteBackward"),isDeleteForward:St("deleteForward"),isDeleteLineBackward:St("deleteLineBackward"),isDeleteLineForward:St("deleteLineForward"),isDeleteWordBackward:St("deleteWordBackward"),isDeleteWordForward:St("deleteWordForward"),isExtendBackward:St("extendBackward"),isExtendForward:St("extendForward"),isExtendLineBackward:St("extendLineBackward"),isExtendLineForward:St("extendLineForward"),isItalic:St("italic"),isMoveLineBackward:St("moveLineBackward"),isMoveLineForward:St("moveLineForward"),isMoveWordBackward:St("moveWordBackward"),isMoveWordForward:St("moveWordForward"),isRedo:St("redo"),isSoftBreak:St("insertSoftBreak"),isSplitBlock:St("splitBlock"),isTransposeCharacter:St("transposeCharacter"),isUndo:St("undo")},iw=(e,t)=>{var r=[],n=()=>{r=[]},o=l=>{if(t.current){var i=l.filter(u=>Qs(e,u,l));r.push(...i)}};function a(){r.length>0&&(r.reverse().forEach(l=>{l.type!=="characterData"&&(l.removedNodes.forEach(i=>{l.target.insertBefore(i,l.nextSibling)}),l.addedNodes.forEach(i=>{l.target.removeChild(i)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},lw={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class Eh extends pg{constructor(){super(...arguments),cr(this,"context",null),cr(this,"manager",null),cr(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,lw)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=iw(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}cr(Eh,"contextType",Gs);var sw=Xt?Eh:e=>{var{children:t}=e;return he.createElement(he.Fragment,null,t)},uw=jr(!1),cw=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],dw=["text"];function Ld(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ld(Object(r),!0).forEach(function(n){cr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fw=e=>he.createElement(he.Fragment,null,Ch(e)),fl=Zr((e,t)=>{var r=ze(R=>he.createElement(pw,wr({},R)),[]),{autoFocus:n,decorate:o=hw,onDOMBeforeInput:a,placeholder:l,readOnly:i=!1,renderElement:u,renderLeaf:s,renderPlaceholder:c=r,scrollSelectionIntoView:p=gw,style:d={},as:h="div",disableDefaultStyles:g=!1}=e,v=Hn(e,cw),f=wh(),[b,C]=ut(!1),y=ct(null),x=ct([]),[B,A]=ut(),$=ct(!1),{onUserInput:F,receivedUserInput:w}=tw(),[,j]=fg(R=>R+1,0);sh.set(f,j),Xl.set(f,i);var N=Je(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);yt(()=>{y.current&&n&&y.current.focus()},[n]);var I=ct(),T=Je(()=>S1(()=>{if(Ln.get(f)){T();return}var R=le.toDOMNode(f,f),U=R.getRootNode();if(!$.current&&sn&&U instanceof ShadowRoot){$.current=!0;var W=hD();W?document.execCommand("indent"):ge.deselect(f),$.current=!1;return}var K=I.current;if((Xt||!le.isComposing(f))&&(!N.isUpdatingSelection||K!=null&&K.isFlushing())&&!N.isDraggingInternally){var J=le.findDocumentOrShadowRoot(f),{activeElement:Q}=J,ee=le.toDOMNode(f,f),oe=Bo(J);if(Q===ee?(N.latestElement=Q,Vr.set(f,!0)):Vr.delete(f),!oe)return ge.deselect(f);var{anchorNode:re,focusNode:ne}=oe,de=le.hasEditableTarget(f,re)||le.isTargetInsideNonReadonlyVoid(f,re),ce=le.hasTarget(f,ne);if(de&&ce){var Se=le.toSlateRange(f,oe,{exactMatch:!1,suppressThrow:!0});Se&&(!le.isComposing(f)&&!(K!=null&&K.hasPendingChanges())&&!(K!=null&&K.isFlushing())?ge.select(f,Se):K==null||K.handleUserSelect(Se))}i&&(!de||!ce)&&ge.deselect(f)}},100),[f,i,N]),E=Je(()=>D1(T,0),[T]);I.current=RD({node:y,onDOMSelectionChange:T,scheduleOnDOMSelectionChange:E}),zo(()=>{var R,U,W;y.current&&(W=Js(y.current))?(lh.set(f,W),ka.set(f,y.current),hn.set(f,y.current),Lo.set(y.current,f)):hn.delete(f);var{selection:K}=f,J=le.findDocumentOrShadowRoot(f),Q=Bo(J);if(!(!Q||!le.isFocused(f)||(R=I.current)!==null&&R!==void 0&&R.hasPendingAction())){var ee=de=>{var ce=Q.type!=="None";if(!(!K&&!ce)){var Se=Q.focusNode,We;if(Rn&&Q.rangeCount>1){var qe=Q.getRangeAt(0),ue=Q.getRangeAt(Q.rangeCount-1);qe.startContainer===Se?We=ue.endContainer:We=qe.startContainer}else We=Q.anchorNode;var ve=ka.get(f),we=!1;if(ve.contains(We)&&ve.contains(Se)&&(we=!0),ce&&we&&K&&!de){var Le=le.toSlateRange(f,Q,{exactMatch:!0,suppressThrow:!0});if(Le&&te.equals(Le,K)){var $e;if(!N.hasMarkPlaceholder||($e=We)!==null&&$e!==void 0&&($e=$e.parentElement)!==null&&$e!==void 0&&$e.hasAttribute("data-slate-mark-placeholder"))return}}if(K&&!le.hasRange(f,K)){f.selection=le.toSlateRange(f,Q,{exactMatch:!1,suppressThrow:!0});return}N.isUpdatingSelection=!0;var Oe=K&&le.toDOMRange(f,K);return Oe?(le.isComposing(f)&&!Xt?Q.collapseToEnd():te.isBackward(K)?Q.setBaseAndExtent(Oe.endContainer,Oe.endOffset,Oe.startContainer,Oe.startOffset):Q.setBaseAndExtent(Oe.startContainer,Oe.startOffset,Oe.endContainer,Oe.endOffset),p(f,Oe)):Q.removeAllRanges(),Oe}};Q.rangeCount<=1&&ee();var oe=((U=I.current)===null||U===void 0?void 0:U.isFlushing())==="action";if(!Xt||!oe){setTimeout(()=>{N.isUpdatingSelection=!1});return}var re=null,ne=requestAnimationFrame(()=>{if(oe){var de=ce=>{try{var Se=le.toDOMNode(f,f);Se.focus(),ee(ce)}catch{}};de(),re=setTimeout(()=>{de(!0),N.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(ne),re&&clearTimeout(re)}}});var k=ze(R=>{var U=le.toDOMNode(f,f),W=U.getRootNode();if($!=null&&$.current&&sn&&W instanceof ShadowRoot){var K=R.getTargetRanges(),J=K[0],Q=new window.Range;Q.setStart(J.startContainer,J.startOffset),Q.setEnd(J.endContainer,J.endOffset);var ee=le.toSlateRange(f,Q,{exactMatch:!1,suppressThrow:!1});ge.select(f,ee),R.preventDefault(),R.stopImmediatePropagation();return}if(F(),!i&&le.hasEditableTarget(f,R.target)&&!mw(R,a)){var oe;if(I.current)return I.current.handleDOMBeforeInput(R);E.flush(),T.flush();var{selection:re}=f,{inputType:ne}=R,de=R.dataTransfer||R.data||void 0,ce=ne==="insertCompositionText"||ne==="deleteCompositionText";if(ce&&le.isComposing(f))return;var Se=!1;if(ne==="insertText"&&re&&te.isCollapsed(re)&&R.data&&R.data.length===1&&/[a-z ]/i.test(R.data)&&re.anchor.offset!==0&&(Se=!0,f.marks&&(Se=!1),!Ln.get(f))){var We,qe,{anchor:ue}=re,[ve,we]=le.toDOMPoint(f,ue),Le=(We=ve.parentElement)===null||We===void 0?void 0:We.closest("a"),$e=le.getWindow(f);if(Se&&Le&&le.hasDOMNode(f,Le)){var Oe,Qe=$e==null?void 0:$e.document.createTreeWalker(Le,NodeFilter.SHOW_TEXT).lastChild();Qe===ve&&((Oe=Qe.textContent)===null||Oe===void 0?void 0:Oe.length)===we&&(Se=!1)}if(Se&&ve.parentElement&&($e==null||(qe=$e.getComputedStyle(ve.parentElement))===null||qe===void 0?void 0:qe.whiteSpace)==="pre"){var Ge=D.above(f,{at:ue.path,match:Ue=>Te.isElement(Ue)&&D.isBlock(f,Ue)});Ge&&Ee.string(Ge[0]).includes(" ")&&(Se=!1)}}if((!ne.startsWith("delete")||ne.startsWith("deleteBy"))&&!Ln.get(f)){var[Re]=R.getTargetRanges();if(Re){var je=le.toSlateRange(f,Re,{exactMatch:!1,suppressThrow:!1});if(!re||!te.equals(re,je)){Se=!1;var xe=!ce&&f.selection&&D.rangeRef(f,f.selection);ge.select(f,je),xe&&ko.set(f,xe)}}}if(ce)return;if(Se||R.preventDefault(),re&&te.isExpanded(re)&&ne.startsWith("delete")){var ye=ne.endsWith("Backward")?"backward":"forward";D.deleteFragment(f,{direction:ye});return}switch(ne){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{D.deleteFragment(f);break}case"deleteContent":case"deleteContentForward":{D.deleteForward(f);break}case"deleteContentBackward":{D.deleteBackward(f);break}case"deleteEntireSoftLine":{D.deleteBackward(f,{unit:"line"}),D.deleteForward(f,{unit:"line"});break}case"deleteHardLineBackward":{D.deleteBackward(f,{unit:"block"});break}case"deleteSoftLineBackward":{D.deleteBackward(f,{unit:"line"});break}case"deleteHardLineForward":{D.deleteForward(f,{unit:"block"});break}case"deleteSoftLineForward":{D.deleteForward(f,{unit:"line"});break}case"deleteWordBackward":{D.deleteBackward(f,{unit:"word"});break}case"deleteWordForward":{D.deleteForward(f,{unit:"word"});break}case"insertLineBreak":D.insertSoftBreak(f);break;case"insertParagraph":{D.insertBreak(f);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{ne==="insertFromComposition"&&le.isComposing(f)&&(C(!1),cn.set(f,!1)),(de==null?void 0:de.constructor.name)==="DataTransfer"?le.insertData(f,de):typeof de=="string"&&(Se?x.current.push(()=>D.insertText(f,de)):D.insertText(f,de));break}}var _e=(oe=ko.get(f))===null||oe===void 0?void 0:oe.unref();ko.delete(f),_e&&(!f.selection||!te.equals(f.selection,_e))&&ge.select(f,_e)}},[f,T,F,a,i,E]),O=ze(R=>{R==null?(T.cancel(),E.cancel(),ka.delete(f),hn.delete(f),y.current&&zr&&y.current.removeEventListener("beforeinput",k)):zr&&R.addEventListener("beforeinput",k),y.current=R,typeof t=="function"?t(R):t&&(t.current=R)},[T,E,f,k,t]);zo(()=>{var R=le.getWindow(f);R.document.addEventListener("selectionchange",E);var U=()=>{N.isDraggingInternally=!1};return R.document.addEventListener("dragend",U),R.document.addEventListener("drop",U),()=>{R.document.removeEventListener("selectionchange",E),R.document.removeEventListener("dragend",U),R.document.removeEventListener("drop",U)}},[E,N]);var S=o([f,[]]),P=l&&f.children.length===1&&Array.from(Ee.texts(f)).length===1&&Ee.string(f)===""&&!b,_=ze(R=>{if(R&&P){var U;A((U=R.getBoundingClientRect())===null||U===void 0?void 0:U.height)}else A(void 0)},[P]);if(P){var H=D.start(f,[]);S.push({[Wn]:!0,placeholder:l,onPlaceholderResize:_,anchor:H,focus:H})}var{marks:z}=f;if(N.hasMarkPlaceholder=!1,f.selection&&te.isCollapsed(f.selection)&&z){var{anchor:q}=f.selection,V=Ee.leaf(f,q.path),Z=Hn(V,dw);if(!Pe.equals(V,z,{loose:!0})){N.hasMarkPlaceholder=!0;var ae=Object.fromEntries(Object.keys(Z).map(R=>[R,null]));S.push(wr(wr(wr({[uh]:!0},ae),z),{},{anchor:q,focus:q}))}}return yt(()=>{setTimeout(()=>{var{selection:R}=f;if(R){var{anchor:U}=R,W=Ee.leaf(f,U.path);if(z&&!Pe.equals(W,z,{loose:!0})){hr.set(f,z);return}}hr.delete(f)})}),he.createElement(xh.Provider,{value:i},he.createElement(uw.Provider,{value:b},he.createElement(yh.Provider,{value:o},he.createElement(sw,{node:y,receivedUserInput:w},he.createElement(h,wr(wr({role:i?void 0:"textbox","aria-multiline":i?void 0:!0},v),{},{spellCheck:zr||!Sa?v.spellCheck:!1,autoCorrect:zr||!Sa?v.autoCorrect:"false",autoCapitalize:zr||!Sa?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!i,zindex:-1,suppressContentEditableWarning:!0,ref:O,style:wr(wr({},g?{}:wr({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},B?{minHeight:B}:{})),d),onBeforeInput:ze(R=>{if(!zr&&!i&&!Yt(R,v.onBeforeInput)&&le.hasSelectableTarget(f,R.target)&&(R.preventDefault(),!le.isComposing(f))){var U=R.data;D.insertText(f,U)}},[v.onBeforeInput,f,i]),onInput:ze(R=>{if(!Yt(R,v.onInput)){if(I.current){I.current.handleInput();return}for(var U of x.current)U();if(x.current=[],!le.isFocused(f)){var W=R.nativeEvent,K=f;if(W.inputType==="historyUndo"&&typeof K.undo=="function"){K.undo();return}if(W.inputType==="historyRedo"&&typeof K.redo=="function"){K.redo();return}}}},[v.onInput,f]),onBlur:ze(R=>{if(!(i||N.isUpdatingSelection||!le.hasSelectableTarget(f,R.target)||Yt(R,v.onBlur))){var U=le.findDocumentOrShadowRoot(f);if(N.latestElement!==U.activeElement){var{relatedTarget:W}=R,K=le.toDOMNode(f,f);if(W!==K&&!(ur(W)&&W.hasAttribute("data-slate-spacer"))){if(W!=null&&Xr(W)&&le.hasDOMNode(f,W)){var J=le.toSlateNode(f,W);if(Te.isElement(J)&&!f.isVoid(J))return}if(sn){var Q=Bo(U);Q==null||Q.removeAllRanges()}Vr.delete(f)}}}},[i,N.isUpdatingSelection,N.latestElement,f,v.onBlur]),onClick:ze(R=>{if(le.hasTarget(f,R.target)&&!Yt(R,v.onClick)&&Xr(R.target)){var U=le.toSlateNode(f,R.target),W=le.findPath(f,U);if(!D.hasPath(f,W)||Ee.get(f,W)!==U)return;if(R.detail===rw&&W.length>=1){var K=W;if(!(Te.isElement(U)&&D.isBlock(f,U))){var J,Q=D.above(f,{match:Se=>Te.isElement(Se)&&D.isBlock(f,Se),at:W});K=(J=Q==null?void 0:Q[1])!==null&&J!==void 0?J:W.slice(0,1)}var ee=D.range(f,K);ge.select(f,ee);return}if(i)return;var oe=D.start(f,W),re=D.end(f,W),ne=D.void(f,{at:oe}),de=D.void(f,{at:re});if(ne&&de&&L.equals(ne[1],de[1])){var ce=D.range(f,oe);ge.select(f,ce)}}},[f,v.onClick,i]),onCompositionEnd:ze(R=>{if(le.hasSelectableTarget(f,R.target)){var U;if(le.isComposing(f)&&Promise.resolve().then(()=>{C(!1),cn.set(f,!1)}),(U=I.current)===null||U===void 0||U.handleCompositionEnd(R),Yt(R,v.onCompositionEnd)||Xt)return;if(!sn&&!nD&&!ah&&!aD&&!oD&&R.data){var W=hr.get(f);hr.delete(f),W!==void 0&&(Pr.set(f,f.marks),f.marks=W),D.insertText(f,R.data);var K=Pr.get(f);Pr.delete(f),K!==void 0&&(f.marks=K)}}},[v.onCompositionEnd,f]),onCompositionUpdate:ze(R=>{le.hasSelectableTarget(f,R.target)&&!Yt(R,v.onCompositionUpdate)&&(le.isComposing(f)||(C(!0),cn.set(f,!0)))},[v.onCompositionUpdate,f]),onCompositionStart:ze(R=>{if(le.hasSelectableTarget(f,R.target)){var U;if((U=I.current)===null||U===void 0||U.handleCompositionStart(R),Yt(R,v.onCompositionStart)||Xt)return;C(!0);var{selection:W}=f;if(W&&te.isExpanded(W)){D.deleteFragment(f);return}}},[v.onCompositionStart,f]),onCopy:ze(R=>{le.hasSelectableTarget(f,R.target)&&!Yt(R,v.onCopy)&&!zd(R)&&(R.preventDefault(),le.setFragmentData(f,R.clipboardData,"copy"))},[v.onCopy,f]),onCut:ze(R=>{if(!i&&le.hasSelectableTarget(f,R.target)&&!Yt(R,v.onCut)&&!zd(R)){R.preventDefault(),le.setFragmentData(f,R.clipboardData,"cut");var{selection:U}=f;if(U)if(te.isExpanded(U))D.deleteFragment(f);else{var W=Ee.parent(f,U.anchor.path);D.isVoid(f,W)&&ge.delete(f)}}},[i,f,v.onCut]),onDragOver:ze(R=>{if(le.hasTarget(f,R.target)&&!Yt(R,v.onDragOver)){var U=le.toSlateNode(f,R.target);Te.isElement(U)&&D.isVoid(f,U)&&R.preventDefault()}},[v.onDragOver,f]),onDragStart:ze(R=>{if(!i&&le.hasTarget(f,R.target)&&!Yt(R,v.onDragStart)){var U=le.toSlateNode(f,R.target),W=le.findPath(f,U),K=Te.isElement(U)&&D.isVoid(f,U)||D.void(f,{at:W,voids:!0});if(K){var J=D.range(f,W);ge.select(f,J)}N.isDraggingInternally=!0,le.setFragmentData(f,R.dataTransfer,"drag")}},[i,f,v.onDragStart,N]),onDrop:ze(R=>{if(!i&&le.hasTarget(f,R.target)&&!Yt(R,v.onDrop)){R.preventDefault();var U=f.selection,W=le.findEventRange(f,R),K=R.dataTransfer;ge.select(f,W),N.isDraggingInternally&&U&&!te.equals(U,W)&&!D.void(f,{at:W,voids:!0})&&ge.delete(f,{at:U}),le.insertData(f,K),le.isFocused(f)||le.focus(f)}},[i,f,v.onDrop,N]),onDragEnd:ze(R=>{!i&&N.isDraggingInternally&&v.onDragEnd&&le.hasTarget(f,R.target)&&v.onDragEnd(R)},[i,N,v,f]),onFocus:ze(R=>{if(!i&&!N.isUpdatingSelection&&le.hasEditableTarget(f,R.target)&&!Yt(R,v.onFocus)){var U=le.toDOMNode(f,f),W=le.findDocumentOrShadowRoot(f);if(N.latestElement=W.activeElement,Rn&&R.target!==U){U.focus();return}Vr.set(f,!0)}},[i,N,f,v.onFocus]),onKeyDown:ze(R=>{if(!i&&le.hasEditableTarget(f,R.target)){var U;(U=I.current)===null||U===void 0||U.handleKeyDown(R);var{nativeEvent:W}=R;if(le.isComposing(f)&&W.isComposing===!1&&(cn.set(f,!1),C(!1)),Yt(R,v.onKeyDown)||le.isComposing(f))return;var{selection:K}=f,J=f.children[K!==null?K.focus.path[0]:0],Q=Gp(Ee.string(J))==="rtl";if(kt.isRedo(W)){R.preventDefault();var ee=f;typeof ee.redo=="function"&&ee.redo();return}if(kt.isUndo(W)){R.preventDefault();var oe=f;typeof oe.undo=="function"&&oe.undo();return}if(kt.isMoveLineBackward(W)){R.preventDefault(),ge.move(f,{unit:"line",reverse:!0});return}if(kt.isMoveLineForward(W)){R.preventDefault(),ge.move(f,{unit:"line"});return}if(kt.isExtendLineBackward(W)){R.preventDefault(),ge.move(f,{unit:"line",edge:"focus",reverse:!0});return}if(kt.isExtendLineForward(W)){R.preventDefault(),ge.move(f,{unit:"line",edge:"focus"});return}if(kt.isMoveBackward(W)){R.preventDefault(),K&&te.isCollapsed(K)?ge.move(f,{reverse:!Q}):ge.collapse(f,{edge:Q?"end":"start"});return}if(kt.isMoveForward(W)){R.preventDefault(),K&&te.isCollapsed(K)?ge.move(f,{reverse:Q}):ge.collapse(f,{edge:Q?"start":"end"});return}if(kt.isMoveWordBackward(W)){R.preventDefault(),K&&te.isExpanded(K)&&ge.collapse(f,{edge:"focus"}),ge.move(f,{unit:"word",reverse:!Q});return}if(kt.isMoveWordForward(W)){R.preventDefault(),K&&te.isExpanded(K)&&ge.collapse(f,{edge:"focus"}),ge.move(f,{unit:"word",reverse:Q});return}if(zr){if((ih||sn)&&K&&(kt.isDeleteBackward(W)||kt.isDeleteForward(W))&&te.isCollapsed(K)){var re=Ee.parent(f,K.anchor.path);if(Te.isElement(re)&&D.isVoid(f,re)&&(D.isInline(f,re)||D.isBlock(f,re))){R.preventDefault(),D.deleteBackward(f,{unit:"block"});return}}}else{if(kt.isBold(W)||kt.isItalic(W)||kt.isTransposeCharacter(W)){R.preventDefault();return}if(kt.isSoftBreak(W)){R.preventDefault(),D.insertSoftBreak(f);return}if(kt.isSplitBlock(W)){R.preventDefault(),D.insertBreak(f);return}if(kt.isDeleteBackward(W)){R.preventDefault(),K&&te.isExpanded(K)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f);return}if(kt.isDeleteForward(W)){R.preventDefault(),K&&te.isExpanded(K)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f);return}if(kt.isDeleteLineBackward(W)){R.preventDefault(),K&&te.isExpanded(K)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f,{unit:"line"});return}if(kt.isDeleteLineForward(W)){R.preventDefault(),K&&te.isExpanded(K)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f,{unit:"line"});return}if(kt.isDeleteWordBackward(W)){R.preventDefault(),K&&te.isExpanded(K)?D.deleteFragment(f,{direction:"backward"}):D.deleteBackward(f,{unit:"word"});return}if(kt.isDeleteWordForward(W)){R.preventDefault(),K&&te.isExpanded(K)?D.deleteFragment(f,{direction:"forward"}):D.deleteForward(f,{unit:"word"});return}}}},[i,f,v.onKeyDown]),onPaste:ze(R=>{!i&&le.hasEditableTarget(f,R.target)&&!Yt(R,v.onPaste)&&(!zr||sD(R.nativeEvent)||sn)&&(R.preventDefault(),le.insertData(f,R.clipboardData))},[i,f,v.onPaste])}),he.createElement(fw,{decorations:S,node:f,renderElement:u,renderPlaceholder:c,renderLeaf:s,selection:f.selection}))))))}),pw=e=>{var{attributes:t,children:r}=e;return he.createElement("span",wr({},t),r,Xt&&he.createElement("br",null))},hw=()=>[],gw=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&te.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),A1(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},Yt=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},zd=e=>Xr(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),mw=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},vw=jr(!1),bw=jr({});function yw(e){var t=ct([]).current,r=ct({editor:e}).current,n=ze(a=>{r.editor=a,t.forEach(l=>l(a))},[t,r]),o=Je(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var Cw=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],pl=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:l}=e,i=Hn(e,Cw),[u,s]=he.useState(()=>{if(!Ee.isNodeList(l))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Mt.stringify(l)));if(!D.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Mt.stringify(t)));return t.children=l,Object.assign(t,i),{v:0,editor:t}}),{selectorContext:c,onChange:p}=yw(t),d=ze(v=>{var f;switch(n&&n(t.children),v==null||(f=v.operation)===null||f===void 0?void 0:f.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}s(b=>({v:b.v+1,editor:t})),p(t)},[t,p,n,o,a]);yt(()=>(Zl.set(t,d),()=>{Zl.set(t,()=>{})}),[t,d]);var[h,g]=ut(le.isFocused(t));return yt(()=>{g(le.isFocused(t))},[t]),zo(()=>{var v=()=>g(le.isFocused(t));return oh>=17?(document.addEventListener("focusin",v),document.addEventListener("focusout",v),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",v)}):(document.addEventListener("focus",v,!0),document.addEventListener("blur",v,!0),()=>{document.removeEventListener("focus",v,!0),document.removeEventListener("blur",v,!0)})},[]),he.createElement(bw.Provider,{value:c},he.createElement(Dh.Provider,{value:u},he.createElement(Gs.Provider,{value:u.editor},he.createElement(vw.Provider,{value:h},r))))},Kd=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},Hd=(e,t,r)=>{var n=le.toDOMRange(e,t).getBoundingClientRect(),o=le.toDOMRange(e,r).getBoundingClientRect();return Kd(n,o)&&Kd(o,n)},xw=(e,t)=>{var r=D.range(e,te.end(t)),n=Array.from(D.positions(e,{at:t})),o=0,a=n.length,l=Math.floor(a/2);if(Hd(e,D.range(e,n[o]),r))return D.range(e,n[o],r);if(n.length<2)return D.range(e,n[n.length-1],r);for(;l!==n.length&&l!==o;)Hd(e,D.range(e,n[l]),r)?a=l:o=l,l=Math.floor((o+a)/2);return D.range(e,n[a],r)};function Wd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wd(Object(r),!0).forEach(function(n){cr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Dw=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:o,deleteBackward:a,addMark:l,removeMark:i}=r;return bi.set(r,new WeakMap),r.addMark=(u,s)=>{var c,p;(c=Zs.get(r))===null||c===void 0||c(),!hr.get(r)&&(p=tr.get(r))!==null&&p!==void 0&&p.length&&hr.set(r,null),Pr.delete(r),l(u,s)},r.removeMark=u=>{var s;!hr.get(r)&&(s=tr.get(r))!==null&&s!==void 0&&s.length&&hr.set(r,null),Pr.delete(r),i(u)},r.deleteBackward=u=>{if(u!=="line")return a(u);if(r.selection&&te.isCollapsed(r.selection)){var s=D.above(r,{match:h=>Te.isElement(h)&&D.isBlock(r,h),at:r.selection});if(s){var[,c]=s,p=D.range(r,c,r.selection.anchor),d=xw(r,p);te.isCollapsed(d)||ge.delete(r,{at:d})}}},r.apply=u=>{var s=[],c=[],p=tr.get(r);if(p!=null&&p.length){var d=p.map(T=>wD(T,u)).filter(Boolean);tr.set(r,d)}var h=Ur.get(r);h&&Ur.set(r,Od(r,h,u));var g=qr.get(r);if(g!=null&&g.at){var v=at.isPoint(g==null?void 0:g.at)?es(r,g.at,u):Od(r,g.at,u);qr.set(r,v?qd(qd({},g),{},{at:v}):null)}switch(u.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{s.push(...Nn(r,u.path));break}case"set_selection":{var f;(f=ko.get(r))===null||f===void 0||f.unref(),ko.delete(r);break}case"insert_node":case"remove_node":{s.push(...Nn(r,L.parent(u.path)));break}case"merge_node":{var b=L.previous(u.path);s.push(...Nn(r,b));break}case"move_node":{var C=L.common(L.parent(u.path),L.parent(u.newPath));s.push(...Nn(r,C));var y;L.isBefore(u.path,u.newPath)?(s.push(...Nn(r,L.parent(u.path))),y=u.newPath):(s.push(...Nn(r,L.parent(u.newPath))),y=u.path);var x=Ee.get(e,L.parent(y)),B=le.findKey(r,x),A=D.pathRef(r,L.parent(y));c.push([A,B]);break}}switch(n(u),u.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":Ln.set(r,!0)}for(var[$,F]of s){var[w]=D.node(r,$);Ya.set(w,F)}for(var[j,N]of c){if(j.current){var[I]=D.node(r,j.current);Ya.set(I,N)}j.unref()}},r.setFragmentData=u=>{var{selection:s}=r;if(s){var[c,p]=te.edges(s),d=D.void(r,{at:c.path}),h=D.void(r,{at:p.path});if(!(te.isCollapsed(s)&&!d)){var g=le.toDOMRange(r,s),v=g.cloneContents(),f=v.childNodes[0];if(v.childNodes.forEach(w=>{w.textContent&&w.textContent.trim()!==""&&(f=w)}),h){var[b]=h,C=g.cloneRange(),y=le.toDOMNode(r,b);C.setEndAfter(y),v=C.cloneContents()}if(d&&(f=v.querySelector("[data-slate-spacer]")),Array.from(v.querySelectorAll("[data-slate-zero-width]")).forEach(w=>{var j=w.getAttribute("data-slate-zero-width")==="n";w.textContent=j?`
|
|
112
|
+
`:""}),dh(f)){var x=f.ownerDocument.createElement("span");x.style.whiteSpace="pre",x.appendChild(f),v.appendChild(x),f=x}var B=r.getFragment(),A=JSON.stringify(B),$=window.btoa(encodeURIComponent(A));f.setAttribute("data-slate-fragment",$),u.setData("application/".concat(t),$);var F=v.ownerDocument.createElement("div");return F.appendChild(v),F.setAttribute("hidden","true"),v.ownerDocument.body.appendChild(F),u.setData("text/html",F.innerHTML),u.setData("text/plain",ph(F)),v.ownerDocument.body.removeChild(F),u}}},r.insertData=u=>{r.insertFragmentData(u)||r.insertTextData(u)},r.insertFragmentData=u=>{var s=u.getData("application/".concat(t))||pD(u);if(s){var c=decodeURIComponent(window.atob(s)),p=JSON.parse(c);return r.insertFragment(p),!0}return!1},r.insertTextData=u=>{var s=u.getData("text/plain");if(s){var c=s.split(/\r\n|\r|\n/),p=!1;for(var d of c)p&&ge.splitNodes(r,{always:!0}),r.insertText(d),p=!0;return!0}return!1},r.onChange=u=>{var s=oh<18?Dl.unstable_batchedUpdates:c=>c();s(()=>{var c=Zl.get(r);c&&c(u),o(u)})},r},Nn=(e,t)=>{var r=[];for(var[n,o]of D.levels(e,{at:t})){var a=le.findKey(e,n);r.push([o,a])}return r};function eu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var wn=eu();function Sh(e){wn=e}var Ao={exec:()=>null};function gt(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let l=typeof a=="string"?a:a.source;return l=l.replace(Zt.caret,"$1"),r=r.replace(o,l),n},getRegex:()=>new RegExp(r,t)};return n}var Zt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},ww=/^(?:[ \t]*(?:\n|$))+/,Ew=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tu=/(?:[*+-]|\d{1,9}[.)])/,kh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bh=gt(kh).replace(/bull/g,tu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Bw=gt(kh).replace(/bull/g,tu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ru=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Aw=/^[^\n]+/,nu=/(?!\s*\])(?:\\.|[^\[\]\\])+/,$w=gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",nu).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fw=gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tu).getRegex(),yi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ou=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Nw=gt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ou).replace("tag",yi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ah=gt(ru).replace("hr",Xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yi).getRegex(),Ow=gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ah).getRegex(),au={blockquote:Ow,code:Ew,def:$w,fences:Sw,heading:kw,hr:Xo,html:Nw,lheading:Bh,list:Fw,newline:ww,paragraph:Ah,table:Ao,text:Aw},Ud=gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yi).getRegex(),Pw={...au,lheading:Bw,table:Ud,paragraph:gt(ru).replace("hr",Xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ud).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yi).getRegex()},Rw={...au,html:gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ou).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ao,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:gt(ru).replace("hr",Xo).replace("heading",` *#{1,6} *[^
|
|
113
|
+
]`).replace("lheading",Bh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Tw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Iw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$h=/^( {2,}|\\)\n(?!\s*$)/,jw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ci=/[\p{P}\p{S}]/u,iu=/[\s\p{P}\p{S}]/u,Fh=/[^\s\p{P}\p{S}]/u,_w=gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,iu).getRegex(),Nh=/(?!~)[\p{P}\p{S}]/u,Mw=/(?!~)[\s\p{P}\p{S}]/u,Lw=/(?:[^\s\p{P}\p{S}]|~)/u,zw=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Oh=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Kw=gt(Oh,"u").replace(/punct/g,Ci).getRegex(),Hw=gt(Oh,"u").replace(/punct/g,Nh).getRegex(),Ph="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ww=gt(Ph,"gu").replace(/notPunctSpace/g,Fh).replace(/punctSpace/g,iu).replace(/punct/g,Ci).getRegex(),qw=gt(Ph,"gu").replace(/notPunctSpace/g,Lw).replace(/punctSpace/g,Mw).replace(/punct/g,Nh).getRegex(),Uw=gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Fh).replace(/punctSpace/g,iu).replace(/punct/g,Ci).getRegex(),Vw=gt(/\\(punct)/,"gu").replace(/punct/g,Ci).getRegex(),Gw=gt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Yw=gt(ou).replace("(?:-->|$)","-->").getRegex(),Xw=gt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Yw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Zw=gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Xa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Rh=gt(/^!?\[(label)\]\[(ref)\]/).replace("label",Xa).replace("ref",nu).getRegex(),Th=gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",nu).getRegex(),Jw=gt("reflink|nolink(?!\\()","g").replace("reflink",Rh).replace("nolink",Th).getRegex(),lu={_backpedal:Ao,anyPunctuation:Vw,autolink:Gw,blockSkip:zw,br:$h,code:Iw,del:Ao,emStrongLDelim:Kw,emStrongRDelimAst:Ww,emStrongRDelimUnd:Uw,escape:Tw,link:Zw,nolink:Th,punctuation:_w,reflink:Rh,reflinkSearch:Jw,tag:Xw,text:jw,url:Ao},Qw={...lu,link:gt(/^!?\[(label)\]\((.*?)\)/).replace("label",Xa).getRegex(),reflink:gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xa).getRegex()},rs={...lu,emStrongRDelimAst:qw,emStrongLDelim:Hw,url:gt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},eE={...rs,br:gt($h).replace("{2,}","*").getRegex(),text:gt(rs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ha={normal:au,gfm:Pw,pedantic:Rw},go={normal:lu,gfm:rs,breaks:eE,pedantic:Qw},tE={"&":"&","<":"<",">":">",'"':""","'":"'"},Vd=e=>tE[e];function Er(e,t){if(t){if(Zt.escapeTest.test(e))return e.replace(Zt.escapeReplace,Vd)}else if(Zt.escapeTestNoEncode.test(e))return e.replace(Zt.escapeReplaceNoEncode,Vd);return e}function Gd(e){try{e=encodeURI(e).replace(Zt.percentDecode,"%")}catch{return null}return e}function Yd(e,t){var a;const r=e.replace(Zt.findPipe,(l,i,u)=>{let s=!1,c=i;for(;--c>=0&&u[c]==="\\";)s=!s;return s?"|":" |"}),n=r.split(Zt.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(Zt.slashPipe,"|");return n}function mo(e,t,r){const n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function rE(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function Xd(e,t,r,n,o){const a=t.href,l=t.title||null,i=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:l,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,u}function nE(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const o=n[1];return t.split(`
|
|
114
|
+
`).map(a=>{const l=a.match(r.other.beginningSpace);if(l===null)return a;const[i]=l;return i.length>=o.length?a.slice(o.length):a}).join(`
|
|
115
|
+
`)}var Za=class{constructor(e){xt(this,"options"),xt(this,"rules"),xt(this,"lexer"),this.options=e||wn}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:mo(r,`
|
|
116
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=nE(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const n=mo(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:mo(t[0],`
|
|
117
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=mo(t[0],`
|
|
118
|
+
`).split(`
|
|
119
|
+
`),n="",o="";const a=[];for(;r.length>0;){let l=!1;const i=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))i.push(r[u]),l=!0;else if(!l)i.push(r[u]);else break;r=r.slice(u);const s=i.join(`
|
|
120
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
121
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
122
|
+
${s}`:s,o=o?`${o}
|
|
123
|
+
${c}`:c;const p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=p,r.length===0)break;const d=a.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){const h=d,g=h.raw+`
|
|
124
|
+
`+r.join(`
|
|
125
|
+
`),v=this.blockquote(g);a[a.length-1]=v,n=n.substring(0,n.length-h.raw.length)+v.raw,o=o.substring(0,o.length-h.text.length)+v.text;break}else if((d==null?void 0:d.type)==="list"){const h=d,g=h.raw+`
|
|
126
|
+
`+r.join(`
|
|
127
|
+
`),v=this.list(g);a[a.length-1]=v,n=n.substring(0,n.length-d.raw.length)+v.raw,o=o.substring(0,o.length-h.raw.length)+v.raw,r=g.substring(a.at(-1).raw.length).split(`
|
|
128
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let l=!1;for(;e;){let u=!1,s="",c="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let p=t[2].split(`
|
|
129
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=e.split(`
|
|
130
|
+
`,1)[0],h=!p.trim(),g=0;if(this.options.pedantic?(g=2,c=p.trimStart()):h?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,c=p.slice(g),g+=t[1].length),h&&this.rules.other.blankLine.test(d)&&(s+=d+`
|
|
131
|
+
`,e=e.substring(d.length+1),u=!0),!u){const b=this.rules.other.nextBulletRegex(g),C=this.rules.other.hrRegex(g),y=this.rules.other.fencesBeginRegex(g),x=this.rules.other.headingBeginRegex(g),B=this.rules.other.htmlBeginRegex(g);for(;e;){const A=e.split(`
|
|
132
|
+
`,1)[0];let $;if(d=A,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),$=d):$=d.replace(this.rules.other.tabCharGlobal," "),y.test(d)||x.test(d)||B.test(d)||b.test(d)||C.test(d))break;if($.search(this.rules.other.nonSpaceChar)>=g||!d.trim())c+=`
|
|
133
|
+
`+$.slice(g);else{if(h||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(p)||x.test(p)||C.test(p))break;c+=`
|
|
134
|
+
`+d}!h&&!d.trim()&&(h=!0),s+=A+`
|
|
135
|
+
`,e=e.substring(A.length+1),p=$.slice(g)}}o.loose||(l?o.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(l=!0));let v=null,f;this.options.gfm&&(v=this.rules.other.listIsTask.exec(c),v&&(f=v[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:s,task:!!v,checked:f,loose:!1,text:c,tokens:[]}),o.raw+=s}const i=o.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let u=0;u<o.items.length;u++)if(this.lexer.state.top=!1,o.items[u].tokens=this.lexer.blockTokens(o.items[u].text,[]),!o.loose){const s=o.items[u].tokens.filter(p=>p.type==="space"),c=s.length>0&&s.some(p=>this.rules.other.anyLine.test(p.raw));o.loose=c}if(o.loose)for(let u=0;u<o.items.length;u++)o.items[u].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:o}}}table(e){var l;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=Yd(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
136
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const i of n)this.rules.other.tableAlignRight.test(i)?a.align.push("right"):this.rules.other.tableAlignCenter.test(i)?a.align.push("center"):this.rules.other.tableAlignLeft.test(i)?a.align.push("left"):a.align.push(null);for(let i=0;i<r.length;i++)a.header.push({text:r[i],tokens:this.lexer.inline(r[i]),header:!0,align:a.align[i]});for(const i of o)a.rows.push(Yd(i,a.header.length).map((u,s)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[s]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
137
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=mo(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=rE(t[2],"()");if(a===-2)return;if(a>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Xd(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[n.toLowerCase()];if(!o){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Xd(r,o,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){const o=[...n[0]].length-1;let a,l,i=o,u=0;const s=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+o);(n=s.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(l=[...a].length,n[3]||n[4]){i+=l;continue}else if((n[5]||n[6])&&o%3&&!((o+l)%3)){u+=l;continue}if(i-=l,i>0)continue;l=Math.min(l,l+i+u);const c=[...n[0]][0].length,p=e.slice(0,o+n.index+c+l);if(Math.min(o,l)%2){const h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}const d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Rr=class ns{constructor(t){xt(this,"tokens"),xt(this,"options"),xt(this,"state"),xt(this,"tokenizer"),xt(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||wn,this.options.tokenizer=this.options.tokenizer||new Za,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:Zt,block:ha.normal,inline:go.normal};this.options.pedantic?(r.block=ha.pedantic,r.inline=go.pedantic):this.options.gfm&&(r.block=ha.gfm,this.options.breaks?r.inline=go.breaks:r.inline=go.gfm),this.tokenizer.rules=r}static get rules(){return{block:ha,inline:go}}static lex(t,r){return new ns(r).lex(t)}static lexInline(t,r){return new ns(r).inlineTokens(t)}lex(t){t=t.replace(Zt.carriageReturn,`
|
|
138
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var o,a,l;for(this.options.pedantic&&(t=t.replace(Zt.tabCharGlobal," ").replace(Zt.spaceLine,""));t;){let i;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(s=>(i=s.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);const s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
|
|
139
|
+
`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="paragraph"||(s==null?void 0:s.type)==="text"?(s.raw+=`
|
|
140
|
+
`+i.raw,s.text+=`
|
|
141
|
+
`+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="paragraph"||(s==null?void 0:s.type)==="text"?(s.raw+=`
|
|
142
|
+
`+i.raw,s.text+=`
|
|
143
|
+
`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let u=t;if((l=this.options.extensions)!=null&&l.startBlock){let s=1/0;const c=t.slice(1);let p;this.options.extensions.startBlock.forEach(d=>{p=d.call({lexer:this},c),typeof p=="number"&&p>=0&&(s=Math.min(s,p))}),s<1/0&&s>=0&&(u=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(u))){const s=r.at(-1);n&&(s==null?void 0:s.type)==="paragraph"?(s.raw+=`
|
|
144
|
+
`+i.raw,s.text+=`
|
|
145
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=u.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="text"?(s.raw+=`
|
|
146
|
+
`+i.raw,s.text+=`
|
|
147
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var i,u,s;let n=t,o=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,l="";for(;t;){a||(l=""),a=!1;let c;if((u=(i=this.options.extensions)==null?void 0:i.inline)!=null&&u.some(d=>(c=d.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);const d=r.at(-1);c.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=c.raw,d.text+=c.text):r.push(c);continue}if(c=this.tokenizer.emStrong(t,n,l)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),r.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),r.push(c);continue}let p=t;if((s=this.options.extensions)!=null&&s.startInline){let d=1/0;const h=t.slice(1);let g;this.options.extensions.startInline.forEach(v=>{g=v.call({lexer:this},h),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(p=t.substring(0,d+1))}if(c=this.tokenizer.inlineText(p)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(l=c.raw.slice(-1)),a=!0;const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=c.raw,d.text+=c.text):r.push(c);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return r}},Ja=class{constructor(e){xt(this,"options"),xt(this,"parser"),this.options=e||wn}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(Zt.notSpaceStart))==null?void 0:a[0],o=e.replace(Zt.endingNewline,"")+`
|
|
148
|
+
`;return n?'<pre><code class="language-'+Er(n)+'">'+(r?o:Er(o,!0))+`</code></pre>
|
|
149
|
+
`:"<pre><code>"+(r?o:Er(o,!0))+`</code></pre>
|
|
150
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
151
|
+
${this.parser.parse(e)}</blockquote>
|
|
152
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
153
|
+
`}hr(e){return`<hr>
|
|
154
|
+
`}list(e){const t=e.ordered,r=e.start;let n="";for(let l=0;l<e.items.length;l++){const i=e.items[l];n+=this.listitem(i)}const o=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+o+a+`>
|
|
155
|
+
`+n+"</"+o+`>
|
|
156
|
+
`}listitem(e){var r;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Er(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
157
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
158
|
+
`}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const a=e.rows[o];r="";for(let l=0;l<a.length;l++)r+=this.tablecell(a[l]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
159
|
+
<thead>
|
|
160
|
+
`+t+`</thead>
|
|
161
|
+
`+n+`</table>
|
|
162
|
+
`}tablerow({text:e}){return`<tr>
|
|
163
|
+
${e}</tr>
|
|
164
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
165
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Er(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=Gd(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Er(t)+'"'),a+=">"+n+"</a>",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=Gd(e);if(o===null)return Er(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Er(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Er(e.text)}},su=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Tr=class os{constructor(t){xt(this,"options"),xt(this,"renderer"),xt(this,"textRenderer"),this.options=t||wn,this.options.renderer=this.options.renderer||new Ja,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new su}static parse(t,r){return new os(r).parse(t)}static parseInline(t,r){return new os(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let l=0;l<t.length;l++){const i=t[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[i.type]){const s=i,c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){n+=c||"";continue}}const u=i;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let s=u,c=this.renderer.text(s);for(;l+1<t.length&&t[l+1].type==="text";)s=t[++l],c+=`
|
|
166
|
+
`+this.renderer.text(s);r?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const s='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,r=this.renderer){var o,a;let n="";for(let l=0;l<t.length;l++){const i=t[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[i.type]){const s=this.options.extensions.renderers[i.type].call({parser:this},i);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=s||"";continue}}const u=i;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{const s='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}},hl,Ba=(hl=class{constructor(e){xt(this,"options"),xt(this,"block"),this.options=e||wn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Rr.lex:Rr.lexInline}provideParser(){return this.block?Tr.parse:Tr.parseInline}},xt(hl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),hl),oE=class{constructor(...e){xt(this,"defaults",eu()),xt(this,"options",this.setOptions),xt(this,"parse",this.parseMarkdown(!0)),xt(this,"parseInline",this.parseMarkdown(!1)),xt(this,"Parser",Tr),xt(this,"Renderer",Ja),xt(this,"TextRenderer",su),xt(this,"Lexer",Rr),xt(this,"Tokenizer",Za),xt(this,"Hooks",Ba),this.use(...e)}walkTokens(e,t){var n,o;let r=[];for(const a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{const l=a;for(const i of l.header)r=r.concat(this.walkTokens(i.tokens,t));for(const i of l.rows)for(const u of i)r=r.concat(this.walkTokens(u.tokens,t));break}case"list":{const l=a;r=r.concat(this.walkTokens(l.items,t));break}default:{const l=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[l.type]?this.defaults.extensions.childTokens[l.type].forEach(i=>{const u=l[i].flat(1/0);r=r.concat(this.walkTokens(u,t))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const a=t.renderers[o.name];a?t.renderers[o.name]=function(...l){let i=o.renderer.apply(this,l);return i===!1&&(i=a.apply(this,l)),i}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=this.defaults.renderer||new Ja(this.defaults);for(const a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const l=a,i=r.renderer[l],u=o[l];o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Za(this.defaults);for(const a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const l=a,i=r.tokenizer[l],u=o[l];o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new Ba;for(const a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const l=a,i=r.hooks[l],u=o[l];Ba.passThroughHooks.has(a)?o[l]=s=>{if(this.defaults.async)return Promise.resolve(i.call(o,s)).then(p=>u.call(o,p));const c=i.call(o,s);return u.call(o,c)}:o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(l){let i=[];return i.push(a.call(this,l)),o&&(i=i.concat(o.call(this,l))),i}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Rr.lex(e,t??this.defaults)}parser(e,t){return Tr.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?Rr.lex:Rr.lexInline,i=o.hooks?o.hooks.provideParser():e?Tr.parse:Tr.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(u=>l(u,o)).then(u=>o.hooks?o.hooks.processAllTokens(u):u).then(u=>o.walkTokens?Promise.all(this.walkTokens(u,o.walkTokens)).then(()=>u):u).then(u=>i(u,o)).then(u=>o.hooks?o.hooks.postprocess(u):u).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let u=l(t,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let s=i(u,o);return o.hooks&&(s=o.hooks.postprocess(s)),s}catch(u){return a(u)}}}onError(e,t){return r=>{if(r.message+=`
|
|
167
|
+
Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Er(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Dn=new oE;function pt(e,t){return Dn.parse(e,t)}pt.options=pt.setOptions=function(e){return Dn.setOptions(e),pt.defaults=Dn.defaults,Sh(pt.defaults),pt};pt.getDefaults=eu;pt.defaults=wn;pt.use=function(...e){return Dn.use(...e),pt.defaults=Dn.defaults,Sh(pt.defaults),pt};pt.walkTokens=function(e,t){return Dn.walkTokens(e,t)};pt.parseInline=Dn.parseInline;pt.Parser=Tr;pt.parser=Tr.parse;pt.Renderer=Ja;pt.TextRenderer=su;pt.Lexer=Rr;pt.lexer=Rr.lex;pt.Tokenizer=Za;pt.Hooks=Ba;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;Tr.parse;Rr.lex;var nr=function(){return nr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},nr.apply(this,arguments)};function Qa(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var wt="-ms-",$o="-moz-",ht="-webkit-",Ih="comm",xi="rule",uu="decl",aE="@import",jh="@keyframes",iE="@layer",_h=Math.abs,cu=String.fromCharCode,as=Object.assign;function lE(e,t){return _t(e,0)^45?(((t<<2^_t(e,0))<<2^_t(e,1))<<2^_t(e,2))<<2^_t(e,3):0}function Mh(e){return e.trim()}function Or(e,t){return(e=t.exec(e))?e[0]:e}function rt(e,t,r){return e.replace(t,r)}function Aa(e,t,r){return e.indexOf(t,r)}function _t(e,t){return e.charCodeAt(t)|0}function qn(e,t,r){return e.slice(t,r)}function Sr(e){return e.length}function Lh(e){return e.length}function yo(e,t){return t.push(e),e}function sE(e,t){return e.map(t).join("")}function Zd(e,t){return e.filter(function(r){return!Or(r,t)})}var Di=1,Un=1,zh=0,dr=0,Pt=0,no="";function wi(e,t,r,n,o,a,l,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Di,column:Un,length:l,return:"",siblings:i}}function Hr(e,t){return as(wi("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function On(e){for(;e.root;)e=Hr(e.root,{children:[e]});yo(e,e.siblings)}function uE(){return Pt}function cE(){return Pt=dr>0?_t(no,--dr):0,Un--,Pt===10&&(Un=1,Di--),Pt}function mr(){return Pt=dr<zh?_t(no,dr++):0,Un++,Pt===10&&(Un=1,Di++),Pt}function gn(){return _t(no,dr)}function $a(){return dr}function Ei(e,t){return qn(no,e,t)}function is(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dE(e){return Di=Un=1,zh=Sr(no=e),dr=0,[]}function fE(e){return no="",e}function gl(e){return Mh(Ei(dr-1,ls(e===91?e+2:e===40?e+1:e)))}function pE(e){for(;(Pt=gn())&&Pt<33;)mr();return is(e)>2||is(Pt)>3?"":" "}function hE(e,t){for(;--t&&mr()&&!(Pt<48||Pt>102||Pt>57&&Pt<65||Pt>70&&Pt<97););return Ei(e,$a()+(t<6&&gn()==32&&mr()==32))}function ls(e){for(;mr();)switch(Pt){case e:return dr;case 34:case 39:e!==34&&e!==39&&ls(Pt);break;case 40:e===41&&ls(e);break;case 92:mr();break}return dr}function gE(e,t){for(;mr()&&e+Pt!==57&&!(e+Pt===84&&gn()===47););return"/*"+Ei(t,dr-1)+"*"+cu(e===47?e:mr())}function mE(e){for(;!is(gn());)mr();return Ei(e,dr)}function vE(e){return fE(Fa("",null,null,null,[""],e=dE(e),0,[0],e))}function Fa(e,t,r,n,o,a,l,i,u){for(var s=0,c=0,p=l,d=0,h=0,g=0,v=1,f=1,b=1,C=0,y="",x=o,B=a,A=n,$=y;f;)switch(g=C,C=mr()){case 40:if(g!=108&&_t($,p-1)==58){Aa($+=rt(gl(C),"&","&\f"),"&\f",_h(s?i[s-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:$+=gl(C);break;case 9:case 10:case 13:case 32:$+=pE(g);break;case 92:$+=hE($a()-1,7);continue;case 47:switch(gn()){case 42:case 47:yo(bE(gE(mr(),$a()),t,r,u),u);break;default:$+="/"}break;case 123*v:i[s++]=Sr($)*b;case 125*v:case 59:case 0:switch(C){case 0:case 125:f=0;case 59+c:b==-1&&($=rt($,/\f/g,"")),h>0&&Sr($)-p&&yo(h>32?Qd($+";",n,r,p-1,u):Qd(rt($," ","")+";",n,r,p-2,u),u);break;case 59:$+=";";default:if(yo(A=Jd($,t,r,s,c,o,i,y,x=[],B=[],p,a),a),C===123)if(c===0)Fa($,t,A,A,x,a,p,i,B);else switch(d===99&&_t($,3)===110?100:d){case 100:case 108:case 109:case 115:Fa(e,A,A,n&&yo(Jd(e,A,A,0,0,o,i,y,o,x=[],p,B),B),o,B,p,i,n?x:B);break;default:Fa($,A,A,A,[""],B,0,i,B)}}s=c=h=0,v=b=1,y=$="",p=l;break;case 58:p=1+Sr($),h=g;default:if(v<1){if(C==123)--v;else if(C==125&&v++==0&&cE()==125)continue}switch($+=cu(C),C*v){case 38:b=c>0?1:($+="\f",-1);break;case 44:i[s++]=(Sr($)-1)*b,b=1;break;case 64:gn()===45&&($+=gl(mr())),d=gn(),c=p=Sr(y=$+=mE($a())),C++;break;case 45:g===45&&Sr($)==2&&(v=0)}}return a}function Jd(e,t,r,n,o,a,l,i,u,s,c,p){for(var d=o-1,h=o===0?a:[""],g=Lh(h),v=0,f=0,b=0;v<n;++v)for(var C=0,y=qn(e,d+1,d=_h(f=l[v])),x=e;C<g;++C)(x=Mh(f>0?h[C]+" "+y:rt(y,/&\f/g,h[C])))&&(u[b++]=x);return wi(e,t,r,o===0?xi:i,u,s,c,p)}function bE(e,t,r,n){return wi(e,t,r,Ih,cu(uE()),qn(e,2,-2),0,n)}function Qd(e,t,r,n,o){return wi(e,t,r,uu,qn(e,0,n),qn(e,n+1,-1),n,o)}function Kh(e,t,r){switch(lE(e,t)){case 5103:return ht+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ht+e+e;case 4789:return $o+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ht+e+$o+e+wt+e+e;case 5936:switch(_t(e,t+11)){case 114:return ht+e+wt+rt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ht+e+wt+rt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ht+e+wt+rt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return ht+e+wt+e+e;case 6165:return ht+e+wt+"flex-"+e+e;case 5187:return ht+e+rt(e,/(\w+).+(:[^]+)/,ht+"box-$1$2"+wt+"flex-$1$2")+e;case 5443:return ht+e+wt+"flex-item-"+rt(e,/flex-|-self/g,"")+(Or(e,/flex-|baseline/)?"":wt+"grid-row-"+rt(e,/flex-|-self/g,""))+e;case 4675:return ht+e+wt+"flex-line-pack"+rt(e,/align-content|flex-|-self/g,"")+e;case 5548:return ht+e+wt+rt(e,"shrink","negative")+e;case 5292:return ht+e+wt+rt(e,"basis","preferred-size")+e;case 6060:return ht+"box-"+rt(e,"-grow","")+ht+e+wt+rt(e,"grow","positive")+e;case 4554:return ht+rt(e,/([^-])(transform)/g,"$1"+ht+"$2")+e;case 6187:return rt(rt(rt(e,/(zoom-|grab)/,ht+"$1"),/(image-set)/,ht+"$1"),e,"")+e;case 5495:case 3959:return rt(e,/(image-set\([^]*)/,ht+"$1$`$1");case 4968:return rt(rt(e,/(.+:)(flex-)?(.*)/,ht+"box-pack:$3"+wt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ht+e+e;case 4200:if(!Or(e,/flex-|baseline/))return wt+"grid-column-align"+qn(e,t)+e;break;case 2592:case 3360:return wt+rt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,Or(n.props,/grid-\w+-end/)})?~Aa(e+(r=r[t].value),"span",0)?e:wt+rt(e,"-start","")+e+wt+"grid-row-span:"+(~Aa(r,"span",0)?Or(r,/\d+/):+Or(r,/\d+/)-+Or(e,/\d+/))+";":wt+rt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return Or(n.props,/grid-\w+-start/)})?e:wt+rt(rt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return rt(e,/(.+)-inline(.+)/,ht+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Sr(e)-1-t>6)switch(_t(e,t+1)){case 109:if(_t(e,t+4)!==45)break;case 102:return rt(e,/(.+:)(.+)-([^]+)/,"$1"+ht+"$2-$3$1"+$o+(_t(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Aa(e,"stretch",0)?Kh(rt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return rt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,l,i,u,s){return wt+o+":"+a+s+(l?wt+o+"-span:"+(i?u:+u-+a)+s:"")+e});case 4949:if(_t(e,t+6)===121)return rt(e,":",":"+ht)+e;break;case 6444:switch(_t(e,_t(e,14)===45?18:11)){case 120:return rt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+ht+(_t(e,14)===45?"inline-":"")+"box$3$1"+ht+"$2$3$1"+wt+"$2box$3")+e;case 100:return rt(e,":",":"+wt)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return rt(e,"scroll-","scroll-snap-")+e}return e}function ei(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function yE(e,t,r,n){switch(e.type){case iE:if(e.children.length)break;case aE:case uu:return e.return=e.return||e.value;case Ih:return"";case jh:return e.return=e.value+"{"+ei(e.children,n)+"}";case xi:if(!Sr(e.value=e.props.join(",")))return""}return Sr(r=ei(e.children,n))?e.return=e.value+"{"+r+"}":""}function CE(e){var t=Lh(e);return function(r,n,o,a){for(var l="",i=0;i<t;i++)l+=e[i](r,n,o,a)||"";return l}}function xE(e){return function(t){t.root||(t=t.return)&&e(t)}}function DE(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case uu:e.return=Kh(e.value,e.length,r);return;case jh:return ei([Hr(e,{value:rt(e.value,"@","@"+ht)})],n);case xi:if(e.length)return sE(r=e.props,function(o){switch(Or(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":On(Hr(e,{props:[rt(o,/:(read-\w+)/,":"+$o+"$1")]})),On(Hr(e,{props:[o]})),as(e,{props:Zd(r,n)});break;case"::placeholder":On(Hr(e,{props:[rt(o,/:(plac\w+)/,":"+ht+"input-$1")]})),On(Hr(e,{props:[rt(o,/:(plac\w+)/,":"+$o+"$1")]})),On(Hr(e,{props:[rt(o,/:(plac\w+)/,wt+"input-$1")]})),On(Hr(e,{props:[o]})),as(e,{props:Zd(r,n)});break}return""})}}var wE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vn=typeof process<"u"&&or!==void 0&&(or.REACT_APP_SC_ATTR||or.SC_ATTR)||"data-styled",Hh="active",Wh="data-styled-version",Si="6.1.19",du=`/*!sc*/
|
|
168
|
+
`,ti=typeof window<"u"&&typeof document<"u",EE=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&or!==void 0&&or.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&or.REACT_APP_SC_DISABLE_SPEEDY!==""?or.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&or.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&or!==void 0&&or.SC_DISABLE_SPEEDY!==void 0&&or.SC_DISABLE_SPEEDY!==""&&or.SC_DISABLE_SPEEDY!=="false"&&or.SC_DISABLE_SPEEDY),ki=Object.freeze([]),Gn=Object.freeze({});function SE(e,t,r){return r===void 0&&(r=Gn),e.theme!==r.theme&&e.theme||t||r.theme}var qh=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),kE=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,BE=/(^-|-$)/g;function ef(e){return e.replace(kE,"-").replace(BE,"")}var AE=/(a)(d)/gi,ga=52,tf=function(e){return String.fromCharCode(e+(e>25?39:97))};function ss(e){var t,r="";for(t=Math.abs(e);t>ga;t=t/ga|0)r=tf(t%ga)+r;return(tf(t%ga)+r).replace(AE,"$1-$2")}var ml,Uh=5381,Tn=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Vh=function(e){return Tn(Uh,e)};function $E(e){return ss(Vh(e)>>>0)}function FE(e){return e.displayName||e.name||"Component"}function vl(e){return typeof e=="string"&&!0}var Gh=typeof Symbol=="function"&&Symbol.for,Yh=Gh?Symbol.for("react.memo"):60115,NE=Gh?Symbol.for("react.forward_ref"):60112,OE={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},PE={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Xh={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},RE=((ml={})[NE]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ml[Yh]=Xh,ml);function rf(e){return("type"in(t=e)&&t.type.$$typeof)===Yh?Xh:"$$typeof"in e?RE[e.$$typeof]:OE;var t}var TE=Object.defineProperty,IE=Object.getOwnPropertyNames,nf=Object.getOwnPropertySymbols,jE=Object.getOwnPropertyDescriptor,_E=Object.getPrototypeOf,of=Object.prototype;function Zh(e,t,r){if(typeof t!="string"){if(of){var n=_E(t);n&&n!==of&&Zh(e,n,r)}var o=IE(t);nf&&(o=o.concat(nf(t)));for(var a=rf(e),l=rf(t),i=0;i<o.length;++i){var u=o[i];if(!(u in PE||r&&r[u]||l&&u in l||a&&u in a)){var s=jE(t,u);try{TE(e,u,s)}catch{}}}}return e}function Yn(e){return typeof e=="function"}function fu(e){return typeof e=="object"&&"styledComponentId"in e}function dn(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function af(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Ko(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function us(e,t,r){if(r===void 0&&(r=!1),!r&&!Ko(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=us(e[n],t[n]);else if(Ko(t))for(var n in t)e[n]=us(e[n],t[n]);return e}function pu(e,t){Object.defineProperty(e,"toString",{value:t})}function Zo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var ME=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,a=o;t>=a;)if((a<<=1)<0)throw Zo(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var l=o;l<a;l++)this.groupSizes[l]=0}for(var i=this.indexOfGroup(t+1),u=(l=0,r.length);l<u;l++)this.tag.insertRule(i,r[l])&&(this.groupSizes[t]++,i++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),o=n+r;this.groupSizes[t]=0;for(var a=n;a<o;a++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),a=o+n,l=o;l<a;l++)r+="".concat(this.tag.getRule(l)).concat(du);return r},e})(),Na=new Map,ri=new Map,Oa=1,ma=function(e){if(Na.has(e))return Na.get(e);for(;ri.has(Oa);)Oa++;var t=Oa++;return Na.set(e,t),ri.set(t,e),t},LE=function(e,t){Oa=t+1,Na.set(e,t),ri.set(t,e)},zE="style[".concat(Vn,"][").concat(Wh,'="').concat(Si,'"]'),KE=new RegExp("^".concat(Vn,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),HE=function(e,t,r){for(var n,o=r.split(","),a=0,l=o.length;a<l;a++)(n=o[a])&&e.registerName(t,n)},WE=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(du),o=[],a=0,l=n.length;a<l;a++){var i=n[a].trim();if(i){var u=i.match(KE);if(u){var s=0|parseInt(u[1],10),c=u[2];s!==0&&(LE(c,s),HE(e,c,u[3]),e.getTag().insertRules(s,o)),o.length=0}else o.push(i)}}},lf=function(e){for(var t=document.querySelectorAll(zE),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(Vn)!==Hh&&(WE(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function qE(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Jh=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(i){var u=Array.from(i.querySelectorAll("style[".concat(Vn,"]")));return u[u.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(Vn,Hh),n.setAttribute(Wh,Si);var l=qE();return l&&n.setAttribute("nonce",l),r.insertBefore(n,a),n},UE=(function(){function e(t){this.element=Jh(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,o=0,a=n.length;o<a;o++){var l=n[o];if(l.ownerNode===r)return l}throw Zo(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e})(),VE=(function(){function e(t){this.element=Jh(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),GE=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),sf=ti,YE={isServer:!ti,useCSSOMInjection:!EE},Qh=(function(){function e(t,r,n){t===void 0&&(t=Gn),r===void 0&&(r={});var o=this;this.options=nr(nr({},YE),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&ti&&sf&&(sf=!1,lf(this)),pu(this,function(){return(function(a){for(var l=a.getTag(),i=l.length,u="",s=function(p){var d=(function(b){return ri.get(b)})(p);if(d===void 0)return"continue";var h=a.names.get(d),g=l.getGroup(p);if(h===void 0||!h.size||g.length===0)return"continue";var v="".concat(Vn,".g").concat(p,'[id="').concat(d,'"]'),f="";h!==void 0&&h.forEach(function(b){b.length>0&&(f+="".concat(b,","))}),u+="".concat(g).concat(v,'{content:"').concat(f,'"}').concat(du)},c=0;c<i;c++)s(c);return u})(o)})}return e.registerId=function(t){return ma(t)},e.prototype.rehydrate=function(){!this.server&&ti&&lf(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(nr(nr({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(r){var n=r.useCSSOMInjection,o=r.target;return r.isServer?new GE(o):n?new UE(o):new VE(o)})(this.options),new ME(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(ma(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(ma(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(ma(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),XE=/&/g,ZE=/^\s*\/\/.*$/gm;function eg(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=eg(r.children,t)),r})}function JE(e){var t,r,n,o=Gn,a=o.options,l=a===void 0?Gn:a,i=o.plugins,u=i===void 0?ki:i,s=function(d,h,g){return g.startsWith(r)&&g.endsWith(r)&&g.replaceAll(r,"").length>0?".".concat(t):d},c=u.slice();c.push(function(d){d.type===xi&&d.value.includes("&")&&(d.props[0]=d.props[0].replace(XE,r).replace(n,s))}),l.prefix&&c.push(DE),c.push(yE);var p=function(d,h,g,v){h===void 0&&(h=""),g===void 0&&(g=""),v===void 0&&(v="&"),t=v,r=h,n=new RegExp("\\".concat(r,"\\b"),"g");var f=d.replace(ZE,""),b=vE(g||h?"".concat(g," ").concat(h," { ").concat(f," }"):f);l.namespace&&(b=eg(b,l.namespace));var C=[];return ei(b,CE(c.concat(xE(function(y){return C.push(y)})))),C};return p.hash=u.length?u.reduce(function(d,h){return h.name||Zo(15),Tn(d,h.name)},Uh).toString():"",p}var QE=new Qh,cs=JE(),tg=he.createContext({shouldForwardProp:void 0,styleSheet:QE,stylis:cs});tg.Consumer;he.createContext(void 0);function uf(){return Ho(tg)}var eS=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=cs);var l=n.name+a.hash;o.hasNameForId(n.id,l)||o.insertRules(n.id,l,a(n.rules,l,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,pu(this,function(){throw Zo(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=cs),this.name+t.hash},e})(),tS=function(e){return e>="A"&&e<="Z"};function cf(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;tS(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var rg=function(e){return e==null||e===!1||e===""},ng=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!rg(a)&&(Array.isArray(a)&&a.isCss||Yn(a)?n.push("".concat(cf(o),":"),a,";"):Ko(a)?n.push.apply(n,Qa(Qa(["".concat(o," {")],ng(a),!1),["}"],!1)):n.push("".concat(cf(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in wE||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function mn(e,t,r,n){if(rg(e))return[];if(fu(e))return[".".concat(e.styledComponentId)];if(Yn(e)){if(!Yn(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return mn(o,t,r,n)}var a;return e instanceof eS?r?(e.inject(r,n),[e.getName(n)]):[e]:Ko(e)?ng(e):Array.isArray(e)?Array.prototype.concat.apply(ki,e.map(function(l){return mn(l,t,r,n)})):[e.toString()]}function rS(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Yn(r)&&!fu(r))return!1}return!0}var nS=Vh(Si),oS=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&rS(t),this.componentId=r,this.baseHash=Tn(nS,r),this.baseStyle=n,Qh.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))o=dn(o,this.staticRulesId);else{var a=af(mn(this.rules,t,r,n)),l=ss(Tn(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,l)){var i=n(a,".".concat(l),void 0,this.componentId);r.insertRules(this.componentId,l,i)}o=dn(o,l),this.staticRulesId=l}else{for(var u=Tn(this.baseHash,n.hash),s="",c=0;c<this.rules.length;c++){var p=this.rules[c];if(typeof p=="string")s+=p;else if(p){var d=af(mn(p,t,r,n));u=Tn(u,d+c),s+=d}}if(s){var h=ss(u>>>0);r.hasNameForId(this.componentId,h)||r.insertRules(this.componentId,h,n(s,".".concat(h),void 0,this.componentId)),o=dn(o,h)}}return o},e})(),og=he.createContext(void 0);og.Consumer;var bl={};function aS(e,t,r){var n=fu(e),o=e,a=!vl(e),l=t.attrs,i=l===void 0?ki:l,u=t.componentId,s=u===void 0?(function(x,B){var A=typeof x!="string"?"sc":ef(x);bl[A]=(bl[A]||0)+1;var $="".concat(A,"-").concat($E(Si+A+bl[A]));return B?"".concat(B,"-").concat($):$})(t.displayName,t.parentComponentId):u,c=t.displayName,p=c===void 0?(function(x){return vl(x)?"styled.".concat(x):"Styled(".concat(FE(x),")")})(e):c,d=t.displayName&&t.componentId?"".concat(ef(t.displayName),"-").concat(t.componentId):t.componentId||s,h=n&&o.attrs?o.attrs.concat(i).filter(Boolean):i,g=t.shouldForwardProp;if(n&&o.shouldForwardProp){var v=o.shouldForwardProp;if(t.shouldForwardProp){var f=t.shouldForwardProp;g=function(x,B){return v(x,B)&&f(x,B)}}else g=v}var b=new oS(r,d,n?o.componentStyle:void 0);function C(x,B){return(function(A,$,F){var w=A.attrs,j=A.componentStyle,N=A.defaultProps,I=A.foldedComponentIds,T=A.styledComponentId,E=A.target,k=he.useContext(og),O=uf(),S=A.shouldForwardProp||O.shouldForwardProp,P=SE($,k,N)||Gn,_=(function(ae,R,U){for(var W,K=nr(nr({},R),{className:void 0,theme:U}),J=0;J<ae.length;J+=1){var Q=Yn(W=ae[J])?W(K):W;for(var ee in Q)K[ee]=ee==="className"?dn(K[ee],Q[ee]):ee==="style"?nr(nr({},K[ee]),Q[ee]):Q[ee]}return R.className&&(K.className=dn(K.className,R.className)),K})(w,$,P),H=_.as||E,z={};for(var q in _)_[q]===void 0||q[0]==="$"||q==="as"||q==="theme"&&_.theme===P||(q==="forwardedAs"?z.as=_.forwardedAs:S&&!S(q,H)||(z[q]=_[q]));var V=(function(ae,R){var U=uf(),W=ae.generateAndInjectStyles(R,U.styleSheet,U.stylis);return W})(j,_),Z=dn(I,T);return V&&(Z+=" "+V),_.className&&(Z+=" "+_.className),z[vl(H)&&!qh.has(H)?"class":"className"]=Z,F&&(z.ref=F),Pa(H,z)})(y,x,B)}C.displayName=p;var y=he.forwardRef(C);return y.attrs=h,y.componentStyle=b,y.displayName=p,y.shouldForwardProp=g,y.foldedComponentIds=n?dn(o.foldedComponentIds,o.styledComponentId):"",y.styledComponentId=d,y.target=n?o.target:e,Object.defineProperty(y,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(x){this._foldedDefaultProps=n?(function(B){for(var A=[],$=1;$<arguments.length;$++)A[$-1]=arguments[$];for(var F=0,w=A;F<w.length;F++)us(B,w[F],!0);return B})({},o.defaultProps,x):x}}),pu(y,function(){return".".concat(y.styledComponentId)}),a&&Zh(y,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),y}function df(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var ff=function(e){return Object.assign(e,{isCss:!0})};function iS(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Yn(e)||Ko(e))return ff(mn(df(ki,Qa([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?mn(n):ff(mn(df(n,t)))}function ds(e,t,r){if(r===void 0&&(r=Gn),!t)throw Zo(1,t);var n=function(o){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];return e(t,r,iS.apply(void 0,Qa([o],a,!1)))};return n.attrs=function(o){return ds(e,t,nr(nr({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return ds(e,t,nr(nr({},r),o))},n}var ag=function(e){return ds(aS,e)},At=ag;qh.forEach(function(e){At[e]=ag(e)});const lS=At.span`
|
|
169
|
+
display: inline-block;
|
|
170
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
171
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
172
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
173
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
174
|
+
border: none !important;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
transition: all 0.2s;
|
|
177
|
+
font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
|
|
178
|
+
user-select: none;
|
|
179
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
180
|
+
line-height: 2;
|
|
181
|
+
width: auto; /* 让宽度根据内容自动调整 */
|
|
182
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
183
|
+
min-height: ${e=>{var l,i,u,s;const t=((i=(l=e.$styles)==null?void 0:l.templateField)==null?void 0:i.padding)||"2px 6px",r=((s=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:s.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
|
|
184
|
+
|
|
185
|
+
/* 高度自适应 */
|
|
186
|
+
height: auto; /* 允许高度根据内容自动调整 */
|
|
187
|
+
white-space: normal; /* 允许换行 */
|
|
188
|
+
box-sizing: border-box; /* 确保padding和border包含在宽度内 */
|
|
189
|
+
overflow: visible; /* 确保内容不被隐藏 */
|
|
190
|
+
word-wrap: break-word; /* 允许长单词换行 */
|
|
191
|
+
max-width: 100%; /* 限制在容器宽度内 */
|
|
192
|
+
|
|
193
|
+
/* 使用传入的样式配置 */
|
|
194
|
+
background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
|
|
195
|
+
color: #055AFF;
|
|
196
|
+
border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
197
|
+
|
|
198
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
199
|
+
background-color: white !important;
|
|
200
|
+
color: #055AFF !important;
|
|
201
|
+
border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
|
|
202
|
+
outline: none;
|
|
203
|
+
min-width: 30px;
|
|
204
|
+
`}}
|
|
205
|
+
|
|
206
|
+
&:hover {
|
|
207
|
+
opacity: 0.8;
|
|
208
|
+
}
|
|
209
|
+
`,sS=At.input`
|
|
210
|
+
background: white;
|
|
211
|
+
border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
212
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
213
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
214
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
215
|
+
min-width: ${"30px"};
|
|
216
|
+
width: ${e=>{var s,c,p,d;const t=e.$value.length;if(t===0)return((c=(s=e.$styles)==null?void 0:s.templateField)==null?void 0:c.minWidth)||"120px";const r=((d=(p=e.$styles)==null?void 0:p.templateField)==null?void 0:d.padding)||"2px 6.2px",n=r.split(" ").map(h=>parseInt(h)),o=n.length===2?n[1]:n[0],a=12.5,l=20,i=t*a+o*2+l,u=Math.min(Math.max(i,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:a,bufferSpace:l,calculatedWidth:i,maxWidth:e.$maxWidth,finalWidth:u,inputValue:e.$value}),u+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
217
|
+
height: ${e=>{var l,i,u,s;const t=((i=(l=e.$styles)==null?void 0:l.templateField)==null?void 0:i.padding)||"2px 6px",r=((s=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:s.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
|
|
218
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
219
|
+
font-family: inherit;
|
|
220
|
+
outline: none;
|
|
221
|
+
color: #055AFF;
|
|
222
|
+
line-height: 2;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
white-space: nowrap; /* 防止内部换行 */
|
|
225
|
+
overflow: hidden; /* 隐藏超出部分 */
|
|
226
|
+
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
227
|
+
|
|
228
|
+
&:focus {
|
|
229
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
230
|
+
box-shadow: 0 0 0 3px ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}}20;
|
|
231
|
+
}
|
|
232
|
+
`,ig=Zr(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var A,$,F,w,j,N,I,T,E,k,O,S;const l=wh(),[i,u]=ut(!1),[s,c]=ut(e.value||""),[p,d]=ut(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[h,g]=ut(600),v=ct(null),f=ze(()=>{try{const P=document.querySelector('[data-slate-editor="true"]');if(P){const _=P.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||P.parentElement;if(_){const H=_.clientWidth,z=H-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",H,"\u53EF\u7528\u5BBD\u5EA6:",z),Math.max(z,200)}}return 600}catch(P){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",P),600}},[]);yt(()=>{d(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const P=f();g(P)},[e.value,e.placeholder,f]);const b=ze(()=>{u(!0),c(e.value||""),setTimeout(()=>{v.current&&(v.current.focus(),v.current.select())},0)},[e.value]),C=ze(P=>{const _=P.target.value;c(_)},[]),y=ze(()=>{const P=le.findPath(l,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",P),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",s),ge.setNodes(l,{value:s},{at:P});const _=s.trim()!==""?s:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";d(_);const H=l.children[P[0]];if(H&&"children"in H){const z=H.children[P[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",z)}u(!1)},[l,e,s]),x=ze(()=>{y()},[y]),B=ze(P=>{P.key==="Enter"?(P.preventDefault(),y()):P.key==="Escape"&&(P.preventDefault(),c(e.value||""),u(!1))},[y,e.value]);return i?M.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[M.jsx(sS,{ref:v,value:s,onChange:C,onBlur:x,onKeyDown:B,placeholder:"",$styles:n,$value:s,$maxWidth:h,style:{backgroundColor:"white",color:((A=n==null?void 0:n.templateField)==null?void 0:A.textColor)||"#055AFF",border:`2px solid ${(($=n==null?void 0:n.templateField)==null?void 0:$.borderColor)||"#84ADFF"}`,minWidth:((F=n==null?void 0:n.templateField)==null?void 0:F.minWidth)||"120px"}}),r]}):M.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[M.jsxs(lS,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:p.length,onClick:b,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(w=n==null?void 0:n.templateField)==null?void 0:w.backgroundColor,borderColor:(j=n==null?void 0:n.templateField)==null?void 0:j.borderColor,borderRadius:(N=n==null?void 0:n.templateField)==null?void 0:N.borderRadius,padding:(I=n==null?void 0:n.templateField)==null?void 0:I.padding,margin:(T=n==null?void 0:n.templateField)==null?void 0:T.margin,fontSize:(E=n==null?void 0:n.templateField)==null?void 0:E.fontSize,fontWeight:(k=n==null?void 0:n.templateField)==null?void 0:k.fontWeight,minWidth:(O=n==null?void 0:n.templateField)==null?void 0:O.minWidth,color:(S=n==null?void 0:n.templateField)==null?void 0:S.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:p,displayValueLength:p.length,contentLength:p.length}),null),p]}),M.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});ig.displayName="TemplateField";const uS=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return M.jsxs("div",{...t,className:"think-container",children:[M.jsx("div",{className:"think-indicator"}),M.jsx("div",{className:"think-content",children:M.jsx("div",{className:"think-text text-[#86909C] pl-5 my-3 border border-[#ECECEE] border-solid border-l-3 border-t-0 border-b-0 border-r-0",style:{color:`${(a=r==null?void 0:r.text)==null?void 0:a.color} !important`,display:o?"none":"block"},children:e})})]})},lg=he.forwardRef(({attributes:e,element:t,eventsEmit:r,onDataUpdate:n,dataSource:o,tagIndex:a},l)=>{var B;const[i,u]=ut(null),[s,c]=ut(!0),[p,d]=ut(1),[h,g]=ut(10);yt(()=>{if(!i){if(!o){c(!0);try{const A=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(A)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const A=(o==null?void 0:o.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",A);let $=null,F=null,w;for(const I of A){const T=I==null?void 0:I.reply;if(!(T!=null&&T.databaseReference))continue;const E=T.databaseReference;console.log(E,"123123123jk123lk12j3l12jl3"),E!=null&&E.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",E.retrieveSqlData.filePath),w=E.retrieveSqlData.filePath);let k=E;if(typeof E=="string")try{k=JSON.parse(E)}catch{}if(!k)continue;const O=Array.isArray(k)?k:[k],S=O.findIndex(H=>(H==null?void 0:H.id)===t.id),P=S>=0?O[S]:null;if(console.log("~~~~~~~~~~~~~~~",P),P){$=P,F=P.retrieveSqlData||P.retrieve_table_data||P.retrieveTableData;break}const _=O.find(H=>{var z,q;return(((q=(z=H==null?void 0:H.retrieveSqlData)==null?void 0:z.preData)==null?void 0:q.length)||0)>0});!$&&_&&($=_,F=_.retrieveSqlData||_.retrieve_table_data||_.retrieveTableData)}if(!$||!F){console.warn("No databaseReference with preData found for id:",t.id),c(!1);return}const j=Array.isArray(F==null?void 0:F.preData)?F.preData[0]:null;if(!j){console.warn("Matched item has no preData"),c(!1);return}const N={columns:(j.columns||[]).map(I=>({key:I.key,title:I.title})),rows:j.data||j.rows||[],total:(F==null?void 0:F.total)||0,fetchUrl:(F==null?void 0:F.fetchUrl)||"/index/knowledgeBase/file/stream",source:w||(F==null?void 0:F.source)||($==null?void 0:$.source)};u(N),c(!1)}catch(A){console.error("Init preData parsing failed:",A),c(!1)}}},[t.id,i,o]),yt(()=>{const A=$=>{try{const F=($==null?void 0:$.detail)||{},w=F==null?void 0:F.id;if(!w||String(w)!==String(t.id))return;const j=F.databaseReference;if(!j)return;let N=j;if(typeof j=="string")try{N=JSON.parse(j)}catch{}if(!N)return;const I=Array.isArray(N)?N:[N],T=I.findIndex(P=>String(P==null?void 0:P.id)===String(t.id)),E=T>=0?I[T]:null;if(!E)return;const k=(E==null?void 0:E.retrieveSqlData)||(E==null?void 0:E.retrieve_table_data)||(E==null?void 0:E.retrieveTableData),O=Array.isArray(k==null?void 0:k.preData)?k.preData[0]:null;if(!O)return;const S={columns:(O.columns||[]).map(P=>({key:P.key,title:P.title})),rows:O.data||O.rows||[],total:(k==null?void 0:k.total)||0,fetchUrl:(k==null?void 0:k.fetchUrl)||"/index/knowledgeBase/file/stream",source:(E==null?void 0:E.source)||(k==null?void 0:k.source)};u(S),c(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",A),()=>{window.removeEventListener("retrieve-sql-data:data-response",A)}},[t.id]),yt(()=>{n&&i&&n(i)},[i,n]);const v=A=>{if(!A||A.length===0)return[];const $=A.find(F=>F&&typeof F=="object")||{};return Object.keys($).map(F=>({key:F,title:F}))},f=(A,$)=>{d(A),$&&g($);const F=w=>{let j=null;if(w&&Array.isArray(w.columns)&&Array.isArray(w.rows))j={columns:w.columns,rows:w.rows,total:Number(w.total)||0,fetchUrl:w.fetchUrl||(i==null?void 0:i.fetchUrl)||"",source:w.source||(i==null?void 0:i.source)};else if(w&&Array.isArray(w.data)){const N=w.data;j={columns:i!=null&&i.columns&&i.columns.length>0?i.columns:v(N),rows:N,total:Number(w.totalCount??w.total??(i==null?void 0:i.total)??N.length)||0,fetchUrl:(i==null?void 0:i.fetchUrl)||"",source:i==null?void 0:i.source},typeof w.currentPage=="number"&&d(w.currentPage),typeof w.pageSize=="number"&&g(w.pageSize)}else if(Array.isArray(w)){const N=w;j={columns:i!=null&&i.columns&&i.columns.length>0?i.columns:v(N),rows:N,total:Number((i==null?void 0:i.total)??N.length)||0,fetchUrl:(i==null?void 0:i.fetchUrl)||"",source:i==null?void 0:i.source}}if(!j){console.warn("replacePredataFunction received unsupported data format:",w);return}console.log("Replacing table data with:",j),u(j)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:A,pageSize:$||h,fetchUrl:i==null?void 0:i.fetchUrl,total:i==null?void 0:i.total,source:i==null?void 0:i.source,replacePredataFunction:F})},b=A=>i!=null&&i.rows?Math.max(...i.rows.map($=>{const F=$[A];return F?String(F).length:0})):0,C=(((B=i==null?void 0:i.columns)==null?void 0:B.length)||0)===1,y=(i==null?void 0:i.columns.map((A,$)=>({title:A.title||A.key,dataIndex:A.key,key:A.key,render:F=>{const w=F==null||F===""?"-":F;return C?M.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(w)}):w},...C?{width:void 0}:{}})))||[],x=(i==null?void 0:i.rows.map((A,$)=>({key:$,...A})))||[];return M.jsx("div",{...e,ref:l,className:"retrieve-sql-data-container my-4",children:s?M.jsxs("div",{className:"flex items-center justify-center py-8",children:[M.jsx(_f,{size:"large"}),M.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):i?M.jsxs("div",{className:"retrieve-sql-data-content",children:[a!==null&&M.jsxs("div",{className:"mb-2 flex items-center",children:[M.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center",children:a}),M.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]}),M.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:M.jsx(Mr,{columns:y.map((A,$)=>({...A,...C?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:$===0?160:void 0,minWidth:120,maxWidth:$===0?180:300,fixed:$===0?"left":void 0,ellipsis:{showTitle:!0}},render:F=>{if(F==null)return"-";const w=String(F);if(C)return M.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:w,children:w});const j=b(A.key);let N="200px";return $===0?N="80px":j<=8?N="100px":j<=15?N="150px":j<=25?N="200px":j<=40?N="250px":N="300px",M.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:N,display:"inline-block",cursor:"default"},title:w,children:w})}})),dataSource:x,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:C?"100%":"1000px"},scroll:{x:C?void 0:"max-content",y:400}})}),i.total>h&&M.jsx("div",{className:"flex justify-center mt-3",children:M.jsx(Mf,{current:p,pageSize:h,total:i.total,onChange:f,onShowSizeChange:f,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):M.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});lg.displayName="RetrieveSqlDataElement";const cS=e=>{var a,l,i,u,s,c,p,d;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return M.jsx("div",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(a=t==null?void 0:t.text)==null?void 0:a.color} !important`,margin:"0 0 0.75rem 0"},children:n});case"heading-one":return M.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(l=t==null?void 0:t.text)==null?void 0:l.color} !important`},children:n});case"heading-two":return M.jsx("h2",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(i=t==null?void 0:t.text)==null?void 0:i.color} !important`},children:n});case"heading-three":return M.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(u=t==null?void 0:t.text)==null?void 0:u.color} !important`},children:n});case"bulleted-list":return M.jsx("ul",{...o,children:n});case"numbered-list":return M.jsx("ol",{...o,children:n});case"list-item":return M.jsx("li",{...o,children:n});case"table":return M.jsx("div",{className:"table-container",children:M.jsx("table",{...o,children:M.jsx("tbody",{children:n})})});case"table-row":return M.jsx("tr",{...o,children:n});case"table-cell":return r.header?M.jsx("th",{...o,children:n}):M.jsx("td",{...o,children:n});case"block-quote":return M.jsx("blockquote",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(s=t==null?void 0:t.text)==null?void 0:s.color} !important`},children:n});case"code-block":return M.jsx("pre",{...o,children:M.jsx("code",{style:{color:`${(c=t==null?void 0:t.text)==null?void 0:c.color} !important`},children:n})});case"think":const h=e.extraProps||{},g=h.isCollapsed!==void 0?h.isCollapsed:Object.values(h)[1]===!0,v={...h,isCollapsed:g};return console.log("renderElement think case - fixed extraProps:",v),M.jsx(uS,{attributes:o,styles:t,extraProps:v,children:n});case"template":return M.jsx(ig,{...o,element:r,children:n,styles:t});case"retrieve-sql-data":const f=(b=>{if(!b)return null;try{const C=typeof b=="string"?JSON.parse(b):b;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(C)?C[0]:C}}]}}catch(C){return console.error("Failed to parse databaseReference:",C),null}})(((p=e.extraProps)==null?void 0:p.databaseReference)||e.databaseReference);return M.jsx(lg,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:f||void 0,tagIndex:1,onDataUpdate:b=>{var C;(C=e.eventsEmit)==null||C.call(e,"rtext_table_data_updated",{id:r.id,data:b})}});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),M.jsx("img",{...o,src:r.url,alt:r.alt||"",style:{maxWidth:"100%",height:"auto",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",transition:"transform 0.2s ease-in-out",display:"block"},onError:b=>{const C=b.target;C.style.display="none",console.warn("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25:",r.url)}});case"iframe":return console.log("\u6E32\u67D3iframe\u5143\u7D20:",{src:r.src,width:r.width,height:r.height}),M.jsx("iframe",{...o,src:r.src,width:r.width||"100%",height:r.height||"400",frameBorder:r.frameborder||"0",title:r.title||"",style:{width:r.width||"100%",height:r.height||"400px",border:"none",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",display:"block"},onError:b=>{const C=b.target;C.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return M.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(d=t==null?void 0:t.text)==null?void 0:d.color} !important`},children:n})}},dS=e=>{var l,i,u,s,c,p;const{attributes:t,children:r,leaf:n,styles:o}=e;(l=o==null?void 0:o.text)!=null&&l.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let a=r;if(n.retrive){const d=n.fromtype==="0",h=n.fromtype==="1",g=n.fromtype==="2",v=n.text||"";let f=v,b="#e6f7ff",C="#1890ff",y="#bae7ff";return d?(f=`${v}`,b="#e6f7ff",C="#1890ff",y="#bae7ff"):h?(f=`${v}`,b="#f6ffed",C="#52c41a",y="#d9f7be"):g&&(f=`${v}`,b="#f9f0ff",C="#722ed1",y="#efdbff"),a=M.jsx("span",{...t,style:{display:"inline-block",background:b,color:C,height:24,width:24,borderRadius:3,padding:"1px 9px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"22px",cursor:"pointer",verticalAlign:"middle"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:x=>x.currentTarget.style.background=y,onMouseLeave:x=>x.currentTarget.style.background=b,children:f}),a}if(n.code)a=M.jsx("code",{...t,style:{color:`${(i=o==null?void 0:o.text)==null?void 0:i.color} !important`},children:a});else{const d=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),h={color:`${(u=o==null?void 0:o.text)==null?void 0:u.color} !important`,fontSize:(s=o==null?void 0:o.text)==null?void 0:s.fontSize,lineHeight:(c=o==null?void 0:o.text)==null?void 0:c.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=M.jsx("span",{...t,className:d,style:h,children:a})}return n.link&&(a=M.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(p=o==null?void 0:o.text)==null?void 0:p.color} !important`},children:a})),a},yl=At.div`
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
& > * + * {
|
|
236
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* 标题样式 */
|
|
240
|
+
& h1 {
|
|
241
|
+
font-size: ${e=>e.$size==="sm"?"20px":"32px"};
|
|
242
|
+
font-weight: 600;
|
|
243
|
+
margin: 24px 0 16px 0;
|
|
244
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
245
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
246
|
+
padding-bottom: 8px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
& h2 {
|
|
250
|
+
font-size: ${e=>e.$size==="sm"?"18px":"24px"};
|
|
251
|
+
font-weight: 600;
|
|
252
|
+
margin: 24px 0 16px 0;
|
|
253
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
254
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
255
|
+
padding-bottom: 6px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
& h3 {
|
|
259
|
+
font-size: ${e=>e.$size==="sm"?"16px":"20px"};
|
|
260
|
+
font-weight: 600;
|
|
261
|
+
margin: 24px 0 16px 0;
|
|
262
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* 段落样式 */
|
|
266
|
+
& p {
|
|
267
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
268
|
+
margin: 16px 0;
|
|
269
|
+
line-height: 1.6;
|
|
270
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* 列表样式 - GitHub 风格简约设计 */
|
|
274
|
+
& ul, & ol {
|
|
275
|
+
margin: 16px 0;
|
|
276
|
+
padding-left: 24px;
|
|
277
|
+
line-height: 1.6;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
& ul {
|
|
281
|
+
list-style-type: disc;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
& ol {
|
|
285
|
+
list-style-type: decimal;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
& li {
|
|
289
|
+
margin: 4px 0;
|
|
290
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* 嵌套列表 */
|
|
294
|
+
& ul ul, & ol ol, & ul ol, & ol ul {
|
|
295
|
+
margin: 8px 0;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* 引用块样式 */
|
|
299
|
+
& blockquote {
|
|
300
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
301
|
+
border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
302
|
+
padding: 0 16px;
|
|
303
|
+
margin: 16px 0;
|
|
304
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
|
|
305
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/* 行内代码样式 */
|
|
309
|
+
& code {
|
|
310
|
+
font-size: 0.875em;
|
|
311
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
312
|
+
padding: 0.125em 0.25em;
|
|
313
|
+
border-radius: 6px;
|
|
314
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
315
|
+
color: #d73a49;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* 代码块样式 */
|
|
319
|
+
& pre {
|
|
320
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
321
|
+
padding: 16px;
|
|
322
|
+
border-radius: 6px;
|
|
323
|
+
overflow-x: auto;
|
|
324
|
+
margin: 16px 0;
|
|
325
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
& pre code {
|
|
329
|
+
background-color: transparent;
|
|
330
|
+
padding: 0;
|
|
331
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* 表格样式 */
|
|
335
|
+
& table {
|
|
336
|
+
width: 100%;
|
|
337
|
+
border-collapse: collapse;
|
|
338
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
339
|
+
margin: 16px 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
& th, & td {
|
|
343
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
344
|
+
padding: 8px 12px;
|
|
345
|
+
text-align: left;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
& th {
|
|
349
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
350
|
+
font-weight: 600;
|
|
351
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
& tr:nth-child(even) {
|
|
355
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
& td {
|
|
359
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* 图片样式 */
|
|
363
|
+
& img {
|
|
364
|
+
max-width: 100%;
|
|
365
|
+
height: auto;
|
|
366
|
+
border-radius: 6px;
|
|
367
|
+
margin: 16px 0;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* 链接样式 */
|
|
371
|
+
& a {
|
|
372
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
|
|
373
|
+
text-decoration: none;
|
|
374
|
+
|
|
375
|
+
&:hover {
|
|
376
|
+
text-decoration: underline;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* 文本样式 */
|
|
381
|
+
& strong {
|
|
382
|
+
font-weight: 600;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
& em {
|
|
386
|
+
font-style: italic;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
& u {
|
|
390
|
+
text-decoration: underline;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
& s {
|
|
394
|
+
text-decoration: line-through;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* 分割线样式 */
|
|
398
|
+
& hr {
|
|
399
|
+
border: none;
|
|
400
|
+
border-top: 1px solid #d0d7de;
|
|
401
|
+
margin: 24px 0;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* 思考容器样式 */
|
|
405
|
+
& .think-container {
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
& .think-header {
|
|
411
|
+
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
& .think-icon {
|
|
415
|
+
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
& .think-title {
|
|
419
|
+
font-weight: 600;
|
|
420
|
+
color: #24292f;
|
|
421
|
+
font-size: 14px;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
& .think-text {
|
|
425
|
+
color: #86909C;
|
|
426
|
+
font-size: 14px;
|
|
427
|
+
line-height: 1.6;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* 召回标签样式 */
|
|
431
|
+
& .retrive-tag {
|
|
432
|
+
display: inline-block;
|
|
433
|
+
background: #e6f7ff;
|
|
434
|
+
color: #1890ff;
|
|
435
|
+
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
436
|
+
border-radius: 6px;
|
|
437
|
+
padding: 2px 6px;
|
|
438
|
+
margin: 0 2px;
|
|
439
|
+
font-weight: 500;
|
|
440
|
+
font-size: 12px;
|
|
441
|
+
line-height: 1.4;
|
|
442
|
+
cursor: pointer;
|
|
443
|
+
vertical-align: middle;
|
|
444
|
+
transition: background-color 0.2s ease;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
& .retrive-tag:hover {
|
|
448
|
+
background: #bae7ff;
|
|
449
|
+
}
|
|
450
|
+
`;function sg(e){return e.map(t=>!t.children||t.children.length===0?{...t,children:[{text:""}]}:{...t,children:t.children.map(r=>typeof r=="object"&&"type"in r?sg([r])[0]:r)})}function ug(e,t){const r=(t==null?void 0:t.disabledTags)||[];console.log("\u{1F50D} deserializeMarkdown \u5F00\u59CB\u5904\u7406:",{markdownLength:e.length,basePath:t==null?void 0:t.basePath,hasImgTags:e.includes("<img"),hasMarkdownImages:e.includes("![")});function n(s){var c;if(s.indexOf("<think>")>-1)if(s.indexOf("</think>")>-1){const p=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,d=s.match(p);return d?{thinkContent:d[1],content:d[2],finish:!0}:{thinkContent:"",content:s,finish:!0}}else{const p=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((c=s.match(p))==null?void 0:c[1])||"",content:""}}else return{thinkContent:"",content:s}}const{thinkContent:o,content:a,finish:l}=n(e||"");let i=[],u=0;if(!r.includes("think")&&o){const s=o.split(/\n+/).map(c=>c.trim()).filter(Boolean).flatMap(c=>{if(/<retrive-tag/i.test(c)){const p=document.createElement("div");return p.innerHTML=c,pf(p,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:c}]}]});i.push({type:"think",id:`think-${u++}`,thinkContent:o,finish:l,children:s})}if(a){let s=a;r.includes("retrive")||(s=s.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(d,h,g)=>`<retrive-tag${h?" "+h.trim():""}>${g}</retrive-tag>`)),r.includes("retrieve-sql-data")||(s=s.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(d,h)=>`<retrieve-sql-data id="${h}"></retrieve-sql-data>`)),pt.setOptions({gfm:!0,breaks:!0,pedantic:!1});const c=pt(s),p=typeof c=="string"?c:"";if(console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:p.length,hasImgTags:p.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:p}),typeof c=="string"){const d=document.createElement("div");d.innerHTML=c,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:d.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(d.querySelectorAll("*")).map(g=>g.tagName),imgElements:Array.from(d.querySelectorAll("img")).map(g=>({src:g.src,alt:g.alt}))});const h=pf(d,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:h.length,hasImageElements:h.some(g=>g.type==="image")}),h&&h.length>0&&(i=i.concat(h))}}return!i||i.length===0?[{type:"paragraph",children:[{text:""}]}]:sg(i)}function pf(e,t){const r=[];return console.log("\u{1F3AF} deserializeHtmlNode \u5F00\u59CB\u89E3\u6790:",{nodeType:e.nodeType,nodeName:e.nodeName,basePath:t,childNodesCount:e.childNodes.length}),((n,o)=>(o.forEach(a=>{var l;if(a.nodeType===Node.ELEMENT_NODE){const i=a;switch(console.log("\u{1F50D} \u5904\u7406\u5143\u7D20\u8282\u70B9:",{tagName:i.tagName,isImg:i.tagName==="IMG",src:i.getAttribute("src"),basePath:t}),i.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:jt(i,t)});break;case"h1":n.push({type:"heading-one",children:jt(i,t)});break;case"h2":n.push({type:"heading-two",children:jt(i,t)});break;case"h3":n.push({type:"heading-three",children:jt(i,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(i.children).map(s=>({type:"list-item",children:jt(s)}))});break;case"ol":const u={type:"numbered-list",children:Array.from(i.children).map(s=>({type:"list-item",children:jt(s)}))};n.push(u);break;case"li":n.push({type:"list-item",children:jt(i,t)});break;case"pre":{const s=i.querySelector("code");s?n.push({type:"code-block",children:jt(s)}):n.push({type:"code-block",children:jt(i,t)});break}case"code":{i.closest("pre")||n.push({type:"paragraph",children:jt(i,t)});break}case"retrive-tag":{const s=jt(i,t);s.length>0&&n.push({type:"paragraph",children:s});break}case"retrieve-sql-data":{const s=i.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:s,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:jt(i,t)});break;case"table":n.push(fS(i));break;case"img":{const s=i.getAttribute("src")||"",c=i.getAttribute("alt")||"";let p=s;if(t)if(s.startsWith("./"))p=s.replace(/^\.\//,t+"/");else if(s.startsWith("../")){const d=t.substring(0,t.lastIndexOf("/"));p=s.replace(/^\.\.\//,d+"/")}else!s.startsWith("/")&&!s.startsWith("http")&&(p=`${t}/${s}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:s,basePath:t,processedSrc:p}),n.push({type:"image",url:p,alt:c,children:[{text:""}]});break}case"iframe":{const s=i.getAttribute("src")||"",c=i.getAttribute("width")||"100%",p=i.getAttribute("height")||"400",d=i.getAttribute("frameborder")||"0",h=i.getAttribute("title")||"";let g=s;if(t)if(s.startsWith("./"))g=s.replace(/^\.\//,t+"/");else if(s.startsWith("../")){const v=t.substring(0,t.lastIndexOf("/"));g=s.replace(/^\.\.\//,v+"/")}else!s.startsWith("/")&&!s.startsWith("http")&&(g=`${t}/${s}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:s,basePath:t,processedSrc:g}),n.push({type:"iframe",src:g,width:c,height:p,frameborder:d,title:h,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:jt(i)});break;default:n.push({type:"paragraph",children:jt(i,t)});break}}else a.nodeType===Node.TEXT_NODE&&((l=a.textContent)!=null&&l.trim())&&n.push({type:"paragraph",children:[{text:a.textContent}]})}),n))(r,e.childNodes),r}function jt(e,t){const r=[];function n(a){const l=[];let i="",u=!1,s=!1,c=0;for(;c<a.length;)a.startsWith("**",c)?(i&&(l.push({text:i,code:!0,bold:u,italic:s}),i=""),u=!u,c+=2):a.startsWith("*",c)?(i&&(l.push({text:i,code:!0,bold:u,italic:s}),i=""),s=!s,c+=1):(i+=a[c],c+=1);return i&&l.push({text:i,code:!0,bold:u,italic:s}),l}function o(a,l={}){var i,u;if(a.nodeType===Node.TEXT_NODE){const s=(i=a.textContent)==null?void 0:i.trim();return s?l.code?n(s):[{text:s,...l}]:[]}if(a.nodeType===Node.ELEMENT_NODE){const s=a,c={...l};switch(s.tagName.toLowerCase()){case"em":case"i":c.italic=!0;break;case"strong":case"b":c.bold=!0;break;case"code":s.closest("pre")||(c.code=!0);break;case"del":case"s":c.strikethrough=!0;break;case"u":c.underline=!0;break;case"a":c.link=s.getAttribute("href")||void 0;break;case"retrive-tag":{const d={};for(const{name:h,value:g}of Array.from(s.attributes))d[h]=g;return[{text:s.textContent||""||"[0]",retrive:!0,...d}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:s.getAttribute("id")||"",children:[{text:""}]}];case"img":{const d=s.getAttribute("src")||"",h=s.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:d,alt:h,basePath:t});let g=d;if(t)if(d.startsWith("./"))g=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const v=t.substring(0,t.lastIndexOf("/"));g=d.replace(/^\.\.\//,v+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(g=`${t}/${d}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:d,processedSrc:g}),[{type:"image",url:g,alt:h,children:[{text:""}]}]}case"iframe":{const d=s.getAttribute("src")||"",h=s.getAttribute("width")||"100%",g=s.getAttribute("height")||"400",v=s.getAttribute("frameborder")||"0",f=s.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:d,width:h,height:g,basePath:t});let b=d;if(t)if(d.startsWith("./"))b=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));b=d.replace(/^\.\.\//,C+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(b=`${t}/${d}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:d,processedSrc:b}),[{type:"iframe",src:b,width:h,height:g,frameborder:v,title:f,children:[{text:""}]}]}}if(s.childNodes.length===0&&((u=s.textContent)!=null&&u.trim()))return c.code?n(s.textContent):[{text:s.textContent,...c}];let p=[];for(const d of Array.from(s.childNodes))p=p.concat(o(d,c));return p}return[]}for(const a of Array.from(e.childNodes))r.push(...o(a));return r}function fS(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const o=Array.from(e.querySelectorAll("tr"));o.length>0&&(t.push({type:"table-row",children:Array.from(o[0].children).map(a=>({type:"table-cell",header:!0,children:jt(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(l=>({type:"table-cell",header:!1,children:jt(l)}))})}))}else{if(r){const o=r.querySelector("tr");o&&t.push({type:"table-row",children:Array.from(o.querySelectorAll("th")).map(a=>({type:"table-cell",header:!0,children:jt(a)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(o=>{t.push({type:"table-row",children:Array.from(o.querySelectorAll("td")).map(a=>({type:"table-cell",header:!1,children:jt(a)}))})})}return{type:"table",children:t}}const pS=At.div`
|
|
451
|
+
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
452
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
453
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
454
|
+
min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
455
|
+
overflow: hidden;
|
|
456
|
+
transition: all 0.2s ease-in-out;
|
|
457
|
+
|
|
458
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
459
|
+
&:focus-within {
|
|
460
|
+
border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
|
|
461
|
+
box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
|
|
462
|
+
}
|
|
463
|
+
`}}
|
|
464
|
+
`,Cl=At.div`
|
|
465
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
|
|
466
|
+
min-height: inherit;
|
|
467
|
+
outline: none;
|
|
468
|
+
|
|
469
|
+
& > * + * {
|
|
470
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
471
|
+
}
|
|
472
|
+
`;var ni=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(ni||{});const hu=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:a={},onChange:l,onFocus:i,onBlur:u,renderElement:s,renderLeaf:c,onRetriveTagClick:p,eventsEmit:d,extraProps:h={},className:g,style:v,styles:f,enableTemplateInput:b=!1,disabledTags:C=[]})=>{const y=ii(),x=Je(()=>{var z,q,V,Z,ae,R,U,W,K;return{primaryColor:((z=y==null?void 0:y.colors)==null?void 0:z.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((q=y==null?void 0:y.colors)==null?void 0:q.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((V=y==null?void 0:y.colors)==null?void 0:V.background)||(a==null?void 0:a.backgroundColor)||"transparent",textColor:((Z=y==null?void 0:y.colors)==null?void 0:Z.text)||(a==null?void 0:a.textColor)||"#24292f",borderColor:((ae=y==null?void 0:y.colors)==null?void 0:ae.border)||(a==null?void 0:a.borderColor)||"#dee2e6",disabledBackground:((R=y==null?void 0:y.colors)==null?void 0:R.disabledBackground)||(a==null?void 0:a.disabledBackground)||"#f8f9fa",hoverBackground:(a==null?void 0:a.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((U=y==null?void 0:y.space)==null?void 0:U.radius)||(a==null?void 0:a.borderRadius)||"4px",padding:((W=y==null?void 0:y.space)==null?void 0:W.padding)||(a==null?void 0:a.padding)||"0rem 1rem",margin:((K=y==null?void 0:y.space)==null?void 0:K.margin)||(a==null?void 0:a.margin)||"0.5rem",minHeight:(a==null?void 0:a.minHeight)||"200px",baseFontSize:(a==null?void 0:a.baseFontSize)||(o==="md"?14:12),...a}},[y,a,o]),B=ct();if(!B.current){const z=s1(),q=Dw(z),{isInline:V}=q;q.isInline=R=>!C.includes("template")&&R.type==="template"?!0:V(R);const{isVoid:Z}=q;q.isVoid=R=>!C.includes("template")&&R.type==="template"?!0:Z(R);const ae=R=>{if(!(b&&!C.includes("template")))return R;const{insertText:U,insertData:W}=R,K=()=>{const J=/<template>([^<]*)<\/template>/g,Q=Array.from(D.nodes(R,{match:ee=>Pe.isText(ee)&&J.test(ee.text)}));if(Q.length!==0)for(const ee of Q){const[oe,re]=ee,ne=oe.text||"",de=[];let ce=0,Se;for(J.lastIndex=0;(Se=J.exec(ne))!==null;){if(Se.index>ce){const We=ne.slice(ce,Se.index);We&&de.push({text:We})}de.push({type:"template",placeholder:(Se[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),ce=Se.index+Se[0].length}if(ce<ne.length){const We=ne.slice(ce);We&&de.push({text:We})}ge.removeNodes(R,{at:re}),ge.insertNodes(R,de,{at:re})}};return R.insertText=J=>{U(J),K()},R.insertData=J=>{const Q=J.getData("text/plain");if(Q&&/<template>[\s\S]*?<\/template>/.test(Q)){U(Q),K();return}return W(J)},R};B.current=ae(q)}const A=B.current,[$,F]=ut(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[w,j]=ut(0);yt(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const z=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",z),F(z),j(q=>q+1)}},[e.type,e.content]);const N=ct(void 0);yt(()=>{if(e.type!=="markdown")return;const z=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");N.current!==z&&(N.current=z,j(q=>q+1))},[e.type,e.content]);const I=ct("");yt(()=>{if(e.type!=="markdown")return;const z=JSON.stringify(h||{});z!==I.current&&(I.current=z,j(q=>q+1))},[h,e.type]);const T=ze(z=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",z),z&&Array.isArray(z)?(F(z),l==null||l(z,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",z)},[l]),E=Je(()=>{const z=x==null?void 0:x.baseFontSize;return typeof z=="number"&&!Number.isNaN(z)?z:o==="md"?14:12},[x,o]),k=ze(z=>{const q={...z,size:o,styles:f,eventsEmit:d,extraProps:h};return s?s(q):cS(q)},[s,o,f,d,h]),O=ze(z=>{const q={...z,styles:f,onRetriveTagClick:p};return c?c(q):dS(q)},[c,f,p]);yt(()=>(window.copyCodeFromData=z=>{const q=z.getAttribute("data-code");if(!q){console.error("No code content found");return}const V=q.replace(/\\n/g,`
|
|
473
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(V).then(()=>{const Z=z.innerHTML;z.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#2da44e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20,6 9,17 4,12"></polyline></svg>',z.classList.add("copied"),setTimeout(()=>{z.innerHTML=Z,z.classList.remove("copied")},2e3)}).catch(Z=>{console.error("\u590D\u5236\u5931\u8D25:",Z);const ae=z.innerHTML;z.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',z.style.background="#d73a49",z.style.borderColor="#d73a49",z.style.color="white",setTimeout(()=>{z.innerHTML=ae,z.style.background="",z.style.borderColor="",z.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const S=Je(()=>{var z,q;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(z=e.content)==null?void 0:z.length,basePath:n,hasImages:(q=e.content)==null?void 0:q.includes("![")});const V=ug(e.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:V.length,hasImageElements:V.some(K=>K.type==="image"),imageElements:V.filter(K=>K.type==="image")}),V&&V.length>0)return M.jsx(yl,{theme:x,$size:o,children:M.jsx(pl,{editor:A,initialValue:V,onChange:()=>{},children:M.jsx(Cl,{theme:x,children:M.jsx(fl,{renderElement:k,renderLeaf:O,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${E}px`}})})},w)});const Z={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let ae=pt(e.content||"",Z);ae=ae.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),ae=ae.replace(/<\/table>/g,"</table></div>"),ae=ae.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(K,J,Q)=>{const ee=Q.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<pre><code${J}>${Q}</code><button class="code-copy-btn" data-code="${ee}" onclick="copyCodeFromData(this)" title="\u590D\u5236\u4EE3\u7801"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></pre>`});const R=(x==null?void 0:x.disabledBackground)||(x==null?void 0:x.backgroundColor)||"#ffffff",U=(K,J)=>K.startsWith("#")?`${K}${Math.round(J*255).toString(16).padStart(2,"0")}`:K,W=`
|
|
474
|
+
<style>
|
|
475
|
+
.table-container{ overflow:auto; border:1px solid ${(x==null?void 0:x.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(x==null?void 0:x.backgroundColor)||"transparent"} !important; }
|
|
476
|
+
.table-container table{ background:${(x==null?void 0:x.backgroundColor)||"transparent"} !important; color:${(x==null?void 0:x.textColor)||"#24292f"} !important; }
|
|
477
|
+
.table-container th{ background:${(x==null?void 0:x.disabledBackground)||"#f6f8fa"} !important; color:${(x==null?void 0:x.textColor)||"#24292f"} !important; }
|
|
478
|
+
.table-container td{ color:${(x==null?void 0:x.textColor)||"#24292f"} !important; background:${(x==null?void 0:x.backgroundColor)||"transparent"} !important; }
|
|
479
|
+
.table-container tr:nth-child(even) td{ background:${(x==null?void 0:x.disabledBackground)||"#f6f8fa"} !important; }
|
|
480
|
+
pre{ position:relative; background:${R}; border:1px solid ${(x==null?void 0:x.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(x==null?void 0:x.textColor)||"#e5e7eb"}; }
|
|
481
|
+
pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${U("#22c55e",.25)}, ${U("#f59e0b",.25)}, ${U("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
|
|
482
|
+
pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(x==null?void 0:x.borderColor)||"#e5e7eb"}; color:${(x==null?void 0:x.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
|
|
483
|
+
pre .code-copy-btn:hover{ background:${(x==null?void 0:x.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
484
|
+
</style>
|
|
485
|
+
`;return M.jsx("div",{style:{padding:(x==null?void 0:x.padding)||"1rem",fontSize:`${E}px`,lineHeight:1.6,color:(x==null?void 0:x.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:W+ae}})}catch(V){return console.error("Markdown parsing error:",V),M.jsx("div",{children:e.content})}},[e,x,A,w,k,O,E]),P=Je(()=>e.type!=="html"?null:M.jsx("div",{style:{padding:(x==null?void 0:x.padding)||"1rem",fontSize:`${E}px`,lineHeight:1.6,color:(x==null?void 0:x.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,x,E]),_=Je(()=>e.type!=="text"?null:M.jsx("div",{style:{padding:(x==null?void 0:x.padding)||"1rem",fontSize:`${E}px`,lineHeight:1.6,color:(x==null?void 0:x.textColor)||"#24292f"},children:M.jsx("span",{children:e.content||""})}),[e,x,E]),H=()=>{switch(e.type){case"markdown":return S;case"html":return P;case"text":return _;case"slate":default:return t?M.jsx(yl,{theme:x,$size:o,children:M.jsx(pl,{editor:A,initialValue:$,onChange:T,children:M.jsx(Cl,{theme:x,children:M.jsx(fl,{renderElement:k,renderLeaf:O,placeholder:r,readOnly:!1,onFocus:i,onBlur:u,style:{minHeight:"inherit",outline:"none",fontSize:`${E}px`}})})},w)}):M.jsx(yl,{theme:x,$size:o,children:M.jsx(pl,{editor:A,initialValue:$,onChange:()=>{},children:M.jsx(Cl,{theme:x,children:M.jsx(fl,{renderElement:k,renderLeaf:O,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${E}px`}})})},w)})}};return M.jsx(pS,{theme:x,$isEditing:t,className:g,style:v,children:H()})};var fs={exports:{}},hS=fs.exports,hf;function gS(){return hf||(hf=1,(function(e,t){(function(r,n){e.exports=n()})(hS,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",l="second",i="minute",u="hour",s="day",c="week",p="month",d="quarter",h="year",g="date",v="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var k=["th","st","nd","rd"],O=E%100;return"["+E+(k[(O-20)%10]||k[O]||k[0])+"]"}},y=function(E,k,O){var S=String(E);return!S||S.length>=k?E:""+Array(k+1-S.length).join(O)+E},x={s:y,z:function(E){var k=-E.utcOffset(),O=Math.abs(k),S=Math.floor(O/60),P=O%60;return(k<=0?"+":"-")+y(S,2,"0")+":"+y(P,2,"0")},m:function E(k,O){if(k.date()<O.date())return-E(O,k);var S=12*(O.year()-k.year())+(O.month()-k.month()),P=k.clone().add(S,p),_=O-P<0,H=k.clone().add(S+(_?-1:1),p);return+(-(S+(O-P)/(_?P-H:H-P))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:p,y:h,w:c,d:s,D:g,h:u,m:i,s:l,ms:a,Q:d}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},B="en",A={};A[B]=C;var $="$isDayjsObject",F=function(E){return E instanceof I||!(!E||!E[$])},w=function E(k,O,S){var P;if(!k)return B;if(typeof k=="string"){var _=k.toLowerCase();A[_]&&(P=_),O&&(A[_]=O,P=_);var H=k.split("-");if(!P&&H.length>1)return E(H[0])}else{var z=k.name;A[z]=k,P=z}return!S&&P&&(B=P),P||!S&&B},j=function(E,k){if(F(E))return E.clone();var O=typeof k=="object"?k:{};return O.date=E,O.args=arguments,new I(O)},N=x;N.l=w,N.i=F,N.w=function(E,k){return j(E,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var I=(function(){function E(O){this.$L=w(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[$]=!0}var k=E.prototype;return k.parse=function(O){this.$d=(function(S){var P=S.date,_=S.utc;if(P===null)return new Date(NaN);if(N.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var H=P.match(f);if(H){var z=H[2]-1||0,q=(H[7]||"0").substring(0,3);return _?new Date(Date.UTC(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,q)):new Date(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,q)}}return new Date(P)})(O),this.init()},k.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},k.$utils=function(){return N},k.isValid=function(){return this.$d.toString()!==v},k.isSame=function(O,S){var P=j(O);return this.startOf(S)<=P&&P<=this.endOf(S)},k.isAfter=function(O,S){return j(O)<this.startOf(S)},k.isBefore=function(O,S){return this.endOf(S)<j(O)},k.$g=function(O,S,P){return N.u(O)?this[S]:this.set(P,O)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(O,S){var P=this,_=!!N.u(S)||S,H=N.p(O),z=function(K,J){var Q=N.w(P.$u?Date.UTC(P.$y,J,K):new Date(P.$y,J,K),P);return _?Q:Q.endOf(s)},q=function(K,J){return N.w(P.toDate()[K].apply(P.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(J)),P)},V=this.$W,Z=this.$M,ae=this.$D,R="set"+(this.$u?"UTC":"");switch(H){case h:return _?z(1,0):z(31,11);case p:return _?z(1,Z):z(0,Z+1);case c:var U=this.$locale().weekStart||0,W=(V<U?V+7:V)-U;return z(_?ae-W:ae+(6-W),Z);case s:case g:return q(R+"Hours",0);case u:return q(R+"Minutes",1);case i:return q(R+"Seconds",2);case l:return q(R+"Milliseconds",3);default:return this.clone()}},k.endOf=function(O){return this.startOf(O,!1)},k.$set=function(O,S){var P,_=N.p(O),H="set"+(this.$u?"UTC":""),z=(P={},P[s]=H+"Date",P[g]=H+"Date",P[p]=H+"Month",P[h]=H+"FullYear",P[u]=H+"Hours",P[i]=H+"Minutes",P[l]=H+"Seconds",P[a]=H+"Milliseconds",P)[_],q=_===s?this.$D+(S-this.$W):S;if(_===p||_===h){var V=this.clone().set(g,1);V.$d[z](q),V.init(),this.$d=V.set(g,Math.min(this.$D,V.daysInMonth())).$d}else z&&this.$d[z](q);return this.init(),this},k.set=function(O,S){return this.clone().$set(O,S)},k.get=function(O){return this[N.p(O)]()},k.add=function(O,S){var P,_=this;O=Number(O);var H=N.p(S),z=function(Z){var ae=j(_);return N.w(ae.date(ae.date()+Math.round(Z*O)),_)};if(H===p)return this.set(p,this.$M+O);if(H===h)return this.set(h,this.$y+O);if(H===s)return z(1);if(H===c)return z(7);var q=(P={},P[i]=n,P[u]=o,P[l]=r,P)[H]||1,V=this.$d.getTime()+O*q;return N.w(V,this)},k.subtract=function(O,S){return this.add(-1*O,S)},k.format=function(O){var S=this,P=this.$locale();if(!this.isValid())return P.invalidDate||v;var _=O||"YYYY-MM-DDTHH:mm:ssZ",H=N.z(this),z=this.$H,q=this.$m,V=this.$M,Z=P.weekdays,ae=P.months,R=P.meridiem,U=function(J,Q,ee,oe){return J&&(J[Q]||J(S,_))||ee[Q].slice(0,oe)},W=function(J){return N.s(z%12||12,J,"0")},K=R||function(J,Q,ee){var oe=J<12?"AM":"PM";return ee?oe.toLowerCase():oe};return _.replace(b,(function(J,Q){return Q||(function(ee){switch(ee){case"YY":return String(S.$y).slice(-2);case"YYYY":return N.s(S.$y,4,"0");case"M":return V+1;case"MM":return N.s(V+1,2,"0");case"MMM":return U(P.monthsShort,V,ae,3);case"MMMM":return U(ae,V);case"D":return S.$D;case"DD":return N.s(S.$D,2,"0");case"d":return String(S.$W);case"dd":return U(P.weekdaysMin,S.$W,Z,2);case"ddd":return U(P.weekdaysShort,S.$W,Z,3);case"dddd":return Z[S.$W];case"H":return String(z);case"HH":return N.s(z,2,"0");case"h":return W(1);case"hh":return W(2);case"a":return K(z,q,!0);case"A":return K(z,q,!1);case"m":return String(q);case"mm":return N.s(q,2,"0");case"s":return String(S.$s);case"ss":return N.s(S.$s,2,"0");case"SSS":return N.s(S.$ms,3,"0");case"Z":return H}return null})(J)||H.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(O,S,P){var _,H=this,z=N.p(S),q=j(O),V=(q.utcOffset()-this.utcOffset())*n,Z=this-q,ae=function(){return N.m(H,q)};switch(z){case h:_=ae()/12;break;case p:_=ae();break;case d:_=ae()/3;break;case c:_=(Z-V)/6048e5;break;case s:_=(Z-V)/864e5;break;case u:_=Z/o;break;case i:_=Z/n;break;case l:_=Z/r;break;default:_=Z}return P?_:N.a(_)},k.daysInMonth=function(){return this.endOf(p).$D},k.$locale=function(){return A[this.$L]},k.locale=function(O,S){if(!O)return this.$L;var P=this.clone(),_=w(O,S,!0);return _&&(P.$L=_),P},k.clone=function(){return N.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},E})(),T=I.prototype;return j.prototype=T,[["$ms",a],["$s",l],["$m",i],["$H",u],["$W",s],["$M",p],["$y",h],["$D",g]].forEach((function(E){T[E[1]]=function(k){return this.$g(k,E[0],E[1])}})),j.extend=function(E,k){return E.$i||(E(k,I,j),E.$i=!0),j},j.locale=w,j.isDayjs=F,j.unix=function(E){return j(1e3*E)},j.en=A[B],j.Ls=A,j.p={},j}))})(fs)),fs.exports}var mS=gS();const vS=hi(mS);/**
|
|
486
|
+
* @license lucide-react v0.456.0 - ISC
|
|
487
|
+
*
|
|
488
|
+
* This source code is licensed under the ISC license.
|
|
489
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
490
|
+
*/const bS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cg=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
491
|
+
* @license lucide-react v0.456.0 - ISC
|
|
492
|
+
*
|
|
493
|
+
* This source code is licensed under the ISC license.
|
|
494
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
495
|
+
*/var yS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
496
|
+
* @license lucide-react v0.456.0 - ISC
|
|
497
|
+
*
|
|
498
|
+
* This source code is licensed under the ISC license.
|
|
499
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
500
|
+
*/const CS=Zr(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:l,...i},u)=>Pa("svg",{ref:u,...yS,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:cg("lucide",o),...i},[...l.map(([s,c])=>Pa(s,c)),...Array.isArray(a)?a:[a]]));/**
|
|
501
|
+
* @license lucide-react v0.456.0 - ISC
|
|
502
|
+
*
|
|
503
|
+
* This source code is licensed under the ISC license.
|
|
504
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
505
|
+
*/const ir=(e,t)=>{const r=Zr(({className:n,...o},a)=>Pa(CS,{ref:a,iconNode:t,className:cg(`lucide-${bS(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
506
|
+
* @license lucide-react v0.456.0 - ISC
|
|
507
|
+
*
|
|
508
|
+
* This source code is licensed under the ISC license.
|
|
509
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
510
|
+
*/const va=ir("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
511
|
+
* @license lucide-react v0.456.0 - ISC
|
|
512
|
+
*
|
|
513
|
+
* This source code is licensed under the ISC license.
|
|
514
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
515
|
+
*/const ba=ir("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
516
|
+
* @license lucide-react v0.456.0 - ISC
|
|
517
|
+
*
|
|
518
|
+
* This source code is licensed under the ISC license.
|
|
519
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
520
|
+
*/const xS=ir("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
521
|
+
* @license lucide-react v0.456.0 - ISC
|
|
522
|
+
*
|
|
523
|
+
* This source code is licensed under the ISC license.
|
|
524
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
525
|
+
*/const DS=ir("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
526
|
+
* @license lucide-react v0.456.0 - ISC
|
|
527
|
+
*
|
|
528
|
+
* This source code is licensed under the ISC license.
|
|
529
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
530
|
+
*/const wS=ir("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
531
|
+
* @license lucide-react v0.456.0 - ISC
|
|
532
|
+
*
|
|
533
|
+
* This source code is licensed under the ISC license.
|
|
534
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
535
|
+
*/const ES=ir("MessageSquareDot",[["path",{d:"M11.7 3H5a2 2 0 0 0-2 2v16l4-4h12a2 2 0 0 0 2-2v-2.7",key:"uodpkb"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
|
|
536
|
+
* @license lucide-react v0.456.0 - ISC
|
|
537
|
+
*
|
|
538
|
+
* This source code is licensed under the ISC license.
|
|
539
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
540
|
+
*/const SS=ir("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
541
|
+
* @license lucide-react v0.456.0 - ISC
|
|
542
|
+
*
|
|
543
|
+
* This source code is licensed under the ISC license.
|
|
544
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
545
|
+
*/const kS=ir("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
546
|
+
* @license lucide-react v0.456.0 - ISC
|
|
547
|
+
*
|
|
548
|
+
* This source code is licensed under the ISC license.
|
|
549
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
550
|
+
*/const BS=ir("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
551
|
+
* @license lucide-react v0.456.0 - ISC
|
|
552
|
+
*
|
|
553
|
+
* This source code is licensed under the ISC license.
|
|
554
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
555
|
+
*/const AS=ir("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
|
|
556
|
+
* @license lucide-react v0.456.0 - ISC
|
|
557
|
+
*
|
|
558
|
+
* This source code is licensed under the ISC license.
|
|
559
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
560
|
+
*/const $S=ir("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
561
|
+
* @license lucide-react v0.456.0 - ISC
|
|
562
|
+
*
|
|
563
|
+
* This source code is licensed under the ISC license.
|
|
564
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
565
|
+
*/const FS=ir("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
566
|
+
* @license lucide-react v0.456.0 - ISC
|
|
567
|
+
*
|
|
568
|
+
* This source code is licensed under the ISC license.
|
|
569
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
570
|
+
*/const NS=ir("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function gf(e){const t=(e||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t)?"rag/pic":t==="pdf"?"rag/pdf":["doc","docx"].includes(t)?"rag/word":["xls","xlsx"].includes(t)?"rag/excel":["ppt","pptx"].includes(t)?"rag/ppt":t==="txt"||t==="md"?"rag/txt":t==="csv"?"rag/csv":t==="json"?"rag/json":["zip","rar","7z"].includes(t)?"rag/zip":["odt","ods","odp","odf"].includes(t)?"rag/odf":t==="wps"?"rag/wps":["html","htm","url"].includes(t)?"rag/url":["mp4","avi","mov","wmv","flv","webm","mkv"].includes(t)?"rag/video":"rag/file"}function Co(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Co(r.children)));return t}function OS(e){const t=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g,r=[];let n;for(;n=t.exec(e);){const o=n[1].split(";").map(a=>a.trim()).filter(Boolean);r.push(...o)}return Array.from(new Set(r))}const PS=At.div`
|
|
571
|
+
display: flex;
|
|
572
|
+
flex-direction: column;
|
|
573
|
+
margin-bottom: 0.5rem;
|
|
574
|
+
animation: fadeIn 0.3s ease-in-out;
|
|
575
|
+
width: 100%;
|
|
576
|
+
text-wrap: wrap;
|
|
577
|
+
|
|
578
|
+
${e=>e.$align==="right"&&`
|
|
579
|
+
align-items: flex-end;
|
|
580
|
+
`}
|
|
581
|
+
|
|
582
|
+
${e=>e.$align==="center"&&`
|
|
583
|
+
align-items: center;
|
|
584
|
+
`}
|
|
585
|
+
|
|
586
|
+
@keyframes fadeIn {
|
|
587
|
+
from { opacity: 0; transform: translateY(10px); }
|
|
588
|
+
to { opacity: 1; transform: translateY(0); }
|
|
589
|
+
}
|
|
590
|
+
`,RS=At.div`
|
|
591
|
+
display: flex;
|
|
592
|
+
align-items: center;
|
|
593
|
+
gap: 0.5rem;
|
|
594
|
+
margin-bottom: 0.5rem;
|
|
595
|
+
width: 100%;
|
|
596
|
+
|
|
597
|
+
${e=>e.$isUser&&`
|
|
598
|
+
flex-direction: row-reverse;
|
|
599
|
+
justify-content: end;
|
|
600
|
+
`}
|
|
601
|
+
`,TS=At.div`
|
|
602
|
+
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
603
|
+
border-radius: 50%;
|
|
604
|
+
width: 2rem;
|
|
605
|
+
height: 2rem;
|
|
606
|
+
|
|
607
|
+
flex-shrink: 0;
|
|
608
|
+
display: flex;
|
|
609
|
+
align-items: center;
|
|
610
|
+
justify-content: center;
|
|
611
|
+
font-size: 1rem;
|
|
612
|
+
`,IS=At.div`
|
|
613
|
+
width: 100%;
|
|
614
|
+
margin-top: 0.5rem;
|
|
615
|
+
.message-time {
|
|
616
|
+
font-size: 0.75rem;
|
|
617
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.message-card {
|
|
621
|
+
background: ${e=>e.$isUser?"#E3ECFF":"#ffffff"};
|
|
622
|
+
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
623
|
+
border-radius: 0.5rem;
|
|
624
|
+
|
|
625
|
+
overflow: hidden;
|
|
626
|
+
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
627
|
+
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
628
|
+
|
|
629
|
+
.message-text {
|
|
630
|
+
width: 100%;
|
|
631
|
+
line-height: 1.6;
|
|
632
|
+
padding: 0.75rem 1rem;
|
|
633
|
+
border-radius: 0.5rem;
|
|
634
|
+
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
635
|
+
font-size: 0.875rem;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
`,jS=At.div`
|
|
639
|
+
margin-top: 0.5rem;
|
|
640
|
+
display: flex;
|
|
641
|
+
padding: 0.5rem;
|
|
642
|
+
align-items: center;
|
|
643
|
+
|
|
644
|
+
gap: 0.75rem;
|
|
645
|
+
|
|
646
|
+
button {
|
|
647
|
+
display: flex;
|
|
648
|
+
align-items: center;
|
|
649
|
+
gap: 0.25rem;
|
|
650
|
+
font-size: 0.875rem;
|
|
651
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
652
|
+
background: none;
|
|
653
|
+
border: none;
|
|
654
|
+
cursor: pointer;
|
|
655
|
+
transition: color 0.2s;
|
|
656
|
+
|
|
657
|
+
&:hover {
|
|
658
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
&.active {
|
|
662
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
`,_S=At.div`
|
|
666
|
+
margin-top: 1rem;
|
|
667
|
+
padding: 1rem;
|
|
668
|
+
|
|
669
|
+
border-radius: 0.5rem;
|
|
670
|
+
|
|
671
|
+
@keyframes followUpIn {
|
|
672
|
+
from {
|
|
673
|
+
opacity: 0;
|
|
674
|
+
transform: translateY(6px);
|
|
675
|
+
}
|
|
676
|
+
to {
|
|
677
|
+
opacity: 1;
|
|
678
|
+
transform: translateY(0);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.follow-up-title {
|
|
683
|
+
font-size: 0.875rem;
|
|
684
|
+
font-weight: 600;
|
|
685
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
686
|
+
margin-bottom: 0.75rem;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.follow-up-list {
|
|
690
|
+
display: flex;
|
|
691
|
+
flex-direction: column;
|
|
692
|
+
gap: 0.5rem;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.follow-up-item {
|
|
696
|
+
width: fit-content;
|
|
697
|
+
background: #ffffff;
|
|
698
|
+
border: 1px solid #e5e7eb;
|
|
699
|
+
border-radius: 0.375rem;
|
|
700
|
+
padding: 0.75rem 1rem;
|
|
701
|
+
cursor: pointer;
|
|
702
|
+
transition: all 0.2s ease;
|
|
703
|
+
text-align: left;
|
|
704
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
705
|
+
font-size: 0.875rem;
|
|
706
|
+
line-height: 1.4;
|
|
707
|
+
opacity: 0;
|
|
708
|
+
transform: translateY(6px);
|
|
709
|
+
animation: followUpIn 280ms ease forwards;
|
|
710
|
+
animation-play-state: running;
|
|
711
|
+
|
|
712
|
+
&:hover {
|
|
713
|
+
background: #e5e7eb;
|
|
714
|
+
border-color: #d1d5db;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
&:active {
|
|
718
|
+
transform: translateY(1px);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
`,ya=At.div`
|
|
722
|
+
|
|
723
|
+
padding: 1rem;
|
|
724
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
725
|
+
|
|
726
|
+
border-radius: 0.5rem;
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
.reference-title {
|
|
730
|
+
font-size: 0.875rem;
|
|
731
|
+
font-weight: 600;
|
|
732
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
733
|
+
margin-bottom: 0.75rem;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.reference-list {
|
|
737
|
+
display: flex;
|
|
738
|
+
flex-direction: column;
|
|
739
|
+
gap: 0.5rem;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.reference-item {
|
|
743
|
+
background: #ffffff;
|
|
744
|
+
|
|
745
|
+
border-radius: 0.375rem;
|
|
746
|
+
padding: 0.75rem 0;
|
|
747
|
+
display: flex;
|
|
748
|
+
align-items: center;
|
|
749
|
+
gap: 0.5rem;
|
|
750
|
+
|
|
751
|
+
.file-icon {
|
|
752
|
+
width: 2rem;
|
|
753
|
+
height: 2rem;
|
|
754
|
+
background: #e2e8f0;
|
|
755
|
+
border-radius: 0.25rem;
|
|
756
|
+
display: flex;
|
|
757
|
+
align-items: center;
|
|
758
|
+
justify-content: center;
|
|
759
|
+
font-size: 0.75rem;
|
|
760
|
+
color: #64748b;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
.file-info {
|
|
764
|
+
flex: 1;
|
|
765
|
+
|
|
766
|
+
.file-name {
|
|
767
|
+
font-size: 0.875rem;
|
|
768
|
+
font-weight: 500;
|
|
769
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
770
|
+
margin-bottom: 0.25rem;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.file-meta {
|
|
774
|
+
font-size: 0.75rem;
|
|
775
|
+
color: #64748b;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
.file-score {
|
|
780
|
+
font-size: 0.75rem;
|
|
781
|
+
color: #059669;
|
|
782
|
+
font-weight: 500;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
`,MS=At.div`
|
|
786
|
+
position: fixed;
|
|
787
|
+
top: 0;
|
|
788
|
+
left: 0;
|
|
789
|
+
right: 0;
|
|
790
|
+
bottom: 0;
|
|
791
|
+
background: rgba(0, 0, 0, 0.8);
|
|
792
|
+
display: ${e=>e.$show?"flex":"none"};
|
|
793
|
+
align-items: center;
|
|
794
|
+
justify-content: center;
|
|
795
|
+
z-index: 1000;
|
|
796
|
+
cursor: pointer;
|
|
797
|
+
|
|
798
|
+
.modal-content {
|
|
799
|
+
max-width: 90vw;
|
|
800
|
+
max-height: 90vh;
|
|
801
|
+
position: relative;
|
|
802
|
+
cursor: default;
|
|
803
|
+
display: flex;
|
|
804
|
+
flex-direction: column;
|
|
805
|
+
align-items: center;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.modal-image {
|
|
809
|
+
max-width: 100%;
|
|
810
|
+
max-height: calc(90vh - 60px);
|
|
811
|
+
object-fit: contain;
|
|
812
|
+
border-radius: 8px;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.modal-close {
|
|
816
|
+
margin-top: 16px;
|
|
817
|
+
background: rgba(255, 255, 255, 0.3);
|
|
818
|
+
border: none;
|
|
819
|
+
border-radius: 20px;
|
|
820
|
+
padding: 8px 20px;
|
|
821
|
+
display: flex;
|
|
822
|
+
align-items: center;
|
|
823
|
+
justify-content: center;
|
|
824
|
+
cursor: pointer;
|
|
825
|
+
font-size: 14px;
|
|
826
|
+
color: #333;
|
|
827
|
+
font-weight: 500;
|
|
828
|
+
transition: all 0.2s ease;
|
|
829
|
+
|
|
830
|
+
&:hover {
|
|
831
|
+
background: rgba(255, 255, 255, 1);
|
|
832
|
+
transform: translateY(-1px);
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
`,mf=At.div`
|
|
836
|
+
|
|
837
|
+
padding:0rem 1rem;
|
|
838
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
839
|
+
|
|
840
|
+
.gallery-grid {
|
|
841
|
+
display: grid;
|
|
842
|
+
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
843
|
+
gap: 0.75rem;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.gallery-item {
|
|
847
|
+
position: relative;
|
|
848
|
+
aspect-ratio: 1;
|
|
849
|
+
border-radius: 0.375rem;
|
|
850
|
+
overflow: hidden;
|
|
851
|
+
cursor: pointer;
|
|
852
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
853
|
+
border: 2px solid transparent;
|
|
854
|
+
|
|
855
|
+
&:hover {
|
|
856
|
+
transform: translateY(-2px);
|
|
857
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
858
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
.gallery-image {
|
|
862
|
+
width: 100%;
|
|
863
|
+
height: 100%;
|
|
864
|
+
object-fit: cover;
|
|
865
|
+
background: #f3f4f6;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
.gallery-overlay {
|
|
869
|
+
position: absolute;
|
|
870
|
+
bottom: 0;
|
|
871
|
+
left: 0;
|
|
872
|
+
right: 0;
|
|
873
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
874
|
+
color: white;
|
|
875
|
+
padding: 0.5rem;
|
|
876
|
+
font-size: 0.75rem;
|
|
877
|
+
text-align: center;
|
|
878
|
+
opacity: 0;
|
|
879
|
+
transition: opacity 0.2s ease;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
&:hover .gallery-overlay {
|
|
883
|
+
opacity: 1;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
`,JS=({is_download:e,content:t,contentType:r="plainText",align:n="left",displayStatus:o="ready",avatar:a,isUser:l=!1,userAvatar:i,aiAvatar:u,date:s,time:c,timestamp:p,showTime:d=!0,errorMessage:h,styles:g,reference:v,webReference:f,databaseReference:b,graphReference:C,filePaths:y,currentFiles:x,fileManagerData:B,audioUrl:A,feedbackResult:$,queryId:F,defaultAnswer:w,isWelcome:j=!1,isLast:N=!1,respTime:I,tokens:T,resultType:E,followUpQuestions:k=[],tools:O={},eventsEmit:S})=>{yt(()=>{console.log("isUser",l),console.log("isLast",N)},[N,l]);const P=ii(),_=Je(()=>{var Y,me,Fe,Ce,fe,Be,ke,se,X,G,Ae;return{colors:{primary:((Y=P==null?void 0:P.colors)==null?void 0:Y.primary)||"#3b82f6",background:((me=P==null?void 0:P.colors)==null?void 0:me.background)||"#ffffff",userBackground:((Fe=P==null?void 0:P.colors)==null?void 0:Fe.primary)||"#3b82f6",border:((Ce=P==null?void 0:P.colors)==null?void 0:Ce.border)||"#e5e7eb",text:((fe=P==null?void 0:P.colors)==null?void 0:fe.text)||"#374151",disabled:((Be=P==null?void 0:P.colors)==null?void 0:Be.disabled)||"#6b7280",info:((ke=P==null?void 0:P.colors)==null?void 0:ke.info)||"#3b82f6",warning:((se=P==null?void 0:P.colors)==null?void 0:se.warning)||"#f59e0b",error:((X=P==null?void 0:P.colors)==null?void 0:X.error)||"#ef4444",...(G=g==null?void 0:g.theme)==null?void 0:G.colors},icons:{aiAvatar:u||"/vite.svg",userAvatar:i||"/default-user-avatar.png",...(Ae=g==null?void 0:g.theme)==null?void 0:Ae.icons}}},[P,g,u,i]),H=Je(()=>{const Y=c||s||p;return!Y||!d?null:vS(Y).format("YY-MM-DD HH:mm:ss")},[c,s,p,d]),[z,q]=ut([]),[V,Z]=ut(null),[ae,R]=ut(!1),[U,W]=ut(!1),[K,J]=ut(!1),[Q,ee]=ut(!1),[oe,re]=ut(!1),ne=()=>{const Y={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:"\u{1F4AD}"},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:"\u{1F4AD}"},uploading:{text:"\u6587\u4EF6\u4E0A\u4F20\u4E2D...",icon:"\u{1F4E4}"},analyzing:{text:"\u77E5\u8BC6\u89E3\u6790\u4E2D...",icon:"\u{1F50D}"},error:{text:h||"\u62B1\u6B49\uFF0C\u672C\u6B21\u8BF7\u6C42\u51FA\u9519\u4E86\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",icon:"\u274C"},initializing:{text:"\u6B63\u5728\u521D\u59CB\u5316...",icon:"\u2699\uFE0F"},ready:{text:"\u601D\u8003\u5B8C\u6210",icon:M.jsx(na,{type:"rag/think",size:16})}}[o]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},me=I?`(\u7528\u65F6 ${Math.round(I/1e3)} \u79D2)`:"";return M.jsx("div",{className:"think-header",children:M.jsx("div",{className:"think-header-left ml-[16px]",children:M.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-fit",children:[M.jsx("div",{className:"think-icon",children:Y.icon}),M.jsx("div",{className:"think-title",children:Y.text}),me&&M.jsx("div",{className:"think-time",children:me}),xe&&M.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{re(!oe)},children:M.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:oe?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:M.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},[de,ce]=ut([]),[Se,We]=ut(null),qe=Je(()=>{try{if(!v)return[];const Y=JSON.parse(v);return Array.isArray(Y)?Y:[]}catch{return[]}},[v]),ue=(Y,me)=>{var ke,se,X;const Fe=((ke=Y==null?void 0:Y.metadata)==null?void 0:ke.source)||(Y==null?void 0:Y.file_path)||(Y==null?void 0:Y.path)||(Y==null?void 0:Y.convertedFilePath)||(Y==null?void 0:Y.parsedFilePath)||"",Ce=((se=Y==null?void 0:Y.metadata)==null?void 0:se.title)||(Y==null?void 0:Y.file_name)||"",fe=((X=Y==null?void 0:Y.metadata)==null?void 0:X.id)||(Y==null?void 0:Y.id)||(Y==null?void 0:Y.file_id)||"",Be=qe.find(G=>{var pe,He,ft;const Ae=((pe=G==null?void 0:G.metadata)==null?void 0:pe.source)||(G==null?void 0:G.file_path)||(G==null?void 0:G.path)||(G==null?void 0:G.convertedFilePath)||(G==null?void 0:G.parsedFilePath)||"",tt=((He=G==null?void 0:G.metadata)==null?void 0:He.title)||(G==null?void 0:G.file_name)||"",Ie=((ft=G==null?void 0:G.metadata)==null?void 0:ft.id)||(G==null?void 0:G.id)||"";return fe&&Ie&&String(fe)===String(Ie)||Fe&&Ae&&Ae===Fe||Ce&&tt&&tt===Ce});if(Be){const G=(Be!=null&&Be.references&&Array.isArray(Be.references)?Be.references:[Be]).find(Ae=>String(Ae.order_num)===String(me)||String(Ae.id)===String(me));if(G)return G}for(const G of qe){if(G!=null&&G.references&&Array.isArray(G.references)){const Ae=G.references.find(tt=>String(tt.order_num)===String(me)||String(tt.id)===String(me));if(Ae)return Ae}if(String(G.order_num)===String(me)||String(G.id)===String(me))return G}return null},ve=(Y,me)=>{function Fe(se,X){for(const G of se){if(G.references&&Array.isArray(G.references)){const Ae=G.references.find(tt=>String(tt.order_num)===String(X)||String(tt.id)===String(X));if(Ae)return Ae}if(String(G.order_num)===String(X)||String(G.id)===String(X))return G}return null}let Ce=[];try{v&&(Ce=JSON.parse(v))}catch(se){console.error("Failed to parse reference:",se)}const fe=Fe(Ce,Y.id),Be=se=>{if(typeof t!="string")return;const X=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${se}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(t);if(X&&X[1]){const G=Number(X[1]);return Number.isNaN(G)?void 0:G}},ke={tagInfo:{id:Y==null?void 0:Y.id,index:Be(String(Y==null?void 0:Y.id)),image_urls:(Y==null?void 0:Y.imageUrls)||(Y==null?void 0:Y.image_urls)||[]},fromtype:String((Y==null?void 0:Y.fromtype)??""),leaf:Y,attributes:me,referenceDoc:fe||void 0};if(String(Y==null?void 0:Y.fromtype)==="2"&&C)try{const se=JSON.parse(C||"[]"),X=(Array.isArray(se)?se:[]).find(G=>{if(Array.isArray(G==null?void 0:G.traceNodes))return G.traceNodes.some(tt=>String(tt==null?void 0:tt.id)===String(Y.id));const Ae=String(Y.id||"").split("_")[0];return String(G==null?void 0:G.id)===Ae});X&&(ke.graph={id:X.id,graphName:X.graphName,fetchUrl:X.fetchUrl,cyphers:X.cyphers},ke.traceNode=Array.isArray(X.traceNodes)?X.traceNodes.find(G=>String(G==null?void 0:G.id)===String(Y.id)):void 0)}catch{}S==null||S("action_retrive_tag",ke),S==null||S("retrive_tag:click",ke)},we=Y=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",Y),console.log("databaseReference available:",!!b),Y.id&&b){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",b);const me=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Y.id,databaseReference:b}});console.log("Dispatching event:",me),window.dispatchEvent(me)}else console.log("Cannot send response - missing id or databaseReference")};he.useEffect(()=>{const Y=me=>{we(me.detail)};return window.addEventListener("retrieve-sql-data:request-data",Y),()=>{window.removeEventListener("retrieve-sql-data:request-data",Y)}},[b]),he.useEffect(()=>{const Y=me=>{Le(me.detail)};return window.addEventListener("rtext_pagination_click",Y),()=>{window.removeEventListener("rtext_pagination_click",Y)}},[Se]);const Le=Y=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",Y),Y.replacePredataFunction&&Se){const me={...Se,rows:Se.rows};Y.replacePredataFunction(me)}S==null||S("rtext_pagination_click",Y)},$e=ct(new Map),Oe=ct(1),Qe=ct(""),Ge=ct({0:1,1:1,2:1,3:1}),Re=Je(()=>{if(r==="stream"&&typeof t=="string"){let Y=t;const me=[];return F&&F!==Qe.current&&($e.current.clear(),Oe.current=1,Ge.current={0:1,1:1,2:1,3:1},Qe.current=F),Y=Y.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Fe,Ce)=>{const fe=Ce.match(/id=['"]([^'"]+)['"]/),Be=Ce.match(/fromType=['"]([^'"]+)['"]/);if(fe){const ke=fe[1],se=Be?Be[1]:"0";if(!$e.current.has(ke)){const G=Ge.current,Ae=se==="1"?"1":se==="2"?"2":se==="3"?"3":"0",tt=G[Ae]??1;$e.current.set(ke,tt),G[Ae]=tt+1,Ge.current=G}const X=$e.current.get(ke);return`[retrive-tag${Ce}][${X}][/retrive-tag]`}return Fe}),Y=Y.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Fe=>{const Ce=Fe.match(/image_urls=['"]([^'"]+)['"]/);if(Ce){const fe=Ce[1].split(";").map(Be=>Be.trim()).filter(Boolean);me.push(...fe)}return Fe}),q(me),Y}return t},[t,r,F]),je=Je(()=>{if(r==="stream"&&typeof Re=="string")try{return ug(Re)}catch(Y){return console.error("Failed to deserialize markdown:",Y),[]}return[]},[Re,r]);yt(()=>{try{r==="stream"&&b&&(Y=>{try{const me=typeof Y=="string"?JSON.parse(Y):Y;return me?Array.isArray(me)?me:[me]:[]}catch{return[]}})(b).forEach(Y=>{const me=Y==null?void 0:Y.id;if(!me)return;const Fe=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:me,databaseReference:Y}});window.dispatchEvent(Fe)})}catch{}},[r,b]);const xe=Je(()=>{if(!Array.isArray(je))return!1;const Y=Fe=>{for(const Ce of Fe)if(Ce.type==="think"||Array.isArray(Ce.children)&&Y(Ce.children))return!0;return!1},me=Y(je);return console.log("Think detection:",{slateContent:je,hasThinkElement:me,displayStatus:o,isUser:l}),me},[je,o,l]),ye=Je(()=>({databaseReference:b,...xe&&{isThinkCollapsed:oe}}),[b,xe,oe]),_e=Je(()=>a||(l?_.icons.userAvatar:_.icons.aiAvatar),[a,l,_.icons]),Ue=Je(()=>typeof t=="string"?t:Array.isArray(t)?t.map(Y=>typeof Y=="string"?Y:Y.text||"").join(""):w||"",[t,w]),Ze=()=>{if(j)return null;const Y=[{key:"copy",show:O.copy!==!1,icon:xS,label:"\u590D\u5236",onClick:()=>S==null?void 0:S("chatbox:copy",{content:Ue})},{key:"like",show:O.like!==!1,icon:FS,label:"\u8D5E",onClick:()=>S==null?void 0:S("chatbox:like",{result:$,queryId:F}),active:$===1},{key:"dislike",show:O.dislike!==!1,icon:$S,label:"\u8E29",onClick:()=>S==null?void 0:S("chatbox:dislike",{result:$,queryId:F}),active:$===0},{key:"repeat",show:!l&&N,icon:BS,label:"\u91CD\u590D",onClick:()=>S==null?void 0:S("chatbox:repeat",{content:t,queryId:F,filePaths:y,audioUrl:A})},{key:"forward",show:O.forward,icon:AS,label:"\u8F6C\u53D1",onClick:()=>S==null?void 0:S("chatbox:forward",{content:Ue,queryId:F})},{key:"delete",show:O.delete,icon:NS,label:"\u5220\u9664",onClick:()=>S==null?void 0:S("chatbox:delete",{queryId:F})},{key:"edit",show:O.edit,icon:SS,label:"\u7F16\u8F91",onClick:()=>S==null?void 0:S("chatbox:edit",{content:Ue,queryId:F})}];return M.jsxs("div",{className:"flex justify-between items-center px-6",children:[M.jsx(jS,{$theme:_,children:Y.filter(me=>me.show).map(me=>{const Fe=me.icon;return M.jsx(Ta,{title:me.label,placement:"top",children:M.jsx("button",{className:me.active?"active":"",onClick:me.onClick,children:M.jsx(Fe,{size:18})})},me.key)})}),!l&&o=="ready"&&!j&&M.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017"," ",M.jsx("span",{style:{color:_.colors.primary},children:T||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",M.jsx("span",{style:{color:_.colors.primary},children:Math.round((I||0)/1e3)}),"\u79D2"]})]})},Me=Je(()=>{if(!v)return[];let Y=[];try{const fe=JSON.parse(v);Y=Array.isArray(fe)?fe:[]}catch{return[]}let me=Y.map(fe=>{try{const Be=fe.metadata||{};let ke="";Be.type==="video"&&Be.source_name&&typeof Be.source_name=="string"?ke=Be.source_name:fe.name&&typeof fe.name=="string"?ke=fe.name:fe.file_name&&typeof fe.file_name=="string"?ke=fe.file_name:Be.title&&typeof Be.title=="string"?ke=Be.title:Be.source&&typeof Be.source=="string"?ke=Be.source.split("/").pop()||"":fe.order_num?ke=String(fe.order_num):ke="\u672A\u77E5\u6587\u6863";let se="pdf";if(Be.type&&typeof Be.type=="string")se=Be.type.toLowerCase();else if(fe.name&&typeof fe.name=="string"){const G=fe.name.split(".").pop();G&&(se=G.toLowerCase())}else if(Be.source&&typeof Be.source=="string"){const G=Be.source.split(".").pop();G&&(se=G.toLowerCase())}else if(fe.file_path&&typeof fe.file_path=="string"){const G=fe.file_path.split(".").pop();G&&(se=G.toLowerCase())}const X=fe.parsedFilePath||Be.file_path||fe.file_path||fe.convertedFilePath||Be.link||Be.source_link||"";return{file_id:Be.id||fe.uid||"",file_name:ke,file_type:se,path:X,score:Number(fe.score||Be.score)||0,tags:[],parsedFilePath:fe.parsedFilePath,...fe}}catch(Be){return console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Be,fe),{file_id:fe.uid||"",file_name:fe.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:fe.convertedFilePath||fe.file_path||"",score:0,tags:[],parsedFilePath:fe.parsedFilePath,...fe}}});const Fe=Co(je||[]);if(Fe&&Fe.length){const fe=Fe.filter(ke=>ke.fromtype==="0"),Be=Fe.filter(ke=>ke.fromtype==="3");me=me.map(ke=>{const se=fe.filter(G=>{var tt,Ie;const Ae=Y.find(pe=>String(pe.order_num)===String(G.id));return((tt=Ae==null?void 0:Ae.metadata)==null?void 0:tt.source)&&((Ie=ke==null?void 0:ke.metadata)==null?void 0:Ie.source)&&Ae.metadata.source===ke.metadata.source}).map(G=>({id:G.id||"",index:G.indexId||"",image_urls:G.imageUrls?Array.isArray(G.imageUrls)?G.imageUrls:[G.imageUrls]:G.image_urls?G.image_urls.split(";").map(Ae=>Ae.trim()).filter(Boolean):[]})),X=Be.filter(G=>{var tt,Ie;const Ae=Y.find(pe=>String(pe.order_num)===String(G.id));return((tt=Ae==null?void 0:Ae.metadata)==null?void 0:tt.source)&&((Ie=ke==null?void 0:ke.metadata)==null?void 0:Ie.source)&&Ae.metadata.source===ke.metadata.source}).map(G=>({id:G.id||"",index:G.indexId||"",image_urls:G.imageUrls?Array.isArray(G.imageUrls)?G.imageUrls:[G.imageUrls]:G.image_urls?G.image_urls.split(";").map(Ae=>Ae.trim()).filter(Boolean):[]}));return{...ke,tags:[...se,...X]}})}const Ce=new Map;return me.filter(fe=>{var ke;const Be=((ke=fe==null?void 0:fe.metadata)==null?void 0:ke.source)||fe.file_name;return Be?Ce.has(Be)?!1:(Ce.set(Be,!0),!0):!0}).sort((fe,Be)=>((Be==null?void 0:Be.score)||0)-((fe==null?void 0:fe.score)||0))},[v,je]),vt=Je(()=>{if(!f)return[];let Y=[];try{const Ce=JSON.parse(f);Y=Array.isArray(Ce)?Ce:[]}catch{return[]}if(!(Y!=null&&Y.length))return[];let me=Y.map(Ce=>{var fe,Be,ke;return{link:(fe=Ce==null?void 0:Ce.metadata)==null?void 0:fe.link,file_name:(Be=Ce==null?void 0:Ce.metadata)==null?void 0:Be.title,score:(ke=Ce==null?void 0:Ce.metadata)==null?void 0:ke.score,tags:[]}});const Fe=Co(je||[]);if(Fe&&Fe.length){const Ce=Fe.filter(fe=>fe.fromtype==="1");me=me.map(fe=>{const Be=Ce.filter(ke=>{var X;const se=Y.find(G=>String(G.order_num)===String(ke.id));return((X=se==null?void 0:se.metadata)==null?void 0:X.title)&&se.metadata.title===fe.file_name}).map(ke=>({id:ke.id||"",index:ke.indexId||"",image_urls:ke.imageUrls?Array.isArray(ke.imageUrls)?ke.imageUrls:[ke.imageUrls]:ke.image_urls?ke.image_urls.split(";").map(se=>se.trim()).filter(Boolean):[]}));return{...fe,tags:Be}})}return me.sort((Ce,fe)=>((fe==null?void 0:fe.score)||0)-((Ce==null?void 0:Ce.score)||0))},[f,je]),Ye=Je(()=>{if(!C)return[];let Y=[];try{const Ce=JSON.parse(C);Y=Array.isArray(Ce)?Ce:[]}catch(Ce){return console.error("Failed to parse graphReference:",Ce),[]}let me=Y.map((Ce,fe)=>({id:Ce.id||`graph-${fe}`,graphName:Ce.graphName||`\u56FE\u8C31${fe+1}`,tags:[],...Ce}));const Fe=Co(je||[]);if(Fe&&Fe.length){const Ce=Fe.filter(fe=>fe.fromtype==="2");me=me.map(fe=>{const Be=G=>{if(typeof Re!="string")return;const Ae=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${G}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(Re);if(Ae&&Ae[1]){const tt=Number(Ae[1]);return Number.isNaN(tt)?void 0:tt}};let ke=[];Array.isArray(fe.traceNodes)&&fe.traceNodes.length>0?ke=fe.traceNodes.map((G,Ae)=>({id:G.id,index:Be(String(G.id))??Ae+1,image_urls:[]})):ke=Ce.filter(G=>String(G.id)===String(fe.id)).map(G=>({id:G.id||"",index:G.indexId||"",image_urls:G.imageUrls?Array.isArray(G.imageUrls)?G.imageUrls:[G.imageUrls]:G.image_urls?G.image_urls.split(";").map(Ae=>Ae.trim()).filter(Boolean):[]}));const se=new Set,X=ke.filter(G=>se.has(String(G.id))?!1:(se.add(String(G.id)),!0)).sort((G,Ae)=>Number(G.index)-Number(Ae.index));return{...fe,tags:X}})}return me},[C,je]),mt=Je(()=>{const Y=[...Co(je||[]).filter(me=>me.imageUrls&&Array.isArray(me.imageUrls)).flatMap(me=>me.imageUrls),...z];return Array.from(new Set(Y))},[je,z]),Dt=Je(()=>typeof t!="string"?[]:OS(t),[t]),nt=Je(()=>{var Y,me,Fe,Ce,fe,Be,ke,se;if(!b)return null;try{const X=typeof b=="string"?JSON.parse(b):b;if(Array.isArray(X)&&X.length>0){const G=X[0];if(G.retrieveSqlData)return{dataFetchUrl:G.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:G.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:G.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:G.retrieveSqlData.total||0,type:G.retrieveSqlData.type||"COLLECTION",preData:{columns:((me=(Y=G.retrieveSqlData.preData)==null?void 0:Y[0])==null?void 0:me.columns)||[],rows:((Ce=(Fe=G.retrieveSqlData.preData)==null?void 0:Fe[0])==null?void 0:Ce.data)||[]}}}return X.retrieveSqlData?{dataFetchUrl:X.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:X.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:X.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:X.retrieveSqlData.total||0,type:X.retrieveSqlData.type||"COLLECTION",preData:{columns:((Be=(fe=X.retrieveSqlData.preData)==null?void 0:fe[0])==null?void 0:Be.columns)||[],rows:((se=(ke=X.retrieveSqlData.preData)==null?void 0:ke[0])==null?void 0:se.data)||[]}}:{dataFetchUrl:X.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:X.databaseName||"\u6570\u636E\u5E93",tableName:X.tableName||"\u6570\u636E\u8868",total:X.total||0,type:X.type||"COLLECTION",preData:X.preData||{columns:[],rows:[]}}}catch(X){return console.error("Failed to parse databaseReference:",X),null}},[b]),it=Y=>{const{dataSourceType:me,databaseName:Fe,businessTableName:Ce,tableName:fe}=Y;return me==="DataTable"?`${Fe||"\u6570\u636E\u5E93"} - ${Ce||"\u6570\u636E\u8868"}`:me==="DirectDB"?`${Fe||"\u6570\u636E\u5E93"} - ${fe||"\u6570\u636E\u8868"}`:Fe||Ce||fe||"\u6570\u636E\u5E93"};he.useEffect(()=>{var Y,me,Fe,Ce,fe,Be,ke,se;if(b)try{const X=typeof b=="string"?JSON.parse(b):b;if(Array.isArray(X)&&X.length>0){const G=X[0];if(G.retrieveTableDataList&&Array.isArray(G.retrieveTableDataList)){ce(G.retrieveTableDataList);return}if((Fe=(me=(Y=G.retrieveSqlData)==null?void 0:Y.preData)==null?void 0:me[0])!=null&&Fe.data&&Array.isArray(G.retrieveSqlData.preData[0].data)){ce(G.retrieveSqlData.preData[0].data);return}}if(X.retrieveTableDataList&&Array.isArray(X.retrieveTableDataList)){ce(X.retrieveTableDataList);return}if((Be=(fe=(Ce=X.retrieveSqlData)==null?void 0:Ce.preData)==null?void 0:fe[0])!=null&&Be.data&&Array.isArray(X.retrieveSqlData.preData[0].data)){ce(X.retrieveSqlData.preData[0].data);return}(ke=nt==null?void 0:nt.preData)!=null&&ke.rows&&ce(nt.preData.rows)}catch(X){console.error("Failed to parse databaseReference for retrieveTableDataList:",X),(se=nt==null?void 0:nt.preData)!=null&&se.rows&&ce(nt.preData.rows)}},[b,nt]);const Qt=Je(()=>{if(!l)return[];if(Array.isArray(x))return x;if(typeof x=="string"&&x)try{return JSON.parse(x)}catch{return[]}return[]},[l,x]),Tt=()=>{if(!l||Qt.length===0)return null;const Y=se=>se!=null&&se.status&&(String(se.status).toLowerCase()==="uploading"||String(se.status).toLowerCase()==="parsing")?!1:!!(se!=null&&se.url||se!=null&&se.filePath||se!=null&&se.convertedFilePath),me=Qt.filter(se=>{const X=(se.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(X.toLowerCase())}),Fe=Qt.filter(se=>{const X=(se.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(X.toLowerCase())}),Ce=me.filter(Y),fe=me.filter(se=>!Y(se)),Be=Fe.filter(Y),ke=Fe.filter(se=>!Y(se));return M.jsxs("div",{className:"w-full mt-4",children:[(Ce.length>0||fe.length>0)&&M.jsx(mf,{$theme:_,children:M.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[fe.map((se,X)=>{var G;return M.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:M.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((G=_.colors)==null?void 0:G.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${X}`)}),Ce.map(se=>M.jsxs("div",{className:"gallery-item",onClick:()=>{Z(se.url||se.filePath||null),S==null||S("reference_file:click",{file:se.name,file_type:"image",url:se.url||se.filePath,parse_url:se.parseUrl||se.convertedFilePath,retrieve_tags:se.retrieveTags||[],file_id:se.uid,parsed_file_type:"image",references:se,type:"image",isUploadFile:!0,pdfPages:se.pdfPages||0})},children:[M.jsx("img",{src:se.url||se.filePath,alt:se.name,className:"gallery-image",onError:X=>{const G=X.target;G.style.display="none"}}),M.jsx("div",{className:"gallery-overlay",children:se.name})]},se.uid||se.name))]})}),(Be.length>0||ke.length>0)&&M.jsxs("div",{className:"w-full",children:[M.jsxs("div",{className:"text-sm font-semibold text-gray-700 mb-3 px-4",children:["\u4E0A\u4F20\u6587\u6863 (",Be.length,")"]}),M.jsxs("div",{className:"flex flex-col gap-2 px-4",style:{direction:"ltr"},children:[ke.map((se,X)=>{var G;return M.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 bg-gray-50/40",children:[M.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded bg-gray-200"}),M.jsx("div",{className:"flex-1 min-w-0",children:M.jsx("div",{className:"h-3 rounded bg-gray-200 w-[60%]"})}),M.jsx("div",{className:"w-6 h-6",children:M.jsx("div",{className:"animate-spin",style:{width:18,height:18,border:"2px solid #d1d5db",borderTopColor:((G=_.colors)==null?void 0:G.primary)||"#3b82f6",borderRadius:"9999px"}})})]},`pending-doc-${X}`)}),Be.map(se=>{const X=(se.name||"").split(".").pop()||"";return M.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 hover:border-blue-300 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>{S==null||S("reference_file:click",{file:se.name,file_type:X,url:se.url||se.filePath,parse_url:se.parseUrl||se.convertedFilePath,retrieve_tags:se.retrieveTags||[],file_id:se.uid,parsed_file_type:X,references:se,type:"file",isUploadFile:!0,pdfPages:se.pdfPages||0})},children:[M.jsx("div",{className:"flex-shrink-0",children:M.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center ",children:M.jsx(na,{type:gf(X),size:16})})}),M.jsx("div",{className:"flex-1 min-w-0",children:M.jsx("div",{className:"text-sm font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:G=>{G.stopPropagation(),S==null||S("referenceFile_question",{data:{...se,file_type:X,file_name:se.name,metadata:se,parsedFilePath:se.url||se.filePath}})},children:se.name})}),se.size&&M.jsx("div",{className:"text-sm text-gray-600",children:se.size})]},se.uid||se.name)})]})]})]})},lr=()=>{if(l)return null;const Y=Array.isArray(Me)?Me:[],me=Array.isArray(vt)?vt:[],Fe=Array.isArray(Ye)?Ye:[],Ce=Y.length>0&&E!==5,fe=me.length>0,Be=Fe.length>0,ke=((mt==null?void 0:mt.length)||0)>0||((Dt==null?void 0:Dt.length)||0)>0,se=de&&de.length>0;return!Ce&&!fe&&!Be&&!ke&&!se?null:M.jsxs(M.Fragment,{children:[ke&&M.jsx(mf,{$theme:_,children:M.jsx("div",{className:"gallery-grid",children:[...mt,...Dt].map((X,G)=>M.jsxs("div",{className:"gallery-item",onClick:()=>{Z(X),S==null||S("reference_file:click",{file:`\u56FE${G+1}`,file_type:"image",url:X,parse_url:X,retrieve_tags:[],references:{url:X},type:"image",isUploadFile:!1})},children:[M.jsx("img",{src:X,alt:`\u56FE${G+1}`,className:"gallery-image",onError:Ae=>{const tt=Ae.target;tt.style.display="none"}}),M.jsxs("div",{className:"gallery-overlay",children:["\u56FE",G+1]})]},X+G))})}),Ce&&M.jsxs(ya,{$theme:_,children:[M.jsx("div",{className:"reference-title justify-between items-center flex",children:M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),M.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Y.length})`}),Y.length>2&&M.jsx("div",{onClick:()=>R(!ae),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:ae?M.jsx(ba,{size:16,className:"text-[#b4b4b4]"}):M.jsx(va,{size:16,className:"text-[#b4b4b4]"})})]})}),M.jsx("div",{className:"reference-list",children:(ae?Y:Y.slice(0,2)).map((X,G)=>X&&M.jsx("div",{className:"reference-item",children:M.jsxs("div",{className:"file-info flex items-end gap-2",children:[M.jsx("div",{className:"flex-shrink-0",children:(()=>{const Ae=X.file_type||(X.file_name||"").split(".").pop()||"pdf",tt=(X.file_name||"").split(".").pop()||"file";return Ae==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(Ae)?M.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:M.jsx(kS,{size:16,className:"text-red-600"})}):M.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:M.jsx(na,{type:gf(tt),size:16})})})()}),M.jsx("div",{className:"flex-1 min-w-0",children:M.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Ae=>{Ae.stopPropagation(),S==null||S("knowledge_referenceFile_title:click",{data:{...X,file_type:X.file_type,file_name:X.file_name,metadata:X.metadata,parsedFilePath:X.parsedFilePath}})},children:X.file_name})}),M.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Ae=new Set,tt=(X.tags||[]).filter(pe=>Ae.has(pe.id)?!1:(Ae.add(pe.id),!0)).sort((pe,He)=>Number(pe.index)-Number(He.index)),Ie=pe=>{if(typeof Re!="string")return pe;const He=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${pe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Re);return He?He[1]:pe};return tt.slice(0,10).map(pe=>M.jsx("span",{className:"w-6 h-6 bg-[#e6f7ff] text-[#1890ff] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:He=>{He.stopPropagation();const ft=ue(X,pe.id),$t=X.file_type==="video"?"3":"0";S==null||S("retrive_tag:click",{tagInfo:ft||X,fromtype:$t,leaf:{id:pe.id,fromtype:$t},attributes:{}})},children:Ie(pe.id)},pe.id))})()}),M.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",X.score?Number(X.score).toFixed(2):"N/A"]}),X.file_type!=="video"&&M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(wS,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:e?"pointer":"not-allowed"},onClick:Ae=>{e&&(Ae.stopPropagation(),S==null||S("referenceFile_download",{data:{...X,file_type:X.file_type,file_name:X.file_name,metadata:X.metadata,parsedFilePath:X.parsedFilePath}}))}}),M.jsx("div",{className:"w-px h-4 bg-gray-300"}),M.jsx(ES,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:Ae=>{Ae.stopPropagation(),S==null||S("referenceFile_filechat",{data:{...X,file_type:X.file_type,file_name:X.file_name,metadata:X.metadata,parsedFilePath:X.parsedFilePath}})}})]})]})},X.file_id||G))})]}),se&&M.jsxs(ya,{$theme:_,children:[M.jsx("div",{className:"reference-title justify-between items-center flex",children:M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),M.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${de.length||0})`}),de.length>2&&M.jsx("div",{onClick:()=>J(!K),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:K?M.jsx(ba,{size:16,className:"text-[#b4b4b4]"}):M.jsx(va,{size:16,className:"text-[#b4b4b4]"})})]})}),M.jsx("div",{className:"reference-list",children:(K?de:de.slice(0,2)).map((X,G)=>M.jsx("div",{className:"reference-item",children:M.jsxs("div",{className:"file-info flex items-end gap-2",children:[M.jsx("div",{className:"flex-shrink-0",children:M.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:M.jsx(DS,{size:20,className:"text-blue-600"})})}),M.jsx("div",{className:"flex-1 min-w-0",children:M.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Ae=>{Ae.stopPropagation(),S==null||S("database_referenceFile_title:click",{data:{...X,file_type:"database",file_name:it(X),metadata:X,parsedFilePath:X.fetchUrl||(nt==null?void 0:nt.dataFetchUrl)||"",file:X.databaseName||"database",url:X.fetchUrl||(nt==null?void 0:nt.dataFetchUrl)||"",parse_url:X.fetchUrl||(nt==null?void 0:nt.dataFetchUrl)||"",retrieve_tags:[],references:X,type:"database",isUploadFile:!1}})},children:it(X)})}),M.jsx("div",{className:"flex items-center gap-1",children:M.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",children:G+1})}),M.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",X.score?Number(X.score).toFixed(2):"N/A"]})]})},X.tableName||G))})]}),fe&&M.jsxs(ya,{$theme:_,children:[M.jsx("div",{className:"reference-title justify-between items-center flex",children:M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),M.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${me.length})`}),me.length>2&&M.jsx("div",{onClick:()=>W(!U),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:U?M.jsx(ba,{size:16,className:"text-[#b4b4b4]"}):M.jsx(va,{size:16,className:"text-[#b4b4b4]"})})]})}),M.jsx("div",{className:"reference-list",children:(U?me:me.slice(0,2)).map((X,G)=>M.jsx("div",{className:"reference-item",children:M.jsxs("div",{className:"file-info flex items-end gap-2",children:[M.jsx("div",{className:"flex-shrink-0",children:M.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:M.jsx(na,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),M.jsx("div",{className:"flex-1 min-w-0",children:M.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Ae=>{Ae.stopPropagation(),S==null||S("web_referenceFile_title:click",{data:{...X,file_type:X.file_type,file_name:X.file_name,metadata:X.metadata,parsedFilePath:X.parsedFilePath,file:X.file_name,url:X.link,parse_url:X.link,retrieve_tags:X.tags||[],references:X,type:"file",isUploadFile:!1}})},children:X.file_name})}),M.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Ae=new Set,tt=(X.tags||[]).filter(pe=>Ae.has(pe.id)?!1:(Ae.add(pe.id),!0)).sort((pe,He)=>Number(pe.index)-Number(He.index)),Ie=pe=>{if(typeof Re!="string")return pe;const He=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${pe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Re);return He?He[1]:pe};return tt.slice(0,1).map(pe=>M.jsx("span",{className:"w-6 h-6 bg-[#f6ffed] text-[#52c41a] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:He=>{He.stopPropagation();const ft=ue(X,pe.id);S==null||S("retrive_tag:click",{tagInfo:ft||X,fromtype:"1",leaf:{id:pe.id,fromtype:"1"},attributes:{}})},children:Ie(pe.id)},pe.id))})()}),M.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",X.score?X.score.toFixed(2):"N/A"]})]})},(X.link||"")+G))})]}),Be&&M.jsxs(ya,{$theme:_,children:[M.jsx("div",{className:"reference-title justify-between items-center flex",children:M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),M.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Fe.length})`}),Fe.length>2&&M.jsx("div",{onClick:()=>ee(!Q),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Q?M.jsx(ba,{size:16,className:"text-[#b4b4b4]"}):M.jsx(va,{size:16,className:"text-[#b4b4b4]"})})]})}),M.jsx("div",{className:"reference-list",children:(Q?Fe:Fe.slice(0,2)).map((X,G)=>M.jsx("div",{className:"reference-item",children:M.jsxs("div",{className:"file-info flex items-end gap-2",children:[M.jsx("div",{className:"flex-shrink-0",children:M.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:M.jsx("div",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center",children:"\u56FE"})})}),M.jsx("div",{className:"flex-1 min-w-0",children:M.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:X.graphName||`\u56FE\u8C31${G+1}`})}),M.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Ae=new Set,tt=(X.tags||[]).filter(pe=>Ae.has(pe.id)?!1:(Ae.add(pe.id),!0)).sort((pe,He)=>Number(pe.index)-Number(He.index)),Ie=pe=>{if(typeof Re!="string")return null;const He=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${pe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Re);return He?He[1]??null:null};return tt.map(pe=>({tag:pe,num:Ie(pe.id)})).filter(pe=>pe.num!==null&&pe.num!==void 0&&pe.num!=="").slice(0,10).map(({tag:pe,num:He})=>M.jsx("span",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-purple-200 transition-colors",onClick:ft=>{ft.stopPropagation();const $t=Array.isArray(X.traceNodes)?X.traceNodes.find(Nt=>String(Nt==null?void 0:Nt.id)===String(pe.id)):void 0;S==null||S("retrive_tag:click",{tagInfo:{id:pe.id,index:pe.index,image_urls:pe.image_urls||[]},fromtype:"2",graph:{id:X.id,graphName:X.graphName,fetchUrl:X.fetchUrl,cyphers:X.cyphers},traceNode:$t})},children:He},pe.id))})()})]})},X.id||G))})]})]})},zt=()=>l||!N||!k||k.length===0?null:M.jsx(_S,{$theme:_,children:M.jsx("div",{className:"follow-up-list",children:k.map((Y,me)=>M.jsx("div",{className:"follow-up-item",style:{animationDelay:`${me*260}ms`},onClick:()=>{S==null||S("chatbox:follow_up_question_click",{question:Y,queryId:F})},children:Y},`${String(Y)}-${me}`))})});return M.jsxs(PS,{$align:n,$isUser:l,children:[M.jsxs(RS,{$isUser:l,children:[M.jsx(TS,{$src:_e,$isUser:l}),H&&M.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:H})]}),M.jsx(IS,{$isUser:l,$theme:_,children:M.jsx("div",{className:"message-card",children:M.jsx("div",{className:"message-text",children:r==="stream"?M.jsxs(M.Fragment,{children:[!l&&ne(),M.jsx(hu,{dataSource:{type:ni.MARKDOWN,content:Re},styles:{letterSpacing:g==null?void 0:g.letterSpacing,lineHeight:g==null?void 0:g.lineHeight,templateField:g==null?void 0:g.templateField,text:g==null?void 0:g.text},theme:{...g==null?void 0:g.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:ve,eventsEmit:S,extraProps:ye},`md-${(Re||"").length}-think-${oe}`)]}):M.jsx("div",{children:Ue})})})}),Tt(),lr(),!l&&Ze(),zt(),typeof document<"u"&&vg(M.jsx(MS,{$show:V!==null,onClick:()=>Z(null),children:V&&M.jsxs("div",{className:"modal-content",onClick:Y=>Y.stopPropagation(),children:[M.jsx("img",{src:V,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),M.jsx("button",{className:"modal-close",onClick:()=>Z(null),children:"\u5173\u95ED"})]})}),document.body)]})},LS=At.div`
|
|
887
|
+
position: relative;
|
|
888
|
+
width: 100%;
|
|
889
|
+
height: 100%;
|
|
890
|
+
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
891
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
892
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
893
|
+
|
|
894
|
+
/* 自定义滚动条 */
|
|
895
|
+
&::-webkit-scrollbar {
|
|
896
|
+
width: 8px;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
&::-webkit-scrollbar-track {
|
|
900
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
901
|
+
border-radius: 4px;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
&::-webkit-scrollbar-thumb {
|
|
905
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
906
|
+
border-radius: 4px;
|
|
907
|
+
|
|
908
|
+
&:hover {
|
|
909
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
`,zS=At.div`
|
|
913
|
+
position: relative;
|
|
914
|
+
width: 100%;
|
|
915
|
+
height: 100%;
|
|
916
|
+
overflow: auto;
|
|
917
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
918
|
+
|
|
919
|
+
/* 自定义滚动条 */
|
|
920
|
+
&::-webkit-scrollbar {
|
|
921
|
+
width: 8px;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
&::-webkit-scrollbar-track {
|
|
925
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
926
|
+
border-radius: 4px;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
&::-webkit-scrollbar-thumb {
|
|
930
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
931
|
+
border-radius: 4px;
|
|
932
|
+
|
|
933
|
+
&:hover {
|
|
934
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
`,vf=At.div`
|
|
938
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
939
|
+
min-height: ${e=>e.height||"auto"};
|
|
940
|
+
|
|
941
|
+
/* 富文本内容样式增强 */
|
|
942
|
+
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
943
|
+
scroll-margin-top: 2rem;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
& img {
|
|
947
|
+
max-width: 100%;
|
|
948
|
+
height: auto;
|
|
949
|
+
border-radius: 0.5rem;
|
|
950
|
+
margin: 1rem 0;
|
|
951
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
952
|
+
transition: transform 0.2s ease-in-out;
|
|
953
|
+
|
|
954
|
+
&:hover {
|
|
955
|
+
transform: scale(1.02);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/* 表格样式 - 主题感知 */
|
|
960
|
+
& .table-container {
|
|
961
|
+
overflow: auto;
|
|
962
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
963
|
+
border-radius: 6px;
|
|
964
|
+
margin: 1rem 0;
|
|
965
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
& .table-container table {
|
|
969
|
+
width: 100%;
|
|
970
|
+
border-collapse: collapse;
|
|
971
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
972
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
& .table-container th,
|
|
976
|
+
& .table-container td {
|
|
977
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
978
|
+
padding: 8px 12px;
|
|
979
|
+
text-align: left;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
& .table-container th {
|
|
983
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
984
|
+
font-weight: 600;
|
|
985
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
& .table-container td {
|
|
989
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
& .table-container tr:nth-child(even) {
|
|
993
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
& pre {
|
|
997
|
+
position: relative;
|
|
998
|
+
|
|
999
|
+
&::before {
|
|
1000
|
+
content: '';
|
|
1001
|
+
position: absolute;
|
|
1002
|
+
top: 0;
|
|
1003
|
+
left: 0;
|
|
1004
|
+
right: 0;
|
|
1005
|
+
height: 2px;
|
|
1006
|
+
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
1007
|
+
border-radius: 2px 2px 0 0;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
& blockquote {
|
|
1012
|
+
position: relative;
|
|
1013
|
+
|
|
1014
|
+
&::before {
|
|
1015
|
+
content: '"';
|
|
1016
|
+
position: absolute;
|
|
1017
|
+
top: -0.5rem;
|
|
1018
|
+
left: -1rem;
|
|
1019
|
+
font-size: 3rem;
|
|
1020
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1021
|
+
opacity: 0.3;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
`,KS=At.div`
|
|
1027
|
+
display: flex;
|
|
1028
|
+
align-items: center;
|
|
1029
|
+
justify-content: center;
|
|
1030
|
+
padding: 2rem;
|
|
1031
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1032
|
+
font-size: 0.875rem;
|
|
1033
|
+
|
|
1034
|
+
&::before {
|
|
1035
|
+
content: '';
|
|
1036
|
+
width: 20px;
|
|
1037
|
+
height: 20px;
|
|
1038
|
+
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
1039
|
+
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1040
|
+
border-radius: 50%;
|
|
1041
|
+
animation: spin 1s linear infinite;
|
|
1042
|
+
margin-right: 0.5rem;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
@keyframes spin {
|
|
1046
|
+
0% { transform: rotate(0deg); }
|
|
1047
|
+
100% { transform: rotate(360deg); }
|
|
1048
|
+
}
|
|
1049
|
+
`,HS=At.div`
|
|
1050
|
+
display: flex;
|
|
1051
|
+
flex-direction: column;
|
|
1052
|
+
align-items: center;
|
|
1053
|
+
justify-content: center;
|
|
1054
|
+
padding: 3rem;
|
|
1055
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1056
|
+
text-align: center;
|
|
1057
|
+
|
|
1058
|
+
&::before {
|
|
1059
|
+
content: '📄';
|
|
1060
|
+
font-size: 3rem;
|
|
1061
|
+
margin-bottom: 1rem;
|
|
1062
|
+
}
|
|
1063
|
+
`,WS=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:l=!1,size:i="sm",basePath:u,theme:s={},onChange:c,onScroll:p,onScrollToTop:d,onScrollToBottom:h,onSegmentClick:g,className:v,style:f,height:b="100%"})=>{const C=ii(),y=Je(()=>{var J,Q,ee,oe,re,ne,de,ce,Se;return{primaryColor:(s==null?void 0:s.primaryColor)||((J=C==null?void 0:C.colors)==null?void 0:J.primary)||"#007bff",secondaryColor:(s==null?void 0:s.secondaryColor)||((Q=C==null?void 0:C.colors)==null?void 0:Q.secondary)||"#6c757d",backgroundColor:(s==null?void 0:s.backgroundColor)||((ee=C==null?void 0:C.colors)==null?void 0:ee.background)||"#ffffff",textColor:(s==null?void 0:s.textColor)||((oe=C==null?void 0:C.colors)==null?void 0:oe.text)||"#24292f",borderColor:(s==null?void 0:s.borderColor)||((re=C==null?void 0:C.colors)==null?void 0:re.border)||"#dee2e6",disabledBackground:(s==null?void 0:s.disabledBackground)||((ne=C==null?void 0:C.colors)==null?void 0:ne.disabledBackground)||"#f8f9fa",hoverBackground:(s==null?void 0:s.hoverBackground)||((de=C==null?void 0:C.colors)==null?void 0:de.hoverBackground)||"#e9ecef",borderRadius:(s==null?void 0:s.borderRadius)||((ce=C==null?void 0:C.space)==null?void 0:ce.radius)||"8px",padding:(s==null?void 0:s.padding)||((Se=C==null?void 0:C.space)==null?void 0:Se.padding)||"1rem",scrollbarTrack:(s==null?void 0:s.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(s==null?void 0:s.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(s==null?void 0:s.scrollbarThumbHover)||"#a8a8a8",...s}},[C,s]),x=ct(0);x.current+=1,console.log("[Markdownit] render count:",x.current);const[B,A]=ut([]),[$,F]=ut({start:0,end:10}),[w,j]=ut(0),[N,I]=ut(0),[T,E]=ut(!1),[k,O]=ut(!1),[S,P]=ut(!1),_=ct(null),H=ct(null),z=ct(null),q=Je(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);yt(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(q)?q.length:"n/a"),A(q)},[q]);const V=Je(()=>t?`${B.length*r}px`:"auto",[B.length,r,t]),Z=Je(()=>{if(!t)return B;const J=Math.max(0,$.start-n),Q=Math.min(B.length,$.end+n);return B.slice(J,Q).map((ee,oe)=>({...ee,virtualIndex:J+oe}))},[B,$,t,n]),ae=ze(J=>{const{scrollTop:Q,scrollHeight:ee,clientHeight:oe}=J.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:Q,scrollHeight:ee,clientHeight:oe});const re=!t&&!p&&!d&&!h&&!o;if(console.log("[Markdownit] passiveOnly:",re),re||j(ne=>ne!==Q?(console.log("[Markdownit] setScrollTop:",Q),Q):ne),t&&!re){const ne=Math.floor(Q/r),de=Math.min(B.length,ne+Math.ceil(N/r)+1);F(ce=>ce.start!==ne||ce.end!==de?(console.log("[Markdownit] setVisibleRange:",{start:ne,end:de}),{start:ne,end:de}):ce)}if(!re){const ne=Q<=10;ne!==k&&(console.log("[Markdownit] isAtTop ->",ne),O(ne),ne&&d&&(console.log("[Markdownit] onScrollToTop callback"),d()))}if(!re){const ne=Q+oe>=ee-10;ne!==S&&(console.log("[Markdownit] isAtBottom ->",ne),P(ne),ne&&h&&(console.log("[Markdownit] onScrollToBottom callback"),h()))}p&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:Q,scrollHeight:ee}),p(Q,ee)),o&&a&&!T&&!l&&ee-Q-N<100&&R()},[t,r,B.length,N,o,a,T,l,k,S,d,h,p]),R=ze(async()=>{if(!(!a||T||l)){E(!0);try{const J=B[B.length-1],Q=await a(J.id);A(ee=>[...ee,...Q])}catch(J){console.error("Failed to load more segments:",J)}finally{E(!1)}}},[a,B,T,l]);yt(()=>{const J=()=>{_.current&&I(_.current.clientHeight)};return J(),window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)},[]);const U=ze((J,Q)=>{const ee={type:J.type,content:J.content},oe=t?{position:"absolute",top:`${(J.virtualIndex||Q)*r}px`,left:0,right:0,height:`${r}px`}:{};return M.jsx("div",{style:oe,onClick:()=>g==null?void 0:g(J.id,J),className:g?"cursor-pointer hover:bg-gray-50":"",children:M.jsx(hu,{dataSource:ee,isEditing:!1,size:i,basePath:u,theme:y,onChange:c,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},J.id)},[t,r,y,c,g]),W=()=>(console.log("[Markdownit] renderContent segments.len:",B.length,"enableVirtualScroll:",t),B.length===0?M.jsxs(HS,{theme:y,children:[M.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),M.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?M.jsx("div",{ref:z,style:{height:V,position:"relative"},children:Z.map(U)}):M.jsx("div",{ref:z,children:B.map(U)})),K=()=>!T&&!l?null:M.jsx(KS,{theme:y,children:l?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return M.jsx(LS,{ref:_,theme:y,$isVirtualized:t,className:v,style:{height:b,...f},children:t?M.jsx(zS,{ref:H,theme:y,onScroll:ae,children:M.jsx(vf,{theme:y,height:V,children:W()})}):M.jsxs(vf,{theme:y,onScroll:ae,children:[W(),K()]})})},QS=e=>{const{onRendered:t}=e;return yt(()=>{if(!t)return;const r=requestAnimationFrame(()=>{const n=document.querySelector('[data-markdownit-root="1"]');n&&(console.log("[Markdownit _onRendered] fired"),t(n))});return()=>cancelAnimationFrame(r)},[e.dataSource,e.enableVirtualScroll,t]),M.jsx("div",{"data-markdownit-root":"1",children:M.jsx(WS,{...e})})};At.div`
|
|
1064
|
+
background: #f6f8fa;
|
|
1065
|
+
border: 1px solid #d0d7de;
|
|
1066
|
+
border-radius: 6px;
|
|
1067
|
+
padding: 16px;
|
|
1068
|
+
margin-bottom: 20px;
|
|
1069
|
+
`;At.p`
|
|
1070
|
+
margin: 0 0 16px 0;
|
|
1071
|
+
color: #656d76;
|
|
1072
|
+
font-size: 14px;
|
|
1073
|
+
line-height: 1.5;
|
|
1074
|
+
`;const bf=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,o,a=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(o=t.exec(e))!==null;){const l=o[0],i=o[1]||"",u=(o[2]||"").trim(),s=o.index,c=s+l.length;if(s>n){const b=e.slice(n,s);b.trim()!==""&&(r.push({text:b}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:b}))}const p=b=>{const C=new RegExp(`${b}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
1075
|
+
])*?)\\1`,"i"),y=i.match(C);return y?y[2]:void 0},d=/\S/.test(i),h=p("key"),g=p("placeholder"),v=h||`template-${Date.now()}-${a++}`,f={type:"template",key:v,placeholder:d?g||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":u||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:d?u:"",style:"blue",fieldId:v,children:[{text:""}],inline:!0};r.push(f),console.log("\u6DFB\u52A0template\u5143\u7D20:",f),n=c}if(n<e.length){const l=e.slice(n);l.trim()!==""&&(r.push({text:l}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:l}))}return r.length===0&&(e.trim()===""?r.push({text:""}):r.push({text:e}),console.log("\u6CA1\u6709\u627E\u5230template\u6807\u7B7E\uFF0C\u8FD4\u56DE\u539F\u59CB\u6587\u672C")),r.length>0&&r[0].type!=="paragraph"?[{type:"paragraph",children:r}]:(console.log("\u89E3\u6790\u5B8C\u6210\uFF0C\u7ED3\u679C:",r),r)},xl=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="",n="";return console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2)),t.children.forEach(o=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",o),o.type==="template"){const a=o.key||o.fieldId||"",l=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",i=o.value||"",u=` key="${String(a)}" placeholder="${String(l)}"`;r+=`<template${u}>${i}</template>`,n=i||l}else if(o.text!==void 0){const a=o.text||"";a.trim()!==""?a!==n?(console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${a}`),r+=a,n=a):console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20"):console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20")}else{console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",o);const a=o.text||"";a.trim()!==""&&a!==n&&(r+=a,n=a)}}),console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},qS=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=n.value||n.placeholder||"")}),r},US=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=`\`\`\`template\`\`\`
|
|
1076
|
+
${n.value||n.placeholder}\`\`\`
|
|
1077
|
+
\`\`\`
|
|
1078
|
+
`)}),r},VS=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if(n.text!==void 0)r+=n.text;else if(n.type==="template"){const o=n.key||n.fieldId||"",a=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",l=n.value||"",i=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${i}>${l}</template>`}}),r},ek=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var h,g,v,f,b,C,y,x,B,A,$,F,w,j,N,I,T,E,k,O,S,P,_,H,z,q,V,Z,ae,R,U,W,K,J,Q,ee,oe,re,ne,de,ce,Se,We,qe,ue,ve,we,Le,$e,Oe,Qe,Ge;const a=ii(),l={theme:{colors:{primary:((h=a==null?void 0:a.colors)==null?void 0:h.primary)||"#055AFF",secondary:((g=a==null?void 0:a.colors)==null?void 0:g.secondary)||"#84ADFF",background:((v=a==null?void 0:a.colors)==null?void 0:v.background)||"#E5EEFF",text:((f=a==null?void 0:a.colors)==null?void 0:f.text)||"#055AFF",border:((b=a==null?void 0:a.colors)==null?void 0:b.border)||"#84ADFF",success:((C=a==null?void 0:a.colors)==null?void 0:C.success)||"#008000",warning:((y=a==null?void 0:a.colors)==null?void 0:y.warning)||"#FFA500",error:((x=a==null?void 0:a.colors)==null?void 0:x.error)||"#FF0000",info:((B=a==null?void 0:a.colors)==null?void 0:B.info)||"#0000FF",disabled:((A=a==null?void 0:a.colors)==null?void 0:A.disabled)||"#808080",disabledBackground:(($=a==null?void 0:a.colors)==null?void 0:$.disabledBackground)||"#F5F5F5",disabledText:((F=a==null?void 0:a.colors)==null?void 0:F.disabledText)||"#808080",shadow:((w=a==null?void 0:a.colors)==null?void 0:w.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((j=a==null?void 0:a.colors)==null?void 0:j.appBackground)||"transparent",listBackground:((N=a==null?void 0:a.colors)==null?void 0:N.listBackground)||"#f9f9f9",dashboardBackground:((I=a==null?void 0:a.colors)==null?void 0:I.dashboardBackground)||"#ffffff",textSecondary:((T=a==null?void 0:a.colors)==null?void 0:T.textSecondary)||"#6b7280"},space:{sidebar:((E=a==null?void 0:a.space)==null?void 0:E.sidebar)||"260px",size:((k=a==null?void 0:a.space)==null?void 0:k.size)||"12px",radius:((O=a==null?void 0:a.space)==null?void 0:O.radius)||"6px",padding:((S=a==null?void 0:a.space)==null?void 0:S.padding)||"16px",margin:((P=a==null?void 0:a.space)==null?void 0:P.margin)||"20px",shadow:((_=a==null?void 0:a.space)==null?void 0:_.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((H=a==null?void 0:a.space)==null?void 0:H.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((q=(z=a==null?void 0:a.fonts)==null?void 0:z.body)==null?void 0:q.size)||"14px",weight:((Z=(V=a==null?void 0:a.fonts)==null?void 0:V.body)==null?void 0:Z.weight)||"normal",family:((R=(ae=a==null?void 0:a.fonts)==null?void 0:ae.body)==null?void 0:R.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((W=(U=a==null?void 0:a.fonts)==null?void 0:U.heading)==null?void 0:W.size)||"16px",weight:((J=(K=a==null?void 0:a.fonts)==null?void 0:K.heading)==null?void 0:J.weight)||"600",family:((ee=(Q=a==null?void 0:a.fonts)==null?void 0:Q.heading)==null?void 0:ee.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((oe=a==null?void 0:a.others)==null?void 0:oe.baseFontWeight)||"normal"}},mode:(a==null?void 0:a.mode)||"light"},i={backgroundColor:((re=a==null?void 0:a.colors)==null?void 0:re.background)||"#E5EEFF",borderColor:((ne=a==null?void 0:a.colors)==null?void 0:ne.border)||"#84ADFF",borderRadius:((de=a==null?void 0:a.space)==null?void 0:de.radius)||"6px",padding:((ce=a==null?void 0:a.space)==null?void 0:ce.padding)||"8px 12px",margin:"2px",fontSize:((We=(Se=a==null?void 0:a.fonts)==null?void 0:Se.body)==null?void 0:We.size)||"14px",fontWeight:((ue=(qe=a==null?void 0:a.fonts)==null?void 0:qe.body)==null?void 0:ue.weight)||"500",minWidth:"30px",textColor:((ve=a==null?void 0:a.colors)==null?void 0:ve.text)||"#84ADFF"},u={...l,...n,theme:{...l.theme,...n==null?void 0:n.theme,colors:{...(we=l.theme)==null?void 0:we.colors,...(Le=n==null?void 0:n.theme)==null?void 0:Le.colors},space:{...($e=l.theme)==null?void 0:$e.space,...(Oe=n==null?void 0:n.theme)==null?void 0:Oe.space},fonts:{...(Qe=l.theme)==null?void 0:Qe.fonts,...(Ge=n==null?void 0:n.theme)==null?void 0:Ge.fonts}},templateField:{...i,...n==null?void 0:n.templateField}},[s,c]=ut(()=>bf(e));yt(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const Re=bf(e);console.log("\u65B0\u7684Slate\u6570\u636E:",Re),c(Re)},[e]),yt(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",s)},[s]);const p=ze((Re,je)=>{if(je===ni.SLATE&&Re){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",Re),c(Re);const xe=xl(Re);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",xe),t==null||t(xe)}},[t]),d=ze(Re=>{if(!s||s.length===0)return"";switch(Re){case"pure_string":return qS(s);case"string":return xl(s);case"markdown":return US(s);case"html":return VS(s);default:return xl(s)}},[s]);return yt(()=>{o==null||o(d)},[d,o]),M.jsx(hu,{dataSource:{type:ni.SLATE,content:s},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:p,size:"md",styles:u,enableTemplateInput:!0})};export{$s as D,QS as L,Ms as T,ek as _,ni as o,JS as z};
|