@kaitify/react 0.0.1-beta.2 → 0.0.1-beta.3

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/docs/changelog.md CHANGED
@@ -5,6 +5,6 @@ title: 更新日志
5
5
 
6
6
  # 更新日志
7
7
 
8
- ## v0.0.1-beta.2 <Badge type="tip" text='2025.10.30' />
8
+ ## v0.0.1-beta.3 <Badge type="tip" text='2025.10.30' />
9
9
 
10
10
  - kaitify-react 的第一个发布版本
@@ -6,7 +6,7 @@ title: 安装
6
6
 
7
7
  ## 下载 kaitify-react 本地到使用
8
8
 
9
- - 下载地址:[kaitify-react](https://registry.npmmirror.com/@kaitify/react/download/@kaitify/react-0.0.1-beta.2.tgz)
9
+ - 下载地址:[kaitify-react](https://registry.npmmirror.com/@kaitify/react/download/@kaitify/react-0.0.1-beta.3.tgz)
10
10
  - 下载完成后最终解压得到一个 package 文件夹,进入 package 文件夹后,将 package 目录下的整个 lib 目录拷贝到你的项目下
11
11
  - 在 html 页面中引入 js
12
12
 
@@ -28,7 +28,7 @@ title: 安装
28
28
 
29
29
  ```html
30
30
  <!-- 引入固定版本的kaitify -->
31
- <script src="https://unpkg.com/@kaitify/react@0.0.1-beta.2/lib/kaitify-react.umd.js"></script>
31
+ <script src="https://unpkg.com/@kaitify/react@0.0.1-beta.3/lib/kaitify-react.umd.js"></script>
32
32
  <!-- 始终引入最新的kaitify -->
33
33
  <script src="https://unpkg.com/@kaitify/react/lib/kaitify-react.umd.js"></script>
34
34
  ```
@@ -50,21 +50,21 @@ title: 安装
50
50
  npm install @kaitify/react
51
51
 
52
52
  # 安装指定版本
53
- npm install @kaitify/react@0.0.1-beta.2
53
+ npm install @kaitify/react@0.0.1-beta.3
54
54
  ```
55
55
 
56
56
  ```bash [yarn]
57
57
  yarn install @kaitify/react
58
58
 
59
59
  # 安装指定版本
60
- yarn install @kaitify/react@0.0.1-beta.2
60
+ yarn install @kaitify/react@0.0.1-beta.3
61
61
  ```
62
62
 
63
63
  ```bash [pnpm]
64
64
  pnpm install @kaitify/react
65
65
 
66
66
  # 安装指定版本
67
- pnpm install @kaitify/react@0.0.1-beta.2
67
+ pnpm install @kaitify/react@0.0.1-beta.3
68
68
  ```
69
69
 
70
70
  :::
@@ -42767,6 +42767,7 @@ const Popover = forwardRef(({ placement = "bottom", trigger = "hover", delay: de
42767
42767
  const arrowRef = useRef(null);
42768
42768
  const popoverRef = useRef(null);
42769
42769
  const popperInstance = useRef();
42770
+ const timeoutRef = useRef();
42770
42771
  const popoverRemainingPlacements = useMemo(() => {
42771
42772
  if (placement.startsWith("top")) {
42772
42773
  return ["top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end", "right", "right-start", "right-end"].filter((item) => item != placement);
@@ -42844,7 +42845,8 @@ const Popover = forwardRef(({ placement = "bottom", trigger = "hover", delay: de
42844
42845
  return;
42845
42846
  }
42846
42847
  if (delay2 > 0) {
42847
- setTimeout(() => {
42848
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
42849
+ timeoutRef.current = setTimeout(() => {
42848
42850
  setVisible(true);
42849
42851
  }, delay2);
42850
42852
  return;
@@ -42852,9 +42854,6 @@ const Popover = forwardRef(({ placement = "bottom", trigger = "hover", delay: de
42852
42854
  setVisible(true);
42853
42855
  };
42854
42856
  const hidePopover = () => {
42855
- if (props.disabled) {
42856
- return;
42857
- }
42858
42857
  setVisible(false);
42859
42858
  };
42860
42859
  const onShow = () => {
@@ -4,5 +4,5 @@
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
6
  */
7
- !function(A){!function(){var e={}.hasOwnProperty;function t(){for(var A="",e=0;e<arguments.length;e++){var t=arguments[e];t&&(A=B(A,i(t)))}return A}function i(A){if("string"==typeof A||"number"==typeof A)return A;if("object"!=typeof A)return"";if(Array.isArray(A))return t.apply(null,A);if(A.toString!==Object.prototype.toString&&!A.toString.toString().includes("[native code]"))return A.toString();var i="";for(var s in A)e.call(A,s)&&A[s]&&(i=B(i,s));return i}function B(A,e){return e?A?A+" "+e:A+e:A}A.exports?(t.default=t,A.exports=t):window.classNames=t}()}(Zg);const qg=bg(Zg.exports),_g={"en-US":{"本地上传":"Local Upload","远程地址":"Remote Address","附件名称":"Attachment Name","附件地址":"Attachment Address","附件":"Attachment","插入":"Insert","更新":"Update","默认颜色":"Default Color","默认字体":"Default Font","默认字号":"Default Font Size","默认行高":"Default Line Height","正文":"Paragraph","图片名称":"Image Name","图片地址":"Image Address","图片":"Image","链接地址":"Link Address","新窗口打开":"New Window","链接文字":"Link Text","是否自动播放":"AutoPlay","视频地址":"Video Address","输入Latex数学公式":"Enter Latex Mathematical Formulas","一级标题":"Heading 1","二级标题":"Heading 2","三级标题":"Heading 3","四级标题":"Heading 4","五级标题":"Heading 5","六级标题":"Heading 6","自动识别":"Auto Detection"},"ko-KR":{"本地上传":"로컬 업로드","远程地址":"원격 주소","附件名称":"첨부 파일 이름","附件地址":"첨부 파일 주소","附件":"첨부 파일","插入":"삽입","更新":"업데이트","默认颜色":"기본 색상","默认字体":"기본 글꼴","默认字号":"기본 글꼴 크기","默认行高":"기본 줄높이","正文":"본문","图片名称":"이미지 이름","图片地址":"이미지 주소","图片":"이미지","链接地址":"링크 주소","新窗口打开":"새 창에서 열기","链接文字":"링크 텍스트","是否自动播放":"자동 재생","视频地址":"비디오 주소","输入Latex数学公式":"LaTeX 수식을 입력","一级标题":"제목 1","二级标题":"제목 2","三级标题":"제목 3","四级标题":"제목 4","五级标题":"제목 5","六级标题":"제목 6","自动识别":"자동감지"},"ja-JP":{"本地上传":"ローカルアップロード","远程地址":"リモートアドレス","附件名称":"添付ファイル名","附件地址":"添付ファイルアドレス","附件":"添付ファイル","插入":"挿入","更新":"更新","默认颜色":"デフォルトカラー","默认字体":"デフォルトフォント","默认字号":"デフォルトフォントサイズ","默认行高":"デフォルト行間","正文":"本文","图片名称":"画像名","图片地址":"画像アドレス","图片":"画像","链接地址":"リンクアドレス","新窗口打开":"新しいウィンドウで開く","链接文字":"リンクテキスト","是否自动播放":"自動再生","视频地址":"ビデオアドレス","输入Latex数学公式":"LaTeX数式を入力","一级标题":"見出し1","二级标题":"見出し2","三级标题":"見出し3","四级标题":"見出し4","五级标题":"見出し5","六级标题":"見出し6","自动识别":"自動検出"}},$g=(A,e)=>"zh-CN"==A?e:_g[A][e]??e,Ao=e.createContext({state:{editor:{},selection:{}},disabled:!1,isMouseDown:!1,el:null,t:A=>$g("zh-CN",A),dark:!1}),eo=()=>e.useContext(Ao),to="_kaitify-divider_1akn1_1",io="_kaitify-dark_1akn1_9";const Bo="_kaitify-tabs_1c51d_1",so="_kaitify-dark_1c51d_10",co="_kaitify-tabs-header_1c51d_20",no="_kaitify-tabs-header-item_1c51d_27",go="_kaitify-tabs-header-item-active_1c51d_36",oo="_kaitify-tabs-content_1c51d_50";function ro({data:A=[],...t}){const{dark:i}=eo(),[B,s]=e.useState(t.defaultValue);return Xg.jsxs("div",{className:qg(Bo,{[so]:i}),children:[Xg.jsx("div",{className:co,children:A.map(A=>Xg.jsx("div",{className:qg(no,{[go]:A.value===B}),onClick:()=>s(A.value),children:A.label},A.value))}),Xg.jsx("div",{className:oo,children:"function"==typeof t.children?t.children(B):t.children})]})}const ao="_kaitify-checkbox_1apxq_1",Qo="_kaitify-checkbox-el_1apxq_18",Io="_kaitify-checkbox-active_1apxq_47",wo="_kaitify-checkbox-label_1apxq_68",Eo="_kaitify-disabled_1apxq_71",lo="_kaitify-dark_1apxq_82";function Co(A){const{dark:e}=eo();return Xg.jsxs("label",{className:qg(ao,{[Eo]:A.disabled,[lo]:e}),children:[Xg.jsx("span",{className:qg(Qo,{[Io]:A.checked}),children:Xg.jsx("input",{type:"checkbox",onChange:e=>{var t;if(A.disabled)return;const i=e.target.checked;null==(t=A.onChange)||t.call(A,i)},disabled:A.disabled})}),Xg.jsx("span",{className:wo,children:A.label})]})}const Mo=Object.freeze({left:0,top:0,width:16,height:16}),Yo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ho=Object.freeze({...Mo,...Yo}),Fo=Object.freeze({...ho,body:"",hidden:!1});function yo(A,e){const t=function(A,e){const t={};!A.hFlip!=!e.hFlip&&(t.hFlip=!0),!A.vFlip!=!e.vFlip&&(t.vFlip=!0);const i=((A.rotate||0)+(e.rotate||0))%4;return i&&(t.rotate=i),t}(A,e);for(const i in Fo)i in Yo?i in A&&!(i in t)&&(t[i]=Yo[i]):i in e?t[i]=e[i]:i in A&&(t[i]=A[i]);return t}function No(A,e,t){const i=A.icons,B=A.aliases||Object.create(null);let s={};function c(A){s=yo(i[A]||B[A],s)}return c(e),t.forEach(c),yo(A,s)}function Do(A,e){const t=[];if("object"!=typeof A||"object"!=typeof A.icons)return t;A.not_found instanceof Array&&A.not_found.forEach(A=>{e(A,null),t.push(A)});const i=function(A){const e=A.icons,t=A.aliases||Object.create(null),i=Object.create(null);return Object.keys(e).concat(Object.keys(t)).forEach(function A(B){if(e[B])return i[B]=[];if(!(B in i)){i[B]=null;const e=t[B]&&t[B].parent,s=e&&A(e);s&&(i[B]=[e].concat(s))}return i[B]}),i}(A);for(const B in i){const s=i[B];s&&(e(B,No(A,B,s)),t.push(B))}return t}const Uo={provider:"",aliases:{},not_found:{},...Mo};function uo(A,e){for(const t in e)if(t in A&&typeof A[t]!=typeof e[t])return!1;return!0}function mo(A){if("object"!=typeof A||null===A)return null;const e=A;if("string"!=typeof e.prefix||!A.icons||"object"!=typeof A.icons)return null;if(!uo(A,Uo))return null;const t=e.icons;for(const B in t){const A=t[B];if(!B||"string"!=typeof A.body||!uo(A,Fo))return null}const i=e.aliases||Object.create(null);for(const B in i){const A=i[B],e=A.parent;if(!B||"string"!=typeof e||!t[e]&&!i[e]||!uo(A,Fo))return null}return e}const Go=Object.create(null);function po(A,e){const t=Go[A]||(Go[A]=Object.create(null));return t[e]||(t[e]=function(A,e){return{provider:A,prefix:e,icons:Object.create(null),missing:new Set}}(A,e))}function zo(A,e){return mo(e)?Do(e,(e,t)=>{t?A.icons[e]=t:A.missing.add(e)}):[]}const jo=/^[a-z0-9]+(-[a-z0-9]+)*$/,xo=(A,e,t,i="")=>{const B=A.split(":");if("@"===A.slice(0,1)){if(B.length<2||B.length>3)return null;i=B.shift().slice(1)}if(B.length>3||!B.length)return null;if(B.length>1){const A=B.pop(),t=B.pop(),s={provider:B.length>0?B[0]:i,prefix:t,name:A};return e&&!fo(s)?null:s}const s=B[0],c=s.split("-");if(c.length>1){const A={provider:i,prefix:c.shift(),name:c.join("-")};return e&&!fo(A)?null:A}if(t&&""===i){const A={provider:i,prefix:"",name:s};return e&&!fo(A,t)?null:A}return null},fo=(A,e)=>!!A&&!(!(e&&""===A.prefix||A.prefix)||!A.name);let Ro=!1;function Ho(A){return"boolean"==typeof A&&(Ro=A),Ro}function ko(A){const e="string"==typeof A?xo(A,!0,Ro):A;if(e){const A=po(e.provider,e.prefix),t=e.name;return A.icons[t]||(A.missing.has(t)?null:void 0)}}function Jo(A,e){if("object"!=typeof A)return!1;if("string"!=typeof e&&(e=A.provider||""),Ro&&!e&&!A.prefix){let e=!1;return mo(A)&&(A.prefix="",Do(A,(A,t)=>{(function(A,e){const t=xo(A,!0,Ro);if(!t)return!1;const i=po(t.provider,t.prefix);return e?function(A,e,t){try{if("string"==typeof t.body)return A.icons[e]={...t},!0}catch(i){}return!1}(i,t.name,e):(i.missing.add(t.name),!0)})(A,t)&&(e=!0)})),e}const t=A.prefix;if(!fo({prefix:t,name:"a"}))return!1;return!!zo(po(e,t),A)}const bo=Object.freeze({width:null,height:null}),Lo=Object.freeze({...bo,...Yo}),So=/(-?[0-9.]*[0-9]+[0-9.]*)/g,To=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Wo(A,e,t){if(1===e)return A;if(t=t||100,"number"==typeof A)return Math.ceil(A*e*t)/t;if("string"!=typeof A)return A;const i=A.split(So);if(null===i||!i.length)return A;const B=[];let s=i.shift(),c=To.test(s);for(;;){if(c){const A=parseFloat(s);isNaN(A)?B.push(s):B.push(Math.ceil(A*e*t)/t)}else B.push(s);if(s=i.shift(),void 0===s)return B.join("");c=!c}}const Ko=/\sid="(\S+)"/g,vo="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Vo=0;function Oo(A,e=vo){const t=[];let i;for(;i=Ko.exec(A);)t.push(i[1]);if(!t.length)return A;const B="suffix"+(16777216*Math.random()|Date.now()).toString(16);return t.forEach(t=>{const i="function"==typeof e?e(t):e+(Vo++).toString(),s=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");A=A.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+B+"$3")}),A=A.replace(new RegExp(B,"g"),"")}const Po=Object.create(null);function Xo(A){return Po[A]||Po[""]}function Zo(A){let e;if("string"==typeof A.resources)e=[A.resources];else if(e=A.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:A.path||"/",maxURL:A.maxURL||500,rotate:A.rotate||750,timeout:A.timeout||5e3,random:!0===A.random,index:A.index||0,dataAfterTimeout:!1!==A.dataAfterTimeout}}const qo=Object.create(null),_o=["https://api.simplesvg.com","https://api.unisvg.com"],$o=[];for(;_o.length>0;)1===_o.length||Math.random()>.5?$o.push(_o.shift()):$o.push(_o.pop());function Ar(A,e){const t=Zo(e);return null!==t&&(qo[A]=t,!0)}function er(A){return qo[A]}qo[""]=Zo({resources:["https://api.iconify.design"].concat($o)});let tr=(()=>{let A;try{if(A=fetch,"function"==typeof A)return A}catch(e){}})();const ir={prepare:(A,e,t)=>{const i=[],B=function(A,e){const t=er(A);if(!t)return 0;let i;if(t.maxURL){let A=0;t.resources.forEach(e=>{const t=e;A=Math.max(A,t.length)});const B=e+".json?icons=";i=t.maxURL-A-t.path.length-B.length}else i=0;return i}(A,e),s="icons";let c={type:s,provider:A,prefix:e,icons:[]},n=0;return t.forEach((t,g)=>{n+=t.length+1,n>=B&&g>0&&(i.push(c),c={type:s,provider:A,prefix:e,icons:[]},n=t.length),c.icons.push(t)}),i.push(c),i},send:(A,e,t)=>{if(!tr)return void t("abort",424);let i=function(A){if("string"==typeof A){const e=er(A);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const A=e.prefix,t=e.icons.join(",");i+=A+".json?"+new URLSearchParams({icons:t}).toString();break}case"custom":{const A=e.uri;i+="/"===A.slice(0,1)?A.slice(1):A;break}default:return void t("abort",400)}let B=503;tr(A+i).then(A=>{const e=A.status;if(200===e)return B=501,A.json();setTimeout(()=>{t(function(A){return 404===A}(e)?"abort":"next",e)})}).then(A=>{"object"==typeof A&&null!==A?setTimeout(()=>{t("success",A)}):setTimeout(()=>{404===A?t("abort",A):t("next",B)})}).catch(()=>{t("next",B)})}};function Br(A,e){A.forEach(A=>{const t=A.loaderCallbacks;t&&(A.loaderCallbacks=t.filter(A=>A.id!==e))})}let sr=0;const cr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function nr(A,e,t,i){const B=A.resources.length,s=A.random?Math.floor(Math.random()*B):A.index;let c;if(A.random){let e=A.resources.slice(0);for(c=[];e.length>1;){const A=Math.floor(Math.random()*e.length);c.push(e[A]),e=e.slice(0,A).concat(e.slice(A+1))}c=c.concat(e)}else c=A.resources.slice(s).concat(A.resources.slice(0,s));const n=Date.now();let g,o="pending",r=0,a=null,Q=[],I=[];function w(){a&&(clearTimeout(a),a=null)}function E(){"pending"===o&&(o="aborted"),w(),Q.forEach(A=>{"pending"===A.status&&(A.status="aborted")}),Q=[]}function l(A,e){e&&(I=[]),"function"==typeof A&&I.push(A)}function C(){o="failed",I.forEach(A=>{A(void 0,g)})}function M(){Q.forEach(A=>{"pending"===A.status&&(A.status="aborted")}),Q=[]}function Y(){if("pending"!==o)return;w();const i=c.shift();if(void 0===i)return Q.length?void(a=setTimeout(()=>{w(),"pending"===o&&(M(),C())},A.timeout)):void C();const B={status:"pending",resource:i,callback:(e,t)=>{!function(e,t,i){const B="success"!==t;switch(Q=Q.filter(A=>A!==e),o){case"pending":break;case"failed":if(B||!A.dataAfterTimeout)return;break;default:return}if("abort"===t)return g=i,void C();if(B)return g=i,void(Q.length||(c.length?Y():C()));if(w(),M(),!A.random){const t=A.resources.indexOf(e.resource);-1!==t&&t!==A.index&&(A.index=t)}o="completed",I.forEach(A=>{A(i)})}(B,e,t)}};Q.push(B),r++,a=setTimeout(Y,A.rotate),t(i,e,B.callback)}return"function"==typeof i&&I.push(i),setTimeout(Y),function(){return{startTime:n,payload:e,status:o,queriesSent:r,queriesPending:Q.length,subscribe:l,abort:E}}}function gr(A){const e={...cr,...A};let t=[];function i(){t=t.filter(A=>"pending"===A().status)}return{query:function(A,B,s){const c=nr(e,A,B,(A,e)=>{i(),s&&s(A,e)});return t.push(c),c},find:function(A){return t.find(e=>A(e))||null},setIndex:A=>{e.index=A},getIndex:()=>e.index,cleanup:i}}function or(){}const rr=Object.create(null);function ar(A,e,t){let i,B;if("string"==typeof A){const e=Xo(A);if(!e)return t(void 0,424),or;B=e.send;const s=function(A){if(!rr[A]){const e=er(A);if(!e)return;const t={config:e,redundancy:gr(e)};rr[A]=t}return rr[A]}(A);s&&(i=s.redundancy)}else{const e=Zo(A);if(e){i=gr(e);const t=Xo(A.resources?A.resources[0]:"");t&&(B=t.send)}}return i&&B?i.query(e,B,t)().abort:(t(void 0,424),or)}function Qr(){}function Ir(A){A.iconsLoaderFlag||(A.iconsLoaderFlag=!0,setTimeout(()=>{A.iconsLoaderFlag=!1,function(A){A.pendingCallbacksFlag||(A.pendingCallbacksFlag=!0,setTimeout(()=>{A.pendingCallbacksFlag=!1;const e=A.loaderCallbacks?A.loaderCallbacks.slice(0):[];if(!e.length)return;let t=!1;const i=A.provider,B=A.prefix;e.forEach(e=>{const s=e.icons,c=s.pending.length;s.pending=s.pending.filter(e=>{if(e.prefix!==B)return!0;const c=e.name;if(A.icons[c])s.loaded.push({provider:i,prefix:B,name:c});else{if(!A.missing.has(c))return t=!0,!0;s.missing.push({provider:i,prefix:B,name:c})}return!1}),s.pending.length!==c&&(t||Br([A],e.id),e.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),e.abort))})}))}(A)}))}function wr(A,e,t){function i(){const t=A.pendingIcons;e.forEach(e=>{t&&t.delete(e),A.icons[e]||A.missing.add(e)})}if(t&&"object"==typeof t)try{if(!zo(A,t).length)return void i()}catch(B){console.error(B)}i(),Ir(A)}function Er(A,e){A instanceof Promise?A.then(A=>{e(A)}).catch(()=>{e(null)}):e(A)}function lr(A,e){A.iconsToLoad?A.iconsToLoad=A.iconsToLoad.concat(e).sort():A.iconsToLoad=e,A.iconsQueueFlag||(A.iconsQueueFlag=!0,setTimeout(()=>{A.iconsQueueFlag=!1;const{provider:e,prefix:t}=A,i=A.iconsToLoad;if(delete A.iconsToLoad,!i||!i.length)return;const B=A.loadIcon;if(A.loadIcons&&(i.length>1||!B))return void Er(A.loadIcons(i,t,e),e=>{wr(A,i,e)});if(B)return void i.forEach(i=>{Er(B(i,t,e),e=>{wr(A,[i],e?{prefix:t,icons:{[i]:e}}:null)})});const{valid:s,invalid:c}=function(A){const e=[],t=[];return A.forEach(A=>{(A.match(jo)?e:t).push(A)}),{valid:e,invalid:t}}(i);if(c.length&&wr(A,c,null),!s.length)return;const n=t.match(jo)?Xo(e):null;if(!n)return void wr(A,s,null);n.prepare(e,t,s).forEach(t=>{ar(e,t,e=>{wr(A,t.icons,e)})})}))}const Cr=(A,e)=>{const t=function(A){const e={loaded:[],missing:[],pending:[]},t=Object.create(null);A.sort((A,e)=>A.provider!==e.provider?A.provider.localeCompare(e.provider):A.prefix!==e.prefix?A.prefix.localeCompare(e.prefix):A.name.localeCompare(e.name));let i={provider:"",prefix:"",name:""};return A.forEach(A=>{if(i.name===A.name&&i.prefix===A.prefix&&i.provider===A.provider)return;i=A;const B=A.provider,s=A.prefix,c=A.name,n=t[B]||(t[B]=Object.create(null)),g=n[s]||(n[s]=po(B,s));let o;o=c in g.icons?e.loaded:""===s||g.missing.has(c)?e.missing:e.pending;const r={provider:B,prefix:s,name:c};o.push(r)}),e}(function(A,e=!0,t=!1){const i=[];return A.forEach(A=>{const B="string"==typeof A?xo(A,e,t):A;B&&i.push(B)}),i}(A,!0,Ho()));if(!t.pending.length){let A=!0;return e&&setTimeout(()=>{A&&e(t.loaded,t.missing,t.pending,Qr)}),()=>{A=!1}}const i=Object.create(null),B=[];let s,c;return t.pending.forEach(A=>{const{provider:e,prefix:t}=A;if(t===c&&e===s)return;s=e,c=t,B.push(po(e,t));const n=i[e]||(i[e]=Object.create(null));n[t]||(n[t]=[])}),t.pending.forEach(A=>{const{provider:e,prefix:t,name:B}=A,s=po(e,t),c=s.pendingIcons||(s.pendingIcons=new Set);c.has(B)||(c.add(B),i[e][t].push(B))}),B.forEach(A=>{const e=i[A.provider][A.prefix];e.length&&lr(A,e)}),e?function(A,e,t){const i=sr++,B=Br.bind(null,t,i);if(!e.pending.length)return B;const s={id:i,icons:e,callback:A,abort:B};return t.forEach(A=>{(A.loaderCallbacks||(A.loaderCallbacks=[])).push(s)}),B}(e,t,B):Qr};const Mr=/[\s,]+/;function Yr(A,e){e.split(Mr).forEach(e=>{switch(e.trim()){case"horizontal":A.hFlip=!0;break;case"vertical":A.vFlip=!0}})}function hr(A,e=0){const t=A.replace(/^-?[0-9.]*/,"");function i(A){for(;A<0;)A+=4;return A%4}if(""===t){const e=parseInt(A);return isNaN(e)?0:i(e)}if(t!==A){let e=0;switch(t){case"%":e=25;break;case"deg":e=90}if(e){let B=parseFloat(A.slice(0,A.length-t.length));return isNaN(B)?0:(B/=e,B%1==0?i(B):0)}}return e}let Fr;function yr(A){return void 0===Fr&&function(){try{Fr=window.trustedTypes.createPolicy("iconify",{createHTML:A=>A})}catch(A){Fr=null}}(),Fr?Fr.createHTML(A):A}const dr={...Lo,inline:!1},Nr={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Dr={display:"inline-block"},Ur={backgroundColor:"currentColor"},ur={backgroundColor:"transparent"},mr={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Gr={WebkitMask:Ur,mask:Ur,background:ur};for(const rw in Gr){const A=Gr[rw];for(const e in mr)A[rw+e]=mr[e]}const pr={...dr,inline:!0};function zr(A){return A+(A.match(/^[-0-9.]+$/)?"px":"")}const jr=(A,t,i)=>{const B=t.inline?pr:dr,s=function(A,e){const t={...A};for(const i in e){const A=e[i],B=typeof A;i in bo?(null===A||A&&("string"===B||"number"===B))&&(t[i]=A):B===typeof t[i]&&(t[i]="rotate"===i?A%4:A)}return t}(B,t),c=t.mode||"svg",n={},g=t.style||{},o={..."svg"===c?Nr:{}};if(i){const A=xo(i,!1,!0);if(A){const e=["iconify"],t=["provider","prefix"];for(const i of t)A[i]&&e.push("iconify--"+A[i]);o.className=e.join(" ")}}for(let e in t){const A=t[e];if(void 0!==A)switch(e){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":o.ref=A;break;case"className":o[e]=(o[e]?o[e]+" ":"")+A;break;case"inline":case"hFlip":case"vFlip":s[e]=!0===A||"true"===A||1===A;break;case"flip":"string"==typeof A&&Yr(s,A);break;case"color":n.color=A;break;case"rotate":"string"==typeof A?s[e]=hr(A):"number"==typeof A&&(s[e]=A);break;case"ariaHidden":case"aria-hidden":!0!==A&&"true"!==A&&delete o["aria-hidden"];break;default:void 0===B[e]&&(o[e]=A)}}const r=function(A,e){const t={...ho,...A},i={...Lo,...e},B={left:t.left,top:t.top,width:t.width,height:t.height};let s=t.body;[t,i].forEach(A=>{const e=[],t=A.hFlip,i=A.vFlip;let c,n=A.rotate;switch(t?i?n+=2:(e.push("translate("+(B.width+B.left).toString()+" "+(0-B.top).toString()+")"),e.push("scale(-1 1)"),B.top=B.left=0):i&&(e.push("translate("+(0-B.left).toString()+" "+(B.height+B.top).toString()+")"),e.push("scale(1 -1)"),B.top=B.left=0),n<0&&(n-=4*Math.floor(n/4)),n%=4,n){case 1:c=B.height/2+B.top,e.unshift("rotate(90 "+c.toString()+" "+c.toString()+")");break;case 2:e.unshift("rotate(180 "+(B.width/2+B.left).toString()+" "+(B.height/2+B.top).toString()+")");break;case 3:c=B.width/2+B.left,e.unshift("rotate(-90 "+c.toString()+" "+c.toString()+")")}n%2==1&&(B.left!==B.top&&(c=B.left,B.left=B.top,B.top=c),B.width!==B.height&&(c=B.width,B.width=B.height,B.height=c)),e.length&&(s=function(A,e,t){const i=function(A,e="defs"){let t="";const i=A.indexOf("<"+e);for(;i>=0;){const B=A.indexOf(">",i),s=A.indexOf("</"+e);if(-1===B||-1===s)break;const c=A.indexOf(">",s);if(-1===c)break;t+=A.slice(B+1,s).trim(),A=A.slice(0,i).trim()+A.slice(c+1)}return{defs:t,content:A}}(A);return B=i.defs,s=e+i.content+t,B?"<defs>"+B+"</defs>"+s:s;var B,s}(s,'<g transform="'+e.join(" ")+'">',"</g>"))});const c=i.width,n=i.height,g=B.width,o=B.height;let r,a;null===c?(a=null===n?"1em":"auto"===n?o:n,r=Wo(a,g/o)):(r="auto"===c?g:c,a=null===n?Wo(r,o/g):"auto"===n?o:n);const Q={},I=(A,e)=>{(A=>"unset"===A||"undefined"===A||"none"===A)(e)||(Q[A]=e.toString())};I("width",r),I("height",a);const w=[B.left,B.top,g,o];return Q.viewBox=w.join(" "),{attributes:Q,viewBox:w,body:s}}(A,s),a=r.attributes;if(s.inline&&(n.verticalAlign="-0.125em"),"svg"===c){o.style={...n,...g},Object.assign(o,a);let A=0,i=t.id;return"string"==typeof i&&(i=i.replace(/-/g,"_")),o.dangerouslySetInnerHTML={__html:yr(Oo(r.body,i?()=>i+"ID"+A++:"iconifyReact"))},e.createElement("svg",o)}const{body:Q,width:I,height:w}=A,E="mask"===c||"bg"!==c&&-1!==Q.indexOf("currentColor"),l=function(A,e){let t=-1===A.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)t+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+A+"</svg>"}(Q,{...a,width:I+"",height:w+""});var C;return o.style={...n,"--svg":(C=l,'url("'+function(A){return"data:image/svg+xml,"+function(A){return A.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(A)}(C)+'")'),width:zr(a.width),height:zr(a.height),...Dr,...E?Ur:ur,...g},e.createElement("span",o)};var xr;if(Ho(!0),xr=ir,Po[""]=xr,"undefined"!=typeof document&&"undefined"!=typeof window){const A=window;if(void 0!==A.IconifyPreload){const e=A.IconifyPreload,t="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(A=>{try{("object"!=typeof A||null===A||A instanceof Array||"object"!=typeof A.icons||"string"!=typeof A.prefix||!Jo(A))&&console.error(t)}catch(e){console.error(t)}})}if(void 0!==A.IconifyProviders){const e=A.IconifyProviders;if("object"==typeof e&&null!==e)for(let A in e){const t="IconifyProviders["+A+"] is invalid.";try{const i=e[A];if("object"!=typeof i||!i||void 0===i.resources)continue;Ar(A,i)||console.error(t)}catch(ow){console.error(t)}}}}function fr(A){const[t,i]=e.useState(!!A.ssr),[B,s]=e.useState({});const[c,n]=e.useState(function(e){if(e){const e=A.icon;if("object"==typeof e)return{name:"",data:e};const t=ko(e);if(t)return{name:e,data:t}}return{name:""}}(!!A.ssr));function g(){const A=B.callback;A&&(A(),s({}))}function o(A){if(JSON.stringify(c)!==JSON.stringify(A))return g(),n(A),!0}function r(){var e;const t=A.icon;if("object"==typeof t)return void o({name:"",data:t});const i=ko(t);if(o({name:t,data:i}))if(void 0===i){const A=Cr([t],r);s({callback:A})}else i&&(null===(e=A.onLoad)||void 0===e||e.call(A,t))}e.useEffect(()=>(i(!0),g),[]),e.useEffect(()=>{t&&r()},[A.icon,t]);const{name:a,data:Q}=c;return Q?jr({...ho,...Q},A,a):A.children?A.children:A.fallback?A.fallback:e.createElement("span",{})}const Rr=e.forwardRef((A,e)=>fr({...A,_ref:e}));e.forwardRef((A,e)=>fr({inline:!0,...A,_ref:e}));const Hr="_kaitify-icon_x9qch_5";function kr(A){return A.name.startsWith("kaitify-icon-")?Xg.jsx("i",{className:qg(Hr,A.name,A.className),style:{fontSize:A.size,...A.style}}):Xg.jsx(Rr,{mode:"svg",icon:A.name,className:qg(Hr,A.className),style:{fontSize:A.size,...A.style}})}var Jr,br=t;function Lr(A){const[i,B]=e.useState(null);return e.useEffect(()=>{if("string"==typeof A.to){const e=document.querySelector(A.to);e&&B(e)}else A.to instanceof HTMLElement?B(A.to):B(document.body)},[A.to]),i?t.createPortal(A.children,i):null}Jr=br.createRoot,br.hydrateRoot;const Sr={class:"className",for:"htmlFor",maxlength:"maxLength",minlength:"minLength",readonly:"readOnly",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",contenteditable:"contentEditable",autofocus:"autoFocus",enctype:"encType",novalidate:"noValidate",formnovalidate:"formNoValidate",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",frameborder:"frameBorder",allowfullscreen:"allowFullScreen",autoplay:"autoPlay",controlslist:"controlsList",crossorigin:"crossOrigin",playsinline:"playsInline",acceptcharset:"acceptCharset",spellcheck:"spellCheck",srcdoc:"srcDoc",viewbox:"viewBox",preserveaspectratio:"preserveAspectRatio"},Tr=A=>{const t=[];return A.children&&A.children.length?A.children.forEach(A=>{t.push(Tr(A))}):A.textContent&&t.push(A.textContent),A.attrs=(A=>{const e={};for(const t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[Sr[t]??t]=A[t]);return e})(A.attrs),Object.prototype.hasOwnProperty.call(A.attrs,"contentEditable")&&(A.attrs.suppressContentEditableWarning="true"),e.createElement(A.tag,{key:A.key,...A.attrs,style:A.styles},0===t.length?void 0:t)},Wr=A=>A.stackNodes.map(e=>Tr(M(A,e))),Kr="_kaitify-border_ytsp5_1",vr=e.forwardRef((A,i)=>{const B=e.useRef(null),s=e.useRef(void 0),[c,n]=e.useState(!1),[g,o]=e.useState(!1),[r,a]=e.useState(0),Q=e.useMemo(()=>{var A;return{editor:{value:s.current},selection:{value:null==(A=s.current)?void 0:A.selection}}},[r]),I=e.useRef(!1),w=e.useRef(null),E=A=>"function"==typeof A?A(Q):A,l=async()=>{s.current||Jg.configure({el:B.current,value:A.value??"",placeholder:A.placeholder,dark:A.dark,editable:!A.disabled,autofocus:A.autofocus,allowCopy:A.allowCopy,allowCut:A.allowCut,allowPaste:A.allowPaste,allowPasteHtml:A.allowPasteHtml,priorityPasteFiles:A.priorityPasteFiles,textRenderTag:A.textRenderTag,blockRenderTag:A.blockRenderTag,emptyRenderTags:A.emptyRenderTags,extraKeepTags:A.extraKeepTags,extensions:[...A.extensions??[]],formatRules:A.formatRules,onDomParseNode:A.onDomParseNode,onPasteKeepMarks:A.onPasteKeepMarks,onPasteKeepStyles:A.onPasteKeepStyles,onPasteText:A.onPasteText,onPasteHtml:A.onPasteHtml,onPasteImage:A.onPasteImage,onPasteVideo:A.onPasteVideo,onPasteFile:A.onPasteFile,onDetachMentBlockFromParent:A.onDetachMentBlockFromParent,onBeforePatchNodeToFormat:A.onBeforePatchNodeToFormat,onInsertParagraph:A.onInsertParagraph,onDeleteComplete:A.onDeleteComplete,onKeydown:A.onKeydown,onKeyup:A.onKeyup,onFocus:A.onFocus,onBlur:A.onBlur,onBeforeUpdateView:A.onBeforeUpdateView,onAfterUpdateView:A.onAfterUpdateView,onCreate(A){s.current=A,a(A=>A+1)},onCreated(e){var t;null==(t=A.onCreated)||t.call(A,e),a(A=>A+1),I.current=!0},onSelectionUpdate(e){var t;null==(t=A.onSelectionUpdate)||t.apply(this,[e]),a(A=>A+1)},onUpdateView:async()=>(await new Promise(A=>{queueMicrotask(()=>{t.flushSync(()=>{w.current||(w.current=Jr(B.current)),w.current.render(Xg.jsx(Xg.Fragment,{children:Wr(s.current)}))}),A()})}),!1),onChange:e=>{var t;n(!0),null==(t=A.onChange)||t.call(A,e)}})};return e.useImperativeHandle(i,()=>({elRef:B,state:Q})),e.useEffect(()=>{s.current&&I.current&&(c?(n(!1),a(A=>A+1)):s.current.review(A.value??"").then(()=>{var e,t;!A.disabled&&A.autofocus&&(null==(e=s.current)||e.setSelectionAfter(),null==(t=s.current)||t.updateRealSelection(),a(A=>A+1))}))},[A.value]),e.useEffect(()=>{s.current&&I.current&&(s.current.setEditable(!A.disabled),s.current.setDark(A.dark??!1),s.current.allowCopy=A.allowCopy??!0,s.current.allowCut=A.allowCut??!0,s.current.allowPaste=A.allowPaste??!0,s.current.allowPasteHtml=A.allowPasteHtml??!1,s.current.priorityPasteFiles=A.priorityPasteFiles??!1,a(A=>A+1))},[A.disabled,A.dark,A.allowCopy,A.allowCut,A.allowPaste,A.allowPasteHtml,A.priorityPasteFiles]),e.useEffect(()=>(l(),()=>{var A;I.current&&(null==(A=s.current)||A.destroy(),s.current=void 0,queueMicrotask(()=>{var A;null==(A=w.current)||A.unmount(),w.current=null}))}),[]),Xg.jsx(Ao.Provider,{value:{state:Q,isMouseDown:g,disabled:A.disabled??!1,el:B.current,t:e=>$g(A.locale??"zh-CN",e),dark:A.dark??!1},children:Xg.jsxs(Xg.Fragment,{children:[A.appendBeforeTo?Xg.jsx(Lr,{to:A.appendBeforeTo,children:E(A.before)}):E(A.before),Xg.jsx("div",{ref:B,className:qg(Kr,A.className),style:A.style,onMouseDown:()=>o(!0),onMouseUp:()=>o(!1)}),A.appendAfterTo?Xg.jsx(Lr,{to:A.appendAfterTo,children:E(A.after)}):E(A.after),E(A.children)]})})});var Vr="top",Or="bottom",Pr="right",Xr="left",Zr="auto",qr=[Vr,Or,Pr,Xr],_r="start",$r="end",Aa="viewport",ea="popper",ta=qr.reduce(function(A,e){return A.concat([e+"-"+_r,e+"-"+$r])},[]),ia=[].concat(qr,[Zr]).reduce(function(A,e){return A.concat([e,e+"-"+_r,e+"-"+$r])},[]),Ba=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function sa(A){return A?(A.nodeName||"").toLowerCase():null}function ca(A){if(null==A)return window;if("[object Window]"!==A.toString()){var e=A.ownerDocument;return e&&e.defaultView||window}return A}function na(A){return A instanceof ca(A).Element||A instanceof Element}function ga(A){return A instanceof ca(A).HTMLElement||A instanceof HTMLElement}function oa(A){return"undefined"!=typeof ShadowRoot&&(A instanceof ca(A).ShadowRoot||A instanceof ShadowRoot)}const ra={name:"applyStyles",enabled:!0,phase:"write",fn:function(A){var e=A.state;Object.keys(e.elements).forEach(function(A){var t=e.styles[A]||{},i=e.attributes[A]||{},B=e.elements[A];ga(B)&&sa(B)&&(Object.assign(B.style,t),Object.keys(i).forEach(function(A){var e=i[A];!1===e?B.removeAttribute(A):B.setAttribute(A,!0===e?"":e)}))})},effect:function(A){var e=A.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(A){var i=e.elements[A],B=e.attributes[A]||{},s=Object.keys(e.styles.hasOwnProperty(A)?e.styles[A]:t[A]).reduce(function(A,e){return A[e]="",A},{});ga(i)&&sa(i)&&(Object.assign(i.style,s),Object.keys(B).forEach(function(A){i.removeAttribute(A)}))})}},requires:["computeStyles"]};function aa(A){return A.split("-")[0]}var Qa=Math.max,Ia=Math.min,wa=Math.round;function Ea(){var A=navigator.userAgentData;return null!=A&&A.brands&&Array.isArray(A.brands)?A.brands.map(function(A){return A.brand+"/"+A.version}).join(" "):navigator.userAgent}function la(){return!/^((?!chrome|android).)*safari/i.test(Ea())}function Ca(A,e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var i=A.getBoundingClientRect(),B=1,s=1;e&&ga(A)&&(B=A.offsetWidth>0&&wa(i.width)/A.offsetWidth||1,s=A.offsetHeight>0&&wa(i.height)/A.offsetHeight||1);var c=(na(A)?ca(A):window).visualViewport,n=!la()&&t,g=(i.left+(n&&c?c.offsetLeft:0))/B,o=(i.top+(n&&c?c.offsetTop:0))/s,r=i.width/B,a=i.height/s;return{width:r,height:a,top:o,right:g+r,bottom:o+a,left:g,x:g,y:o}}function Ma(A){var e=Ca(A),t=A.offsetWidth,i=A.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:A.offsetLeft,y:A.offsetTop,width:t,height:i}}function Ya(A,e){var t=e.getRootNode&&e.getRootNode();if(A.contains(e))return!0;if(t&&oa(t)){var i=e;do{if(i&&A.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ha(A){return ca(A).getComputedStyle(A)}function Fa(A){return["table","td","th"].indexOf(sa(A))>=0}function ya(A){return((na(A)?A.ownerDocument:A.document)||window.document).documentElement}function da(A){return"html"===sa(A)?A:A.assignedSlot||A.parentNode||(oa(A)?A.host:null)||ya(A)}function Na(A){return ga(A)&&"fixed"!==ha(A).position?A.offsetParent:null}function Da(A){for(var e=ca(A),t=Na(A);t&&Fa(t)&&"static"===ha(t).position;)t=Na(t);return t&&("html"===sa(t)||"body"===sa(t)&&"static"===ha(t).position)?e:t||function(A){var e=/firefox/i.test(Ea());if(/Trident/i.test(Ea())&&ga(A)&&"fixed"===ha(A).position)return null;var t=da(A);for(oa(t)&&(t=t.host);ga(t)&&["html","body"].indexOf(sa(t))<0;){var i=ha(t);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return t;t=t.parentNode}return null}(A)||e}function Ua(A){return["top","bottom"].indexOf(A)>=0?"x":"y"}function ua(A,e,t){return Qa(A,Ia(e,t))}function ma(A){return Object.assign({},{top:0,right:0,bottom:0,left:0},A)}function Ga(A,e){return e.reduce(function(e,t){return e[t]=A,e},{})}function pa(A){return A.split("-")[1]}var za={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ja(A){var e,t=A.popper,i=A.popperRect,B=A.placement,s=A.variation,c=A.offsets,n=A.position,g=A.gpuAcceleration,o=A.adaptive,r=A.roundOffsets,a=A.isFixed,Q=c.x,I=void 0===Q?0:Q,w=c.y,E=void 0===w?0:w,l="function"==typeof r?r({x:I,y:E}):{x:I,y:E};I=l.x,E=l.y;var C=c.hasOwnProperty("x"),M=c.hasOwnProperty("y"),Y=Xr,h=Vr,F=window;if(o){var y=Da(t),d="clientHeight",N="clientWidth";if(y===ca(t)&&"static"!==ha(y=ya(t)).position&&"absolute"===n&&(d="scrollHeight",N="scrollWidth"),B===Vr||(B===Xr||B===Pr)&&s===$r)h=Or,E-=(a&&y===F&&F.visualViewport?F.visualViewport.height:y[d])-i.height,E*=g?1:-1;if(B===Xr||(B===Vr||B===Or)&&s===$r)Y=Pr,I-=(a&&y===F&&F.visualViewport?F.visualViewport.width:y[N])-i.width,I*=g?1:-1}var D,U=Object.assign({position:n},o&&za),u=!0===r?function(A,e){var t=A.x,i=A.y,B=e.devicePixelRatio||1;return{x:wa(t*B)/B||0,y:wa(i*B)/B||0}}({x:I,y:E},ca(t)):{x:I,y:E};return I=u.x,E=u.y,g?Object.assign({},U,((D={})[h]=M?"0":"",D[Y]=C?"0":"",D.transform=(F.devicePixelRatio||1)<=1?"translate("+I+"px, "+E+"px)":"translate3d("+I+"px, "+E+"px, 0)",D)):Object.assign({},U,((e={})[h]=M?E+"px":"",e[Y]=C?I+"px":"",e.transform="",e))}var xa={passive:!0};var fa={left:"right",right:"left",bottom:"top",top:"bottom"};function Ra(A){return A.replace(/left|right|bottom|top/g,function(A){return fa[A]})}var Ha={start:"end",end:"start"};function ka(A){return A.replace(/start|end/g,function(A){return Ha[A]})}function Ja(A){var e=ca(A);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ba(A){return Ca(ya(A)).left+Ja(A).scrollLeft}function La(A){var e=ha(A),t=e.overflow,i=e.overflowX,B=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+B+i)}function Sa(A){return["html","body","#document"].indexOf(sa(A))>=0?A.ownerDocument.body:ga(A)&&La(A)?A:Sa(da(A))}function Ta(A,e){var t;void 0===e&&(e=[]);var i=Sa(A),B=i===(null==(t=A.ownerDocument)?void 0:t.body),s=ca(i),c=B?[s].concat(s.visualViewport||[],La(i)?i:[]):i,n=e.concat(c);return B?n:n.concat(Ta(da(c)))}function Wa(A){return Object.assign({},A,{left:A.x,top:A.y,right:A.x+A.width,bottom:A.y+A.height})}function Ka(A,e,t){return e===Aa?Wa(function(A,e){var t=ca(A),i=ya(A),B=t.visualViewport,s=i.clientWidth,c=i.clientHeight,n=0,g=0;if(B){s=B.width,c=B.height;var o=la();(o||!o&&"fixed"===e)&&(n=B.offsetLeft,g=B.offsetTop)}return{width:s,height:c,x:n+ba(A),y:g}}(A,t)):na(e)?function(A,e){var t=Ca(A,!1,"fixed"===e);return t.top=t.top+A.clientTop,t.left=t.left+A.clientLeft,t.bottom=t.top+A.clientHeight,t.right=t.left+A.clientWidth,t.width=A.clientWidth,t.height=A.clientHeight,t.x=t.left,t.y=t.top,t}(e,t):Wa(function(A){var e,t=ya(A),i=Ja(A),B=null==(e=A.ownerDocument)?void 0:e.body,s=Qa(t.scrollWidth,t.clientWidth,B?B.scrollWidth:0,B?B.clientWidth:0),c=Qa(t.scrollHeight,t.clientHeight,B?B.scrollHeight:0,B?B.clientHeight:0),n=-i.scrollLeft+ba(A),g=-i.scrollTop;return"rtl"===ha(B||t).direction&&(n+=Qa(t.clientWidth,B?B.clientWidth:0)-s),{width:s,height:c,x:n,y:g}}(ya(A)))}function va(A,e,t,i){var B="clippingParents"===e?function(A){var e=Ta(da(A)),t=["absolute","fixed"].indexOf(ha(A).position)>=0&&ga(A)?Da(A):A;return na(t)?e.filter(function(A){return na(A)&&Ya(A,t)&&"body"!==sa(A)}):[]}(A):[].concat(e),s=[].concat(B,[t]),c=s[0],n=s.reduce(function(e,t){var B=Ka(A,t,i);return e.top=Qa(B.top,e.top),e.right=Ia(B.right,e.right),e.bottom=Ia(B.bottom,e.bottom),e.left=Qa(B.left,e.left),e},Ka(A,c,i));return n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function Va(A){var e,t=A.reference,i=A.element,B=A.placement,s=B?aa(B):null,c=B?pa(B):null,n=t.x+t.width/2-i.width/2,g=t.y+t.height/2-i.height/2;switch(s){case Vr:e={x:n,y:t.y-i.height};break;case Or:e={x:n,y:t.y+t.height};break;case Pr:e={x:t.x+t.width,y:g};break;case Xr:e={x:t.x-i.width,y:g};break;default:e={x:t.x,y:t.y}}var o=s?Ua(s):null;if(null!=o){var r="y"===o?"height":"width";switch(c){case _r:e[o]=e[o]-(t[r]/2-i[r]/2);break;case $r:e[o]=e[o]+(t[r]/2-i[r]/2)}}return e}function Oa(A,e){void 0===e&&(e={});var t=e,i=t.placement,B=void 0===i?A.placement:i,s=t.strategy,c=void 0===s?A.strategy:s,n=t.boundary,g=void 0===n?"clippingParents":n,o=t.rootBoundary,r=void 0===o?Aa:o,a=t.elementContext,Q=void 0===a?ea:a,I=t.altBoundary,w=void 0!==I&&I,E=t.padding,l=void 0===E?0:E,C=ma("number"!=typeof l?l:Ga(l,qr)),M=Q===ea?"reference":ea,Y=A.rects.popper,h=A.elements[w?M:Q],F=va(na(h)?h:h.contextElement||ya(A.elements.popper),g,r,c),y=Ca(A.elements.reference),d=Va({reference:y,element:Y,placement:B}),N=Wa(Object.assign({},Y,d)),D=Q===ea?N:y,U={top:F.top-D.top+C.top,bottom:D.bottom-F.bottom+C.bottom,left:F.left-D.left+C.left,right:D.right-F.right+C.right},u=A.modifiersData.offset;if(Q===ea&&u){var m=u[B];Object.keys(U).forEach(function(A){var e=[Pr,Or].indexOf(A)>=0?1:-1,t=[Vr,Or].indexOf(A)>=0?"y":"x";U[A]+=m[t]*e})}return U}function Pa(A,e,t){return void 0===t&&(t={x:0,y:0}),{top:A.top-e.height-t.y,right:A.right-e.width+t.x,bottom:A.bottom-e.height+t.y,left:A.left-e.width-t.x}}function Xa(A){return[Vr,Pr,Or,Xr].some(function(e){return A[e]>=0})}function Za(A,e,t){void 0===t&&(t=!1);var i,B,s=ga(e),c=ga(e)&&function(A){var e=A.getBoundingClientRect(),t=wa(e.width)/A.offsetWidth||1,i=wa(e.height)/A.offsetHeight||1;return 1!==t||1!==i}(e),n=ya(e),g=Ca(A,c,t),o={scrollLeft:0,scrollTop:0},r={x:0,y:0};return(s||!s&&!t)&&(("body"!==sa(e)||La(n))&&(o=(i=e)!==ca(i)&&ga(i)?{scrollLeft:(B=i).scrollLeft,scrollTop:B.scrollTop}:Ja(i)),ga(e)?((r=Ca(e,!0)).x+=e.clientLeft,r.y+=e.clientTop):n&&(r.x=ba(n))),{x:g.left+o.scrollLeft-r.x,y:g.top+o.scrollTop-r.y,width:g.width,height:g.height}}function qa(A){var e=new Map,t=new Set,i=[];function B(A){t.add(A.name),[].concat(A.requires||[],A.requiresIfExists||[]).forEach(function(A){if(!t.has(A)){var i=e.get(A);i&&B(i)}}),i.push(A)}return A.forEach(function(A){e.set(A.name,A)}),A.forEach(function(A){t.has(A.name)||B(A)}),i}var _a={placement:"bottom",modifiers:[],strategy:"absolute"};function $a(){for(var A=arguments.length,e=new Array(A),t=0;t<A;t++)e[t]=arguments[t];return!e.some(function(A){return!(A&&"function"==typeof A.getBoundingClientRect)})}function AQ(A){void 0===A&&(A={});var e=A,t=e.defaultModifiers,i=void 0===t?[]:t,B=e.defaultOptions,s=void 0===B?_a:B;return function(A,e,t){void 0===t&&(t=s);var B,c,n={placement:"bottom",orderedModifiers:[],options:Object.assign({},_a,s),modifiersData:{},elements:{reference:A,popper:e},attributes:{},styles:{}},g=[],o=!1,r={state:n,setOptions:function(t){var B="function"==typeof t?t(n.options):t;a(),n.options=Object.assign({},s,n.options,B),n.scrollParents={reference:na(A)?Ta(A):A.contextElement?Ta(A.contextElement):[],popper:Ta(e)};var c,o,Q=function(A){var e=qa(A);return Ba.reduce(function(A,t){return A.concat(e.filter(function(A){return A.phase===t}))},[])}((c=[].concat(i,n.options.modifiers),o=c.reduce(function(A,e){var t=A[e.name];return A[e.name]=t?Object.assign({},t,e,{options:Object.assign({},t.options,e.options),data:Object.assign({},t.data,e.data)}):e,A},{}),Object.keys(o).map(function(A){return o[A]})));return n.orderedModifiers=Q.filter(function(A){return A.enabled}),n.orderedModifiers.forEach(function(A){var e=A.name,t=A.options,i=void 0===t?{}:t,B=A.effect;if("function"==typeof B){var s=B({state:n,name:e,instance:r,options:i}),c=function(){};g.push(s||c)}}),r.update()},forceUpdate:function(){if(!o){var A=n.elements,e=A.reference,t=A.popper;if($a(e,t)){n.rects={reference:Za(e,Da(t),"fixed"===n.options.strategy),popper:Ma(t)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach(function(A){return n.modifiersData[A.name]=Object.assign({},A.data)});for(var i=0;i<n.orderedModifiers.length;i++)if(!0!==n.reset){var B=n.orderedModifiers[i],s=B.fn,c=B.options,g=void 0===c?{}:c,a=B.name;"function"==typeof s&&(n=s({state:n,options:g,name:a,instance:r})||n)}else n.reset=!1,i=-1}}},update:(B=function(){return new Promise(function(A){r.forceUpdate(),A(n)})},function(){return c||(c=new Promise(function(A){Promise.resolve().then(function(){c=void 0,A(B())})})),c}),destroy:function(){a(),o=!0}};if(!$a(A,e))return r;function a(){g.forEach(function(A){return A()}),g=[]}return r.setOptions(t).then(function(A){!o&&t.onFirstUpdate&&t.onFirstUpdate(A)}),r}}var eQ=AQ({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(A){var e=A.state,t=A.instance,i=A.options,B=i.scroll,s=void 0===B||B,c=i.resize,n=void 0===c||c,g=ca(e.elements.popper),o=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&o.forEach(function(A){A.addEventListener("scroll",t.update,xa)}),n&&g.addEventListener("resize",t.update,xa),function(){s&&o.forEach(function(A){A.removeEventListener("scroll",t.update,xa)}),n&&g.removeEventListener("resize",t.update,xa)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(A){var e=A.state,t=A.name;e.modifiersData[t]=Va({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(A){var e=A.state,t=A.options,i=t.gpuAcceleration,B=void 0===i||i,s=t.adaptive,c=void 0===s||s,n=t.roundOffsets,g=void 0===n||n,o={placement:aa(e.placement),variation:pa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:B,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ja(Object.assign({},o,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:c,roundOffsets:g})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ja(Object.assign({},o,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:g})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},ra,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(A){var e=A.state,t=A.options,i=A.name,B=t.offset,s=void 0===B?[0,0]:B,c=ia.reduce(function(A,t){return A[t]=function(A,e,t){var i=aa(A),B=[Xr,Vr].indexOf(i)>=0?-1:1,s="function"==typeof t?t(Object.assign({},e,{placement:A})):t,c=s[0],n=s[1];return c=c||0,n=(n||0)*B,[Xr,Pr].indexOf(i)>=0?{x:n,y:c}:{x:c,y:n}}(t,e.rects,s),A},{}),n=c[e.placement],g=n.x,o=n.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=g,e.modifiersData.popperOffsets.y+=o),e.modifiersData[i]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(A){var e=A.state,t=A.options,i=A.name;if(!e.modifiersData[i]._skip){for(var B=t.mainAxis,s=void 0===B||B,c=t.altAxis,n=void 0===c||c,g=t.fallbackPlacements,o=t.padding,r=t.boundary,a=t.rootBoundary,Q=t.altBoundary,I=t.flipVariations,w=void 0===I||I,E=t.allowedAutoPlacements,l=e.options.placement,C=aa(l),M=g||(C===l||!w?[Ra(l)]:function(A){if(aa(A)===Zr)return[];var e=Ra(A);return[ka(A),e,ka(e)]}(l)),Y=[l].concat(M).reduce(function(A,t){return A.concat(aa(t)===Zr?function(A,e){void 0===e&&(e={});var t=e,i=t.placement,B=t.boundary,s=t.rootBoundary,c=t.padding,n=t.flipVariations,g=t.allowedAutoPlacements,o=void 0===g?ia:g,r=pa(i),a=r?n?ta:ta.filter(function(A){return pa(A)===r}):qr,Q=a.filter(function(A){return o.indexOf(A)>=0});0===Q.length&&(Q=a);var I=Q.reduce(function(e,t){return e[t]=Oa(A,{placement:t,boundary:B,rootBoundary:s,padding:c})[aa(t)],e},{});return Object.keys(I).sort(function(A,e){return I[A]-I[e]})}(e,{placement:t,boundary:r,rootBoundary:a,padding:o,flipVariations:w,allowedAutoPlacements:E}):t)},[]),h=e.rects.reference,F=e.rects.popper,y=new Map,d=!0,N=Y[0],D=0;D<Y.length;D++){var U=Y[D],u=aa(U),m=pa(U)===_r,G=[Vr,Or].indexOf(u)>=0,p=G?"width":"height",z=Oa(e,{placement:U,boundary:r,rootBoundary:a,altBoundary:Q,padding:o}),j=G?m?Pr:Xr:m?Or:Vr;h[p]>F[p]&&(j=Ra(j));var x=Ra(j),f=[];if(s&&f.push(z[u]<=0),n&&f.push(z[j]<=0,z[x]<=0),f.every(function(A){return A})){N=U,d=!1;break}y.set(U,f)}if(d)for(var R=function(A){var e=Y.find(function(e){var t=y.get(e);if(t)return t.slice(0,A).every(function(A){return A})});if(e)return N=e,"break"},H=w?3:1;H>0;H--){if("break"===R(H))break}e.placement!==N&&(e.modifiersData[i]._skip=!0,e.placement=N,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(A){var e=A.state,t=A.options,i=A.name,B=t.mainAxis,s=void 0===B||B,c=t.altAxis,n=void 0!==c&&c,g=t.boundary,o=t.rootBoundary,r=t.altBoundary,a=t.padding,Q=t.tether,I=void 0===Q||Q,w=t.tetherOffset,E=void 0===w?0:w,l=Oa(e,{boundary:g,rootBoundary:o,padding:a,altBoundary:r}),C=aa(e.placement),M=pa(e.placement),Y=!M,h=Ua(C),F="x"===h?"y":"x",y=e.modifiersData.popperOffsets,d=e.rects.reference,N=e.rects.popper,D="function"==typeof E?E(Object.assign({},e.rects,{placement:e.placement})):E,U="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),u=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,m={x:0,y:0};if(y){if(s){var G,p="y"===h?Vr:Xr,z="y"===h?Or:Pr,j="y"===h?"height":"width",x=y[h],f=x+l[p],R=x-l[z],H=I?-N[j]/2:0,k=M===_r?d[j]:N[j],J=M===_r?-N[j]:-d[j],b=e.elements.arrow,L=I&&b?Ma(b):{width:0,height:0},S=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},T=S[p],W=S[z],K=ua(0,d[j],L[j]),v=Y?d[j]/2-H-K-T-U.mainAxis:k-K-T-U.mainAxis,V=Y?-d[j]/2+H+K+W+U.mainAxis:J+K+W+U.mainAxis,O=e.elements.arrow&&Da(e.elements.arrow),P=O?"y"===h?O.clientTop||0:O.clientLeft||0:0,X=null!=(G=null==u?void 0:u[h])?G:0,Z=x+V-X,q=ua(I?Ia(f,x+v-X-P):f,x,I?Qa(R,Z):R);y[h]=q,m[h]=q-x}if(n){var _,$="x"===h?Vr:Xr,AA="x"===h?Or:Pr,eA=y[F],tA="y"===F?"height":"width",iA=eA+l[$],BA=eA-l[AA],sA=-1!==[Vr,Xr].indexOf(C),cA=null!=(_=null==u?void 0:u[F])?_:0,nA=sA?iA:eA-d[tA]-N[tA]-cA+U.altAxis,gA=sA?eA+d[tA]+N[tA]-cA-U.altAxis:BA,oA=I&&sA?(aA=ua(nA,eA,rA=gA))>rA?rA:aA:ua(I?nA:iA,eA,I?gA:BA);y[F]=oA,m[F]=oA-eA}var rA,aA;e.modifiersData[i]=m}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(A){var e,t=A.state,i=A.name,B=A.options,s=t.elements.arrow,c=t.modifiersData.popperOffsets,n=aa(t.placement),g=Ua(n),o=[Xr,Pr].indexOf(n)>=0?"height":"width";if(s&&c){var r=function(A,e){return ma("number"!=typeof(A="function"==typeof A?A(Object.assign({},e.rects,{placement:e.placement})):A)?A:Ga(A,qr))}(B.padding,t),a=Ma(s),Q="y"===g?Vr:Xr,I="y"===g?Or:Pr,w=t.rects.reference[o]+t.rects.reference[g]-c[g]-t.rects.popper[o],E=c[g]-t.rects.reference[g],l=Da(s),C=l?"y"===g?l.clientHeight||0:l.clientWidth||0:0,M=w/2-E/2,Y=r[Q],h=C-a[o]-r[I],F=C/2-a[o]/2+M,y=ua(Y,F,h),d=g;t.modifiersData[i]=((e={})[d]=y,e.centerOffset=y-F,e)}},effect:function(A){var e=A.state,t=A.options.element,i=void 0===t?"[data-popper-arrow]":t;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&Ya(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(A){var e=A.state,t=A.name,i=e.rects.reference,B=e.rects.popper,s=e.modifiersData.preventOverflow,c=Oa(e,{elementContext:"reference"}),n=Oa(e,{altBoundary:!0}),g=Pa(c,i),o=Pa(n,B,s),r=Xa(g),a=Xa(o);e.modifiersData[t]={referenceClippingOffsets:g,popperEscapeOffsets:o,isReferenceHidden:r,hasPopperEscaped:a},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":r,"data-popper-escaped":a})}}]});const tQ={matchingText:(A,e)=>"Chinese"==e?/^[\u4e00-\u9fa5]+$/.test(A):"chinese"==e?/[\u4e00-\u9fa5]/.test(A):"email"==e?/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(A):"username"==e?/^[a-zA-Z0-9_]{4,16}$/.test(A):"int+"==e?/^\d+$/.test(A):"int-"==e?/^-\d+$/.test(A):"int"==e?/^-?\d+$/.test(A):"pos"==e?/^\d*\.?\d+$/.test(A):"neg"==e?/^-\d*\.?\d+$/.test(A):"number"==e?/^-?\d*\.?\d+$/.test(A):"phone"==e?/^1[0-9]\d{9}$/.test(A):"idCard"==e?/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(A):"url"==e?/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/.test(A):"IPv4"==e?/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(A):"hex"==e?/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(A):"rgb"==e?/^rgb\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\)$/.test(A):"rgba"==e?/^rgba\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(0?\.\d|1(\.0)?|0)\)$/.test(A):"QQ"==e?/^[1-9][0-9]{4,10}$/.test(A):"weixin"==e?/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/.test(A):"plate"==e&&/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$|^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}[D|F]{1}[A-Z0-9]{5,6}$/.test(A),getUrlParams(A){const e=new RegExp("(^|&)"+A+"=([^&]*)(&|$)");let t=window.location.search.substring(1);if(!t){const A=window.location.hash.split("?");2==A.length&&(t=A[1])}let i=t.match(e);if(i)return decodeURIComponent(i[2])},isEmptyObject(A){return this.isObject(A)&&0==Object.keys(A).length},equal(A,e){if(typeof A!=typeof e)return!1;if(this.isObject(A)&&this.isObject(e)){const t=Object.getOwnPropertyNames(A),i=Object.getOwnPropertyNames(e);if(t.length!=i.length)return!1;const B=t.length;let s=!0;for(let c=0;c<B;c++){const i=t[c],B=A[i],n=e[i];if(!this.equal(B,n)){s=!1;break}}return s}return A===e},isObject:A=>"object"==typeof A&&!!A,copyText(A){if(!navigator.clipboard)throw new Error("navigator.clipboard must be obtained in a secure environment, such as localhost, 127.0.0.1, or https, so the method won't work");return navigator.clipboard.writeText(A)},clone(A){if(this.isObject(A)){if(Array.isArray(A))return A.map(A=>this.clone(A));const e={};for(let t in A)e[t]=this.clone(A[t]);return e}return A}},iQ="_dap-datas",BQ={remove(A,e){const t=A[iQ]||{};e?(delete t[e],A[iQ]=t):A[iQ]={}},has:(A,e)=>(A[iQ]||{}).hasOwnProperty(e),get(A,e){const t=A[iQ]||{};return e?t[e]:t},set(A,e,t){const i=A[iQ]||{};i[e]=t,A[iQ]=i}},sQ=A=>{const e=A.split(/[\s]+/g),t=[];return e.forEach(A=>{const e=A.split("."),i={eventName:e[0]};e.length>1&&(i.guid=e[1]),t.push(i)}),t},cQ=(A,e,t)=>{const i=BQ.get(A,"dap-defined-events")||{},B=Object.keys(i),s=B.length;for(let c=0;c<s;c++){const s=B[c];i[s]&&i[s].type==e&&(t?s==e+"."+t&&(A.removeEventListener(i[s].type,i[s].fn,i[s].options),i[s]=void 0):(A.removeEventListener(i[s].type,i[s].fn,i[s].options),i[s]=void 0))}BQ.set(A,"dap-defined-events",(A=>{const e={};return Object.keys(A).forEach(t=>{A[t]&&(e[t]=A[t])}),e})(i))},nQ={on(A,e,t,i){sQ(e).forEach(e=>{((A,e,t,i,B)=>{const s=BQ.get(A,"dap-defined-events")||{};t||(t=BQ.get(A,"dap-event-guid")||0,BQ.set(A,"dap-event-guid",t+1)),s[t=e+"."+t]&&s[t].type==e&&A.removeEventListener(e,s[t].fn,s[t].options),A.addEventListener(e,i,B),s[t]={type:e,fn:i,options:B},BQ.set(A,"dap-defined-events",s)})(A,e.eventName,e.guid,t.bind(A),i)})},off(A,e){const t=BQ.get(A,"dap-defined-events");if(!t)return;if(!e){const e=Object.keys(t),i=e.length;for(let B=0;B<i;B++){const i=e[B];A.removeEventListener(t[i].type,t[i].fn,t[i].options)}return BQ.remove(A,"dap-defined-events"),void BQ.remove(A,"dap-event-guid")}sQ(e).forEach(e=>{cQ(A,e.eventName,e.guid)})},get(A){const e=BQ.get(A,"dap-defined-events");if(e)return e}},gQ={getImageUrl:A=>window.URL.createObjectURL(A),dataFileToBase64:A=>new Promise(e=>{const t=new FileReader;t.readAsDataURL(A),t.onloadend=()=>{const A=t.result;e(A)}}),dataBase64toFile(A,e){const t=A.split(","),i=t[0].match(/:(.*?);/)[1],B=atob(t[1]);let s=B.length;const c=new Uint8Array(s);for(;s--;)c[s]=B.charCodeAt(s);return new File([c],e,{type:i})},compressImage(A,e){const t=(A,i,B)=>{let s=A.toDataURL("image/"+(e.mimeType??"jpeg"),B),c=this.dataBase64toFile(s,i);if(e.maxSize&&e.maxSize>0&&c.size>1024*e.maxSize){B=B<=0?0:Number((B-.01).toFixed(2));const e=t(A,i,B);s=e.url,c=e.file,B=e.quality}return{file:c,url:s,quality:B}};return new Promise((i,B)=>{const s=new FileReader;s.readAsDataURL(A),s.onload=()=>{const c=s.result,n=new Image;n.src=c,n.onload=()=>{if(e.minSize&&e.minSize>0&&A.size<=1024*e.minSize)return void i({file:A,url:c,quality:1,width:n.width,height:n.height});const B=document.createElement("canvas"),s=B.getContext("2d");B.width=e.width||n.width,B.height=e.width?e.width/(n.width/n.height):n.height,s.drawImage(n,0,0,B.width,B.height);const g=A.name.lastIndexOf("."),o=A.name.substring(0,g)+"."+(e.mimeType??"jpeg");let r=t(B,o,e.quality??.8);i({...r,width:B.width,height:B.height})},n.onerror=()=>{B(new Error("Failed to load image file"))}},s.onerror=()=>{B(new Error("Failed to load image file"))}})}};function oQ(){return oQ=Object.assign?Object.assign.bind():function(A){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(A[i]=t[i])}return A},oQ.apply(null,arguments)}function rQ(A,e){if(null==A)return{};var t={};for(var i in A)if({}.hasOwnProperty.call(A,i)){if(-1!==e.indexOf(i))continue;t[i]=A[i]}return t}function aQ(A,e){return(aQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,e){return A.__proto__=e,A})(A,e)}function QQ(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,aQ(A,e)}function IQ(A,e){return A.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const wQ=!1,EQ=e.createContext(null);var lQ=function(A){return A.scrollTop},CQ="unmounted",MQ="exited",YQ="entering",hQ="entered",FQ="exiting",yQ=function(A){function i(e,t){var i;i=A.call(this,e,t)||this;var B,s=t&&!t.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?s?(B=MQ,i.appearStatus=YQ):B=hQ:B=e.unmountOnExit||e.mountOnEnter?CQ:MQ,i.state={status:B},i.nextCallback=null,i}QQ(i,A),i.getDerivedStateFromProps=function(A,e){return A.in&&e.status===CQ?{status:MQ}:null};var B=i.prototype;return B.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},B.componentDidUpdate=function(A){var e=null;if(A!==this.props){var t=this.state.status;this.props.in?t!==YQ&&t!==hQ&&(e=YQ):t!==YQ&&t!==hQ||(e=FQ)}this.updateStatus(!1,e)},B.componentWillUnmount=function(){this.cancelNextCallback()},B.getTimeouts=function(){var A,e,t,i=this.props.timeout;return A=e=t=i,null!=i&&"number"!=typeof i&&(A=i.exit,e=i.enter,t=void 0!==i.appear?i.appear:e),{exit:A,enter:e,appear:t}},B.updateStatus=function(A,e){if(void 0===A&&(A=!1),null!==e)if(this.cancelNextCallback(),e===YQ){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:t.findDOMNode(this);i&&lQ(i)}this.performEnter(A)}else this.performExit();else this.props.unmountOnExit&&this.state.status===MQ&&this.setState({status:CQ})},B.performEnter=function(A){var e=this,i=this.props.enter,B=this.context?this.context.isMounting:A,s=this.props.nodeRef?[B]:[t.findDOMNode(this),B],c=s[0],n=s[1],g=this.getTimeouts(),o=B?g.appear:g.enter;!A&&!i||wQ?this.safeSetState({status:hQ},function(){e.props.onEntered(c)}):(this.props.onEnter(c,n),this.safeSetState({status:YQ},function(){e.props.onEntering(c,n),e.onTransitionEnd(o,function(){e.safeSetState({status:hQ},function(){e.props.onEntered(c,n)})})}))},B.performExit=function(){var A=this,e=this.props.exit,i=this.getTimeouts(),B=this.props.nodeRef?void 0:t.findDOMNode(this);e&&!wQ?(this.props.onExit(B),this.safeSetState({status:FQ},function(){A.props.onExiting(B),A.onTransitionEnd(i.exit,function(){A.safeSetState({status:MQ},function(){A.props.onExited(B)})})})):this.safeSetState({status:MQ},function(){A.props.onExited(B)})},B.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},B.safeSetState=function(A,e){e=this.setNextCallback(e),this.setState(A,e)},B.setNextCallback=function(A){var e=this,t=!0;return this.nextCallback=function(i){t&&(t=!1,e.nextCallback=null,A(i))},this.nextCallback.cancel=function(){t=!1},this.nextCallback},B.onTransitionEnd=function(A,e){this.setNextCallback(e);var i=this.props.nodeRef?this.props.nodeRef.current:t.findDOMNode(this),B=null==A&&!this.props.addEndListener;if(i&&!B){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=s[0],n=s[1];this.props.addEndListener(c,n)}null!=A&&setTimeout(this.nextCallback,A)}else setTimeout(this.nextCallback,0)},B.render=function(){var A=this.state.status;if(A===CQ)return null;var t=this.props,i=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var B=rQ(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return e.createElement(EQ.Provider,{value:null},"function"==typeof i?i(A,B):e.cloneElement(e.Children.only(i),B))},i}(e.Component);function dQ(){}yQ.contextType=EQ,yQ.propTypes={},yQ.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:dQ,onEntering:dQ,onEntered:dQ,onExit:dQ,onExiting:dQ,onExited:dQ},yQ.UNMOUNTED=CQ,yQ.EXITED=MQ,yQ.ENTERING=YQ,yQ.ENTERED=hQ,yQ.EXITING=FQ;var NQ=function(A,e){return A&&e&&e.split(" ").forEach(function(e){return i=e,void((t=A).classList?t.classList.remove(i):"string"==typeof t.className?t.className=IQ(t.className,i):t.setAttribute("class",IQ(t.className&&t.className.baseVal||"",i)));var t,i})},DQ=function(A){function t(){for(var e,t=arguments.length,i=new Array(t),B=0;B<t;B++)i[B]=arguments[B];return(e=A.call.apply(A,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(A,t){var i=e.resolveArguments(A,t),B=i[0],s=i[1];e.removeClasses(B,"exit"),e.addClass(B,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(A,t)},e.onEntering=function(A,t){var i=e.resolveArguments(A,t),B=i[0],s=i[1]?"appear":"enter";e.addClass(B,s,"active"),e.props.onEntering&&e.props.onEntering(A,t)},e.onEntered=function(A,t){var i=e.resolveArguments(A,t),B=i[0],s=i[1]?"appear":"enter";e.removeClasses(B,s),e.addClass(B,s,"done"),e.props.onEntered&&e.props.onEntered(A,t)},e.onExit=function(A){var t=e.resolveArguments(A)[0];e.removeClasses(t,"appear"),e.removeClasses(t,"enter"),e.addClass(t,"exit","base"),e.props.onExit&&e.props.onExit(A)},e.onExiting=function(A){var t=e.resolveArguments(A)[0];e.addClass(t,"exit","active"),e.props.onExiting&&e.props.onExiting(A)},e.onExited=function(A){var t=e.resolveArguments(A)[0];e.removeClasses(t,"exit"),e.addClass(t,"exit","done"),e.props.onExited&&e.props.onExited(A)},e.resolveArguments=function(A,t){return e.props.nodeRef?[e.props.nodeRef.current,A]:[A,t]},e.getClassNames=function(A){var t=e.props.classNames,i="string"==typeof t,B=i?""+(i&&t?t+"-":"")+A:t[A];return{baseClassName:B,activeClassName:i?B+"-active":t[A+"Active"],doneClassName:i?B+"-done":t[A+"Done"]}},e}QQ(t,A);var i=t.prototype;return i.addClass=function(A,e,t){var i=this.getClassNames(e)[t+"ClassName"],B=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===t&&B&&(i+=" "+B),"active"===t&&A&&lQ(A),i&&(this.appliedClasses[e][t]=i,function(A,e){A&&e&&e.split(" ").forEach(function(e){return i=e,void((t=A).classList?t.classList.add(i):function(A,e){return A.classList?!!e&&A.classList.contains(e):-1!==(" "+(A.className.baseVal||A.className)+" ").indexOf(" "+e+" ")}(t,i)||("string"==typeof t.className?t.className=t.className+" "+i:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+i)));var t,i})}(A,i))},i.removeClasses=function(A,e){var t=this.appliedClasses[e],i=t.base,B=t.active,s=t.done;this.appliedClasses[e]={},i&&NQ(A,i),B&&NQ(A,B),s&&NQ(A,s)},i.render=function(){var A=this.props;A.classNames;var t=rQ(A,["classNames"]);return e.createElement(yQ,oQ({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(e.Component);DQ.defaultProps={classNames:""},DQ.propTypes={};const UQ="_kaitify-bubble_1yv5r_1",uQ="_kaitify-dark_1yv5r_12",mQ="_kaitify-bubble-enter_1yv5r_18",GQ="_kaitify-bubble-exit_1yv5r_21",pQ="_kaitify-bubble-enter-active_1yv5r_24",zQ="_kaitify-bubble-exit-active_1yv5r_28",jQ=e.forwardRef((A,t)=>{const i=e.useId(),{state:B,disabled:s,isMouseDown:c,el:n,dark:g}=eo(),o=e.useRef(null),r=e.useRef(null),a=e.useMemo(()=>!s&&((!c||!A.hideOnMousedown)&&(A.visible??!1)),[s,c,A.hideOnMousedown,A.visible]),Q=()=>{r.current&&(r.current.destroy(),r.current=null)},I=()=>{if(!a||!o.current||!B.editor.value)return;const e=(()=>{if(!B.editor.value||!n)return null;if(B.editor.value.selection.focused()){if(A.match){const e=B.editor.value.getMatchNodeBySelection(A.match);if(e)return B.editor.value.findDom(e).getBoundingClientRect()}const e=window.getSelection();if(!e||!e.rangeCount)return n.getBoundingClientRect();const t=e.getRangeAt(0).getClientRects();if(t.length){const A=t[t.length-1];return{top:A.top,left:A.left,right:A.left+A.width,bottom:A.top+A.height,width:A.width,height:A.height,x:A.left,y:A.top,toJSON:()=>{}}}}return n.getBoundingClientRect()})();Q(),r.current=eQ({getBoundingClientRect:()=>e},o.current,{placement:"bottom-start",modifiers:[{name:"computeStyles",options:{adaptive:!0,gpuAcceleration:!1}},{name:"flip",options:{enabled:!0,fallbackPlacements:["bottom","bottom-end","top-start","top","top-end","left","left-start","left-end","right","right-start","right-end"]}},{name:"offset",options:{offset:[0,5]}},{name:"preventOverflow",options:{enabled:!0,boundary:"viewport",padding:5}}]})},w=A=>{nQ.on(A,`scroll.kaitify_bubble_${i}`,()=>{a&&I()}),A.parentNode&&w(A.parentNode)},E=A=>{nQ.off(A,`scroll.kaitify_bubble_${i}`),A.parentNode&&E(A.parentNode)};return e.useImperativeHandle(t,()=>({elRef:o,popperInstance:r})),e.useEffect(()=>{I()},[B.selection]),e.useEffect(()=>{n&&a&&(E(n),w(n))},[n,a]),e.useEffect(()=>()=>{Q(),n&&E(n)},[]),Xg.jsx(Lr,{children:Xg.jsx(DQ,{in:a,timeout:50,classNames:{enter:mQ,enterActive:pQ,exit:GQ,exitActive:zQ},unmountOnExit:!0,nodeRef:o,onEnter:()=>{var e;null==(e=A.onShow)||e.call(A,o.current)},onEntering:()=>{var e;I(),null==(e=A.onShowing)||e.call(A,o.current)},onEntered:()=>{var e;null==(e=A.onShown)||e.call(A,o.current)},onExit:()=>{var e;null==(e=A.onHide)||e.call(A,o.current)},onExiting:()=>{var e;null==(e=A.onHiding)||e.call(A,o.current)},onExited:()=>{var e;Q(),null==(e=A.onHidden)||e.call(A,o.current)},children:Xg.jsx("div",{ref:o,className:qg(UQ,{[uQ]:g},A.className),style:{zIndex:5,...A.style},children:A.children})})})}),xQ="_kaitify-popover-refer_1qt0d_1",fQ="_kaitify-dark_1qt0d_14",RQ="_kaitify-popover_1qt0d_1",HQ="_kaitify-popover-wrapper_1qt0d_48",kQ="_kaitify-popover-content_1qt0d_55",JQ="_kaitify-popover-arrow_1qt0d_64",bQ="_kaitify-popover-translate-enter_1qt0d_171",LQ="_kaitify-popover-translate-exit_1qt0d_175",SQ="_kaitify-popover-translate-enter-active_1qt0d_179",TQ="_kaitify-popover-translate-exit-active_1qt0d_184",WQ="_kaitify-popover-fade-enter_1qt0d_189",KQ="_kaitify-popover-fade-exit_1qt0d_193",vQ="_kaitify-popover-fade-enter-active_1qt0d_197",VQ="_kaitify-popover-fade-exit-active_1qt0d_202",OQ=e.forwardRef(({placement:A="bottom",trigger:t="hover",delay:i=0,animation:B="translate",...s},c)=>{const n=e.useId(),{dark:g}=eo(),[o,r]=e.useState(!1),[a,Q]=e.useState(A),I=e.useRef(null),w=e.useRef(null),E=e.useRef(null),l=e.useRef(),C=e.useMemo(()=>A.startsWith("top")?["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].filter(e=>e!=A):A.startsWith("bottom")?["bottom","bottom-start","bottom-end","top","top-start","top-end","left","left-start","left-end","right","right-start","right-end"].filter(e=>e!=A):A.startsWith("left")?["left","left-start","left-end","right","right-start","right-end","top","top-start","top-end","bottom","bottom-start","bottom-end"].filter(e=>e!=A):["right","right-start","right-end","left","left-start","left-end","top","top-start","top-end","bottom","bottom-start","bottom-end"].filter(e=>e!=A),[A]),M=async()=>{l.current&&(await l.current.update(),Q(l.current.state.placement))},Y=()=>{l.current&&(l.current.destroy(),l.current=void 0)},h=()=>{s.disabled||(i>0?setTimeout(()=>{r(!0)},i):r(!0))},F=()=>{s.disabled||r(!1)},y=A=>{var e,i;"hover"==t&&((null==(e=I.current)?void 0:e.contains(A.relatedTarget))||(null==(i=E.current)?void 0:i.contains(A.relatedTarget))||F())};return e.useImperativeHandle(c,()=>({visible:o,showPopover:h,hidePopover:F,popperInstance:l,realPlacement:a,update:M})),e.useEffect(()=>{Q(A),l.current&&o&&(l.current.state.options.placement=A,l.current.state.options.modifiers.find(A=>"flip"===A.name).options.fallbackPlacements=C,M())},[A]),e.useEffect(()=>(nQ.on(document.documentElement,`click.kaitify-popover-${n}`,A=>{var e,t;(null==(e=I.current)?void 0:e.contains(A.target))||(null==(t=E.current)?void 0:t.contains(A.target))||F()}),()=>{Y(),nQ.off(document.documentElement,`click.kaitify-popover-${n}`)}),[]),Xg.jsxs(Xg.Fragment,{children:[Xg.jsx("div",{ref:I,className:qg(xQ,{[fQ]:g}),onMouseEnter:()=>{"hover"==t&&h()},onMouseLeave:y,onClick:()=>{"click"==t&&(o?F():h())},children:s.refer}),Xg.jsx(Lr,{to:"body",children:Xg.jsx(DQ,{in:o,timeout:200,classNames:{enter:"translate"===B?bQ:WQ,enterActive:"translate"===B?SQ:vQ,exit:"translate"===B?LQ:KQ,exitActive:"translate"===B?TQ:VQ},nodeRef:E,unmountOnExit:!0,onEnter:()=>{var A;null==(A=s.onShow)||A.call(s,E.current)},onEntering:()=>{var e;l.current=eQ(I.current,E.current,{placement:A,modifiers:[{name:"computeStyles",options:{adaptive:!0,gpuAcceleration:!1}},{name:"flip",options:{enabled:!0,fallbackPlacements:C}},{name:"offset",options:{offset:[0,0]}},{name:"arrow",options:{element:w.current}},{name:"preventOverflow",options:{enabled:!0,boundary:"viewport",padding:5}}]}),null==(e=s.onShowing)||e.call(s,E.current)},onEntered:()=>{var A;null==(A=s.onShown)||A.call(s,E.current)},onExit:()=>{var A;null==(A=s.onHide)||A.call(s,E.current)},onExiting:()=>{var A;null==(A=s.onHiding)||A.call(s,E.current)},onExited:()=>{var A;Y(),null==(A=s.onHidden)||A.call(s,E.current)},children:Xg.jsx("div",{ref:E,className:qg(RQ,{[fQ]:g}),onMouseLeave:y,"data-arrow":s.arrow,"data-placement":a,style:{zIndex:s.zIndex??10},children:Xg.jsxs("div",{className:HQ,children:[Xg.jsx("div",{className:kQ,style:{width:s.width??"auto",maxHeight:s.maxHeight??"",minWidth:s.minWidth??""},children:s.children}),s.arrow&&Xg.jsx("div",{ref:w,className:JQ,"data-placement":a})]})})})})]})}),PQ="_kaitify-button_1f15o_1",XQ="_kaitify-dark_1f15o_22",ZQ="_kaitify-button-active_1f15o_35",qQ="_kaitify-button-block_1f15o_43",_Q="_kaitify-button-large_1f15o_47";function $Q(A){const{dark:e}=eo();return Xg.jsx("button",{className:qg(PQ,A.className,{[ZQ]:A.active,[qQ]:A.block,[_Q]:A.large,[XQ]:e}),style:A.style,disabled:A.disabled,type:"button",role:"button",onClick:A.onClick,children:A.children})}const AI="_kaitify-menu_1fr0d_1",eI="_kaitify-menu-caret_1fr0d_15",tI="_kaitify-menu-caret-rotate_1fr0d_21",iI="_kaitify-menu-options_1fr0d_24",BI="_kaitify-menu-option_1fr0d_24",sI="_kaitify-menu-option-icon_1fr0d_44",cI="_kaitify-disabled_1fr0d_47",nI="_kaitify-menu-option-active_1fr0d_56",gI="_kaitify-dark_1fr0d_64",oI=e.forwardRef(({data:A=[],popover:t=!1,popoverProps:i={width:"auto",placement:"bottom-start",arrow:!1,trigger:"click",animation:"translate"},...B},s)=>{const c=e.useId(),{el:n,dark:g}=eo(),o=e.useRef(null),[r,a]=e.useState(!1),Q=()=>{var A;null==(A=o.current)||A.hidePopover()},I=()=>{var A;null==(A=o.current)||A.showPopover()},w=A=>{var e,t;B.disabled||(null==(e=B.itemDisabled)?void 0:e.call(B,A))||(null==(t=B.onSelect)||t.call(B,A),Q())},E=()=>{var A;B.disabled||t||null==(A=B.onOperate)||A.call(B)},l=(A,e)=>"function"==typeof e?e(A):e;return e.useImperativeHandle(s,()=>({showPopover:I,hidePopover:Q})),e.useEffect(()=>{n&&B.shortcut&&(nQ.off(n,`keydown.kaitify_menu_${c}`),nQ.on(n,`keydown.kaitify_menu_${c}`,e=>{if(t&&tQ.isObject(B.shortcut)){const t=B.shortcut;A.forEach(A=>{"function"==typeof t[A.value]&&t[A.value](e)&&w(A)})}else"function"==typeof B.shortcut&&B.shortcut(e)&&E()}))},[n]),e.useEffect(()=>()=>{n&&nQ.off(n,`keydown.kaitify_menu_${c}`)},[]),Xg.jsx("div",{className:AI,children:Xg.jsxs(OQ,{ref:o,delay:100,disabled:B.disabled||!t,zIndex:i.zIndex??10,animation:i.animation??"translate",arrow:i.arrow,placement:i.placement??"bottom-start",trigger:i.trigger??"click",width:i.width,maxHeight:i.maxHeight,minWidth:i.minWidth,onShow:A=>{var e;null==(e=i.onShow)||e.call(i,A),a(!0)},onShowing:i.onShowing,onShown:i.onShown,onHide:A=>{var e;null==(e=i.onHide)||e.call(i,A),a(!1)},onHiding:i.onHiding,onHidden:i.onHidden,refer:Xg.jsxs($Q,{onClick:E,disabled:B.disabled,active:B.active,children:[B.children,t&&Xg.jsx(kr,{name:"kaitify-icon-caret-down",className:qg(eI,{[tI]:r})})]}),children:[B.customPopover,!B.customPopover&&A.length>0&&Xg.jsx("div",{className:qg(iI,{[gI]:g}),children:A.map(A=>{var e,t;return Xg.jsxs("div",{onClick:()=>w(A),className:qg(BI,{[nI]:null==(e=B.itemActive)?void 0:e.call(B,A),[cI]:null==(t=B.itemDisabled)?void 0:t.call(B,A)}),children:[B.customIcon?l(A,B.customIcon):!!A.icon&&Xg.jsx(kr,{name:A.icon,className:sI}),B.customLabel?l(A,B.customLabel):Xg.jsx("span",{children:A.label})]},A.value)})})]})})});const rI="_kaitify-attachment-upload_hlc4c_1",aI="_kaitify-dark_hlc4c_28",QI="_kaitify-attachment-remote_hlc4c_31",II="_kaitify-attachment-remote-footer_hlc4c_63",wI="_kaitify-attachment-update_hlc4c_78",EI="_kaitify-attachment-update-footer_hlc4c_110";const lI="_kaitify-colors-panel_7iz13_1",CI="_kaitify-colors-header_7iz13_6",MI="_kaitify-colors-header-text_7iz13_13",YI="_kaitify-colors-content_7iz13_16",hI="_kaitify-colors-el_7iz13_22",FI="_kaitify-color-el-active_7iz13_27",yI="_kaitify-dark_7iz13_42",dI=["#000000","#505050","#808080","#BBBBBB","#CCCCCC","#EEEEEE","#F7F7F7","#FFFFFF","#EC1A0A","#FF9900","#FFFF00","#07C160","#00FFFF","#0B73DE","#9C00FF","#FF00FF","#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE","#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD","#e45649","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5","#CE0000","#E79439","#EFC631","#50a14f","#4A7B8C","#03A8F3","#634AA5","#A54A7B","#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842","#630000","#7B3900","#986801","#295218","#083139","#003163","#21104A","#4A1031"];const NI="_kaitify-colors-panel_7iz13_1",DI="_kaitify-colors-header_7iz13_6",UI="_kaitify-colors-header-text_7iz13_13",uI="_kaitify-colors-content_7iz13_16",mI="_kaitify-colors-el_7iz13_22",GI="_kaitify-color-el-active_7iz13_27",pI="_kaitify-dark_7iz13_42",zI=["#000000","#505050","#808080","#BBBBBB","#CCCCCC","#EEEEEE","#F7F7F7","#FFFFFF","#EC1A0A","#FF9900","#FFFF00","#07C160","#00FFFF","#0B73DE","#9C00FF","#FF00FF","#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE","#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD","#e45649","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5","#CE0000","#E79439","#EFC631","#50a14f","#4A7B8C","#03A8F3","#634AA5","#A54A7B","#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842","#630000","#7B3900","#986801","#295218","#083139","#003163","#21104A","#4A1031"];const jI="_kaitify-emoji-panel_1m135_1",xI="_kaitify-emoji-el_1m135_8",fI=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","😉","😍","😘","😗","😚","🥰","😋","😜","🤪","🤨","😭","😢","😔","😞","😰","😱","😨","😳","😡","😠","🤬","👍","👎","👏","🙌","👐","🤝","✌","🤞","🤘","❤️","💕","💖","💗","💘","💔","❣","🖤","💙","💚","🍏","🍎","🍌","🍉","🍇","🍓","🍒","🍑","🍕","🍔","🍟","🌭","🍗","🍞","🚗","🚕","🚙","🚌","🚑","🚓","🚚","🚲","🚜","🚂","✈️","🚀","🎉","🎊","🎁","🔥","🌈","⭐","💡","⏰","📅","📌","🎶","🎵"];const RI="_kaitify-image-upload_1dzmn_1",HI="_kaitify-dark_1dzmn_28",kI="_kaitify-image-remote_1dzmn_31",JI="_kaitify-image-remote-footer_1dzmn_63",bI="_kaitify-image-update_1dzmn_78",LI="_kaitify-image-update-footer_1dzmn_110";const SI="_kaitify-link_2x8z9_1",TI="_kaitify-link-footer_2x8z9_33",WI="_kaitify-dark_2x8z9_39";const KI="_kaitify-math_1xoz6_1",vI="_kaitify-math-textarea_1xoz6_6",VI="_kaitify-math-footer_1xoz6_34",OI="_kaitify-dark_1xoz6_40";const PI="_kaitify-ordered-list_1wgxa_1",XI="_kaitify-ordered-list-item_1wgxa_8",ZI="_kaitify-ordered-list-item-button_1wgxa_11";const qI="_kaitify-table_aij2n_1",_I="_kaitify-table-inside_aij2n_29",$I="_kaitify-table-footer_aij2n_32",Aw="_kaitify-dark_aij2n_41";const ew="_kaitify-unordered-list_n8eec_1",tw="_kaitify-unordered-list-item_n8eec_8";const iw="_kaitify-video-upload_1z0be_1",Bw="_kaitify-video-upload-wrapper_1z0be_5",sw="_kaitify-video-upload-footer_1z0be_31",cw="_kaitify-video-remote_1z0be_38",nw="_kaitify-video-remote-footer_1z0be_66",gw="_kaitify-dark_1z0be_72";A.AlignCenterMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isAlign)?void 0:i.call(e,"center"))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetAlign)||B.call(e,"center"):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setAlign)||n.call(c,"center")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-align-center"})})},A.AlignExtension=JA,A.AlignJustifyMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isAlign)?void 0:i.call(e,"justify"))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetAlign)||B.call(e,"justify"):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setAlign)||n.call(c,"justify")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-align-justify"})})},A.AlignLeftMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isAlign)?void 0:i.call(e,"left"))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetAlign)||B.call(e,"left"):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setAlign)||n.call(c,"left")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-align-left"})})},A.AlignRightMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isAlign)?void 0:i.call(e,"right"))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetAlign)||B.call(e,"right"):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setAlign)||n.call(c,"right")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-align-right"})})},A.AttachmentExtension=dg,A.AttachmentMenu=function({tabs:A={data:["remote","upload"],default:"remote"},...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),[E,l]=e.useState({url:"",text:""}),[C,M]=e.useState({url:"",text:""}),Y=e.useMemo(()=>A.data.map(A=>[{label:Q("远程地址"),value:"remote"},{label:Q("本地上传"),value:"upload"}].find(e=>e.value==A)),[A]),h=e.useMemo(()=>{var A,e,t;return!!(null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).getAttachment)?void 0:t.call(e))},[a.editor]),F=e.useMemo(()=>{var A,e,i,B,s,c,n,g,o;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!!(null==(i=(e=a.editor.value.commands).hasMath)?void 0:i.call(e))||(!!(null==(s=(B=a.editor.value.commands).hasCodeBlock)?void 0:s.call(B))||(!!(null==(n=(c=a.editor.value.commands).hasLink)?void 0:n.call(c))||(!(!(null==(o=(g=a.editor.value.commands).hasAttachment)?void 0:o.call(g))||h)||(t.disabled??!1)))))},[a.editor,t.disabled,h]),y=async A=>{var e,i,B,s;const c=null==(e=A.currentTarget.files)?void 0:e[0];if(!c||!a.editor.value)return;const n="function"==typeof t.customUpload?await t.customUpload(c):await gQ.dataFileToBase64(c);n&&(null==(B=(i=a.editor.value.commands).setAttachment)||B.call(i,{url:n,text:c.name||Q("附件"),icon:t.iconUrl}),null==(s=w.current)||s.hidePopover())},d=async()=>{var A,e,i;E.url&&E.text&&a.editor.value&&(null==(e=(A=a.editor.value.commands).setAttachment)||e.call(A,{url:E.url,text:E.text,icon:t.iconUrl}),null==(i=w.current)||i.hidePopover())};return Xg.jsx(oI,{ref:w,disabled:F,active:h,popover:!0,popoverProps:{width:(null==(i=t.popoverProps)?void 0:i.width)??300,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex,onShowing:()=>{var A,e,t;const i=null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).getAttachmentInfo)?void 0:t.call(e);i?M({text:i.text,url:i.url}):l({text:"",url:""})}},customPopover:h?Xg.jsxs("div",{className:qg(wI,{[aI]:I}),children:[Xg.jsx("input",{value:C.text,onChange:A=>M(e=>({...e,text:A.target.value})),placeholder:Q("附件名称"),type:"text"}),Xg.jsx("input",{value:C.url,onChange:A=>M(e=>({...e,url:A.target.value})),placeholder:Q("附件地址"),type:"url"}),Xg.jsx("div",{className:EI,children:Xg.jsx($Q,{onClick:async()=>{var A,e,t;C.url&&C.text&&a.editor.value&&(null==(e=(A=a.editor.value.commands).updateAttachment)||e.call(A,{url:C.url,text:C.text}),null==(t=w.current)||t.hidePopover())},disabled:!C.url||!C.text,children:Q("更新")})})]}):Xg.jsx(ro,{defaultValue:A.default,data:Y,children:A=>Xg.jsxs(Xg.Fragment,{children:["remote"===A&&Xg.jsxs("div",{className:qg(QI,{[aI]:I}),children:[Xg.jsx("input",{value:E.text,onChange:A=>l(e=>({...e,text:A.target.value})),placeholder:Q("附件名称"),type:"text"}),Xg.jsx("input",{value:E.url,onChange:A=>l(e=>({...e,url:A.target.value})),placeholder:Q("附件地址"),type:"url"}),Xg.jsx("div",{className:II,children:Xg.jsx($Q,{onClick:d,disabled:!E.url||!E.text,children:Q("插入")})})]}),"upload"===A&&Xg.jsxs("div",{className:qg(rI,{[aI]:I}),children:[Xg.jsx("input",{type:"file",accept:"*",onChange:y}),Xg.jsx(kr,{name:"kaitify-icon-upload"})]})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-attachment"})})},A.BackColorExtension=RA,A.BackColorMenu=function({colors:A=dI,...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),E=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isBackColor)?void 0:i.call(t,A))??!1},[a.editor]),l=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!a.editor.value.selection.collapsed()&&!a.editor.value.getFocusNodesBySelection("text").length||(!(!a.editor.value.selection.collapsed()||!(null==(i=(e=a.editor.value.commands).getAttachment)?void 0:i.call(e))&&!(null==(s=(B=a.editor.value.commands).getMath)?void 0:s.call(B)))||(!!(null==(n=(c=a.editor.value.commands).getCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]);return Xg.jsx(oI,{ref:w,disabled:l,active:!1,popover:!0,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},customPopover:Xg.jsxs("div",{className:qg(lI,{[yI]:I}),children:[Xg.jsx("div",{className:CI,children:Xg.jsxs($Q,{onClick:()=>{var A,e,t;a.editor.value&&(null==(e=(A=a.editor.value.commands).removeTextStyle)||e.call(A,["backgroundColor","background"]),null==(t=w.current)||t.hidePopover())},block:!0,large:!0,children:[Xg.jsx(kr,{name:"kaitify-icon-remove"}),Xg.jsx("span",{className:MI,children:Q("默认颜色")})]})}),Xg.jsx("div",{className:YI,children:A.map(A=>Xg.jsx("div",{className:qg(hI,{[FI]:E(A)}),children:Xg.jsx("div",{style:{background:A},onClick:()=>{return e=A,void(a.editor.value&&!(null==(i=(t=a.editor.value.commands).isBackColor)?void 0:i.call(t,e))&&(null==(s=(B=a.editor.value.commands).setBackColor)||s.call(B,e),null==(c=w.current)||c.hidePopover()));var e,t,i,B,s,c}})},A))})]}),children:Xg.jsx(kr,{name:"kaitify-icon-brush"})})},A.BlockquoteExtension=KA,A.BlockquoteMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).allBlockquote)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetBlockquote)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setBlockquote)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-quote"})})},A.BoldExtension=DA,A.BoldMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isBold)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetBold)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setBold)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-bold"})})},A.Bubble=jQ,A.Checkbox=Co,A.ClearFormatMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).clearFormat)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-format-clear"})})},A.CodeBlockExtension=yg,A.CodeBlockLanguagesMenu=function({languages:A=[...Yg],...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q}=eo(),I=e.useRef(null),w=e.useMemo(()=>[{label:Q("自动识别"),value:""},...A.map(A=>({label:A.charAt(0).toLocaleUpperCase()+A.slice(1),value:A}))],[A]),E=e.useMemo(()=>{var A,e,i;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!(null==(i=(e=a.editor.value.commands).getCodeBlock)?void 0:i.call(e))||(t.disabled??!1))},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;if(!(null==(e=a.editor.value)?void 0:e.selection.focused()))return!1;const B=null==(i=(t=a.editor.value.commands).getCodeBlock)?void 0:i.call(t);return!!B&&(""==A.value?!B.hasMarks()||!B.marks["kaitify-hljs"]:B.marks["kaitify-hljs"]===A.value)},[a.editor]),C=e.useMemo(()=>{var A;return(null==(A=a.editor.value)?void 0:A.selection.focused())?w.find(A=>l(A))??w[0]:w[0]},[a.editor,w]);return Xg.jsx(oI,{ref:I,disabled:E,active:!1,popover:!0,data:w,itemActive:l,onSelect:A=>{var e,t,i;null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).updateCodeBlockLanguage)||i.call(t,A.value)},shortcut:t.shortcut,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:(null==(B=t.popoverProps)?void 0:B.maxHeight)??240,minWidth:(null==(s=t.popoverProps)?void 0:s.minWidth)??80,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},children:(null==C?void 0:C.label)??""})},A.CodeBlockMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).allCodeBlock)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetCodeBlock)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setCodeBlock)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-code-block"})})},A.CodeExtension=zA,A.CodeMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).allCode)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g,o,r;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!!(null==(B=(i=t.editor.value.commands).hasAttachment)?void 0:B.call(i))||(!!(null==(c=(s=t.editor.value.commands).hasMath)?void 0:c.call(s))||(!!(null==(g=(n=t.editor.value.commands).hasLink)?void 0:g.call(n))||(!!(null==(r=(o=t.editor.value.commands).hasCodeBlock)?void 0:r.call(o))||(A.disabled??!1)))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetCode)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setCode)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-code"})})},A.ColorExtension=fA,A.ColorMenu=function({colors:A=zI,...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),E=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!a.editor.value.selection.collapsed()&&!a.editor.value.getFocusNodesBySelection("text").length||(!(!a.editor.value.selection.collapsed()||!(null==(i=(e=a.editor.value.commands).getAttachment)?void 0:i.call(e))&&!(null==(s=(B=a.editor.value.commands).getMath)?void 0:s.call(B)))||(!!(null==(n=(c=a.editor.value.commands).getCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isColor)?void 0:i.call(t,A))??!1},[a.editor]);return Xg.jsx(oI,{ref:w,disabled:E,active:!1,popover:!0,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},customPopover:Xg.jsx(Xg.Fragment,{children:Xg.jsxs("div",{className:qg(NI,{[pI]:I}),children:[Xg.jsx("div",{className:DI,children:Xg.jsxs($Q,{onClick:()=>{var A,e,t,i;null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).removeTextStyle)||t.call(e,["color"]),null==(i=w.current)||i.hidePopover()},block:!0,large:!0,children:[Xg.jsx(kr,{name:"kaitify-icon-remove"}),Xg.jsx("span",{className:UI,children:Q("默认颜色")})]})}),Xg.jsx("div",{className:uI,children:A.map(A=>Xg.jsx("div",{className:qg(mI,{[GI]:l(A)}),children:Xg.jsx("div",{style:{background:A},onClick:()=>{var e,t,i,B,s;l(e=A)||(null==(B=null==(t=a.editor.value)?void 0:(i=t.commands).setColor)||B.call(i,e),null==(s=w.current)||s.hidePopover())}})},A))})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-font-color"})})},A.DecreaseIndentMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).canUseIndent)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).setDecreaseIndent)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-indent-decrease"})})},A.Divider=function(){const{dark:A}=eo();return Xg.jsx("div",{className:qg(to,{[io]:A})})},A.Editor=Jg,A.EmojiMenu=function({data:A=fI,...t}){var i,B,s,c,n,g,o,r;const{state:a}=eo(),Q=e.useRef(null),I=e.useMemo(()=>{var A;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(t.disabled??!1)},[a.editor,t.disabled]);return Xg.jsx(oI,{ref:Q,disabled:I,active:!1,popover:!0,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},customPopover:Xg.jsx("div",{className:jI,children:A.map((A,e)=>Xg.jsx("div",{className:xI,children:Xg.jsx("div",{onClick:()=>{return e=A,null==(t=a.editor.value)||t.insertText(e),null==(i=a.editor.value)||i.updateView(),void(null==(B=Q.current)||B.hidePopover());var e,t,i,B},children:A})},e))}),children:Xg.jsx(kr,{name:"kaitify-icon-emoji"})})},A.Extension=QA,A.FontFamilyExtension=xA,A.FontFamilyMenu=function({data:A=[{label:"黑体",value:"黑体,黑体-简"},{label:"华文仿宋",value:"华文仿宋"},{label:"楷体",value:"楷体,楷体-简"},{label:"华文楷体",value:"华文楷体"},{label:"宋体",value:"宋体,宋体-简"},{label:"Arial",value:"Arial"},{label:"Consolas",value:"Consolas,monospace"}],...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q}=eo(),I=e.useRef(null),w=e.useMemo(()=>[{label:Q("默认字体"),value:""},...A],[A]),E=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!a.editor.value.selection.collapsed()&&!a.editor.value.getFocusNodesBySelection("text").length||(!(!a.editor.value.selection.collapsed()||!(null==(i=(e=a.editor.value.commands).getAttachment)?void 0:i.call(e))&&!(null==(s=(B=a.editor.value.commands).getMath)?void 0:s.call(B)))||(!!(null==(n=(c=a.editor.value.commands).getCodeBlock)?void 0:n.call(c))||t.disabled)))},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isFontFamily)?void 0:i.call(t,A.value))??!1},[a.editor]),C=e.useMemo(()=>w.find(A=>l(A))??w[0],[w,l]);return Xg.jsx(oI,{ref:I,disabled:E,active:!1,popover:!0,data:w,itemActive:l,shortcut:t.shortcut,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:(null==(B=t.popoverProps)?void 0:B.maxHeight)??240,minWidth:(null==(s=t.popoverProps)?void 0:s.minWidth)??90,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},onSelect:A=>{var e,t,i,B,s,c,n;""==A.value?null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).removeTextStyle)||i.call(t,["fontFamily"]):l(A)?null==(B=a.editor.value)||B.updateRealSelection():null==(n=null==(s=a.editor.value)?void 0:(c=s.commands).setFontFamily)||n.call(c,A.value)},children:C.label??""})},A.FontSizeExtension=jA,A.FontSizeMenu=function({data:A=[{label:"12px",value:"12px"},{label:"14px",value:"14px"},{label:"16px",value:"16px"},{label:"18px",value:"18px"},{label:"20px",value:"20px"},{label:"24px",value:"24px"},{label:"28px",value:"28px"},{label:"32px",value:"32px"},{label:"36px",value:"36px"},{label:"40px",value:"40px"}],...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q}=eo(),I=e.useRef(null),w=e.useMemo(()=>[{label:Q("默认字号"),value:""},...A],[A]),E=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!a.editor.value.selection.collapsed()&&!a.editor.value.getFocusNodesBySelection("text").length||(!(!a.editor.value.selection.collapsed()||!(null==(i=(e=a.editor.value.commands).getAttachment)?void 0:i.call(e))&&!(null==(s=(B=a.editor.value.commands).getMath)?void 0:s.call(B)))||(!!(null==(n=(c=a.editor.value.commands).getCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isFontSize)?void 0:i.call(t,A.value))??!1},[a.editor]),C=e.useMemo(()=>w.find(A=>l(A))??w[0],[w,l]);return Xg.jsx(oI,{ref:I,disabled:E,active:!1,popover:!0,data:w,itemActive:l,shortcut:t.shortcut,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:(null==(B=t.popoverProps)?void 0:B.maxHeight)??240,minWidth:(null==(s=t.popoverProps)?void 0:s.minWidth)??80,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},onSelect:A=>{var e,t,i,B,s,c,n;""==A.value?null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).removeTextStyle)||i.call(t,["fontSize"]):l(A)?null==(B=a.editor.value)||B.updateRealSelection():null==(n=null==(s=a.editor.value)?void 0:(c=s.commands).setFontSize)||n.call(c,A.value)},children:C.label??""})},A.FullScreenMenu=function({zIndex:A=100,...t}){const{state:i}=eo(),B=e.useRef(null),[s,c]=e.useState(!1),n=e.useMemo(()=>!!B.current&&s,[B.current,s]),g=e.useMemo(()=>{var A;return!(null==(A=i.editor.value)?void 0:A.selection.focused())||(t.disabled??!1)},[i.editor,t.disabled]);return e.useEffect(()=>(B.current=document.body.querySelector(t.target),()=>{B.current=null}),[]),Xg.jsx(oI,{disabled:g,active:n,onOperate:()=>{n?B.current&&(B.current.style.setProperty("position",""),B.current.style.setProperty("left",""),B.current.style.setProperty("top",""),B.current.style.setProperty("z-index",""),B.current.style.setProperty("width",""),B.current.style.setProperty("height",""),c(!1)):B.current&&(B.current.style.setProperty("position","fixed","important"),B.current.style.setProperty("left","0px","important"),B.current.style.setProperty("top","0px","important"),B.current.style.setProperty("z-index",`${A}`,"important"),B.current.style.setProperty("width","100vw","important"),B.current.style.setProperty("height","100vh","important"),c(!0))},shortcut:t.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-full-screen"})})},A.HeadingExtension=VA,A.HeadingMenu=function(A){var t,i,B,s,c,n,g,o;const{state:r,t:a}=eo(),Q=e.useRef(null),I=e.useMemo(()=>{const e=[{label:a("一级标题"),value:1},{label:a("二级标题"),value:2},{label:a("三级标题"),value:3},{label:a("四级标题"),value:4},{label:a("五级标题"),value:5},{label:a("六级标题"),value:6}];return[...A.data||e,{label:a("正文"),value:0}]},[A.data]),w={0:"14px",1:"24px",2:"22px",3:"20px",4:"18px",5:"16px",6:"15px"},E=e.useMemo(()=>{var e;return!(null==(e=r.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[r.editor,A.disabled]),l=e.useCallback(A=>{var e,t,i;return 0===A?!(l(1)||l(2)||l(3)||l(4)||l(5)||l(6)):(null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).allHeading)?void 0:i.call(t,A))??!1},[r.editor]),C=e.useMemo(()=>I.find(A=>l(A.value))??I[I.length-1],[I,l]);return Xg.jsx(oI,{ref:Q,disabled:E,active:!1,popover:!0,data:I,itemActive:A=>l(A.value),shortcut:A.shortcut,popoverProps:{width:null==(t=A.popoverProps)?void 0:t.width,maxHeight:(null==(i=A.popoverProps)?void 0:i.maxHeight)??240,minWidth:(null==(B=A.popoverProps)?void 0:B.minWidth)??120,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex},onSelect:A=>{var e,t,i,B,s,c;l(A.value)?null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).unsetHeading)||i.call(t,A.value):null==(c=null==(B=r.editor.value)?void 0:(s=B.commands).setHeading)||c.call(s,A.value)},customLabel:A=>Xg.jsx("span",{style:{fontSize:w[A.value]},children:A.label}),children:C.label??""})},A.History=u,A.HistoryExtension=MA,A.HljsLanguages=Yg,A.HorizontalExtension=TA,A.HorizontalMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B,s,c,n,g,o,r;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!!(null==(B=(i=t.editor.value.commands).hasAttachment)?void 0:B.call(i))||(!!(null==(c=(s=t.editor.value.commands).hasMath)?void 0:c.call(s))||(!!(null==(g=(n=t.editor.value.commands).hasLink)?void 0:g.call(n))||(!!(null==(r=(o=t.editor.value.commands).hasCodeBlock)?void 0:r.call(o))||(A.disabled??!1)))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).setHorizontal)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-separator"})})},A.Icon=kr,A.ImageExtension=dA,A.ImageMenu=function({tabs:A={data:["remote","upload"],default:"remote"},...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),[E,l]=e.useState({src:"",alt:""}),[C,M]=e.useState({src:"",alt:""}),Y=e.useMemo(()=>A.data.map(A=>[{label:Q("远程地址"),value:"remote"},{label:Q("本地上传"),value:"upload"}].find(e=>e.value==A)),[A.data]),h=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!!(null==(i=(e=a.editor.value.commands).hasAttachment)?void 0:i.call(e))||(!!(null==(s=(B=a.editor.value.commands).hasMath)?void 0:s.call(B))||(!!(null==(n=(c=a.editor.value.commands).hasCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]),F=e.useMemo(()=>{var A,e,t;return!!(null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).getImage)?void 0:t.call(e))},[a.editor]),y=async A=>{var e,i,B,s,c;const n=null==(e=A.currentTarget.files)?void 0:e[0];if(!n)return;const g="function"==typeof t.customUpload?await t.customUpload(n):await gQ.dataFileToBase64(n);g&&(null==(s=null==(i=a.editor.value)?void 0:(B=i.commands).setImage)||s.call(B,{src:g,alt:n.name||Q("图片"),width:"number"==typeof t.width?`${t.width}px`:t.width}),null==(c=w.current)||c.hidePopover())},d=async()=>{var A,e,i,B;E.src&&(null==(i=null==(A=a.editor.value)?void 0:(e=A.commands).setImage)||i.call(e,{src:E.src,alt:E.alt,width:"number"==typeof t.width?`${t.width}px`:t.width}),null==(B=w.current)||B.hidePopover())};return Xg.jsx(oI,{ref:w,disabled:h,active:F,popover:!0,popoverProps:{width:(null==(i=t.popoverProps)?void 0:i.width)??300,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex,onShowing:()=>{var A,e,t;const i=null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).getImage)?void 0:t.call(e);i?M({src:i.marks.src,alt:i.marks.alt||""}):l({src:"",alt:""})}},customPopover:F?Xg.jsxs("div",{className:qg(bI,{[HI]:I}),children:[Xg.jsx("input",{value:C.alt,onChange:A=>M(e=>({...e,alt:A.target.value})),placeholder:Q("图片名称"),type:"text"}),Xg.jsx("input",{value:C.src,onChange:A=>M(e=>({...e,src:A.target.value})),placeholder:Q("图片地址"),type:"url"}),Xg.jsx("div",{className:LI,children:Xg.jsx($Q,{onClick:async()=>{var A,e,t,i;C.src&&(null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).updateImage)||t.call(e,{src:C.src,alt:C.alt}),null==(i=w.current)||i.hidePopover())},disabled:!C.src,children:Q("更新")})})]}):Xg.jsx(ro,{defaultValue:A.default,data:Y,children:A=>Xg.jsxs(Xg.Fragment,{children:["remote"===A&&Xg.jsxs("div",{className:qg(kI,{[HI]:I}),children:[Xg.jsx("input",{value:E.alt,onChange:A=>l(e=>({...e,alt:A.target.value})),placeholder:Q("图片名称"),type:"text"}),Xg.jsx("input",{value:E.src,onChange:A=>l(e=>({...e,src:A.target.value})),placeholder:Q("图片地址"),type:"url"}),Xg.jsx("div",{className:JI,children:Xg.jsx($Q,{onClick:d,disabled:!E.src,children:Q("插入")})})]}),"upload"===A&&Xg.jsxs("div",{className:qg(RI,{[HI]:I}),children:[Xg.jsx("input",{type:"file",accept:"*",onChange:y}),Xg.jsx(kr,{name:"kaitify-icon-upload"})]})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-image"})})},A.IncreaseIndentMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).canUseIndent)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).setIncreaseIndent)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-indent-increase"})})},A.IndentExtension=SA,A.ItalicExtension=UA,A.ItalicMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isItalic)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetItalic)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setItalic)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-italic"})})},A.KNode=D,A.LineHeightExtension=LA,A.LineHeightMenu=function({data:A=[{label:"1",value:1},{label:"1.15",value:1.15},{label:"2",value:2},{label:"2.5",value:2.5},{label:"3",value:3}],...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q}=eo(),I=e.useRef(null),w=e.useMemo(()=>[{label:Q("默认行高"),value:""},...A],[A]),E=e.useMemo(()=>{var A;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(t.disabled??!1)},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isLineHeight)?void 0:i.call(t,A.value))??!1},[a.editor]),C=e.useMemo(()=>w.find(A=>l(A))||w[0],[w,l]);return Xg.jsx(oI,{ref:I,disabled:E,active:!1,popover:!0,data:w,itemActive:l,shortcut:t.shortcut,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:(null==(B=t.popoverProps)?void 0:B.maxHeight)??240,minWidth:(null==(s=t.popoverProps)?void 0:s.minWidth)??80,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},onSelect:A=>{var e,t,i,B;l(A)?null==(e=a.editor.value)||e.updateRealSelection():null==(B=null==(t=a.editor.value)?void 0:(i=t.commands).setLineHeight)||B.call(i,A.value)},children:C.label??""})},A.LinkExtension=HA,A.LinkMenu=function(A){var t,i,B,s,c,n,g,o,r,a;const{state:Q,t:I,dark:w}=eo(),E=e.useRef(null),[l,C]=e.useState({href:"",text:"",newOpen:!1}),[M,Y]=e.useState({href:"",newOpen:!1}),h=e.useMemo(()=>{var A,e,t;return!!(null==(t=null==(A=Q.editor.value)?void 0:(e=A.commands).getLink)?void 0:t.call(e))},[Q.editor]),F=e.useMemo(()=>{var e,t,i,B,s,c,n,g,o;return!(null==(e=Q.editor.value)?void 0:e.selection.focused())||(!!(null==(i=(t=Q.editor.value.commands).hasAttachment)?void 0:i.call(t))||(!!(null==(s=(B=Q.editor.value.commands).hasMath)?void 0:s.call(B))||(!(!(null==(n=(c=Q.editor.value.commands).hasLink)?void 0:n.call(c))||h)||(!!(null==(o=(g=Q.editor.value.commands).hasCodeBlock)?void 0:o.call(g))||(A.disabled??!1)))))},[Q.editor,A.disabled]);return Xg.jsx(oI,{ref:E,disabled:F,active:h,popover:!0,popoverProps:{width:(null==(t=A.popoverProps)?void 0:t.width)??300,maxHeight:null==(i=A.popoverProps)?void 0:i.maxHeight,minWidth:null==(B=A.popoverProps)?void 0:B.minWidth,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex,onShow:()=>{var A,e,t;const i=null==(t=null==(A=Q.editor.value)?void 0:(e=A.commands).getLink)?void 0:t.call(e);i?Y({href:i.marks.href,newOpen:"_blank"==i.marks.target}):C({href:"",text:"",newOpen:!1})}},customPopover:Xg.jsx("div",{className:qg(SI,{[WI]:w}),children:h?Xg.jsxs(Xg.Fragment,{children:[Xg.jsx("input",{value:M.href,onChange:A=>Y(e=>({...e,href:A.target.value})),placeholder:I("链接地址"),type:"url"}),Xg.jsxs("div",{className:TI,children:[Xg.jsx(Co,{checked:M.newOpen,onChange:A=>Y(e=>({...e,newOpen:A})),label:I("新窗口打开")}),Xg.jsx($Q,{onClick:async()=>{var A,e,t,i;M.href&&(null==(t=null==(A=Q.editor.value)?void 0:(e=A.commands).updateLink)||t.call(e,{href:M.href,newOpen:M.newOpen}),null==(i=E.current)||i.hidePopover())},disabled:!M.href,children:I("更新")})]})]}):Xg.jsxs(Xg.Fragment,{children:[(null==(r=Q.editor.value)?void 0:r.selection.collapsed())&&Xg.jsx("input",{value:l.text,onChange:A=>C(e=>({...e,text:A.target.value})),placeholder:I("链接文字"),type:"text"}),Xg.jsx("input",{value:l.href,onChange:A=>C(e=>({...e,href:A.target.value})),placeholder:I("链接地址"),type:"url"}),Xg.jsxs("div",{className:TI,children:[Xg.jsx(Co,{checked:l.newOpen,onChange:A=>C(e=>({...e,newOpen:A})),label:I("新窗口打开")}),Xg.jsx($Q,{onClick:async()=>{var A,e,t,i,B,s,c;if(l.href){if(null==(A=Q.editor.value)?void 0:A.selection.collapsed()){if(!l.text)return;null==(t=(e=Q.editor.value.commands).setLink)||t.call(e,{href:l.href,text:l.text,newOpen:l.newOpen})}else null==(s=null==(i=Q.editor.value)?void 0:(B=i.commands).setLink)||s.call(B,{href:l.href,newOpen:l.newOpen});null==(c=E.current)||c.hidePopover()}},disabled:!l.href||(null==(a=Q.editor.value)?void 0:a.selection.collapsed())&&!l.text,children:I("插入")})]})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-link"})})},A.LinkUnsetMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getLink)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).unsetLink)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-unlink"})})},A.ListExtension=qA,A.MathExtension=qs,A.MathMenu=function(A){var t,i,B,s,c,n,g,o;const{state:r,t:a,dark:Q}=eo(),I=e.useRef(null),[w,E]=e.useState(""),l=e.useMemo(()=>{var A,e,t;return!!(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).getMath)?void 0:t.call(e))},[r.editor]),C=e.useMemo(()=>{var e,t,i,B,s,c,n,g,o;return!(null==(e=r.editor.value)?void 0:e.selection.focused())||(!!(null==(i=(t=r.editor.value.commands).hasAttachment)?void 0:i.call(t))||(!!(null==(s=(B=r.editor.value.commands).hasLink)?void 0:s.call(B))||(!!(null==(n=(c=r.editor.value.commands).hasCodeBlock)?void 0:n.call(c))||(!(!(null==(o=(g=r.editor.value.commands).hasMath)?void 0:o.call(g))||l)||(A.disabled??!1)))))},[r.editor,A.disabled]);return Xg.jsx(oI,{ref:I,disabled:C,active:l,popover:!0,popoverProps:{width:(null==(t=A.popoverProps)?void 0:t.width)??300,maxHeight:null==(i=A.popoverProps)?void 0:i.maxHeight,minWidth:null==(B=A.popoverProps)?void 0:B.minWidth,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex,onShowing:()=>{var A,e,t;const i=null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).getMath)?void 0:t.call(e);E(i&&i.marks["kaitify-math"]||"")}},customPopover:Xg.jsxs("div",{className:qg(KI,{[OI]:Q}),children:[Xg.jsx("textarea",{className:vI,value:w,onChange:A=>E(A.target.value),placeholder:a("输入Latex数学公式")}),Xg.jsx("div",{className:VI,children:l?Xg.jsx($Q,{disabled:!w,onClick:async()=>{var A,e,t,i;w&&(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).updateMath)||t.call(e,w),null==(i=I.current)||i.hidePopover())},children:a("更新")},"update"):Xg.jsx($Q,{disabled:!w,onClick:()=>{var A,e,t,i;w&&(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).setMath)||t.call(e,w),null==(i=I.current)||i.hidePopover())},children:a("插入")},"insert")})]}),children:Xg.jsx(kr,{name:"kaitify-icon-mathformula"})})},A.Menu=oI,A.NODE_MARK=C,A.OrderedListMenu=function(A){var t,i,B,s,c,n,g,o;const{state:r}=eo(),a=e.useRef(null),Q=e.useMemo(()=>{var e;return!(null==(e=r.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[r.editor,A.disabled]),I=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).allList)?void 0:i.call(t,{ordered:!0,listType:A}))??!1},[r.editor]),w=e.useMemo(()=>{var A,e,t;return(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).allList)?void 0:t.call(e,{ordered:!0}))??!1},[r.editor]);return Xg.jsx(oI,{ref:a,disabled:Q,active:w,popover:!0,popoverProps:{width:(null==(t=A.popoverProps)?void 0:t.width)??160,maxHeight:null==(i=A.popoverProps)?void 0:i.maxHeight,minWidth:null==(B=A.popoverProps)?void 0:B.minWidth,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex},customPopover:Xg.jsx("div",{className:PI,children:["decimal","lower-alpha","upper-alpha","lower-roman","upper-roman","lower-greek","cjk-ideographic"].map(A=>Xg.jsx("div",{className:XI,children:Xg.jsx($Q,{className:ZI,active:I(A),onClick:()=>(A=>{var e,t,i,B,s,c,n;I(A)?null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).unsetList)||i.call(t,{ordered:!0,listType:A}):null==(c=null==(B=r.editor.value)?void 0:(s=B.commands).setList)||c.call(s,{ordered:!0,listType:A}),null==(n=a.current)||n.hidePopover()})(A),children:Xg.jsx(kr,{name:"kaitify-icon-list-"+A})})},A))}),children:Xg.jsx(kr,{name:"kaitify-icon-list-decimal"})})},A.RedoMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).canRedo)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).redo)||i.call(e)},children:Xg.jsx(kr,{name:"kaitify-icon-redo"})})},A.Selection=U,A.StrikethroughExtension=uA,A.StrikethroughMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isStrikethrough)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetStrikethrough)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setStrikethrough)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-strikethrough"})})},A.SubscriptExtension=pA,A.SubscriptMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isSubscript)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetSubscript)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setSubscript)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-subscript"})})},A.SuperscriptExtension=GA,A.SuperscriptMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isSuperscript)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetSuperscript)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setSuperscript)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-superscript"})})},A.TableAddColumnMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B;null==(B=null==(e=t.editor.value)?void 0:(i=e.commands).addTableColumn)||B.call(i,A.type??"right")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:`kaitify-icon-insert-column-${A.type??"right"}`})})},A.TableAddRowMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B;null==(B=null==(e=t.editor.value)?void 0:(i=e.commands).addTableRow)||B.call(i,A.type??"bottom")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:`kaitify-icon-insert-row-${A.type??"bottom"}`})})},A.TableDeleteColumnMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).deleteTableColumn)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-delete-column"})})},A.TableDeleteRowMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).deleteTableRow)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-delete-row"})})},A.TableExtension=zg,A.TableMenu=function({maxRows:A=10,maxColumns:t=10,...i}){var B,s,c,n,g,o,r,a;const{state:Q,dark:I}=eo(),w=e.useRef(null),[E,l]=e.useState((()=>{const e=[];for(let i=1;i<=A;i++){let A=[];for(let e=1;e<=t;e++)A.push({x:i,y:e,inside:!1});e.push(A)}return e})()),C=e.useMemo(()=>E.flat().filter(A=>A.inside).sort((A,e)=>A.x>e.x&&A.y>e.y||A.x>e.x||A.y>e.y?-1:1)[0],[E]),M=e.useMemo(()=>{var A,e,t,B,s,c,n,g,o,r,a;return!(null==(A=Q.editor.value)?void 0:A.selection.focused())||(!!(null==(t=(e=Q.editor.value.commands).hasTable)?void 0:t.call(e))||(!!(null==(s=(B=Q.editor.value.commands).hasCodeBlock)?void 0:s.call(B))||(!!(null==(n=(c=Q.editor.value.commands).hasAttachment)?void 0:n.call(c))||(!!(null==(o=(g=Q.editor.value.commands).hasMath)?void 0:o.call(g))||(!!(null==(a=(r=Q.editor.value.commands).hasCodeBlock)?void 0:a.call(r))||(i.disabled??!1))))))},[Q.editor,i.disabled]);return Xg.jsx(oI,{ref:w,disabled:M,active:!1,popover:!0,popoverProps:{width:null==(B=i.popoverProps)?void 0:B.width,maxHeight:null==(s=i.popoverProps)?void 0:s.maxHeight,minWidth:null==(c=i.popoverProps)?void 0:c.minWidth,animation:null==(n=i.popoverProps)?void 0:n.animation,arrow:null==(g=i.popoverProps)?void 0:g.arrow,placement:null==(o=i.popoverProps)?void 0:o.placement,trigger:null==(r=i.popoverProps)?void 0:r.trigger,zIndex:null==(a=i.popoverProps)?void 0:a.zIndex},customPopover:Xg.jsxs("div",{className:qg(qI,{[Aw]:I}),children:[Xg.jsx("table",{children:Xg.jsx("tbody",{children:E.map((e,i)=>Xg.jsx("tr",{children:e.map((e,B)=>Xg.jsx("td",{className:qg({[_I]:e.inside}),onMouseEnter:()=>(A=>{for(let e=0;e<E.length;e++){const t=E[e];for(let i=0;i<t.length;i++)l(B=>[...B.slice(0,e),[...B[e].slice(0,i),{...B[e][i],inside:t[i].x<=A.x&&t[i].y<=A.y},...B[e].slice(i+1)],...B.slice(e+1)])}})(e),onClick:()=>(async e=>{var i,B,s,c;A<1||t<1||(null==(s=null==(i=Q.editor.value)?void 0:(B=i.commands).setTable)||s.call(B,{rows:e.x,columns:e.y}),null==(c=w.current)||c.hidePopover())})(e),children:Xg.jsx("span",{})},`${i}-${B}`))},i))})}),C&&Xg.jsxs("div",{className:$I,children:[C.x," x ",C.y]})]}),children:Xg.jsx(kr,{name:"kaitify-icon-table"})})},A.TableMergeCellMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B,s,c;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(!(null==(c=(s=t.editor.value.commands).canMergeTableCells)?void 0:c.call(s,A.direction))||(A.disabled??!1)))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B;null==(B=null==(e=t.editor.value)?void 0:(i=e.commands).mergeTableCell)||B.call(i,A.direction)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:`kaitify-icon-merge-cells-${A.direction}`})})},A.TableUnsetMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).unsetTable)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-delete-table"})})},A.Tabs=ro,A.TaskExtension=$A,A.TaskMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).allTask)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetTask)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setTask)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-task"})})},A.TextExtension=CA,A.UnderlineExtension=mA,A.UnderlineMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isUnderline)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetUnderline)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setUnderline)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-underline"})})},A.UndoMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).canUndo)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).undo)||i.call(e)},children:Xg.jsx(kr,{name:"kaitify-icon-undo"})})},A.UnorderedListMenu=function(A){var t,i,B,s,c,n,g,o;const{state:r}=eo(),a=e.useRef(null),Q=e.useMemo(()=>{var e;return!(null==(e=r.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[r.editor,A.disabled]),I=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).allList)?void 0:i.call(t,{ordered:!1,listType:A}))??!1},[r.editor]),w=e.useMemo(()=>{var A,e,t;return(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).allList)?void 0:t.call(e,{ordered:!1}))??!1},[r.editor]);return Xg.jsx(oI,{ref:a,disabled:Q,active:w,popover:!0,popoverProps:{width:(null==(t=A.popoverProps)?void 0:t.width)??160,maxHeight:null==(i=A.popoverProps)?void 0:i.maxHeight,minWidth:null==(B=A.popoverProps)?void 0:B.minWidth,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex},customPopover:Xg.jsx("div",{className:ew,children:["disc","square","circle"].map(A=>Xg.jsx("div",{className:tw,children:Xg.jsx($Q,{large:!0,active:I(A),onClick:()=>(A=>{var e,t,i,B,s,c,n;I(A)?null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).unsetList)||i.call(t,{ordered:!1,listType:A}):null==(c=null==(B=r.editor.value)?void 0:(s=B.commands).setList)||c.call(s,{ordered:!1,listType:A}),null==(n=a.current)||n.hidePopover()})(A),children:Xg.jsx(kr,{name:"kaitify-icon-list-"+A})})},A))}),children:Xg.jsx(kr,{name:"kaitify-icon-list-disc"})})},A.VideoControlsMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;const B=null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).getVideo)?void 0:i.call(e);return!!B&&(B.hasMarks()&&B.marks.hasOwnProperty("controls"))},[t.editor]),B=e.useMemo(()=>{var e,i,B;return!(null==(B=null==(e=t.editor.value)?void 0:(i=e.commands).getVideo)?void 0:B.call(i))||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).updateVideo)||B.call(e,{controls:!1}):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).updateVideo)||n.call(c,{controls:!0})},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-controls"})})},A.VideoExtension=NA,A.VideoLoopMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;const B=null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).getVideo)?void 0:i.call(e);return!!B&&(B.hasMarks()&&B.marks.hasOwnProperty("loop"))},[t.editor]),B=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getVideo)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).updateVideo)||B.call(e,{loop:!1}):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).updateVideo)||n.call(c,{loop:!0})},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-loop"})})},A.VideoMenu=function({tabs:A={data:["remote","upload"],default:"remote"},...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),[E,l]=e.useState({src:"",autoplay:!1}),C=e.useMemo(()=>A.data.map(A=>[{label:Q("远程地址"),value:"remote"},{label:Q("本地上传"),value:"upload"}].find(e=>e.value==A)),[A]),M=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!!(null==(i=(e=a.editor.value.commands).hasAttachment)?void 0:i.call(e))||(!!(null==(s=(B=a.editor.value.commands).hasMath)?void 0:s.call(B))||(!!(null==(n=(c=a.editor.value.commands).hasCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]),Y=async A=>{var e,i,B,s,c;const n=null==(e=A.currentTarget.files)?void 0:e[0];if(!n)return;const g="function"==typeof t.customUpload?await t.customUpload(n):await gQ.dataFileToBase64(n);g&&(null==(s=null==(i=a.editor.value)?void 0:(B=i.commands).setVideo)||s.call(B,{src:g,width:"number"==typeof t.width?`${t.width}px`:t.width,autoplay:E.autoplay}),null==(c=w.current)||c.hidePopover())},h=async()=>{var A,e,i,B;E.src&&(null==(i=null==(A=a.editor.value)?void 0:(e=A.commands).setVideo)||i.call(e,{src:E.src,width:"number"==typeof t.width?`${t.width}px`:t.width,autoplay:E.autoplay}),null==(B=w.current)||B.hidePopover())};return Xg.jsx(oI,{ref:w,disabled:M,active:!1,popover:!0,popoverProps:{width:(null==(i=t.popoverProps)?void 0:i.width)??300,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},customPopover:Xg.jsx(ro,{defaultValue:A.default,data:C,children:A=>Xg.jsxs(Xg.Fragment,{children:["remote"===A&&Xg.jsxs("div",{className:qg(cw,{[gw]:I}),children:[Xg.jsx("input",{value:E.src,onChange:A=>l(e=>({...e,src:A.target.value})),placeholder:Q("视频地址"),type:"url"}),Xg.jsxs("div",{className:nw,children:[Xg.jsx(Co,{checked:E.autoplay,onChange:A=>l(e=>({...e,autoplay:A})),label:Q("是否自动播放")}),Xg.jsx($Q,{onClick:h,disabled:!E.src,children:Q("插入")})]})]}),"upload"===A&&Xg.jsxs("div",{className:iw,children:[Xg.jsxs("div",{className:Bw,children:[Xg.jsx("input",{type:"file",accept:"video/*",onChange:Y}),Xg.jsx(kr,{name:"kaitify-icon-upload"})]}),Xg.jsx("div",{className:sw,children:Xg.jsx(Co,{checked:E.autoplay,onChange:A=>l(e=>({...e,autoplay:A})),label:Q("是否自动播放")})})]})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-video"})})},A.VideoMutedMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;const B=null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).getVideo)?void 0:i.call(e);return!!B&&(B.hasMarks()&&B.marks.hasOwnProperty("muted"))},[t.editor]),B=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getVideo)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).updateVideo)||B.call(e,{muted:!1}):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).updateVideo)||n.call(c,{muted:!0})},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-muted"})})},A.WrapDownMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e;const i=null==(e=t.editor.value)?void 0:e.getMatchNodeBySelection(A.match);return!(i&&i.isBlock()&&!i.void&&!i.fixed&&!i.nested)||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B,s,c;if(!A.match)return;const n=null==(e=t.editor.value)?void 0:e.getMatchNodeBySelection(A.match);if(!n||!n.isBlock()||n.void||n.fixed||n.nested)return;const g=D.create({type:"block",tag:null==(i=t.editor.value)?void 0:i.blockRenderTag,children:[{type:"closed",tag:"br"}]});null==(B=t.editor.value)||B.addNodeAfter(g,n),null==(s=t.editor.value)||s.setSelectionBefore(g,"all"),null==(c=t.editor.value)||c.updateView()},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-wrap-down"})})},A.WrapUpMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e;if(!(null==(e=t.editor.value)?void 0:e.selection.focused())||!A.match)return!0;const i=t.editor.value.getMatchNodeBySelection(A.match);return!(i&&i.isBlock()&&!i.void&&!i.fixed&&!i.nested)||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B,s,c;if(!A.match)return;const n=null==(e=t.editor.value)?void 0:e.getMatchNodeBySelection(A.match);if(!n||!n.isBlock()||n.void||n.fixed||n.nested)return;const g=D.create({type:"block",tag:null==(i=t.editor.value)?void 0:i.blockRenderTag,children:[{type:"closed",tag:"br"}]});null==(B=t.editor.value)||B.addNodeBefore(g,n),null==(s=t.editor.value)||s.setSelectionBefore(g,"all"),null==(c=t.editor.value)||c.updateView()},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-wrap-up"})})},A.Wrapper=vr,A.getHljsHtml=hg,A.getNodeRenderOptions=M,A.useEditor=eo,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
7
+ !function(A){!function(){var e={}.hasOwnProperty;function t(){for(var A="",e=0;e<arguments.length;e++){var t=arguments[e];t&&(A=B(A,i(t)))}return A}function i(A){if("string"==typeof A||"number"==typeof A)return A;if("object"!=typeof A)return"";if(Array.isArray(A))return t.apply(null,A);if(A.toString!==Object.prototype.toString&&!A.toString.toString().includes("[native code]"))return A.toString();var i="";for(var s in A)e.call(A,s)&&A[s]&&(i=B(i,s));return i}function B(A,e){return e?A?A+" "+e:A+e:A}A.exports?(t.default=t,A.exports=t):window.classNames=t}()}(Zg);const qg=bg(Zg.exports),_g={"en-US":{"本地上传":"Local Upload","远程地址":"Remote Address","附件名称":"Attachment Name","附件地址":"Attachment Address","附件":"Attachment","插入":"Insert","更新":"Update","默认颜色":"Default Color","默认字体":"Default Font","默认字号":"Default Font Size","默认行高":"Default Line Height","正文":"Paragraph","图片名称":"Image Name","图片地址":"Image Address","图片":"Image","链接地址":"Link Address","新窗口打开":"New Window","链接文字":"Link Text","是否自动播放":"AutoPlay","视频地址":"Video Address","输入Latex数学公式":"Enter Latex Mathematical Formulas","一级标题":"Heading 1","二级标题":"Heading 2","三级标题":"Heading 3","四级标题":"Heading 4","五级标题":"Heading 5","六级标题":"Heading 6","自动识别":"Auto Detection"},"ko-KR":{"本地上传":"로컬 업로드","远程地址":"원격 주소","附件名称":"첨부 파일 이름","附件地址":"첨부 파일 주소","附件":"첨부 파일","插入":"삽입","更新":"업데이트","默认颜色":"기본 색상","默认字体":"기본 글꼴","默认字号":"기본 글꼴 크기","默认行高":"기본 줄높이","正文":"본문","图片名称":"이미지 이름","图片地址":"이미지 주소","图片":"이미지","链接地址":"링크 주소","新窗口打开":"새 창에서 열기","链接文字":"링크 텍스트","是否自动播放":"자동 재생","视频地址":"비디오 주소","输入Latex数学公式":"LaTeX 수식을 입력","一级标题":"제목 1","二级标题":"제목 2","三级标题":"제목 3","四级标题":"제목 4","五级标题":"제목 5","六级标题":"제목 6","自动识别":"자동감지"},"ja-JP":{"本地上传":"ローカルアップロード","远程地址":"リモートアドレス","附件名称":"添付ファイル名","附件地址":"添付ファイルアドレス","附件":"添付ファイル","插入":"挿入","更新":"更新","默认颜色":"デフォルトカラー","默认字体":"デフォルトフォント","默认字号":"デフォルトフォントサイズ","默认行高":"デフォルト行間","正文":"本文","图片名称":"画像名","图片地址":"画像アドレス","图片":"画像","链接地址":"リンクアドレス","新窗口打开":"新しいウィンドウで開く","链接文字":"リンクテキスト","是否自动播放":"自動再生","视频地址":"ビデオアドレス","输入Latex数学公式":"LaTeX数式を入力","一级标题":"見出し1","二级标题":"見出し2","三级标题":"見出し3","四级标题":"見出し4","五级标题":"見出し5","六级标题":"見出し6","自动识别":"自動検出"}},$g=(A,e)=>"zh-CN"==A?e:_g[A][e]??e,Ao=e.createContext({state:{editor:{},selection:{}},disabled:!1,isMouseDown:!1,el:null,t:A=>$g("zh-CN",A),dark:!1}),eo=()=>e.useContext(Ao),to="_kaitify-divider_1akn1_1",io="_kaitify-dark_1akn1_9";const Bo="_kaitify-tabs_1c51d_1",so="_kaitify-dark_1c51d_10",co="_kaitify-tabs-header_1c51d_20",no="_kaitify-tabs-header-item_1c51d_27",go="_kaitify-tabs-header-item-active_1c51d_36",oo="_kaitify-tabs-content_1c51d_50";function ro({data:A=[],...t}){const{dark:i}=eo(),[B,s]=e.useState(t.defaultValue);return Xg.jsxs("div",{className:qg(Bo,{[so]:i}),children:[Xg.jsx("div",{className:co,children:A.map(A=>Xg.jsx("div",{className:qg(no,{[go]:A.value===B}),onClick:()=>s(A.value),children:A.label},A.value))}),Xg.jsx("div",{className:oo,children:"function"==typeof t.children?t.children(B):t.children})]})}const ao="_kaitify-checkbox_1apxq_1",Qo="_kaitify-checkbox-el_1apxq_18",Io="_kaitify-checkbox-active_1apxq_47",wo="_kaitify-checkbox-label_1apxq_68",Eo="_kaitify-disabled_1apxq_71",lo="_kaitify-dark_1apxq_82";function Co(A){const{dark:e}=eo();return Xg.jsxs("label",{className:qg(ao,{[Eo]:A.disabled,[lo]:e}),children:[Xg.jsx("span",{className:qg(Qo,{[Io]:A.checked}),children:Xg.jsx("input",{type:"checkbox",onChange:e=>{var t;if(A.disabled)return;const i=e.target.checked;null==(t=A.onChange)||t.call(A,i)},disabled:A.disabled})}),Xg.jsx("span",{className:wo,children:A.label})]})}const Mo=Object.freeze({left:0,top:0,width:16,height:16}),Yo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ho=Object.freeze({...Mo,...Yo}),Fo=Object.freeze({...ho,body:"",hidden:!1});function yo(A,e){const t=function(A,e){const t={};!A.hFlip!=!e.hFlip&&(t.hFlip=!0),!A.vFlip!=!e.vFlip&&(t.vFlip=!0);const i=((A.rotate||0)+(e.rotate||0))%4;return i&&(t.rotate=i),t}(A,e);for(const i in Fo)i in Yo?i in A&&!(i in t)&&(t[i]=Yo[i]):i in e?t[i]=e[i]:i in A&&(t[i]=A[i]);return t}function No(A,e,t){const i=A.icons,B=A.aliases||Object.create(null);let s={};function c(A){s=yo(i[A]||B[A],s)}return c(e),t.forEach(c),yo(A,s)}function Do(A,e){const t=[];if("object"!=typeof A||"object"!=typeof A.icons)return t;A.not_found instanceof Array&&A.not_found.forEach(A=>{e(A,null),t.push(A)});const i=function(A){const e=A.icons,t=A.aliases||Object.create(null),i=Object.create(null);return Object.keys(e).concat(Object.keys(t)).forEach(function A(B){if(e[B])return i[B]=[];if(!(B in i)){i[B]=null;const e=t[B]&&t[B].parent,s=e&&A(e);s&&(i[B]=[e].concat(s))}return i[B]}),i}(A);for(const B in i){const s=i[B];s&&(e(B,No(A,B,s)),t.push(B))}return t}const Uo={provider:"",aliases:{},not_found:{},...Mo};function uo(A,e){for(const t in e)if(t in A&&typeof A[t]!=typeof e[t])return!1;return!0}function mo(A){if("object"!=typeof A||null===A)return null;const e=A;if("string"!=typeof e.prefix||!A.icons||"object"!=typeof A.icons)return null;if(!uo(A,Uo))return null;const t=e.icons;for(const B in t){const A=t[B];if(!B||"string"!=typeof A.body||!uo(A,Fo))return null}const i=e.aliases||Object.create(null);for(const B in i){const A=i[B],e=A.parent;if(!B||"string"!=typeof e||!t[e]&&!i[e]||!uo(A,Fo))return null}return e}const Go=Object.create(null);function po(A,e){const t=Go[A]||(Go[A]=Object.create(null));return t[e]||(t[e]=function(A,e){return{provider:A,prefix:e,icons:Object.create(null),missing:new Set}}(A,e))}function zo(A,e){return mo(e)?Do(e,(e,t)=>{t?A.icons[e]=t:A.missing.add(e)}):[]}const jo=/^[a-z0-9]+(-[a-z0-9]+)*$/,xo=(A,e,t,i="")=>{const B=A.split(":");if("@"===A.slice(0,1)){if(B.length<2||B.length>3)return null;i=B.shift().slice(1)}if(B.length>3||!B.length)return null;if(B.length>1){const A=B.pop(),t=B.pop(),s={provider:B.length>0?B[0]:i,prefix:t,name:A};return e&&!fo(s)?null:s}const s=B[0],c=s.split("-");if(c.length>1){const A={provider:i,prefix:c.shift(),name:c.join("-")};return e&&!fo(A)?null:A}if(t&&""===i){const A={provider:i,prefix:"",name:s};return e&&!fo(A,t)?null:A}return null},fo=(A,e)=>!!A&&!(!(e&&""===A.prefix||A.prefix)||!A.name);let Ro=!1;function Ho(A){return"boolean"==typeof A&&(Ro=A),Ro}function ko(A){const e="string"==typeof A?xo(A,!0,Ro):A;if(e){const A=po(e.provider,e.prefix),t=e.name;return A.icons[t]||(A.missing.has(t)?null:void 0)}}function Jo(A,e){if("object"!=typeof A)return!1;if("string"!=typeof e&&(e=A.provider||""),Ro&&!e&&!A.prefix){let e=!1;return mo(A)&&(A.prefix="",Do(A,(A,t)=>{(function(A,e){const t=xo(A,!0,Ro);if(!t)return!1;const i=po(t.provider,t.prefix);return e?function(A,e,t){try{if("string"==typeof t.body)return A.icons[e]={...t},!0}catch(i){}return!1}(i,t.name,e):(i.missing.add(t.name),!0)})(A,t)&&(e=!0)})),e}const t=A.prefix;if(!fo({prefix:t,name:"a"}))return!1;return!!zo(po(e,t),A)}const bo=Object.freeze({width:null,height:null}),Lo=Object.freeze({...bo,...Yo}),So=/(-?[0-9.]*[0-9]+[0-9.]*)/g,To=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Wo(A,e,t){if(1===e)return A;if(t=t||100,"number"==typeof A)return Math.ceil(A*e*t)/t;if("string"!=typeof A)return A;const i=A.split(So);if(null===i||!i.length)return A;const B=[];let s=i.shift(),c=To.test(s);for(;;){if(c){const A=parseFloat(s);isNaN(A)?B.push(s):B.push(Math.ceil(A*e*t)/t)}else B.push(s);if(s=i.shift(),void 0===s)return B.join("");c=!c}}const Ko=/\sid="(\S+)"/g,vo="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Vo=0;function Oo(A,e=vo){const t=[];let i;for(;i=Ko.exec(A);)t.push(i[1]);if(!t.length)return A;const B="suffix"+(16777216*Math.random()|Date.now()).toString(16);return t.forEach(t=>{const i="function"==typeof e?e(t):e+(Vo++).toString(),s=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");A=A.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+B+"$3")}),A=A.replace(new RegExp(B,"g"),"")}const Po=Object.create(null);function Xo(A){return Po[A]||Po[""]}function Zo(A){let e;if("string"==typeof A.resources)e=[A.resources];else if(e=A.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:A.path||"/",maxURL:A.maxURL||500,rotate:A.rotate||750,timeout:A.timeout||5e3,random:!0===A.random,index:A.index||0,dataAfterTimeout:!1!==A.dataAfterTimeout}}const qo=Object.create(null),_o=["https://api.simplesvg.com","https://api.unisvg.com"],$o=[];for(;_o.length>0;)1===_o.length||Math.random()>.5?$o.push(_o.shift()):$o.push(_o.pop());function Ar(A,e){const t=Zo(e);return null!==t&&(qo[A]=t,!0)}function er(A){return qo[A]}qo[""]=Zo({resources:["https://api.iconify.design"].concat($o)});let tr=(()=>{let A;try{if(A=fetch,"function"==typeof A)return A}catch(e){}})();const ir={prepare:(A,e,t)=>{const i=[],B=function(A,e){const t=er(A);if(!t)return 0;let i;if(t.maxURL){let A=0;t.resources.forEach(e=>{const t=e;A=Math.max(A,t.length)});const B=e+".json?icons=";i=t.maxURL-A-t.path.length-B.length}else i=0;return i}(A,e),s="icons";let c={type:s,provider:A,prefix:e,icons:[]},n=0;return t.forEach((t,g)=>{n+=t.length+1,n>=B&&g>0&&(i.push(c),c={type:s,provider:A,prefix:e,icons:[]},n=t.length),c.icons.push(t)}),i.push(c),i},send:(A,e,t)=>{if(!tr)return void t("abort",424);let i=function(A){if("string"==typeof A){const e=er(A);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const A=e.prefix,t=e.icons.join(",");i+=A+".json?"+new URLSearchParams({icons:t}).toString();break}case"custom":{const A=e.uri;i+="/"===A.slice(0,1)?A.slice(1):A;break}default:return void t("abort",400)}let B=503;tr(A+i).then(A=>{const e=A.status;if(200===e)return B=501,A.json();setTimeout(()=>{t(function(A){return 404===A}(e)?"abort":"next",e)})}).then(A=>{"object"==typeof A&&null!==A?setTimeout(()=>{t("success",A)}):setTimeout(()=>{404===A?t("abort",A):t("next",B)})}).catch(()=>{t("next",B)})}};function Br(A,e){A.forEach(A=>{const t=A.loaderCallbacks;t&&(A.loaderCallbacks=t.filter(A=>A.id!==e))})}let sr=0;const cr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function nr(A,e,t,i){const B=A.resources.length,s=A.random?Math.floor(Math.random()*B):A.index;let c;if(A.random){let e=A.resources.slice(0);for(c=[];e.length>1;){const A=Math.floor(Math.random()*e.length);c.push(e[A]),e=e.slice(0,A).concat(e.slice(A+1))}c=c.concat(e)}else c=A.resources.slice(s).concat(A.resources.slice(0,s));const n=Date.now();let g,o="pending",r=0,a=null,Q=[],I=[];function w(){a&&(clearTimeout(a),a=null)}function E(){"pending"===o&&(o="aborted"),w(),Q.forEach(A=>{"pending"===A.status&&(A.status="aborted")}),Q=[]}function l(A,e){e&&(I=[]),"function"==typeof A&&I.push(A)}function C(){o="failed",I.forEach(A=>{A(void 0,g)})}function M(){Q.forEach(A=>{"pending"===A.status&&(A.status="aborted")}),Q=[]}function Y(){if("pending"!==o)return;w();const i=c.shift();if(void 0===i)return Q.length?void(a=setTimeout(()=>{w(),"pending"===o&&(M(),C())},A.timeout)):void C();const B={status:"pending",resource:i,callback:(e,t)=>{!function(e,t,i){const B="success"!==t;switch(Q=Q.filter(A=>A!==e),o){case"pending":break;case"failed":if(B||!A.dataAfterTimeout)return;break;default:return}if("abort"===t)return g=i,void C();if(B)return g=i,void(Q.length||(c.length?Y():C()));if(w(),M(),!A.random){const t=A.resources.indexOf(e.resource);-1!==t&&t!==A.index&&(A.index=t)}o="completed",I.forEach(A=>{A(i)})}(B,e,t)}};Q.push(B),r++,a=setTimeout(Y,A.rotate),t(i,e,B.callback)}return"function"==typeof i&&I.push(i),setTimeout(Y),function(){return{startTime:n,payload:e,status:o,queriesSent:r,queriesPending:Q.length,subscribe:l,abort:E}}}function gr(A){const e={...cr,...A};let t=[];function i(){t=t.filter(A=>"pending"===A().status)}return{query:function(A,B,s){const c=nr(e,A,B,(A,e)=>{i(),s&&s(A,e)});return t.push(c),c},find:function(A){return t.find(e=>A(e))||null},setIndex:A=>{e.index=A},getIndex:()=>e.index,cleanup:i}}function or(){}const rr=Object.create(null);function ar(A,e,t){let i,B;if("string"==typeof A){const e=Xo(A);if(!e)return t(void 0,424),or;B=e.send;const s=function(A){if(!rr[A]){const e=er(A);if(!e)return;const t={config:e,redundancy:gr(e)};rr[A]=t}return rr[A]}(A);s&&(i=s.redundancy)}else{const e=Zo(A);if(e){i=gr(e);const t=Xo(A.resources?A.resources[0]:"");t&&(B=t.send)}}return i&&B?i.query(e,B,t)().abort:(t(void 0,424),or)}function Qr(){}function Ir(A){A.iconsLoaderFlag||(A.iconsLoaderFlag=!0,setTimeout(()=>{A.iconsLoaderFlag=!1,function(A){A.pendingCallbacksFlag||(A.pendingCallbacksFlag=!0,setTimeout(()=>{A.pendingCallbacksFlag=!1;const e=A.loaderCallbacks?A.loaderCallbacks.slice(0):[];if(!e.length)return;let t=!1;const i=A.provider,B=A.prefix;e.forEach(e=>{const s=e.icons,c=s.pending.length;s.pending=s.pending.filter(e=>{if(e.prefix!==B)return!0;const c=e.name;if(A.icons[c])s.loaded.push({provider:i,prefix:B,name:c});else{if(!A.missing.has(c))return t=!0,!0;s.missing.push({provider:i,prefix:B,name:c})}return!1}),s.pending.length!==c&&(t||Br([A],e.id),e.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),e.abort))})}))}(A)}))}function wr(A,e,t){function i(){const t=A.pendingIcons;e.forEach(e=>{t&&t.delete(e),A.icons[e]||A.missing.add(e)})}if(t&&"object"==typeof t)try{if(!zo(A,t).length)return void i()}catch(B){console.error(B)}i(),Ir(A)}function Er(A,e){A instanceof Promise?A.then(A=>{e(A)}).catch(()=>{e(null)}):e(A)}function lr(A,e){A.iconsToLoad?A.iconsToLoad=A.iconsToLoad.concat(e).sort():A.iconsToLoad=e,A.iconsQueueFlag||(A.iconsQueueFlag=!0,setTimeout(()=>{A.iconsQueueFlag=!1;const{provider:e,prefix:t}=A,i=A.iconsToLoad;if(delete A.iconsToLoad,!i||!i.length)return;const B=A.loadIcon;if(A.loadIcons&&(i.length>1||!B))return void Er(A.loadIcons(i,t,e),e=>{wr(A,i,e)});if(B)return void i.forEach(i=>{Er(B(i,t,e),e=>{wr(A,[i],e?{prefix:t,icons:{[i]:e}}:null)})});const{valid:s,invalid:c}=function(A){const e=[],t=[];return A.forEach(A=>{(A.match(jo)?e:t).push(A)}),{valid:e,invalid:t}}(i);if(c.length&&wr(A,c,null),!s.length)return;const n=t.match(jo)?Xo(e):null;if(!n)return void wr(A,s,null);n.prepare(e,t,s).forEach(t=>{ar(e,t,e=>{wr(A,t.icons,e)})})}))}const Cr=(A,e)=>{const t=function(A){const e={loaded:[],missing:[],pending:[]},t=Object.create(null);A.sort((A,e)=>A.provider!==e.provider?A.provider.localeCompare(e.provider):A.prefix!==e.prefix?A.prefix.localeCompare(e.prefix):A.name.localeCompare(e.name));let i={provider:"",prefix:"",name:""};return A.forEach(A=>{if(i.name===A.name&&i.prefix===A.prefix&&i.provider===A.provider)return;i=A;const B=A.provider,s=A.prefix,c=A.name,n=t[B]||(t[B]=Object.create(null)),g=n[s]||(n[s]=po(B,s));let o;o=c in g.icons?e.loaded:""===s||g.missing.has(c)?e.missing:e.pending;const r={provider:B,prefix:s,name:c};o.push(r)}),e}(function(A,e=!0,t=!1){const i=[];return A.forEach(A=>{const B="string"==typeof A?xo(A,e,t):A;B&&i.push(B)}),i}(A,!0,Ho()));if(!t.pending.length){let A=!0;return e&&setTimeout(()=>{A&&e(t.loaded,t.missing,t.pending,Qr)}),()=>{A=!1}}const i=Object.create(null),B=[];let s,c;return t.pending.forEach(A=>{const{provider:e,prefix:t}=A;if(t===c&&e===s)return;s=e,c=t,B.push(po(e,t));const n=i[e]||(i[e]=Object.create(null));n[t]||(n[t]=[])}),t.pending.forEach(A=>{const{provider:e,prefix:t,name:B}=A,s=po(e,t),c=s.pendingIcons||(s.pendingIcons=new Set);c.has(B)||(c.add(B),i[e][t].push(B))}),B.forEach(A=>{const e=i[A.provider][A.prefix];e.length&&lr(A,e)}),e?function(A,e,t){const i=sr++,B=Br.bind(null,t,i);if(!e.pending.length)return B;const s={id:i,icons:e,callback:A,abort:B};return t.forEach(A=>{(A.loaderCallbacks||(A.loaderCallbacks=[])).push(s)}),B}(e,t,B):Qr};const Mr=/[\s,]+/;function Yr(A,e){e.split(Mr).forEach(e=>{switch(e.trim()){case"horizontal":A.hFlip=!0;break;case"vertical":A.vFlip=!0}})}function hr(A,e=0){const t=A.replace(/^-?[0-9.]*/,"");function i(A){for(;A<0;)A+=4;return A%4}if(""===t){const e=parseInt(A);return isNaN(e)?0:i(e)}if(t!==A){let e=0;switch(t){case"%":e=25;break;case"deg":e=90}if(e){let B=parseFloat(A.slice(0,A.length-t.length));return isNaN(B)?0:(B/=e,B%1==0?i(B):0)}}return e}let Fr;function yr(A){return void 0===Fr&&function(){try{Fr=window.trustedTypes.createPolicy("iconify",{createHTML:A=>A})}catch(A){Fr=null}}(),Fr?Fr.createHTML(A):A}const dr={...Lo,inline:!1},Nr={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Dr={display:"inline-block"},Ur={backgroundColor:"currentColor"},ur={backgroundColor:"transparent"},mr={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Gr={WebkitMask:Ur,mask:Ur,background:ur};for(const rw in Gr){const A=Gr[rw];for(const e in mr)A[rw+e]=mr[e]}const pr={...dr,inline:!0};function zr(A){return A+(A.match(/^[-0-9.]+$/)?"px":"")}const jr=(A,t,i)=>{const B=t.inline?pr:dr,s=function(A,e){const t={...A};for(const i in e){const A=e[i],B=typeof A;i in bo?(null===A||A&&("string"===B||"number"===B))&&(t[i]=A):B===typeof t[i]&&(t[i]="rotate"===i?A%4:A)}return t}(B,t),c=t.mode||"svg",n={},g=t.style||{},o={..."svg"===c?Nr:{}};if(i){const A=xo(i,!1,!0);if(A){const e=["iconify"],t=["provider","prefix"];for(const i of t)A[i]&&e.push("iconify--"+A[i]);o.className=e.join(" ")}}for(let e in t){const A=t[e];if(void 0!==A)switch(e){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":o.ref=A;break;case"className":o[e]=(o[e]?o[e]+" ":"")+A;break;case"inline":case"hFlip":case"vFlip":s[e]=!0===A||"true"===A||1===A;break;case"flip":"string"==typeof A&&Yr(s,A);break;case"color":n.color=A;break;case"rotate":"string"==typeof A?s[e]=hr(A):"number"==typeof A&&(s[e]=A);break;case"ariaHidden":case"aria-hidden":!0!==A&&"true"!==A&&delete o["aria-hidden"];break;default:void 0===B[e]&&(o[e]=A)}}const r=function(A,e){const t={...ho,...A},i={...Lo,...e},B={left:t.left,top:t.top,width:t.width,height:t.height};let s=t.body;[t,i].forEach(A=>{const e=[],t=A.hFlip,i=A.vFlip;let c,n=A.rotate;switch(t?i?n+=2:(e.push("translate("+(B.width+B.left).toString()+" "+(0-B.top).toString()+")"),e.push("scale(-1 1)"),B.top=B.left=0):i&&(e.push("translate("+(0-B.left).toString()+" "+(B.height+B.top).toString()+")"),e.push("scale(1 -1)"),B.top=B.left=0),n<0&&(n-=4*Math.floor(n/4)),n%=4,n){case 1:c=B.height/2+B.top,e.unshift("rotate(90 "+c.toString()+" "+c.toString()+")");break;case 2:e.unshift("rotate(180 "+(B.width/2+B.left).toString()+" "+(B.height/2+B.top).toString()+")");break;case 3:c=B.width/2+B.left,e.unshift("rotate(-90 "+c.toString()+" "+c.toString()+")")}n%2==1&&(B.left!==B.top&&(c=B.left,B.left=B.top,B.top=c),B.width!==B.height&&(c=B.width,B.width=B.height,B.height=c)),e.length&&(s=function(A,e,t){const i=function(A,e="defs"){let t="";const i=A.indexOf("<"+e);for(;i>=0;){const B=A.indexOf(">",i),s=A.indexOf("</"+e);if(-1===B||-1===s)break;const c=A.indexOf(">",s);if(-1===c)break;t+=A.slice(B+1,s).trim(),A=A.slice(0,i).trim()+A.slice(c+1)}return{defs:t,content:A}}(A);return B=i.defs,s=e+i.content+t,B?"<defs>"+B+"</defs>"+s:s;var B,s}(s,'<g transform="'+e.join(" ")+'">',"</g>"))});const c=i.width,n=i.height,g=B.width,o=B.height;let r,a;null===c?(a=null===n?"1em":"auto"===n?o:n,r=Wo(a,g/o)):(r="auto"===c?g:c,a=null===n?Wo(r,o/g):"auto"===n?o:n);const Q={},I=(A,e)=>{(A=>"unset"===A||"undefined"===A||"none"===A)(e)||(Q[A]=e.toString())};I("width",r),I("height",a);const w=[B.left,B.top,g,o];return Q.viewBox=w.join(" "),{attributes:Q,viewBox:w,body:s}}(A,s),a=r.attributes;if(s.inline&&(n.verticalAlign="-0.125em"),"svg"===c){o.style={...n,...g},Object.assign(o,a);let A=0,i=t.id;return"string"==typeof i&&(i=i.replace(/-/g,"_")),o.dangerouslySetInnerHTML={__html:yr(Oo(r.body,i?()=>i+"ID"+A++:"iconifyReact"))},e.createElement("svg",o)}const{body:Q,width:I,height:w}=A,E="mask"===c||"bg"!==c&&-1!==Q.indexOf("currentColor"),l=function(A,e){let t=-1===A.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)t+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+A+"</svg>"}(Q,{...a,width:I+"",height:w+""});var C;return o.style={...n,"--svg":(C=l,'url("'+function(A){return"data:image/svg+xml,"+function(A){return A.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(A)}(C)+'")'),width:zr(a.width),height:zr(a.height),...Dr,...E?Ur:ur,...g},e.createElement("span",o)};var xr;if(Ho(!0),xr=ir,Po[""]=xr,"undefined"!=typeof document&&"undefined"!=typeof window){const A=window;if(void 0!==A.IconifyPreload){const e=A.IconifyPreload,t="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(A=>{try{("object"!=typeof A||null===A||A instanceof Array||"object"!=typeof A.icons||"string"!=typeof A.prefix||!Jo(A))&&console.error(t)}catch(e){console.error(t)}})}if(void 0!==A.IconifyProviders){const e=A.IconifyProviders;if("object"==typeof e&&null!==e)for(let A in e){const t="IconifyProviders["+A+"] is invalid.";try{const i=e[A];if("object"!=typeof i||!i||void 0===i.resources)continue;Ar(A,i)||console.error(t)}catch(ow){console.error(t)}}}}function fr(A){const[t,i]=e.useState(!!A.ssr),[B,s]=e.useState({});const[c,n]=e.useState(function(e){if(e){const e=A.icon;if("object"==typeof e)return{name:"",data:e};const t=ko(e);if(t)return{name:e,data:t}}return{name:""}}(!!A.ssr));function g(){const A=B.callback;A&&(A(),s({}))}function o(A){if(JSON.stringify(c)!==JSON.stringify(A))return g(),n(A),!0}function r(){var e;const t=A.icon;if("object"==typeof t)return void o({name:"",data:t});const i=ko(t);if(o({name:t,data:i}))if(void 0===i){const A=Cr([t],r);s({callback:A})}else i&&(null===(e=A.onLoad)||void 0===e||e.call(A,t))}e.useEffect(()=>(i(!0),g),[]),e.useEffect(()=>{t&&r()},[A.icon,t]);const{name:a,data:Q}=c;return Q?jr({...ho,...Q},A,a):A.children?A.children:A.fallback?A.fallback:e.createElement("span",{})}const Rr=e.forwardRef((A,e)=>fr({...A,_ref:e}));e.forwardRef((A,e)=>fr({inline:!0,...A,_ref:e}));const Hr="_kaitify-icon_x9qch_5";function kr(A){return A.name.startsWith("kaitify-icon-")?Xg.jsx("i",{className:qg(Hr,A.name,A.className),style:{fontSize:A.size,...A.style}}):Xg.jsx(Rr,{mode:"svg",icon:A.name,className:qg(Hr,A.className),style:{fontSize:A.size,...A.style}})}var Jr,br=t;function Lr(A){const[i,B]=e.useState(null);return e.useEffect(()=>{if("string"==typeof A.to){const e=document.querySelector(A.to);e&&B(e)}else A.to instanceof HTMLElement?B(A.to):B(document.body)},[A.to]),i?t.createPortal(A.children,i):null}Jr=br.createRoot,br.hydrateRoot;const Sr={class:"className",for:"htmlFor",maxlength:"maxLength",minlength:"minLength",readonly:"readOnly",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",contenteditable:"contentEditable",autofocus:"autoFocus",enctype:"encType",novalidate:"noValidate",formnovalidate:"formNoValidate",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",frameborder:"frameBorder",allowfullscreen:"allowFullScreen",autoplay:"autoPlay",controlslist:"controlsList",crossorigin:"crossOrigin",playsinline:"playsInline",acceptcharset:"acceptCharset",spellcheck:"spellCheck",srcdoc:"srcDoc",viewbox:"viewBox",preserveaspectratio:"preserveAspectRatio"},Tr=A=>{const t=[];return A.children&&A.children.length?A.children.forEach(A=>{t.push(Tr(A))}):A.textContent&&t.push(A.textContent),A.attrs=(A=>{const e={};for(const t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[Sr[t]??t]=A[t]);return e})(A.attrs),Object.prototype.hasOwnProperty.call(A.attrs,"contentEditable")&&(A.attrs.suppressContentEditableWarning="true"),e.createElement(A.tag,{key:A.key,...A.attrs,style:A.styles},0===t.length?void 0:t)},Wr=A=>A.stackNodes.map(e=>Tr(M(A,e))),Kr="_kaitify-border_ytsp5_1",vr=e.forwardRef((A,i)=>{const B=e.useRef(null),s=e.useRef(void 0),[c,n]=e.useState(!1),[g,o]=e.useState(!1),[r,a]=e.useState(0),Q=e.useMemo(()=>{var A;return{editor:{value:s.current},selection:{value:null==(A=s.current)?void 0:A.selection}}},[r]),I=e.useRef(!1),w=e.useRef(null),E=A=>"function"==typeof A?A(Q):A,l=async()=>{s.current||Jg.configure({el:B.current,value:A.value??"",placeholder:A.placeholder,dark:A.dark,editable:!A.disabled,autofocus:A.autofocus,allowCopy:A.allowCopy,allowCut:A.allowCut,allowPaste:A.allowPaste,allowPasteHtml:A.allowPasteHtml,priorityPasteFiles:A.priorityPasteFiles,textRenderTag:A.textRenderTag,blockRenderTag:A.blockRenderTag,emptyRenderTags:A.emptyRenderTags,extraKeepTags:A.extraKeepTags,extensions:[...A.extensions??[]],formatRules:A.formatRules,onDomParseNode:A.onDomParseNode,onPasteKeepMarks:A.onPasteKeepMarks,onPasteKeepStyles:A.onPasteKeepStyles,onPasteText:A.onPasteText,onPasteHtml:A.onPasteHtml,onPasteImage:A.onPasteImage,onPasteVideo:A.onPasteVideo,onPasteFile:A.onPasteFile,onDetachMentBlockFromParent:A.onDetachMentBlockFromParent,onBeforePatchNodeToFormat:A.onBeforePatchNodeToFormat,onInsertParagraph:A.onInsertParagraph,onDeleteComplete:A.onDeleteComplete,onKeydown:A.onKeydown,onKeyup:A.onKeyup,onFocus:A.onFocus,onBlur:A.onBlur,onBeforeUpdateView:A.onBeforeUpdateView,onAfterUpdateView:A.onAfterUpdateView,onCreate(A){s.current=A,a(A=>A+1)},onCreated(e){var t;null==(t=A.onCreated)||t.call(A,e),a(A=>A+1),I.current=!0},onSelectionUpdate(e){var t;null==(t=A.onSelectionUpdate)||t.apply(this,[e]),a(A=>A+1)},onUpdateView:async()=>(await new Promise(A=>{queueMicrotask(()=>{t.flushSync(()=>{w.current||(w.current=Jr(B.current)),w.current.render(Xg.jsx(Xg.Fragment,{children:Wr(s.current)}))}),A()})}),!1),onChange:e=>{var t;n(!0),null==(t=A.onChange)||t.call(A,e)}})};return e.useImperativeHandle(i,()=>({elRef:B,state:Q})),e.useEffect(()=>{s.current&&I.current&&(c?(n(!1),a(A=>A+1)):s.current.review(A.value??"").then(()=>{var e,t;!A.disabled&&A.autofocus&&(null==(e=s.current)||e.setSelectionAfter(),null==(t=s.current)||t.updateRealSelection(),a(A=>A+1))}))},[A.value]),e.useEffect(()=>{s.current&&I.current&&(s.current.setEditable(!A.disabled),s.current.setDark(A.dark??!1),s.current.allowCopy=A.allowCopy??!0,s.current.allowCut=A.allowCut??!0,s.current.allowPaste=A.allowPaste??!0,s.current.allowPasteHtml=A.allowPasteHtml??!1,s.current.priorityPasteFiles=A.priorityPasteFiles??!1,a(A=>A+1))},[A.disabled,A.dark,A.allowCopy,A.allowCut,A.allowPaste,A.allowPasteHtml,A.priorityPasteFiles]),e.useEffect(()=>(l(),()=>{var A;I.current&&(null==(A=s.current)||A.destroy(),s.current=void 0,queueMicrotask(()=>{var A;null==(A=w.current)||A.unmount(),w.current=null}))}),[]),Xg.jsx(Ao.Provider,{value:{state:Q,isMouseDown:g,disabled:A.disabled??!1,el:B.current,t:e=>$g(A.locale??"zh-CN",e),dark:A.dark??!1},children:Xg.jsxs(Xg.Fragment,{children:[A.appendBeforeTo?Xg.jsx(Lr,{to:A.appendBeforeTo,children:E(A.before)}):E(A.before),Xg.jsx("div",{ref:B,className:qg(Kr,A.className),style:A.style,onMouseDown:()=>o(!0),onMouseUp:()=>o(!1)}),A.appendAfterTo?Xg.jsx(Lr,{to:A.appendAfterTo,children:E(A.after)}):E(A.after),E(A.children)]})})});var Vr="top",Or="bottom",Pr="right",Xr="left",Zr="auto",qr=[Vr,Or,Pr,Xr],_r="start",$r="end",Aa="viewport",ea="popper",ta=qr.reduce(function(A,e){return A.concat([e+"-"+_r,e+"-"+$r])},[]),ia=[].concat(qr,[Zr]).reduce(function(A,e){return A.concat([e,e+"-"+_r,e+"-"+$r])},[]),Ba=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function sa(A){return A?(A.nodeName||"").toLowerCase():null}function ca(A){if(null==A)return window;if("[object Window]"!==A.toString()){var e=A.ownerDocument;return e&&e.defaultView||window}return A}function na(A){return A instanceof ca(A).Element||A instanceof Element}function ga(A){return A instanceof ca(A).HTMLElement||A instanceof HTMLElement}function oa(A){return"undefined"!=typeof ShadowRoot&&(A instanceof ca(A).ShadowRoot||A instanceof ShadowRoot)}const ra={name:"applyStyles",enabled:!0,phase:"write",fn:function(A){var e=A.state;Object.keys(e.elements).forEach(function(A){var t=e.styles[A]||{},i=e.attributes[A]||{},B=e.elements[A];ga(B)&&sa(B)&&(Object.assign(B.style,t),Object.keys(i).forEach(function(A){var e=i[A];!1===e?B.removeAttribute(A):B.setAttribute(A,!0===e?"":e)}))})},effect:function(A){var e=A.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(A){var i=e.elements[A],B=e.attributes[A]||{},s=Object.keys(e.styles.hasOwnProperty(A)?e.styles[A]:t[A]).reduce(function(A,e){return A[e]="",A},{});ga(i)&&sa(i)&&(Object.assign(i.style,s),Object.keys(B).forEach(function(A){i.removeAttribute(A)}))})}},requires:["computeStyles"]};function aa(A){return A.split("-")[0]}var Qa=Math.max,Ia=Math.min,wa=Math.round;function Ea(){var A=navigator.userAgentData;return null!=A&&A.brands&&Array.isArray(A.brands)?A.brands.map(function(A){return A.brand+"/"+A.version}).join(" "):navigator.userAgent}function la(){return!/^((?!chrome|android).)*safari/i.test(Ea())}function Ca(A,e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var i=A.getBoundingClientRect(),B=1,s=1;e&&ga(A)&&(B=A.offsetWidth>0&&wa(i.width)/A.offsetWidth||1,s=A.offsetHeight>0&&wa(i.height)/A.offsetHeight||1);var c=(na(A)?ca(A):window).visualViewport,n=!la()&&t,g=(i.left+(n&&c?c.offsetLeft:0))/B,o=(i.top+(n&&c?c.offsetTop:0))/s,r=i.width/B,a=i.height/s;return{width:r,height:a,top:o,right:g+r,bottom:o+a,left:g,x:g,y:o}}function Ma(A){var e=Ca(A),t=A.offsetWidth,i=A.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:A.offsetLeft,y:A.offsetTop,width:t,height:i}}function Ya(A,e){var t=e.getRootNode&&e.getRootNode();if(A.contains(e))return!0;if(t&&oa(t)){var i=e;do{if(i&&A.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function ha(A){return ca(A).getComputedStyle(A)}function Fa(A){return["table","td","th"].indexOf(sa(A))>=0}function ya(A){return((na(A)?A.ownerDocument:A.document)||window.document).documentElement}function da(A){return"html"===sa(A)?A:A.assignedSlot||A.parentNode||(oa(A)?A.host:null)||ya(A)}function Na(A){return ga(A)&&"fixed"!==ha(A).position?A.offsetParent:null}function Da(A){for(var e=ca(A),t=Na(A);t&&Fa(t)&&"static"===ha(t).position;)t=Na(t);return t&&("html"===sa(t)||"body"===sa(t)&&"static"===ha(t).position)?e:t||function(A){var e=/firefox/i.test(Ea());if(/Trident/i.test(Ea())&&ga(A)&&"fixed"===ha(A).position)return null;var t=da(A);for(oa(t)&&(t=t.host);ga(t)&&["html","body"].indexOf(sa(t))<0;){var i=ha(t);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return t;t=t.parentNode}return null}(A)||e}function Ua(A){return["top","bottom"].indexOf(A)>=0?"x":"y"}function ua(A,e,t){return Qa(A,Ia(e,t))}function ma(A){return Object.assign({},{top:0,right:0,bottom:0,left:0},A)}function Ga(A,e){return e.reduce(function(e,t){return e[t]=A,e},{})}function pa(A){return A.split("-")[1]}var za={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ja(A){var e,t=A.popper,i=A.popperRect,B=A.placement,s=A.variation,c=A.offsets,n=A.position,g=A.gpuAcceleration,o=A.adaptive,r=A.roundOffsets,a=A.isFixed,Q=c.x,I=void 0===Q?0:Q,w=c.y,E=void 0===w?0:w,l="function"==typeof r?r({x:I,y:E}):{x:I,y:E};I=l.x,E=l.y;var C=c.hasOwnProperty("x"),M=c.hasOwnProperty("y"),Y=Xr,h=Vr,F=window;if(o){var y=Da(t),d="clientHeight",N="clientWidth";if(y===ca(t)&&"static"!==ha(y=ya(t)).position&&"absolute"===n&&(d="scrollHeight",N="scrollWidth"),B===Vr||(B===Xr||B===Pr)&&s===$r)h=Or,E-=(a&&y===F&&F.visualViewport?F.visualViewport.height:y[d])-i.height,E*=g?1:-1;if(B===Xr||(B===Vr||B===Or)&&s===$r)Y=Pr,I-=(a&&y===F&&F.visualViewport?F.visualViewport.width:y[N])-i.width,I*=g?1:-1}var D,U=Object.assign({position:n},o&&za),u=!0===r?function(A,e){var t=A.x,i=A.y,B=e.devicePixelRatio||1;return{x:wa(t*B)/B||0,y:wa(i*B)/B||0}}({x:I,y:E},ca(t)):{x:I,y:E};return I=u.x,E=u.y,g?Object.assign({},U,((D={})[h]=M?"0":"",D[Y]=C?"0":"",D.transform=(F.devicePixelRatio||1)<=1?"translate("+I+"px, "+E+"px)":"translate3d("+I+"px, "+E+"px, 0)",D)):Object.assign({},U,((e={})[h]=M?E+"px":"",e[Y]=C?I+"px":"",e.transform="",e))}var xa={passive:!0};var fa={left:"right",right:"left",bottom:"top",top:"bottom"};function Ra(A){return A.replace(/left|right|bottom|top/g,function(A){return fa[A]})}var Ha={start:"end",end:"start"};function ka(A){return A.replace(/start|end/g,function(A){return Ha[A]})}function Ja(A){var e=ca(A);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ba(A){return Ca(ya(A)).left+Ja(A).scrollLeft}function La(A){var e=ha(A),t=e.overflow,i=e.overflowX,B=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+B+i)}function Sa(A){return["html","body","#document"].indexOf(sa(A))>=0?A.ownerDocument.body:ga(A)&&La(A)?A:Sa(da(A))}function Ta(A,e){var t;void 0===e&&(e=[]);var i=Sa(A),B=i===(null==(t=A.ownerDocument)?void 0:t.body),s=ca(i),c=B?[s].concat(s.visualViewport||[],La(i)?i:[]):i,n=e.concat(c);return B?n:n.concat(Ta(da(c)))}function Wa(A){return Object.assign({},A,{left:A.x,top:A.y,right:A.x+A.width,bottom:A.y+A.height})}function Ka(A,e,t){return e===Aa?Wa(function(A,e){var t=ca(A),i=ya(A),B=t.visualViewport,s=i.clientWidth,c=i.clientHeight,n=0,g=0;if(B){s=B.width,c=B.height;var o=la();(o||!o&&"fixed"===e)&&(n=B.offsetLeft,g=B.offsetTop)}return{width:s,height:c,x:n+ba(A),y:g}}(A,t)):na(e)?function(A,e){var t=Ca(A,!1,"fixed"===e);return t.top=t.top+A.clientTop,t.left=t.left+A.clientLeft,t.bottom=t.top+A.clientHeight,t.right=t.left+A.clientWidth,t.width=A.clientWidth,t.height=A.clientHeight,t.x=t.left,t.y=t.top,t}(e,t):Wa(function(A){var e,t=ya(A),i=Ja(A),B=null==(e=A.ownerDocument)?void 0:e.body,s=Qa(t.scrollWidth,t.clientWidth,B?B.scrollWidth:0,B?B.clientWidth:0),c=Qa(t.scrollHeight,t.clientHeight,B?B.scrollHeight:0,B?B.clientHeight:0),n=-i.scrollLeft+ba(A),g=-i.scrollTop;return"rtl"===ha(B||t).direction&&(n+=Qa(t.clientWidth,B?B.clientWidth:0)-s),{width:s,height:c,x:n,y:g}}(ya(A)))}function va(A,e,t,i){var B="clippingParents"===e?function(A){var e=Ta(da(A)),t=["absolute","fixed"].indexOf(ha(A).position)>=0&&ga(A)?Da(A):A;return na(t)?e.filter(function(A){return na(A)&&Ya(A,t)&&"body"!==sa(A)}):[]}(A):[].concat(e),s=[].concat(B,[t]),c=s[0],n=s.reduce(function(e,t){var B=Ka(A,t,i);return e.top=Qa(B.top,e.top),e.right=Ia(B.right,e.right),e.bottom=Ia(B.bottom,e.bottom),e.left=Qa(B.left,e.left),e},Ka(A,c,i));return n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function Va(A){var e,t=A.reference,i=A.element,B=A.placement,s=B?aa(B):null,c=B?pa(B):null,n=t.x+t.width/2-i.width/2,g=t.y+t.height/2-i.height/2;switch(s){case Vr:e={x:n,y:t.y-i.height};break;case Or:e={x:n,y:t.y+t.height};break;case Pr:e={x:t.x+t.width,y:g};break;case Xr:e={x:t.x-i.width,y:g};break;default:e={x:t.x,y:t.y}}var o=s?Ua(s):null;if(null!=o){var r="y"===o?"height":"width";switch(c){case _r:e[o]=e[o]-(t[r]/2-i[r]/2);break;case $r:e[o]=e[o]+(t[r]/2-i[r]/2)}}return e}function Oa(A,e){void 0===e&&(e={});var t=e,i=t.placement,B=void 0===i?A.placement:i,s=t.strategy,c=void 0===s?A.strategy:s,n=t.boundary,g=void 0===n?"clippingParents":n,o=t.rootBoundary,r=void 0===o?Aa:o,a=t.elementContext,Q=void 0===a?ea:a,I=t.altBoundary,w=void 0!==I&&I,E=t.padding,l=void 0===E?0:E,C=ma("number"!=typeof l?l:Ga(l,qr)),M=Q===ea?"reference":ea,Y=A.rects.popper,h=A.elements[w?M:Q],F=va(na(h)?h:h.contextElement||ya(A.elements.popper),g,r,c),y=Ca(A.elements.reference),d=Va({reference:y,element:Y,placement:B}),N=Wa(Object.assign({},Y,d)),D=Q===ea?N:y,U={top:F.top-D.top+C.top,bottom:D.bottom-F.bottom+C.bottom,left:F.left-D.left+C.left,right:D.right-F.right+C.right},u=A.modifiersData.offset;if(Q===ea&&u){var m=u[B];Object.keys(U).forEach(function(A){var e=[Pr,Or].indexOf(A)>=0?1:-1,t=[Vr,Or].indexOf(A)>=0?"y":"x";U[A]+=m[t]*e})}return U}function Pa(A,e,t){return void 0===t&&(t={x:0,y:0}),{top:A.top-e.height-t.y,right:A.right-e.width+t.x,bottom:A.bottom-e.height+t.y,left:A.left-e.width-t.x}}function Xa(A){return[Vr,Pr,Or,Xr].some(function(e){return A[e]>=0})}function Za(A,e,t){void 0===t&&(t=!1);var i,B,s=ga(e),c=ga(e)&&function(A){var e=A.getBoundingClientRect(),t=wa(e.width)/A.offsetWidth||1,i=wa(e.height)/A.offsetHeight||1;return 1!==t||1!==i}(e),n=ya(e),g=Ca(A,c,t),o={scrollLeft:0,scrollTop:0},r={x:0,y:0};return(s||!s&&!t)&&(("body"!==sa(e)||La(n))&&(o=(i=e)!==ca(i)&&ga(i)?{scrollLeft:(B=i).scrollLeft,scrollTop:B.scrollTop}:Ja(i)),ga(e)?((r=Ca(e,!0)).x+=e.clientLeft,r.y+=e.clientTop):n&&(r.x=ba(n))),{x:g.left+o.scrollLeft-r.x,y:g.top+o.scrollTop-r.y,width:g.width,height:g.height}}function qa(A){var e=new Map,t=new Set,i=[];function B(A){t.add(A.name),[].concat(A.requires||[],A.requiresIfExists||[]).forEach(function(A){if(!t.has(A)){var i=e.get(A);i&&B(i)}}),i.push(A)}return A.forEach(function(A){e.set(A.name,A)}),A.forEach(function(A){t.has(A.name)||B(A)}),i}var _a={placement:"bottom",modifiers:[],strategy:"absolute"};function $a(){for(var A=arguments.length,e=new Array(A),t=0;t<A;t++)e[t]=arguments[t];return!e.some(function(A){return!(A&&"function"==typeof A.getBoundingClientRect)})}function AQ(A){void 0===A&&(A={});var e=A,t=e.defaultModifiers,i=void 0===t?[]:t,B=e.defaultOptions,s=void 0===B?_a:B;return function(A,e,t){void 0===t&&(t=s);var B,c,n={placement:"bottom",orderedModifiers:[],options:Object.assign({},_a,s),modifiersData:{},elements:{reference:A,popper:e},attributes:{},styles:{}},g=[],o=!1,r={state:n,setOptions:function(t){var B="function"==typeof t?t(n.options):t;a(),n.options=Object.assign({},s,n.options,B),n.scrollParents={reference:na(A)?Ta(A):A.contextElement?Ta(A.contextElement):[],popper:Ta(e)};var c,o,Q=function(A){var e=qa(A);return Ba.reduce(function(A,t){return A.concat(e.filter(function(A){return A.phase===t}))},[])}((c=[].concat(i,n.options.modifiers),o=c.reduce(function(A,e){var t=A[e.name];return A[e.name]=t?Object.assign({},t,e,{options:Object.assign({},t.options,e.options),data:Object.assign({},t.data,e.data)}):e,A},{}),Object.keys(o).map(function(A){return o[A]})));return n.orderedModifiers=Q.filter(function(A){return A.enabled}),n.orderedModifiers.forEach(function(A){var e=A.name,t=A.options,i=void 0===t?{}:t,B=A.effect;if("function"==typeof B){var s=B({state:n,name:e,instance:r,options:i}),c=function(){};g.push(s||c)}}),r.update()},forceUpdate:function(){if(!o){var A=n.elements,e=A.reference,t=A.popper;if($a(e,t)){n.rects={reference:Za(e,Da(t),"fixed"===n.options.strategy),popper:Ma(t)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach(function(A){return n.modifiersData[A.name]=Object.assign({},A.data)});for(var i=0;i<n.orderedModifiers.length;i++)if(!0!==n.reset){var B=n.orderedModifiers[i],s=B.fn,c=B.options,g=void 0===c?{}:c,a=B.name;"function"==typeof s&&(n=s({state:n,options:g,name:a,instance:r})||n)}else n.reset=!1,i=-1}}},update:(B=function(){return new Promise(function(A){r.forceUpdate(),A(n)})},function(){return c||(c=new Promise(function(A){Promise.resolve().then(function(){c=void 0,A(B())})})),c}),destroy:function(){a(),o=!0}};if(!$a(A,e))return r;function a(){g.forEach(function(A){return A()}),g=[]}return r.setOptions(t).then(function(A){!o&&t.onFirstUpdate&&t.onFirstUpdate(A)}),r}}var eQ=AQ({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(A){var e=A.state,t=A.instance,i=A.options,B=i.scroll,s=void 0===B||B,c=i.resize,n=void 0===c||c,g=ca(e.elements.popper),o=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&o.forEach(function(A){A.addEventListener("scroll",t.update,xa)}),n&&g.addEventListener("resize",t.update,xa),function(){s&&o.forEach(function(A){A.removeEventListener("scroll",t.update,xa)}),n&&g.removeEventListener("resize",t.update,xa)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(A){var e=A.state,t=A.name;e.modifiersData[t]=Va({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(A){var e=A.state,t=A.options,i=t.gpuAcceleration,B=void 0===i||i,s=t.adaptive,c=void 0===s||s,n=t.roundOffsets,g=void 0===n||n,o={placement:aa(e.placement),variation:pa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:B,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ja(Object.assign({},o,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:c,roundOffsets:g})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ja(Object.assign({},o,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:g})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},ra,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(A){var e=A.state,t=A.options,i=A.name,B=t.offset,s=void 0===B?[0,0]:B,c=ia.reduce(function(A,t){return A[t]=function(A,e,t){var i=aa(A),B=[Xr,Vr].indexOf(i)>=0?-1:1,s="function"==typeof t?t(Object.assign({},e,{placement:A})):t,c=s[0],n=s[1];return c=c||0,n=(n||0)*B,[Xr,Pr].indexOf(i)>=0?{x:n,y:c}:{x:c,y:n}}(t,e.rects,s),A},{}),n=c[e.placement],g=n.x,o=n.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=g,e.modifiersData.popperOffsets.y+=o),e.modifiersData[i]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(A){var e=A.state,t=A.options,i=A.name;if(!e.modifiersData[i]._skip){for(var B=t.mainAxis,s=void 0===B||B,c=t.altAxis,n=void 0===c||c,g=t.fallbackPlacements,o=t.padding,r=t.boundary,a=t.rootBoundary,Q=t.altBoundary,I=t.flipVariations,w=void 0===I||I,E=t.allowedAutoPlacements,l=e.options.placement,C=aa(l),M=g||(C===l||!w?[Ra(l)]:function(A){if(aa(A)===Zr)return[];var e=Ra(A);return[ka(A),e,ka(e)]}(l)),Y=[l].concat(M).reduce(function(A,t){return A.concat(aa(t)===Zr?function(A,e){void 0===e&&(e={});var t=e,i=t.placement,B=t.boundary,s=t.rootBoundary,c=t.padding,n=t.flipVariations,g=t.allowedAutoPlacements,o=void 0===g?ia:g,r=pa(i),a=r?n?ta:ta.filter(function(A){return pa(A)===r}):qr,Q=a.filter(function(A){return o.indexOf(A)>=0});0===Q.length&&(Q=a);var I=Q.reduce(function(e,t){return e[t]=Oa(A,{placement:t,boundary:B,rootBoundary:s,padding:c})[aa(t)],e},{});return Object.keys(I).sort(function(A,e){return I[A]-I[e]})}(e,{placement:t,boundary:r,rootBoundary:a,padding:o,flipVariations:w,allowedAutoPlacements:E}):t)},[]),h=e.rects.reference,F=e.rects.popper,y=new Map,d=!0,N=Y[0],D=0;D<Y.length;D++){var U=Y[D],u=aa(U),m=pa(U)===_r,G=[Vr,Or].indexOf(u)>=0,p=G?"width":"height",z=Oa(e,{placement:U,boundary:r,rootBoundary:a,altBoundary:Q,padding:o}),j=G?m?Pr:Xr:m?Or:Vr;h[p]>F[p]&&(j=Ra(j));var x=Ra(j),f=[];if(s&&f.push(z[u]<=0),n&&f.push(z[j]<=0,z[x]<=0),f.every(function(A){return A})){N=U,d=!1;break}y.set(U,f)}if(d)for(var R=function(A){var e=Y.find(function(e){var t=y.get(e);if(t)return t.slice(0,A).every(function(A){return A})});if(e)return N=e,"break"},H=w?3:1;H>0;H--){if("break"===R(H))break}e.placement!==N&&(e.modifiersData[i]._skip=!0,e.placement=N,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(A){var e=A.state,t=A.options,i=A.name,B=t.mainAxis,s=void 0===B||B,c=t.altAxis,n=void 0!==c&&c,g=t.boundary,o=t.rootBoundary,r=t.altBoundary,a=t.padding,Q=t.tether,I=void 0===Q||Q,w=t.tetherOffset,E=void 0===w?0:w,l=Oa(e,{boundary:g,rootBoundary:o,padding:a,altBoundary:r}),C=aa(e.placement),M=pa(e.placement),Y=!M,h=Ua(C),F="x"===h?"y":"x",y=e.modifiersData.popperOffsets,d=e.rects.reference,N=e.rects.popper,D="function"==typeof E?E(Object.assign({},e.rects,{placement:e.placement})):E,U="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),u=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,m={x:0,y:0};if(y){if(s){var G,p="y"===h?Vr:Xr,z="y"===h?Or:Pr,j="y"===h?"height":"width",x=y[h],f=x+l[p],R=x-l[z],H=I?-N[j]/2:0,k=M===_r?d[j]:N[j],J=M===_r?-N[j]:-d[j],b=e.elements.arrow,L=I&&b?Ma(b):{width:0,height:0},S=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},T=S[p],W=S[z],K=ua(0,d[j],L[j]),v=Y?d[j]/2-H-K-T-U.mainAxis:k-K-T-U.mainAxis,V=Y?-d[j]/2+H+K+W+U.mainAxis:J+K+W+U.mainAxis,O=e.elements.arrow&&Da(e.elements.arrow),P=O?"y"===h?O.clientTop||0:O.clientLeft||0:0,X=null!=(G=null==u?void 0:u[h])?G:0,Z=x+V-X,q=ua(I?Ia(f,x+v-X-P):f,x,I?Qa(R,Z):R);y[h]=q,m[h]=q-x}if(n){var _,$="x"===h?Vr:Xr,AA="x"===h?Or:Pr,eA=y[F],tA="y"===F?"height":"width",iA=eA+l[$],BA=eA-l[AA],sA=-1!==[Vr,Xr].indexOf(C),cA=null!=(_=null==u?void 0:u[F])?_:0,nA=sA?iA:eA-d[tA]-N[tA]-cA+U.altAxis,gA=sA?eA+d[tA]+N[tA]-cA-U.altAxis:BA,oA=I&&sA?(aA=ua(nA,eA,rA=gA))>rA?rA:aA:ua(I?nA:iA,eA,I?gA:BA);y[F]=oA,m[F]=oA-eA}var rA,aA;e.modifiersData[i]=m}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(A){var e,t=A.state,i=A.name,B=A.options,s=t.elements.arrow,c=t.modifiersData.popperOffsets,n=aa(t.placement),g=Ua(n),o=[Xr,Pr].indexOf(n)>=0?"height":"width";if(s&&c){var r=function(A,e){return ma("number"!=typeof(A="function"==typeof A?A(Object.assign({},e.rects,{placement:e.placement})):A)?A:Ga(A,qr))}(B.padding,t),a=Ma(s),Q="y"===g?Vr:Xr,I="y"===g?Or:Pr,w=t.rects.reference[o]+t.rects.reference[g]-c[g]-t.rects.popper[o],E=c[g]-t.rects.reference[g],l=Da(s),C=l?"y"===g?l.clientHeight||0:l.clientWidth||0:0,M=w/2-E/2,Y=r[Q],h=C-a[o]-r[I],F=C/2-a[o]/2+M,y=ua(Y,F,h),d=g;t.modifiersData[i]=((e={})[d]=y,e.centerOffset=y-F,e)}},effect:function(A){var e=A.state,t=A.options.element,i=void 0===t?"[data-popper-arrow]":t;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&Ya(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(A){var e=A.state,t=A.name,i=e.rects.reference,B=e.rects.popper,s=e.modifiersData.preventOverflow,c=Oa(e,{elementContext:"reference"}),n=Oa(e,{altBoundary:!0}),g=Pa(c,i),o=Pa(n,B,s),r=Xa(g),a=Xa(o);e.modifiersData[t]={referenceClippingOffsets:g,popperEscapeOffsets:o,isReferenceHidden:r,hasPopperEscaped:a},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":r,"data-popper-escaped":a})}}]});const tQ={matchingText:(A,e)=>"Chinese"==e?/^[\u4e00-\u9fa5]+$/.test(A):"chinese"==e?/[\u4e00-\u9fa5]/.test(A):"email"==e?/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(A):"username"==e?/^[a-zA-Z0-9_]{4,16}$/.test(A):"int+"==e?/^\d+$/.test(A):"int-"==e?/^-\d+$/.test(A):"int"==e?/^-?\d+$/.test(A):"pos"==e?/^\d*\.?\d+$/.test(A):"neg"==e?/^-\d*\.?\d+$/.test(A):"number"==e?/^-?\d*\.?\d+$/.test(A):"phone"==e?/^1[0-9]\d{9}$/.test(A):"idCard"==e?/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(A):"url"==e?/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/.test(A):"IPv4"==e?/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(A):"hex"==e?/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(A):"rgb"==e?/^rgb\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\)$/.test(A):"rgba"==e?/^rgba\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(0?\.\d|1(\.0)?|0)\)$/.test(A):"QQ"==e?/^[1-9][0-9]{4,10}$/.test(A):"weixin"==e?/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/.test(A):"plate"==e&&/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$|^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}[D|F]{1}[A-Z0-9]{5,6}$/.test(A),getUrlParams(A){const e=new RegExp("(^|&)"+A+"=([^&]*)(&|$)");let t=window.location.search.substring(1);if(!t){const A=window.location.hash.split("?");2==A.length&&(t=A[1])}let i=t.match(e);if(i)return decodeURIComponent(i[2])},isEmptyObject(A){return this.isObject(A)&&0==Object.keys(A).length},equal(A,e){if(typeof A!=typeof e)return!1;if(this.isObject(A)&&this.isObject(e)){const t=Object.getOwnPropertyNames(A),i=Object.getOwnPropertyNames(e);if(t.length!=i.length)return!1;const B=t.length;let s=!0;for(let c=0;c<B;c++){const i=t[c],B=A[i],n=e[i];if(!this.equal(B,n)){s=!1;break}}return s}return A===e},isObject:A=>"object"==typeof A&&!!A,copyText(A){if(!navigator.clipboard)throw new Error("navigator.clipboard must be obtained in a secure environment, such as localhost, 127.0.0.1, or https, so the method won't work");return navigator.clipboard.writeText(A)},clone(A){if(this.isObject(A)){if(Array.isArray(A))return A.map(A=>this.clone(A));const e={};for(let t in A)e[t]=this.clone(A[t]);return e}return A}},iQ="_dap-datas",BQ={remove(A,e){const t=A[iQ]||{};e?(delete t[e],A[iQ]=t):A[iQ]={}},has:(A,e)=>(A[iQ]||{}).hasOwnProperty(e),get(A,e){const t=A[iQ]||{};return e?t[e]:t},set(A,e,t){const i=A[iQ]||{};i[e]=t,A[iQ]=i}},sQ=A=>{const e=A.split(/[\s]+/g),t=[];return e.forEach(A=>{const e=A.split("."),i={eventName:e[0]};e.length>1&&(i.guid=e[1]),t.push(i)}),t},cQ=(A,e,t)=>{const i=BQ.get(A,"dap-defined-events")||{},B=Object.keys(i),s=B.length;for(let c=0;c<s;c++){const s=B[c];i[s]&&i[s].type==e&&(t?s==e+"."+t&&(A.removeEventListener(i[s].type,i[s].fn,i[s].options),i[s]=void 0):(A.removeEventListener(i[s].type,i[s].fn,i[s].options),i[s]=void 0))}BQ.set(A,"dap-defined-events",(A=>{const e={};return Object.keys(A).forEach(t=>{A[t]&&(e[t]=A[t])}),e})(i))},nQ={on(A,e,t,i){sQ(e).forEach(e=>{((A,e,t,i,B)=>{const s=BQ.get(A,"dap-defined-events")||{};t||(t=BQ.get(A,"dap-event-guid")||0,BQ.set(A,"dap-event-guid",t+1)),s[t=e+"."+t]&&s[t].type==e&&A.removeEventListener(e,s[t].fn,s[t].options),A.addEventListener(e,i,B),s[t]={type:e,fn:i,options:B},BQ.set(A,"dap-defined-events",s)})(A,e.eventName,e.guid,t.bind(A),i)})},off(A,e){const t=BQ.get(A,"dap-defined-events");if(!t)return;if(!e){const e=Object.keys(t),i=e.length;for(let B=0;B<i;B++){const i=e[B];A.removeEventListener(t[i].type,t[i].fn,t[i].options)}return BQ.remove(A,"dap-defined-events"),void BQ.remove(A,"dap-event-guid")}sQ(e).forEach(e=>{cQ(A,e.eventName,e.guid)})},get(A){const e=BQ.get(A,"dap-defined-events");if(e)return e}},gQ={getImageUrl:A=>window.URL.createObjectURL(A),dataFileToBase64:A=>new Promise(e=>{const t=new FileReader;t.readAsDataURL(A),t.onloadend=()=>{const A=t.result;e(A)}}),dataBase64toFile(A,e){const t=A.split(","),i=t[0].match(/:(.*?);/)[1],B=atob(t[1]);let s=B.length;const c=new Uint8Array(s);for(;s--;)c[s]=B.charCodeAt(s);return new File([c],e,{type:i})},compressImage(A,e){const t=(A,i,B)=>{let s=A.toDataURL("image/"+(e.mimeType??"jpeg"),B),c=this.dataBase64toFile(s,i);if(e.maxSize&&e.maxSize>0&&c.size>1024*e.maxSize){B=B<=0?0:Number((B-.01).toFixed(2));const e=t(A,i,B);s=e.url,c=e.file,B=e.quality}return{file:c,url:s,quality:B}};return new Promise((i,B)=>{const s=new FileReader;s.readAsDataURL(A),s.onload=()=>{const c=s.result,n=new Image;n.src=c,n.onload=()=>{if(e.minSize&&e.minSize>0&&A.size<=1024*e.minSize)return void i({file:A,url:c,quality:1,width:n.width,height:n.height});const B=document.createElement("canvas"),s=B.getContext("2d");B.width=e.width||n.width,B.height=e.width?e.width/(n.width/n.height):n.height,s.drawImage(n,0,0,B.width,B.height);const g=A.name.lastIndexOf("."),o=A.name.substring(0,g)+"."+(e.mimeType??"jpeg");let r=t(B,o,e.quality??.8);i({...r,width:B.width,height:B.height})},n.onerror=()=>{B(new Error("Failed to load image file"))}},s.onerror=()=>{B(new Error("Failed to load image file"))}})}};function oQ(){return oQ=Object.assign?Object.assign.bind():function(A){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(A[i]=t[i])}return A},oQ.apply(null,arguments)}function rQ(A,e){if(null==A)return{};var t={};for(var i in A)if({}.hasOwnProperty.call(A,i)){if(-1!==e.indexOf(i))continue;t[i]=A[i]}return t}function aQ(A,e){return(aQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,e){return A.__proto__=e,A})(A,e)}function QQ(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,aQ(A,e)}function IQ(A,e){return A.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const wQ=!1,EQ=e.createContext(null);var lQ=function(A){return A.scrollTop},CQ="unmounted",MQ="exited",YQ="entering",hQ="entered",FQ="exiting",yQ=function(A){function i(e,t){var i;i=A.call(this,e,t)||this;var B,s=t&&!t.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?s?(B=MQ,i.appearStatus=YQ):B=hQ:B=e.unmountOnExit||e.mountOnEnter?CQ:MQ,i.state={status:B},i.nextCallback=null,i}QQ(i,A),i.getDerivedStateFromProps=function(A,e){return A.in&&e.status===CQ?{status:MQ}:null};var B=i.prototype;return B.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},B.componentDidUpdate=function(A){var e=null;if(A!==this.props){var t=this.state.status;this.props.in?t!==YQ&&t!==hQ&&(e=YQ):t!==YQ&&t!==hQ||(e=FQ)}this.updateStatus(!1,e)},B.componentWillUnmount=function(){this.cancelNextCallback()},B.getTimeouts=function(){var A,e,t,i=this.props.timeout;return A=e=t=i,null!=i&&"number"!=typeof i&&(A=i.exit,e=i.enter,t=void 0!==i.appear?i.appear:e),{exit:A,enter:e,appear:t}},B.updateStatus=function(A,e){if(void 0===A&&(A=!1),null!==e)if(this.cancelNextCallback(),e===YQ){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:t.findDOMNode(this);i&&lQ(i)}this.performEnter(A)}else this.performExit();else this.props.unmountOnExit&&this.state.status===MQ&&this.setState({status:CQ})},B.performEnter=function(A){var e=this,i=this.props.enter,B=this.context?this.context.isMounting:A,s=this.props.nodeRef?[B]:[t.findDOMNode(this),B],c=s[0],n=s[1],g=this.getTimeouts(),o=B?g.appear:g.enter;!A&&!i||wQ?this.safeSetState({status:hQ},function(){e.props.onEntered(c)}):(this.props.onEnter(c,n),this.safeSetState({status:YQ},function(){e.props.onEntering(c,n),e.onTransitionEnd(o,function(){e.safeSetState({status:hQ},function(){e.props.onEntered(c,n)})})}))},B.performExit=function(){var A=this,e=this.props.exit,i=this.getTimeouts(),B=this.props.nodeRef?void 0:t.findDOMNode(this);e&&!wQ?(this.props.onExit(B),this.safeSetState({status:FQ},function(){A.props.onExiting(B),A.onTransitionEnd(i.exit,function(){A.safeSetState({status:MQ},function(){A.props.onExited(B)})})})):this.safeSetState({status:MQ},function(){A.props.onExited(B)})},B.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},B.safeSetState=function(A,e){e=this.setNextCallback(e),this.setState(A,e)},B.setNextCallback=function(A){var e=this,t=!0;return this.nextCallback=function(i){t&&(t=!1,e.nextCallback=null,A(i))},this.nextCallback.cancel=function(){t=!1},this.nextCallback},B.onTransitionEnd=function(A,e){this.setNextCallback(e);var i=this.props.nodeRef?this.props.nodeRef.current:t.findDOMNode(this),B=null==A&&!this.props.addEndListener;if(i&&!B){if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=s[0],n=s[1];this.props.addEndListener(c,n)}null!=A&&setTimeout(this.nextCallback,A)}else setTimeout(this.nextCallback,0)},B.render=function(){var A=this.state.status;if(A===CQ)return null;var t=this.props,i=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var B=rQ(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return e.createElement(EQ.Provider,{value:null},"function"==typeof i?i(A,B):e.cloneElement(e.Children.only(i),B))},i}(e.Component);function dQ(){}yQ.contextType=EQ,yQ.propTypes={},yQ.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:dQ,onEntering:dQ,onEntered:dQ,onExit:dQ,onExiting:dQ,onExited:dQ},yQ.UNMOUNTED=CQ,yQ.EXITED=MQ,yQ.ENTERING=YQ,yQ.ENTERED=hQ,yQ.EXITING=FQ;var NQ=function(A,e){return A&&e&&e.split(" ").forEach(function(e){return i=e,void((t=A).classList?t.classList.remove(i):"string"==typeof t.className?t.className=IQ(t.className,i):t.setAttribute("class",IQ(t.className&&t.className.baseVal||"",i)));var t,i})},DQ=function(A){function t(){for(var e,t=arguments.length,i=new Array(t),B=0;B<t;B++)i[B]=arguments[B];return(e=A.call.apply(A,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(A,t){var i=e.resolveArguments(A,t),B=i[0],s=i[1];e.removeClasses(B,"exit"),e.addClass(B,s?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(A,t)},e.onEntering=function(A,t){var i=e.resolveArguments(A,t),B=i[0],s=i[1]?"appear":"enter";e.addClass(B,s,"active"),e.props.onEntering&&e.props.onEntering(A,t)},e.onEntered=function(A,t){var i=e.resolveArguments(A,t),B=i[0],s=i[1]?"appear":"enter";e.removeClasses(B,s),e.addClass(B,s,"done"),e.props.onEntered&&e.props.onEntered(A,t)},e.onExit=function(A){var t=e.resolveArguments(A)[0];e.removeClasses(t,"appear"),e.removeClasses(t,"enter"),e.addClass(t,"exit","base"),e.props.onExit&&e.props.onExit(A)},e.onExiting=function(A){var t=e.resolveArguments(A)[0];e.addClass(t,"exit","active"),e.props.onExiting&&e.props.onExiting(A)},e.onExited=function(A){var t=e.resolveArguments(A)[0];e.removeClasses(t,"exit"),e.addClass(t,"exit","done"),e.props.onExited&&e.props.onExited(A)},e.resolveArguments=function(A,t){return e.props.nodeRef?[e.props.nodeRef.current,A]:[A,t]},e.getClassNames=function(A){var t=e.props.classNames,i="string"==typeof t,B=i?""+(i&&t?t+"-":"")+A:t[A];return{baseClassName:B,activeClassName:i?B+"-active":t[A+"Active"],doneClassName:i?B+"-done":t[A+"Done"]}},e}QQ(t,A);var i=t.prototype;return i.addClass=function(A,e,t){var i=this.getClassNames(e)[t+"ClassName"],B=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===t&&B&&(i+=" "+B),"active"===t&&A&&lQ(A),i&&(this.appliedClasses[e][t]=i,function(A,e){A&&e&&e.split(" ").forEach(function(e){return i=e,void((t=A).classList?t.classList.add(i):function(A,e){return A.classList?!!e&&A.classList.contains(e):-1!==(" "+(A.className.baseVal||A.className)+" ").indexOf(" "+e+" ")}(t,i)||("string"==typeof t.className?t.className=t.className+" "+i:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+i)));var t,i})}(A,i))},i.removeClasses=function(A,e){var t=this.appliedClasses[e],i=t.base,B=t.active,s=t.done;this.appliedClasses[e]={},i&&NQ(A,i),B&&NQ(A,B),s&&NQ(A,s)},i.render=function(){var A=this.props;A.classNames;var t=rQ(A,["classNames"]);return e.createElement(yQ,oQ({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(e.Component);DQ.defaultProps={classNames:""},DQ.propTypes={};const UQ="_kaitify-bubble_1yv5r_1",uQ="_kaitify-dark_1yv5r_12",mQ="_kaitify-bubble-enter_1yv5r_18",GQ="_kaitify-bubble-exit_1yv5r_21",pQ="_kaitify-bubble-enter-active_1yv5r_24",zQ="_kaitify-bubble-exit-active_1yv5r_28",jQ=e.forwardRef((A,t)=>{const i=e.useId(),{state:B,disabled:s,isMouseDown:c,el:n,dark:g}=eo(),o=e.useRef(null),r=e.useRef(null),a=e.useMemo(()=>!s&&((!c||!A.hideOnMousedown)&&(A.visible??!1)),[s,c,A.hideOnMousedown,A.visible]),Q=()=>{r.current&&(r.current.destroy(),r.current=null)},I=()=>{if(!a||!o.current||!B.editor.value)return;const e=(()=>{if(!B.editor.value||!n)return null;if(B.editor.value.selection.focused()){if(A.match){const e=B.editor.value.getMatchNodeBySelection(A.match);if(e)return B.editor.value.findDom(e).getBoundingClientRect()}const e=window.getSelection();if(!e||!e.rangeCount)return n.getBoundingClientRect();const t=e.getRangeAt(0).getClientRects();if(t.length){const A=t[t.length-1];return{top:A.top,left:A.left,right:A.left+A.width,bottom:A.top+A.height,width:A.width,height:A.height,x:A.left,y:A.top,toJSON:()=>{}}}}return n.getBoundingClientRect()})();Q(),r.current=eQ({getBoundingClientRect:()=>e},o.current,{placement:"bottom-start",modifiers:[{name:"computeStyles",options:{adaptive:!0,gpuAcceleration:!1}},{name:"flip",options:{enabled:!0,fallbackPlacements:["bottom","bottom-end","top-start","top","top-end","left","left-start","left-end","right","right-start","right-end"]}},{name:"offset",options:{offset:[0,5]}},{name:"preventOverflow",options:{enabled:!0,boundary:"viewport",padding:5}}]})},w=A=>{nQ.on(A,`scroll.kaitify_bubble_${i}`,()=>{a&&I()}),A.parentNode&&w(A.parentNode)},E=A=>{nQ.off(A,`scroll.kaitify_bubble_${i}`),A.parentNode&&E(A.parentNode)};return e.useImperativeHandle(t,()=>({elRef:o,popperInstance:r})),e.useEffect(()=>{I()},[B.selection]),e.useEffect(()=>{n&&a&&(E(n),w(n))},[n,a]),e.useEffect(()=>()=>{Q(),n&&E(n)},[]),Xg.jsx(Lr,{children:Xg.jsx(DQ,{in:a,timeout:50,classNames:{enter:mQ,enterActive:pQ,exit:GQ,exitActive:zQ},unmountOnExit:!0,nodeRef:o,onEnter:()=>{var e;null==(e=A.onShow)||e.call(A,o.current)},onEntering:()=>{var e;I(),null==(e=A.onShowing)||e.call(A,o.current)},onEntered:()=>{var e;null==(e=A.onShown)||e.call(A,o.current)},onExit:()=>{var e;null==(e=A.onHide)||e.call(A,o.current)},onExiting:()=>{var e;null==(e=A.onHiding)||e.call(A,o.current)},onExited:()=>{var e;Q(),null==(e=A.onHidden)||e.call(A,o.current)},children:Xg.jsx("div",{ref:o,className:qg(UQ,{[uQ]:g},A.className),style:{zIndex:5,...A.style},children:A.children})})})}),xQ="_kaitify-popover-refer_1qt0d_1",fQ="_kaitify-dark_1qt0d_14",RQ="_kaitify-popover_1qt0d_1",HQ="_kaitify-popover-wrapper_1qt0d_48",kQ="_kaitify-popover-content_1qt0d_55",JQ="_kaitify-popover-arrow_1qt0d_64",bQ="_kaitify-popover-translate-enter_1qt0d_171",LQ="_kaitify-popover-translate-exit_1qt0d_175",SQ="_kaitify-popover-translate-enter-active_1qt0d_179",TQ="_kaitify-popover-translate-exit-active_1qt0d_184",WQ="_kaitify-popover-fade-enter_1qt0d_189",KQ="_kaitify-popover-fade-exit_1qt0d_193",vQ="_kaitify-popover-fade-enter-active_1qt0d_197",VQ="_kaitify-popover-fade-exit-active_1qt0d_202",OQ=e.forwardRef(({placement:A="bottom",trigger:t="hover",delay:i=0,animation:B="translate",...s},c)=>{const n=e.useId(),{dark:g}=eo(),[o,r]=e.useState(!1),[a,Q]=e.useState(A),I=e.useRef(null),w=e.useRef(null),E=e.useRef(null),l=e.useRef(),C=e.useRef(),M=e.useMemo(()=>A.startsWith("top")?["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].filter(e=>e!=A):A.startsWith("bottom")?["bottom","bottom-start","bottom-end","top","top-start","top-end","left","left-start","left-end","right","right-start","right-end"].filter(e=>e!=A):A.startsWith("left")?["left","left-start","left-end","right","right-start","right-end","top","top-start","top-end","bottom","bottom-start","bottom-end"].filter(e=>e!=A):["right","right-start","right-end","left","left-start","left-end","top","top-start","top-end","bottom","bottom-start","bottom-end"].filter(e=>e!=A),[A]),Y=async()=>{l.current&&(await l.current.update(),Q(l.current.state.placement))},h=()=>{l.current&&(l.current.destroy(),l.current=void 0)},F=()=>{if(!s.disabled)return i>0?(C.current&&clearTimeout(C.current),void(C.current=setTimeout(()=>{r(!0)},i))):void r(!0)},y=()=>{r(!1)},d=A=>{var e,i;"hover"==t&&((null==(e=I.current)?void 0:e.contains(A.relatedTarget))||(null==(i=E.current)?void 0:i.contains(A.relatedTarget))||y())};return e.useImperativeHandle(c,()=>({visible:o,showPopover:F,hidePopover:y,popperInstance:l,realPlacement:a,update:Y})),e.useEffect(()=>{Q(A),l.current&&o&&(l.current.state.options.placement=A,l.current.state.options.modifiers.find(A=>"flip"===A.name).options.fallbackPlacements=M,Y())},[A]),e.useEffect(()=>(nQ.on(document.documentElement,`click.kaitify-popover-${n}`,A=>{var e,t;(null==(e=I.current)?void 0:e.contains(A.target))||(null==(t=E.current)?void 0:t.contains(A.target))||y()}),()=>{h(),nQ.off(document.documentElement,`click.kaitify-popover-${n}`)}),[]),Xg.jsxs(Xg.Fragment,{children:[Xg.jsx("div",{ref:I,className:qg(xQ,{[fQ]:g}),onMouseEnter:()=>{"hover"==t&&F()},onMouseLeave:d,onClick:()=>{"click"==t&&(o?y():F())},children:s.refer}),Xg.jsx(Lr,{to:"body",children:Xg.jsx(DQ,{in:o,timeout:200,classNames:{enter:"translate"===B?bQ:WQ,enterActive:"translate"===B?SQ:vQ,exit:"translate"===B?LQ:KQ,exitActive:"translate"===B?TQ:VQ},nodeRef:E,unmountOnExit:!0,onEnter:()=>{var A;null==(A=s.onShow)||A.call(s,E.current)},onEntering:()=>{var e;l.current=eQ(I.current,E.current,{placement:A,modifiers:[{name:"computeStyles",options:{adaptive:!0,gpuAcceleration:!1}},{name:"flip",options:{enabled:!0,fallbackPlacements:M}},{name:"offset",options:{offset:[0,0]}},{name:"arrow",options:{element:w.current}},{name:"preventOverflow",options:{enabled:!0,boundary:"viewport",padding:5}}]}),null==(e=s.onShowing)||e.call(s,E.current)},onEntered:()=>{var A;null==(A=s.onShown)||A.call(s,E.current)},onExit:()=>{var A;null==(A=s.onHide)||A.call(s,E.current)},onExiting:()=>{var A;null==(A=s.onHiding)||A.call(s,E.current)},onExited:()=>{var A;h(),null==(A=s.onHidden)||A.call(s,E.current)},children:Xg.jsx("div",{ref:E,className:qg(RQ,{[fQ]:g}),onMouseLeave:d,"data-arrow":s.arrow,"data-placement":a,style:{zIndex:s.zIndex??10},children:Xg.jsxs("div",{className:HQ,children:[Xg.jsx("div",{className:kQ,style:{width:s.width??"auto",maxHeight:s.maxHeight??"",minWidth:s.minWidth??""},children:s.children}),s.arrow&&Xg.jsx("div",{ref:w,className:JQ,"data-placement":a})]})})})})]})}),PQ="_kaitify-button_1f15o_1",XQ="_kaitify-dark_1f15o_22",ZQ="_kaitify-button-active_1f15o_35",qQ="_kaitify-button-block_1f15o_43",_Q="_kaitify-button-large_1f15o_47";function $Q(A){const{dark:e}=eo();return Xg.jsx("button",{className:qg(PQ,A.className,{[ZQ]:A.active,[qQ]:A.block,[_Q]:A.large,[XQ]:e}),style:A.style,disabled:A.disabled,type:"button",role:"button",onClick:A.onClick,children:A.children})}const AI="_kaitify-menu_1fr0d_1",eI="_kaitify-menu-caret_1fr0d_15",tI="_kaitify-menu-caret-rotate_1fr0d_21",iI="_kaitify-menu-options_1fr0d_24",BI="_kaitify-menu-option_1fr0d_24",sI="_kaitify-menu-option-icon_1fr0d_44",cI="_kaitify-disabled_1fr0d_47",nI="_kaitify-menu-option-active_1fr0d_56",gI="_kaitify-dark_1fr0d_64",oI=e.forwardRef(({data:A=[],popover:t=!1,popoverProps:i={width:"auto",placement:"bottom-start",arrow:!1,trigger:"click",animation:"translate"},...B},s)=>{const c=e.useId(),{el:n,dark:g}=eo(),o=e.useRef(null),[r,a]=e.useState(!1),Q=()=>{var A;null==(A=o.current)||A.hidePopover()},I=()=>{var A;null==(A=o.current)||A.showPopover()},w=A=>{var e,t;B.disabled||(null==(e=B.itemDisabled)?void 0:e.call(B,A))||(null==(t=B.onSelect)||t.call(B,A),Q())},E=()=>{var A;B.disabled||t||null==(A=B.onOperate)||A.call(B)},l=(A,e)=>"function"==typeof e?e(A):e;return e.useImperativeHandle(s,()=>({showPopover:I,hidePopover:Q})),e.useEffect(()=>{n&&B.shortcut&&(nQ.off(n,`keydown.kaitify_menu_${c}`),nQ.on(n,`keydown.kaitify_menu_${c}`,e=>{if(t&&tQ.isObject(B.shortcut)){const t=B.shortcut;A.forEach(A=>{"function"==typeof t[A.value]&&t[A.value](e)&&w(A)})}else"function"==typeof B.shortcut&&B.shortcut(e)&&E()}))},[n]),e.useEffect(()=>()=>{n&&nQ.off(n,`keydown.kaitify_menu_${c}`)},[]),Xg.jsx("div",{className:AI,children:Xg.jsxs(OQ,{ref:o,delay:100,disabled:B.disabled||!t,zIndex:i.zIndex??10,animation:i.animation??"translate",arrow:i.arrow,placement:i.placement??"bottom-start",trigger:i.trigger??"click",width:i.width,maxHeight:i.maxHeight,minWidth:i.minWidth,onShow:A=>{var e;null==(e=i.onShow)||e.call(i,A),a(!0)},onShowing:i.onShowing,onShown:i.onShown,onHide:A=>{var e;null==(e=i.onHide)||e.call(i,A),a(!1)},onHiding:i.onHiding,onHidden:i.onHidden,refer:Xg.jsxs($Q,{onClick:E,disabled:B.disabled,active:B.active,children:[B.children,t&&Xg.jsx(kr,{name:"kaitify-icon-caret-down",className:qg(eI,{[tI]:r})})]}),children:[B.customPopover,!B.customPopover&&A.length>0&&Xg.jsx("div",{className:qg(iI,{[gI]:g}),children:A.map(A=>{var e,t;return Xg.jsxs("div",{onClick:()=>w(A),className:qg(BI,{[nI]:null==(e=B.itemActive)?void 0:e.call(B,A),[cI]:null==(t=B.itemDisabled)?void 0:t.call(B,A)}),children:[B.customIcon?l(A,B.customIcon):!!A.icon&&Xg.jsx(kr,{name:A.icon,className:sI}),B.customLabel?l(A,B.customLabel):Xg.jsx("span",{children:A.label})]},A.value)})})]})})});const rI="_kaitify-attachment-upload_hlc4c_1",aI="_kaitify-dark_hlc4c_28",QI="_kaitify-attachment-remote_hlc4c_31",II="_kaitify-attachment-remote-footer_hlc4c_63",wI="_kaitify-attachment-update_hlc4c_78",EI="_kaitify-attachment-update-footer_hlc4c_110";const lI="_kaitify-colors-panel_7iz13_1",CI="_kaitify-colors-header_7iz13_6",MI="_kaitify-colors-header-text_7iz13_13",YI="_kaitify-colors-content_7iz13_16",hI="_kaitify-colors-el_7iz13_22",FI="_kaitify-color-el-active_7iz13_27",yI="_kaitify-dark_7iz13_42",dI=["#000000","#505050","#808080","#BBBBBB","#CCCCCC","#EEEEEE","#F7F7F7","#FFFFFF","#EC1A0A","#FF9900","#FFFF00","#07C160","#00FFFF","#0B73DE","#9C00FF","#FF00FF","#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE","#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD","#e45649","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5","#CE0000","#E79439","#EFC631","#50a14f","#4A7B8C","#03A8F3","#634AA5","#A54A7B","#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842","#630000","#7B3900","#986801","#295218","#083139","#003163","#21104A","#4A1031"];const NI="_kaitify-colors-panel_7iz13_1",DI="_kaitify-colors-header_7iz13_6",UI="_kaitify-colors-header-text_7iz13_13",uI="_kaitify-colors-content_7iz13_16",mI="_kaitify-colors-el_7iz13_22",GI="_kaitify-color-el-active_7iz13_27",pI="_kaitify-dark_7iz13_42",zI=["#000000","#505050","#808080","#BBBBBB","#CCCCCC","#EEEEEE","#F7F7F7","#FFFFFF","#EC1A0A","#FF9900","#FFFF00","#07C160","#00FFFF","#0B73DE","#9C00FF","#FF00FF","#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE","#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD","#e45649","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5","#CE0000","#E79439","#EFC631","#50a14f","#4A7B8C","#03A8F3","#634AA5","#A54A7B","#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842","#630000","#7B3900","#986801","#295218","#083139","#003163","#21104A","#4A1031"];const jI="_kaitify-emoji-panel_1m135_1",xI="_kaitify-emoji-el_1m135_8",fI=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","😉","😍","😘","😗","😚","🥰","😋","😜","🤪","🤨","😭","😢","😔","😞","😰","😱","😨","😳","😡","😠","🤬","👍","👎","👏","🙌","👐","🤝","✌","🤞","🤘","❤️","💕","💖","💗","💘","💔","❣","🖤","💙","💚","🍏","🍎","🍌","🍉","🍇","🍓","🍒","🍑","🍕","🍔","🍟","🌭","🍗","🍞","🚗","🚕","🚙","🚌","🚑","🚓","🚚","🚲","🚜","🚂","✈️","🚀","🎉","🎊","🎁","🔥","🌈","⭐","💡","⏰","📅","📌","🎶","🎵"];const RI="_kaitify-image-upload_1dzmn_1",HI="_kaitify-dark_1dzmn_28",kI="_kaitify-image-remote_1dzmn_31",JI="_kaitify-image-remote-footer_1dzmn_63",bI="_kaitify-image-update_1dzmn_78",LI="_kaitify-image-update-footer_1dzmn_110";const SI="_kaitify-link_2x8z9_1",TI="_kaitify-link-footer_2x8z9_33",WI="_kaitify-dark_2x8z9_39";const KI="_kaitify-math_1xoz6_1",vI="_kaitify-math-textarea_1xoz6_6",VI="_kaitify-math-footer_1xoz6_34",OI="_kaitify-dark_1xoz6_40";const PI="_kaitify-ordered-list_1wgxa_1",XI="_kaitify-ordered-list-item_1wgxa_8",ZI="_kaitify-ordered-list-item-button_1wgxa_11";const qI="_kaitify-table_aij2n_1",_I="_kaitify-table-inside_aij2n_29",$I="_kaitify-table-footer_aij2n_32",Aw="_kaitify-dark_aij2n_41";const ew="_kaitify-unordered-list_n8eec_1",tw="_kaitify-unordered-list-item_n8eec_8";const iw="_kaitify-video-upload_1z0be_1",Bw="_kaitify-video-upload-wrapper_1z0be_5",sw="_kaitify-video-upload-footer_1z0be_31",cw="_kaitify-video-remote_1z0be_38",nw="_kaitify-video-remote-footer_1z0be_66",gw="_kaitify-dark_1z0be_72";A.AlignCenterMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isAlign)?void 0:i.call(e,"center"))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetAlign)||B.call(e,"center"):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setAlign)||n.call(c,"center")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-align-center"})})},A.AlignExtension=JA,A.AlignJustifyMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isAlign)?void 0:i.call(e,"justify"))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetAlign)||B.call(e,"justify"):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setAlign)||n.call(c,"justify")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-align-justify"})})},A.AlignLeftMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isAlign)?void 0:i.call(e,"left"))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetAlign)||B.call(e,"left"):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setAlign)||n.call(c,"left")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-align-left"})})},A.AlignRightMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isAlign)?void 0:i.call(e,"right"))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetAlign)||B.call(e,"right"):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setAlign)||n.call(c,"right")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-align-right"})})},A.AttachmentExtension=dg,A.AttachmentMenu=function({tabs:A={data:["remote","upload"],default:"remote"},...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),[E,l]=e.useState({url:"",text:""}),[C,M]=e.useState({url:"",text:""}),Y=e.useMemo(()=>A.data.map(A=>[{label:Q("远程地址"),value:"remote"},{label:Q("本地上传"),value:"upload"}].find(e=>e.value==A)),[A]),h=e.useMemo(()=>{var A,e,t;return!!(null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).getAttachment)?void 0:t.call(e))},[a.editor]),F=e.useMemo(()=>{var A,e,i,B,s,c,n,g,o;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!!(null==(i=(e=a.editor.value.commands).hasMath)?void 0:i.call(e))||(!!(null==(s=(B=a.editor.value.commands).hasCodeBlock)?void 0:s.call(B))||(!!(null==(n=(c=a.editor.value.commands).hasLink)?void 0:n.call(c))||(!(!(null==(o=(g=a.editor.value.commands).hasAttachment)?void 0:o.call(g))||h)||(t.disabled??!1)))))},[a.editor,t.disabled,h]),y=async A=>{var e,i,B,s;const c=null==(e=A.currentTarget.files)?void 0:e[0];if(!c||!a.editor.value)return;const n="function"==typeof t.customUpload?await t.customUpload(c):await gQ.dataFileToBase64(c);n&&(null==(B=(i=a.editor.value.commands).setAttachment)||B.call(i,{url:n,text:c.name||Q("附件"),icon:t.iconUrl}),null==(s=w.current)||s.hidePopover())},d=async()=>{var A,e,i;E.url&&E.text&&a.editor.value&&(null==(e=(A=a.editor.value.commands).setAttachment)||e.call(A,{url:E.url,text:E.text,icon:t.iconUrl}),null==(i=w.current)||i.hidePopover())};return Xg.jsx(oI,{ref:w,disabled:F,active:h,popover:!0,popoverProps:{width:(null==(i=t.popoverProps)?void 0:i.width)??300,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex,onShowing:()=>{var A,e,t;const i=null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).getAttachmentInfo)?void 0:t.call(e);i?M({text:i.text,url:i.url}):l({text:"",url:""})}},customPopover:h?Xg.jsxs("div",{className:qg(wI,{[aI]:I}),children:[Xg.jsx("input",{value:C.text,onChange:A=>M(e=>({...e,text:A.target.value})),placeholder:Q("附件名称"),type:"text"}),Xg.jsx("input",{value:C.url,onChange:A=>M(e=>({...e,url:A.target.value})),placeholder:Q("附件地址"),type:"url"}),Xg.jsx("div",{className:EI,children:Xg.jsx($Q,{onClick:async()=>{var A,e,t;C.url&&C.text&&a.editor.value&&(null==(e=(A=a.editor.value.commands).updateAttachment)||e.call(A,{url:C.url,text:C.text}),null==(t=w.current)||t.hidePopover())},disabled:!C.url||!C.text,children:Q("更新")})})]}):Xg.jsx(ro,{defaultValue:A.default,data:Y,children:A=>Xg.jsxs(Xg.Fragment,{children:["remote"===A&&Xg.jsxs("div",{className:qg(QI,{[aI]:I}),children:[Xg.jsx("input",{value:E.text,onChange:A=>l(e=>({...e,text:A.target.value})),placeholder:Q("附件名称"),type:"text"}),Xg.jsx("input",{value:E.url,onChange:A=>l(e=>({...e,url:A.target.value})),placeholder:Q("附件地址"),type:"url"}),Xg.jsx("div",{className:II,children:Xg.jsx($Q,{onClick:d,disabled:!E.url||!E.text,children:Q("插入")})})]}),"upload"===A&&Xg.jsxs("div",{className:qg(rI,{[aI]:I}),children:[Xg.jsx("input",{type:"file",accept:"*",onChange:y}),Xg.jsx(kr,{name:"kaitify-icon-upload"})]})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-attachment"})})},A.BackColorExtension=RA,A.BackColorMenu=function({colors:A=dI,...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),E=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isBackColor)?void 0:i.call(t,A))??!1},[a.editor]),l=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!a.editor.value.selection.collapsed()&&!a.editor.value.getFocusNodesBySelection("text").length||(!(!a.editor.value.selection.collapsed()||!(null==(i=(e=a.editor.value.commands).getAttachment)?void 0:i.call(e))&&!(null==(s=(B=a.editor.value.commands).getMath)?void 0:s.call(B)))||(!!(null==(n=(c=a.editor.value.commands).getCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]);return Xg.jsx(oI,{ref:w,disabled:l,active:!1,popover:!0,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},customPopover:Xg.jsxs("div",{className:qg(lI,{[yI]:I}),children:[Xg.jsx("div",{className:CI,children:Xg.jsxs($Q,{onClick:()=>{var A,e,t;a.editor.value&&(null==(e=(A=a.editor.value.commands).removeTextStyle)||e.call(A,["backgroundColor","background"]),null==(t=w.current)||t.hidePopover())},block:!0,large:!0,children:[Xg.jsx(kr,{name:"kaitify-icon-remove"}),Xg.jsx("span",{className:MI,children:Q("默认颜色")})]})}),Xg.jsx("div",{className:YI,children:A.map(A=>Xg.jsx("div",{className:qg(hI,{[FI]:E(A)}),children:Xg.jsx("div",{style:{background:A},onClick:()=>{return e=A,void(a.editor.value&&!(null==(i=(t=a.editor.value.commands).isBackColor)?void 0:i.call(t,e))&&(null==(s=(B=a.editor.value.commands).setBackColor)||s.call(B,e),null==(c=w.current)||c.hidePopover()));var e,t,i,B,s,c}})},A))})]}),children:Xg.jsx(kr,{name:"kaitify-icon-brush"})})},A.BlockquoteExtension=KA,A.BlockquoteMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).allBlockquote)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetBlockquote)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setBlockquote)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-quote"})})},A.BoldExtension=DA,A.BoldMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isBold)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetBold)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setBold)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-bold"})})},A.Bubble=jQ,A.Checkbox=Co,A.ClearFormatMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||A.disabled},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).clearFormat)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-format-clear"})})},A.CodeBlockExtension=yg,A.CodeBlockLanguagesMenu=function({languages:A=[...Yg],...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q}=eo(),I=e.useRef(null),w=e.useMemo(()=>[{label:Q("自动识别"),value:""},...A.map(A=>({label:A.charAt(0).toLocaleUpperCase()+A.slice(1),value:A}))],[A]),E=e.useMemo(()=>{var A,e,i;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!(null==(i=(e=a.editor.value.commands).getCodeBlock)?void 0:i.call(e))||(t.disabled??!1))},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;if(!(null==(e=a.editor.value)?void 0:e.selection.focused()))return!1;const B=null==(i=(t=a.editor.value.commands).getCodeBlock)?void 0:i.call(t);return!!B&&(""==A.value?!B.hasMarks()||!B.marks["kaitify-hljs"]:B.marks["kaitify-hljs"]===A.value)},[a.editor]),C=e.useMemo(()=>{var A;return(null==(A=a.editor.value)?void 0:A.selection.focused())?w.find(A=>l(A))??w[0]:w[0]},[a.editor,w]);return Xg.jsx(oI,{ref:I,disabled:E,active:!1,popover:!0,data:w,itemActive:l,onSelect:A=>{var e,t,i;null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).updateCodeBlockLanguage)||i.call(t,A.value)},shortcut:t.shortcut,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:(null==(B=t.popoverProps)?void 0:B.maxHeight)??240,minWidth:(null==(s=t.popoverProps)?void 0:s.minWidth)??80,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},children:(null==C?void 0:C.label)??""})},A.CodeBlockMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).allCodeBlock)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetCodeBlock)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setCodeBlock)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-code-block"})})},A.CodeExtension=zA,A.CodeMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).allCode)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g,o,r;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!!(null==(B=(i=t.editor.value.commands).hasAttachment)?void 0:B.call(i))||(!!(null==(c=(s=t.editor.value.commands).hasMath)?void 0:c.call(s))||(!!(null==(g=(n=t.editor.value.commands).hasLink)?void 0:g.call(n))||(!!(null==(r=(o=t.editor.value.commands).hasCodeBlock)?void 0:r.call(o))||(A.disabled??!1)))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetCode)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setCode)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-code"})})},A.ColorExtension=fA,A.ColorMenu=function({colors:A=zI,...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),E=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!a.editor.value.selection.collapsed()&&!a.editor.value.getFocusNodesBySelection("text").length||(!(!a.editor.value.selection.collapsed()||!(null==(i=(e=a.editor.value.commands).getAttachment)?void 0:i.call(e))&&!(null==(s=(B=a.editor.value.commands).getMath)?void 0:s.call(B)))||(!!(null==(n=(c=a.editor.value.commands).getCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isColor)?void 0:i.call(t,A))??!1},[a.editor]);return Xg.jsx(oI,{ref:w,disabled:E,active:!1,popover:!0,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},customPopover:Xg.jsx(Xg.Fragment,{children:Xg.jsxs("div",{className:qg(NI,{[pI]:I}),children:[Xg.jsx("div",{className:DI,children:Xg.jsxs($Q,{onClick:()=>{var A,e,t,i;null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).removeTextStyle)||t.call(e,["color"]),null==(i=w.current)||i.hidePopover()},block:!0,large:!0,children:[Xg.jsx(kr,{name:"kaitify-icon-remove"}),Xg.jsx("span",{className:UI,children:Q("默认颜色")})]})}),Xg.jsx("div",{className:uI,children:A.map(A=>Xg.jsx("div",{className:qg(mI,{[GI]:l(A)}),children:Xg.jsx("div",{style:{background:A},onClick:()=>{var e,t,i,B,s;l(e=A)||(null==(B=null==(t=a.editor.value)?void 0:(i=t.commands).setColor)||B.call(i,e),null==(s=w.current)||s.hidePopover())}})},A))})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-font-color"})})},A.DecreaseIndentMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).canUseIndent)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).setDecreaseIndent)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-indent-decrease"})})},A.Divider=function(){const{dark:A}=eo();return Xg.jsx("div",{className:qg(to,{[io]:A})})},A.Editor=Jg,A.EmojiMenu=function({data:A=fI,...t}){var i,B,s,c,n,g,o,r;const{state:a}=eo(),Q=e.useRef(null),I=e.useMemo(()=>{var A;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(t.disabled??!1)},[a.editor,t.disabled]);return Xg.jsx(oI,{ref:Q,disabled:I,active:!1,popover:!0,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},customPopover:Xg.jsx("div",{className:jI,children:A.map((A,e)=>Xg.jsx("div",{className:xI,children:Xg.jsx("div",{onClick:()=>{return e=A,null==(t=a.editor.value)||t.insertText(e),null==(i=a.editor.value)||i.updateView(),void(null==(B=Q.current)||B.hidePopover());var e,t,i,B},children:A})},e))}),children:Xg.jsx(kr,{name:"kaitify-icon-emoji"})})},A.Extension=QA,A.FontFamilyExtension=xA,A.FontFamilyMenu=function({data:A=[{label:"黑体",value:"黑体,黑体-简"},{label:"华文仿宋",value:"华文仿宋"},{label:"楷体",value:"楷体,楷体-简"},{label:"华文楷体",value:"华文楷体"},{label:"宋体",value:"宋体,宋体-简"},{label:"Arial",value:"Arial"},{label:"Consolas",value:"Consolas,monospace"}],...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q}=eo(),I=e.useRef(null),w=e.useMemo(()=>[{label:Q("默认字体"),value:""},...A],[A]),E=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!a.editor.value.selection.collapsed()&&!a.editor.value.getFocusNodesBySelection("text").length||(!(!a.editor.value.selection.collapsed()||!(null==(i=(e=a.editor.value.commands).getAttachment)?void 0:i.call(e))&&!(null==(s=(B=a.editor.value.commands).getMath)?void 0:s.call(B)))||(!!(null==(n=(c=a.editor.value.commands).getCodeBlock)?void 0:n.call(c))||t.disabled)))},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isFontFamily)?void 0:i.call(t,A.value))??!1},[a.editor]),C=e.useMemo(()=>w.find(A=>l(A))??w[0],[w,l]);return Xg.jsx(oI,{ref:I,disabled:E,active:!1,popover:!0,data:w,itemActive:l,shortcut:t.shortcut,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:(null==(B=t.popoverProps)?void 0:B.maxHeight)??240,minWidth:(null==(s=t.popoverProps)?void 0:s.minWidth)??90,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},onSelect:A=>{var e,t,i,B,s,c,n;""==A.value?null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).removeTextStyle)||i.call(t,["fontFamily"]):l(A)?null==(B=a.editor.value)||B.updateRealSelection():null==(n=null==(s=a.editor.value)?void 0:(c=s.commands).setFontFamily)||n.call(c,A.value)},children:C.label??""})},A.FontSizeExtension=jA,A.FontSizeMenu=function({data:A=[{label:"12px",value:"12px"},{label:"14px",value:"14px"},{label:"16px",value:"16px"},{label:"18px",value:"18px"},{label:"20px",value:"20px"},{label:"24px",value:"24px"},{label:"28px",value:"28px"},{label:"32px",value:"32px"},{label:"36px",value:"36px"},{label:"40px",value:"40px"}],...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q}=eo(),I=e.useRef(null),w=e.useMemo(()=>[{label:Q("默认字号"),value:""},...A],[A]),E=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!a.editor.value.selection.collapsed()&&!a.editor.value.getFocusNodesBySelection("text").length||(!(!a.editor.value.selection.collapsed()||!(null==(i=(e=a.editor.value.commands).getAttachment)?void 0:i.call(e))&&!(null==(s=(B=a.editor.value.commands).getMath)?void 0:s.call(B)))||(!!(null==(n=(c=a.editor.value.commands).getCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isFontSize)?void 0:i.call(t,A.value))??!1},[a.editor]),C=e.useMemo(()=>w.find(A=>l(A))??w[0],[w,l]);return Xg.jsx(oI,{ref:I,disabled:E,active:!1,popover:!0,data:w,itemActive:l,shortcut:t.shortcut,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:(null==(B=t.popoverProps)?void 0:B.maxHeight)??240,minWidth:(null==(s=t.popoverProps)?void 0:s.minWidth)??80,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},onSelect:A=>{var e,t,i,B,s,c,n;""==A.value?null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).removeTextStyle)||i.call(t,["fontSize"]):l(A)?null==(B=a.editor.value)||B.updateRealSelection():null==(n=null==(s=a.editor.value)?void 0:(c=s.commands).setFontSize)||n.call(c,A.value)},children:C.label??""})},A.FullScreenMenu=function({zIndex:A=100,...t}){const{state:i}=eo(),B=e.useRef(null),[s,c]=e.useState(!1),n=e.useMemo(()=>!!B.current&&s,[B.current,s]),g=e.useMemo(()=>{var A;return!(null==(A=i.editor.value)?void 0:A.selection.focused())||(t.disabled??!1)},[i.editor,t.disabled]);return e.useEffect(()=>(B.current=document.body.querySelector(t.target),()=>{B.current=null}),[]),Xg.jsx(oI,{disabled:g,active:n,onOperate:()=>{n?B.current&&(B.current.style.setProperty("position",""),B.current.style.setProperty("left",""),B.current.style.setProperty("top",""),B.current.style.setProperty("z-index",""),B.current.style.setProperty("width",""),B.current.style.setProperty("height",""),c(!1)):B.current&&(B.current.style.setProperty("position","fixed","important"),B.current.style.setProperty("left","0px","important"),B.current.style.setProperty("top","0px","important"),B.current.style.setProperty("z-index",`${A}`,"important"),B.current.style.setProperty("width","100vw","important"),B.current.style.setProperty("height","100vh","important"),c(!0))},shortcut:t.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-full-screen"})})},A.HeadingExtension=VA,A.HeadingMenu=function(A){var t,i,B,s,c,n,g,o;const{state:r,t:a}=eo(),Q=e.useRef(null),I=e.useMemo(()=>{const e=[{label:a("一级标题"),value:1},{label:a("二级标题"),value:2},{label:a("三级标题"),value:3},{label:a("四级标题"),value:4},{label:a("五级标题"),value:5},{label:a("六级标题"),value:6}];return[...A.data||e,{label:a("正文"),value:0}]},[A.data]),w={0:"14px",1:"24px",2:"22px",3:"20px",4:"18px",5:"16px",6:"15px"},E=e.useMemo(()=>{var e;return!(null==(e=r.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[r.editor,A.disabled]),l=e.useCallback(A=>{var e,t,i;return 0===A?!(l(1)||l(2)||l(3)||l(4)||l(5)||l(6)):(null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).allHeading)?void 0:i.call(t,A))??!1},[r.editor]),C=e.useMemo(()=>I.find(A=>l(A.value))??I[I.length-1],[I,l]);return Xg.jsx(oI,{ref:Q,disabled:E,active:!1,popover:!0,data:I,itemActive:A=>l(A.value),shortcut:A.shortcut,popoverProps:{width:null==(t=A.popoverProps)?void 0:t.width,maxHeight:(null==(i=A.popoverProps)?void 0:i.maxHeight)??240,minWidth:(null==(B=A.popoverProps)?void 0:B.minWidth)??120,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex},onSelect:A=>{var e,t,i,B,s,c;l(A.value)?null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).unsetHeading)||i.call(t,A.value):null==(c=null==(B=r.editor.value)?void 0:(s=B.commands).setHeading)||c.call(s,A.value)},customLabel:A=>Xg.jsx("span",{style:{fontSize:w[A.value]},children:A.label}),children:C.label??""})},A.History=u,A.HistoryExtension=MA,A.HljsLanguages=Yg,A.HorizontalExtension=TA,A.HorizontalMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B,s,c,n,g,o,r;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!!(null==(B=(i=t.editor.value.commands).hasAttachment)?void 0:B.call(i))||(!!(null==(c=(s=t.editor.value.commands).hasMath)?void 0:c.call(s))||(!!(null==(g=(n=t.editor.value.commands).hasLink)?void 0:g.call(n))||(!!(null==(r=(o=t.editor.value.commands).hasCodeBlock)?void 0:r.call(o))||(A.disabled??!1)))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).setHorizontal)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-separator"})})},A.Icon=kr,A.ImageExtension=dA,A.ImageMenu=function({tabs:A={data:["remote","upload"],default:"remote"},...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),[E,l]=e.useState({src:"",alt:""}),[C,M]=e.useState({src:"",alt:""}),Y=e.useMemo(()=>A.data.map(A=>[{label:Q("远程地址"),value:"remote"},{label:Q("本地上传"),value:"upload"}].find(e=>e.value==A)),[A.data]),h=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!!(null==(i=(e=a.editor.value.commands).hasAttachment)?void 0:i.call(e))||(!!(null==(s=(B=a.editor.value.commands).hasMath)?void 0:s.call(B))||(!!(null==(n=(c=a.editor.value.commands).hasCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]),F=e.useMemo(()=>{var A,e,t;return!!(null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).getImage)?void 0:t.call(e))},[a.editor]),y=async A=>{var e,i,B,s,c;const n=null==(e=A.currentTarget.files)?void 0:e[0];if(!n)return;const g="function"==typeof t.customUpload?await t.customUpload(n):await gQ.dataFileToBase64(n);g&&(null==(s=null==(i=a.editor.value)?void 0:(B=i.commands).setImage)||s.call(B,{src:g,alt:n.name||Q("图片"),width:"number"==typeof t.width?`${t.width}px`:t.width}),null==(c=w.current)||c.hidePopover())},d=async()=>{var A,e,i,B;E.src&&(null==(i=null==(A=a.editor.value)?void 0:(e=A.commands).setImage)||i.call(e,{src:E.src,alt:E.alt,width:"number"==typeof t.width?`${t.width}px`:t.width}),null==(B=w.current)||B.hidePopover())};return Xg.jsx(oI,{ref:w,disabled:h,active:F,popover:!0,popoverProps:{width:(null==(i=t.popoverProps)?void 0:i.width)??300,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex,onShowing:()=>{var A,e,t;const i=null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).getImage)?void 0:t.call(e);i?M({src:i.marks.src,alt:i.marks.alt||""}):l({src:"",alt:""})}},customPopover:F?Xg.jsxs("div",{className:qg(bI,{[HI]:I}),children:[Xg.jsx("input",{value:C.alt,onChange:A=>M(e=>({...e,alt:A.target.value})),placeholder:Q("图片名称"),type:"text"}),Xg.jsx("input",{value:C.src,onChange:A=>M(e=>({...e,src:A.target.value})),placeholder:Q("图片地址"),type:"url"}),Xg.jsx("div",{className:LI,children:Xg.jsx($Q,{onClick:async()=>{var A,e,t,i;C.src&&(null==(t=null==(A=a.editor.value)?void 0:(e=A.commands).updateImage)||t.call(e,{src:C.src,alt:C.alt}),null==(i=w.current)||i.hidePopover())},disabled:!C.src,children:Q("更新")})})]}):Xg.jsx(ro,{defaultValue:A.default,data:Y,children:A=>Xg.jsxs(Xg.Fragment,{children:["remote"===A&&Xg.jsxs("div",{className:qg(kI,{[HI]:I}),children:[Xg.jsx("input",{value:E.alt,onChange:A=>l(e=>({...e,alt:A.target.value})),placeholder:Q("图片名称"),type:"text"}),Xg.jsx("input",{value:E.src,onChange:A=>l(e=>({...e,src:A.target.value})),placeholder:Q("图片地址"),type:"url"}),Xg.jsx("div",{className:JI,children:Xg.jsx($Q,{onClick:d,disabled:!E.src,children:Q("插入")})})]}),"upload"===A&&Xg.jsxs("div",{className:qg(RI,{[HI]:I}),children:[Xg.jsx("input",{type:"file",accept:"*",onChange:y}),Xg.jsx(kr,{name:"kaitify-icon-upload"})]})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-image"})})},A.IncreaseIndentMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).canUseIndent)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).setIncreaseIndent)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-indent-increase"})})},A.IndentExtension=SA,A.ItalicExtension=UA,A.ItalicMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isItalic)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetItalic)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setItalic)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-italic"})})},A.KNode=D,A.LineHeightExtension=LA,A.LineHeightMenu=function({data:A=[{label:"1",value:1},{label:"1.15",value:1.15},{label:"2",value:2},{label:"2.5",value:2.5},{label:"3",value:3}],...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q}=eo(),I=e.useRef(null),w=e.useMemo(()=>[{label:Q("默认行高"),value:""},...A],[A]),E=e.useMemo(()=>{var A;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(t.disabled??!1)},[a.editor,t.disabled]),l=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=a.editor.value)?void 0:(t=e.commands).isLineHeight)?void 0:i.call(t,A.value))??!1},[a.editor]),C=e.useMemo(()=>w.find(A=>l(A))||w[0],[w,l]);return Xg.jsx(oI,{ref:I,disabled:E,active:!1,popover:!0,data:w,itemActive:l,shortcut:t.shortcut,popoverProps:{width:null==(i=t.popoverProps)?void 0:i.width,maxHeight:(null==(B=t.popoverProps)?void 0:B.maxHeight)??240,minWidth:(null==(s=t.popoverProps)?void 0:s.minWidth)??80,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},onSelect:A=>{var e,t,i,B;l(A)?null==(e=a.editor.value)||e.updateRealSelection():null==(B=null==(t=a.editor.value)?void 0:(i=t.commands).setLineHeight)||B.call(i,A.value)},children:C.label??""})},A.LinkExtension=HA,A.LinkMenu=function(A){var t,i,B,s,c,n,g,o,r,a;const{state:Q,t:I,dark:w}=eo(),E=e.useRef(null),[l,C]=e.useState({href:"",text:"",newOpen:!1}),[M,Y]=e.useState({href:"",newOpen:!1}),h=e.useMemo(()=>{var A,e,t;return!!(null==(t=null==(A=Q.editor.value)?void 0:(e=A.commands).getLink)?void 0:t.call(e))},[Q.editor]),F=e.useMemo(()=>{var e,t,i,B,s,c,n,g,o;return!(null==(e=Q.editor.value)?void 0:e.selection.focused())||(!!(null==(i=(t=Q.editor.value.commands).hasAttachment)?void 0:i.call(t))||(!!(null==(s=(B=Q.editor.value.commands).hasMath)?void 0:s.call(B))||(!(!(null==(n=(c=Q.editor.value.commands).hasLink)?void 0:n.call(c))||h)||(!!(null==(o=(g=Q.editor.value.commands).hasCodeBlock)?void 0:o.call(g))||(A.disabled??!1)))))},[Q.editor,A.disabled]);return Xg.jsx(oI,{ref:E,disabled:F,active:h,popover:!0,popoverProps:{width:(null==(t=A.popoverProps)?void 0:t.width)??300,maxHeight:null==(i=A.popoverProps)?void 0:i.maxHeight,minWidth:null==(B=A.popoverProps)?void 0:B.minWidth,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex,onShow:()=>{var A,e,t;const i=null==(t=null==(A=Q.editor.value)?void 0:(e=A.commands).getLink)?void 0:t.call(e);i?Y({href:i.marks.href,newOpen:"_blank"==i.marks.target}):C({href:"",text:"",newOpen:!1})}},customPopover:Xg.jsx("div",{className:qg(SI,{[WI]:w}),children:h?Xg.jsxs(Xg.Fragment,{children:[Xg.jsx("input",{value:M.href,onChange:A=>Y(e=>({...e,href:A.target.value})),placeholder:I("链接地址"),type:"url"}),Xg.jsxs("div",{className:TI,children:[Xg.jsx(Co,{checked:M.newOpen,onChange:A=>Y(e=>({...e,newOpen:A})),label:I("新窗口打开")}),Xg.jsx($Q,{onClick:async()=>{var A,e,t,i;M.href&&(null==(t=null==(A=Q.editor.value)?void 0:(e=A.commands).updateLink)||t.call(e,{href:M.href,newOpen:M.newOpen}),null==(i=E.current)||i.hidePopover())},disabled:!M.href,children:I("更新")})]})]}):Xg.jsxs(Xg.Fragment,{children:[(null==(r=Q.editor.value)?void 0:r.selection.collapsed())&&Xg.jsx("input",{value:l.text,onChange:A=>C(e=>({...e,text:A.target.value})),placeholder:I("链接文字"),type:"text"}),Xg.jsx("input",{value:l.href,onChange:A=>C(e=>({...e,href:A.target.value})),placeholder:I("链接地址"),type:"url"}),Xg.jsxs("div",{className:TI,children:[Xg.jsx(Co,{checked:l.newOpen,onChange:A=>C(e=>({...e,newOpen:A})),label:I("新窗口打开")}),Xg.jsx($Q,{onClick:async()=>{var A,e,t,i,B,s,c;if(l.href){if(null==(A=Q.editor.value)?void 0:A.selection.collapsed()){if(!l.text)return;null==(t=(e=Q.editor.value.commands).setLink)||t.call(e,{href:l.href,text:l.text,newOpen:l.newOpen})}else null==(s=null==(i=Q.editor.value)?void 0:(B=i.commands).setLink)||s.call(B,{href:l.href,newOpen:l.newOpen});null==(c=E.current)||c.hidePopover()}},disabled:!l.href||(null==(a=Q.editor.value)?void 0:a.selection.collapsed())&&!l.text,children:I("插入")})]})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-link"})})},A.LinkUnsetMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getLink)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).unsetLink)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-unlink"})})},A.ListExtension=qA,A.MathExtension=qs,A.MathMenu=function(A){var t,i,B,s,c,n,g,o;const{state:r,t:a,dark:Q}=eo(),I=e.useRef(null),[w,E]=e.useState(""),l=e.useMemo(()=>{var A,e,t;return!!(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).getMath)?void 0:t.call(e))},[r.editor]),C=e.useMemo(()=>{var e,t,i,B,s,c,n,g,o;return!(null==(e=r.editor.value)?void 0:e.selection.focused())||(!!(null==(i=(t=r.editor.value.commands).hasAttachment)?void 0:i.call(t))||(!!(null==(s=(B=r.editor.value.commands).hasLink)?void 0:s.call(B))||(!!(null==(n=(c=r.editor.value.commands).hasCodeBlock)?void 0:n.call(c))||(!(!(null==(o=(g=r.editor.value.commands).hasMath)?void 0:o.call(g))||l)||(A.disabled??!1)))))},[r.editor,A.disabled]);return Xg.jsx(oI,{ref:I,disabled:C,active:l,popover:!0,popoverProps:{width:(null==(t=A.popoverProps)?void 0:t.width)??300,maxHeight:null==(i=A.popoverProps)?void 0:i.maxHeight,minWidth:null==(B=A.popoverProps)?void 0:B.minWidth,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex,onShowing:()=>{var A,e,t;const i=null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).getMath)?void 0:t.call(e);E(i&&i.marks["kaitify-math"]||"")}},customPopover:Xg.jsxs("div",{className:qg(KI,{[OI]:Q}),children:[Xg.jsx("textarea",{className:vI,value:w,onChange:A=>E(A.target.value),placeholder:a("输入Latex数学公式")}),Xg.jsx("div",{className:VI,children:l?Xg.jsx($Q,{disabled:!w,onClick:async()=>{var A,e,t,i;w&&(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).updateMath)||t.call(e,w),null==(i=I.current)||i.hidePopover())},children:a("更新")},"update"):Xg.jsx($Q,{disabled:!w,onClick:()=>{var A,e,t,i;w&&(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).setMath)||t.call(e,w),null==(i=I.current)||i.hidePopover())},children:a("插入")},"insert")})]}),children:Xg.jsx(kr,{name:"kaitify-icon-mathformula"})})},A.Menu=oI,A.NODE_MARK=C,A.OrderedListMenu=function(A){var t,i,B,s,c,n,g,o;const{state:r}=eo(),a=e.useRef(null),Q=e.useMemo(()=>{var e;return!(null==(e=r.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[r.editor,A.disabled]),I=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).allList)?void 0:i.call(t,{ordered:!0,listType:A}))??!1},[r.editor]),w=e.useMemo(()=>{var A,e,t;return(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).allList)?void 0:t.call(e,{ordered:!0}))??!1},[r.editor]);return Xg.jsx(oI,{ref:a,disabled:Q,active:w,popover:!0,popoverProps:{width:(null==(t=A.popoverProps)?void 0:t.width)??160,maxHeight:null==(i=A.popoverProps)?void 0:i.maxHeight,minWidth:null==(B=A.popoverProps)?void 0:B.minWidth,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex},customPopover:Xg.jsx("div",{className:PI,children:["decimal","lower-alpha","upper-alpha","lower-roman","upper-roman","lower-greek","cjk-ideographic"].map(A=>Xg.jsx("div",{className:XI,children:Xg.jsx($Q,{className:ZI,active:I(A),onClick:()=>(A=>{var e,t,i,B,s,c,n;I(A)?null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).unsetList)||i.call(t,{ordered:!0,listType:A}):null==(c=null==(B=r.editor.value)?void 0:(s=B.commands).setList)||c.call(s,{ordered:!0,listType:A}),null==(n=a.current)||n.hidePopover()})(A),children:Xg.jsx(kr,{name:"kaitify-icon-list-"+A})})},A))}),children:Xg.jsx(kr,{name:"kaitify-icon-list-decimal"})})},A.RedoMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).canRedo)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).redo)||i.call(e)},children:Xg.jsx(kr,{name:"kaitify-icon-redo"})})},A.Selection=U,A.StrikethroughExtension=uA,A.StrikethroughMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isStrikethrough)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetStrikethrough)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setStrikethrough)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-strikethrough"})})},A.SubscriptExtension=pA,A.SubscriptMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isSubscript)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetSubscript)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setSubscript)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-subscript"})})},A.SuperscriptExtension=GA,A.SuperscriptMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isSuperscript)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetSuperscript)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setSuperscript)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-superscript"})})},A.TableAddColumnMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B;null==(B=null==(e=t.editor.value)?void 0:(i=e.commands).addTableColumn)||B.call(i,A.type??"right")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:`kaitify-icon-insert-column-${A.type??"right"}`})})},A.TableAddRowMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B;null==(B=null==(e=t.editor.value)?void 0:(i=e.commands).addTableRow)||B.call(i,A.type??"bottom")},shortcut:A.shortcut,children:Xg.jsx(kr,{name:`kaitify-icon-insert-row-${A.type??"bottom"}`})})},A.TableDeleteColumnMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).deleteTableColumn)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-delete-column"})})},A.TableDeleteRowMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).deleteTableRow)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-delete-row"})})},A.TableExtension=zg,A.TableMenu=function({maxRows:A=10,maxColumns:t=10,...i}){var B,s,c,n,g,o,r,a;const{state:Q,dark:I}=eo(),w=e.useRef(null),[E,l]=e.useState((()=>{const e=[];for(let i=1;i<=A;i++){let A=[];for(let e=1;e<=t;e++)A.push({x:i,y:e,inside:!1});e.push(A)}return e})()),C=e.useMemo(()=>E.flat().filter(A=>A.inside).sort((A,e)=>A.x>e.x&&A.y>e.y||A.x>e.x||A.y>e.y?-1:1)[0],[E]),M=e.useMemo(()=>{var A,e,t,B,s,c,n,g,o,r,a;return!(null==(A=Q.editor.value)?void 0:A.selection.focused())||(!!(null==(t=(e=Q.editor.value.commands).hasTable)?void 0:t.call(e))||(!!(null==(s=(B=Q.editor.value.commands).hasCodeBlock)?void 0:s.call(B))||(!!(null==(n=(c=Q.editor.value.commands).hasAttachment)?void 0:n.call(c))||(!!(null==(o=(g=Q.editor.value.commands).hasMath)?void 0:o.call(g))||(!!(null==(a=(r=Q.editor.value.commands).hasCodeBlock)?void 0:a.call(r))||(i.disabled??!1))))))},[Q.editor,i.disabled]);return Xg.jsx(oI,{ref:w,disabled:M,active:!1,popover:!0,popoverProps:{width:null==(B=i.popoverProps)?void 0:B.width,maxHeight:null==(s=i.popoverProps)?void 0:s.maxHeight,minWidth:null==(c=i.popoverProps)?void 0:c.minWidth,animation:null==(n=i.popoverProps)?void 0:n.animation,arrow:null==(g=i.popoverProps)?void 0:g.arrow,placement:null==(o=i.popoverProps)?void 0:o.placement,trigger:null==(r=i.popoverProps)?void 0:r.trigger,zIndex:null==(a=i.popoverProps)?void 0:a.zIndex},customPopover:Xg.jsxs("div",{className:qg(qI,{[Aw]:I}),children:[Xg.jsx("table",{children:Xg.jsx("tbody",{children:E.map((e,i)=>Xg.jsx("tr",{children:e.map((e,B)=>Xg.jsx("td",{className:qg({[_I]:e.inside}),onMouseEnter:()=>(A=>{for(let e=0;e<E.length;e++){const t=E[e];for(let i=0;i<t.length;i++)l(B=>[...B.slice(0,e),[...B[e].slice(0,i),{...B[e][i],inside:t[i].x<=A.x&&t[i].y<=A.y},...B[e].slice(i+1)],...B.slice(e+1)])}})(e),onClick:()=>(async e=>{var i,B,s,c;A<1||t<1||(null==(s=null==(i=Q.editor.value)?void 0:(B=i.commands).setTable)||s.call(B,{rows:e.x,columns:e.y}),null==(c=w.current)||c.hidePopover())})(e),children:Xg.jsx("span",{})},`${i}-${B}`))},i))})}),C&&Xg.jsxs("div",{className:$I,children:[C.x," x ",C.y]})]}),children:Xg.jsx(kr,{name:"kaitify-icon-table"})})},A.TableMergeCellMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B,s,c;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(!(null==(c=(s=t.editor.value.commands).canMergeTableCells)?void 0:c.call(s,A.direction))||(A.disabled??!1)))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B;null==(B=null==(e=t.editor.value)?void 0:(i=e.commands).mergeTableCell)||B.call(i,A.direction)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:`kaitify-icon-merge-cells-${A.direction}`})})},A.TableUnsetMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getTable)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).unsetTable)||i.call(e)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-delete-table"})})},A.Tabs=ro,A.TaskExtension=$A,A.TaskMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).allTask)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetTask)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setTask)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-task"})})},A.TextExtension=CA,A.UnderlineExtension=mA,A.UnderlineMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;return(null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).isUnderline)?void 0:i.call(e))??!1},[t.editor]),B=e.useMemo(()=>{var e,i,B,s,c,n,g;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!t.editor.value.selection.collapsed()&&!t.editor.value.getFocusNodesBySelection("text").length||(!(!t.editor.value.selection.collapsed()||!(null==(B=(i=t.editor.value.commands).getAttachment)?void 0:B.call(i))&&!(null==(c=(s=t.editor.value.commands).getMath)?void 0:c.call(s)))||(!!(null==(g=(n=t.editor.value.commands).getCodeBlock)?void 0:g.call(n))||(A.disabled??!1))))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).unsetUnderline)||B.call(e):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).setUnderline)||n.call(c)},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-underline"})})},A.UndoMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).canUndo)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var A,e,i;null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).undo)||i.call(e)},children:Xg.jsx(kr,{name:"kaitify-icon-undo"})})},A.UnorderedListMenu=function(A){var t,i,B,s,c,n,g,o;const{state:r}=eo(),a=e.useRef(null),Q=e.useMemo(()=>{var e;return!(null==(e=r.editor.value)?void 0:e.selection.focused())||(A.disabled??!1)},[r.editor,A.disabled]),I=e.useCallback(A=>{var e,t,i;return(null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).allList)?void 0:i.call(t,{ordered:!1,listType:A}))??!1},[r.editor]),w=e.useMemo(()=>{var A,e,t;return(null==(t=null==(A=r.editor.value)?void 0:(e=A.commands).allList)?void 0:t.call(e,{ordered:!1}))??!1},[r.editor]);return Xg.jsx(oI,{ref:a,disabled:Q,active:w,popover:!0,popoverProps:{width:(null==(t=A.popoverProps)?void 0:t.width)??160,maxHeight:null==(i=A.popoverProps)?void 0:i.maxHeight,minWidth:null==(B=A.popoverProps)?void 0:B.minWidth,animation:null==(s=A.popoverProps)?void 0:s.animation,arrow:null==(c=A.popoverProps)?void 0:c.arrow,placement:null==(n=A.popoverProps)?void 0:n.placement,trigger:null==(g=A.popoverProps)?void 0:g.trigger,zIndex:null==(o=A.popoverProps)?void 0:o.zIndex},customPopover:Xg.jsx("div",{className:ew,children:["disc","square","circle"].map(A=>Xg.jsx("div",{className:tw,children:Xg.jsx($Q,{large:!0,active:I(A),onClick:()=>(A=>{var e,t,i,B,s,c,n;I(A)?null==(i=null==(e=r.editor.value)?void 0:(t=e.commands).unsetList)||i.call(t,{ordered:!1,listType:A}):null==(c=null==(B=r.editor.value)?void 0:(s=B.commands).setList)||c.call(s,{ordered:!1,listType:A}),null==(n=a.current)||n.hidePopover()})(A),children:Xg.jsx(kr,{name:"kaitify-icon-list-"+A})})},A))}),children:Xg.jsx(kr,{name:"kaitify-icon-list-disc"})})},A.VideoControlsMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;const B=null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).getVideo)?void 0:i.call(e);return!!B&&(B.hasMarks()&&B.marks.hasOwnProperty("controls"))},[t.editor]),B=e.useMemo(()=>{var e,i,B;return!(null==(B=null==(e=t.editor.value)?void 0:(i=e.commands).getVideo)?void 0:B.call(i))||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).updateVideo)||B.call(e,{controls:!1}):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).updateVideo)||n.call(c,{controls:!0})},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-controls"})})},A.VideoExtension=NA,A.VideoLoopMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;const B=null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).getVideo)?void 0:i.call(e);return!!B&&(B.hasMarks()&&B.marks.hasOwnProperty("loop"))},[t.editor]),B=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getVideo)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).updateVideo)||B.call(e,{loop:!1}):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).updateVideo)||n.call(c,{loop:!0})},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-loop"})})},A.VideoMenu=function({tabs:A={data:["remote","upload"],default:"remote"},...t}){var i,B,s,c,n,g,o,r;const{state:a,t:Q,dark:I}=eo(),w=e.useRef(null),[E,l]=e.useState({src:"",autoplay:!1}),C=e.useMemo(()=>A.data.map(A=>[{label:Q("远程地址"),value:"remote"},{label:Q("本地上传"),value:"upload"}].find(e=>e.value==A)),[A]),M=e.useMemo(()=>{var A,e,i,B,s,c,n;return!(null==(A=a.editor.value)?void 0:A.selection.focused())||(!!(null==(i=(e=a.editor.value.commands).hasAttachment)?void 0:i.call(e))||(!!(null==(s=(B=a.editor.value.commands).hasMath)?void 0:s.call(B))||(!!(null==(n=(c=a.editor.value.commands).hasCodeBlock)?void 0:n.call(c))||(t.disabled??!1))))},[a.editor,t.disabled]),Y=async A=>{var e,i,B,s,c;const n=null==(e=A.currentTarget.files)?void 0:e[0];if(!n)return;const g="function"==typeof t.customUpload?await t.customUpload(n):await gQ.dataFileToBase64(n);g&&(null==(s=null==(i=a.editor.value)?void 0:(B=i.commands).setVideo)||s.call(B,{src:g,width:"number"==typeof t.width?`${t.width}px`:t.width,autoplay:E.autoplay}),null==(c=w.current)||c.hidePopover())},h=async()=>{var A,e,i,B;E.src&&(null==(i=null==(A=a.editor.value)?void 0:(e=A.commands).setVideo)||i.call(e,{src:E.src,width:"number"==typeof t.width?`${t.width}px`:t.width,autoplay:E.autoplay}),null==(B=w.current)||B.hidePopover())};return Xg.jsx(oI,{ref:w,disabled:M,active:!1,popover:!0,popoverProps:{width:(null==(i=t.popoverProps)?void 0:i.width)??300,maxHeight:null==(B=t.popoverProps)?void 0:B.maxHeight,minWidth:null==(s=t.popoverProps)?void 0:s.minWidth,animation:null==(c=t.popoverProps)?void 0:c.animation,arrow:null==(n=t.popoverProps)?void 0:n.arrow,placement:null==(g=t.popoverProps)?void 0:g.placement,trigger:null==(o=t.popoverProps)?void 0:o.trigger,zIndex:null==(r=t.popoverProps)?void 0:r.zIndex},customPopover:Xg.jsx(ro,{defaultValue:A.default,data:C,children:A=>Xg.jsxs(Xg.Fragment,{children:["remote"===A&&Xg.jsxs("div",{className:qg(cw,{[gw]:I}),children:[Xg.jsx("input",{value:E.src,onChange:A=>l(e=>({...e,src:A.target.value})),placeholder:Q("视频地址"),type:"url"}),Xg.jsxs("div",{className:nw,children:[Xg.jsx(Co,{checked:E.autoplay,onChange:A=>l(e=>({...e,autoplay:A})),label:Q("是否自动播放")}),Xg.jsx($Q,{onClick:h,disabled:!E.src,children:Q("插入")})]})]}),"upload"===A&&Xg.jsxs("div",{className:iw,children:[Xg.jsxs("div",{className:Bw,children:[Xg.jsx("input",{type:"file",accept:"video/*",onChange:Y}),Xg.jsx(kr,{name:"kaitify-icon-upload"})]}),Xg.jsx("div",{className:sw,children:Xg.jsx(Co,{checked:E.autoplay,onChange:A=>l(e=>({...e,autoplay:A})),label:Q("是否自动播放")})})]})]})}),children:Xg.jsx(kr,{name:"kaitify-icon-video"})})},A.VideoMutedMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var A,e,i;const B=null==(i=null==(A=t.editor.value)?void 0:(e=A.commands).getVideo)?void 0:i.call(e);return!!B&&(B.hasMarks()&&B.marks.hasOwnProperty("muted"))},[t.editor]),B=e.useMemo(()=>{var e,i,B;return!(null==(e=t.editor.value)?void 0:e.selection.focused())||(!(null==(B=(i=t.editor.value.commands).getVideo)?void 0:B.call(i))||(A.disabled??!1))},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:B,active:i,onOperate:()=>{var A,e,B,s,c,n;i?null==(B=null==(A=t.editor.value)?void 0:(e=A.commands).updateVideo)||B.call(e,{muted:!1}):null==(n=null==(s=t.editor.value)?void 0:(c=s.commands).updateVideo)||n.call(c,{muted:!0})},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-muted"})})},A.WrapDownMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e;const i=null==(e=t.editor.value)?void 0:e.getMatchNodeBySelection(A.match);return!(i&&i.isBlock()&&!i.void&&!i.fixed&&!i.nested)||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B,s,c;if(!A.match)return;const n=null==(e=t.editor.value)?void 0:e.getMatchNodeBySelection(A.match);if(!n||!n.isBlock()||n.void||n.fixed||n.nested)return;const g=D.create({type:"block",tag:null==(i=t.editor.value)?void 0:i.blockRenderTag,children:[{type:"closed",tag:"br"}]});null==(B=t.editor.value)||B.addNodeAfter(g,n),null==(s=t.editor.value)||s.setSelectionBefore(g,"all"),null==(c=t.editor.value)||c.updateView()},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-wrap-down"})})},A.WrapUpMenu=function(A){const{state:t}=eo(),i=e.useMemo(()=>{var e;if(!(null==(e=t.editor.value)?void 0:e.selection.focused())||!A.match)return!0;const i=t.editor.value.getMatchNodeBySelection(A.match);return!(i&&i.isBlock()&&!i.void&&!i.fixed&&!i.nested)||(A.disabled??!1)},[t.editor,A.disabled]);return Xg.jsx(oI,{disabled:i,active:!1,onOperate:()=>{var e,i,B,s,c;if(!A.match)return;const n=null==(e=t.editor.value)?void 0:e.getMatchNodeBySelection(A.match);if(!n||!n.isBlock()||n.void||n.fixed||n.nested)return;const g=D.create({type:"block",tag:null==(i=t.editor.value)?void 0:i.blockRenderTag,children:[{type:"closed",tag:"br"}]});null==(B=t.editor.value)||B.addNodeBefore(g,n),null==(s=t.editor.value)||s.setSelectionBefore(g,"all"),null==(c=t.editor.value)||c.updateView()},shortcut:A.shortcut,children:Xg.jsx(kr,{name:"kaitify-icon-wrap-up"})})},A.Wrapper=vr,A.getHljsHtml=hg,A.getNodeRenderOptions=M,A.useEditor=eo,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
8
8
  !function(){"use strict";try{if("undefined"!=typeof document){var A=document.createElement("style");A.appendChild(document.createTextNode('.kaitify-icon-emoji:before{content:""}.kaitify-icon-full-screen:before{content:""}.kaitify-icon-unlink:before{content:""}.kaitify-icon-wrap-down:before{content:""}.kaitify-icon-wrap-up:before{content:""}.kaitify-icon-list-square:before{content:""}.kaitify-icon-list-circle:before{content:""}.kaitify-icon-list-disc:before{content:""}.kaitify-icon-list-cjk-ideographic:before{content:""}.kaitify-icon-list-lower-roman:before{content:""}.kaitify-icon-list-lower-greek:before{content:""}.kaitify-icon-list-upper-roman:before{content:""}.kaitify-icon-list-decimal:before{content:""}.kaitify-icon-list-lower-alpha:before{content:""}.kaitify-icon-list-upper-alpha:before{content:""}.kaitify-icon-merge-cells-top:before{content:""}.kaitify-icon-merge-cells-left:before{content:""}.kaitify-icon-merge-cells-right:before{content:""}.kaitify-icon-merge-cells-bottom:before{content:""}.kaitify-icon-mathformula:before{content:""}.kaitify-icon-separator:before{content:""}.kaitify-icon-attachment:before{content:""}.kaitify-icon-task:before{content:""}.kaitify-icon-upload:before{content:""}.kaitify-icon-remove:before{content:""}.kaitify-icon-code:before{content:""}.kaitify-icon-loop:before{content:""}.kaitify-icon-muted:before{content:""}.kaitify-icon-controls:before{content:""}.kaitify-icon-video:before{content:""}.kaitify-icon-delete:before{content:""}.kaitify-icon-image:before{content:""}.kaitify-icon-brush:before{content:""}.kaitify-icon-check:before{content:""}.kaitify-icon-italic:before{content:""}.kaitify-icon-redo:before{content:""}.kaitify-icon-undo:before{content:""}.kaitify-icon-code-block:before{content:""}.kaitify-icon-table:before{content:""}.kaitify-icon-delete-table:before{content:""}.kaitify-icon-align-center:before{content:""}.kaitify-icon-align-justify:before{content:""}.kaitify-icon-align-left:before{content:""}.kaitify-icon-bold:before{content:""}.kaitify-icon-align-right:before{content:""}.kaitify-icon-font-color:before{content:""}.kaitify-icon-format-clear:before{content:""}.kaitify-icon-indent-increase:before{content:""}.kaitify-icon-quote:before{content:""}.kaitify-icon-indent-decrease:before{content:""}.kaitify-icon-link:before{content:""}.kaitify-icon-subscript:before{content:""}.kaitify-icon-superscript:before{content:""}.kaitify-icon-strikethrough:before{content:""}.kaitify-icon-underline:before{content:""}.kaitify-icon-caret-down:before{content:""}.kaitify-icon-delete-column:before{content:""}.kaitify-icon-delete-row:before{content:""}.kaitify-icon-insert-column-left:before{content:""}.kaitify-icon-insert-column-right:before{content:""}.kaitify-icon-insert-row-bottom:before{content:""}.kaitify-icon-insert-row-top:before{content:""}._kaitify-divider_1akn1_1{display:inline-block;width:1px;height:18px;background:#dedede;vertical-align:middle;margin:0 5px}._kaitify-divider_1akn1_1._kaitify-dark_1akn1_9{background:#3b3b3b}._kaitify-tabs_1c51d_1{display:block;width:100%;position:relative;font-size:14px;color:#505050;line-height:1.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif}._kaitify-tabs_1c51d_1._kaitify-dark_1c51d_10{color:#f5f5f5}._kaitify-tabs_1c51d_1,._kaitify-tabs_1c51d_1 *,._kaitify-tabs_1c51d_1 *:before,._kaitify-tabs_1c51d_1 *:after{box-sizing:border-box;outline:none}._kaitify-tabs_1c51d_1 ._kaitify-tabs-header_1c51d_20{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:5px 0}._kaitify-tabs_1c51d_1 ._kaitify-tabs-header_1c51d_20 ._kaitify-tabs-header-item_1c51d_27{padding:5px 10px;position:relative;transition:color .3s}._kaitify-tabs_1c51d_1 ._kaitify-tabs-header_1c51d_20 ._kaitify-tabs-header-item_1c51d_27:hover{cursor:pointer;color:#308af3}._kaitify-tabs_1c51d_1 ._kaitify-tabs-header_1c51d_20 ._kaitify-tabs-header-item_1c51d_27._kaitify-tabs-header-item-active_1c51d_36{color:#308af3}._kaitify-tabs_1c51d_1 ._kaitify-tabs-header_1c51d_20 ._kaitify-tabs-header-item_1c51d_27._kaitify-tabs-header-item-active_1c51d_36:before{position:absolute;width:calc((100% - 5px * 2) * 2 / 3);height:2px;left:50%;bottom:0;transform:translate(-50%);content:"";background:#308af3;border-radius:2px}._kaitify-tabs_1c51d_1 ._kaitify-tabs-content_1c51d_50{position:relative;display:block;width:100%}._kaitify-checkbox_1apxq_1{display:inline-flex;justify-content:flex-start;align-items:center;font-size:14px;color:#505050;line-height:1;opacity:.8;transition:opacity .3s}._kaitify-checkbox_1apxq_1,._kaitify-checkbox_1apxq_1 *,._kaitify-checkbox_1apxq_1 *:before,._kaitify-checkbox_1apxq_1 *:after{box-sizing:border-box;outline:none}._kaitify-checkbox_1apxq_1 ._kaitify-checkbox-el_1apxq_18{display:inline-flex;justify-content:center;align-items:center;width:15px;height:15px;position:relative;border:1px solid #dedede;border-radius:3px;-webkit-user-select:none;user-select:none;touch-action:none;transition:all .3s}._kaitify-checkbox_1apxq_1 ._kaitify-checkbox-el_1apxq_18:before{content:"";position:absolute;left:4px;top:1px;width:0px;height:0px;margin-top:5px;border:solid #308af3;border-width:0;transform:rotate(45deg);border-color:#fff;-webkit-user-select:none;user-select:none;touch-action:none;transition:width .1s ease-in-out,height .2s ease-in-out,margin-top .2s ease-in-out}._kaitify-checkbox_1apxq_1 ._kaitify-checkbox-el_1apxq_18._kaitify-checkbox-active_1apxq_47{background:#308af3;border-color:#308af3}._kaitify-checkbox_1apxq_1 ._kaitify-checkbox-el_1apxq_18._kaitify-checkbox-active_1apxq_47:before{margin-top:0;width:5px;height:10px;border-width:0 2px 2px 0}._kaitify-checkbox_1apxq_1 ._kaitify-checkbox-el_1apxq_18 input[type=checkbox]{opacity:0;position:absolute;left:0;top:0;z-index:1;width:100%;height:100%;margin:0;cursor:pointer}._kaitify-checkbox_1apxq_1 ._kaitify-checkbox-label_1apxq_68{margin-left:5px}._kaitify-checkbox_1apxq_1:not(._kaitify-disabled_1apxq_71):hover{cursor:pointer;opacity:1}._kaitify-checkbox_1apxq_1._kaitify-disabled_1apxq_71{opacity:.5;cursor:not-allowed}._kaitify-checkbox_1apxq_1._kaitify-disabled_1apxq_71 ._kaitify-checkbox-el_1apxq_18>input[type=checkbox]{cursor:not-allowed}._kaitify-checkbox_1apxq_1._kaitify-dark_1apxq_82{color:#f5f5f5}._kaitify-checkbox_1apxq_1._kaitify-dark_1apxq_82 ._kaitify-checkbox-el_1apxq_18{border-color:#3b3b3b}@font-face{font-family:kaitify-icon;src:url(data:font/woff;base64,d09GRgABAAAAACDwAAsAAAAANfAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA8VU03Y21hcAAAAYgAAAI9AAAFpiFMPSNnbHlmAAADyAAAGMYAACcc6WxH2GhlYWQAAByQAAAALwAAADYumSVVaGhlYQAAHMAAAAAgAAAAJAmwBjJobXR4AAAc4AAAADIAAAD8EbkAAGxvY2EAAB0UAAAAgAAAAIBeM2e+bWF4cAAAHZQAAAAfAAAAIAFbALpuYW1lAAAdtAAAAUAAAAJnEKM8sHBvc3QAAB70AAAB+gAAA1w8a3ZZeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGGJYJzAwMrAwNTJdIaBgaEfQjO+ZjBi5ACKMrAyM2AFAWmuKQwHnrG84mdu+N/AwMB8h2EPUJgRRRETAIlUDQt4nN3UyU6UQRiF4beZnG0VxalVFBXFecQRJfEGEMQp8SLAGBfGDU44xEQ2JpAIJCgrr4Kl9+CK7yMk7t3hqT7qwqXu7MrT6f7T1f1X1TkNNAONcliaoOEzFb2iMqurlfr1RlbWrzdVHun9Jdr1uVo0RzXaoiM6oyu6oy/uxnCMxmTMxZf4GvPxLVuzlr35Jt/mWL7PiZzO2YXri9WlJYim+uz237P7Y0izP/wxuydHNPudZo/nVM78mv3Xj4ruvqc+rv0eAwxq3Ppj3GNI477GAx7yWKPs0mZ2sZH9bGenvmsHDWyhqt1ZxWrWsJYVtLCM5dqfZtroYB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N0LWNqay1pZGVvZ3JhcGhpYxBsaXN0LWxvd2VyLXJvbWFuEGxpc3QtbG93ZXItZ3JlZWsQbGlzdC11cHBlci1yb21hbgxsaXN0LWRlY2ltYWwQbGlzdC1sb3dlci1hbHBoYRBsaXN0LXVwcGVyLWFscGhhD21lcmdlLWNlbGxzLXRvcBBtZXJnZS1jZWxscy1sZWZ0EW1lcmdlLWNlbGxzLXJpZ2h0Em1lcmdlLWNlbGxzLWJvdHRvbQttYXRoZm9ybXVsYQlzZXBhcmF0b3IKYXR0YWNobWVudAR0YXNrBnVwbG9hZAZyZW1vdmUEY29kZQRsb29wBW11dGVkCGNvbnRyb2xzBXZpZGVvBmRlbGV0ZQVpbWFnZQVicnVzaAVjaGVjawZpdGFsaWMEcmVkbwR1bmRvCmNvZGUtYmxvY2sFdGFibGUMZGVsZXRlLXRhYmxlDGFsaWduLWNlbnRlcg1hbGlnbi1qdXN0aWZ5CmFsaWduLWxlZnQEYm9sZAthbGlnbi1yaWdodApmb250LWNvbG9yDGZvcm1hdC1jbGVhcg9pbmRlbnQtaW5jcmVhc2UFcXVvdGUPaW5kZW50LWRlY3JlYXNlBGxpbmsJc3Vic2NyaXB0C3N1cGVyc2NyaXB0DXN0cmlrZXRocm91Z2gJdW5kZXJsaW5lCmNhcmV0LWRvd24NZGVsZXRlLWNvbHVtbgpkZWxldGUtcm93Emluc2VydC1jb2x1bW4tbGVmdBNpbnNlcnQtY29sdW1uLXJpZ2h0EWluc2VydC1yb3ctYm90dG9tDmluc2VydC1yb3ctdG9wAAA=) format("truetype")}._kaitify-icon_x9qch_5{display:inline-flex;justify-content:center;align-items:center;color:inherit;font-family:kaitify-icon!important;font-size:inherit;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;vertical-align:middle;box-sizing:border-box}._kaitify-border_ytsp5_1{border:1px solid #dedede;border-radius:3px;transition:border-color .5s,box-shadow .5s}._kaitify-border_ytsp5_1:focus{border-color:#308af3;box-shadow:0 0 0 4px #308af31a}._kaitify-bubble_1yv5r_1{display:block;background:#fff;border:1px solid #dedede;color:#505050;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;line-height:1.5;border-radius:3px;box-shadow:2px 2px 5px #0000000f}._kaitify-bubble_1yv5r_1._kaitify-dark_1yv5r_12{background:#1b1b1f;border-color:#3b3b3b;color:#f5f5f5;box-shadow:2px 2px 5px #ffffff0a}._kaitify-bubble-enter_1yv5r_18{opacity:0}._kaitify-bubble-exit_1yv5r_21{opacity:1}._kaitify-bubble-enter-active_1yv5r_24{opacity:1;transition:opacity 50ms linear}._kaitify-bubble-exit-active_1yv5r_28{opacity:0;transition:opacity 50ms linear}._kaitify-popover-refer_1qt0d_1{display:inline-flex;justify-content:flex-start;align-items:center;padding:0;margin:0;position:relative;color:#505050;font-size:14px;line-height:1.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;box-sizing:border-box}._kaitify-popover-refer_1qt0d_1._kaitify-dark_1qt0d_14{color:#f5f5f5}._kaitify-popover_1qt0d_1,._kaitify-popover_1qt0d_1 *,._kaitify-popover_1qt0d_1 *:before,._kaitify-popover_1qt0d_1 *:after{box-sizing:border-box;outline:none}._kaitify-popover_1qt0d_1[data-placement^=bottom]{padding-top:5px}._kaitify-popover_1qt0d_1[data-placement^=bottom][data-arrow=true]{padding-top:11px}._kaitify-popover_1qt0d_1[data-placement^=top]{padding-bottom:5px}._kaitify-popover_1qt0d_1[data-placement^=top][data-arrow=true]{padding-bottom:11px}._kaitify-popover_1qt0d_1[data-placement^=left]{padding-right:5px}._kaitify-popover_1qt0d_1[data-placement^=left][data-arrow=true]{padding-right:11px}._kaitify-popover_1qt0d_1[data-placement^=right]{padding-left:5px}._kaitify-popover_1qt0d_1[data-placement^=right][data-arrow=true]{padding-left:11px}._kaitify-popover_1qt0d_1 ._kaitify-popover-wrapper_1qt0d_48{position:relative;background:#fff;border:1px solid #dedede;border-radius:3px;box-shadow:2px 2px 5px #0000000f}._kaitify-popover_1qt0d_1 ._kaitify-popover-content_1qt0d_55{display:block;color:#505050;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;line-height:1.5;overflow-x:hidden;overflow-y:auto}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64{display:inline-block;width:0;height:0;border-color:transparent;border-style:solid;border-width:6px}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64:before{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px;content:""}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64[data-placement^=bottom]{border-top:none;border-bottom-color:#dedede;bottom:100%}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64[data-placement^=bottom]:before{border-top:none;border-bottom-color:#fff;left:1px;top:1.5px;right:auto;bottom:0;margin-left:-6px}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64[data-placement^=top]{border-bottom:none;border-top-color:#dedede;top:100%}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64[data-placement^=top]:before{border-bottom:none;border-top-color:#fff;left:1px;bottom:1.5px;top:auto;right:auto;margin-left:-6px}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64[data-placement=right]{border-left:none;border-right-color:#dedede;right:100%}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64[data-placement=right]:before{border-left:none;border-right-color:#fff;left:1.5px;top:1px;right:auto;bottom:auto;margin-top:-6px}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64[data-placement=left]{border-right:none;border-left-color:#dedede;left:100%}._kaitify-popover_1qt0d_1 ._kaitify-popover-arrow_1qt0d_64[data-placement=left]:before{border-right:none;border-left-color:#fff;right:1.5px;top:1px;bottom:auto;left:auto;margin-top:-6px}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-wrapper_1qt0d_48{background:#1b1b1f;border-color:#3b3b3b}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-content_1qt0d_55{color:#f5f5f5}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-arrow_1qt0d_64[data-placement^=bottom]{border-bottom-color:#3b3b3b}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-arrow_1qt0d_64[data-placement^=bottom]:before{border-bottom-color:#1b1b1f}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-arrow_1qt0d_64[data-placement^=top]{border-top-color:#3b3b3b}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-arrow_1qt0d_64[data-placement^=top]:before{border-top-color:#1b1b1f}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-arrow_1qt0d_64[data-placement=right]{border-left:none;border-right-color:#3b3b3b;right:100%}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-arrow_1qt0d_64[data-placement=right]:before{border-right-color:#1b1b1f}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-arrow_1qt0d_64[data-placement=left]{border-left-color:#3b3b3b}._kaitify-popover_1qt0d_1._kaitify-dark_1qt0d_14 ._kaitify-popover-arrow_1qt0d_64[data-placement=left]:before{border-left-color:#1b1b1f}._kaitify-popover-translate-enter_1qt0d_171{opacity:0;transform:translateY(20px)}._kaitify-popover-translate-exit_1qt0d_175{opacity:1;transform:translateY(0)}._kaitify-popover-translate-enter-active_1qt0d_179{opacity:1;transform:translateY(0);transition:opacity .2s ease-in-out,transform .2s ease-in-out}._kaitify-popover-translate-exit-active_1qt0d_184{opacity:0;transform:translateY(20px);transition:opacity .2s ease-in-out,transform .2s ease-in-out}._kaitify-popover-fade-enter_1qt0d_189{opacity:0;transform:translateY(20px)}._kaitify-popover-fade-exit_1qt0d_193{opacity:1;transform:translateY(0)}._kaitify-popover-fade-enter-active_1qt0d_197{opacity:1;transform:translateY(0);transition:opacity .2s ease-in-out,transform .2s ease-in-out}._kaitify-popover-fade-exit-active_1qt0d_202{opacity:0;transform:translateY(20px);transition:opacity .2s ease-in-out,transform .2s ease-in-out}._kaitify-button_1f15o_1{display:inline-flex;justify-content:center;align-items:center;padding:0 10px;height:28px;background:#fff;color:#505050;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;border:none;border-radius:3px;transition:background .3s,color .3s}._kaitify-button_1f15o_1,._kaitify-button_1f15o_1 *,._kaitify-button_1f15o_1 *:before,._kaitify-button_1f15o_1 *:after{box-sizing:border-box;outline:none}._kaitify-button_1f15o_1._kaitify-dark_1f15o_22{background:#1b1b1f;color:#f5f5f5}._kaitify-button_1f15o_1:not(:disabled):hover{cursor:pointer;background:#308af31a;color:#308af3}._kaitify-button_1f15o_1:not(:disabled):active{background:#308af333;color:#308af3}._kaitify-button_1f15o_1:not(:disabled)._kaitify-button-active_1f15o_35{background:#308af333;color:#308af3}._kaitify-button_1f15o_1:disabled{opacity:.6;cursor:not-allowed}._kaitify-button_1f15o_1._kaitify-button-block_1f15o_43{display:flex;width:100%}._kaitify-button_1f15o_1._kaitify-button-large_1f15o_47{height:32px}._kaitify-menu_1fr0d_1{display:inline-flex;justify-content:flex-start;align-items:center;padding:2px;position:relative}._kaitify-menu_1fr0d_1,._kaitify-menu_1fr0d_1 *,._kaitify-menu_1fr0d_1 *:before,._kaitify-menu_1fr0d_1 *:after{box-sizing:border-box;outline:none}._kaitify-menu_1fr0d_1 ._kaitify-menu-caret_1fr0d_15{font-size:12px;transform:scale(.72);margin-left:4px;transition:transform .3s linear}._kaitify-menu_1fr0d_1 ._kaitify-menu-caret_1fr0d_15._kaitify-menu-caret-rotate_1fr0d_21{transform:scale(.72) rotate(180deg)}._kaitify-menu-options_1fr0d_24{padding:5px 0}._kaitify-menu-options_1fr0d_24,._kaitify-menu-options_1fr0d_24 *,._kaitify-menu-options_1fr0d_24 *:before,._kaitify-menu-options_1fr0d_24 *:after{box-sizing:border-box;outline:none}._kaitify-menu-options_1fr0d_24 ._kaitify-menu-option_1fr0d_24{display:flex;justify-content:flex-start;align-items:center;padding:5px 10px;font-size:14px;line-height:1.5;color:#505050;transition:background .3s,color .3s}._kaitify-menu-options_1fr0d_24 ._kaitify-menu-option_1fr0d_24 ._kaitify-menu-option-icon_1fr0d_44{margin-right:4px}._kaitify-menu-options_1fr0d_24 ._kaitify-menu-option_1fr0d_24:not(._kaitify-disabled_1fr0d_47):hover{cursor:pointer;background:#308af31a;color:#308af3}._kaitify-menu-options_1fr0d_24 ._kaitify-menu-option_1fr0d_24:not(._kaitify-disabled_1fr0d_47):active{background:#308af333;color:#308af3}._kaitify-menu-options_1fr0d_24 ._kaitify-menu-option_1fr0d_24:not(._kaitify-disabled_1fr0d_47)._kaitify-menu-option-active_1fr0d_56{background:#308af333;color:#308af3}._kaitify-menu-options_1fr0d_24 ._kaitify-menu-option_1fr0d_24._kaitify-disabled_1fr0d_47{opacity:.6;cursor:not-allowed}._kaitify-menu-options_1fr0d_24._kaitify-dark_1fr0d_64 ._kaitify-menu-option_1fr0d_24{color:#f5f5f5}._kaitify-attachment-upload_hlc4c_1{display:flex;justify-content:center;align-items:center;width:100%;height:100px;font-size:30px;color:#505050;position:relative;opacity:.7;transition:all .3s}._kaitify-attachment-upload_hlc4c_1 input[type=file]{opacity:0;position:absolute;left:0;top:0;z-index:1;width:100%;height:100%}._kaitify-attachment-upload_hlc4c_1:hover{opacity:1}._kaitify-attachment-upload_hlc4c_1:hover input[type=file]{cursor:pointer}._kaitify-attachment-upload_hlc4c_1._kaitify-dark_hlc4c_28{color:#f5f5f5}._kaitify-attachment-remote_hlc4c_31{display:block;width:100%;padding:5px 10px}._kaitify-attachment-remote_hlc4c_31 input[type=text],._kaitify-attachment-remote_hlc4c_31 input[type=url]{display:block;width:100%;border:none;border-bottom:1px solid #dedede;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;line-height:1.5;color:#505050;background:transparent;padding:5px 0;margin-bottom:10px;transition:all .3s}._kaitify-attachment-remote_hlc4c_31 input[type=text]:focus,._kaitify-attachment-remote_hlc4c_31 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-attachment-remote_hlc4c_31 input[type=text]::placeholder,._kaitify-attachment-remote_hlc4c_31 input[type=url]::placeholder,._kaitify-attachment-remote_hlc4c_31 input[type=text]::-webkit-input-placeholder,._kaitify-attachment-remote_hlc4c_31 input[type=url]::-webkit-input-placeholder{opacity:.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;color:inherit}._kaitify-attachment-remote_hlc4c_31 ._kaitify-attachment-remote-footer_hlc4c_63{display:flex;justify-content:flex-end;align-items:center;width:100%}._kaitify-attachment-remote_hlc4c_31._kaitify-dark_hlc4c_28 input[type=text],._kaitify-attachment-remote_hlc4c_31._kaitify-dark_hlc4c_28 input[type=url]{border-bottom-color:#3b3b3b;color:#f5f5f5}._kaitify-attachment-remote_hlc4c_31._kaitify-dark_hlc4c_28 input[type=text]:focus,._kaitify-attachment-remote_hlc4c_31._kaitify-dark_hlc4c_28 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-attachment-update_hlc4c_78{display:block;width:100%;padding:10px 10px 5px}._kaitify-attachment-update_hlc4c_78 input[type=text],._kaitify-attachment-update_hlc4c_78 input[type=url]{display:block;width:100%;border:none;border-bottom:1px solid #dedede;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;line-height:1.5;color:#505050;background:transparent;padding:5px 0;margin-bottom:10px;transition:all .3s}._kaitify-attachment-update_hlc4c_78 input[type=text]:focus,._kaitify-attachment-update_hlc4c_78 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-attachment-update_hlc4c_78 input[type=text]::placeholder,._kaitify-attachment-update_hlc4c_78 input[type=url]::placeholder,._kaitify-attachment-update_hlc4c_78 input[type=text]::-webkit-input-placeholder,._kaitify-attachment-update_hlc4c_78 input[type=url]::-webkit-input-placeholder{opacity:.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;color:inherit}._kaitify-attachment-update_hlc4c_78 ._kaitify-attachment-update-footer_hlc4c_110{display:flex;justify-content:flex-end;align-items:center;width:100%}._kaitify-attachment-update_hlc4c_78._kaitify-dark_hlc4c_28 input[type=text],._kaitify-attachment-update_hlc4c_78._kaitify-dark_hlc4c_28 input[type=url]{border-bottom-color:#3b3b3b;color:#f5f5f5}._kaitify-attachment-update_hlc4c_78._kaitify-dark_hlc4c_28 input[type=text]:focus,._kaitify-attachment-update_hlc4c_78._kaitify-dark_hlc4c_28 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-colors-panel_7iz13_1{display:block;width:100%;padding:5px}._kaitify-colors-panel_7iz13_1 ._kaitify-colors-header_7iz13_6{display:block;width:100%;padding-bottom:5px;margin-bottom:10px;border-bottom:1px solid #dedede}._kaitify-colors-panel_7iz13_1 ._kaitify-colors-header_7iz13_6 ._kaitify-colors-header-text_7iz13_13{margin-left:10px}._kaitify-colors-panel_7iz13_1 ._kaitify-colors-content_7iz13_16{display:grid;width:100%;grid-template-columns:repeat(8,1fr);gap:2px}._kaitify-colors-panel_7iz13_1 ._kaitify-colors-content_7iz13_16 ._kaitify-colors-el_7iz13_22{padding:2px;border:1px solid transparent;border-radius:1px}._kaitify-colors-panel_7iz13_1 ._kaitify-colors-content_7iz13_16 ._kaitify-colors-el_7iz13_22._kaitify-color-el-active_7iz13_27{border-color:#308af3}._kaitify-colors-panel_7iz13_1 ._kaitify-colors-content_7iz13_16 ._kaitify-colors-el_7iz13_22>div{display:block;width:16px;height:16px;border:1px solid #dedede;border-radius:1px;transition:all .3s}._kaitify-colors-panel_7iz13_1 ._kaitify-colors-content_7iz13_16 ._kaitify-colors-el_7iz13_22>div:hover{cursor:pointer;transform:scale(1.2)}._kaitify-colors-panel_7iz13_1._kaitify-dark_7iz13_42 ._kaitify-colors-header_7iz13_6{border-bottom-color:#3b3b3b}._kaitify-colors-panel_7iz13_1._kaitify-dark_7iz13_42 ._kaitify-colors-content_7iz13_16 ._kaitify-colors-el_7iz13_22>div{border-color:#3b3b3b}._kaitify-emoji-panel_1m135_1{display:grid;grid-template-columns:repeat(10,1fr);gap:2px;width:100%;padding:5px}._kaitify-emoji-panel_1m135_1 ._kaitify-emoji-el_1m135_8{padding:2px}._kaitify-emoji-panel_1m135_1 ._kaitify-emoji-el_1m135_8>div{display:flex;justify-content:center;align-items:center;font-size:18px;width:20px;height:20px;transition:all .3s}._kaitify-emoji-panel_1m135_1 ._kaitify-emoji-el_1m135_8>div:hover{cursor:pointer;transform:scale(1.2)}._kaitify-image-upload_1dzmn_1{display:flex;justify-content:center;align-items:center;width:100%;height:100px;font-size:30px;color:#505050;position:relative;opacity:.7;transition:all .3s}._kaitify-image-upload_1dzmn_1 input[type=file]{opacity:0;position:absolute;left:0;top:0;z-index:1;width:100%;height:100%}._kaitify-image-upload_1dzmn_1:hover{opacity:1}._kaitify-image-upload_1dzmn_1:hover input[type=file]{cursor:pointer}._kaitify-image-upload_1dzmn_1._kaitify-dark_1dzmn_28{color:#f5f5f5}._kaitify-image-remote_1dzmn_31{display:block;width:100%;padding:5px 10px}._kaitify-image-remote_1dzmn_31 input[type=text],._kaitify-image-remote_1dzmn_31 input[type=url]{display:block;width:100%;border:none;border-bottom:1px solid #dedede;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;line-height:1.5;color:#505050;background:transparent;padding:5px 0;margin-bottom:10px;transition:all .3s}._kaitify-image-remote_1dzmn_31 input[type=text]:focus,._kaitify-image-remote_1dzmn_31 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-image-remote_1dzmn_31 input[type=text]::placeholder,._kaitify-image-remote_1dzmn_31 input[type=url]::placeholder,._kaitify-image-remote_1dzmn_31 input[type=text]::-webkit-input-placeholder,._kaitify-image-remote_1dzmn_31 input[type=url]::-webkit-input-placeholder{opacity:.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;color:inherit}._kaitify-image-remote_1dzmn_31 ._kaitify-image-remote-footer_1dzmn_63{display:flex;justify-content:flex-end;align-items:center;width:100%}._kaitify-image-remote_1dzmn_31._kaitify-dark_1dzmn_28 input[type=text],._kaitify-image-remote_1dzmn_31._kaitify-dark_1dzmn_28 input[type=url]{border-bottom-color:#3b3b3b;color:#f5f5f5}._kaitify-image-remote_1dzmn_31._kaitify-dark_1dzmn_28 input[type=text]:focus,._kaitify-image-remote_1dzmn_31._kaitify-dark_1dzmn_28 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-image-update_1dzmn_78{display:block;width:100%;padding:10px 10px 5px}._kaitify-image-update_1dzmn_78 input[type=text],._kaitify-image-update_1dzmn_78 input[type=url]{display:block;width:100%;border:none;border-bottom:1px solid #dedede;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;line-height:1.5;color:#505050;background:transparent;padding:5px 0;margin-bottom:10px;transition:all .3s}._kaitify-image-update_1dzmn_78 input[type=text]:focus,._kaitify-image-update_1dzmn_78 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-image-update_1dzmn_78 input[type=text]::placeholder,._kaitify-image-update_1dzmn_78 input[type=url]::placeholder,._kaitify-image-update_1dzmn_78 input[type=text]::-webkit-input-placeholder,._kaitify-image-update_1dzmn_78 input[type=url]::-webkit-input-placeholder{opacity:.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;color:inherit}._kaitify-image-update_1dzmn_78 ._kaitify-image-update-footer_1dzmn_110{display:flex;justify-content:flex-end;align-items:center;width:100%}._kaitify-image-update_1dzmn_78._kaitify-dark_1dzmn_28 input[type=text],._kaitify-image-update_1dzmn_78._kaitify-dark_1dzmn_28 input[type=url]{border-bottom-color:#3b3b3b;color:#f5f5f5}._kaitify-image-update_1dzmn_78._kaitify-dark_1dzmn_28 input[type=text]:focus,._kaitify-image-update_1dzmn_78._kaitify-dark_1dzmn_28 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-link_2x8z9_1{display:block;width:100%;padding:10px}._kaitify-link_2x8z9_1 input[type=text],._kaitify-link_2x8z9_1 input[type=url]{display:block;width:100%;border:none;border-bottom:1px solid #dedede;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;line-height:1.5;color:#505050;background:transparent;padding:5px 0;margin-bottom:10px;transition:all .3s}._kaitify-link_2x8z9_1 input[type=text]:focus,._kaitify-link_2x8z9_1 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-link_2x8z9_1 input[type=text]::placeholder,._kaitify-link_2x8z9_1 input[type=url]::placeholder,._kaitify-link_2x8z9_1 input[type=text]::-webkit-input-placeholder,._kaitify-link_2x8z9_1 input[type=url]::-webkit-input-placeholder{opacity:.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;color:inherit}._kaitify-link_2x8z9_1 ._kaitify-link-footer_2x8z9_33{display:flex;justify-content:space-between;align-items:center;width:100%}._kaitify-link_2x8z9_1._kaitify-dark_2x8z9_39 input[type=text],._kaitify-link_2x8z9_1._kaitify-dark_2x8z9_39 input[type=url]{border-bottom-color:#3b3b3b;color:#f5f5f5}._kaitify-link_2x8z9_1._kaitify-dark_2x8z9_39 input[type=text]:focus,._kaitify-link_2x8z9_1._kaitify-dark_2x8z9_39 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-math_1xoz6_1{display:block;width:100%;padding:10px}._kaitify-math_1xoz6_1 ._kaitify-math-textarea_1xoz6_6{display:block;width:100%;height:100px;overflow-y:auto;overflow-x:hidden;font-family:Consolas,monospace,Monaco,Andale Mono,Ubuntu Mono;border:1px solid #dedede;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:3px;padding:10px;font-size:14px;line-height:1.5;color:#505050;margin-bottom:10px;transition:all .3s;resize:none;background:transparent}._kaitify-math_1xoz6_1 ._kaitify-math-textarea_1xoz6_6:focus{border-color:#308af3}._kaitify-math_1xoz6_1 ._kaitify-math-textarea_1xoz6_6::placeholder,._kaitify-math_1xoz6_1 ._kaitify-math-textarea_1xoz6_6::-webkit-input-placeholder{opacity:.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;color:inherit}._kaitify-math_1xoz6_1 ._kaitify-math-footer_1xoz6_34{display:flex;justify-content:flex-end;align-items:center;width:100%}._kaitify-math_1xoz6_1._kaitify-dark_1xoz6_40 ._kaitify-math-textarea_1xoz6_6{border-color:#3b3b3b;color:#f5f5f5}._kaitify-math_1xoz6_1._kaitify-dark_1xoz6_40 ._kaitify-math-textarea_1xoz6_6:focus{border-color:#308af3}._kaitify-ordered-list_1wgxa_1{display:flex;justify-content:flex-start;flex-wrap:wrap;width:100%;padding:5px}._kaitify-ordered-list_1wgxa_1 ._kaitify-ordered-list-item_1wgxa_8{padding:5px}._kaitify-ordered-list_1wgxa_1 ._kaitify-ordered-list-item_1wgxa_8 ._kaitify-ordered-list-item-button_1wgxa_11{width:40px;padding:0}._kaitify-table_aij2n_1{display:block;position:relative;padding:10px}._kaitify-table_aij2n_1 table{border:1px solid #dedede;margin:0;padding:0;border-collapse:collapse}._kaitify-table_aij2n_1 table tr{margin:0;padding:0}._kaitify-table_aij2n_1 table tr td{margin:0;padding:0;border:1px solid #dedede}._kaitify-table_aij2n_1 table tr td span{display:block;width:15px;height:15px}._kaitify-table_aij2n_1 table tr td:hover{cursor:pointer}._kaitify-table_aij2n_1 table tr td._kaitify-table-inside_aij2n_29{background-color:#f1f2f3}._kaitify-table_aij2n_1 ._kaitify-table-footer_aij2n_32{display:block;width:100%;text-align:center;color:#505050;line-height:1;margin-top:10px;opacity:.8}._kaitify-table_aij2n_1._kaitify-dark_aij2n_41 table,._kaitify-table_aij2n_1._kaitify-dark_aij2n_41 table tr td{border-color:#3b3b3b}._kaitify-table_aij2n_1._kaitify-dark_aij2n_41 table tr td._kaitify-table-inside_aij2n_29{background-color:#2a2a2a}._kaitify-unordered-list_n8eec_1{display:flex;justify-content:flex-start;flex-wrap:wrap;width:100%;padding:5px}._kaitify-unordered-list_n8eec_1 ._kaitify-unordered-list-item_n8eec_8{padding:5px}._kaitify-unordered-list_n8eec_1 ._kaitify-unordered-list-item_n8eec_8 :deep(._kaitify-button_n8eec_11){width:40px;padding:0}._kaitify-video-upload_1z0be_1{display:block;width:100%}._kaitify-video-upload_1z0be_1 ._kaitify-video-upload-wrapper_1z0be_5{display:flex;justify-content:center;align-items:center;width:100%;height:80px;font-size:30px;position:relative;opacity:.7;transition:all .3s}._kaitify-video-upload_1z0be_1 ._kaitify-video-upload-wrapper_1z0be_5 input[type=file]{opacity:0;position:absolute;left:0;top:0;z-index:1;width:100%;height:100%}._kaitify-video-upload_1z0be_1 ._kaitify-video-upload-wrapper_1z0be_5:hover{opacity:1}._kaitify-video-upload_1z0be_1 ._kaitify-video-upload-wrapper_1z0be_5:hover input[type=file]{cursor:pointer}._kaitify-video-upload_1z0be_1 ._kaitify-video-upload-footer_1z0be_31{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:10px}._kaitify-video-remote_1z0be_38{display:block;width:100%;padding:5px 10px}._kaitify-video-remote_1z0be_38 input[type=url]{display:block;width:100%;border:none;border-bottom:1px solid #dedede;font-size:14px;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;line-height:1.5;color:#505050;background:transparent;padding:5px 0;margin-bottom:10px;transition:all .3s}._kaitify-video-remote_1z0be_38 input[type=url]:focus{border-bottom-color:#308af3}._kaitify-video-remote_1z0be_38 input[type=url]::placeholder,._kaitify-video-remote_1z0be_38 input[type=url]::-webkit-input-placeholder{opacity:.5;font-family:PingFang SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Helvetica,Hiragino KaKu Gothic Pro,Microsoft YaHei,Arial,sans-serif;color:inherit}._kaitify-video-remote_1z0be_38 ._kaitify-video-remote-footer_1z0be_66{display:flex;justify-content:space-between;align-items:center;width:100%}._kaitify-video-remote_1z0be_38._kaitify-dark_1z0be_72 input[type=url]{border-bottom-color:#3b3b3b;color:#f5f5f5}._kaitify-video-remote_1z0be_38._kaitify-dark_1z0be_72 input[type=url]:focus{border-bottom-color:#308af3}')),document.head.appendChild(A)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaitify/react",
3
- "version": "0.0.1-beta.2",
3
+ "version": "0.0.1-beta.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "author": "so-better",
@@ -28,6 +28,8 @@ const Popover = forwardRef<PopoverRefType, PopoverPropsType>(({ placement = 'bot
28
28
  const popoverRef = useRef<HTMLDivElement | null>(null)
29
29
  //popperjs实例
30
30
  const popperInstance = useRef<Instance | undefined>()
31
+ //计时器实例
32
+ const timeoutRef = useRef<ReturnType<typeof setTimeout>>()
31
33
 
32
34
  //浮层剩余位置
33
35
  const popoverRemainingPlacements = useMemo<PopoverPlacementType[]>(() => {
@@ -111,7 +113,8 @@ const Popover = forwardRef<PopoverRefType, PopoverPropsType>(({ placement = 'bot
111
113
  }
112
114
  //延迟显示
113
115
  if (delay > 0) {
114
- setTimeout(() => {
116
+ if (timeoutRef.current) clearTimeout(timeoutRef.current)
117
+ timeoutRef.current = setTimeout(() => {
115
118
  setVisible(true)
116
119
  }, delay)
117
120
  return
@@ -121,9 +124,6 @@ const Popover = forwardRef<PopoverRefType, PopoverPropsType>(({ placement = 'bot
121
124
  }
122
125
  //隐藏浮层
123
126
  const hidePopover = () => {
124
- if (props.disabled) {
125
- return
126
- }
127
127
  setVisible(false)
128
128
  }
129
129
 
package/test.html ADDED
@@ -0,0 +1,40 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Document</title>
7
+ <script type="importmap">
8
+ {
9
+ "imports": {
10
+ "react": "https://esm.sh/react@18",
11
+ "react-dom": "https://esm.sh/react-dom@18",
12
+ "@kaitify/react": "/lib/kaitify-react.es.js"
13
+ }
14
+ }
15
+ </script>
16
+ </head>
17
+ <body>
18
+ <div id="root"></div>
19
+ <script type="module">
20
+ import React from 'react'
21
+ import ReactDom from 'react-dom'
22
+ import { Wrapper, Bubble, BoldMenu, AlignLeftMenu, AlignCenterMenu, AlignRightMenu, AlignJustifyMenu, AttachmentMenu, BackColorMenu, BlockquoteMenu, CodeMenu, CodeBlockMenu, ColorMenu, FontFamilyMenu, FontSizeMenu, HeadingMenu, RedoMenu, UndoMenu, HorizontalMenu, ImageMenu, IncreaseIndentMenu, DecreaseIndentMenu, ItalicMenu, LineHeightMenu, LinkMenu, OrderedListMenu, UnorderedListMenu, MathMenu, StrikethroughMenu, SubscriptMenu, SuperscriptMenu, TableMenu, UnderlineMenu, VideoMenu, TaskMenu, WrapUpMenu, WrapDownMenu, CodeBlockLanguagesMenu, TableUnsetMenu, TableDeleteRowMenu, TableDeleteColumnMenu, TableAddRowMenu, TableAddColumnMenu, TableMergeCellMenu, VideoControlsMenu, VideoMutedMenu, VideoLoopMenu, ClearFormatMenu, LinkUnsetMenu, EmojiMenu, Divider } from '@kaitify/react'
23
+
24
+ const App = () => {
25
+ const [value, setValue] = React.useState('')
26
+
27
+ return React.createElement(Wrapper, {
28
+ value: value,
29
+ onChange: setValue,
30
+ style: { width: '100%', height: '100%' },
31
+ placeholder: 'Please Enter Text...',
32
+ before: React.createElement(EmojiMenu)
33
+ })
34
+ }
35
+
36
+ const root = ReactDom.createRoot(document.getElementById('root'))
37
+ root.render(React.createElement(App))
38
+ </script>
39
+ </body>
40
+ </html>