@gientech/modual 1.4.7 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/GientechStreamReader-KtCNi1G3.js +447 -0
- package/dist/assets/Input-CNqIA41v.js +236 -0
- package/dist/assets/index-Bof0D4vl.js +1088 -0
- package/dist/assets/{index-BVENTW1Q.js → index-C5RhLYRh.js} +1 -1
- package/dist/assets/index-COcmK9my.js +1 -0
- package/dist/assets/index-CysDmrpo.js +1798 -0
- package/dist/assets/{index-7rZAt9P3.js → index-DP8Ki8qW.js} +1 -1
- package/dist/assets/index-pybYlMAT.js +11 -0
- package/dist/assets/{plus-CrtEUXaQ.js → plus-CzbYbK8K.js} +1 -1
- package/dist/assets/style3.css +1 -1
- package/dist/assets/worker-BbpylX7l.js +13 -0
- package/dist/assets/{x-Dr3EBTzJ.js → x-DdRafKQU.js} +1 -1
- package/dist/chat.d.ts +17 -0
- package/dist/chat.js +2539 -52
- package/dist/database.js +2 -2
- package/dist/databaseId.js +1 -11
- package/dist/databaseTable.js +2 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -14
- package/dist/modelManage.js +1 -1
- package/dist/package.json +1 -1
- package/dist/sensitive.js +1 -1
- package/dist/streamFilesReader.js +1 -1
- package/dist/worker/pdf.worker1.min.js +23 -0
- package/package.json +6 -6
- package/public/worker/pdf.worker1.min.js +23 -0
- package/scripts/README.md +133 -133
- package/scripts/build-demo.js +88 -88
- package/scripts/demo-selector.js +216 -216
- package/scripts/preview-demo.js +130 -130
- package/scripts/run-demo.bat +34 -34
- package/src/assets/img/close.png +0 -0
- package/src/assets/img/database.png +0 -0
- package/src/assets/img/downLoad.png +0 -0
- package/src/assets/img/graphIcon.png +0 -0
- package/src/assets/img/pdf.png +0 -0
- package/src/assets/img/singleQa.png +0 -0
- package/src/assets/img/webSearch.png +0 -0
- package/src/examples/chat/index.tsx +5 -29
- package/src/main.tsx.backup +5 -5
- package/src/modules/chat/ReferenceBar.tsx +522 -0
- package/src/modules/chat/constants.tsx +29 -6
- package/src/modules/chat/index.tsx +118 -4
- package/src/modules/chat/referenceCom/DeleteModal.tsx +75 -0
- package/src/modules/chat/referenceCom/DrawerContent.tsx +136 -0
- package/src/modules/chat/referenceCom/DrawerDatabase.tsx +110 -0
- package/src/modules/chat/referenceCom/DrawerGraphPreview.tsx +86 -0
- package/src/modules/chat/referenceCom/DrawerPreview.tsx +73 -0
- package/src/modules/chat/referenceCom/DrawerTitle.tsx +26 -0
- package/src/modules/chat/referenceCom/RenameModal.tsx +86 -0
- package/src/modules/chat/referenceCom/TagCom.tsx +30 -0
- package/src/modules/chat/style.css +3 -0
- package/src/modules/chat/utils/index.ts +326 -0
- package/src/utils/gientechCommon/components/Messages/GientechNewChatWelcome.tsx +231 -18
- package/src/utils/testconfigs/index.ts +1 -1
- package/stats.html +1 -1
- package/dist/assets/AppLoading-mci3gLZt.js +0 -414
- package/dist/assets/GientechStreamReader-4496nAm0.js +0 -446
- package/dist/assets/index-Bb8_WB-l.js +0 -1
- package/dist/assets/index-BpJ9Bm5x.js +0 -21
- package/dist/assets/index-CNxDI4h-.js +0 -1078
- package/dist/assets/index-CWzpBU29.js +0 -1
- package/dist/assets/index-D1m34Ij7.js +0 -1429
- package/dist/assets/index-_gBtdXQV.js +0 -585
- package/dist/assets/style4.css +0 -1
|
@@ -0,0 +1,1088 @@
|
|
|
1
|
+
import*as m from"react";import pe,{createContext as Ar,useContext as Jn,useState as ut,useCallback as ze,useImperativeHandle as vs,forwardRef as Jr,useMemo as et,useRef as ct,useEffect as xt,memo as Vo,Suspense as L1,createElement as Ta,useLayoutEffect as I1,useReducer as j1,Component as _1}from"react";import kl,{flushSync as H1,unstable_batchedUpdates as z1,createPortal as K1}from"react-dom";import{jsx as Kn}from"react/jsx-runtime";import{R as W1,a as V1,S as Dd,P as Ed}from"./index-C5RhLYRh.js";import{a9 as mr,aa as q1,ab as Sd,y as Pt,E as kd,ac as Cs,ad as Ma,o as At,t as qe,d as Ne,ae as Bd,q as Ve,x as le,af as bs,ag as Cn,v as xe,_ as tt,ah as Ad,V as In,w as Br,p as Fd,ai as _r,aj as $d,ak as Nd,al as Od,am as Rd,an as Do,ao as qo,f as Pd,X as yr,W as xr,C as en,e as Wn,T as La,ap as U1,G as Z1,u as De,Z as Td,aq as Md,g as li,m as Oo,ar as Ld,as as Ia,N as Id,at as Bl,r as Uo,au as cn,av as G1,F as jd,aw as Cr,ax as ys,ay as _d,az as X1,aA as Y1,aB as Q1,aC as J1,O as ep,aD as xu,A as wu,S as tp,R as rp,aE as si,a5 as xs,aF as np,H as op,aG as ap,h as ip,aH as lp,aI as sp,aJ as up,B as ja,z as Xr,aK as ws,aL as Ds,aM as Du,aN as Es,aO as Eu,aP as Su,s as _a,aQ as Hd,aR as Ha,aS as cp,aT as zd,aU as lt,aV as dp,K as fp,aW as pp,aX as hp,aY as gp,aZ as mp,k as Kd,a_ as ku,a$ as vp,l as Cp,b0 as bp,j as yp,D as xp,b1 as wp}from"./Input-CNqIA41v.js";const Dp={colors:{primary:"#4E6EF2",secondary:"#6D86F5",success:"#52C41A",warning:"#FAAD14",error:"#F5222D",info:"#1890FF",background:"#F7F8FA",appBackground:"transparent",listBackground:"#F2F3F5",dashboardBackground:"#FFFFFF",text:"#1D2129",textSecondary:"#4E5969",textTertiary:"#86909C",textInverse:"#FFFFFF",border:"#DDE0E5",borderWeak:"#E5E6EB",disabled:"#C9CDD4",disabledBackground:"#F5F7FA",disabledText:"#C9CDD4",shadow:"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",primaryHover:"#6D86F5",primaryActive:"#2D4BE0",surfaceSubtle:"#F2F3F5",surfaceSelected:"#EEF3FE",btnPrimaryBg:"#4E6EF2",btnPrimaryBgHover:"#6D86F5",btnPrimaryBgActive:"#2D4BE0",btnPrimaryBgDisabled:"#F5F7FA",btnPrimaryText:"#FFFFFF",btnPrimaryTextDisabled:"#C9CDD4",btnSecondaryText:"#4E6EF2",btnSecondaryTextHover:"#4E6EF2",btnSecondaryTextActive:"#2D4BE0",btnSecondaryTextDisabled:"#C9CDD4",btnSecondaryBg:"#FFFFFF",btnSecondaryBgHover:"#EEF3FE",btnSecondaryBgActive:"#EEF3FE",btnSecondaryBgDisabled:"#F5F7FA",btnSecondaryBorder:"#4E6EF2",btnSecondaryBorderHover:"#6D86F5",btnSecondaryBorderActive:"#2D4BE0",btnSecondaryBorderDisabled:"#E5E6EB",btnTextText:"#4E6EF2",btnTextTextHover:"#6D86F5",btnTextTextActive:"#2D4BE0",btnTextTextDisabled:"#C9CDD4"},space:{sidebar:"260px",size:"12px",radius:"4px",padding:"8px",margin:"8px",shadow:"0 2px 8px rgba(0,0,0,0.1)",lineHeight:"1.5"},fonts:{body:{size:"14px",weight:"normal",family:"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:"16px",weight:"600",family:"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},icons:{aiAvatar:"http://10.15.12.13:9000/dev-rag-data/header_pic/JIABINBIN00/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20231212161213.jpg",userAvatar:"http://10.15.12.13:9005/assets/nav-logo-BKaOCDqi.png",pdf:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/pdf-icon.png",word:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/word-icon.png",image:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/image-icon.png",video:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/video-icon.png",audio:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/audio-icon.png",excel:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/excel-icon.png",ppt:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/ppt-icon.png"},others:{baseFontWeight:"normal"}},Ep=Ar({theme:Dp,mode:"light"}),ui=()=>Jn(Ep);function Al(e){return e!=null&&e===e.window}const Sp=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return Al(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!Al(e)&&typeof n!="number"&&(n=(r=((t=e.ownerDocument)!==null&&t!==void 0?t:e).documentElement)===null||r===void 0?void 0:r.scrollTop),n};function kp(e,t,r,n){const o=r-t;return e/=n/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function Bp(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),l=Sp(a),i=Date.now(),u=()=>{const c=Date.now()-i,p=kp(c>o?o:c,l,e,o);Al(a)?a.scrollTo(window.pageXOffset,p):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=p:a.scrollTop=p,c<o?mr(u):typeof n=="function"&&n()};mr(u)}const Ap=e=>{const[t,r]=ut(null);return[ze((o,a,l)=>{const i=t??o,u=Math.min(i||0,o),s=Math.max(i||0,o),c=a.slice(u,s+1).map(e),p=c.some(h=>!l.has(h)),d=[];return c.forEach(h=>{p?(l.has(h)||d.push(h),l.add(h)):(l.delete(h),d.push(h))}),r(p?s:null),d},[t]),r]};function Fp(e,t){return e._antProxy=e._antProxy||{},Object.keys(t).forEach(r=>{if(!(r in e._antProxy)){const n=e[r];e._antProxy[r]=n,e[r]=t[r]}}),e}const $p=(e,t)=>vs(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(o,a){return r[a]?r[a]:Reflect.get(o,a)}}):Fp(n,r)}),Np=e=>{const t=m.useRef(e),[,r]=q1();return[()=>t.current,n=>{t.current=n,r()}]};var Wd=function(t){if(Sd()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(o){return o in n.style})}return!1},Op=function(t,r){if(!Wd(t))return!1;var n=document.createElement("div"),o=n.style[t];return n.style[t]=r,n.style[t]!==o};function Rp(e,t){return!Array.isArray(e)&&t!==void 0?Op(e,t):Wd(e)}var Pp=Pt.ESC,Tp=Pt.TAB;function Mp(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,l=m.useRef(!1),i=function(){if(t){var p,d;(p=r.current)===null||p===void 0||(d=p.focus)===null||d===void 0||d.call(p),n==null||n(!1)}},u=function(){var p;return(p=a.current)!==null&&p!==void 0&&p.focus?(a.current.focus(),l.current=!0,!0):!1},s=function(p){switch(p.keyCode){case Pp:i();break;case Tp:{var d=!1;l.current||(d=u()),d?p.preventDefault():i();break}}};m.useEffect(function(){return t?(window.addEventListener("keydown",s),o&&mr(u,3),function(){window.removeEventListener("keydown",s),l.current=!1}):function(){l.current=!1}},[t])}var Lp=Jr(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=et(function(){var i;return typeof r=="function"?i=r():i=r,i},[r]),l=kd(t,Cs(a));return pe.createElement(pe.Fragment,null,n&&pe.createElement("div",{className:"".concat(o,"-arrow")}),pe.cloneElement(a,{ref:Ma(a)?l:void 0}))}),$n={adjustX:1,adjustY:1},Nn=[0,0],Ip={topLeft:{points:["bl","tl"],overflow:$n,offset:[0,-4],targetOffset:Nn},top:{points:["bc","tc"],overflow:$n,offset:[0,-4],targetOffset:Nn},topRight:{points:["br","tr"],overflow:$n,offset:[0,-4],targetOffset:Nn},bottomLeft:{points:["tl","bl"],overflow:$n,offset:[0,4],targetOffset:Nn},bottom:{points:["tc","bc"],overflow:$n,offset:[0,4],targetOffset:Nn},bottomRight:{points:["tr","br"],overflow:$n,offset:[0,4],targetOffset:Nn}},jp=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function _p(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,l=a===void 0?"rc-dropdown":a,i=e.transitionName,u=e.animation,s=e.align,c=e.placement,p=c===void 0?"bottomLeft":c,d=e.placements,h=d===void 0?Ip:d,g=e.getPopupContainer,v=e.showAction,f=e.hideAction,C=e.overlayClassName,y=e.overlayStyle,b=e.visible,x=e.trigger,B=x===void 0?["hover"]:x,A=e.autoFocus,F=e.overlay,$=e.children,D=e.onVisibleChange,L=At(e,jp),N=pe.useState(),T=qe(N,2),P=T[0],S=T[1],k="visible"in e?b:P,O=pe.useRef(null),E=pe.useRef(null),I=pe.useRef(null);pe.useImperativeHandle(t,function(){return O.current});var M=function(V){S(V),D==null||D(V)};Mp({visible:k,triggerRef:I,onVisibleChange:M,autoFocus:A,overlayRef:E});var H=function(V){var K=e.onOverlayClick;S(!1),K&&K(V)},z=function(){return pe.createElement(Lp,{ref:E,overlay:F,prefixCls:l,arrow:o})},U=function(){return typeof F=="function"?z:z()},G=function(){var V=e.minOverlayWidthMatchTrigger,K=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?V:!K},Y=function(){var V=e.openClassName;return V!==void 0?V:"".concat(l,"-open")},ae=pe.cloneElement($,{className:Ne((r=$.props)===null||r===void 0?void 0:r.className,k&&Y()),ref:Ma($)?kd(I,Cs($)):void 0}),R=f;return!R&&B.indexOf("contextMenu")!==-1&&(R=["click"]),pe.createElement(Bd,Ve({builtinPlacements:h},L,{prefixCls:l,ref:O,popupClassName:Ne(C,le({},"".concat(l,"-show-arrow"),o)),popupStyle:y,action:B,showAction:v,hideAction:R,popupPlacement:p,popupAlign:s,popupTransitionName:i,popupAnimation:u,popupVisible:k,stretch:G()?"minWidth":"",popup:U(),onPopupVisibleChange:M,onPopupClick:H,getPopupContainer:g}),ae)}const Hp=pe.forwardRef(_p),zp=e=>typeof e!="object"&&typeof e!="function"||e===null;var Vd=m.createContext(null);function qd(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function Ud(e){var t=m.useContext(Vd);return qd(t,e)}var Kp=["children","locked"],br=m.createContext(null);function Wp(e,t){var r=xe({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function Ro(e){var t=e.children,r=e.locked,n=At(e,Kp),o=m.useContext(br),a=bs(function(){return Wp(o,n)},[o,n],function(l,i){return!r&&(l[0]!==i[0]||!Cn(l[1],i[1],!0))});return m.createElement(br.Provider,{value:a},t)}var Vp=[],Zd=m.createContext(null);function ci(){return m.useContext(Zd)}var Gd=m.createContext(Vp);function eo(e){var t=m.useContext(Gd);return m.useMemo(function(){return e!==void 0?[].concat(tt(t),[e]):t},[t,e])}var Xd=m.createContext(null),Ss=m.createContext({});function Bu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Ad(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),l=null;return o&&!Number.isNaN(a)?l=a:n&&l===null&&(l=0),n&&e.disabled&&(l=null),l!==null&&(l>=0||t&&l<0)}return!1}function qp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=tt(e.querySelectorAll("*")).filter(function(n){return Bu(n,t)});return Bu(e,t)&&r.unshift(e),r}var Fl=Pt.LEFT,$l=Pt.RIGHT,Nl=Pt.UP,wa=Pt.DOWN,Da=Pt.ENTER,Yd=Pt.ESC,ho=Pt.HOME,go=Pt.END,Au=[Nl,wa,Fl,$l];function Up(e,t,r,n){var o,a="prev",l="next",i="children",u="parent";if(e==="inline"&&n===Da)return{inlineTrigger:!0};var s=le(le({},Nl,a),wa,l),c=le(le(le(le({},Fl,r?l:a),$l,r?a:l),wa,i),Da,i),p=le(le(le(le(le(le({},Nl,a),wa,l),Da,i),Yd,u),Fl,r?i:u),$l,r?u:i),d={inline:s,horizontal:c,vertical:p,inlineSub:s,horizontalSub:p,verticalSub:p},h=(o=d["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(h){case a:return{offset:-1,sibling:!0};case l:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case i:return{offset:1,sibling:!1};default:return null}}function Zp(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function Gp(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function ks(e,t){var r=qp(e,!0);return r.filter(function(n){return t.has(n)})}function Fu(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=ks(e,t),a=o.length,l=o.findIndex(function(i){return r===i});return n<0?l===-1?l=a-1:l-=1:n>0&&(l+=1),l=(l+a)%a,o[l]}var Ol=function(t,r){var n=new Set,o=new Map,a=new Map;return t.forEach(function(l){var i=document.querySelector("[data-menu-id='".concat(qd(r,l),"']"));i&&(n.add(i),a.set(i,l),o.set(l,i))}),{elements:n,key2element:o,element2key:a}};function Xp(e,t,r,n,o,a,l,i,u,s){var c=m.useRef(),p=m.useRef();p.current=t;var d=function(){mr.cancel(c.current)};return m.useEffect(function(){return function(){d()}},[]),function(h){var g=h.which;if([].concat(Au,[Da,Yd,ho,go]).includes(g)){var v=a(),f=Ol(v,n),C=f,y=C.elements,b=C.key2element,x=C.element2key,B=b.get(t),A=Gp(B,y),F=x.get(A),$=Up(e,l(F,!0).length===1,r,g);if(!$&&g!==ho&&g!==go)return;(Au.includes(g)||[ho,go].includes(g))&&h.preventDefault();var D=function(E){if(E){var I=E,M=E.querySelector("a");M!=null&&M.getAttribute("href")&&(I=M);var H=x.get(E);i(H),d(),c.current=mr(function(){p.current===H&&I.focus()})}};if([ho,go].includes(g)||$.sibling||!A){var L;!A||e==="inline"?L=o.current:L=Zp(A);var N,T=ks(L,y);g===ho?N=T[0]:g===go?N=T[T.length-1]:N=Fu(L,y,A,$.offset),D(N)}else if($.inlineTrigger)u(F);else if($.offset>0)u(F,!0),d(),c.current=mr(function(){f=Ol(v,n);var O=A.getAttribute("aria-controls"),E=document.getElementById(O),I=Fu(E,f.elements);D(I)},5);else if($.offset<0){var P=l(F,!0),S=P[P.length-2],k=b.get(S);u(S,!1),D(k)}}s==null||s(h)}}function Yp(e){Promise.resolve().then(e)}var Bs="__RC_UTIL_PATH_SPLIT__",$u=function(t){return t.join(Bs)},Qp=function(t){return t.split(Bs)},Rl="rc-menu-more";function Jp(){var e=m.useState({}),t=qe(e,2),r=t[1],n=ct(new Map),o=ct(new Map),a=m.useState([]),l=qe(a,2),i=l[0],u=l[1],s=ct(0),c=ct(!1),p=function(){c.current||r({})},d=ze(function(b,x){var B=$u(x);o.current.set(B,b),n.current.set(b,B),s.current+=1;var A=s.current;Yp(function(){A===s.current&&p()})},[]),h=ze(function(b,x){var B=$u(x);o.current.delete(B),n.current.delete(b)},[]),g=ze(function(b){u(b)},[]),v=ze(function(b,x){var B=n.current.get(b)||"",A=Qp(B);return x&&i.includes(A[0])&&A.unshift(Rl),A},[i]),f=ze(function(b,x){return b.filter(function(B){return B!==void 0}).some(function(B){var A=v(B,!0);return A.includes(x)})},[v]),C=function(){var x=tt(n.current.keys());return i.length&&x.push(Rl),x},y=ze(function(b){var x="".concat(n.current.get(b)).concat(Bs),B=new Set;return tt(o.current.keys()).forEach(function(A){A.startsWith(x)&&B.add(o.current.get(A))}),B},[]);return m.useEffect(function(){return function(){c.current=!0}},[]),{registerPath:d,unregisterPath:h,refreshOverflowKeys:g,isSubPathKey:f,getKeyPath:v,getKeys:C,getSubPathKeys:y}}function yo(e){var t=m.useRef(e);t.current=e;var r=m.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var eh=Math.random().toFixed(5).toString().slice(2),Nu=0;function th(e){var t=In(e,{value:e}),r=qe(t,2),n=r[0],o=r[1];return m.useEffect(function(){Nu+=1;var a="".concat(eh,"-").concat(Nu);o("rc-menu-uuid-".concat(a))},[]),n}function Qd(e,t,r,n){var o=m.useContext(br),a=o.activeKey,l=o.onActive,i=o.onInactive,u={active:a===e};return t||(u.onMouseEnter=function(s){r==null||r({key:e,domEvent:s}),l(e)},u.onMouseLeave=function(s){n==null||n({key:e,domEvent:s}),i(e)}),u}function Jd(e){var t=m.useContext(br),r=t.mode,n=t.rtl,o=t.inlineIndent;if(r!=="inline")return null;var a=e;return n?{paddingRight:a*o}:{paddingLeft:a*o}}function ef(e){var t=e.icon,r=e.props,n=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=m.createElement(t,xe({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var rh=["item"];function za(e){var t=e.item,r=At(e,rh);return Object.defineProperty(r,"item",{get:function(){return Br(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var nh=["title","attribute","elementRef"],oh=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],ah=["active"],ih=(function(e){$d(r,e);var t=Nd(r);function r(){return Od(this,r),t.apply(this,arguments)}return Rd(r,[{key:"render",value:function(){var o=this.props,a=o.title,l=o.attribute,i=o.elementRef,u=At(o,nh),s=_r(u,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Br(!l,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),m.createElement(Do.Item,Ve({},l,{title:typeof a=="string"?a:void 0},s,{ref:i}))}}]),r})(m.Component),lh=m.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.eventKey;e.warnKey;var a=e.disabled,l=e.itemIcon,i=e.children,u=e.role,s=e.onMouseEnter,c=e.onMouseLeave,p=e.onClick,d=e.onKeyDown,h=e.onFocus,g=At(e,oh),v=Ud(o),f=m.useContext(br),C=f.prefixCls,y=f.onItemClick,b=f.disabled,x=f.overflowDisabled,B=f.itemIcon,A=f.selectedKeys,F=f.onActive,$=m.useContext(Ss),D=$._internalRenderMenuItem,L="".concat(C,"-item"),N=m.useRef(),T=m.useRef(),P=b||a,S=Fd(t,T),k=eo(o),O=function(K){return{key:o,keyPath:tt(k).reverse(),item:N.current,domEvent:K}},E=l||B,I=Qd(o,P,s,c),M=I.active,H=At(I,ah),z=A.includes(o),U=Jd(k.length),G=function(K){if(!P){var X=O(K);p==null||p(za(X)),y(X)}},Y=function(K){if(d==null||d(K),K.which===Pt.ENTER){var X=O(K);p==null||p(za(X)),y(X)}},ae=function(K){F(o),h==null||h(K)},R={};e.role==="option"&&(R["aria-selected"]=z);var Z=m.createElement(ih,Ve({ref:N,elementRef:S,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":x&&v?null:v},_r(g,["extra"]),H,R,{component:"li","aria-disabled":a,style:xe(xe({},U),r),className:Ne(L,le(le(le({},"".concat(L,"-active"),M),"".concat(L,"-selected"),z),"".concat(L,"-disabled"),P),n),onClick:G,onKeyDown:Y,onFocus:ae}),i,m.createElement(ef,{props:xe(xe({},e),{},{isSelected:z}),icon:E}));return D&&(Z=D(Z,e,{selected:z})),Z});function sh(e,t){var r=e.eventKey,n=ci(),o=eo(r);return m.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:m.createElement(lh,Ve({},e,{ref:t}))}const di=m.forwardRef(sh);var uh=["className","children"],ch=function(t,r){var n=t.className,o=t.children,a=At(t,uh),l=m.useContext(br),i=l.prefixCls,u=l.mode,s=l.rtl;return m.createElement("ul",Ve({className:Ne(i,s&&"".concat(i,"-rtl"),"".concat(i,"-sub"),"".concat(i,"-").concat(u==="inline"?"inline":"vertical"),n),role:"menu"},a,{"data-menu-list":!0,ref:r}),o)},As=m.forwardRef(ch);As.displayName="SubMenuList";function Fs(e,t){return qo(e).map(function(r,n){if(m.isValidElement(r)){var o,a,l=r.key,i=(o=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&o!==void 0?o:l,u=i==null;u&&(i="tmp_key-".concat([].concat(tt(t),[n]).join("-")));var s={key:i,eventKey:i};return m.cloneElement(r,s)}return r})}var Ut={adjustX:1,adjustY:1},dh={topLeft:{points:["bl","tl"],overflow:Ut},topRight:{points:["br","tr"],overflow:Ut},bottomLeft:{points:["tl","bl"],overflow:Ut},bottomRight:{points:["tr","br"],overflow:Ut},leftTop:{points:["tr","tl"],overflow:Ut},leftBottom:{points:["br","bl"],overflow:Ut},rightTop:{points:["tl","tr"],overflow:Ut},rightBottom:{points:["bl","br"],overflow:Ut}},fh={topLeft:{points:["bl","tl"],overflow:Ut},topRight:{points:["br","tr"],overflow:Ut},bottomLeft:{points:["tl","bl"],overflow:Ut},bottomRight:{points:["tr","br"],overflow:Ut},rightTop:{points:["tr","tl"],overflow:Ut},rightBottom:{points:["br","bl"],overflow:Ut},leftTop:{points:["tl","tr"],overflow:Ut},leftBottom:{points:["bl","br"],overflow:Ut}};function tf(e,t,r){if(t)return t;if(r)return r[e]||r.other}var ph={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function hh(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,l=e.popupClassName,i=e.popupOffset,u=e.disabled,s=e.mode,c=e.onVisibleChange,p=m.useContext(br),d=p.getPopupContainer,h=p.rtl,g=p.subMenuOpenDelay,v=p.subMenuCloseDelay,f=p.builtinPlacements,C=p.triggerSubMenuAction,y=p.forceSubMenuRender,b=p.rootClassName,x=p.motion,B=p.defaultMotions,A=m.useState(!1),F=qe(A,2),$=F[0],D=F[1],L=h?xe(xe({},fh),f):xe(xe({},dh),f),N=ph[s],T=tf(s,x,B),P=m.useRef(T);s!=="inline"&&(P.current=T);var S=xe(xe({},P.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),k=m.useRef();return m.useEffect(function(){return k.current=mr(function(){D(r)}),function(){mr.cancel(k.current)}},[r]),m.createElement(Bd,{prefixCls:t,popupClassName:Ne("".concat(t,"-popup"),le({},"".concat(t,"-rtl"),h),l,b),stretch:s==="horizontal"?"minWidth":null,getPopupContainer:d,builtinPlacements:L,popupPlacement:N,popupVisible:$,popup:o,popupStyle:a,popupAlign:i&&{offset:i},action:u?[]:[C],mouseEnterDelay:g,mouseLeaveDelay:v,onPopupVisibleChange:c,forceRender:y,popupMotion:S,fresh:!0},n)}function gh(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",l=m.useContext(br),i=l.prefixCls,u=l.forceSubMenuRender,s=l.motion,c=l.defaultMotions,p=l.mode,d=m.useRef(!1);d.current=p===a;var h=m.useState(!d.current),g=qe(h,2),v=g[0],f=g[1],C=d.current?r:!1;m.useEffect(function(){d.current&&f(!1)},[p]);var y=xe({},tf(a,s,c));n.length>1&&(y.motionAppear=!1);var b=y.onVisibleChanged;return y.onVisibleChanged=function(x){return!d.current&&!x&&f(!0),b==null?void 0:b(x)},v?null:m.createElement(Ro,{mode:a,locked:!d.current},m.createElement(Pd,Ve({visible:C},y,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(i,"-hidden")}),function(x){var B=x.className,A=x.style;return m.createElement(As,{id:t,className:B,style:A},o)}))}var mh=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],vh=["active"],Ch=m.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.title,a=e.eventKey;e.warnKey;var l=e.disabled,i=e.internalPopupClose,u=e.children,s=e.itemIcon,c=e.expandIcon,p=e.popupClassName,d=e.popupOffset,h=e.popupStyle,g=e.onClick,v=e.onMouseEnter,f=e.onMouseLeave,C=e.onTitleClick,y=e.onTitleMouseEnter,b=e.onTitleMouseLeave,x=At(e,mh),B=Ud(a),A=m.useContext(br),F=A.prefixCls,$=A.mode,D=A.openKeys,L=A.disabled,N=A.overflowDisabled,T=A.activeKey,P=A.selectedKeys,S=A.itemIcon,k=A.expandIcon,O=A.onItemClick,E=A.onOpenChange,I=A.onActive,M=m.useContext(Ss),H=M._internalRenderSubMenuItem,z=m.useContext(Xd),U=z.isSubPathKey,G=eo(),Y="".concat(F,"-submenu"),ae=L||l,R=m.useRef(),Z=m.useRef(),V=s??S,K=c??k,X=D.includes(a),Q=!N&&X,ee=U(P,a),se=Qd(a,ae,y,b),re=se.active,oe=At(se,vh),ge=m.useState(!1),ce=qe(ge,2),Ee=ce[0],_e=ce[1],Ue=function(We){ae||_e(We)},de=function(We){Ue(!0),v==null||v({key:a,domEvent:We})},be=function(We){Ue(!1),f==null||f({key:a,domEvent:We})},Se=m.useMemo(function(){return re||($!=="inline"?Ee||U([T],a):!1)},[$,re,T,Ee,a,U]),Ke=Jd(G.length),Fe=function(We){ae||(C==null||C({key:a,domEvent:We}),$==="inline"&&E(a,!X))},$e=yo(function(Qe){g==null||g(za(Qe)),O(Qe)}),rt=function(We){$!=="inline"&&E(a,We)},Xe=function(){I(a)},je=B&&"".concat(B,"-popup"),Pe=m.useMemo(function(){return m.createElement(ef,{icon:$!=="horizontal"?K:void 0,props:xe(xe({},e),{},{isOpen:Q,isSubMenu:!0})},m.createElement("i",{className:"".concat(Y,"-arrow")}))},[$,K,e,Q,Y]),Ce=m.createElement("div",Ve({role:"menuitem",style:Ke,className:"".concat(Y,"-title"),tabIndex:ae?null:-1,ref:R,title:typeof o=="string"?o:null,"data-menu-id":N&&B?null:B,"aria-expanded":Q,"aria-haspopup":!0,"aria-controls":je,"aria-disabled":ae,onClick:Fe,onFocus:Xe},oe),o,Pe),ye=m.useRef($);if($!=="inline"&&G.length>1?ye.current="vertical":ye.current=$,!N){var He=ye.current;Ce=m.createElement(hh,{mode:He,prefixCls:Y,visible:!i&&Q&&$!=="inline",popupClassName:p,popupOffset:d,popupStyle:h,popup:m.createElement(Ro,{mode:He==="horizontal"?"vertical":He},m.createElement(As,{id:je,ref:Z},u)),disabled:ae,onVisibleChange:rt},Ce)}var Ye=m.createElement(Do.Item,Ve({ref:t,role:"none"},x,{component:"li",style:r,className:Ne(Y,"".concat(Y,"-").concat($),n,le(le(le(le({},"".concat(Y,"-open"),Q),"".concat(Y,"-active"),Se),"".concat(Y,"-selected"),ee),"".concat(Y,"-disabled"),ae)),onMouseEnter:de,onMouseLeave:be}),Ce,!N&&m.createElement(gh,{id:je,open:Q,keyPath:G},u));return H&&(Ye=H(Ye,e,{selected:ee,active:Se,open:Q,disabled:ae})),m.createElement(Ro,{onItemClick:$e,mode:$==="horizontal"?"vertical":$,itemIcon:V,expandIcon:K},Ye)}),fi=m.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=eo(r),a=Fs(n,o),l=ci();m.useEffect(function(){if(l)return l.registerPath(r,o),function(){l.unregisterPath(r,o)}},[o]);var i;return l?i=a:i=m.createElement(Ch,Ve({ref:t},e),a),m.createElement(Gd.Provider,{value:o},i)});function $s(e){var t=e.className,r=e.style,n=m.useContext(br),o=n.prefixCls,a=ci();return a?null:m.createElement("li",{role:"separator",className:Ne("".concat(o,"-item-divider"),t),style:r})}var bh=["className","title","eventKey","children"],yh=m.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var o=e.children,a=At(e,bh),l=m.useContext(br),i=l.prefixCls,u="".concat(i,"-item-group");return m.createElement("li",Ve({ref:t,role:"presentation"},a,{onClick:function(c){return c.stopPropagation()},className:Ne(u,r)}),m.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof n=="string"?n:void 0},n),m.createElement("ul",{role:"group",className:"".concat(u,"-list")},o))}),Ns=m.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=eo(r),a=Fs(n,o),l=ci();return l?a:m.createElement(yh,Ve({ref:t},_r(e,["warnKey"])),a)}),xh=["label","children","key","type","extra"];function Pl(e,t,r){var n=t.item,o=t.group,a=t.submenu,l=t.divider;return(e||[]).map(function(i,u){if(i&&yr(i)==="object"){var s=i,c=s.label,p=s.children,d=s.key,h=s.type,g=s.extra,v=At(s,xh),f=d??"tmp-".concat(u);return p||h==="group"?h==="group"?m.createElement(o,Ve({key:f},v,{title:c}),Pl(p,t,r)):m.createElement(a,Ve({key:f},v,{title:c}),Pl(p,t,r)):h==="divider"?m.createElement(l,Ve({key:f},v)):m.createElement(n,Ve({key:f},v,{extra:g}),c,(!!g||g===0)&&m.createElement("span",{className:"".concat(r,"-item-extra")},g))}return null}).filter(function(i){return i})}function Ou(e,t,r,n,o){var a=e,l=xe({divider:$s,item:di,group:Ns,submenu:fi},n);return t&&(a=Pl(t,l,o)),Fs(a,r)}var wh=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],ln=[],Dh=m.forwardRef(function(e,t){var r,n=e,o=n.prefixCls,a=o===void 0?"rc-menu":o,l=n.rootClassName,i=n.style,u=n.className,s=n.tabIndex,c=s===void 0?0:s,p=n.items,d=n.children,h=n.direction,g=n.id,v=n.mode,f=v===void 0?"vertical":v,C=n.inlineCollapsed,y=n.disabled,b=n.disabledOverflow,x=n.subMenuOpenDelay,B=x===void 0?.1:x,A=n.subMenuCloseDelay,F=A===void 0?.1:A,$=n.forceSubMenuRender,D=n.defaultOpenKeys,L=n.openKeys,N=n.activeKey,T=n.defaultActiveFirst,P=n.selectable,S=P===void 0?!0:P,k=n.multiple,O=k===void 0?!1:k,E=n.defaultSelectedKeys,I=n.selectedKeys,M=n.onSelect,H=n.onDeselect,z=n.inlineIndent,U=z===void 0?24:z,G=n.motion,Y=n.defaultMotions,ae=n.triggerSubMenuAction,R=ae===void 0?"hover":ae,Z=n.builtinPlacements,V=n.itemIcon,K=n.expandIcon,X=n.overflowedIndicator,Q=X===void 0?"...":X,ee=n.overflowedIndicatorPopupClassName,se=n.getPopupContainer,re=n.onClick,oe=n.onOpenChange,ge=n.onKeyDown;n.openAnimation,n.openTransitionName;var ce=n._internalRenderMenuItem,Ee=n._internalRenderSubMenuItem,_e=n._internalComponents,Ue=At(n,wh),de=m.useMemo(function(){return[Ou(d,p,ln,_e,a),Ou(d,p,ln,{},a)]},[d,p,_e]),be=qe(de,2),Se=be[0],Ke=be[1],Fe=m.useState(!1),$e=qe(Fe,2),rt=$e[0],Xe=$e[1],je=m.useRef(),Pe=th(g),Ce=h==="rtl",ye=In(D,{value:L,postState:function(ft){return ft||ln}}),He=qe(ye,2),Ye=He[0],Qe=He[1],We=function(ft){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function qt(){Qe(ft),oe==null||oe(ft)}yt?H1(qt):qt()},mt=m.useState(Ye),Ze=qe(mt,2),bt=Ze[0],pt=Ze[1],ht=m.useRef(!1),Ie=m.useMemo(function(){return(f==="inline"||f==="vertical")&&C?["vertical",C]:[f,!1]},[f,C]),ar=qe(Ie,2),Tt=ar[0],tr=ar[1],zt=Tt==="inline",Kt=m.useState(Tt),Mt=qe(Kt,2),q=Mt[0],fe=Mt[1],Re=m.useState(tr),Be=qe(Re,2),he=Be[0],we=Be[1];m.useEffect(function(){fe(Tt),we(tr),ht.current&&(zt?Qe(bt):We(ln))},[Tt,tr]);var Me=m.useState(0),te=qe(Me,2),me=te[0],J=te[1],W=me>=Se.length-1||q!=="horizontal"||b;m.useEffect(function(){zt&&pt(Ye)},[Ye]),m.useEffect(function(){return ht.current=!0,function(){ht.current=!1}},[]);var ie=Jp(),Ae=ie.registerPath,Ge=ie.unregisterPath,dt=ie.refreshOverflowKeys,Oe=ie.isSubPathKey,it=ie.getKeyPath,Ft=ie.getKeys,sr=ie.getSubPathKeys,Fr=m.useMemo(function(){return{registerPath:Ae,unregisterPath:Ge}},[Ae,Ge]),Sn=m.useMemo(function(){return{isSubPathKey:Oe}},[Oe]);m.useEffect(function(){dt(W?ln:Se.slice(me+1).map(function(wt){return wt.key}))},[me,W]);var zr=In(N||T&&((r=Se[0])===null||r===void 0?void 0:r.key),{value:N}),Nt=qe(zr,2),$r=Nt[0],kn=Nt[1],$i=yo(function(wt){kn(wt)}),ea=yo(function(){kn(void 0)});vs(t,function(){return{list:je.current,focus:function(ft){var yt,qt=Ft(),Lt=Ol(qt,Pe),nn=Lt.elements,co=Lt.key2element,oa=Lt.element2key,Bn=ks(je.current,nn),fo=$r??(Bn[0]?oa.get(Bn[0]):(yt=Se.find(function(Mi){return!Mi.props.disabled}))===null||yt===void 0?void 0:yt.key),Or=co.get(fo);if(fo&&Or){var An;Or==null||(An=Or.focus)===null||An===void 0||An.call(Or,ft)}}}});var Ni=In(E||[],{value:I,postState:function(ft){return Array.isArray(ft)?ft:ft==null?ln:[ft]}}),so=qe(Ni,2),Nr=so[0],ta=so[1],Oi=function(ft){if(S){var yt=ft.key,qt=Nr.includes(yt),Lt;O?qt?Lt=Nr.filter(function(co){return co!==yt}):Lt=[].concat(tt(Nr),[yt]):Lt=[yt],ta(Lt);var nn=xe(xe({},ft),{},{selectedKeys:Lt});qt?H==null||H(nn):M==null||M(nn)}!O&&Ye.length&&q!=="inline"&&We(ln)},ra=yo(function(wt){re==null||re(za(wt)),Oi(wt)}),uo=yo(function(wt,ft){var yt=Ye.filter(function(Lt){return Lt!==wt});if(ft)yt.push(wt);else if(q!=="inline"){var qt=sr(wt);yt=yt.filter(function(Lt){return!qt.has(Lt)})}Cn(Ye,yt,!0)||We(yt,!0)}),Ri=function(ft,yt){var qt=yt??!Ye.includes(ft);uo(ft,qt)},Pi=Xp(q,$r,Ce,Pe,je,Ft,it,kn,Ri,ge);m.useEffect(function(){Xe(!0)},[]);var Ti=m.useMemo(function(){return{_internalRenderMenuItem:ce,_internalRenderSubMenuItem:Ee}},[ce,Ee]),na=q!=="horizontal"||b?Se:Se.map(function(wt,ft){return m.createElement(Ro,{key:wt.key,overflowDisabled:ft>me},wt)}),rn=m.createElement(Do,Ve({id:g,ref:je,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:di,className:Ne(a,"".concat(a,"-root"),"".concat(a,"-").concat(q),u,le(le({},"".concat(a,"-inline-collapsed"),he),"".concat(a,"-rtl"),Ce),l),dir:h,style:i,role:"menu",tabIndex:c,data:na,renderRawItem:function(ft){return ft},renderRawRest:function(ft){var yt=ft.length,qt=yt?Se.slice(-yt):null;return m.createElement(fi,{eventKey:Rl,title:Q,disabled:W,internalPopupClose:yt===0,popupClassName:ee},qt)},maxCount:q!=="horizontal"||b?Do.INVALIDATE:Do.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ft){J(ft)},onKeyDown:Pi},Ue));return m.createElement(Ss.Provider,{value:Ti},m.createElement(Vd.Provider,{value:Pe},m.createElement(Ro,{prefixCls:a,rootClassName:l,mode:q,openKeys:Ye,rtl:Ce,disabled:y,motion:rt?G:null,defaultMotions:rt?Y:null,activeKey:$r,onActive:$i,onInactive:ea,selectedKeys:Nr,inlineIndent:U,subMenuOpenDelay:B,subMenuCloseDelay:F,forceSubMenuRender:$,builtinPlacements:Z,triggerSubMenuAction:R,getPopupContainer:se,itemIcon:V,expandIcon:K,onItemClick:ra,onOpenChange:uo},m.createElement(Xd.Provider,{value:Sn},rn),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(Zd.Provider,{value:Fr},Ke)))))}),Zo=Dh;Zo.Item=di;Zo.SubMenu=fi;Zo.ItemGroup=Ns;Zo.Divider=$s;const rf=m.createContext({});var Eh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Sh=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:Eh}))},nf=m.forwardRef(Sh);const Ka=Ar({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var kh=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const of=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=kh(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=m.useContext(en),l=a("menu",t),i=Ne({[`${l}-item-divider-dashed`]:!!n},r);return m.createElement($s,Object.assign({className:i},o))},af=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:l,extra:i}=e,{prefixCls:u,firstLevel:s,direction:c,disableMenuItemTitleTooltip:p,inlineCollapsed:d}=m.useContext(Ka),h=b=>{const x=n==null?void 0:n[0],B=m.createElement("span",{className:Ne(`${u}-title-content`,{[`${u}-title-content-with-extra`]:!!i||i===0})},n);return(!o||m.isValidElement(n)&&n.type==="span")&&n&&b&&s&&typeof x=="string"?m.createElement("div",{className:`${u}-inline-collapsed-noicon`},x.charAt(0)):B},{siderCollapsed:g}=m.useContext(rf);let v=a;typeof a>"u"?v=s?n:"":a===!1&&(v="");const f={title:v};!g&&!d&&(f.title=null,f.open=!1);const C=qo(n).length;let y=m.createElement(di,Object.assign({},_r(e,["title","icon","danger"]),{className:Ne({[`${u}-item-danger`]:l,[`${u}-item-only-child`]:(o?C+1:C)===1},r),title:typeof a=="string"?a:void 0}),Wn(o,{className:Ne(m.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${u}-item-icon`)}),h(d));return p||(y=m.createElement(La,Object.assign({},f,{placement:c==="rtl"?"left":"right",classNames:{root:`${u}-inline-collapsed-tooltip`}}),y)),y};var Bh=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Wa=m.createContext(null),lf=m.forwardRef((e,t)=>{const{children:r}=e,n=Bh(e,["children"]),o=m.useContext(Wa),a=m.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),l=U1(r),i=Fd(t,l?Cs(r):null);return m.createElement(Wa.Provider,{value:a},m.createElement(Z1,{space:!0},l?m.cloneElement(r,{ref:i}):r))}),Ah=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:a,lineType:l,itemPaddingInline:i}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${De(a)} ${l} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:i},[`> ${t}-item:hover,
|
|
2
|
+
> ${t}-item-active,
|
|
3
|
+
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},Fh=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
4
|
+
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${De(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${De(t)})`}}}}),Ru=e=>Td(e),Pu=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:l,itemBg:i,subMenuItemBg:u,itemSelectedBg:s,activeBarHeight:c,activeBarWidth:p,activeBarBorderWidth:d,motionDurationSlow:h,motionEaseInOut:g,motionEaseOut:v,itemPaddingInline:f,motionDurationMid:C,itemHoverColor:y,lineType:b,colorSplit:x,itemDisabledColor:B,dangerItemColor:A,dangerItemHoverColor:F,dangerItemSelectedColor:$,dangerItemActiveBg:D,dangerItemSelectedBg:L,popupBg:N,itemHoverBg:T,itemActiveBg:P,menuSubMenuBg:S,horizontalItemSelectedColor:k,horizontalItemSelectedBg:O,horizontalItemBorderRadius:E,horizontalItemHoverBg:I}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:i,[`&${r}-root:focus-visible`]:Object.assign({},Ru(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:l}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:a},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},Ru(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${B} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:y}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:T},"&:active":{backgroundColor:P}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:T},"&:active":{backgroundColor:P}}},[`${r}-item-danger`]:{color:A,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:F}},[`&${r}-item:active`]:{background:D}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:$},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:s,[`&${r}-item-danger`]:{backgroundColor:L}},[`&${r}-submenu > ${r}`]:{backgroundColor:S},[`&${r}-popup > ${r}`]:{backgroundColor:N},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:N},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:d,marginTop:e.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:E,"&::after":{position:"absolute",insetInline:f,bottom:0,borderBottom:`${De(c)} solid transparent`,transition:`border-color ${h} ${g}`,content:'""'},"&:hover, &-active, &-open":{background:I,"&::after":{borderBottomWidth:c,borderBottomColor:k}},"&-selected":{color:k,backgroundColor:O,"&:hover":{backgroundColor:O},"&::after":{borderBottomWidth:c,borderBottomColor:k}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${De(d)} ${b} ${x}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:u},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${De(p)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${C} ${v}`,`opacity ${C} ${v}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:$}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${C} ${g}`,`opacity ${C} ${g}`].join(",")}}}}}},Tu=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:l,itemMarginBlock:i,itemWidth:u,itemPaddingInline:s}=e,c=e.calc(a).add(o).add(l).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:De(r),paddingInline:s,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:i,width:u},[`> ${t}-item,
|
|
5
|
+
> ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:De(r)},[`${t}-item-group-list ${t}-submenu-title,
|
|
6
|
+
${t}-submenu-title`]:{paddingInlineEnd:c}}},$h=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:l,motionEaseOut:i,paddingXL:u,itemMarginInline:s,fontSizeLG:c,motionDurationFast:p,motionDurationSlow:d,paddingXS:h,boxShadowSecondary:g,collapsedWidth:v,collapsedIconSize:f}=e,C={height:n,lineHeight:De(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},Tu(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},Tu(e)),{boxShadow:g})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${De(e.calc(l).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${d}`,`background ${d}`,`padding ${p} ${i}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:C,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:C}},{[`${t}-inline-collapsed`]:{width:v,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:c,textAlign:"center"}}},[`> ${t}-item,
|
|
7
|
+
> ${t}-item-group > ${t}-item-group-list > ${t}-item,
|
|
8
|
+
> ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
|
|
9
|
+
> ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${De(e.calc(f).div(2).equal())} - ${De(s)})`,textOverflow:"clip",[`
|
|
10
|
+
${t}-submenu-arrow,
|
|
11
|
+
${t}-submenu-expand-icon
|
|
12
|
+
`]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:f,lineHeight:De(n),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},Md),{paddingInline:h})}}]},Mu=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:l,iconSize:i,iconMarginInlineEnd:u}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${l}`]:{minWidth:i,fontSize:i,transition:[`font-size ${n} ${a}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},G1()),[`&${t}-item-only-child`]:{[`> ${l}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Lu=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:a,menuArrowOffset:l}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${r} ${n}, opacity ${r}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${De(e.calc(l).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${De(l)})`}}}}},Nh=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:l,paddingXS:i,padding:u,colorSplit:s,lineWidth:c,zIndexPopup:p,borderRadiusLG:d,subMenuItemBorderRadius:h,menuArrowSize:g,menuArrowOffset:v,lineType:f,groupTitleLineHeight:C,groupTitleFontSize:y}=e;return[{"":{[r]:Object.assign(Object.assign({},Bl()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Uo(e)),Bl()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${De(i)} ${De(u)}`,fontSize:y,lineHeight:C,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${o} ${l}`,`background ${o} ${l}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o} ${l}`,`background ${o} ${l}`,`padding ${a} ${l}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${o} ${l}`,`padding ${o} ${l}`].join(",")},[`${r}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:s,borderStyle:f,borderWidth:0,borderTopWidth:c,marginBlock:c,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Mu(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${De(e.calc(n).mul(2).equal())} ${De(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,borderRadius:d,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:Object.assign(Object.assign(Object.assign({borderRadius:d},Mu(e)),Lu(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:h},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${l}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),Lu(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
|
|
13
|
+
&-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${De(v)})`},"&::after":{transform:`rotate(45deg) translateX(${De(e.calc(v).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${De(e.calc(g).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${De(e.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${De(v)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},Oh=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:l,colorErrorBg:i,colorText:u,colorTextDescription:s,colorBgContainer:c,colorFillAlter:p,colorFillContent:d,lineWidth:h,lineWidthBold:g,controlItemBgActive:v,colorBgTextHover:f,controlHeightLG:C,lineHeight:y,colorBgElevated:b,marginXXS:x,padding:B,fontSize:A,controlHeightSM:F,fontSizeLG:$,colorTextLightSolid:D,colorErrorHover:L}=e,N=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,T=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:h,P=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,S=new cn(D).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:u,itemColor:u,colorItemTextHover:u,itemHoverColor:u,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:c,itemBg:c,colorItemBgHover:f,itemHoverBg:f,colorItemBgActive:d,itemActiveBg:v,colorSubItemBg:p,subMenuItemBg:p,colorItemBgSelected:v,itemSelectedBg:v,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:g,activeBarHeight:g,colorActiveBarBorderSize:h,activeBarBorderWidth:T,colorItemTextDisabled:l,itemDisabledColor:l,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:P,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:C,groupTitleLineHeight:y,collapsedWidth:C*2,popupBg:b,itemMarginBlock:x,itemPaddingInline:B,horizontalLineHeight:`${C*1.15}px`,iconSize:A,iconMarginInlineEnd:F-A,collapsedIconSize:$,groupTitleFontSize:A,darkItemDisabledColor:new cn(D).setA(.25).toRgbString(),darkItemColor:S,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:D,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:S,darkItemHoverColor:D,darkDangerItemHoverColor:L,darkDangerItemSelectedColor:D,darkDangerItemActiveBg:a,itemWidth:N?`calc(100% + ${T}px)`:`calc(100% - ${P*2}px)`}},Rh=(e,t=e,r=!0)=>li("Menu",o=>{const{colorBgElevated:a,controlHeightLG:l,fontSize:i,darkItemColor:u,darkDangerItemColor:s,darkItemBg:c,darkSubMenuItemBg:p,darkItemSelectedColor:d,darkItemSelectedBg:h,darkDangerItemSelectedBg:g,darkItemHoverBg:v,darkGroupTitleColor:f,darkItemHoverColor:C,darkItemDisabledColor:y,darkDangerItemHoverColor:b,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:B,popupBg:A,darkPopupBg:F}=o,$=o.calc(i).div(7).mul(5).equal(),D=Oo(o,{menuArrowSize:$,menuHorizontalHeight:o.calc(l).mul(1.15).equal(),menuArrowOffset:o.calc($).mul(.25).equal(),menuSubMenuBg:a,calc:o.calc,popupBg:A}),L=Oo(D,{itemColor:u,itemHoverColor:C,groupTitleColor:f,itemSelectedColor:d,subMenuItemSelectedColor:d,itemBg:c,popupBg:F,subMenuItemBg:p,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:y,dangerItemColor:s,dangerItemHoverColor:b,dangerItemSelectedColor:x,dangerItemActiveBg:B,dangerItemSelectedBg:g,menuSubMenuBg:p,horizontalItemSelectedColor:d,horizontalItemSelectedBg:h});return[Nh(D),Ah(D),$h(D),Pu(D,"light"),Pu(L,"dark"),Fh(D),Ld(D),Ia(D,"slide-up"),Ia(D,"slide-down"),Id(D,"zoom-big")]},Oh,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),sf=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,l=m.useContext(Ka),{prefixCls:i,inlineCollapsed:u,theme:s}=l,c=eo();let p;if(!n)p=u&&!c.length&&o&&typeof o=="string"?m.createElement("div",{className:`${i}-inline-collapsed-noicon`},o.charAt(0)):m.createElement("span",{className:`${i}-title-content`},o);else{const g=m.isValidElement(o)&&o.type==="span";p=m.createElement(m.Fragment,null,Wn(n,{className:Ne(m.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${i}-item-icon`)}),g?o:m.createElement("span",{className:`${i}-title-content`},o))}const d=m.useMemo(()=>Object.assign(Object.assign({},l),{firstLevel:!1}),[l]),[h]=jd("Menu");return m.createElement(Ka.Provider,{value:d},m.createElement(fi,Object.assign({},_r(e,["icon"]),{title:p,popupClassName:Ne(i,r,`${i}-${a||s}`),popupStyle:Object.assign({zIndex:h},e.popupStyle)})))};var Ph=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function Ii(e){return e===null||e===!1}const Th={item:af,submenu:sf,divider:of},Mh=Jr((e,t)=>{var r;const n=m.useContext(Wa),o=n||{},{getPrefixCls:a,getPopupContainer:l,direction:i,menu:u}=m.useContext(en),s=a(),{prefixCls:c,className:p,style:d,theme:h="light",expandIcon:g,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:f,siderCollapsed:C,rootClassName:y,mode:b,selectable:x,onClick:B,overflowedIndicatorPopupClassName:A}=e,F=Ph(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),$=_r(F,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:b});const D=Cr((...U)=>{var G;B==null||B.apply(void 0,U),(G=o.onClick)===null||G===void 0||G.call(o)}),L=o.mode||b,N=x??o.selectable,T=f??C,P={horizontal:{motionName:`${s}-slide-up`},inline:_d(s),other:{motionName:`${s}-zoom-big`}},S=a("menu",c||o.prefixCls),k=ys(S),[O,E,I]=Rh(S,k,!n),M=Ne(`${S}-${h}`,u==null?void 0:u.className,p),H=m.useMemo(()=>{var U,G;if(typeof g=="function"||Ii(g))return g||null;if(typeof o.expandIcon=="function"||Ii(o.expandIcon))return o.expandIcon||null;if(typeof(u==null?void 0:u.expandIcon)=="function"||Ii(u==null?void 0:u.expandIcon))return(u==null?void 0:u.expandIcon)||null;const Y=(U=g??(o==null?void 0:o.expandIcon))!==null&&U!==void 0?U:u==null?void 0:u.expandIcon;return Wn(Y,{className:Ne(`${S}-submenu-expand-icon`,m.isValidElement(Y)?(G=Y.props)===null||G===void 0?void 0:G.className:void 0)})},[g,o==null?void 0:o.expandIcon,u==null?void 0:u.expandIcon,S]),z=m.useMemo(()=>({prefixCls:S,inlineCollapsed:T||!1,direction:i,firstLevel:!0,theme:h,mode:L,disableMenuItemTitleTooltip:v}),[S,T,i,v,h]);return O(m.createElement(Wa.Provider,{value:null},m.createElement(Ka.Provider,{value:z},m.createElement(Zo,Object.assign({getPopupContainer:l,overflowedIndicator:m.createElement(nf,null),overflowedIndicatorPopupClassName:Ne(S,`${S}-${h}`,A),mode:L,selectable:N,onClick:D},$,{inlineCollapsed:T,style:Object.assign(Object.assign({},u==null?void 0:u.style),d),className:M,prefixCls:S,direction:i,defaultMotions:P,expandIcon:H,ref:t,rootClassName:Ne(y,E,o.rootClassName,I,k),_internalComponents:Th})))))}),to=Jr((e,t)=>{const r=ct(null),n=m.useContext(rf);return vs(t,()=>({menu:r.current,focus:o=>{var a;(a=r.current)===null||a===void 0||a.focus(o)}})),m.createElement(Mh,Object.assign({ref:r},e,n))});to.Item=af;to.SubMenu=sf;to.Divider=of;to.ItemGroup=Ns;const Lh=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:o}=e,a=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:n,"&:hover":{color:o,backgroundColor:n}}}}}},Ih=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:a,antCls:l,iconCls:i,motionDurationMid:u,paddingBlock:s,fontSize:c,dropdownEdgeChildPadding:p,colorTextDisabled:d,fontSizeIcon:h,controlPaddingHorizontal:g,colorBgElevated:v}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${l}-btn`]:{[`& > ${i}-down, & > ${l}-btn-icon > ${i}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${l}-btn > ${i}-down`]:{fontSize:h},[`${i}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${i}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
14
|
+
&${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
15
|
+
&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom,
|
|
16
|
+
&${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom,
|
|
17
|
+
&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight,
|
|
18
|
+
&${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:J1},[`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft,
|
|
19
|
+
&${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft,
|
|
20
|
+
&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top,
|
|
21
|
+
&${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top,
|
|
22
|
+
&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight,
|
|
23
|
+
&${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Q1},[`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
24
|
+
&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom,
|
|
25
|
+
&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Y1},[`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft,
|
|
26
|
+
&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top,
|
|
27
|
+
&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]:{animationName:X1}}},ep(e,v,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Uo(e)),{[r]:Object.assign(Object.assign({padding:p,listStyleType:"none",backgroundColor:v,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},wu(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${De(s)} ${De(g)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:c,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${De(s)} ${De(g)}`,color:e.colorText,fontWeight:"normal",fontSize:c,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},wu(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:d,cursor:"not-allowed","&:hover":{color:d,backgroundColor:v,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${De(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:h,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${De(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(g).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:d,backgroundColor:v,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ia(e,"slide-up"),Ia(e,"slide-down"),xu(e,"move-up"),xu(e,"move-down"),Id(e,"zoom-big")]]},jh=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},tp({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),rp(e)),_h=li("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=Oo(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[Ih(a),Lh(a)]},jh,{resetStyle:!1}),pi=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:l,disabled:i,dropdownRender:u,popupRender:s,getPopupContainer:c,overlayClassName:p,rootClassName:d,overlayStyle:h,open:g,onOpenChange:v,visible:f,onVisibleChange:C,mouseEnterDelay:y=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:x=!0,placement:B="",overlay:A,transitionName:F,destroyOnHidden:$,destroyPopupOnHide:D}=e,{getPopupContainer:L,getPrefixCls:N,direction:T,dropdown:P}=m.useContext(en),S=s||u;si();const k=m.useMemo(()=>{const ce=N();return F!==void 0?F:B.includes("top")?`${ce}-slide-down`:`${ce}-slide-up`},[N,B,F]),O=m.useMemo(()=>B?B.includes("Center")?B.slice(0,B.indexOf("Center")):B:T==="rtl"?"bottomRight":"bottomLeft",[B,T]),E=N("dropdown",o),I=ys(E),[M,H,z]=_h(E,I),[,U]=xs(),G=m.Children.only(zp(a)?m.createElement("span",null,a):a),Y=Wn(G,{className:Ne(`${E}-trigger`,{[`${E}-rtl`]:T==="rtl"},G.props.className),disabled:(t=G.props.disabled)!==null&&t!==void 0?t:i}),ae=i?[]:l,R=!!(ae!=null&&ae.includes("contextMenu")),[Z,V]=In(!1,{value:g??f}),K=Cr(ce=>{v==null||v(ce,{source:"trigger"}),C==null||C(ce),V(ce)}),X=Ne(p,d,H,z,I,P==null?void 0:P.className,{[`${E}-rtl`]:T==="rtl"}),Q=np({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:x,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),ee=Cr(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(v==null||v(!1,{source:"menu"}),V(!1))}),se=()=>{let ce;return r!=null&&r.items?ce=m.createElement(to,Object.assign({},r)):typeof A=="function"?ce=A():ce=A,S&&(ce=S(ce)),ce=m.Children.only(typeof ce=="string"?m.createElement("span",null,ce):ce),m.createElement(lf,{prefixCls:`${E}-menu`,rootClassName:Ne(z,I),expandIcon:m.createElement("span",{className:`${E}-menu-submenu-arrow`},T==="rtl"?m.createElement(W1,{className:`${E}-menu-submenu-arrow-icon`}):m.createElement(V1,{className:`${E}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ee,validator:({mode:Ee})=>{}},ce)},[re,oe]=jd("Dropdown",h==null?void 0:h.zIndex);let ge=m.createElement(Hp,Object.assign({alignPoint:R},_r(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:b,visible:Z,builtinPlacements:Q,arrow:!!n,overlayClassName:X,prefixCls:E,getPopupContainer:c||L,transitionName:k,trigger:ae,overlay:se,placement:O,onVisibleChange:K,overlayStyle:Object.assign(Object.assign(Object.assign({},P==null?void 0:P.style),h),{zIndex:re}),autoDestroy:$??D}),Y);return re&&(ge=m.createElement(op.Provider,{value:oe},ge)),M(ge)},Hh=ap(pi,"align",void 0,"dropdown",e=>e),zh=e=>m.createElement(Hh,Object.assign({},e),m.createElement("span",null));pi._InternalPanelDoNotUseOrYouWillBeFired=zh;function nr(e,t){return e[t]}var Kh=["children"];function uf(e,t){return"".concat(e,"-").concat(t)}function Wh(e){return e&&e.type&&e.type.isTreeNode}function Go(e,t){return e??t}function Vn(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,l=r||"title";return{title:l,_title:n||[l],key:o||"key",children:a||"children"}}function cf(e){function t(r){var n=qo(r);return n.map(function(o){if(!Wh(o))return Br(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,l=o.props,i=l.children,u=At(l,Kh),s=xe({key:a},u),c=t(i);return c.length&&(s.children=c),s}).filter(function(o){return o})}return t(e)}function ji(e,t,r){var n=Vn(r),o=n._title,a=n.key,l=n.children,i=new Set(t===!0?[]:t),u=[];function s(c){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(d,h){for(var g=uf(p?p.pos:"0",h),v=Go(d[a],g),f,C=0;C<o.length;C+=1){var y=o[C];if(d[y]!==void 0){f=d[y];break}}var b=Object.assign(_r(d,[].concat(tt(o),[a,l])),{title:f,key:v,parent:p,pos:g,children:null,data:d,isStart:[].concat(tt(p?p.isStart:[]),[h===0]),isEnd:[].concat(tt(p?p.isEnd:[]),[h===c.length-1])});return u.push(b),t===!0||i.has(v)?b.children=s(d[l]||[],b):b.children=[],b})}return s(e),u}function Vh(e,t,r){var n={};yr(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,l=o.externalGetKey,i=o.fieldNames,u=Vn(i),s=u.key,c=u.children,p=a||c,d;l?typeof l=="string"?d=function(v){return v[l]}:typeof l=="function"&&(d=function(v){return l(v)}):d=function(v,f){return Go(v[s],f)};function h(g,v,f,C){var y=g?g[p]:e,b=g?uf(f.pos,v):"0",x=g?[].concat(tt(C),[g]):[];if(g){var B=d(g,b),A={node:g,index:v,pos:b,key:B,parentPos:f.node?f.pos:null,level:f.level+1,nodes:x};t(A)}y&&y.forEach(function(F,$){h(F,$,{node:g,pos:b,level:f?f.level+1:-1},x)})}h(null)}function Os(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,l=t.childrenPropName,i=t.fieldNames,u=arguments.length>2?arguments[2]:void 0,s=a||u,c={},p={},d={posEntities:c,keyEntities:p};return r&&(d=r(d)||d),Vh(e,function(h){var g=h.node,v=h.index,f=h.pos,C=h.key,y=h.parentPos,b=h.level,x=h.nodes,B={node:g,nodes:x,index:v,key:C,pos:f,level:b},A=Go(C,f);c[f]=B,p[A]=B,B.parent=c[y],B.parent&&(B.parent.children=B.parent.children||[],B.parent.children.push(B)),n&&n(B,d)},{externalGetKey:s,childrenPropName:l,fieldNames:i}),o&&o(d),d}function Eo(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,l=t.checkedKeys,i=t.halfCheckedKeys,u=t.dragOverNodeKey,s=t.dropPosition,c=t.keyEntities,p=nr(c,e),d={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:l.indexOf(e)!==-1,halfChecked:i.indexOf(e)!==-1,pos:String(p?p.pos:""),dragOver:u===e&&s===0,dragOverGapTop:u===e&&s===-1,dragOverGapBottom:u===e&&s===1};return d}function Ot(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,l=e.loading,i=e.halfChecked,u=e.dragOver,s=e.dragOverGapTop,c=e.dragOverGapBottom,p=e.pos,d=e.active,h=e.eventKey,g=xe(xe({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:l,halfChecked:i,dragOver:u,dragOverGapTop:s,dragOverGapBottom:c,pos:p,active:d,key:h});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Br(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),g}function df(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function qh(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function Uh(e,t,r,n){for(var o=new Set(e),a=new Set,l=0;l<=r;l+=1){var i=t.get(l)||new Set;i.forEach(function(p){var d=p.key,h=p.node,g=p.children,v=g===void 0?[]:g;o.has(d)&&!n(h)&&v.filter(function(f){return!n(f.node)}).forEach(function(f){o.add(f.key)})})}for(var u=new Set,s=r;s>=0;s-=1){var c=t.get(s)||new Set;c.forEach(function(p){var d=p.parent,h=p.node;if(!(n(h)||!p.parent||u.has(p.parent.key))){if(n(p.parent.node)){u.add(d.key);return}var g=!0,v=!1;(d.children||[]).filter(function(f){return!n(f.node)}).forEach(function(f){var C=f.key,y=o.has(C);g&&!y&&(g=!1),!v&&(y||a.has(C))&&(v=!0)}),g&&o.add(d.key),v&&a.add(d.key),u.add(d.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(df(a,o))}}function Zh(e,t,r,n,o){for(var a=new Set(e),l=new Set(t),i=0;i<=n;i+=1){var u=r.get(i)||new Set;u.forEach(function(d){var h=d.key,g=d.node,v=d.children,f=v===void 0?[]:v;!a.has(h)&&!l.has(h)&&!o(g)&&f.filter(function(C){return!o(C.node)}).forEach(function(C){a.delete(C.key)})})}l=new Set;for(var s=new Set,c=n;c>=0;c-=1){var p=r.get(c)||new Set;p.forEach(function(d){var h=d.parent,g=d.node;if(!(o(g)||!d.parent||s.has(d.parent.key))){if(o(d.parent.node)){s.add(h.key);return}var v=!0,f=!1;(h.children||[]).filter(function(C){return!o(C.node)}).forEach(function(C){var y=C.key,b=a.has(y);v&&!b&&(v=!1),!f&&(b||l.has(y))&&(f=!0)}),v||a.delete(h.key),f&&l.add(h.key),s.add(h.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(df(l,a))}}function jn(e,t,r,n){var o=[],a;n?a=n:a=qh;var l=new Set(e.filter(function(c){var p=!!nr(r,c);return p||o.push(c),p})),i=new Map,u=0;Object.keys(r).forEach(function(c){var p=r[c],d=p.level,h=i.get(d);h||(h=new Set,i.set(d,h)),h.add(p),u=Math.max(u,d)}),Br(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var s;return t===!0?s=Uh(l,i,u,a):s=Zh(l,t.halfCheckedKeys,i,u,a),s}function Iu(e){return["small","middle","large"].includes(e)}function ju(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const ff=pe.createContext({latestIndex:0}),Gh=ff.Provider,Xh=({className:e,index:t,children:r,split:n,style:o})=>{const{latestIndex:a}=m.useContext(ff);return r==null?null:m.createElement(m.Fragment,null,m.createElement("div",{className:e,style:o},r),t<a&&n&&m.createElement("span",{className:`${e}-split`},n))};var Yh=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Qh=m.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,size:a,className:l,style:i,classNames:u,styles:s}=ip("space"),{size:c=a??"small",align:p,className:d,rootClassName:h,children:g,direction:v="horizontal",prefixCls:f,split:C,style:y,wrap:b=!1,classNames:x,styles:B}=e,A=Yh(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[F,$]=Array.isArray(c)?c:[c,c],D=Iu($),L=Iu(F),N=ju($),T=ju(F),P=qo(g,{keepEmpty:!0}),S=p===void 0&&v==="horizontal"?"center":p,k=n("space",f),[O,E,I]=lp(k),M=Ne(k,l,E,`${k}-${v}`,{[`${k}-rtl`]:o==="rtl",[`${k}-align-${S}`]:S,[`${k}-gap-row-${$}`]:D,[`${k}-gap-col-${F}`]:L},d,h,I),H=Ne(`${k}-item`,(r=x==null?void 0:x.item)!==null&&r!==void 0?r:u.item),z=Object.assign(Object.assign({},s.item),B==null?void 0:B.item),U=P.map((ae,R)=>{const Z=(ae==null?void 0:ae.key)||`${H}-${R}`;return m.createElement(Xh,{className:H,key:Z,index:R,split:C,style:z},ae)}),G=m.useMemo(()=>({latestIndex:P.reduce((R,Z,V)=>Z!=null?V:R,0)}),[P]);if(P.length===0)return null;const Y={};return b&&(Y.flexWrap="wrap"),!L&&T&&(Y.columnGap=F),!D&&N&&(Y.rowGap=$),O(m.createElement("div",Object.assign({ref:t,className:M,style:Object.assign(Object.assign(Object.assign({},Y),i),y)},A),m.createElement(Gh,{value:G},U)))}),pf=Qh;pf.Compact=sp;var Jh=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const hf=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=m.useContext(en),{prefixCls:o,type:a="default",danger:l,disabled:i,loading:u,onClick:s,htmlType:c,children:p,className:d,menu:h,arrow:g,autoFocus:v,overlay:f,trigger:C,align:y,open:b,onOpenChange:x,placement:B,getPopupContainer:A,href:F,icon:$=m.createElement(nf,null),title:D,buttonsRender:L=Q=>Q,mouseEnterDelay:N,mouseLeaveDelay:T,overlayClassName:P,overlayStyle:S,destroyOnHidden:k,destroyPopupOnHide:O,dropdownRender:E,popupRender:I}=e,M=Jh(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),H=r("dropdown",o),z=`${H}-button`,G={menu:h,arrow:g,autoFocus:v,align:y,disabled:i,trigger:i?[]:C,onOpenChange:x,getPopupContainer:A||t,mouseEnterDelay:N,mouseLeaveDelay:T,overlayClassName:P,overlayStyle:S,destroyOnHidden:k,popupRender:I||E},{compactSize:Y,compactItemClassnames:ae}=up(H,n),R=Ne(z,ae,d);"destroyPopupOnHide"in e&&(G.destroyPopupOnHide=O),"overlay"in e&&(G.overlay=f),"open"in e&&(G.open=b),"placement"in e?G.placement=B:G.placement=n==="rtl"?"bottomLeft":"bottomRight";const Z=m.createElement(ja,{type:a,danger:l,disabled:i,loading:u,onClick:s,htmlType:c,href:F,title:D},p),V=m.createElement(ja,{type:a,danger:l,icon:$}),[K,X]=L([Z,V]);return m.createElement(pf.Compact,Object.assign({className:R,size:Y,block:!0},M),K,m.createElement(pi,Object.assign({},G),X))};hf.__ANT_BUTTON=!0;const Rs=pi;Rs.Button=hf;function _u(e,t,r,n){var o=kl.unstable_batchedUpdates?function(l){kl.unstable_batchedUpdates(r,l)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var qr={},Xo="rc-table-internal-hook";function Ps(e){var t=m.createContext(void 0),r=function(o){var a=o.value,l=o.children,i=m.useRef(a);i.current=a;var u=m.useState(function(){return{getValue:function(){return i.current},listeners:new Set}}),s=qe(u,1),c=s[0];return Xr(function(){z1(function(){c.listeners.forEach(function(p){p(a)})})},[a]),m.createElement(t.Provider,{value:c},l)};return{Context:t,Provider:r,defaultValue:e}}function Ht(e,t){var r=Cr(typeof t=="function"?t:function(p){if(t===void 0)return p;if(!Array.isArray(t))return p[t];var d={};return t.forEach(function(h){d[h]=p[h]}),d}),n=m.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,l=o.getValue,i=m.useRef();i.current=r(n?l():e==null?void 0:e.defaultValue);var u=m.useState({}),s=qe(u,2),c=s[1];return Xr(function(){if(!n)return;function p(d){var h=r(d);Cn(i.current,h,!0)||c({})}return a.add(p),function(){a.delete(p)}},[n]),i.current}function eg(){var e=m.createContext(null);function t(){return m.useContext(e)}function r(o,a){var l=Ma(o),i=function(s,c){var p=l?{ref:c}:{},d=m.useRef(0),h=m.useRef(s),g=t();return g!==null?m.createElement(o,Ve({},s,p)):((!a||a(h.current,s))&&(d.current+=1),h.current=s,m.createElement(e.Provider,{value:d.current},m.createElement(o,Ve({},s,p))))};return l?m.forwardRef(i):i}function n(o,a){var l=Ma(o),i=function(s,c){var p=l?{ref:c}:{};return t(),m.createElement(o,Ve({},s,p))};return l?m.memo(m.forwardRef(i),a):m.memo(i,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var Ts=eg(),gf=Ts.makeImmutable,ro=Ts.responseImmutable,tg=Ts.useImmutableMark,Gt=Ps(),mf=m.createContext({renderWithProps:!1}),rg="RC_TABLE_KEY";function ng(e){return e==null?[]:Array.isArray(e)?e:[e]}function hi(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,l=o.dataIndex,i=a||ng(l).join("-")||rg;r[i];)i="".concat(i,"_next");r[i]=!0,t.push(i)}),t}function Tl(e){return e!=null}function og(e){return typeof e=="number"&&!Number.isNaN(e)}function ag(e){return e&&yr(e)==="object"&&!Array.isArray(e)&&!m.isValidElement(e)}function ig(e,t,r,n,o,a){var l=m.useContext(mf),i=tg(),u=bs(function(){if(Tl(n))return[n];var s=t==null||t===""?[]:Array.isArray(t)?t:[t],c=ws(e,s),p=c,d=void 0;if(o){var h=o(c,e,r);ag(h)?(p=h.children,d=h.props,l.renderWithProps=!0):p=h}return[p,d]},[i,e,n,t,o,r],function(s,c){if(a){var p=qe(s,2),d=p[1],h=qe(c,2),g=h[1];return a(g,d)}return l.renderWithProps?!0:!Cn(s,c,!0)});return u}function lg(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function sg(e,t){return Ht(Gt,function(r){var n=lg(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var ug=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,a,l=r===!0?{showTitle:!0}:r;return l&&(l.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?a=o.toString():m.isValidElement(o)&&typeof o.props.children=="string"&&(a=o.props.children)),a};function cg(e){var t,r,n,o,a,l,i,u,s=e.component,c=e.children,p=e.ellipsis,d=e.scope,h=e.prefixCls,g=e.className,v=e.align,f=e.record,C=e.render,y=e.dataIndex,b=e.renderIndex,x=e.shouldCellUpdate,B=e.index,A=e.rowType,F=e.colSpan,$=e.rowSpan,D=e.fixLeft,L=e.fixRight,N=e.firstFixLeft,T=e.lastFixLeft,P=e.firstFixRight,S=e.lastFixRight,k=e.appendNode,O=e.additionalProps,E=O===void 0?{}:O,I=e.isSticky,M="".concat(h,"-cell"),H=Ht(Gt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),z=H.supportSticky,U=H.allColumnsFixedLeft,G=H.rowHoverable,Y=ig(f,y,b,c,C,x),ae=qe(Y,2),R=ae[0],Z=ae[1],V={},K=typeof D=="number"&&z,X=typeof L=="number"&&z;K&&(V.position="sticky",V.left=D),X&&(V.position="sticky",V.right=L);var Q=(t=(r=(n=Z==null?void 0:Z.colSpan)!==null&&n!==void 0?n:E.colSpan)!==null&&r!==void 0?r:F)!==null&&t!==void 0?t:1,ee=(o=(a=(l=Z==null?void 0:Z.rowSpan)!==null&&l!==void 0?l:E.rowSpan)!==null&&a!==void 0?a:$)!==null&&o!==void 0?o:1,se=sg(B,ee),re=qe(se,2),oe=re[0],ge=re[1],ce=Cr(function(Ke){var Fe;f&&ge(B,B+ee-1),E==null||(Fe=E.onMouseEnter)===null||Fe===void 0||Fe.call(E,Ke)}),Ee=Cr(function(Ke){var Fe;f&&ge(-1,-1),E==null||(Fe=E.onMouseLeave)===null||Fe===void 0||Fe.call(E,Ke)});if(Q===0||ee===0)return null;var _e=(i=E.title)!==null&&i!==void 0?i:ug({rowType:A,ellipsis:p,children:R}),Ue=Ne(M,g,(u={},le(le(le(le(le(le(le(le(le(le(u,"".concat(M,"-fix-left"),K&&z),"".concat(M,"-fix-left-first"),N&&z),"".concat(M,"-fix-left-last"),T&&z),"".concat(M,"-fix-left-all"),T&&U&&z),"".concat(M,"-fix-right"),X&&z),"".concat(M,"-fix-right-first"),P&&z),"".concat(M,"-fix-right-last"),S&&z),"".concat(M,"-ellipsis"),p),"".concat(M,"-with-append"),k),"".concat(M,"-fix-sticky"),(K||X)&&I&&z),le(u,"".concat(M,"-row-hover"),!Z&&oe)),E.className,Z==null?void 0:Z.className),de={};v&&(de.textAlign=v);var be=xe(xe(xe(xe({},Z==null?void 0:Z.style),V),de),E.style),Se=R;return yr(Se)==="object"&&!Array.isArray(Se)&&!m.isValidElement(Se)&&(Se=null),p&&(T||P)&&(Se=m.createElement("span",{className:"".concat(M,"-content")},Se)),m.createElement(s,Ve({},Z,E,{className:Ue,style:be,title:_e,scope:d,onMouseEnter:G?ce:void 0,onMouseLeave:G?Ee:void 0,colSpan:Q!==1?Q:null,rowSpan:ee!==1?ee:null}),k,Se)}const no=m.memo(cg);function Ms(e,t,r,n,o){var a=r[e]||{},l=r[t]||{},i,u;a.fixed==="left"?i=n.left[o==="rtl"?t:e]:l.fixed==="right"&&(u=n.right[o==="rtl"?e:t]);var s=!1,c=!1,p=!1,d=!1,h=r[t+1],g=r[e-1],v=h&&!h.fixed||g&&!g.fixed||r.every(function(x){return x.fixed==="left"});if(o==="rtl"){if(i!==void 0){var f=g&&g.fixed==="left";d=!f&&v}else if(u!==void 0){var C=h&&h.fixed==="right";p=!C&&v}}else if(i!==void 0){var y=h&&h.fixed==="left";s=!y&&v}else if(u!==void 0){var b=g&&g.fixed==="right";c=!b&&v}return{fixLeft:i,fixRight:u,lastFixLeft:s,firstFixRight:c,lastFixRight:p,firstFixLeft:d,isSticky:n.isSticky}}var vf=m.createContext({});function dg(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,l=e.rowSpan,i=e.align,u=Ht(Gt,["prefixCls","direction"]),s=u.prefixCls,c=u.direction,p=m.useContext(vf),d=p.scrollColumnIndex,h=p.stickyOffsets,g=p.flattenColumns,v=r+a-1,f=v+1===d?a+1:a,C=Ms(r,r+f-1,g,h,c);return m.createElement(no,Ve({className:t,index:r,component:"td",prefixCls:s,record:null,dataIndex:null,align:i,colSpan:f,rowSpan:l,render:function(){return n}},C))}var fg=["children"];function pg(e){var t=e.children,r=At(e,fg);return m.createElement("tr",r,t)}function gi(e){var t=e.children;return t}gi.Row=pg;gi.Cell=dg;function hg(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Ht(Gt,"prefixCls"),a=n.length-1,l=n[a],i=m.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:l!=null&&l.scrollbar?a:null}},[l,n,a,r]);return m.createElement(vf.Provider,{value:i},m.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const aa=ro(hg);var Cf=gi;function gg(e){return null}function mg(e){return null}function bf(e,t,r,n,o,a,l){var i=a(t,l);e.push({record:t,indent:r,index:l,rowKey:i});var u=o==null?void 0:o.has(i);if(t&&Array.isArray(t[n])&&u)for(var s=0;s<t[n].length;s+=1)bf(e,t[n][s],r+1,n,o,a,s)}function yf(e,t,r,n){var o=m.useMemo(function(){if(r!=null&&r.size){for(var a=[],l=0;l<(e==null?void 0:e.length);l+=1){var i=e[l];bf(a,i,0,t,r,n,l)}return a}return e==null?void 0:e.map(function(u,s){return{record:u,indent:0,index:s,rowKey:n(u,s)}})},[e,t,r,n]);return o}function xf(e,t,r,n){var o=Ht(Gt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,l=o.expandableType,i=o.expandedKeys,u=o.childrenColumnName,s=o.onTriggerExpand,c=o.rowExpandable,p=o.onRow,d=o.expandRowByClick,h=o.rowClassName,g=l==="nest",v=l==="row"&&(!c||c(e)),f=v||g,C=i&&i.has(t),y=u&&e&&e[u],b=Cr(s),x=p==null?void 0:p(e,r),B=x==null?void 0:x.onClick,A=function(L){d&&f&&s(e,L);for(var N=arguments.length,T=new Array(N>1?N-1:0),P=1;P<N;P++)T[P-1]=arguments[P];B==null||B.apply(void 0,[L].concat(T))},F;typeof h=="string"?F=h:typeof h=="function"&&(F=h(e,r,n));var $=hi(a);return xe(xe({},o),{},{columnsKey:$,nestExpandable:g,expanded:C,hasNestChildren:y,record:e,onTriggerExpand:b,rowSupportExpand:v,expandable:f,rowProps:xe(xe({},x),{},{className:Ne(F,x==null?void 0:x.className),onClick:A})})}function wf(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,l=e.expanded,i=e.colSpan,u=e.isEmpty,s=e.stickyOffset,c=s===void 0?0:s,p=Ht(Gt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),d=p.scrollbarSize,h=p.fixHeader,g=p.fixColumn,v=p.componentWidth,f=p.horizonScroll,C=r;return(u?f&&v:g)&&(C=m.createElement("div",{style:{width:v-c-(h&&!u?d:0),position:"sticky",left:c,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},C)),m.createElement(n,{className:a,style:{display:l?null:"none"}},m.createElement(no,{component:o,prefixCls:t,colSpan:i},C))}function vg(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,l="".concat(t,"-row-expand-icon");if(!a)return m.createElement("span",{className:Ne(l,"".concat(t,"-row-spaced"))});var i=function(s){n(r,s),s.stopPropagation()};return m.createElement("span",{className:Ne(l,le(le({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:i})}function Cg(e,t,r){var n=[];function o(a){(a||[]).forEach(function(l,i){n.push(t(l,i)),o(l[r])})}return o(e),n}function Df(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function Ef(e,t,r,n,o){var a,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,u=e.record,s=e.prefixCls,c=e.columnsKey,p=e.fixedInfoList,d=e.expandIconColumnIndex,h=e.nestExpandable,g=e.indentSize,v=e.expandIcon,f=e.expanded,C=e.hasNestChildren,y=e.onTriggerExpand,b=e.expandable,x=e.expandedKeys,B=c[r],A=p[r],F;r===(d||0)&&h&&(F=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(g*n,"px")},className:"".concat(s,"-row-indent indent-level-").concat(n)}),v({prefixCls:s,expanded:f,expandable:C,record:u,onExpand:y})));var $=((a=t.onCell)===null||a===void 0?void 0:a.call(t,u,o))||{};if(i){var D=$.rowSpan,L=D===void 0?1:D;if(b&&L&&r<i){for(var N=L,T=o;T<o+L;T+=1){var P=l[T];x.has(P)&&(N+=1)}$.rowSpan=N}}return{key:B,fixedInfo:A,appendCellNode:F,additionalCellProps:$}}function bg(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,l=e.rowKey,i=e.rowKeys,u=e.indent,s=u===void 0?0:u,c=e.rowComponent,p=e.cellComponent,d=e.scopeCellComponent,h=e.expandedRowInfo,g=xf(n,l,o,s),v=g.prefixCls,f=g.flattenColumns,C=g.expandedRowClassName,y=g.expandedRowRender,b=g.rowProps,x=g.expanded,B=g.rowSupportExpand,A=m.useRef(!1);A.current||(A.current=x);var F=Df(C,n,o,s),$=m.createElement(c,Ve({},b,{"data-row-key":l,className:Ne(t,"".concat(v,"-row"),"".concat(v,"-row-level-").concat(s),b==null?void 0:b.className,le({},F,s>=1)),style:xe(xe({},r),b==null?void 0:b.style)}),f.map(function(N,T){var P=N.render,S=N.dataIndex,k=N.className,O=Ef(g,N,T,s,o,i,h==null?void 0:h.offset),E=O.key,I=O.fixedInfo,M=O.appendCellNode,H=O.additionalCellProps;return m.createElement(no,Ve({className:k,ellipsis:N.ellipsis,align:N.align,scope:N.rowScope,component:N.rowScope?d:p,prefixCls:v,key:E,record:n,index:o,renderIndex:a,dataIndex:S,render:P,shouldCellUpdate:N.shouldCellUpdate},I,{appendNode:M,additionalProps:H}))})),D;if(B&&(A.current||x)){var L=y(n,o,s+1,x);D=m.createElement(wf,{expanded:x,className:Ne("".concat(v,"-expanded-row"),"".concat(v,"-expanded-row-level-").concat(s+1),F),prefixCls:v,component:c,cellComponent:p,colSpan:h?h.colSpan:f.length,stickyOffset:h==null?void 0:h.sticky,isEmpty:!1},L)}return m.createElement(m.Fragment,null,$,D)}const yg=ro(bg);function xg(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=m.useRef();return Xr(function(){a.current&&r(t,a.current.offsetWidth)},[]),m.createElement(Ds,{data:t},m.createElement("th",{ref:a,className:"".concat(n,"-measure-cell")},m.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function wg(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,a=m.useRef(null),l=Ht(Gt,["measureRowRender"]),i=l.measureRowRender,u=m.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:a,tabIndex:-1},m.createElement(Ds.Collection,{onBatchResize:function(c){Ad(a.current)&&c.forEach(function(p){var d=p.data,h=p.size;n(d,h.offsetWidth)})}},r.map(function(s){var c=o.find(function(h){return h.key===s}),p=c==null?void 0:c.title,d=m.isValidElement(p)?m.cloneElement(p,{ref:null}):p;return m.createElement(xg,{prefixCls:t,key:s,columnKey:s,onColumnResize:n,title:d})})));return i?i(u):u}function Dg(e){var t=e.data,r=e.measureColumnWidth,n=Ht(Gt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,l=n.onColumnResize,i=n.flattenColumns,u=n.getRowKey,s=n.expandedKeys,c=n.childrenColumnName,p=n.emptyNode,d=n.expandedRowOffset,h=d===void 0?0:d,g=n.colWidths,v=yf(t,c,s,u),f=m.useMemo(function(){return v.map(function(D){return D.rowKey})},[v]),C=m.useRef({renderWithProps:!1}),y=m.useMemo(function(){for(var D=i.length-h,L=0,N=0;N<h;N+=1)L+=g[N]||0;return{offset:h,colSpan:D,sticky:L}},[i.length,h,g]),b=a(["body","wrapper"],"tbody"),x=a(["body","row"],"tr"),B=a(["body","cell"],"td"),A=a(["body","cell"],"th"),F;t.length?F=v.map(function(D,L){var N=D.record,T=D.indent,P=D.index,S=D.rowKey;return m.createElement(yg,{key:S,rowKey:S,rowKeys:f,record:N,index:L,renderIndex:P,rowComponent:x,cellComponent:B,scopeCellComponent:A,indent:T,expandedRowInfo:y})}):F=m.createElement(wf,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:x,cellComponent:B,colSpan:i.length,isEmpty:!0},p);var $=hi(i);return m.createElement(mf.Provider,{value:C.current},m.createElement(b,{className:"".concat(o,"-tbody")},r&&m.createElement(wg,{prefixCls:o,columnsKey:$,onColumnResize:l,columns:i}),F))}const Eg=ro(Dg);var Sg=["expandable"],So="RC_TABLE_INTERNAL_COL_DEFINE";function kg(e){var t=e.expandable,r=At(e,Sg),n;return"expandable"in e?n=xe(xe({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var Bg=["columnType"];function Sf(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Ht(Gt,["tableLayout"]),a=o.tableLayout,l=[],i=n||r.length,u=!1,s=i-1;s>=0;s-=1){var c=t[s],p=r&&r[s],d=void 0,h=void 0;if(p&&(d=p[So],a==="auto"&&(h=p.minWidth)),c||h||d||u){var g=d||{};g.columnType;var v=At(g,Bg);l.unshift(m.createElement("col",Ve({key:s,style:{width:c,minWidth:h}},v))),u=!0}}return l.length>0?m.createElement("colgroup",null,l):null}var Ag=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function Fg(e,t){return et(function(){for(var r=[],n=0;n<t;n+=1){var o=e[n];if(o!==void 0)r[n]=o;else return null}return r},[e.join("_"),t])}var $g=m.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,l=e.colWidths,i=e.colGroup,u=e.columCount,s=e.stickyOffsets,c=e.direction,p=e.fixHeader,d=e.stickyTopOffset,h=e.stickyBottomOffset,g=e.stickyClassName,v=e.scrollX,f=e.tableLayout,C=f===void 0?"fixed":f,y=e.onScroll,b=e.children,x=At(e,Ag),B=Ht(Gt,["prefixCls","scrollbarSize","isSticky","getComponent"]),A=B.prefixCls,F=B.scrollbarSize,$=B.isSticky,D=B.getComponent,L=D(["header","table"],"table"),N=$&&!p?0:F,T=m.useRef(null),P=m.useCallback(function(z){Du(t,z),Du(T,z)},[]);m.useEffect(function(){function z(G){var Y=G,ae=Y.currentTarget,R=Y.deltaX;R&&(y({currentTarget:ae,scrollLeft:ae.scrollLeft+R}),G.preventDefault())}var U=T.current;return U==null||U.addEventListener("wheel",z,{passive:!1}),function(){U==null||U.removeEventListener("wheel",z)}},[]);var S=a[a.length-1],k={fixed:S?S.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(A,"-cell-scrollbar")}}},O=et(function(){return N?[].concat(tt(o),[k]):o},[N,o]),E=et(function(){return N?[].concat(tt(a),[k]):a},[N,a]),I=et(function(){var z=s.right,U=s.left;return xe(xe({},s),{},{left:c==="rtl"?[].concat(tt(U.map(function(G){return G+N})),[0]):U,right:c==="rtl"?z:[].concat(tt(z.map(function(G){return G+N})),[0]),isSticky:$})},[N,s,$]),M=Fg(l,u),H=et(function(){var z=!M||!M.length||M.every(function(U){return!U});return n||z},[n,M]);return m.createElement("div",{style:xe({overflow:"hidden"},$?{top:d,bottom:h}:{}),ref:P,className:Ne(r,le({},g,!!g))},m.createElement(L,{style:{tableLayout:C,minWidth:"100%",width:v}},H?i:m.createElement(Sf,{colWidths:[].concat(tt(M),[N]),columCount:u+1,columns:E}),b(xe(xe({},x),{},{stickyOffsets:I,columns:O,flattenColumns:E}))))});const Hu=m.memo($g);var Ng=function(t){var r=t.cells,n=t.stickyOffsets,o=t.flattenColumns,a=t.rowComponent,l=t.cellComponent,i=t.onHeaderRow,u=t.index,s=Ht(Gt,["prefixCls","direction"]),c=s.prefixCls,p=s.direction,d;i&&(d=i(r.map(function(g){return g.column}),u));var h=hi(r.map(function(g){return g.column}));return m.createElement(a,d,r.map(function(g,v){var f=g.column,C=Ms(g.colStart,g.colEnd,o,n,p),y;return f&&f.onHeaderCell&&(y=g.column.onHeaderCell(f)),m.createElement(no,Ve({},g,{scope:f.title?g.colSpan>1?"colgroup":"col":null,ellipsis:f.ellipsis,align:f.align,component:l,prefixCls:c,key:h[v]},C,{additionalProps:y,rowType:"header"}))}))};function Og(e){var t=[];function r(l,i){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[u]=t[u]||[];var s=i,c=l.filter(Boolean).map(function(p){var d={key:p.key,className:p.className||"",children:p.title,column:p,colStart:s},h=1,g=p.children;return g&&g.length>0&&(h=r(g,s,u+1).reduce(function(v,f){return v+f},0),d.hasSubColumns=!0),"colSpan"in p&&(h=p.colSpan),"rowSpan"in p&&(d.rowSpan=p.rowSpan),d.colSpan=h,d.colEnd=d.colStart+h-1,t[u].push(d),s+=h,h});return c}r(e,0);for(var n=t.length,o=function(i){t[i].forEach(function(u){!("rowSpan"in u)&&!u.hasSubColumns&&(u.rowSpan=n-i)})},a=0;a<n;a+=1)o(a);return t}var Rg=function(t){var r=t.stickyOffsets,n=t.columns,o=t.flattenColumns,a=t.onHeaderRow,l=Ht(Gt,["prefixCls","getComponent"]),i=l.prefixCls,u=l.getComponent,s=m.useMemo(function(){return Og(n)},[n]),c=u(["header","wrapper"],"thead"),p=u(["header","row"],"tr"),d=u(["header","cell"],"th");return m.createElement(c,{className:"".concat(i,"-thead")},s.map(function(h,g){var v=m.createElement(Ng,{key:g,flattenColumns:o,cells:h,stickyOffsets:r,rowComponent:p,cellComponent:d,onHeaderRow:a,index:g});return v}))};const zu=ro(Rg);function Ku(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function Pg(e,t,r){return m.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(d){var h=Ku(t,d.width);h?n+=h:o+=1});var a=Math.max(t,r),l=Math.max(a-n,o),i=o,u=l/o,s=0,c=e.map(function(d){var h=xe({},d),g=Ku(t,h.width);if(g)h.width=g;else{var v=Math.floor(u);h.width=i===1?l:v,l-=v,i-=1}return s+=h.width,h});if(s<a){var p=a/s;l=a,c.forEach(function(d,h){var g=Math.floor(d.width*p);d.width=h===c.length-1?l:g,l-=g})}return[c,Math.max(s,a)]}return[e,t]},[e,t,r])}var Tg=["children"],Mg=["fixed"];function Ls(e){return qo(e).filter(function(t){return m.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=At(n,Tg),l=xe({key:r},a);return o&&(l.children=Ls(o)),l})}function kf(e){return e.filter(function(t){return t&&yr(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?xe(xe({},t),{},{children:kf(r)}):t})}function Ml(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&yr(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,l=a===!0?"left":a,i="".concat(t,"-").concat(o),u=n.children;return u&&u.length>0?[].concat(tt(r),tt(Ml(u,i).map(function(s){var c;return xe(xe({},s),{},{fixed:(c=s.fixed)!==null&&c!==void 0?c:l})}))):[].concat(tt(r),[xe(xe({key:i},n),{},{fixed:l})])},[])}function Lg(e){return e.map(function(t){var r=t.fixed,n=At(t,Mg),o=r;return r==="left"?o="right":r==="right"&&(o="left"),xe({fixed:o},n)})}function Ig(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,l=e.expandedKeys,i=e.columnTitle,u=e.getRowKey,s=e.onTriggerExpand,c=e.expandIcon,p=e.rowExpandable,d=e.expandIconColumnIndex,h=e.expandedRowOffset,g=h===void 0?0:h,v=e.direction,f=e.expandRowByClick,C=e.columnWidth,y=e.fixed,b=e.scrollWidth,x=e.clientWidth,B=m.useMemo(function(){var S=n||Ls(o)||[];return kf(S.slice())},[n,o]),A=m.useMemo(function(){if(a){var S=B.slice();if(!S.includes(qr)){var k=d||0,O=k===0&&y==="right"?B.length:k;O>=0&&S.splice(O,0,qr)}var E=S.indexOf(qr);S=S.filter(function(z,U){return z!==qr||U===E});var I=B[E],M;y?M=y:M=I?I.fixed:null;var H=le(le(le(le(le(le({},So,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",i),"fixed",M),"className","".concat(r,"-row-expand-icon-cell")),"width",C),"render",function(U,G,Y){var ae=u(G,Y),R=l.has(ae),Z=p?p(G):!0,V=c({prefixCls:r,expanded:R,expandable:Z,record:G,onExpand:s});return f?m.createElement("span",{onClick:function(X){return X.stopPropagation()}},V):V});return S.map(function(z,U){var G=z===qr?H:z;return U<g?xe(xe({},G),{},{fixed:G.fixed||"left"}):G})}return B.filter(function(z){return z!==qr})},[a,B,u,l,c,v,g]),F=m.useMemo(function(){var S=A;return t&&(S=t(S)),S.length||(S=[{render:function(){return null}}]),S},[t,A,v]),$=m.useMemo(function(){return v==="rtl"?Lg(Ml(F)):Ml(F)},[F,v,b]),D=m.useMemo(function(){for(var S=-1,k=$.length-1;k>=0;k-=1){var O=$[k].fixed;if(O==="left"||O===!0){S=k;break}}if(S>=0)for(var E=0;E<=S;E+=1){var I=$[E].fixed;if(I!=="left"&&I!==!0)return!0}var M=$.findIndex(function(U){var G=U.fixed;return G==="right"});if(M>=0)for(var H=M;H<$.length;H+=1){var z=$[H].fixed;if(z!=="right")return!0}return!1},[$]),L=Pg($,b,x),N=qe(L,2),T=N[0],P=N[1];return[F,T,P,D]}function jg(e,t,r){var n=kg(e),o=n.expandIcon,a=n.expandedRowKeys,l=n.defaultExpandedRowKeys,i=n.defaultExpandAllRows,u=n.expandedRowRender,s=n.onExpand,c=n.onExpandedRowsChange,p=n.childrenColumnName,d=o||vg,h=p||"children",g=m.useMemo(function(){return u?"row":e.expandable&&e.internalHooks===Xo&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(B){return B&&yr(B)==="object"&&B[h]})?"nest":!1},[!!u,t]),v=m.useState(function(){return l||(i?Cg(t,r,h):[])}),f=qe(v,2),C=f[0],y=f[1],b=m.useMemo(function(){return new Set(a||C||[])},[a,C]),x=m.useCallback(function(B){var A=r(B,t.indexOf(B)),F,$=b.has(A);$?(b.delete(A),F=tt(b)):F=[].concat(tt(b),[A]),y(F),s&&s(!$,B),c&&c(F)},[r,b,t,s,c]);return[n,g,b,d,h,x]}function _g(e,t,r){var n=e.map(function(o,a){return Ms(a,a,e,t,r)});return bs(function(){return n},[n],function(o,a){return!Cn(o,a)})}function Hg(e){var t=ct(e),r=ut({}),n=qe(r,2),o=n[1],a=ct(null),l=ct([]);function i(u){l.current.push(u);var s=Promise.resolve();a.current=s,s.then(function(){if(a.current===s){var c=l.current,p=t.current;l.current=[],c.forEach(function(d){t.current=d(t.current)}),a.current=null,p!==t.current&&o({})}})}return xt(function(){return function(){a.current=null}},[]),[t.current,i]}function zg(e){var t=ct(null),r=ct();function n(){window.clearTimeout(r.current)}function o(l){t.current=l,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return xt(function(){return n},[]),[o,a]}function Kg(){var e=m.useState(-1),t=qe(e,2),r=t[0],n=t[1],o=m.useState(-1),a=qe(o,2),l=a[0],i=a[1],u=m.useCallback(function(s,c){n(s),i(c)},[]);return[r,l,u]}var Wu=Sd()?window:null;function Wg(e,t){var r=yr(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,l=a===void 0?0:a,i=r.offsetScroll,u=i===void 0?0:i,s=r.getContainer,c=s===void 0?function(){return Wu}:s,p=c()||Wu,d=!!e;return m.useMemo(function(){return{isSticky:d,stickyClassName:d?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:l,offsetScroll:u,container:p}},[d,u,o,l,t,p])}function Vg(e,t,r){var n=et(function(){var o=t.length,a=function(s,c,p){for(var d=[],h=0,g=s;g!==c;g+=p)d.push(h),t[g].fixed&&(h+=e[g]||0);return d},l=a(0,o,1),i=a(o-1,-1,-1).reverse();return r==="rtl"?{left:i,right:l}:{left:l,right:i}},[e,t,r]);return n}function Vu(e){var t=e.className,r=e.children;return m.createElement("div",{className:t},r)}function qu(e){var t=Es(e),r=t.getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var qg=function(t,r){var n,o,a=t.scrollBodyRef,l=t.onScroll,i=t.offsetScroll,u=t.container,s=t.direction,c=Ht(Gt,"prefixCls"),p=((n=a.current)===null||n===void 0?void 0:n.scrollWidth)||0,d=((o=a.current)===null||o===void 0?void 0:o.clientWidth)||0,h=p&&d*(d/p),g=m.useRef(),v=Hg({scrollLeft:0,isHiddenScrollBar:!0}),f=qe(v,2),C=f[0],y=f[1],b=m.useRef({delta:0,x:0}),x=m.useState(!1),B=qe(x,2),A=B[0],F=B[1],$=m.useRef(null);m.useEffect(function(){return function(){mr.cancel($.current)}},[]);var D=function(){F(!1)},L=function(k){k.persist(),b.current.delta=k.pageX-C.scrollLeft,b.current.x=0,F(!0),k.preventDefault()},N=function(k){var O,E=k||((O=window)===null||O===void 0?void 0:O.event),I=E.buttons;if(!A||I===0){A&&F(!1);return}var M=b.current.x+k.pageX-b.current.x-b.current.delta,H=s==="rtl";M=Math.max(H?h-d:0,Math.min(H?0:d-h,M));var z=!H||Math.abs(M)+Math.abs(h)<d;z&&(l({scrollLeft:M/d*(p+2)}),b.current.x=k.pageX)},T=function(){mr.cancel($.current),$.current=mr(function(){if(a.current){var k=qu(a.current).top,O=k+a.current.offsetHeight,E=u===window?document.documentElement.scrollTop+window.innerHeight:qu(u).top+u.clientHeight;y(function(I){return xe(xe({},I),{},{isHiddenScrollBar:O-Eu()<=E||k>=E-i})})}})},P=function(k){y(function(O){return xe(xe({},O),{},{scrollLeft:p?k/p*d:0})})};return m.useImperativeHandle(r,function(){return{setScrollLeft:P,checkScrollBarVisible:T}}),m.useEffect(function(){var S=_u(document.body,"mouseup",D,!1),k=_u(document.body,"mousemove",N,!1);return T(),function(){S.remove(),k.remove()}},[h,A]),m.useEffect(function(){if(a.current){for(var S=[],k=Es(a.current);k;)S.push(k),k=k.parentElement;return S.forEach(function(O){return O.addEventListener("scroll",T,!1)}),window.addEventListener("resize",T,!1),window.addEventListener("scroll",T,!1),u.addEventListener("scroll",T,!1),function(){S.forEach(function(O){return O.removeEventListener("scroll",T)}),window.removeEventListener("resize",T),window.removeEventListener("scroll",T),u.removeEventListener("scroll",T)}}},[u]),m.useEffect(function(){C.isHiddenScrollBar||y(function(S){var k=a.current;return k?xe(xe({},S),{},{scrollLeft:k.scrollLeft/k.scrollWidth*k.clientWidth}):S})},[C.isHiddenScrollBar]),p<=d||!h||C.isHiddenScrollBar?null:m.createElement("div",{style:{height:Eu(),width:d,bottom:i},className:"".concat(c,"-sticky-scroll")},m.createElement("div",{onMouseDown:L,ref:g,className:Ne("".concat(c,"-sticky-scroll-bar"),le({},"".concat(c,"-sticky-scroll-bar-active"),A)),style:{width:"".concat(h,"px"),transform:"translate3d(".concat(C.scrollLeft,"px, 0, 0)")}}))};const Ug=m.forwardRef(qg);var Bf="rc-table",Zg=[],Gg={};function Xg(){return"No Data"}function Yg(e,t){var r=xe({rowKey:"key",prefixCls:Bf,emptyText:Xg},e),n=r.prefixCls,o=r.className,a=r.rowClassName,l=r.style,i=r.data,u=r.rowKey,s=r.scroll,c=r.tableLayout,p=r.direction,d=r.title,h=r.footer,g=r.summary,v=r.caption,f=r.id,C=r.showHeader,y=r.components,b=r.emptyText,x=r.onRow,B=r.onHeaderRow,A=r.measureRowRender,F=r.onScroll,$=r.internalHooks,D=r.transformColumns,L=r.internalRefs,N=r.tailor,T=r.getContainerWidth,P=r.sticky,S=r.rowHoverable,k=S===void 0?!0:S,O=i||Zg,E=!!O.length,I=$===Xo,M=m.useCallback(function(ot,st){return ws(y,ot)||st},[y]),H=m.useMemo(function(){return typeof u=="function"?u:function(ot){var st=ot&&ot[u];return st}},[u]),z=M(["body"]),U=Kg(),G=qe(U,3),Y=G[0],ae=G[1],R=G[2],Z=jg(r,O,H),V=qe(Z,6),K=V[0],X=V[1],Q=V[2],ee=V[3],se=V[4],re=V[5],oe=s==null?void 0:s.x,ge=m.useState(0),ce=qe(ge,2),Ee=ce[0],_e=ce[1],Ue=Ig(xe(xe(xe({},r),K),{},{expandable:!!K.expandedRowRender,columnTitle:K.columnTitle,expandedKeys:Q,getRowKey:H,onTriggerExpand:re,expandIcon:ee,expandIconColumnIndex:K.expandIconColumnIndex,direction:p,scrollWidth:I&&N&&typeof oe=="number"?oe:null,clientWidth:Ee}),I?D:null),de=qe(Ue,4),be=de[0],Se=de[1],Ke=de[2],Fe=de[3],$e=Ke??oe,rt=m.useMemo(function(){return{columns:be,flattenColumns:Se}},[be,Se]),Xe=m.useRef(),je=m.useRef(),Pe=m.useRef(),Ce=m.useRef();m.useImperativeHandle(t,function(){return{nativeElement:Xe.current,scrollTo:function(st){var Wt;if(Pe.current instanceof HTMLElement){var ur=st.index,Vt=st.top,Fn=st.key;if(og(Vt)){var on;(on=Pe.current)===null||on===void 0||on.scrollTo({top:Vt})}else{var an,po=Fn??H(O[ur]);(an=Pe.current.querySelector('[data-row-key="'.concat(po,'"]')))===null||an===void 0||an.scrollIntoView()}}else(Wt=Pe.current)!==null&&Wt!==void 0&&Wt.scrollTo&&Pe.current.scrollTo(st)}}});var ye=m.useRef(),He=m.useState(!1),Ye=qe(He,2),Qe=Ye[0],We=Ye[1],mt=m.useState(!1),Ze=qe(mt,2),bt=Ze[0],pt=Ze[1],ht=m.useState(new Map),Ie=qe(ht,2),ar=Ie[0],Tt=Ie[1],tr=hi(Se),zt=tr.map(function(ot){return ar.get(ot)}),Kt=m.useMemo(function(){return zt},[zt.join("_")]),Mt=Vg(Kt,Se,p),q=s&&Tl(s.y),fe=s&&Tl($e)||!!K.fixed,Re=fe&&Se.some(function(ot){var st=ot.fixed;return st}),Be=m.useRef(),he=Wg(P,n),we=he.isSticky,Me=he.offsetHeader,te=he.offsetSummary,me=he.offsetScroll,J=he.stickyClassName,W=he.container,ie=m.useMemo(function(){return g==null?void 0:g(O)},[g,O]),Ae=(q||we)&&m.isValidElement(ie)&&ie.type===gi&&ie.props.fixed,Ge,dt,Oe;q&&(dt={overflowY:E?"scroll":"auto",maxHeight:s.y}),fe&&(Ge={overflowX:"auto"},q||(dt={overflowY:"hidden"}),Oe={width:$e===!0?"auto":$e,minWidth:"100%"});var it=m.useCallback(function(ot,st){Tt(function(Wt){if(Wt.get(ot)!==st){var ur=new Map(Wt);return ur.set(ot,st),ur}return Wt})},[]),Ft=zg(),sr=qe(Ft,2),Fr=sr[0],Sn=sr[1];function zr(ot,st){st&&(typeof st=="function"?st(ot):st.scrollLeft!==ot&&(st.scrollLeft=ot,st.scrollLeft!==ot&&setTimeout(function(){st.scrollLeft=ot},0)))}var Nt=Cr(function(ot){var st=ot.currentTarget,Wt=ot.scrollLeft,ur=p==="rtl",Vt=typeof Wt=="number"?Wt:st.scrollLeft,Fn=st||Gg;if(!Sn()||Sn()===Fn){var on;Fr(Fn),zr(Vt,je.current),zr(Vt,Pe.current),zr(Vt,ye.current),zr(Vt,(on=Be.current)===null||on===void 0?void 0:on.setScrollLeft)}var an=st||je.current;if(an){var po=I&&N&&typeof $e=="number"?$e:an.scrollWidth,Li=an.clientWidth;if(po===Li){We(!1),pt(!1);return}ur?(We(-Vt<po-Li),pt(-Vt>0)):(We(Vt>0),pt(Vt<po-Li))}}),$r=Cr(function(ot){Nt(ot),F==null||F(ot)}),kn=function(){if(fe&&Pe.current){var st;Nt({currentTarget:Es(Pe.current),scrollLeft:(st=Pe.current)===null||st===void 0?void 0:st.scrollLeft})}else We(!1),pt(!1)},$i=function(st){var Wt,ur=st.width;(Wt=Be.current)===null||Wt===void 0||Wt.checkScrollBarVisible();var Vt=Xe.current?Xe.current.offsetWidth:ur;I&&T&&Xe.current&&(Vt=T(Xe.current,Vt)||Vt),Vt!==Ee&&(kn(),_e(Vt))},ea=m.useRef(!1);m.useEffect(function(){ea.current&&kn()},[fe,i,be.length]),m.useEffect(function(){ea.current=!0},[]);var Ni=m.useState(0),so=qe(Ni,2),Nr=so[0],ta=so[1],Oi=m.useState(!0),ra=qe(Oi,2),uo=ra[0],Ri=ra[1];Xr(function(){(!N||!I)&&(Pe.current instanceof Element?ta(Su(Pe.current).width):ta(Su(Ce.current).width)),Ri(Rp("position","sticky"))},[]),m.useEffect(function(){I&&L&&(L.body.current=Pe.current)});var Pi=m.useCallback(function(ot){return m.createElement(m.Fragment,null,m.createElement(zu,ot),Ae==="top"&&m.createElement(aa,ot,ie))},[Ae,ie]),Ti=m.useCallback(function(ot){return m.createElement(aa,ot,ie)},[ie]),na=M(["table"],"table"),rn=m.useMemo(function(){return c||(Re?$e==="max-content"?"auto":"fixed":q||we||Se.some(function(ot){var st=ot.ellipsis;return st})?"fixed":"auto")},[q,Re,Se,c,we]),wt,ft={colWidths:Kt,columCount:Se.length,stickyOffsets:Mt,onHeaderRow:B,fixHeader:q,scroll:s},yt=m.useMemo(function(){return E?null:typeof b=="function"?b():b},[E,b]),qt=m.createElement(Eg,{data:O,measureColumnWidth:q||fe||we}),Lt=m.createElement(Sf,{colWidths:Se.map(function(ot){var st=ot.width;return st}),columns:Se}),nn=v!=null?m.createElement("caption",{className:"".concat(n,"-caption")},v):void 0,co=_a(r,{data:!0}),oa=_a(r,{aria:!0});if(q||we){var Bn;typeof z=="function"?(Bn=z(O,{scrollbarSize:Nr,ref:Pe,onScroll:Nt}),ft.colWidths=Se.map(function(ot,st){var Wt=ot.width,ur=st===Se.length-1?Wt-Nr:Wt;return typeof ur=="number"&&!Number.isNaN(ur)?ur:0})):Bn=m.createElement("div",{style:xe(xe({},Ge),dt),onScroll:$r,ref:Pe,className:Ne("".concat(n,"-body"))},m.createElement(na,Ve({style:xe(xe({},Oe),{},{tableLayout:rn})},oa),nn,Lt,qt,!Ae&&ie&&m.createElement(aa,{stickyOffsets:Mt,flattenColumns:Se},ie)));var fo=xe(xe(xe({noData:!O.length},ft),rt),{},{direction:p,stickyClassName:J,scrollX:$e,tableLayout:rn,onScroll:Nt});wt=m.createElement(m.Fragment,null,C!==!1&&m.createElement(Hu,Ve({},fo,{stickyTopOffset:Me,className:"".concat(n,"-header"),ref:je,colGroup:Lt}),Pi),Bn,Ae&&Ae!=="top"&&m.createElement(Hu,Ve({},fo,{stickyBottomOffset:te,className:"".concat(n,"-summary"),ref:ye,colGroup:Lt}),Ti),we&&Pe.current&&Pe.current instanceof Element&&m.createElement(Ug,{ref:Be,offsetScroll:me,scrollBodyRef:Pe,onScroll:Nt,container:W,direction:p}))}else wt=m.createElement("div",{style:xe(xe({},Ge),dt),className:Ne("".concat(n,"-content")),onScroll:Nt,ref:Pe},m.createElement(na,Ve({style:xe(xe({},Oe),{},{tableLayout:rn})},oa),nn,Lt,C!==!1&&m.createElement(zu,Ve({},ft,rt)),qt,ie&&m.createElement(aa,{stickyOffsets:Mt,flattenColumns:Se},ie)));var Or=m.createElement("div",Ve({className:Ne(n,o,le(le(le(le(le(le(le(le(le(le({},"".concat(n,"-rtl"),p==="rtl"),"".concat(n,"-ping-left"),Qe),"".concat(n,"-ping-right"),bt),"".concat(n,"-layout-fixed"),c==="fixed"),"".concat(n,"-fixed-header"),q),"".concat(n,"-fixed-column"),Re),"".concat(n,"-fixed-column-gapped"),Re&&Fe),"".concat(n,"-scroll-horizontal"),fe),"".concat(n,"-has-fix-left"),Se[0]&&Se[0].fixed),"".concat(n,"-has-fix-right"),Se[Se.length-1]&&Se[Se.length-1].fixed==="right")),style:l,id:f,ref:Xe},co),d&&m.createElement(Vu,{className:"".concat(n,"-title")},d(O)),m.createElement("div",{ref:Ce,className:"".concat(n,"-container")},wt),h&&m.createElement(Vu,{className:"".concat(n,"-footer")},h(O)));fe&&(Or=m.createElement(Ds,{onResize:$i},Or));var An=_g(Se,Mt,p),Mi=m.useMemo(function(){return{scrollX:$e,prefixCls:n,getComponent:M,scrollbarSize:Nr,direction:p,fixedInfoList:An,isSticky:we,supportSticky:uo,componentWidth:Ee,fixHeader:q,fixColumn:Re,horizonScroll:fe,tableLayout:rn,rowClassName:a,expandedRowClassName:K.expandedRowClassName,expandIcon:ee,expandableType:X,expandRowByClick:K.expandRowByClick,expandedRowRender:K.expandedRowRender,expandedRowOffset:K.expandedRowOffset,onTriggerExpand:re,expandIconColumnIndex:K.expandIconColumnIndex,indentSize:K.indentSize,allColumnsFixedLeft:Se.every(function(ot){return ot.fixed==="left"}),emptyNode:yt,columns:be,flattenColumns:Se,onColumnResize:it,colWidths:Kt,hoverStartRow:Y,hoverEndRow:ae,onHover:R,rowExpandable:K.rowExpandable,onRow:x,getRowKey:H,expandedKeys:Q,childrenColumnName:se,rowHoverable:k,measureRowRender:A}},[$e,n,M,Nr,p,An,we,uo,Ee,q,Re,fe,rn,a,K.expandedRowClassName,ee,X,K.expandRowByClick,K.expandedRowRender,K.expandedRowOffset,re,K.expandIconColumnIndex,K.indentSize,yt,be,Se,it,Kt,Y,ae,R,K.rowExpandable,x,H,Q,se,k,A]);return m.createElement(Gt.Provider,{value:Mi},Or)}var Qg=m.forwardRef(Yg);function Af(e){return gf(Qg,e)}var oo=Af();oo.EXPAND_COLUMN=qr;oo.INTERNAL_HOOKS=Xo;oo.Column=gg;oo.ColumnGroup=mg;oo.Summary=Cf;var Is=Ps(null),Ff=Ps(null);function Jg(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function em(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,l=e.component,i=e.renderIndex,u=e.record,s=e.style,c=e.className,p=e.inverse,d=e.getHeight,h=r.render,g=r.dataIndex,v=r.className,f=r.width,C=Ht(Ff,["columnsOffset"]),y=C.columnsOffset,b=Ef(t,r,n,o,a),x=b.key,B=b.fixedInfo,A=b.appendCellNode,F=b.additionalCellProps,$=F.style,D=F.colSpan,L=D===void 0?1:D,N=F.rowSpan,T=N===void 0?1:N,P=n-1,S=Jg(P,L,y),k=L>1?f-S:0,O=xe(xe(xe({},$),s),{},{flex:"0 0 ".concat(S,"px"),width:"".concat(S,"px"),marginRight:k,pointerEvents:"auto"}),E=m.useMemo(function(){return p?T<=1:L===0||T===0||T>1},[T,L,p]);E?O.visibility="hidden":p&&(O.height=d==null?void 0:d(T));var I=E?function(){return null}:h,M={};return(T===0||L===0)&&(M.rowSpan=1,M.colSpan=1),m.createElement(no,Ve({className:Ne(v,c),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:l,prefixCls:t.prefixCls,key:x,record:u,index:a,renderIndex:i,dataIndex:g,render:I,shouldCellUpdate:r.shouldCellUpdate},B,{appendNode:A,additionalProps:xe(xe({},F),{},{style:O},M)}))}var tm=["data","index","className","rowKey","style","extra","getHeight"],rm=m.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,l=e.style,i=e.extra,u=e.getHeight,s=At(e,tm),c=r.record,p=r.indent,d=r.index,h=Ht(Gt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),g=h.scrollX,v=h.flattenColumns,f=h.prefixCls,C=h.fixColumn,y=h.componentWidth,b=Ht(Is,["getComponent"]),x=b.getComponent,B=xf(c,a,n,p),A=x(["body","row"],"div"),F=x(["body","cell"],"div"),$=B.rowSupportExpand,D=B.expanded,L=B.rowProps,N=B.expandedRowRender,T=B.expandedRowClassName,P;if($&&D){var S=N(c,n,p+1,D),k=Df(T,c,n,p),O={};C&&(O={style:le({},"--virtual-width","".concat(y,"px"))});var E="".concat(f,"-expanded-row-cell");P=m.createElement(A,{className:Ne("".concat(f,"-expanded-row"),"".concat(f,"-expanded-row-level-").concat(p+1),k)},m.createElement(no,{component:F,prefixCls:f,className:Ne(E,le({},"".concat(E,"-fixed"),C)),additionalProps:O},S))}var I=xe(xe({},l),{},{width:g});i&&(I.position="absolute",I.pointerEvents="none");var M=m.createElement(A,Ve({},L,s,{"data-row-key":a,ref:$?null:t,className:Ne(o,"".concat(f,"-row"),L==null?void 0:L.className,le({},"".concat(f,"-row-extra"),i)),style:xe(xe({},I),L==null?void 0:L.style)}),v.map(function(H,z){return m.createElement(em,{key:z,component:F,rowInfo:B,column:H,colIndex:z,indent:p,index:n,renderIndex:d,record:c,inverse:i,getHeight:u})}));return $?m.createElement("div",{ref:t},M,P):M}),Uu=ro(rm),nm=m.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Ht(Gt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,l=o.onColumnResize,i=o.getRowKey,u=o.expandedKeys,s=o.prefixCls,c=o.childrenColumnName,p=o.scrollX,d=o.direction,h=Ht(Is),g=h.sticky,v=h.scrollY,f=h.listItemHeight,C=h.getComponent,y=h.onScroll,b=m.useRef(),x=yf(r,c,u,i),B=m.useMemo(function(){var P=0;return a.map(function(S){var k=S.width,O=S.minWidth,E=S.key,I=Math.max(k||0,O||0);return P+=I,[E,I,P]})},[a]),A=m.useMemo(function(){return B.map(function(P){return P[2]})},[B]);m.useEffect(function(){B.forEach(function(P){var S=qe(P,2),k=S[0],O=S[1];l(k,O)})},[B]),m.useImperativeHandle(t,function(){var P,S={scrollTo:function(O){var E;(E=b.current)===null||E===void 0||E.scrollTo(O)},nativeElement:(P=b.current)===null||P===void 0?void 0:P.nativeElement};return Object.defineProperty(S,"scrollLeft",{get:function(){var O;return((O=b.current)===null||O===void 0?void 0:O.getScrollInfo().x)||0},set:function(O){var E;(E=b.current)===null||E===void 0||E.scrollTo({left:O})}}),Object.defineProperty(S,"scrollTop",{get:function(){var O;return((O=b.current)===null||O===void 0?void 0:O.getScrollInfo().y)||0},set:function(O){var E;(E=b.current)===null||E===void 0||E.scrollTo({top:O})}}),S});var F=function(S,k){var O,E=(O=x[k])===null||O===void 0?void 0:O.record,I=S.onCell;if(I){var M,H=I(E,k);return(M=H==null?void 0:H.rowSpan)!==null&&M!==void 0?M:1}return 1},$=function(S){var k=S.start,O=S.end,E=S.getSize,I=S.offsetY;if(O<0)return null;for(var M=a.filter(function(Q){return F(Q,k)===0}),H=k,z=function(ee){if(M=M.filter(function(se){return F(se,ee)===0}),!M.length)return H=ee,1},U=k;U>=0&&!z(U);U-=1);for(var G=a.filter(function(Q){return F(Q,O)!==1}),Y=O,ae=function(ee){if(G=G.filter(function(se){return F(se,ee)!==1}),!G.length)return Y=Math.max(ee-1,O),1},R=O;R<x.length&&!ae(R);R+=1);for(var Z=[],V=function(ee){var se=x[ee];if(!se)return 1;a.some(function(re){return F(re,ee)>1})&&Z.push(ee)},K=H;K<=Y;K+=1)V(K);var X=Z.map(function(Q){var ee=x[Q],se=i(ee.record,Q),re=function(ce){var Ee=Q+ce-1,_e=i(x[Ee].record,Ee),Ue=E(se,_e);return Ue.bottom-Ue.top},oe=E(se);return m.createElement(Uu,{key:Q,data:ee,rowKey:se,index:Q,style:{top:-I+oe.top},extra:!0,getHeight:re})});return X},D=m.useMemo(function(){return{columnsOffset:A}},[A]),L="".concat(s,"-tbody"),N=C(["body","wrapper"]),T={};return g&&(T.position="sticky",T.bottom=0,yr(g)==="object"&&g.offsetScroll&&(T.bottom=g.offsetScroll)),m.createElement(Ff.Provider,{value:D},m.createElement(Hd,{fullHeight:!1,ref:b,prefixCls:"".concat(L,"-virtual"),styles:{horizontalScrollBar:T},className:L,height:v,itemHeight:f||24,data:x,itemKey:function(S){return i(S.record)},component:N,scrollWidth:p,direction:d,onVirtualScroll:function(S){var k,O=S.x;n({currentTarget:(k=b.current)===null||k===void 0?void 0:k.nativeElement,scrollLeft:O})},onScroll:y,extraRender:$},function(P,S,k){var O=i(P.record,S);return m.createElement(Uu,{data:P,rowKey:O,index:S,style:k.style})}))}),om=ro(nm),am=function(t,r){var n=r.ref,o=r.onScroll;return m.createElement(om,{ref:n,data:t,onScroll:o})};function im(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,l=e.prefixCls,i=l===void 0?Bf:l,u=e.className,s=e.listItemHeight,c=e.components,p=e.onScroll,d=o||{},h=d.x,g=d.y;typeof h!="number"&&(h=1),typeof g!="number"&&(g=500);var v=Cr(function(y,b){return ws(c,y)||b}),f=Cr(p),C=m.useMemo(function(){return{sticky:a,scrollY:g,listItemHeight:s,getComponent:v,onScroll:f}},[a,g,s,v,f]);return m.createElement(Is.Provider,{value:C},m.createElement(oo,Ve({},e,{className:Ne(u,"".concat(i,"-virtual")),scroll:xe(xe({},o),{},{x:h}),components:xe(xe({},c),{},{body:r!=null&&r.length?am:void 0}),columns:n,internalHooks:Xo,tailor:!0,ref:t})))}var lm=m.forwardRef(im);function $f(e){return gf(lm,e)}$f();const sm=e=>null,um=e=>null;var js=m.createContext(null),cm=m.createContext({}),dm=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,a=t.isEnd,l="".concat(r,"-indent-unit"),i=[],u=0;u<n;u+=1)i.push(m.createElement("span",{key:u,className:Ne(l,le(le({},"".concat(l,"-start"),o[u]),"".concat(l,"-end"),a[u]))}));return m.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},i)};const fm=m.memo(dm);var pm=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Zu="open",Gu="close",hm="---",Po=function(t){var r,n,o,a=t.eventKey,l=t.className,i=t.style,u=t.dragOver,s=t.dragOverGapTop,c=t.dragOverGapBottom,p=t.isLeaf,d=t.isStart,h=t.isEnd,g=t.expanded,v=t.selected,f=t.checked,C=t.halfChecked,y=t.loading,b=t.domRef,x=t.active,B=t.data,A=t.onMouseMove,F=t.selectable,$=At(t,pm),D=pe.useContext(js),L=pe.useContext(cm),N=pe.useRef(null),T=pe.useState(!1),P=qe(T,2),S=P[0],k=P[1],O=!!(D.disabled||t.disabled||(r=L.nodeDisabled)!==null&&r!==void 0&&r.call(L,B)),E=pe.useMemo(function(){return!D.checkable||t.checkable===!1?!1:D.checkable},[D.checkable,t.checkable]),I=function(ye){O||D.onNodeSelect(ye,Ot(t))},M=function(ye){O||!E||t.disableCheckbox||D.onNodeCheck(ye,Ot(t),!f)},H=pe.useMemo(function(){return typeof F=="boolean"?F:D.selectable},[F,D.selectable]),z=function(ye){D.onNodeClick(ye,Ot(t)),H?I(ye):M(ye)},U=function(ye){D.onNodeDoubleClick(ye,Ot(t))},G=function(ye){D.onNodeMouseEnter(ye,Ot(t))},Y=function(ye){D.onNodeMouseLeave(ye,Ot(t))},ae=function(ye){D.onNodeContextMenu(ye,Ot(t))},R=pe.useMemo(function(){return!!(D.draggable&&(!D.draggable.nodeDraggable||D.draggable.nodeDraggable(B)))},[D.draggable,B]),Z=function(ye){ye.stopPropagation(),k(!0),D.onNodeDragStart(ye,t);try{ye.dataTransfer.setData("text/plain","")}catch{}},V=function(ye){ye.preventDefault(),ye.stopPropagation(),D.onNodeDragEnter(ye,t)},K=function(ye){ye.preventDefault(),ye.stopPropagation(),D.onNodeDragOver(ye,t)},X=function(ye){ye.stopPropagation(),D.onNodeDragLeave(ye,t)},Q=function(ye){ye.stopPropagation(),k(!1),D.onNodeDragEnd(ye,t)},ee=function(ye){ye.preventDefault(),ye.stopPropagation(),k(!1),D.onNodeDrop(ye,t)},se=function(ye){y||D.onNodeExpand(ye,Ot(t))},re=pe.useMemo(function(){var Ce=nr(D.keyEntities,a)||{},ye=Ce.children;return!!(ye||[]).length},[D.keyEntities,a]),oe=pe.useMemo(function(){return p===!1?!1:p||!D.loadData&&!re||D.loadData&&t.loaded&&!re},[p,D.loadData,re,t.loaded]);pe.useEffect(function(){y||typeof D.loadData=="function"&&g&&!oe&&!t.loaded&&D.onNodeLoad(Ot(t))},[y,D.loadData,D.onNodeLoad,g,oe,t]);var ge=pe.useMemo(function(){var Ce;return(Ce=D.draggable)!==null&&Ce!==void 0&&Ce.icon?pe.createElement("span",{className:"".concat(D.prefixCls,"-draggable-icon")},D.draggable.icon):null},[D.draggable]),ce=function(ye){var He=t.switcherIcon||D.switcherIcon;return typeof He=="function"?He(xe(xe({},t),{},{isLeaf:ye})):He},Ee=function(){if(oe){var ye=ce(!0);return ye!==!1?pe.createElement("span",{className:Ne("".concat(D.prefixCls,"-switcher"),"".concat(D.prefixCls,"-switcher-noop"))},ye):null}var He=ce(!1);return He!==!1?pe.createElement("span",{onClick:se,className:Ne("".concat(D.prefixCls,"-switcher"),"".concat(D.prefixCls,"-switcher_").concat(g?Zu:Gu))},He):null},_e=pe.useMemo(function(){if(!E)return null;var Ce=typeof E!="boolean"?E:null;return pe.createElement("span",{className:Ne("".concat(D.prefixCls,"-checkbox"),le(le(le({},"".concat(D.prefixCls,"-checkbox-checked"),f),"".concat(D.prefixCls,"-checkbox-indeterminate"),!f&&C),"".concat(D.prefixCls,"-checkbox-disabled"),O||t.disableCheckbox)),onClick:M,role:"checkbox","aria-checked":C?"mixed":f,"aria-disabled":O||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},Ce)},[E,f,C,O,t.disableCheckbox,t.title]),Ue=pe.useMemo(function(){return oe?null:g?Zu:Gu},[oe,g]),de=pe.useMemo(function(){return pe.createElement("span",{className:Ne("".concat(D.prefixCls,"-iconEle"),"".concat(D.prefixCls,"-icon__").concat(Ue||"docu"),le({},"".concat(D.prefixCls,"-icon_loading"),y))})},[D.prefixCls,Ue,y]),be=pe.useMemo(function(){var Ce=!!D.draggable,ye=!t.disabled&&Ce&&D.dragOverNodeKey===a;return ye?D.dropIndicatorRender({dropPosition:D.dropPosition,dropLevelOffset:D.dropLevelOffset,indent:D.indent,prefixCls:D.prefixCls,direction:D.direction}):null},[D.dropPosition,D.dropLevelOffset,D.indent,D.prefixCls,D.direction,D.draggable,D.dragOverNodeKey,D.dropIndicatorRender]),Se=pe.useMemo(function(){var Ce=t.title,ye=Ce===void 0?hm:Ce,He="".concat(D.prefixCls,"-node-content-wrapper"),Ye;if(D.showIcon){var Qe=t.icon||D.icon;Ye=Qe?pe.createElement("span",{className:Ne("".concat(D.prefixCls,"-iconEle"),"".concat(D.prefixCls,"-icon__customize"))},typeof Qe=="function"?Qe(t):Qe):de}else D.loadData&&y&&(Ye=de);var We;return typeof ye=="function"?We=ye(B):D.titleRender?We=D.titleRender(B):We=ye,pe.createElement("span",{ref:N,title:typeof ye=="string"?ye:"",className:Ne(He,"".concat(He,"-").concat(Ue||"normal"),le({},"".concat(D.prefixCls,"-node-selected"),!O&&(v||S))),onMouseEnter:G,onMouseLeave:Y,onContextMenu:ae,onClick:z,onDoubleClick:U},Ye,pe.createElement("span",{className:"".concat(D.prefixCls,"-title")},We),be)},[D.prefixCls,D.showIcon,t,D.icon,de,D.titleRender,B,Ue,G,Y,ae,z,U]),Ke=_a($,{aria:!0,data:!0}),Fe=nr(D.keyEntities,a)||{},$e=Fe.level,rt=h[h.length-1],Xe=!O&&R,je=D.draggingNodeKey===a,Pe=F!==void 0?{"aria-selected":!!F}:void 0;return pe.createElement("div",Ve({ref:b,role:"treeitem","aria-expanded":p?void 0:g,className:Ne(l,"".concat(D.prefixCls,"-treenode"),(o={},le(le(le(le(le(le(le(le(le(le(o,"".concat(D.prefixCls,"-treenode-disabled"),O),"".concat(D.prefixCls,"-treenode-switcher-").concat(g?"open":"close"),!p),"".concat(D.prefixCls,"-treenode-checkbox-checked"),f),"".concat(D.prefixCls,"-treenode-checkbox-indeterminate"),C),"".concat(D.prefixCls,"-treenode-selected"),v),"".concat(D.prefixCls,"-treenode-loading"),y),"".concat(D.prefixCls,"-treenode-active"),x),"".concat(D.prefixCls,"-treenode-leaf-last"),rt),"".concat(D.prefixCls,"-treenode-draggable"),R),"dragging",je),le(le(le(le(le(le(le(o,"drop-target",D.dropTargetKey===a),"drop-container",D.dropContainerKey===a),"drag-over",!O&&u),"drag-over-gap-top",!O&&s),"drag-over-gap-bottom",!O&&c),"filter-node",(n=D.filterTreeNode)===null||n===void 0?void 0:n.call(D,Ot(t))),"".concat(D.prefixCls,"-treenode-leaf"),oe))),style:i,draggable:Xe,onDragStart:Xe?Z:void 0,onDragEnter:R?V:void 0,onDragOver:R?K:void 0,onDragLeave:R?X:void 0,onDrop:R?ee:void 0,onDragEnd:R?Q:void 0,onMouseMove:A},Pe,Ke),pe.createElement(fm,{prefixCls:D.prefixCls,level:$e,isStart:d,isEnd:h}),ge,Ee(),_e,Se)};Po.isTreeNode=1;function Dr(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function Pr(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function _s(e){return e.split("-")}function gm(e,t){var r=[],n=nr(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(l){var i=l.key,u=l.children;r.push(i),o(u)})}return o(n.children),r}function mm(e){if(e.parent){var t=_s(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function vm(e){var t=_s(e.pos);return Number(t[t.length-1])===0}function Xu(e,t,r,n,o,a,l,i,u,s){var c,p=e.clientX,d=e.clientY,h=e.target.getBoundingClientRect(),g=h.top,v=h.height,f=(s==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-p),C=(f-12)/n,y=u.filter(function(O){var E;return(E=i[O])===null||E===void 0||(E=E.children)===null||E===void 0?void 0:E.length}),b=nr(i,r.eventKey);if(d<g+v/2){var x=l.findIndex(function(O){return O.key===b.key}),B=x<=0?0:x-1,A=l[B].key;b=nr(i,A)}var F=b.key,$=b,D=b.key,L=0,N=0;if(!y.includes(F))for(var T=0;T<C&&mm(b);T+=1)b=b.parent,N+=1;var P=t.data,S=b.node,k=!0;return vm(b)&&b.level===0&&d<g+v/2&&a({dragNode:P,dropNode:S,dropPosition:-1})&&b.key===r.eventKey?L=-1:($.children||[]).length&&y.includes(D)?a({dragNode:P,dropNode:S,dropPosition:0})?L=0:k=!1:N===0?C>-1.5?a({dragNode:P,dropNode:S,dropPosition:1})?L=1:k=!1:a({dragNode:P,dropNode:S,dropPosition:0})?L=0:a({dragNode:P,dropNode:S,dropPosition:1})?L=1:k=!1:a({dragNode:P,dropNode:S,dropPosition:1})?L=1:k=!1,{dropPosition:L,dropLevelOffset:N,dropTargetKey:b.key,dropTargetPos:b.pos,dragOverNodeKey:D,dropContainerKey:L===0?null:((c=b.parent)===null||c===void 0?void 0:c.key)||null,dropAllowed:k}}function Yu(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function _i(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(yr(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Br(!1,"`checkedKeys` is not an array or an object"),null;return t}function Ll(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=nr(t,o);if(a){r.add(o);var l=a.parent,i=a.node;i.disabled||l&&n(l.key)}}}return(e||[]).forEach(function(o){n(o)}),tt(r)}const Wr={},Il="SELECT_ALL",jl="SELECT_INVERT",_l="SELECT_NONE",Qu=[],Nf=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&Nf(e,n[e],r)}),r),Cm=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:l,onChange:i,onSelect:u,onSelectAll:s,onSelectInvert:c,onSelectNone:p,onSelectMultiple:d,columnWidth:h,type:g,selections:v,fixed:f,renderCell:C,hideSelectAll:y,checkStrictly:b=!0}=t||{},{prefixCls:x,data:B,pageData:A,getRecordByKey:F,getRowKey:$,expandType:D,childrenColumnName:L,locale:N,getPopupContainer:T}=e,P=si(),[S,k]=Ap(ee=>ee),[O,E]=In(n||o||Qu,{value:n}),I=m.useRef(new Map),M=ze(ee=>{if(r){const se=new Map;ee.forEach(re=>{let oe=F(re);!oe&&I.current.has(re)&&(oe=I.current.get(re)),se.set(re,oe)}),I.current=se}},[F,r]);m.useEffect(()=>{M(O)},[O]);const H=et(()=>Nf(L,A),[L,A]),{keyEntities:z}=et(()=>{if(b)return{keyEntities:null};let ee=B;if(r){const se=new Set(H.map((oe,ge)=>$(oe,ge))),re=Array.from(I.current).reduce((oe,[ge,ce])=>se.has(ge)?oe:oe.concat(ce),[]);ee=[].concat(tt(ee),tt(re))}return Os(ee,{externalGetKey:$,childrenPropName:L})},[B,$,b,L,r,H]),U=et(()=>{const ee=new Map;return H.forEach((se,re)=>{const oe=$(se,re),ge=(a?a(se):null)||{};ee.set(oe,ge)}),ee},[H,$,a]),G=ze(ee=>{const se=$(ee);let re;return U.has(se)?re=U.get($(ee)):re=a?a(ee):void 0,!!(re!=null&&re.disabled)},[U,$]),[Y,ae]=et(()=>{if(b)return[O||[],[]];const{checkedKeys:ee,halfCheckedKeys:se}=jn(O,!0,z,G);return[ee||[],se]},[O,b,z,G]),R=et(()=>{const ee=g==="radio"?Y.slice(0,1):Y;return new Set(ee)},[Y,g]),Z=et(()=>g==="radio"?new Set:new Set(ae),[ae,g]);m.useEffect(()=>{t||E(Qu)},[!!t]);const V=ze((ee,se)=>{let re,oe;M(ee),r?(re=ee,oe=ee.map(ge=>I.current.get(ge))):(re=[],oe=[],ee.forEach(ge=>{const ce=F(ge);ce!==void 0&&(re.push(ge),oe.push(ce))})),E(re),i==null||i(re,oe,{type:se})},[E,F,i,r]),K=ze((ee,se,re,oe)=>{if(u){const ge=re.map(ce=>F(ce));u(F(ee),se,ge,oe)}V(re,"single")},[u,F,V]),X=et(()=>!v||y?null:(v===!0?[Il,jl,_l]:v).map(se=>se===Il?{key:"all",text:N.selectionAll,onSelect(){V(B.map((re,oe)=>$(re,oe)).filter(re=>{const oe=U.get(re);return!(oe!=null&&oe.disabled)||R.has(re)}),"all")}}:se===jl?{key:"invert",text:N.selectInvert,onSelect(){const re=new Set(R);A.forEach((ge,ce)=>{const Ee=$(ge,ce),_e=U.get(Ee);_e!=null&&_e.disabled||(re.has(Ee)?re.delete(Ee):re.add(Ee))});const oe=Array.from(re);c&&(P.deprecated(!1,"onSelectInvert","onChange"),c(oe)),V(oe,"invert")}}:se===_l?{key:"none",text:N.selectNone,onSelect(){p==null||p(),V(Array.from(R).filter(re=>{const oe=U.get(re);return oe==null?void 0:oe.disabled}),"none")}}:se).map(se=>Object.assign(Object.assign({},se),{onSelect:(...re)=>{var oe,ge;(ge=se.onSelect)===null||ge===void 0||(oe=ge).call.apply(oe,[se].concat(re)),k(null)}})),[v,R,A,$,c,V]);return[ze(ee=>{var se;if(!t)return ee.filter(Ce=>Ce!==Wr);let re=tt(ee);const oe=new Set(R),ge=H.map($).filter(Ce=>!U.get(Ce).disabled),ce=ge.every(Ce=>oe.has(Ce)),Ee=ge.some(Ce=>oe.has(Ce)),_e=()=>{const Ce=[];ce?ge.forEach(He=>{oe.delete(He),Ce.push(He)}):ge.forEach(He=>{oe.has(He)||(oe.add(He),Ce.push(He))});const ye=Array.from(oe);s==null||s(!ce,ye.map(He=>F(He)),Ce.map(He=>F(He))),V(ye,"all"),k(null)};let Ue,de;if(g!=="radio"){let Ce;if(X){const bt={getPopupContainer:T,items:X.map((pt,ht)=>{const{key:Ie,text:ar,onSelect:Tt}=pt;return{key:Ie??ht,onClick:()=>{Tt==null||Tt(ge)},label:ar}})};Ce=m.createElement("div",{className:`${x}-selection-extra`},m.createElement(Rs,{menu:bt,getPopupContainer:T},m.createElement("span",null,m.createElement(cp,null))))}const ye=H.map((bt,pt)=>{const ht=$(bt,pt),Ie=U.get(ht)||{};return Object.assign({checked:oe.has(ht)},Ie)}).filter(({disabled:bt})=>bt),He=!!ye.length&&ye.length===H.length,Ye=He&&ye.every(({checked:bt})=>bt),Qe=He&&ye.some(({checked:bt})=>bt),We=(l==null?void 0:l())||{},{onChange:mt,disabled:Ze}=We;de=m.createElement(Ha,Object.assign({"aria-label":Ce?"Custom selection":"Select all"},We,{checked:He?Ye:!!H.length&&ce,indeterminate:He?!Ye&&Qe:!ce&&Ee,onChange:bt=>{_e(),mt==null||mt(bt)},disabled:Ze??(H.length===0||He),skipGroup:!0})),Ue=!y&&m.createElement("div",{className:`${x}-selection`},de,Ce)}let be;g==="radio"?be=(Ce,ye,He)=>{const Ye=$(ye,He),Qe=oe.has(Ye),We=U.get(Ye);return{node:m.createElement(zd,Object.assign({},We,{checked:Qe,onClick:mt=>{var Ze;mt.stopPropagation(),(Ze=We==null?void 0:We.onClick)===null||Ze===void 0||Ze.call(We,mt)},onChange:mt=>{var Ze;oe.has(Ye)||K(Ye,!0,[Ye],mt.nativeEvent),(Ze=We==null?void 0:We.onChange)===null||Ze===void 0||Ze.call(We,mt)}})),checked:Qe}}:be=(Ce,ye,He)=>{var Ye;const Qe=$(ye,He),We=oe.has(Qe),mt=Z.has(Qe),Ze=U.get(Qe);let bt;return D==="nest"?bt=mt:bt=(Ye=Ze==null?void 0:Ze.indeterminate)!==null&&Ye!==void 0?Ye:mt,{node:m.createElement(Ha,Object.assign({},Ze,{indeterminate:bt,checked:We,skipGroup:!0,onClick:pt=>{var ht;pt.stopPropagation(),(ht=Ze==null?void 0:Ze.onClick)===null||ht===void 0||ht.call(Ze,pt)},onChange:pt=>{var ht;const{nativeEvent:Ie}=pt,{shiftKey:ar}=Ie,Tt=ge.indexOf(Qe),tr=Y.some(zt=>ge.includes(zt));if(ar&&b&&tr){const zt=S(Tt,ge,oe),Kt=Array.from(oe);d==null||d(!We,Kt.map(Mt=>F(Mt)),zt.map(Mt=>F(Mt))),V(Kt,"multiple")}else{const zt=Y;if(b){const Kt=We?Dr(zt,Qe):Pr(zt,Qe);K(Qe,!We,Kt,Ie)}else{const Kt=jn([].concat(tt(zt),[Qe]),!0,z,G),{checkedKeys:Mt,halfCheckedKeys:q}=Kt;let fe=Mt;if(We){const Re=new Set(Mt);Re.delete(Qe),fe=jn(Array.from(Re),{halfCheckedKeys:q},z,G).checkedKeys}K(Qe,!We,fe,Ie)}}k(We?null:Tt),(ht=Ze==null?void 0:Ze.onChange)===null||ht===void 0||ht.call(Ze,pt)}})),checked:We}};const Se=(Ce,ye,He)=>{const{node:Ye,checked:Qe}=be(Ce,ye,He);return C?C(Qe,ye,He,Ye):Ye};if(!re.includes(Wr))if(re.findIndex(Ce=>{var ye;return((ye=Ce[So])===null||ye===void 0?void 0:ye.columnType)==="EXPAND_COLUMN"})===0){const[Ce,...ye]=re;re=[Ce,Wr].concat(tt(ye))}else re=[Wr].concat(tt(re));const Ke=re.indexOf(Wr);re=re.filter((Ce,ye)=>Ce!==Wr||ye===Ke);const Fe=re[Ke-1],$e=re[Ke+1];let rt=f;rt===void 0&&(($e==null?void 0:$e.fixed)!==void 0?rt=$e.fixed:(Fe==null?void 0:Fe.fixed)!==void 0&&(rt=Fe.fixed)),rt&&Fe&&((se=Fe[So])===null||se===void 0?void 0:se.columnType)==="EXPAND_COLUMN"&&Fe.fixed===void 0&&(Fe.fixed=rt);const Xe=Ne(`${x}-selection-col`,{[`${x}-selection-col-with-dropdown`]:v&&g==="checkbox"}),je=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(de):t.columnTitle:Ue,Pe={fixed:rt,width:h,className:`${x}-selection-column`,title:je(),render:Se,onCell:t.onCell,align:t.align,[So]:{className:Xe}};return re.map(Ce=>Ce===Wr?Pe:Ce)},[$,H,t,Y,R,Z,h,X,D,U,d,K,G]),R]};function bm(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:l}=t,i=`${r}-row-expand-icon`;return m.createElement("button",{type:"button",onClick:u=>{n(o,u),u.stopPropagation()},className:Ne(i,{[`${i}-spaced`]:!l,[`${i}-expanded`]:l&&a,[`${i}-collapsed`]:l&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function ym(e){return(r,n)=>{const o=r.querySelector(`.${e}-container`);let a=n;if(o){const l=getComputedStyle(o),i=Number.parseInt(l.borderLeftWidth,10),u=Number.parseInt(l.borderRightWidth,10);a=n-i-u}return a}}const Yr=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function ao(e,t){return t?`${t}-${e}`:`${e}`}const mi=(e,t)=>typeof e=="function"?e(t):e,xm=(e,t)=>{const r=mi(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var wm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},Dm=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:wm}))},Em=m.forwardRef(Dm),Sm=function(t){var r=t.dropPosition,n=t.dropLevelOffset,o=t.indent,a={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(r){case-1:a.top=0,a.left=-n*o;break;case 1:a.bottom=0,a.left=-n*o;break;case 0:a.bottom=0,a.left=o;break}return pe.createElement("div",{style:a})};function Of(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function km(e,t){var r=m.useState(!1),n=qe(r,2),o=n[0],a=n[1];Xr(function(){if(o)return e(),function(){t()}},[o]),Xr(function(){return a(!0),function(){a(!1)}},[])}var Bm=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Am=m.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,l=e.motionType,i=e.onMotionStart,u=e.onMotionEnd,s=e.active,c=e.treeNodeRequiredProps,p=At(e,Bm),d=m.useState(!0),h=qe(d,2),g=h[0],v=h[1],f=m.useContext(js),C=f.prefixCls,y=a&&l!=="hide";Xr(function(){a&&y!==g&&v(y)},[a]);var b=function(){a&&i()},x=m.useRef(!1),B=function(){a&&!x.current&&(x.current=!0,u())};km(b,B);var A=function($){y===$&&B()};return a?m.createElement(Pd,Ve({ref:t,visible:g},o,{motionAppear:l==="show",onVisibleChanged:A}),function(F,$){var D=F.className,L=F.style;return m.createElement("div",{ref:$,className:Ne("".concat(C,"-treenode-motion"),D),style:L},a.map(function(N){var T=Object.assign({},(Of(N.data),N.data)),P=N.title,S=N.key,k=N.isStart,O=N.isEnd;delete T.children;var E=Eo(S,c);return m.createElement(Po,Ve({},T,E,{title:P,active:s,data:N.data,key:S,isStart:k,isEnd:O}))}))}):m.createElement(Po,Ve({domRef:t,className:r,style:n},p,{active:s}))});function Fm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function o(a,l){var i=new Map;a.forEach(function(s){i.set(s,!0)});var u=l.filter(function(s){return!i.has(s)});return u.length===1?u[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function Ju(e,t,r){var n=e.findIndex(function(i){return i.key===r}),o=e[n+1],a=t.findIndex(function(i){return i.key===r});if(o){var l=t.findIndex(function(i){return i.key===o.key});return t.slice(a+1,l)}return t.slice(a+1)}var $m=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],ec={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Nm=function(){},bn="RC_TREE_MOTION_".concat(Math.random()),Hl={key:bn},Rf={key:bn,level:0,index:0,pos:"0",node:Hl,nodes:[Hl]},tc={parent:null,children:[],pos:Rf.pos,data:Hl,title:null,key:bn,isStart:[],isEnd:[]};function rc(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function nc(e){var t=e.key,r=e.pos;return Go(t,r)}function Om(e){for(var t=String(e.data.key),r=e;r.parent;)r=r.parent,t="".concat(r.data.key," > ").concat(t);return t}var Rm=m.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,l=e.checkedKeys,i=e.loadedKeys,u=e.loadingKeys,s=e.halfCheckedKeys,c=e.keyEntities,p=e.disabled,d=e.dragging,h=e.dragOverNodeKey,g=e.dropPosition,v=e.motion,f=e.height,C=e.itemHeight,y=e.virtual,b=e.scrollWidth,x=e.focusable,B=e.activeItem,A=e.focused,F=e.tabIndex,$=e.onKeyDown,D=e.onFocus,L=e.onBlur,N=e.onActiveChange,T=e.onListChangeStart,P=e.onListChangeEnd,S=At(e,$m),k=m.useRef(null),O=m.useRef(null);m.useImperativeHandle(t,function(){return{scrollTo:function(be){k.current.scrollTo(be)},getIndentWidth:function(){return O.current.offsetWidth}}});var E=m.useState(o),I=qe(E,2),M=I[0],H=I[1],z=m.useState(n),U=qe(z,2),G=U[0],Y=U[1],ae=m.useState(n),R=qe(ae,2),Z=R[0],V=R[1],K=m.useState([]),X=qe(K,2),Q=X[0],ee=X[1],se=m.useState(null),re=qe(se,2),oe=re[0],ge=re[1],ce=m.useRef(n);ce.current=n;function Ee(){var de=ce.current;Y(de),V(de),ee([]),ge(null),P()}Xr(function(){H(o);var de=Fm(M,o);if(de.key!==null)if(de.add){var be=G.findIndex(function(Xe){var je=Xe.key;return je===de.key}),Se=rc(Ju(G,n,de.key),y,f,C),Ke=G.slice();Ke.splice(be+1,0,tc),V(Ke),ee(Se),ge("show")}else{var Fe=n.findIndex(function(Xe){var je=Xe.key;return je===de.key}),$e=rc(Ju(n,G,de.key),y,f,C),rt=n.slice();rt.splice(Fe+1,0,tc),V(rt),ee($e),ge("hide")}else G!==n&&(Y(n),V(n))},[o,n]),m.useEffect(function(){d||Ee()},[d]);var _e=v?Z:n,Ue={expandedKeys:o,selectedKeys:a,loadedKeys:i,loadingKeys:u,checkedKeys:l,halfCheckedKeys:s,dragOverNodeKey:h,dropPosition:g,keyEntities:c};return m.createElement(m.Fragment,null,A&&B&&m.createElement("span",{style:ec,"aria-live":"assertive"},Om(B)),m.createElement("div",null,m.createElement("input",{style:ec,disabled:x===!1||p,tabIndex:x!==!1?F:null,onKeyDown:$,onFocus:D,onBlur:L,value:"",onChange:Nm,"aria-label":"for screen reader"})),m.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},m.createElement("div",{className:"".concat(r,"-indent")},m.createElement("div",{ref:O,className:"".concat(r,"-indent-unit")}))),m.createElement(Hd,Ve({},S,{data:_e,itemKey:nc,height:f,fullHeight:!1,virtual:y,itemHeight:C,scrollWidth:b,prefixCls:"".concat(r,"-list"),ref:k,role:"tree",onVisibleChange:function(be){be.every(function(Se){return nc(Se)!==bn})&&Ee()}}),function(de){var be=de.pos,Se=Object.assign({},(Of(de.data),de.data)),Ke=de.title,Fe=de.key,$e=de.isStart,rt=de.isEnd,Xe=Go(Fe,be);delete Se.key,delete Se.children;var je=Eo(Xe,Ue);return m.createElement(Am,Ve({},Se,je,{title:Ke,active:!!B&&Fe===B.key,pos:be,data:de.data,isStart:$e,isEnd:rt,motion:v,motionNodes:Fe===bn?Q:null,motionType:oe,onMotionStart:T,onMotionEnd:Ee,treeNodeRequiredProps:Ue,onMouseMove:function(){N(null)}}))}))}),Pm=10,Hs=(function(e){$d(r,e);var t=Nd(r);function r(){var n;Od(this,r);for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return n=t.call.apply(t,[this].concat(a)),le(lt(n),"destroyed",!1),le(lt(n),"delayedDragEnterLogic",void 0),le(lt(n),"loadingRetryTimes",{}),le(lt(n),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Vn()}),le(lt(n),"dragStartMousePosition",null),le(lt(n),"dragNodeProps",null),le(lt(n),"currentMouseOverDroppableNodeKey",null),le(lt(n),"listRef",m.createRef()),le(lt(n),"onNodeDragStart",function(i,u){var s=n.state,c=s.expandedKeys,p=s.keyEntities,d=n.props.onDragStart,h=u.eventKey;n.dragNodeProps=u,n.dragStartMousePosition={x:i.clientX,y:i.clientY};var g=Dr(c,h);n.setState({draggingNodeKey:h,dragChildrenKeys:gm(h,p),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(g),window.addEventListener("dragend",n.onWindowDragEnd),d==null||d({event:i,node:Ot(u)})}),le(lt(n),"onNodeDragEnter",function(i,u){var s=n.state,c=s.expandedKeys,p=s.keyEntities,d=s.dragChildrenKeys,h=s.flattenNodes,g=s.indent,v=n.props,f=v.onDragEnter,C=v.onExpand,y=v.allowDrop,b=v.direction,x=u.pos,B=u.eventKey;if(n.currentMouseOverDroppableNodeKey!==B&&(n.currentMouseOverDroppableNodeKey=B),!n.dragNodeProps){n.resetDragState();return}var A=Xu(i,n.dragNodeProps,u,g,n.dragStartMousePosition,y,h,p,c,b),F=A.dropPosition,$=A.dropLevelOffset,D=A.dropTargetKey,L=A.dropContainerKey,N=A.dropTargetPos,T=A.dropAllowed,P=A.dragOverNodeKey;if(d.includes(D)||!T){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(S){clearTimeout(n.delayedDragEnterLogic[S])}),n.dragNodeProps.eventKey!==u.eventKey&&(i.persist(),n.delayedDragEnterLogic[x]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var S=tt(c),k=nr(p,u.eventKey);k&&(k.children||[]).length&&(S=Pr(c,u.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(S),C==null||C(S,{node:Ot(u),expanded:!0,nativeEvent:i.nativeEvent})}},800)),n.dragNodeProps.eventKey===D&&$===0){n.resetDragState();return}n.setState({dragOverNodeKey:P,dropPosition:F,dropLevelOffset:$,dropTargetKey:D,dropContainerKey:L,dropTargetPos:N,dropAllowed:T}),f==null||f({event:i,node:Ot(u),expandedKeys:c})}),le(lt(n),"onNodeDragOver",function(i,u){var s=n.state,c=s.dragChildrenKeys,p=s.flattenNodes,d=s.keyEntities,h=s.expandedKeys,g=s.indent,v=n.props,f=v.onDragOver,C=v.allowDrop,y=v.direction;if(n.dragNodeProps){var b=Xu(i,n.dragNodeProps,u,g,n.dragStartMousePosition,C,p,d,h,y),x=b.dropPosition,B=b.dropLevelOffset,A=b.dropTargetKey,F=b.dropContainerKey,$=b.dropTargetPos,D=b.dropAllowed,L=b.dragOverNodeKey;c.includes(A)||!D||(n.dragNodeProps.eventKey===A&&B===0?n.state.dropPosition===null&&n.state.dropLevelOffset===null&&n.state.dropTargetKey===null&&n.state.dropContainerKey===null&&n.state.dropTargetPos===null&&n.state.dropAllowed===!1&&n.state.dragOverNodeKey===null||n.resetDragState():x===n.state.dropPosition&&B===n.state.dropLevelOffset&&A===n.state.dropTargetKey&&F===n.state.dropContainerKey&&$===n.state.dropTargetPos&&D===n.state.dropAllowed&&L===n.state.dragOverNodeKey||n.setState({dropPosition:x,dropLevelOffset:B,dropTargetKey:A,dropContainerKey:F,dropTargetPos:$,dropAllowed:D,dragOverNodeKey:L}),f==null||f({event:i,node:Ot(u)}))}}),le(lt(n),"onNodeDragLeave",function(i,u){n.currentMouseOverDroppableNodeKey===u.eventKey&&!i.currentTarget.contains(i.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var s=n.props.onDragLeave;s==null||s({event:i,node:Ot(u)})}),le(lt(n),"onWindowDragEnd",function(i){n.onNodeDragEnd(i,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),le(lt(n),"onNodeDragEnd",function(i,u){var s=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),s==null||s({event:i,node:Ot(u)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),le(lt(n),"onNodeDrop",function(i,u){var s,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=n.state,d=p.dragChildrenKeys,h=p.dropPosition,g=p.dropTargetKey,v=p.dropTargetPos,f=p.dropAllowed;if(f){var C=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),g!==null){var y=xe(xe({},Eo(g,n.getTreeNodeRequiredProps())),{},{active:((s=n.getActiveItem())===null||s===void 0?void 0:s.key)===g,data:nr(n.state.keyEntities,g).node}),b=d.includes(g);Br(!b,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var x=_s(v),B={event:i,node:Ot(y),dragNode:n.dragNodeProps?Ot(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(d),dropToGap:h!==0,dropPosition:h+Number(x[x.length-1])};c||C==null||C(B),n.dragNodeProps=null}}}),le(lt(n),"cleanDragState",function(){var i=n.state.draggingNodeKey;i!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),le(lt(n),"triggerExpandActionExpand",function(i,u){var s=n.state,c=s.expandedKeys,p=s.flattenNodes,d=u.expanded,h=u.key,g=u.isLeaf;if(!(g||i.shiftKey||i.metaKey||i.ctrlKey)){var v=p.filter(function(C){return C.key===h})[0],f=Ot(xe(xe({},Eo(h,n.getTreeNodeRequiredProps())),{},{data:v.data}));n.setExpandedKeys(d?Dr(c,h):Pr(c,h)),n.onNodeExpand(i,f)}}),le(lt(n),"onNodeClick",function(i,u){var s=n.props,c=s.onClick,p=s.expandAction;p==="click"&&n.triggerExpandActionExpand(i,u),c==null||c(i,u)}),le(lt(n),"onNodeDoubleClick",function(i,u){var s=n.props,c=s.onDoubleClick,p=s.expandAction;p==="doubleClick"&&n.triggerExpandActionExpand(i,u),c==null||c(i,u)}),le(lt(n),"onNodeSelect",function(i,u){var s=n.state.selectedKeys,c=n.state,p=c.keyEntities,d=c.fieldNames,h=n.props,g=h.onSelect,v=h.multiple,f=u.selected,C=u[d.key],y=!f;y?v?s=Pr(s,C):s=[C]:s=Dr(s,C);var b=s.map(function(x){var B=nr(p,x);return B?B.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:s}),g==null||g(s,{event:"select",selected:y,node:u,selectedNodes:b,nativeEvent:i.nativeEvent})}),le(lt(n),"onNodeCheck",function(i,u,s){var c=n.state,p=c.keyEntities,d=c.checkedKeys,h=c.halfCheckedKeys,g=n.props,v=g.checkStrictly,f=g.onCheck,C=u.key,y,b={event:"check",node:u,checked:s,nativeEvent:i.nativeEvent};if(v){var x=s?Pr(d,C):Dr(d,C),B=Dr(h,C);y={checked:x,halfChecked:B},b.checkedNodes=x.map(function(N){return nr(p,N)}).filter(Boolean).map(function(N){return N.node}),n.setUncontrolledState({checkedKeys:x})}else{var A=jn([].concat(tt(d),[C]),!0,p),F=A.checkedKeys,$=A.halfCheckedKeys;if(!s){var D=new Set(F);D.delete(C);var L=jn(Array.from(D),{halfCheckedKeys:$},p);F=L.checkedKeys,$=L.halfCheckedKeys}y=F,b.checkedNodes=[],b.checkedNodesPositions=[],b.halfCheckedKeys=$,F.forEach(function(N){var T=nr(p,N);if(T){var P=T.node,S=T.pos;b.checkedNodes.push(P),b.checkedNodesPositions.push({node:P,pos:S})}}),n.setUncontrolledState({checkedKeys:F},!1,{halfCheckedKeys:$})}f==null||f(y,b)}),le(lt(n),"onNodeLoad",function(i){var u,s=i.key,c=n.state.keyEntities,p=nr(c,s);if(!(p!=null&&(u=p.children)!==null&&u!==void 0&&u.length)){var d=new Promise(function(h,g){n.setState(function(v){var f=v.loadedKeys,C=f===void 0?[]:f,y=v.loadingKeys,b=y===void 0?[]:y,x=n.props,B=x.loadData,A=x.onLoad;if(!B||C.includes(s)||b.includes(s))return null;var F=B(i);return F.then(function(){var $=n.state.loadedKeys,D=Pr($,s);A==null||A(D,{event:"load",node:i}),n.setUncontrolledState({loadedKeys:D}),n.setState(function(L){return{loadingKeys:Dr(L.loadingKeys,s)}}),h()}).catch(function($){if(n.setState(function(L){return{loadingKeys:Dr(L.loadingKeys,s)}}),n.loadingRetryTimes[s]=(n.loadingRetryTimes[s]||0)+1,n.loadingRetryTimes[s]>=Pm){var D=n.state.loadedKeys;Br(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Pr(D,s)}),h()}g($)}),{loadingKeys:Pr(b,s)}})});return d.catch(function(){}),d}}),le(lt(n),"onNodeMouseEnter",function(i,u){var s=n.props.onMouseEnter;s==null||s({event:i,node:u})}),le(lt(n),"onNodeMouseLeave",function(i,u){var s=n.props.onMouseLeave;s==null||s({event:i,node:u})}),le(lt(n),"onNodeContextMenu",function(i,u){var s=n.props.onRightClick;s&&(i.preventDefault(),s({event:i,node:u}))}),le(lt(n),"onFocus",function(){var i=n.props.onFocus;n.setState({focused:!0});for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];i==null||i.apply(void 0,s)}),le(lt(n),"onBlur",function(){var i=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];i==null||i.apply(void 0,s)}),le(lt(n),"getTreeNodeRequiredProps",function(){var i=n.state,u=i.expandedKeys,s=i.selectedKeys,c=i.loadedKeys,p=i.loadingKeys,d=i.checkedKeys,h=i.halfCheckedKeys,g=i.dragOverNodeKey,v=i.dropPosition,f=i.keyEntities;return{expandedKeys:u||[],selectedKeys:s||[],loadedKeys:c||[],loadingKeys:p||[],checkedKeys:d||[],halfCheckedKeys:h||[],dragOverNodeKey:g,dropPosition:v,keyEntities:f}}),le(lt(n),"setExpandedKeys",function(i){var u=n.state,s=u.treeData,c=u.fieldNames,p=ji(s,i,c);n.setUncontrolledState({expandedKeys:i,flattenNodes:p},!0)}),le(lt(n),"onNodeExpand",function(i,u){var s=n.state.expandedKeys,c=n.state,p=c.listChanging,d=c.fieldNames,h=n.props,g=h.onExpand,v=h.loadData,f=u.expanded,C=u[d.key];if(!p){var y=s.includes(C),b=!f;if(Br(f&&y||!f&&!y,"Expand state not sync with index check"),s=b?Pr(s,C):Dr(s,C),n.setExpandedKeys(s),g==null||g(s,{node:u,expanded:b,nativeEvent:i.nativeEvent}),b&&v){var x=n.onNodeLoad(u);x&&x.then(function(){var B=ji(n.state.treeData,s,d);n.setUncontrolledState({flattenNodes:B})}).catch(function(){var B=n.state.expandedKeys,A=Dr(B,C);n.setExpandedKeys(A)})}}}),le(lt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),le(lt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),le(lt(n),"onActiveChange",function(i){var u=n.state.activeKey,s=n.props,c=s.onActiveChange,p=s.itemScrollOffset,d=p===void 0?0:p;u!==i&&(n.setState({activeKey:i}),i!==null&&n.scrollTo({key:i,offset:d}),c==null||c(i))}),le(lt(n),"getActiveItem",function(){var i=n.state,u=i.activeKey,s=i.flattenNodes;return u===null?null:s.find(function(c){var p=c.key;return p===u})||null}),le(lt(n),"offsetActiveKey",function(i){var u=n.state,s=u.flattenNodes,c=u.activeKey,p=s.findIndex(function(g){var v=g.key;return v===c});p===-1&&i<0&&(p=s.length),p=(p+i+s.length)%s.length;var d=s[p];if(d){var h=d.key;n.onActiveChange(h)}else n.onActiveChange(null)}),le(lt(n),"onKeyDown",function(i){var u=n.state,s=u.activeKey,c=u.expandedKeys,p=u.checkedKeys,d=u.fieldNames,h=n.props,g=h.onKeyDown,v=h.checkable,f=h.selectable;switch(i.which){case Pt.UP:{n.offsetActiveKey(-1),i.preventDefault();break}case Pt.DOWN:{n.offsetActiveKey(1),i.preventDefault();break}}var C=n.getActiveItem();if(C&&C.data){var y=n.getTreeNodeRequiredProps(),b=C.data.isLeaf===!1||!!(C.data[d.children]||[]).length,x=Ot(xe(xe({},Eo(s,y)),{},{data:C.data,active:!0}));switch(i.which){case Pt.LEFT:{b&&c.includes(s)?n.onNodeExpand({},x):C.parent&&n.onActiveChange(C.parent.key),i.preventDefault();break}case Pt.RIGHT:{b&&!c.includes(s)?n.onNodeExpand({},x):C.children&&C.children.length&&n.onActiveChange(C.children[0].key),i.preventDefault();break}case Pt.ENTER:case Pt.SPACE:{v&&!x.disabled&&x.checkable!==!1&&!x.disableCheckbox?n.onNodeCheck({},x,!p.includes(s)):!v&&f&&!x.disabled&&x.selectable!==!1&&n.onNodeSelect({},x);break}}}g==null||g(i)}),le(lt(n),"setUncontrolledState",function(i){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var c=!1,p=!0,d={};Object.keys(i).forEach(function(h){if(n.props.hasOwnProperty(h)){p=!1;return}c=!0,d[h]=i[h]}),c&&(!u||p)&&n.setState(xe(xe({},d),s))}}),le(lt(n),"scrollTo",function(i){n.listRef.current.scrollTo(i)}),n}return Rd(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var o=this.props,a=o.activeKey,l=o.itemScrollOffset,i=l===void 0?0:l;a!==void 0&&a!==this.state.activeKey&&(this.setState({activeKey:a}),a!==null&&this.scrollTo({key:a,offset:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var o=this.state,a=o.focused,l=o.flattenNodes,i=o.keyEntities,u=o.draggingNodeKey,s=o.activeKey,c=o.dropLevelOffset,p=o.dropContainerKey,d=o.dropTargetKey,h=o.dropPosition,g=o.dragOverNodeKey,v=o.indent,f=this.props,C=f.prefixCls,y=f.className,b=f.style,x=f.showLine,B=f.focusable,A=f.tabIndex,F=A===void 0?0:A,$=f.selectable,D=f.showIcon,L=f.icon,N=f.switcherIcon,T=f.draggable,P=f.checkable,S=f.checkStrictly,k=f.disabled,O=f.motion,E=f.loadData,I=f.filterTreeNode,M=f.height,H=f.itemHeight,z=f.scrollWidth,U=f.virtual,G=f.titleRender,Y=f.dropIndicatorRender,ae=f.onContextMenu,R=f.onScroll,Z=f.direction,V=f.rootClassName,K=f.rootStyle,X=_a(this.props,{aria:!0,data:!0}),Q;T&&(yr(T)==="object"?Q=T:typeof T=="function"?Q={nodeDraggable:T}:Q={});var ee={prefixCls:C,selectable:$,showIcon:D,icon:L,switcherIcon:N,draggable:Q,draggingNodeKey:u,checkable:P,checkStrictly:S,disabled:k,keyEntities:i,dropLevelOffset:c,dropContainerKey:p,dropTargetKey:d,dropPosition:h,dragOverNodeKey:g,indent:v,direction:Z,dropIndicatorRender:Y,loadData:E,filterTreeNode:I,titleRender:G,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return m.createElement(js.Provider,{value:ee},m.createElement("div",{className:Ne(C,y,V,le(le(le({},"".concat(C,"-show-line"),x),"".concat(C,"-focused"),a),"".concat(C,"-active-focused"),s!==null)),style:K},m.createElement(Rm,Ve({ref:this.listRef,prefixCls:C,style:b,data:l,disabled:k,selectable:$,checkable:!!P,motion:O,dragging:u!==null,height:M,itemHeight:H,virtual:U,focusable:B,focused:a,tabIndex:F,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ae,onScroll:R,scrollWidth:z},this.getTreeNodeRequiredProps(),X))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var l=a.prevProps,i={prevProps:o};function u(F){return!l&&o.hasOwnProperty(F)||l&&l[F]!==o[F]}var s,c=a.fieldNames;if(u("fieldNames")&&(c=Vn(o.fieldNames),i.fieldNames=c),u("treeData")?s=o.treeData:u("children")&&(Br(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),s=cf(o.children)),s){i.treeData=s;var p=Os(s,{fieldNames:c});i.keyEntities=xe(le({},bn,Rf),p.keyEntities)}var d=i.keyEntities||a.keyEntities;if(u("expandedKeys")||l&&u("autoExpandParent"))i.expandedKeys=o.autoExpandParent||!l&&o.defaultExpandParent?Ll(o.expandedKeys,d):o.expandedKeys;else if(!l&&o.defaultExpandAll){var h=xe({},d);delete h[bn];var g=[];Object.keys(h).forEach(function(F){var $=h[F];$.children&&$.children.length&&g.push($.key)}),i.expandedKeys=g}else!l&&o.defaultExpandedKeys&&(i.expandedKeys=o.autoExpandParent||o.defaultExpandParent?Ll(o.defaultExpandedKeys,d):o.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,s||i.expandedKeys){var v=ji(s||a.treeData,i.expandedKeys||a.expandedKeys,c);i.flattenNodes=v}if(o.selectable&&(u("selectedKeys")?i.selectedKeys=Yu(o.selectedKeys,o):!l&&o.defaultSelectedKeys&&(i.selectedKeys=Yu(o.defaultSelectedKeys,o))),o.checkable){var f;if(u("checkedKeys")?f=_i(o.checkedKeys)||{}:!l&&o.defaultCheckedKeys?f=_i(o.defaultCheckedKeys)||{}:s&&(f=_i(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),f){var C=f,y=C.checkedKeys,b=y===void 0?[]:y,x=C.halfCheckedKeys,B=x===void 0?[]:x;if(!o.checkStrictly){var A=jn(b,!0,d);b=A.checkedKeys,B=A.halfCheckedKeys}i.checkedKeys=b,i.halfCheckedKeys=B}}return u("loadedKeys")&&(i.loadedKeys=o.loadedKeys),i}}]),r})(m.Component);le(Hs,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Sm,allowDrop:function(){return!0},expandAction:!1});le(Hs,"TreeNode",Po);var Tm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},Mm=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:Tm}))},Pf=m.forwardRef(Mm),Lm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},Im=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:Lm}))},jm=m.forwardRef(Im),_m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},Hm=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:_m}))},zm=m.forwardRef(Hm),Km={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},Wm=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:Km}))},Vm=m.forwardRef(Wm);const qm=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:l})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:a},"&:hover:before":{background:l}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),Um=new fp("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Zm=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),Gm=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${De(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Xm=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:l,nodeSelectedBg:i,nodeHoverBg:u,colorTextQuaternary:s,controlItemBgActiveDisabled:c}=t;return{[r]:Object.assign(Object.assign({},Uo(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${r}-active-focused)`]:Td(t),[`${r}-list-holder-inner`]:{alignItems:"flex-start"},[`&${r}-block-node`]:{[`${r}-list-holder-inner`]:{alignItems:"stretch",[`${r}-node-content-wrapper`]:{flex:"auto"},[`${n}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:Um,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:De(a),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:o},[`&-disabled ${r}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:c},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:s},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:l}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},Zm(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:a,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},Gm(e,t)),{"&:hover":{backgroundColor:u},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:i},[`${r}-iconEle`]:{display:"inline-block",width:a,height:a,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${r}-unselectable ${r}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${r}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${n}-leaf-last ${r}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${De(t.calc(a).div(2).equal())} !important`}})}},Ym=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),l=Oo(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[Xm(e,l),r&&qm(l)].filter(Boolean)},Qm=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,o=t;return{titleHeight:o,indentSize:o,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},Jm=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},Qm(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},ev=li("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:dp(`${t}-checkbox`,e)},Ym(t,e),Ld(e)],Jm),oc=4;function tv(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,l=a==="ltr"?"left":"right",i=a==="ltr"?"right":"left",u={[l]:-r*o+oc,[i]:0};switch(t){case-1:u.top=-3;break;case 1:u.bottom=-3;break;default:u.bottom=-3,u[l]=o+oc;break}return pe.createElement("div",{style:u,className:`${n}-drop-indicator`})}var rv={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},nv=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:rv}))},ov=m.forwardRef(nv),av={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},iv=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:av}))},lv=m.forwardRef(iv),sv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},uv=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:sv}))},cv=m.forwardRef(uv);const dv=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:l,switcherLoadingIcon:i}=e,{isLeaf:u,expanded:s,loading:c}=a;if(c)return m.isValidElement(i)?i:m.createElement(pp,{className:`${n}-switcher-loading-icon`});let p;if(l&&typeof l=="object"&&(p=l.showLeafIcon),u){if(!l)return null;if(typeof p!="boolean"&&p){const g=typeof p=="function"?p(a):p,v=`${n}-switcher-line-custom-icon`;return m.isValidElement(g)?Wn(g,{className:Ne((t=g.props)===null||t===void 0?void 0:t.className,v)}):g}return p?m.createElement(Pf,{className:`${n}-switcher-line-icon`}):m.createElement("span",{className:`${n}-switcher-leaf-line`})}const d=`${n}-switcher-icon`,h=typeof o=="function"?o(a):o;return m.isValidElement(h)?Wn(h,{className:Ne((r=h.props)===null||r===void 0?void 0:r.className,d)}):h!==void 0?h:l?s?m.createElement(lv,{className:`${n}-switcher-line-icon`}):m.createElement(cv,{className:`${n}-switcher-line-icon`}):m.createElement(ov,{className:d})},Tf=pe.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:l}=pe.useContext(en),{prefixCls:i,className:u,showIcon:s=!1,showLine:c,switcherIcon:p,switcherLoadingIcon:d,blockNode:h=!1,children:g,checkable:v=!1,selectable:f=!0,draggable:C,disabled:y,motion:b,style:x}=e,B=n("tree",i),A=n(),F=pe.useContext(hp),$=y??F,D=b??Object.assign(Object.assign({},_d(A)),{motionAppear:!1}),L=Object.assign(Object.assign({},e),{checkable:v,selectable:f,showIcon:s,motion:D,blockNode:h,disabled:$,showLine:!!c,dropIndicatorRender:tv}),[N,T,P]=ev(B),[,S]=xs(),k=S.paddingXS/2+(((r=S.Tree)===null||r===void 0?void 0:r.titleHeight)||S.controlHeightSM),O=pe.useMemo(()=>{if(!C)return!1;let I={};switch(typeof C){case"function":I.nodeDraggable=C;break;case"object":I=Object.assign({},C);break}return I.icon!==!1&&(I.icon=I.icon||pe.createElement(Vm,null)),I},[C]),E=I=>pe.createElement(dv,{prefixCls:B,switcherIcon:p,switcherLoadingIcon:d,treeNodeProps:I,showLine:c});return N(pe.createElement(Hs,Object.assign({itemHeight:k,ref:t,virtual:a},L,{style:Object.assign(Object.assign({},l==null?void 0:l.style),x),prefixCls:B,className:Ne({[`${B}-icon-hide`]:!s,[`${B}-block-node`]:h,[`${B}-unselectable`]:!f,[`${B}-rtl`]:o==="rtl",[`${B}-disabled`]:$},l==null?void 0:l.className,u,T,P),direction:o,checkable:v&&pe.createElement("span",{className:`${B}-checkbox-inner`}),selectable:f,switcherIcon:E,draggable:O}),g))}),ac=0,Hi=1,ic=2;function zs(e,t,r){const{key:n,children:o}=r;function a(l){const i=l[n],u=l[o];t(i,l)!==!1&&zs(u||[],t,r)}e.forEach(a)}function fv({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let l=ac;if(r&&r===n)return[r];if(!r||!n)return[];function i(u){return u===r||u===n}return zs(e,u=>{if(l===ic)return!1;if(i(u)){if(a.push(u),l===ac)l=Hi;else if(l===Hi)return l=ic,!1}else l===Hi&&a.push(u);return t.includes(u)},Vn(o)),a}function zi(e,t,r){const n=tt(t),o=[];return zs(e,(a,l)=>{const i=n.indexOf(a);return i!==-1&&(o.push(l),n.splice(i,1)),!!n.length},Vn(r)),o}var lc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function pv(e){const{isLeaf:t,expanded:r}=e;return t?m.createElement(Pf,null):r?m.createElement(jm,null):m.createElement(zm,null)}function sc({treeData:e,children:t}){return e||cf(t)}const hv=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=lc(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const l=m.useRef(null),i=m.useRef(null),u=()=>{const{keyEntities:$}=Os(sc(a),{fieldNames:a.fieldNames});let D;return r?D=Object.keys($):n?D=Ll(a.expandedKeys||o||[],$):D=a.expandedKeys||o||[],D},[s,c]=m.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[p,d]=m.useState(()=>u());m.useEffect(()=>{"selectedKeys"in a&&c(a.selectedKeys)},[a.selectedKeys]),m.useEffect(()=>{"expandedKeys"in a&&d(a.expandedKeys)},[a.expandedKeys]);const h=($,D)=>{var L;return"expandedKeys"in a||d($),(L=a.onExpand)===null||L===void 0?void 0:L.call(a,$,D)},g=($,D)=>{var L;const{multiple:N,fieldNames:T}=a,{node:P,nativeEvent:S}=D,{key:k=""}=P,O=sc(a),E=Object.assign(Object.assign({},D),{selected:!0}),I=(S==null?void 0:S.ctrlKey)||(S==null?void 0:S.metaKey),M=S==null?void 0:S.shiftKey;let H;N&&I?(H=$,l.current=k,i.current=H,E.selectedNodes=zi(O,H,T)):N&&M?(H=Array.from(new Set([].concat(tt(i.current||[]),tt(fv({treeData:O,expandedKeys:p,startKey:k,endKey:l.current,fieldNames:T}))))),E.selectedNodes=zi(O,H,T)):(H=[k],l.current=k,i.current=H,E.selectedNodes=zi(O,H,T)),(L=a.onSelect)===null||L===void 0||L.call(a,H,E),"selectedKeys"in a||c(H)},{getPrefixCls:v,direction:f}=m.useContext(en),{prefixCls:C,className:y,showIcon:b=!0,expandAction:x="click"}=a,B=lc(a,["prefixCls","className","showIcon","expandAction"]),A=v("tree",C),F=Ne(`${A}-directory`,{[`${A}-directory-rtl`]:f==="rtl"},y);return m.createElement(Tf,Object.assign({icon:pv,ref:t,blockNode:!0},B,{showIcon:b,expandAction:x,prefixCls:A,className:F,expandedKeys:p,selectedKeys:s,onSelect:g,onExpand:h}))},gv=m.forwardRef(hv),Ks=Tf;Ks.DirectoryTree=gv;Ks.TreeNode=Po;const uc=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?m.createElement("div",{className:`${n}-filter-dropdown-search`},m.createElement(gp,{prefix:m.createElement(mp,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},mv=e=>{const{keyCode:t}=e;t===Pt.ENTER&&e.stopPropagation()},vv=m.forwardRef((e,t)=>m.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:mv,ref:t},e.children));function _n(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(tt(t),tt(_n(n))))}),t}function Cv(e){return e.some(({children:t})=>t)}function Mf(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Lf({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((l,i)=>{const u=String(l.value);if(l.children)return{key:u||i,label:l.text,popupClassName:`${t}-dropdown-submenu`,children:Lf({filters:l.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const s=n?Ha:zd,c={key:l.value!==void 0?u:i,label:m.createElement(m.Fragment,null,m.createElement(s,{checked:r.includes(u)}),m.createElement("span",null,l.text))};return o.trim()?typeof a=="function"?a(o,l)?c:null:Mf(o,l.text)?c:null:c})}function Ki(e){return e||[]}const bv=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:l,column:i,dropdownPrefixCls:u,columnKey:s,filterOnClose:c,filterMultiple:p,filterMode:d="menu",filterSearch:h=!1,filterState:g,triggerFilter:v,locale:f,children:C,getPopupContainer:y,rootClassName:b}=e,{filterResetToDefaultFilteredValue:x,defaultFilteredValue:B,filterDropdownProps:A={},filterDropdownOpen:F,filterDropdownVisible:$,onFilterDropdownVisibleChange:D,onFilterDropdownOpenChange:L}=i,[N,T]=m.useState(!1),P=!!(g&&(!((t=g.filteredKeys)===null||t===void 0)&&t.length||g.forceFiltered)),S=de=>{var be;T(de),(be=A.onOpenChange)===null||be===void 0||be.call(A,de),L==null||L(de),D==null||D(de)},k=(o=(n=(r=A.open)!==null&&r!==void 0?r:F)!==null&&n!==void 0?n:$)!==null&&o!==void 0?o:N,O=g==null?void 0:g.filteredKeys,[E,I]=Np(Ki(O)),M=({selectedKeys:de})=>{I(de)},H=(de,{node:be,checked:Se})=>{M(p?{selectedKeys:de}:{selectedKeys:Se&&be.key?[be.key]:[]})};m.useEffect(()=>{N&&M({selectedKeys:Ki(O)})},[O]);const[z,U]=m.useState([]),G=de=>{U(de)},[Y,ae]=m.useState(""),R=de=>{const{value:be}=de.target;ae(be)};m.useEffect(()=>{N||ae("")},[N]);const Z=de=>{const be=de!=null&&de.length?de:null;if(be===null&&(!g||!g.filteredKeys)||Cn(be,g==null?void 0:g.filteredKeys,!0))return null;v({column:i,key:s,filteredKeys:be})},V=()=>{S(!1),Z(E())},K=({confirm:de,closeDropdown:be}={confirm:!1,closeDropdown:!1})=>{de&&Z([]),be&&S(!1),ae(""),I(x?(B||[]).map(Se=>String(Se)):[])},X=({closeDropdown:de}={closeDropdown:!0})=>{de&&S(!1),Z(E())},Q=(de,be)=>{be.source==="trigger"&&(de&&O!==void 0&&I(Ki(O)),S(de),!de&&!i.filterDropdown&&c&&V())},ee=Ne({[`${u}-menu-without-submenu`]:!Cv(i.filters||[])}),se=de=>{if(de.target.checked){const be=_n(i==null?void 0:i.filters).map(Se=>String(Se));I(be)}else I([])},re=({filters:de})=>(de||[]).map((be,Se)=>{const Ke=String(be.value),Fe={title:be.text,key:be.value!==void 0?Ke:String(Se)};return be.children&&(Fe.children=re({filters:be.children})),Fe}),oe=de=>{var be;return Object.assign(Object.assign({},de),{text:de.title,value:de.key,children:((be=de.children)===null||be===void 0?void 0:be.map(Se=>oe(Se)))||[]})};let ge;const{direction:ce,renderEmpty:Ee}=m.useContext(en);if(typeof i.filterDropdown=="function")ge=i.filterDropdown({prefixCls:`${u}-custom`,setSelectedKeys:de=>M({selectedKeys:de}),selectedKeys:E(),confirm:X,clearFilters:K,filters:i.filters,visible:k,close:()=>{S(!1)}});else if(i.filterDropdown)ge=i.filterDropdown;else{const de=E()||[],be=()=>{var Ke,Fe;const $e=(Ke=Ee==null?void 0:Ee("Table.filter"))!==null&&Ke!==void 0?Ke:m.createElement(ku,{image:ku.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((i.filters||[]).length===0)return $e;if(d==="tree")return m.createElement(m.Fragment,null,m.createElement(uc,{filterSearch:h,value:Y,onChange:R,tablePrefixCls:a,locale:f}),m.createElement("div",{className:`${a}-filter-dropdown-tree`},p?m.createElement(Ha,{checked:de.length===_n(i.filters).length,indeterminate:de.length>0&&de.length<_n(i.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:se},(Fe=f==null?void 0:f.filterCheckall)!==null&&Fe!==void 0?Fe:f==null?void 0:f.filterCheckAll):null,m.createElement(Ks,{checkable:!0,selectable:!1,blockNode:!0,multiple:p,checkStrictly:!p,className:`${u}-menu`,onCheck:H,checkedKeys:de,selectedKeys:de,showIcon:!1,treeData:re({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Y.trim()?je=>typeof h=="function"?h(Y,oe(je)):Mf(Y,je.title):void 0})));const rt=Lf({filters:i.filters||[],filterSearch:h,prefixCls:l,filteredKeys:E(),filterMultiple:p,searchValue:Y}),Xe=rt.every(je=>je===null);return m.createElement(m.Fragment,null,m.createElement(uc,{filterSearch:h,value:Y,onChange:R,tablePrefixCls:a,locale:f}),Xe?$e:m.createElement(to,{selectable:!0,multiple:p,prefixCls:`${u}-menu`,className:ee,onSelect:M,onDeselect:M,selectedKeys:de,getPopupContainer:y,openKeys:z,onOpenChange:G,items:rt}))},Se=()=>x?Cn((B||[]).map(Ke=>String(Ke)),de,!0):de.length===0;ge=m.createElement(m.Fragment,null,be(),m.createElement("div",{className:`${l}-dropdown-btns`},m.createElement(ja,{type:"link",size:"small",disabled:Se(),onClick:()=>K()},f.filterReset),m.createElement(ja,{type:"primary",size:"small",onClick:V},f.filterConfirm)))}i.filterDropdown&&(ge=m.createElement(lf,{selectable:void 0},ge)),ge=m.createElement(vv,{className:`${l}-dropdown`},ge);const Ue=Kd({trigger:["click"],placement:ce==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let de;return typeof i.filterIcon=="function"?de=i.filterIcon(P):i.filterIcon?de=i.filterIcon:de=m.createElement(Em,null),m.createElement("span",{role:"button",tabIndex:-1,className:Ne(`${l}-trigger`,{active:P}),onClick:be=>{be.stopPropagation()}},de)})(),getPopupContainer:y},Object.assign(Object.assign({},A),{rootClassName:Ne(b,A.rootClassName),open:k,onOpenChange:Q,popupRender:()=>typeof(A==null?void 0:A.dropdownRender)=="function"?A.dropdownRender(ge):ge}));return m.createElement("div",{className:`${l}-column`},m.createElement("span",{className:`${a}-column-title`},C),m.createElement(Rs,Object.assign({},Ue)))},zl=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var l;const i=ao(a,r),u=o.filterDropdown!==void 0;if(o.filters||u||"onFilter"in o)if("filteredValue"in o){let s=o.filteredValue;u||(s=(l=s==null?void 0:s.map(String))!==null&&l!==void 0?l:s),n.push({column:o,key:Yr(o,i),filteredKeys:s,forceFiltered:o.filtered})}else n.push({column:o,key:Yr(o,i),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(tt(n),tt(zl(o.children,t,i))))}),n};function If(e,t,r,n,o,a,l,i,u){return r.map((s,c)=>{const p=ao(c,i),{filterOnClose:d=!0,filterMultiple:h=!0,filterMode:g,filterSearch:v}=s;let f=s;if(f.filters||f.filterDropdown){const C=Yr(f,p),y=n.find(({key:b})=>C===b);f=Object.assign(Object.assign({},f),{title:b=>m.createElement(bv,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:f,columnKey:C,filterState:y,filterOnClose:d,filterMultiple:h,filterMode:g,filterSearch:v,triggerFilter:a,locale:o,getPopupContainer:l,rootClassName:u},mi(s.title,b))})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:If(e,t,f.children,n,o,a,l,p,u)})),f})}const cc=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:l,filterDropdown:i}=o;if(i)t[a]=n||null;else if(Array.isArray(n)){const u=_n(l);t[a]=u.filter(s=>n.includes(String(s)))}else t[a]=null}),t},Kl=(e,t,r)=>t.reduce((o,a)=>{const{column:{onFilter:l,filters:i},filteredKeys:u}=a;return l&&u&&u.length?o.map(s=>Object.assign({},s)).filter(s=>u.some(c=>{const p=_n(i),d=p.findIndex(g=>String(g)===String(c)),h=d!==-1?p[d]:c;return s[r]&&(s[r]=Kl(s[r],t,r)),l(h,s)})):o},e),jf=e=>e.flatMap(t=>"children"in t?[t].concat(tt(jf(t.children||[]))):[t]),yv=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:l,rootClassName:i}=e;si();const u=m.useMemo(()=>jf(n||[]),[n]),[s,c]=m.useState(()=>zl(u,!0)),p=m.useMemo(()=>{const v=zl(u,!1);if(v.length===0)return v;let f=!0;if(v.forEach(({filteredKeys:C})=>{C!==void 0&&(f=!1)}),f){const C=(u||[]).map((y,b)=>Yr(y,ao(b)));return s.filter(({key:y})=>C.includes(y)).map(y=>{const b=u[C.indexOf(y.key)];return Object.assign(Object.assign({},y),{column:Object.assign(Object.assign({},y.column),b),forceFiltered:b.filtered})})}return v},[u,s]),d=m.useMemo(()=>cc(p),[p]),h=v=>{const f=p.filter(({key:C})=>C!==v.key);f.push(v),c(f),o(cc(f),f)};return[v=>If(t,r,v,p,l,h,a,void 0,i),p,d]},xv=(e,t,r)=>{const n=m.useRef({});function o(a){var l;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let u=function(s){s.forEach((c,p)=>{const d=r(c,p);i.set(d,c),c&&typeof c=="object"&&t in c&&u(c[t]||[])})};const i=new Map;u(e),n.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:r}}return(l=n.current.kvMap)===null||l===void 0?void 0:l.get(a)}return[o]};var wv=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const _f=10;function Dv(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(o=>{const a=e[o];typeof a!="function"&&(r[o]=a)}),r}function Ev(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=wv(n,["total"]),[l,i]=ut(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:_f})),u=Kd(l,a,{total:o>0?o:e}),s=Math.ceil((o||e)/u.pageSize);u.current>s&&(u.current=s||1);const c=(d,h)=>{i({current:d??1,pageSize:h||u.pageSize})},p=(d,h)=>{var g;r&&((g=r.onChange)===null||g===void 0||g.call(r,d,h)),c(d,h),t(d,h||(u==null?void 0:u.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},u),{onChange:p}),c]}var Sv={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},kv=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:Sv}))},Bv=m.forwardRef(kv),Av={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Fv=function(t,r){return m.createElement(xr,Ve({},t,{ref:r,icon:Av}))},$v=m.forwardRef(Fv);const Ea="ascend",Wi="descend",Va=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,dc=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,Nv=(e,t)=>t?e[e.indexOf(t)+1]:e[0],Wl=(e,t,r)=>{let n=[];const o=(a,l)=>{n.push({column:a,key:Yr(a,l),multiplePriority:Va(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,l)=>{const i=ao(l,r);a.children?("sortOrder"in a&&o(a,i),n=[].concat(tt(n),tt(Wl(a.children,t,i)))):a.sorter&&("sortOrder"in a?o(a,i):t&&a.defaultSortOrder&&n.push({column:a,key:Yr(a,i),multiplePriority:Va(a),sortOrder:a.defaultSortOrder}))}),n},Hf=(e,t,r,n,o,a,l,i)=>(t||[]).map((s,c)=>{const p=ao(c,i);let d=s;if(d.sorter){const h=d.sortDirections||o,g=d.showSorterTooltip===void 0?l:d.showSorterTooltip,v=Yr(d,p),f=r.find(({key:D})=>D===v),C=f?f.sortOrder:null,y=Nv(h,C);let b;if(s.sortIcon)b=s.sortIcon({sortOrder:C});else{const D=h.includes(Ea)&&m.createElement($v,{className:Ne(`${e}-column-sorter-up`,{active:C===Ea})}),L=h.includes(Wi)&&m.createElement(Bv,{className:Ne(`${e}-column-sorter-down`,{active:C===Wi})});b=m.createElement("span",{className:Ne(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(D&&L)})},m.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},D,L))}const{cancelSort:x,triggerAsc:B,triggerDesc:A}=a||{};let F=x;y===Wi?F=A:y===Ea&&(F=B);const $=typeof g=="object"?Object.assign({title:F},g):{title:F};d=Object.assign(Object.assign({},d),{className:Ne(d.className,{[`${e}-column-sort`]:C}),title:D=>{const L=`${e}-column-sorters`,N=m.createElement("span",{className:`${e}-column-title`},mi(s.title,D)),T=m.createElement("div",{className:L},N,b);return g?typeof g!="boolean"&&(g==null?void 0:g.target)==="sorter-icon"?m.createElement("div",{className:`${L} ${e}-column-sorters-tooltip-target-sorter`},N,m.createElement(La,Object.assign({},$),b)):m.createElement(La,Object.assign({},$),T):T},onHeaderCell:D=>{var L;const N=((L=s.onHeaderCell)===null||L===void 0?void 0:L.call(s,D))||{},T=N.onClick,P=N.onKeyDown;N.onClick=O=>{n({column:s,key:v,sortOrder:y,multiplePriority:Va(s)}),T==null||T(O)},N.onKeyDown=O=>{O.keyCode===Pt.ENTER&&(n({column:s,key:v,sortOrder:y,multiplePriority:Va(s)}),P==null||P(O))};const S=xm(s.title,{}),k=S==null?void 0:S.toString();return C&&(N["aria-sort"]=C==="ascend"?"ascending":"descending"),N["aria-label"]=k||"",N.className=Ne(N.className,`${e}-column-has-sorters`),N.tabIndex=0,s.ellipsis&&(N.title=(S??"").toString()),N}})}return"children"in d&&(d=Object.assign(Object.assign({},d),{children:Hf(e,d.children,r,n,o,a,l,p)})),d}),fc=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},pc=e=>{const t=e.filter(({sortOrder:r})=>r).map(fc);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},fc(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},Vl=(e,t,r)=>{const n=t.slice().sort((l,i)=>i.multiplePriority-l.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:l},sortOrder:i})=>dc(l)&&i);return a.length?o.sort((l,i)=>{for(let u=0;u<a.length;u+=1){const s=a[u],{column:{sorter:c},sortOrder:p}=s,d=dc(c);if(d&&p){const h=d(l,i,p);if(h!==0)return p===Ea?h:-h}}return 0}).map(l=>{const i=l[r];return i?Object.assign(Object.assign({},l),{[r]:Vl(i,t,r)}):l}):o},Ov=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:l}=e,[i,u]=m.useState(()=>Wl(r,!0)),s=(v,f)=>{const C=[];return v.forEach((y,b)=>{const x=ao(b,f);if(C.push(Yr(y,x)),Array.isArray(y.children)){const B=s(y.children,x);C.push.apply(C,tt(B))}}),C},c=m.useMemo(()=>{let v=!0;const f=Wl(r,!1);if(!f.length){const x=s(r);return i.filter(({key:B})=>x.includes(B))}const C=[];function y(x){v?C.push(x):C.push(Object.assign(Object.assign({},x),{sortOrder:null}))}let b=null;return f.forEach(x=>{b===null?(y(x),x.sortOrder&&(x.multiplePriority===!1?v=!1:b=!0)):(b&&x.multiplePriority!==!1||(v=!1),y(x))}),C},[r,i]),p=m.useMemo(()=>{var v,f;const C=c.map(({column:y,sortOrder:b})=>({column:y,order:b}));return{sortColumns:C,sortColumn:(v=C[0])===null||v===void 0?void 0:v.column,sortOrder:(f=C[0])===null||f===void 0?void 0:f.order}},[c]),d=v=>{let f;v.multiplePriority===!1||!c.length||c[0].multiplePriority===!1?f=[v]:f=[].concat(tt(c.filter(({key:C})=>C!==v.key)),[v]),u(f),l(pc(f),f)};return[v=>Hf(t,v,c,d,n,o,a),c,p,()=>pc(c)]},zf=(e,t)=>e.map(n=>{const o=Object.assign({},n);return o.title=mi(n.title,t),"children"in o&&(o.children=zf(o.children,t)),o}),Rv=e=>[m.useCallback(r=>zf(r,e),[e])],Pv=Af((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),Tv=$f((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),Mv=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:l,tablePaddingHorizontal:i,calc:u}=e,s=`${De(r)} ${n} ${o}`,c=(p,d,h)=>({[`&${t}-${p}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${De(u(d).mul(-1).equal())}
|
|
28
|
+
${De(u(u(h).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:s,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:s,borderTop:s,[`
|
|
29
|
+
> ${t}-content,
|
|
30
|
+
> ${t}-header,
|
|
31
|
+
> ${t}-body,
|
|
32
|
+
> ${t}-summary
|
|
33
|
+
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:s},"> thead":{"> tr:not(:last-child) > th":{borderBottom:s},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:s}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${De(u(l).mul(-1).equal())} ${De(u(u(i).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:s,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
|
|
34
|
+
> tr${t}-expanded-row,
|
|
35
|
+
> tr${t}-placeholder
|
|
36
|
+
`]:{"> th, > td":{borderInlineEnd:0}}}}}},c("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),c("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:s,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${De(r)} 0 ${De(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:s}}}},Lv=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},Md),{wordBreak:"keep-all",[`
|
|
37
|
+
&${t}-cell-fix-left-last,
|
|
38
|
+
&${t}-cell-fix-right-first
|
|
39
|
+
`]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Iv=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},jv=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:l,tableBorderColor:i,tableExpandIconBg:u,tableExpandColumnWidth:s,borderRadius:c,tablePaddingVertical:p,tablePaddingHorizontal:d,tableExpandedRowBg:h,paddingXXS:g,expandIconMarginTop:v,expandIconSize:f,expandIconHalfInner:C,expandIconScale:y,calc:b}=e,x=`${De(o)} ${l} ${i}`,B=b(g).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:s},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},vp(e)),{position:"relative",float:"left",width:f,height:f,color:"inherit",lineHeight:De(f),background:u,border:x,borderRadius:c,transform:`scale(${y})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:C,insetInlineEnd:B,insetInlineStart:B,height:o},"&::after":{top:B,bottom:B,insetInlineStart:C,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:v,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:h}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${De(b(p).mul(-1).equal())} ${De(b(d).mul(-1).equal())}`,padding:`${De(p)} ${De(d)}`}}}},_v=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:l,paddingXS:i,colorText:u,lineWidth:s,lineType:c,tableBorderColor:p,headerIconColor:d,fontSizeSM:h,tablePaddingHorizontal:g,borderRadius:v,motionDurationSlow:f,colorIcon:C,colorPrimary:y,tableHeaderFilterActiveBg:b,colorTextDisabled:x,tableFilterDropdownBg:B,tableFilterDropdownHeight:A,controlItemBgHover:F,controlItemBgActive:$,boxShadowSecondary:D,filterDropdownMenuBg:L,calc:N}=e,T=`${r}-dropdown`,P=`${t}-filter-dropdown`,S=`${r}-tree`,k=`${De(s)} ${c} ${p}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:N(l).mul(-1).equal(),marginInline:`${De(l)} ${De(N(g).div(2).mul(-1).equal())}`,padding:`0 ${De(l)}`,color:d,fontSize:h,borderRadius:v,cursor:"pointer",transition:`all ${f}`,"&:hover":{color:C,background:b},"&.active":{color:y}}}},{[`${r}-dropdown`]:{[P]:Object.assign(Object.assign({},Uo(e)),{minWidth:o,backgroundColor:B,borderRadius:v,boxShadow:D,overflow:"hidden",[`${T}-menu`]:{maxHeight:A,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:L,"&:empty::after":{display:"block",padding:`${De(i)} 0`,color:x,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${P}-tree`]:{paddingBlock:`${De(i)} 0`,paddingInline:i,[S]:{padding:0},[`${S}-treenode ${S}-node-content-wrapper:hover`]:{backgroundColor:F},[`${S}-treenode-checkbox-checked ${S}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:$}}},[`${P}-search`]:{padding:i,borderBottom:k,"&-input":{input:{minWidth:a},[n]:{color:x}}},[`${P}-checkall`]:{width:"100%",marginBottom:l,marginInlineStart:l},[`${P}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${De(N(i).sub(s).equal())} ${De(i)}`,overflow:"hidden",borderTop:k}})}},{[`${r}-dropdown ${P}, ${P}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:i,color:u},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Hv=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:l,zIndexTableSticky:i,calc:u}=e,s=n;return{[`${t}-wrapper`]:{[`
|
|
40
|
+
${t}-cell-fix-left,
|
|
41
|
+
${t}-cell-fix-right
|
|
42
|
+
`]:{position:"sticky !important",zIndex:a,background:l},[`
|
|
43
|
+
${t}-cell-fix-left-first::after,
|
|
44
|
+
${t}-cell-fix-left-last::after
|
|
45
|
+
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:u(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
46
|
+
${t}-cell-fix-right-first::after,
|
|
47
|
+
${t}-cell-fix-right-last::after
|
|
48
|
+
`]:{position:"absolute",top:0,bottom:u(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:u(i).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`
|
|
49
|
+
${t}-cell-fix-left-first::after,
|
|
50
|
+
${t}-cell-fix-left-last::after
|
|
51
|
+
`]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${s}`},[`
|
|
52
|
+
${t}-cell-fix-right-first::after,
|
|
53
|
+
${t}-cell-fix-right-last::after
|
|
54
|
+
`]:{boxShadow:`inset -10px 0 8px -8px ${s}`}},[`${t}-fixed-column-gapped`]:{[`
|
|
55
|
+
${t}-cell-fix-left-first::after,
|
|
56
|
+
${t}-cell-fix-left-last::after,
|
|
57
|
+
${t}-cell-fix-right-first::after,
|
|
58
|
+
${t}-cell-fix-right-last::after
|
|
59
|
+
`]:{boxShadow:"none"}}}}},zv=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${De(n)} 0`}}},Kv=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${De(r)} ${De(r)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:r,borderStartEndRadius:r,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:r},"> *:last-child":{borderStartEndRadius:r}}},"&-footer":{borderRadius:`0 0 ${De(r)} ${De(r)}`}}}}},Wv=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},Vv=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:l,headerIconColor:i,headerIconHoverColor:u,tableSelectionColumnWidth:s,tableSelectedRowBg:c,tableSelectedRowHoverBg:p,tableRowHoverBg:d,tablePaddingHorizontal:h,calc:g}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:s,[`&${t}-selection-col-with-dropdown`]:{width:g(s).add(o).add(g(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:g(s).add(g(l).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:g(s).add(o).add(g(a).div(4)).add(g(l).mul(2)).equal()}},[`
|
|
60
|
+
table tr th${t}-selection-column,
|
|
61
|
+
table tr td${t}-selection-column,
|
|
62
|
+
${t}-selection-column
|
|
63
|
+
`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:g(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:De(g(h).div(4).equal()),[n]:{color:i,fontSize:o,verticalAlign:"baseline","&:hover":{color:u}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:c,"&-row-hover":{background:p}}},[`> ${t}-cell-row-hover`]:{background:d}}}}}},qv=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,l,i,u)=>({[`${t}${t}-${a}`]:{fontSize:u,[`
|
|
64
|
+
${t}-title,
|
|
65
|
+
${t}-footer,
|
|
66
|
+
${t}-cell,
|
|
67
|
+
${t}-thead > tr > th,
|
|
68
|
+
${t}-tbody > tr > th,
|
|
69
|
+
${t}-tbody > tr > td,
|
|
70
|
+
tfoot > tr > th,
|
|
71
|
+
tfoot > tr > td
|
|
72
|
+
`]:{padding:`${De(l)} ${De(i)}`},[`${t}-filter-trigger`]:{marginInlineEnd:De(n(i).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${De(n(l).mul(-1).equal())} ${De(n(i).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:De(n(l).mul(-1).equal()),marginInline:`${De(n(r).sub(i).equal())} ${De(n(i).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:De(n(i).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},Uv=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:o,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`
|
|
73
|
+
&${t}-cell-fix-left:hover,
|
|
74
|
+
&${t}-cell-fix-right:hover
|
|
75
|
+
`]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:r,color:o,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},Zv=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:l,zIndexTableSticky:i,stickyScrollBarBorderRadius:u,lineWidth:s,lineType:c,tableBorderColor:p}=e,d=`${De(s)} ${c} ${p}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:i,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${De(a)} !important`,zIndex:i,display:"flex",alignItems:"center",background:l,borderTop:d,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:u,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},hc=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${De(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${De(o(r).mul(-1).equal())} 0 ${n}`}}}},Gv=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:l}=e,i=`${De(n)} ${o} ${a}`,u=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
|
|
76
|
+
& > ${t}-row,
|
|
77
|
+
& > div:not(${t}-row) > ${t}-row
|
|
78
|
+
`]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:i,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${u}${u}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${De(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:i,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:i,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:l(n).mul(-1).equal(),borderInlineStart:i}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:i,borderBottom:i}}}}}},Xv=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:l,lineType:i,tableBorderColor:u,tableFontSize:s,tableBg:c,tableRadius:p,tableHeaderTextColor:d,motionDurationMid:h,tableHeaderBg:g,tableHeaderCellSplitColor:v,tableFooterTextColor:f,tableFooterBg:C,calc:y}=e,b=`${De(l)} ${i} ${u}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},Bl()),{[t]:Object.assign(Object.assign({},Uo(e)),{fontSize:s,background:c,borderRadius:`${De(p)} ${De(p)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${De(p)} ${De(p)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
79
|
+
${t}-cell,
|
|
80
|
+
${t}-thead > tr > th,
|
|
81
|
+
${t}-tbody > tr > th,
|
|
82
|
+
${t}-tbody > tr > td,
|
|
83
|
+
tfoot > tr > th,
|
|
84
|
+
tfoot > tr > td
|
|
85
|
+
`]:{position:"relative",padding:`${De(n)} ${De(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${De(n)} ${De(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:d,fontWeight:r,textAlign:"start",background:g,borderBottom:b,transition:`background ${h} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:v,transform:"translateY(-50%)",transition:`background-color ${h}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${h}, border-color ${h}`,borderBottom:b,[`
|
|
86
|
+
> ${t}-wrapper:only-child,
|
|
87
|
+
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
88
|
+
`]:{[t]:{marginBlock:De(y(n).mul(-1).equal()),marginInline:`${De(y(a).sub(o).equal())}
|
|
89
|
+
${De(y(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:d,fontWeight:r,textAlign:"start",background:g,borderBottom:b,transition:`background ${h} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${De(n)} ${De(o)}`,color:f,background:C}})}},Yv=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:l,controlItemBgActiveHover:i,padding:u,paddingSM:s,paddingXS:c,colorBorderSecondary:p,borderRadiusLG:d,controlHeight:h,colorTextPlaceholder:g,fontSize:v,fontSizeSM:f,lineHeight:C,lineWidth:y,colorIcon:b,colorIconHover:x,opacityLoading:B,controlInteractiveSize:A}=e,F=new cn(o).onBackground(r).toHexString(),$=new cn(a).onBackground(r).toHexString(),D=new cn(t).onBackground(r).toHexString(),L=new cn(b),N=new cn(x),T=A/2-y,P=T*2+y*3;return{headerBg:D,headerColor:n,headerSortActiveBg:F,headerSortHoverBg:$,bodySortBg:D,rowHoverBg:D,rowSelectedBg:l,rowSelectedHoverBg:i,rowExpandedBg:t,cellPaddingBlock:u,cellPaddingInline:u,cellPaddingBlockMD:s,cellPaddingInlineMD:c,cellPaddingBlockSM:c,cellPaddingInlineSM:c,borderColor:p,headerBorderRadius:d,footerBg:D,footerColor:n,cellFontSize:v,cellFontSizeMD:v,cellFontSizeSM:v,headerSplitColor:p,fixedHeaderSortActiveBg:F,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:h,stickyScrollBarBg:g,stickyScrollBarBorderRadius:100,expandIconMarginTop:(v*C-y*3)/2-Math.ceil((f*1.4-y*3)/2),headerIconColor:L.clone().setA(L.a*B).toRgbString(),headerIconHoverColor:N.clone().setA(N.a*B).toRgbString(),expandIconHalfInner:T,expandIconSize:P,expandIconScale:A/P}},gc=2,Qv=li("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:l,headerSortActiveBg:i,headerSortHoverBg:u,bodySortBg:s,rowHoverBg:c,rowSelectedBg:p,rowSelectedHoverBg:d,rowExpandedBg:h,cellPaddingBlock:g,cellPaddingInline:v,cellPaddingBlockMD:f,cellPaddingInlineMD:C,cellPaddingBlockSM:y,cellPaddingInlineSM:b,borderColor:x,footerBg:B,footerColor:A,headerBorderRadius:F,cellFontSize:$,cellFontSizeMD:D,cellFontSizeSM:L,headerSplitColor:N,fixedHeaderSortActiveBg:T,headerFilterHoverBg:P,filterDropdownBg:S,expandIconBg:k,selectionColumnWidth:O,stickyScrollBarBg:E,calc:I}=e,M=Oo(e,{tableFontSize:$,tableBg:n,tableRadius:F,tablePaddingVertical:g,tablePaddingHorizontal:v,tablePaddingVerticalMiddle:f,tablePaddingHorizontalMiddle:C,tablePaddingVerticalSmall:y,tablePaddingHorizontalSmall:b,tableBorderColor:x,tableHeaderTextColor:l,tableHeaderBg:a,tableFooterTextColor:A,tableFooterBg:B,tableHeaderCellSplitColor:N,tableHeaderSortBg:i,tableHeaderSortHoverBg:u,tableBodySortBg:s,tableFixedHeaderSortActiveBg:T,tableHeaderFilterActiveBg:P,tableFilterDropdownBg:S,tableRowHoverBg:c,tableSelectedRowBg:p,tableSelectedRowHoverBg:d,zIndexTableFixed:gc,zIndexTableSticky:I(gc).add(1).equal({unit:!1}),tableFontSizeMiddle:D,tableFontSizeSmall:L,tableSelectionColumnWidth:O,tableExpandIconBg:k,tableExpandColumnWidth:I(o).add(I(e.padding).mul(2)).equal(),tableExpandedRowBg:h,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:E,tableScrollThumbBgHover:t,tableScrollBg:r});return[Xv(M),zv(M),hc(M),Uv(M),_v(M),Mv(M),Kv(M),jv(M),hc(M),Iv(M),Vv(M),Hv(M),Zv(M),Lv(M),qv(M),Wv(M),Gv(M)]},Yv,{unitless:{expandIconScale:!0}}),mc=[],Jv=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:l,style:i,size:u,bordered:s,dropdownPrefixCls:c,dataSource:p,pagination:d,rowSelection:h,rowKey:g="key",rowClassName:v,columns:f,children:C,childrenColumnName:y,onChange:b,getPopupContainer:x,loading:B,expandIcon:A,expandable:F,expandedRowRender:$,expandIconColumnIndex:D,indentSize:L,scroll:N,sortDirections:T,locale:P,showSorterTooltip:S={target:"full-header"},virtual:k}=e;si();const O=m.useMemo(()=>f||Ls(C),[f,C]),E=m.useMemo(()=>O.some(W=>W.responsive),[O]),I=Cp(E),M=m.useMemo(()=>{const W=new Set(Object.keys(I).filter(ie=>I[ie]));return O.filter(ie=>!ie.responsive||ie.responsive.some(Ae=>W.has(Ae)))},[O,I]),H=_r(e,["className","style","columns"]),{locale:z=bp,direction:U,table:G,renderEmpty:Y,getPrefixCls:ae,getPopupContainer:R}=m.useContext(en),Z=yp(u),V=Object.assign(Object.assign({},z.Table),P),K=p||mc,X=ae("table",o),Q=ae("dropdown",c),[,ee]=xs(),se=ys(X),[re,oe,ge]=Qv(X,se),ce=Object.assign(Object.assign({childrenColumnName:y,expandIconColumnIndex:D},F),{expandIcon:(r=F==null?void 0:F.expandIcon)!==null&&r!==void 0?r:(n=G==null?void 0:G.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:Ee="children"}=ce,_e=m.useMemo(()=>K.some(W=>W==null?void 0:W[Ee])?"nest":$||F!=null&&F.expandedRowRender?"row":null,[K]),Ue={body:m.useRef(null)},de=ym(X),be=m.useRef(null),Se=m.useRef(null);$p(t,()=>Object.assign(Object.assign({},Se.current),{nativeElement:be.current}));const Ke=m.useMemo(()=>typeof g=="function"?g:W=>W==null?void 0:W[g],[g]),[Fe]=xv(K,Ee,Ke),$e={},rt=(W,ie,Ae=!1)=>{var Ge,dt,Oe,it;const Ft=Object.assign(Object.assign({},$e),W);Ae&&((Ge=$e.resetPagination)===null||Ge===void 0||Ge.call($e),!((dt=Ft.pagination)===null||dt===void 0)&&dt.current&&(Ft.pagination.current=1),d&&((Oe=d.onChange)===null||Oe===void 0||Oe.call(d,1,(it=Ft.pagination)===null||it===void 0?void 0:it.pageSize))),N&&N.scrollToFirstRowOnChange!==!1&&Ue.body.current&&Bp(0,{getContainer:()=>Ue.body.current}),b==null||b(Ft.pagination,Ft.filters,Ft.sorter,{currentDataSource:Kl(Vl(K,Ft.sorterStates,Ee),Ft.filterStates,Ee),action:ie})},Xe=(W,ie)=>{rt({sorter:W,sorterStates:ie},"sort",!1)},[je,Pe,Ce,ye]=Ov({prefixCls:X,mergedColumns:M,onSorterChange:Xe,sortDirections:T||["ascend","descend"],tableLocale:V,showSorterTooltip:S}),He=m.useMemo(()=>Vl(K,Pe,Ee),[K,Pe]);$e.sorter=ye(),$e.sorterStates=Pe;const Ye=(W,ie)=>{rt({filters:W,filterStates:ie},"filter",!0)},[Qe,We,mt]=yv({prefixCls:X,locale:V,dropdownPrefixCls:Q,mergedColumns:M,onFilterChange:Ye,getPopupContainer:x||R,rootClassName:Ne(l,se)}),Ze=Kl(He,We,Ee);$e.filters=mt,$e.filterStates=We;const bt=m.useMemo(()=>{const W={};return Object.keys(mt).forEach(ie=>{mt[ie]!==null&&(W[ie]=mt[ie])}),Object.assign(Object.assign({},Ce),{filters:W})},[Ce,mt]),[pt]=Rv(bt),ht=(W,ie)=>{rt({pagination:Object.assign(Object.assign({},$e.pagination),{current:W,pageSize:ie})},"paginate")},[Ie,ar]=Ev(Ze.length,ht,d);$e.pagination=d===!1?{}:Dv(Ie,d),$e.resetPagination=ar;const Tt=m.useMemo(()=>{if(d===!1||!Ie.pageSize)return Ze;const{current:W=1,total:ie,pageSize:Ae=_f}=Ie;return Ze.length<ie?Ze.length>Ae?Ze.slice((W-1)*Ae,W*Ae):Ze:Ze.slice((W-1)*Ae,W*Ae)},[!!d,Ze,Ie==null?void 0:Ie.current,Ie==null?void 0:Ie.pageSize,Ie==null?void 0:Ie.total]),[tr,zt]=Cm({prefixCls:X,data:Ze,pageData:Tt,getRowKey:Ke,getRecordByKey:Fe,expandType:_e,childrenColumnName:Ee,locale:V,getPopupContainer:x||R},h),Kt=(W,ie,Ae)=>{let Ge;return typeof v=="function"?Ge=Ne(v(W,ie,Ae)):Ge=Ne(v),Ne({[`${X}-row-selected`]:zt.has(Ke(W,ie))},Ge)};ce.__PARENT_RENDER_ICON__=ce.expandIcon,ce.expandIcon=ce.expandIcon||A||bm(V),_e==="nest"&&ce.expandIconColumnIndex===void 0?ce.expandIconColumnIndex=h?1:0:ce.expandIconColumnIndex>0&&h&&(ce.expandIconColumnIndex-=1),typeof ce.indentSize!="number"&&(ce.indentSize=typeof L=="number"?L:15);const Mt=m.useCallback(W=>pt(tr(Qe(je(W)))),[je,Qe,tr]),q=()=>{if(d===!1||!(Ie!=null&&Ie.total))return{};const W=()=>Ie.size||(Z==="small"||Z==="middle"?"small":void 0),ie=Nt=>{const $r=Nt==="left"?"start":Nt==="right"?"end":Nt;return m.createElement(Ed,Object.assign({},Ie,{align:Ie.align||$r,className:Ne(`${X}-pagination`,Ie.className),size:W()}))},Ae=U==="rtl"?"left":"right",Ge=Ie.position;if(Ge===null||!Array.isArray(Ge))return{bottom:ie(Ae)};const dt=Ge.find(Nt=>typeof Nt=="string"&&Nt.toLowerCase().includes("top")),Oe=Ge.find(Nt=>typeof Nt=="string"&&Nt.toLowerCase().includes("bottom")),it=Ge.every(Nt=>`${Nt}`=="none"),Ft=dt?dt.toLowerCase().replace("top",""):"",sr=Oe?Oe.toLowerCase().replace("bottom",""):"",Fr=!dt&&!Oe&&!it,Sn=()=>Ft?ie(Ft):void 0,zr=()=>{if(sr)return ie(sr);if(Fr)return ie(Ae)};return{top:Sn(),bottom:zr()}},fe=m.useMemo(()=>typeof B=="boolean"?{spinning:B}:typeof B=="object"&&B!==null?Object.assign({spinning:!0},B):void 0,[B]),Re=Ne(ge,se,`${X}-wrapper`,G==null?void 0:G.className,{[`${X}-wrapper-rtl`]:U==="rtl"},a,l,oe),Be=Object.assign(Object.assign({},G==null?void 0:G.style),i),he=m.useMemo(()=>fe!=null&&fe.spinning&&K===mc?null:typeof(P==null?void 0:P.emptyText)<"u"?P.emptyText:(Y==null?void 0:Y("Table"))||m.createElement(xp,{componentName:"Table"}),[fe==null?void 0:fe.spinning,K,P==null?void 0:P.emptyText,Y]),we=k?Tv:Pv,Me={},te=m.useMemo(()=>{const{fontSize:W,lineHeight:ie,lineWidth:Ae,padding:Ge,paddingXS:dt,paddingSM:Oe}=ee,it=Math.floor(W*ie);switch(Z){case"middle":return Oe*2+it+Ae;case"small":return dt*2+it+Ae;default:return Ge*2+it+Ae}},[ee,Z]);k&&(Me.listItemHeight=te);const{top:me,bottom:J}=q();return re(m.createElement("div",{ref:be,className:Re,style:Be},m.createElement(Dd,Object.assign({spinning:!1},fe),me,m.createElement(we,Object.assign({},Me,H,{ref:Se,columns:M,direction:U,expandable:ce,prefixCls:X,className:Ne({[`${X}-middle`]:Z==="middle",[`${X}-small`]:Z==="small",[`${X}-bordered`]:s,[`${X}-empty`]:K.length===0},ge,se,oe),data:Tt,rowKey:Ke,rowClassName:Kt,emptyText:he,internalHooks:Xo,internalRefs:Ue,transformColumns:Mt,getContainerWidth:de,measureRowRender:W=>m.createElement(wp,{getPopupContainer:ie=>ie},W)})),J)))},e3=m.forwardRef(Jv),t3=(e,t)=>{const r=m.useRef(0);return r.current+=1,m.createElement(e3,Object.assign({},e,{ref:t,_renderTimes:r.current}))},Hr=m.forwardRef(t3);Hr.SELECTION_COLUMN=Wr;Hr.EXPAND_COLUMN=qr;Hr.SELECTION_ALL=Il;Hr.SELECTION_INVERT=jl;Hr.SELECTION_NONE=_l;Hr.Column=sm;Hr.ColumnGroup=um;Hr.Summary=Cf;const Kf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM8.69727%205.36035C9.24139%205.36035%209.7044%205.43727%2010.0781%205.59961L10.1787%205.64355V6.78418L9.93066%206.64746C9.56044%206.44228%209.15313%206.33892%208.70508%206.33887C8.12836%206.33887%207.66998%206.52918%207.31543%206.90527L7.31445%206.90625C6.96154%207.27886%206.77643%207.78905%206.77637%208.45605C6.77641%209.08819%206.94869%209.57219%207.27637%209.92578L7.4043%2010.0488C7.71343%2010.3185%208.1013%2010.456%208.5791%2010.4561C9.10219%2010.4561%209.54903%2010.3382%209.9248%2010.1084L10.1787%209.95312V11.0381L10.0889%2011.085C9.65012%2011.3158%209.10967%2011.4268%208.47559%2011.4268C7.6423%2011.4268%206.9605%2011.1612%206.44922%2010.6191V10.6182C5.93981%2010.0754%205.69145%209.36307%205.69141%208.49902C5.69147%207.57075%205.97064%206.80719%206.54102%206.22656C7.10964%205.64782%207.83309%205.36042%208.69727%205.36035ZM6.3291%206.75488C6.32678%206.75844%206.32457%206.76206%206.32227%206.76562C6.36901%206.69342%206.41884%206.62326%206.47266%206.55566L6.3291%206.75488ZM8.10645%205.57812C8.01275%205.59511%207.92124%205.61615%207.83203%205.6416C8.0108%205.5906%208.19869%205.55704%208.39551%205.54004L8.10645%205.57812Z'%20fill='%23339C43'/%3e%3c/svg%3e",Wf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.29%201.33301C11.457%201.33301%2011.6182%201.39584%2011.7412%201.50879L12.6504%202.3457L11.9736%203.08105L11.1602%202.33301H4V13.666H12.667V3.71387L11.9766%203.08398L11.9736%203.08203L12.6504%202.3457L13.4502%203.07617C13.5879%203.20229%2013.6668%203.38063%2013.667%203.56738V14L13.6533%2014.1338C13.5913%2014.4377%2013.3223%2014.666%2013%2014.666H3.66699L3.53223%2014.6523C3.27187%2014.599%203.06687%2014.3942%203.01367%2014.1338L3%2014V2C3.00012%201.67798%203.22857%201.40887%203.53223%201.34668L3.66699%201.33301H11.29ZM10.5%209C10.7761%209%2011%209.22386%2011%209.5C11%209.77614%2010.7761%2010%2010.5%2010H6.5C6.22386%2010%206%209.77614%206%209.5C6%209.22386%206.22386%209%206.5%209H10.5ZM10.5%207C10.7761%207%2011%207.22386%2011%207.5C11%207.77614%2010.7761%208%2010.5%208H6.5C6.22386%208%206%207.77614%206%207.5C6%207.22386%206.22386%207%206.5%207H10.5Z'%20fill='%23426BFF'/%3e%3c/svg%3e",Vf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM6.71582%205.33301C6.78793%205.33301%206.85481%205.37254%206.89258%205.43652L7.9541%207.25586L9.00488%205.43848C9.04265%205.3745%209.10953%205.33496%209.18164%205.33496H9.79395C9.83089%205.33515%209.86769%205.34564%209.89941%205.36523C9.93101%205.3848%209.95694%205.41285%209.97461%205.44629C9.99224%205.47972%2010.0011%205.5176%2010%205.55566C9.99877%205.59389%209.9876%205.63179%209.96777%205.66406L8.50293%208.01855L9.94531%2010.3359C10.0071%2010.4354%209.97971%2010.5668%209.88379%2010.6309C9.84945%2010.6522%209.81097%2010.665%209.77148%2010.665H9.12793C9.05762%2010.665%208.99086%2010.6274%208.95312%2010.5635L7.88379%208.76172L6.80664%2010.5654C6.76885%2010.6275%206.70384%2010.667%206.63184%2010.667H6.04004C6.00321%2010.6669%205.96628%2010.6561%205.93457%2010.6367C5.90309%2010.6174%205.87717%2010.5897%205.85938%2010.5566C5.84153%2010.5233%205.83209%2010.4854%205.83301%2010.4473C5.83393%2010.4093%205.84491%2010.3721%205.86426%2010.3398L7.2959%207.97949L5.88379%205.66211C5.82198%205.56081%205.85112%205.42939%205.94727%205.36719C5.97982%205.3442%206.01726%205.33302%206.05664%205.33301H6.71582Z'%20fill='%232F913E'/%3e%3c/svg%3e",qf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1162%203.07617C13.2543%203.20232%2013.3338%203.3804%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM10%208.5C10.2761%208.5%2010.5%208.72386%2010.5%209C10.5%209.27614%2010.2761%209.5%2010%209.5H6C5.72386%209.5%205.5%209.27614%205.5%209C5.5%208.72386%205.72386%208.5%206%208.5H10ZM9%206C9.27614%206%209.5%206.22386%209.5%206.5C9.5%206.77614%209.27614%207%209%207H6C5.72386%207%205.5%206.77614%205.5%206.5C5.5%206.22386%205.72386%206%206%206H9Z'%20fill='%2370706E'/%3e%3c/svg%3e",Uf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%202.66667C2%202.29848%202.29848%202%202.66667%202H8.22957C8.49499%202%208.73512%202.15744%208.84095%202.40085L9.92791%204.90085C10.1193%205.34115%209.79664%205.83333%209.31652%205.83333H2.66667C2.29848%205.83333%202%205.53486%202%205.16667V2.66667Z'%20fill='%23F9B13C'/%3e%3cpath%20d='M3%204.50008C3%204.31599%203.14924%204.16675%203.33333%204.16675H12.6667C12.8508%204.16675%2013%204.31599%2013%204.50008V13.1667C13%2013.3508%2012.8508%2013.5001%2012.6667%2013.5001H3.33333C3.14924%2013.5001%203%2013.3508%203%2013.1667V4.50008Z'%20fill='white'/%3e%3cpath%20d='M2%204.66675H13.3333C13.7015%204.66675%2014%204.96522%2014%205.33341V13.3334C14%2013.7016%2013.7015%2014.0001%2013.3333%2014.0001H2.66667C2.29848%2014.0001%202%2013.7016%202%2013.3334V4.66675Z'%20fill='%23FFCB2E'/%3e%3c/svg%3e",Zf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM8.95117%208.80469C8.95117%209.45619%208.83123%209.99047%208.58105%2010.3984L8.46582%2010.5654C8.13575%2010.9898%207.68375%2011.2012%207.12109%2011.2012C6.86476%2011.2012%206.64525%2011.1636%206.4668%2011.083L6.4082%2011.0566V10.0342L6.56641%2010.1494C6.70723%2010.2516%206.88862%2010.3066%207.11719%2010.3066C7.40052%2010.3066%207.60577%2010.1907%207.74609%209.95508C7.89129%209.7111%207.9707%209.33189%207.9707%208.80469V4.84961H8.95117V8.80469Z'%20fill='%23FF4D50'/%3e%3c/svg%3e",Gf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13%201C13.5523%201%2014%201.44772%2014%202V13H3.5C3.22386%2013%203%2013.2239%203%2013.5C3%2013.7761%203.22386%2014%203.5%2014H14C14%2014.5523%2013.5523%2015%2013%2015H4C2.89543%2015%202%2014.1046%202%2013V3C2%201.89543%202.89543%201%204%201H13ZM5.5%204C5.22386%204%205%204.22386%205%204.5C5%204.77614%205.22386%205%205.5%205H10.5C10.7761%205%2011%204.77614%2011%204.5C11%204.22386%2010.7761%204%2010.5%204H5.5Z'%20fill='%230956E4'/%3e%3c/svg%3e",Xf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208C14.5%2011.5899%2011.5899%2014.5%208%2014.5C4.41015%2014.5%201.5%2011.5899%201.5%208C1.5%204.41015%204.41015%201.5%208%201.5ZM8%202.42871C4.92298%202.42871%202.42871%204.92298%202.42871%208C2.42871%2011.077%204.92298%2013.5713%208%2013.5713C11.077%2013.5713%2013.5713%2011.077%2013.5713%208C13.5713%204.92298%2011.077%202.42871%208%202.42871ZM6.19434%207.36523C6.2548%207.30503%206.3537%207.30487%206.41406%207.36523L6.68262%207.63477C6.74275%207.69515%206.74275%207.79314%206.68262%207.85352L6.30371%208.23242C5.89985%208.63677%205.89974%209.29201%206.30371%209.69629C6.70813%2010.1005%207.3642%2010.1006%207.76855%209.69629L8.14746%209.31738C8.20788%209.25744%208.30591%209.25726%208.36621%209.31738L8.63574%209.58691C8.69582%209.64722%208.69567%209.74526%208.63574%209.80566L8.25684%2010.1846C7.58294%2010.8585%206.49045%2010.8582%205.81641%2010.1846C5.14239%209.51056%205.14239%208.41815%205.81641%207.74414L6.19434%207.36523ZM8.27441%207.27246C8.33487%207.21231%208.43282%207.21214%208.49316%207.27246L8.7627%207.54199C8.82268%207.60237%208.82273%207.7004%208.7627%207.76074L7.76074%208.76172C7.70035%208.82211%207.60244%208.82201%207.54199%208.76172L7.27246%208.49316C7.21217%208.43285%207.21239%208.33487%207.27246%208.27441L8.27441%207.27246ZM7.74414%205.81543C8.41813%205.14189%209.51068%205.14173%2010.1846%205.81543C10.8584%206.48938%2010.8583%207.58286%2010.1846%208.25684L9.80566%208.63477C9.74528%208.69515%209.64736%208.69505%209.58691%208.63477L9.31738%208.36621C9.25716%208.30593%209.25744%208.20792%209.31738%208.14746L9.69629%207.76855C10.1004%207.36418%2010.1005%206.70805%209.69629%206.30371C9.29201%205.89962%208.6368%205.89978%208.23242%206.30371L7.85352%206.68262C7.79319%206.74294%207.69523%206.74271%207.63477%206.68262L7.36523%206.41309C7.30484%206.35264%207.30481%206.25476%207.36523%206.19434L7.74414%205.81543Z'%20fill='%2339B83F'/%3e%3c/svg%3e",Yf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957Z'%20fill='%23675FF0'/%3e%3cpath%20d='M5%206.81818C5.12597%206.81818%205.22541%206.79021%205.30497%206.73427C5.38453%206.67832%205.43757%206.6014%205.46409%206.51049C5.49061%206.41259%205.50387%206.25175%205.50387%206.02098C5.50387%205.79021%205.5105%205.63636%205.51713%205.56643C5.53039%205.44755%205.55691%205.35664%205.60331%205.28671C5.64309%205.21678%205.6895%205.16084%205.74917%205.11888C5.80884%205.07692%205.88177%205.04895%205.97459%205.02098C6.03425%205.00699%206.14033%205%206.27956%205H6.41878V5.32867H6.34586C6.17348%205.32867%206.06077%205.35664%206.00773%205.40559C5.9547%205.45454%205.92155%205.57343%205.92155%205.75525C5.92155%206.11888%205.91492%206.34266%205.89503%206.44056C5.86851%206.58741%205.81547%206.6993%205.74254%206.78322C5.66961%206.86014%205.55691%206.93706%205.41105%207C5.59006%207.06294%205.72265%207.16084%205.80221%207.29371C5.88177%207.42657%205.92155%207.63636%205.92155%207.93706C5.92155%208.2028%205.92818%208.36364%205.92818%208.41958C5.94144%208.51049%205.97459%208.58042%206.02762%208.61539C6.08066%208.65035%206.18674%208.67133%206.33923%208.67133H6.41215V9H6.27293C6.11381%209%205.99448%208.99301%205.92818%208.96503C5.8221%208.93007%205.73591%208.88112%205.66961%208.81119C5.60331%208.74126%205.55691%208.65035%205.53702%208.53846C5.51713%208.42657%205.50387%208.25175%205.50387%208C5.50387%207.74825%205.49061%207.58042%205.46409%207.48252C5.43757%207.39161%205.38453%207.30769%205.30497%207.25874C5.22541%207.2028%205.12597%207.17483%205%207.16783V6.81818ZM10.5956%206.06993H7.22099C7.04199%206.06993%206.90276%205.91608%206.90276%205.73427V5.67133C6.90276%205.48252%207.04862%205.33566%207.22099%205.33566H10.5956C10.7746%205.33566%2010.9138%205.48951%2010.9138%205.67133V5.73427C10.9138%205.91608%2010.768%206.06993%2010.5956%206.06993ZM10.5956%207.3986H7.22099C7.04199%207.3986%206.90276%207.24476%206.90276%207.06294V7C6.90276%206.81119%207.04862%206.66434%207.22099%206.66434H10.5956C10.7746%206.66434%2010.9138%206.81818%2010.9138%207V7.06294C10.9138%207.24476%2010.768%207.3986%2010.5956%207.3986ZM10.5956%208.73427H7.22099C7.04199%208.73427%206.90276%208.58042%206.90276%208.3986V8.33566C6.90276%208.14685%207.04862%208%207.22099%208H10.5956C10.7746%208%2010.9138%208.15385%2010.9138%208.33566V8.3986C10.9138%208.58042%2010.768%208.73427%2010.5956%208.73427Z'%20fill='%23675FF0'/%3e%3cpath%20d='M11.5%2010.1265H10.8525V12H10.3677V10.1265H9.72168V9.73096H11.5V10.1265Z'%20fill='%23675FF0'/%3e%3cpath%20d='M7.55811%2012V9.73096H8.3418C9.14746%209.73096%209.55029%2010.0996%209.55029%2010.8369C9.55029%2011.1875%209.4375%2011.4692%209.21191%2011.6821C8.98633%2011.894%208.69531%2012%208.33887%2012H7.55811ZM8.0415%2010.1265V11.6045H8.30518C8.53467%2011.6045%208.71484%2011.5361%208.8457%2011.3994C8.97656%2011.2627%209.04199%2011.0776%209.04199%2010.8442C9.04199%2010.6187%208.97363%2010.4429%208.83691%2010.3169C8.7002%2010.1899%208.52246%2010.1265%208.30371%2010.1265H8.0415Z'%20fill='%23675FF0'/%3e%3cpath%20d='M4.96094%2010.8955C4.96094%2010.54%205.06445%2010.251%205.27148%2010.0283C5.47949%209.80469%205.75391%209.69287%206.09473%209.69287C6.41895%209.69287%206.67969%209.80078%206.87695%2010.0166C7.0752%2010.2324%207.17432%2010.5098%207.17432%2010.8486C7.17432%2011.2021%207.07129%2011.4893%206.86523%2011.71C6.66016%2011.9297%206.39111%2012.0396%206.05811%2012.0396C5.73291%2012.0396%205.46875%2011.9331%205.26562%2011.7202C5.0625%2011.5063%204.96094%2011.2314%204.96094%2010.8955ZM5.46924%2010.8691C5.46924%2011.0898%205.52246%2011.2705%205.62891%2011.4111C5.73535%2011.5508%205.88135%2011.6206%206.06689%2011.6206C6.25635%2011.6206%206.40381%2011.5537%206.50928%2011.4199C6.61475%2011.2852%206.66748%2011.1045%206.66748%2010.8779C6.66748%2010.6416%206.61621%2010.4551%206.51367%2010.3184C6.41113%2010.1807%206.2666%2010.1118%206.08008%2010.1118C5.89062%2010.1118%205.74121%2010.1821%205.63184%2010.3228C5.52344%2010.4634%205.46924%2010.6455%205.46924%2010.8691Z'%20fill='%23675FF0'/%3e%3c/svg%3e",Qf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM7.71191%205.00098C7.95398%205.01182%208.23799%205.16198%208.30664%205.54688C8.40941%206.03464%208.27759%206.57316%208.17285%207.00488L8.16699%207.03027C8.37835%207.57951%208.66991%207.94773%209.11426%208.21875C10.017%208.10683%2010.5964%208.16863%2010.835%208.40332C10.9994%208.56776%2011.0484%208.87519%2010.9473%209.11914C10.8894%209.25831%2010.7357%209.48926%2010.3457%209.48926C9.95189%209.48921%209.37167%209.31384%208.8623%209.04102C8.40175%209.11875%207.8926%209.29278%207.40137%209.45898C7.2966%209.49512%207.18778%209.5311%207.08301%209.56543C6.3969%2010.7429%205.8824%2010.9998%205.56445%2011C5.48865%2011%205.4233%2010.9837%205.36914%2010.9639C5.24449%2010.9169%205.13813%2010.8189%205.07129%2010.6924C5.01181%2010.5787%204.98629%2010.4528%205.00781%2010.3535C5.1144%209.81502%205.83149%209.3878%206.36621%209.11133C6.65343%208.60533%207.04538%207.75431%207.29102%207.16895C7.09599%206.41389%206.98933%205.82132%207.1084%205.3877C7.17162%205.15099%207.42651%204.98835%207.71191%205.00098ZM6.18555%209.77441C5.99948%209.94427%205.76264%2010.1801%205.6416%2010.4023C5.74457%2010.3228%205.93444%2010.1394%206.18555%209.77441ZM7.73926%207.69629C7.60016%208.05769%207.39944%208.55181%207.15918%208.9873C7.23144%208.95839%207.30596%208.9272%207.38184%208.89648C7.69966%208.76643%208.05529%208.61975%208.44531%208.53125C8.17624%208.31804%207.93249%208.03049%207.73926%207.69629ZM9.73535%208.74707C10.3674%208.99599%2010.5185%208.91259%2010.5352%208.90234L10.5391%208.89648H10.543C10.5536%208.88933%2010.5516%208.88347%2010.5498%208.87988C10.544%208.87053%2010.4509%208.71359%209.73535%208.74707ZM7.72852%205.4834C7.67613%205.54303%207.68883%206.05251%207.77734%206.41211C7.8496%206.16635%207.86152%205.68036%207.76758%205.51953C7.75502%205.4962%207.74284%205.48532%207.72852%205.4834Z'%20fill='%23FF4D50'/%3e%3c/svg%3e",Jf="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1777%202.67969C14.4553%202.7361%2014.6644%202.98029%2014.666%203.27441V12.667C14.6659%2012.9891%2014.4376%2013.2583%2014.1338%2013.3203L14%2013.334H2L1.86523%2013.3203C1.56164%2013.2581%201.33312%2012.989%201.33301%2012.667V3.33398C1.33301%203.01196%201.56164%202.74298%201.86523%202.68066L2%202.66699H14.0557L14.1777%202.67969ZM2.33301%2012.334H13.666V3.66699H2.33301V12.334ZM8.78125%207.39355C8.79747%207.40146%208.81204%207.41261%208.82324%207.42676L10.8545%2010.0166C10.915%2010.0939%2010.8601%2010.2078%2010.7607%2010.208H5.28613C5.26386%2010.2081%205.24156%2010.2022%205.22266%2010.1904C5.20374%2010.1786%205.18849%2010.1616%205.17871%2010.1416C5.16897%2010.1216%205.16469%2010.0993%205.16699%2010.0771C5.16933%2010.055%205.17865%2010.0341%205.19238%2010.0166L6.67676%208.12305C6.68788%208.10885%206.70253%208.09775%206.71875%208.08984C6.73488%208.08198%206.75256%208.07818%206.77051%208.07812C6.78858%208.07812%206.807%208.08193%206.82324%208.08984C6.83924%208.09768%206.85322%208.10907%206.86426%208.12305L7.47656%208.90332L8.63379%207.42676C8.64501%207.41261%208.65955%207.40145%208.67578%207.39355C8.69215%207.38564%208.71034%207.38086%208.72852%207.38086C8.74668%207.38087%208.7649%207.38565%208.78125%207.39355ZM6.35547%205.83301C6.51333%205.83301%206.66474%205.89619%206.77637%206.00781C6.888%206.11944%206.95117%206.27084%206.95117%206.42871C6.95111%206.5865%206.88794%206.73803%206.77637%206.84961C6.66476%206.9611%206.51323%207.02344%206.35547%207.02344C6.19768%207.02338%206.04615%206.96118%205.93457%206.84961C5.823%206.73803%205.7608%206.5865%205.76074%206.42871C5.76074%206.27095%205.82308%206.11942%205.93457%206.00781C6.04615%205.89624%206.19768%205.83307%206.35547%205.83301Z'%20fill='%2332A3FF'/%3e%3c/svg%3e",e2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM6.1543%205.26758H8.1543C9.30194%205.26778%209.9998%206.03334%2010%207.08105C10%208.14247%209.29247%208.89045%208.15039%208.89062H6.93262V10.7275C6.93262%2010.812%206.86371%2010.8816%206.7793%2010.8818H6.1543C6.06968%2010.8818%206%2010.8122%206%2010.7275V5.41992C6.00002%205.33532%206.06969%205.2666%206.1543%205.2666V5.26758ZM6.93262%206.03906V8.12402H7.68066C8.54028%208.12402%209.0498%207.91372%209.0498%207.0791C9.04962%206.41793%208.66339%206.03914%208.01367%206.03906H6.93262Z'%20fill='%23FA8C16'/%3e%3c/svg%3e",t2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.73633%201.57642C2.53848%200.774265%203.74473%200.714862%204.87207%201.03052C6.02182%201.35245%207.24885%202.09683%208.3125%203.1604C9.37624%204.22414%2010.1204%205.45195%2010.4424%206.60181C10.758%207.72909%2010.6986%208.93446%209.89648%209.73657C9.09439%2010.5387%207.88901%2010.5981%206.76172%2010.2825C5.61186%209.96051%204.38405%209.21632%203.32031%208.15259C2.25674%207.08894%201.51236%205.86191%201.19043%204.71216C0.874775%203.58481%200.934176%202.37857%201.73633%201.57642Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.76172%205.41479C7.88883%205.09929%209.09442%205.15888%209.89648%205.96069C10.6986%206.76284%2010.758%207.96909%2010.4424%209.09644C10.1204%2010.2462%209.37617%2011.4732%208.3125%2012.5369C7.24882%2013.6005%206.02187%2014.3448%204.87207%2014.6667C3.74472%2014.9824%202.53848%2014.923%201.73633%2014.1208C0.934528%2013.3188%200.874922%2012.1132%201.19043%2010.9861C1.51239%209.83623%202.25659%208.60841%203.32031%207.54468C4.38405%206.48096%205.61186%205.73675%206.76172%205.41479Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.1282%201.03052C12.2553%200.715012%2013.4609%200.774612%2014.263%201.57642C15.0651%202.37857%2015.1246%203.58481%2014.8089%204.71216C14.4869%205.86196%2013.7427%207.08892%2012.679%208.15259C11.6153%209.21627%2010.3884%209.96048%209.23859%2010.2825C8.11124%2010.5981%206.90499%2010.5387%206.10284%209.73657C5.30106%208.9345%205.24144%207.72892%205.55695%206.60181C5.8789%205.45195%206.62311%204.22414%207.68683%203.1604C8.75056%202.09668%209.97838%201.35248%2011.1282%201.03052Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.10284%205.96069C6.90499%205.15855%208.11124%205.09914%209.23859%205.41479C10.3883%205.73673%2011.6154%206.48111%2012.679%207.54468C13.7427%208.60841%2014.4869%209.83623%2014.8089%2010.9861C15.1245%2012.1134%2015.0651%2013.3188%2014.263%2014.1208C13.4609%2014.9229%2012.2555%2014.9823%2011.1282%2014.6667C9.97838%2014.3448%208.75055%2013.6006%207.68683%2012.5369C6.62325%2011.4732%205.87888%2010.2462%205.55695%209.09644C5.24129%207.96909%205.3007%206.76284%206.10284%205.96069Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",r2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM9.91406%205.16699C10.0058%205.16721%2010.0799%205.24128%2010.0801%205.33301V5.9707C10.0801%206.06262%2010.0059%206.13748%209.91406%206.1377H8.64648C8.55457%206.1377%208.47971%206.21185%208.47949%206.30371V10.5469C8.47936%2010.6387%208.40525%2010.7127%208.31348%2010.7129H7.59375C7.50178%2010.7129%207.42689%2010.6388%207.42676%2010.5469V6.30371C7.42654%206.21185%207.35168%206.1377%207.25977%206.1377H6C5.90795%206.1377%205.83301%206.06275%205.83301%205.9707V5.33301C5.83323%205.24115%205.90809%205.16699%206%205.16699H9.91406Z'%20fill='%234089FF'/%3e%3c/svg%3e",n2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.9568%201.33276C11.1238%201.33276%2011.2849%201.39651%2011.408%201.50952L12.3171%202.34644L11.6404%203.08179L10.8269%202.33374H3.66675V13.6667H12.3337V3.7146L11.6433%203.08472L11.6404%203.08276L12.3171%202.34644L13.1169%203.0769C13.2546%203.20307%2013.3336%203.38138%2013.3337%203.56812V14.0007L13.3201%2014.1345C13.2578%2014.4382%2012.9888%2014.6667%2012.6667%2014.6667H3.33374L3.19897%2014.6531C2.93875%2014.5998%202.73378%2014.3947%202.68042%2014.1345L2.66675%2014.0007V2.00073C2.66675%201.67864%202.89529%201.40965%203.19897%201.34741L3.33374%201.33276H10.9568ZM6.05542%207.31616C6.12046%207.25114%206.22568%207.25122%206.29077%207.31616L6.58081%207.6062C6.64589%207.67128%206.64588%207.77646%206.58081%207.84155L6.17358%208.24976C5.73807%208.68527%205.73807%209.39139%206.17358%209.8269C6.60912%2010.2622%207.31529%2010.2624%207.75073%209.8269L8.15796%209.4187C8.22305%209.35363%208.32921%209.35362%208.39429%209.4187L8.68433%209.70874C8.74934%209.77383%208.74937%209.88%208.68433%209.94507L8.27612%2010.3523C7.55026%2011.0782%206.37308%2011.0782%205.64722%2010.3523C4.92174%209.62652%204.92177%208.45016%205.64722%207.72437L6.05542%207.31616ZM8.29468%207.21655C8.35977%207.15147%208.46592%207.15147%208.53101%207.21655L8.82104%207.50659C8.88578%207.5716%208.88575%207.67692%208.82104%207.74194L7.74194%208.82104C7.67692%208.88583%207.57163%208.8858%207.50659%208.82104L7.21655%208.53101C7.15147%208.46592%207.15147%208.35977%207.21655%208.29468L8.29468%207.21655ZM7.72339%205.64722C8.44919%204.92141%209.62642%204.92152%2010.3523%205.64722C11.0782%206.37308%2011.0782%207.55026%2010.3523%208.27612L9.94409%208.68433C9.87904%208.74897%209.77371%208.7491%209.70874%208.68433L9.4187%208.39429C9.35361%208.3292%209.35361%208.22305%209.4187%208.15796L9.8269%207.75073C10.2623%207.31533%2010.2621%206.60913%209.8269%206.17358C9.39139%205.73807%208.68527%205.73807%208.24976%206.17358L7.84155%206.58081C7.77647%206.64589%207.67129%206.64588%207.6062%206.58081L7.31616%206.29077C7.25109%206.22568%207.25108%206.1205%207.31616%206.05542L7.72339%205.64722Z'%20fill='%231998FF'/%3e%3c/svg%3e",o2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM5.77832%205.83301C5.87031%205.83301%205.94933%205.8983%205.9707%205.98828L6.72852%209.2998L7.54492%205.98535C7.56627%205.89541%207.64507%205.83309%207.73535%205.83301H8.26465C8.35498%205.83305%208.43373%205.89538%208.45508%205.98535L9.27344%209.30664L10.0254%205.98828C10.0467%205.89837%2010.1259%205.83313%2010.2178%205.83301H10.8027C10.8329%205.83312%2010.8626%205.84093%2010.8896%205.85449C10.9167%205.86808%2010.9406%205.88781%2010.959%205.91211C10.9773%205.93632%2010.9901%205.96425%2010.9961%205.99414C11.0021%206.02417%2011.0008%206.05533%2010.9932%206.08496L9.77148%2010.6846C9.74853%2010.7727%209.66957%2010.8328%209.58105%2010.833H9.05859C8.96987%2010.833%208.89019%2010.7712%208.86719%2010.6846L8%207.40137L7.13281%2010.6846C7.10985%2010.7728%207.03094%2010.8328%206.94238%2010.833H6.41602C6.32739%2010.8329%206.24857%2010.7712%206.22559%2010.6846L5.00684%206.08496C4.99909%206.05533%204.99796%206.0242%205.00391%205.99414C5.00985%205.9641%205.02262%205.93543%205.04102%205.91113C5.05939%205.88697%205.08338%205.86703%205.11035%205.85352C5.13734%205.84008%205.1672%205.83306%205.19727%205.83301H5.77832Z'%20fill='%23426BFF'/%3e%3c/svg%3e",a2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.29%201.33008C11.457%201.33008%2011.6182%201.39298%2011.7412%201.50586L12.6504%202.34277L11.9736%203.07812L11.1602%202.33008H4V13.6631H12.667V3.71094L11.9766%203.08105L11.9736%203.0791L12.6504%202.34277L13.4502%203.07324C13.588%203.19942%2013.6669%203.37761%2013.667%203.56445V13.9971L13.6533%2014.1309C13.5912%2014.4347%2013.3222%2014.6631%2013%2014.6631H3.66699L3.53223%2014.6494C3.27204%2014.5959%203.06685%2014.3912%203.01367%2014.1309L3%2013.9971V1.99707C3%201.67508%203.22869%201.40611%203.53223%201.34375L3.66699%201.33008H11.29ZM7.36816%206.39941C7.65187%206.39959%207.84768%206.57468%207.95605%206.93066L7.52734%207.78809L7.31641%207.35938C7.24417%207.22007%207.15618%207.14756%207.04785%207.14746H6.19043C6.04599%207.14751%206.00977%207.21486%206.08203%207.35938L7.04199%209.38867C7.68737%208.10825%208.05967%207.27658%208.21973%206.93066C8.40557%206.5332%208.62233%206.39943%208.90625%206.39941H10.791C11.1471%206.39948%2011.2705%206.57449%2011.1621%206.93066C11.0536%207.287%2010.5013%208.46426%209.50488%2010.457C9.46874%2010.5241%209.41249%2010.5762%209.35059%2010.6123C9.1441%2010.731%208.88077%2010.6635%208.75684%2010.457L8.22461%209.28027L8.65332%208.42285L9.13379%209.43945L10.1504%207.35938C10.2175%207.21997%2010.1866%207.14746%2010.042%207.14746H8.97852L7.47656%2010.3535C7.43013%2010.5031%207.31627%2010.6168%207.17188%2010.6582C6.93438%2010.7253%206.68626%2010.591%206.61914%2010.3535C5.62275%208.28844%205.09083%207.1111%205.01855%206.82715C4.94645%206.54338%205.09114%206.39941%205.44727%206.39941H7.36816Z'%20fill='%23ED8E35'/%3e%3c/svg%3e",i2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%202.66667C2%202.29848%202.29848%202%202.66667%202H13.3333C13.7015%202%2014%202.29848%2014%202.66667V8H2V2.66667Z'%20fill='%234DC6FF'/%3e%3cpath%20d='M2%208H14V13.3333C14%2013.7015%2013.7015%2014%2013.3333%2014H2.66667C2.29848%2014%202%2013.7015%202%2013.3333V8Z'%20fill='%234DCE84'/%3e%3crect%20x='14'%20y='6'%20width='4'%20height='12'%20transform='rotate(90%2014%206)'%20fill='%23FF5F5A'/%3e%3crect%20x='6'%20y='2'%20width='4'%20height='12'%20fill='%23FCC048'/%3e%3crect%20x='5.66667'%20y='5.66667'%20width='4.66667'%20height='4.66667'%20rx='0.666667'%20stroke='white'%20stroke-width='0.666667'/%3e%3c/svg%3e",r3=Object.assign({});function n3(e,t,r){let n=e;for(let o=0;o<t.length-1;o+=1){const a=t[o];(!n[a]||typeof n[a]!="object")&&(n[a]={}),n=n[a]}n[t[t.length-1]]=r}function o3(e){return e.replace(/^\.\//,"").split("?")[0].replace(/\.svg$/i,"").split("/")}function a3(e,t){const r=pe.lazy(()=>e().then(o=>({default:o.default||o.ReactComponent}))),n=o=>Kn(L1,{fallback:null,children:Kn(r,{...o})});return n.displayName=t,Vo(n)}const l2={};Object.entries(r3).forEach(([e,t])=>{const r=o3(e),n=a3(t,`Icon(${r.join("/")})`);n3(l2,r,n)});const i3=Object.assign({"./rag/csv.svg":Kf,"./rag/document.svg":Wf,"./rag/excel.svg":Vf,"./rag/file.svg":qf,"./rag/folder.svg":Uf,"./rag/json.svg":Zf,"./rag/knowledgebase.svg":Gf,"./rag/netretrive.svg":Xf,"./rag/odf.svg":Yf,"./rag/pdf.svg":Qf,"./rag/pic.svg":Jf,"./rag/ppt.svg":e2,"./rag/think.svg":t2,"./rag/txt.svg":r2,"./rag/url.svg":n2,"./rag/word.svg":o2,"./rag/wps.svg":a2,"./rag/zip.svg":i2});function l3(e,t,r){let n=e;for(let o=0;o<t.length-1;o+=1){const a=t[o];(!n[a]||typeof n[a]!="object")&&(n[a]={}),n=n[a]}n[t[t.length-1]]=r}function s3(e){return e.replace(/^\.\//,"").split("?")[0].replace(/\.svg$/i,"").split("/")}const s2={};Object.entries(i3).forEach(([e,t])=>{const r=s3(e);l3(s2,r,t)});function u3(e){const t=e.split("/").filter(Boolean);let r=l2;for(const n of t){if(!r)return;r=r[n]}return typeof r=="function"?r:void 0}function c3(e){const t=e.split("/").filter(Boolean);let r=s2;for(const n of t){if(!r)return;r=r[n]}return typeof r=="string"?r:void 0}const ia=({type:e,size:t,...r})=>{const n=u3(e),o=typeof t<"u"?{width:t,height:t}:{};if(n)return Kn(n,{...o,...r});const a=c3(e);return a?Kn("img",{src:a,alt:"",...o,...r}):null},d3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM8.69727%205.36035C9.24139%205.36035%209.7044%205.43727%2010.0781%205.59961L10.1787%205.64355V6.78418L9.93066%206.64746C9.56044%206.44228%209.15313%206.33892%208.70508%206.33887C8.12836%206.33887%207.66998%206.52918%207.31543%206.90527L7.31445%206.90625C6.96154%207.27886%206.77643%207.78905%206.77637%208.45605C6.77641%209.08819%206.94869%209.57219%207.27637%209.92578L7.4043%2010.0488C7.71343%2010.3185%208.1013%2010.456%208.5791%2010.4561C9.10219%2010.4561%209.54903%2010.3382%209.9248%2010.1084L10.1787%209.95312V11.0381L10.0889%2011.085C9.65012%2011.3158%209.10967%2011.4268%208.47559%2011.4268C7.6423%2011.4268%206.9605%2011.1612%206.44922%2010.6191V10.6182C5.93981%2010.0754%205.69145%209.36307%205.69141%208.49902C5.69147%207.57075%205.97064%206.80719%206.54102%206.22656C7.10964%205.64782%207.83309%205.36042%208.69727%205.36035ZM6.3291%206.75488C6.32678%206.75844%206.32457%206.76206%206.32227%206.76562C6.36901%206.69342%206.41884%206.62326%206.47266%206.55566L6.3291%206.75488ZM8.10645%205.57812C8.01275%205.59511%207.92124%205.61615%207.83203%205.6416C8.0108%205.5906%208.19869%205.55704%208.39551%205.54004L8.10645%205.57812Z'%20fill='%23339C43'/%3e%3c/svg%3e",f3=Object.freeze(Object.defineProperty({__proto__:null,default:d3},Symbol.toStringTag,{value:"Module"})),p3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.29%201.33301C11.457%201.33301%2011.6182%201.39584%2011.7412%201.50879L12.6504%202.3457L11.9736%203.08105L11.1602%202.33301H4V13.666H12.667V3.71387L11.9766%203.08398L11.9736%203.08203L12.6504%202.3457L13.4502%203.07617C13.5879%203.20229%2013.6668%203.38063%2013.667%203.56738V14L13.6533%2014.1338C13.5913%2014.4377%2013.3223%2014.666%2013%2014.666H3.66699L3.53223%2014.6523C3.27187%2014.599%203.06687%2014.3942%203.01367%2014.1338L3%2014V2C3.00012%201.67798%203.22857%201.40887%203.53223%201.34668L3.66699%201.33301H11.29ZM10.5%209C10.7761%209%2011%209.22386%2011%209.5C11%209.77614%2010.7761%2010%2010.5%2010H6.5C6.22386%2010%206%209.77614%206%209.5C6%209.22386%206.22386%209%206.5%209H10.5ZM10.5%207C10.7761%207%2011%207.22386%2011%207.5C11%207.77614%2010.7761%208%2010.5%208H6.5C6.22386%208%206%207.77614%206%207.5C6%207.22386%206.22386%207%206.5%207H10.5Z'%20fill='%23426BFF'/%3e%3c/svg%3e",h3=Object.freeze(Object.defineProperty({__proto__:null,default:p3},Symbol.toStringTag,{value:"Module"})),g3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM6.71582%205.33301C6.78793%205.33301%206.85481%205.37254%206.89258%205.43652L7.9541%207.25586L9.00488%205.43848C9.04265%205.3745%209.10953%205.33496%209.18164%205.33496H9.79395C9.83089%205.33515%209.86769%205.34564%209.89941%205.36523C9.93101%205.3848%209.95694%205.41285%209.97461%205.44629C9.99224%205.47972%2010.0011%205.5176%2010%205.55566C9.99877%205.59389%209.9876%205.63179%209.96777%205.66406L8.50293%208.01855L9.94531%2010.3359C10.0071%2010.4354%209.97971%2010.5668%209.88379%2010.6309C9.84945%2010.6522%209.81097%2010.665%209.77148%2010.665H9.12793C9.05762%2010.665%208.99086%2010.6274%208.95312%2010.5635L7.88379%208.76172L6.80664%2010.5654C6.76885%2010.6275%206.70384%2010.667%206.63184%2010.667H6.04004C6.00321%2010.6669%205.96628%2010.6561%205.93457%2010.6367C5.90309%2010.6174%205.87717%2010.5897%205.85938%2010.5566C5.84153%2010.5233%205.83209%2010.4854%205.83301%2010.4473C5.83393%2010.4093%205.84491%2010.3721%205.86426%2010.3398L7.2959%207.97949L5.88379%205.66211C5.82198%205.56081%205.85112%205.42939%205.94727%205.36719C5.97982%205.3442%206.01726%205.33302%206.05664%205.33301H6.71582Z'%20fill='%232F913E'/%3e%3c/svg%3e",m3=Object.freeze(Object.defineProperty({__proto__:null,default:g3},Symbol.toStringTag,{value:"Module"})),v3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1162%203.07617C13.2543%203.20232%2013.3338%203.3804%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM10%208.5C10.2761%208.5%2010.5%208.72386%2010.5%209C10.5%209.27614%2010.2761%209.5%2010%209.5H6C5.72386%209.5%205.5%209.27614%205.5%209C5.5%208.72386%205.72386%208.5%206%208.5H10ZM9%206C9.27614%206%209.5%206.22386%209.5%206.5C9.5%206.77614%209.27614%207%209%207H6C5.72386%207%205.5%206.77614%205.5%206.5C5.5%206.22386%205.72386%206%206%206H9Z'%20fill='%2370706E'/%3e%3c/svg%3e",C3=Object.freeze(Object.defineProperty({__proto__:null,default:v3},Symbol.toStringTag,{value:"Module"})),b3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%202.66667C2%202.29848%202.29848%202%202.66667%202H8.22957C8.49499%202%208.73512%202.15744%208.84095%202.40085L9.92791%204.90085C10.1193%205.34115%209.79664%205.83333%209.31652%205.83333H2.66667C2.29848%205.83333%202%205.53486%202%205.16667V2.66667Z'%20fill='%23F9B13C'/%3e%3cpath%20d='M3%204.50008C3%204.31599%203.14924%204.16675%203.33333%204.16675H12.6667C12.8508%204.16675%2013%204.31599%2013%204.50008V13.1667C13%2013.3508%2012.8508%2013.5001%2012.6667%2013.5001H3.33333C3.14924%2013.5001%203%2013.3508%203%2013.1667V4.50008Z'%20fill='white'/%3e%3cpath%20d='M2%204.66675H13.3333C13.7015%204.66675%2014%204.96522%2014%205.33341V13.3334C14%2013.7016%2013.7015%2014.0001%2013.3333%2014.0001H2.66667C2.29848%2014.0001%202%2013.7016%202%2013.3334V4.66675Z'%20fill='%23FFCB2E'/%3e%3c/svg%3e",y3=Object.freeze(Object.defineProperty({__proto__:null,default:b3},Symbol.toStringTag,{value:"Module"})),x3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM8.95117%208.80469C8.95117%209.45619%208.83123%209.99047%208.58105%2010.3984L8.46582%2010.5654C8.13575%2010.9898%207.68375%2011.2012%207.12109%2011.2012C6.86476%2011.2012%206.64525%2011.1636%206.4668%2011.083L6.4082%2011.0566V10.0342L6.56641%2010.1494C6.70723%2010.2516%206.88862%2010.3066%207.11719%2010.3066C7.40052%2010.3066%207.60577%2010.1907%207.74609%209.95508C7.89129%209.7111%207.9707%209.33189%207.9707%208.80469V4.84961H8.95117V8.80469Z'%20fill='%23FF4D50'/%3e%3c/svg%3e",w3=Object.freeze(Object.defineProperty({__proto__:null,default:x3},Symbol.toStringTag,{value:"Module"})),D3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13%201C13.5523%201%2014%201.44772%2014%202V13H3.5C3.22386%2013%203%2013.2239%203%2013.5C3%2013.7761%203.22386%2014%203.5%2014H14C14%2014.5523%2013.5523%2015%2013%2015H4C2.89543%2015%202%2014.1046%202%2013V3C2%201.89543%202.89543%201%204%201H13ZM5.5%204C5.22386%204%205%204.22386%205%204.5C5%204.77614%205.22386%205%205.5%205H10.5C10.7761%205%2011%204.77614%2011%204.5C11%204.22386%2010.7761%204%2010.5%204H5.5Z'%20fill='%230956E4'/%3e%3c/svg%3e",E3=Object.freeze(Object.defineProperty({__proto__:null,default:D3},Symbol.toStringTag,{value:"Module"})),S3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208C14.5%2011.5899%2011.5899%2014.5%208%2014.5C4.41015%2014.5%201.5%2011.5899%201.5%208C1.5%204.41015%204.41015%201.5%208%201.5ZM8%202.42871C4.92298%202.42871%202.42871%204.92298%202.42871%208C2.42871%2011.077%204.92298%2013.5713%208%2013.5713C11.077%2013.5713%2013.5713%2011.077%2013.5713%208C13.5713%204.92298%2011.077%202.42871%208%202.42871ZM6.19434%207.36523C6.2548%207.30503%206.3537%207.30487%206.41406%207.36523L6.68262%207.63477C6.74275%207.69515%206.74275%207.79314%206.68262%207.85352L6.30371%208.23242C5.89985%208.63677%205.89974%209.29201%206.30371%209.69629C6.70813%2010.1005%207.3642%2010.1006%207.76855%209.69629L8.14746%209.31738C8.20788%209.25744%208.30591%209.25726%208.36621%209.31738L8.63574%209.58691C8.69582%209.64722%208.69567%209.74526%208.63574%209.80566L8.25684%2010.1846C7.58294%2010.8585%206.49045%2010.8582%205.81641%2010.1846C5.14239%209.51056%205.14239%208.41815%205.81641%207.74414L6.19434%207.36523ZM8.27441%207.27246C8.33487%207.21231%208.43282%207.21214%208.49316%207.27246L8.7627%207.54199C8.82268%207.60237%208.82273%207.7004%208.7627%207.76074L7.76074%208.76172C7.70035%208.82211%207.60244%208.82201%207.54199%208.76172L7.27246%208.49316C7.21217%208.43285%207.21239%208.33487%207.27246%208.27441L8.27441%207.27246ZM7.74414%205.81543C8.41813%205.14189%209.51068%205.14173%2010.1846%205.81543C10.8584%206.48938%2010.8583%207.58286%2010.1846%208.25684L9.80566%208.63477C9.74528%208.69515%209.64736%208.69505%209.58691%208.63477L9.31738%208.36621C9.25716%208.30593%209.25744%208.20792%209.31738%208.14746L9.69629%207.76855C10.1004%207.36418%2010.1005%206.70805%209.69629%206.30371C9.29201%205.89962%208.6368%205.89978%208.23242%206.30371L7.85352%206.68262C7.79319%206.74294%207.69523%206.74271%207.63477%206.68262L7.36523%206.41309C7.30484%206.35264%207.30481%206.25476%207.36523%206.19434L7.74414%205.81543Z'%20fill='%2339B83F'/%3e%3c/svg%3e",k3=Object.freeze(Object.defineProperty({__proto__:null,default:S3},Symbol.toStringTag,{value:"Module"})),B3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957Z'%20fill='%23675FF0'/%3e%3cpath%20d='M5%206.81818C5.12597%206.81818%205.22541%206.79021%205.30497%206.73427C5.38453%206.67832%205.43757%206.6014%205.46409%206.51049C5.49061%206.41259%205.50387%206.25175%205.50387%206.02098C5.50387%205.79021%205.5105%205.63636%205.51713%205.56643C5.53039%205.44755%205.55691%205.35664%205.60331%205.28671C5.64309%205.21678%205.6895%205.16084%205.74917%205.11888C5.80884%205.07692%205.88177%205.04895%205.97459%205.02098C6.03425%205.00699%206.14033%205%206.27956%205H6.41878V5.32867H6.34586C6.17348%205.32867%206.06077%205.35664%206.00773%205.40559C5.9547%205.45454%205.92155%205.57343%205.92155%205.75525C5.92155%206.11888%205.91492%206.34266%205.89503%206.44056C5.86851%206.58741%205.81547%206.6993%205.74254%206.78322C5.66961%206.86014%205.55691%206.93706%205.41105%207C5.59006%207.06294%205.72265%207.16084%205.80221%207.29371C5.88177%207.42657%205.92155%207.63636%205.92155%207.93706C5.92155%208.2028%205.92818%208.36364%205.92818%208.41958C5.94144%208.51049%205.97459%208.58042%206.02762%208.61539C6.08066%208.65035%206.18674%208.67133%206.33923%208.67133H6.41215V9H6.27293C6.11381%209%205.99448%208.99301%205.92818%208.96503C5.8221%208.93007%205.73591%208.88112%205.66961%208.81119C5.60331%208.74126%205.55691%208.65035%205.53702%208.53846C5.51713%208.42657%205.50387%208.25175%205.50387%208C5.50387%207.74825%205.49061%207.58042%205.46409%207.48252C5.43757%207.39161%205.38453%207.30769%205.30497%207.25874C5.22541%207.2028%205.12597%207.17483%205%207.16783V6.81818ZM10.5956%206.06993H7.22099C7.04199%206.06993%206.90276%205.91608%206.90276%205.73427V5.67133C6.90276%205.48252%207.04862%205.33566%207.22099%205.33566H10.5956C10.7746%205.33566%2010.9138%205.48951%2010.9138%205.67133V5.73427C10.9138%205.91608%2010.768%206.06993%2010.5956%206.06993ZM10.5956%207.3986H7.22099C7.04199%207.3986%206.90276%207.24476%206.90276%207.06294V7C6.90276%206.81119%207.04862%206.66434%207.22099%206.66434H10.5956C10.7746%206.66434%2010.9138%206.81818%2010.9138%207V7.06294C10.9138%207.24476%2010.768%207.3986%2010.5956%207.3986ZM10.5956%208.73427H7.22099C7.04199%208.73427%206.90276%208.58042%206.90276%208.3986V8.33566C6.90276%208.14685%207.04862%208%207.22099%208H10.5956C10.7746%208%2010.9138%208.15385%2010.9138%208.33566V8.3986C10.9138%208.58042%2010.768%208.73427%2010.5956%208.73427Z'%20fill='%23675FF0'/%3e%3cpath%20d='M11.5%2010.1265H10.8525V12H10.3677V10.1265H9.72168V9.73096H11.5V10.1265Z'%20fill='%23675FF0'/%3e%3cpath%20d='M7.55811%2012V9.73096H8.3418C9.14746%209.73096%209.55029%2010.0996%209.55029%2010.8369C9.55029%2011.1875%209.4375%2011.4692%209.21191%2011.6821C8.98633%2011.894%208.69531%2012%208.33887%2012H7.55811ZM8.0415%2010.1265V11.6045H8.30518C8.53467%2011.6045%208.71484%2011.5361%208.8457%2011.3994C8.97656%2011.2627%209.04199%2011.0776%209.04199%2010.8442C9.04199%2010.6187%208.97363%2010.4429%208.83691%2010.3169C8.7002%2010.1899%208.52246%2010.1265%208.30371%2010.1265H8.0415Z'%20fill='%23675FF0'/%3e%3cpath%20d='M4.96094%2010.8955C4.96094%2010.54%205.06445%2010.251%205.27148%2010.0283C5.47949%209.80469%205.75391%209.69287%206.09473%209.69287C6.41895%209.69287%206.67969%209.80078%206.87695%2010.0166C7.0752%2010.2324%207.17432%2010.5098%207.17432%2010.8486C7.17432%2011.2021%207.07129%2011.4893%206.86523%2011.71C6.66016%2011.9297%206.39111%2012.0396%206.05811%2012.0396C5.73291%2012.0396%205.46875%2011.9331%205.26562%2011.7202C5.0625%2011.5063%204.96094%2011.2314%204.96094%2010.8955ZM5.46924%2010.8691C5.46924%2011.0898%205.52246%2011.2705%205.62891%2011.4111C5.73535%2011.5508%205.88135%2011.6206%206.06689%2011.6206C6.25635%2011.6206%206.40381%2011.5537%206.50928%2011.4199C6.61475%2011.2852%206.66748%2011.1045%206.66748%2010.8779C6.66748%2010.6416%206.61621%2010.4551%206.51367%2010.3184C6.41113%2010.1807%206.2666%2010.1118%206.08008%2010.1118C5.89062%2010.1118%205.74121%2010.1821%205.63184%2010.3228C5.52344%2010.4634%205.46924%2010.6455%205.46924%2010.8691Z'%20fill='%23675FF0'/%3e%3c/svg%3e",A3=Object.freeze(Object.defineProperty({__proto__:null,default:B3},Symbol.toStringTag,{value:"Module"})),F3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM7.71191%205.00098C7.95398%205.01182%208.23799%205.16198%208.30664%205.54688C8.40941%206.03464%208.27759%206.57316%208.17285%207.00488L8.16699%207.03027C8.37835%207.57951%208.66991%207.94773%209.11426%208.21875C10.017%208.10683%2010.5964%208.16863%2010.835%208.40332C10.9994%208.56776%2011.0484%208.87519%2010.9473%209.11914C10.8894%209.25831%2010.7357%209.48926%2010.3457%209.48926C9.95189%209.48921%209.37167%209.31384%208.8623%209.04102C8.40175%209.11875%207.8926%209.29278%207.40137%209.45898C7.2966%209.49512%207.18778%209.5311%207.08301%209.56543C6.3969%2010.7429%205.8824%2010.9998%205.56445%2011C5.48865%2011%205.4233%2010.9837%205.36914%2010.9639C5.24449%2010.9169%205.13813%2010.8189%205.07129%2010.6924C5.01181%2010.5787%204.98629%2010.4528%205.00781%2010.3535C5.1144%209.81502%205.83149%209.3878%206.36621%209.11133C6.65343%208.60533%207.04538%207.75431%207.29102%207.16895C7.09599%206.41389%206.98933%205.82132%207.1084%205.3877C7.17162%205.15099%207.42651%204.98835%207.71191%205.00098ZM6.18555%209.77441C5.99948%209.94427%205.76264%2010.1801%205.6416%2010.4023C5.74457%2010.3228%205.93444%2010.1394%206.18555%209.77441ZM7.73926%207.69629C7.60016%208.05769%207.39944%208.55181%207.15918%208.9873C7.23144%208.95839%207.30596%208.9272%207.38184%208.89648C7.69966%208.76643%208.05529%208.61975%208.44531%208.53125C8.17624%208.31804%207.93249%208.03049%207.73926%207.69629ZM9.73535%208.74707C10.3674%208.99599%2010.5185%208.91259%2010.5352%208.90234L10.5391%208.89648H10.543C10.5536%208.88933%2010.5516%208.88347%2010.5498%208.87988C10.544%208.87053%2010.4509%208.71359%209.73535%208.74707ZM7.72852%205.4834C7.67613%205.54303%207.68883%206.05251%207.77734%206.41211C7.8496%206.16635%207.86152%205.68036%207.76758%205.51953C7.75502%205.4962%207.74284%205.48532%207.72852%205.4834Z'%20fill='%23FF4D50'/%3e%3c/svg%3e",$3=Object.freeze(Object.defineProperty({__proto__:null,default:F3},Symbol.toStringTag,{value:"Module"})),N3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1777%202.67969C14.4553%202.7361%2014.6644%202.98029%2014.666%203.27441V12.667C14.6659%2012.9891%2014.4376%2013.2583%2014.1338%2013.3203L14%2013.334H2L1.86523%2013.3203C1.56164%2013.2581%201.33312%2012.989%201.33301%2012.667V3.33398C1.33301%203.01196%201.56164%202.74298%201.86523%202.68066L2%202.66699H14.0557L14.1777%202.67969ZM2.33301%2012.334H13.666V3.66699H2.33301V12.334ZM8.78125%207.39355C8.79747%207.40146%208.81204%207.41261%208.82324%207.42676L10.8545%2010.0166C10.915%2010.0939%2010.8601%2010.2078%2010.7607%2010.208H5.28613C5.26386%2010.2081%205.24156%2010.2022%205.22266%2010.1904C5.20374%2010.1786%205.18849%2010.1616%205.17871%2010.1416C5.16897%2010.1216%205.16469%2010.0993%205.16699%2010.0771C5.16933%2010.055%205.17865%2010.0341%205.19238%2010.0166L6.67676%208.12305C6.68788%208.10885%206.70253%208.09775%206.71875%208.08984C6.73488%208.08198%206.75256%208.07818%206.77051%208.07812C6.78858%208.07812%206.807%208.08193%206.82324%208.08984C6.83924%208.09768%206.85322%208.10907%206.86426%208.12305L7.47656%208.90332L8.63379%207.42676C8.64501%207.41261%208.65955%207.40145%208.67578%207.39355C8.69215%207.38564%208.71034%207.38086%208.72852%207.38086C8.74668%207.38087%208.7649%207.38565%208.78125%207.39355ZM6.35547%205.83301C6.51333%205.83301%206.66474%205.89619%206.77637%206.00781C6.888%206.11944%206.95117%206.27084%206.95117%206.42871C6.95111%206.5865%206.88794%206.73803%206.77637%206.84961C6.66476%206.9611%206.51323%207.02344%206.35547%207.02344C6.19768%207.02338%206.04615%206.96118%205.93457%206.84961C5.823%206.73803%205.7608%206.5865%205.76074%206.42871C5.76074%206.27095%205.82308%206.11942%205.93457%206.00781C6.04615%205.89624%206.19768%205.83307%206.35547%205.83301Z'%20fill='%2332A3FF'/%3e%3c/svg%3e",O3=Object.freeze(Object.defineProperty({__proto__:null,default:N3},Symbol.toStringTag,{value:"Module"})),R3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM6.1543%205.26758H8.1543C9.30194%205.26778%209.9998%206.03334%2010%207.08105C10%208.14247%209.29247%208.89045%208.15039%208.89062H6.93262V10.7275C6.93262%2010.812%206.86371%2010.8816%206.7793%2010.8818H6.1543C6.06968%2010.8818%206%2010.8122%206%2010.7275V5.41992C6.00002%205.33532%206.06969%205.2666%206.1543%205.2666V5.26758ZM6.93262%206.03906V8.12402H7.68066C8.54028%208.12402%209.0498%207.91372%209.0498%207.0791C9.04962%206.41793%208.66339%206.03914%208.01367%206.03906H6.93262Z'%20fill='%23FA8C16'/%3e%3c/svg%3e",P3=Object.freeze(Object.defineProperty({__proto__:null,default:R3},Symbol.toStringTag,{value:"Module"})),T3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.73633%201.57642C2.53848%200.774265%203.74473%200.714862%204.87207%201.03052C6.02182%201.35245%207.24885%202.09683%208.3125%203.1604C9.37624%204.22414%2010.1204%205.45195%2010.4424%206.60181C10.758%207.72909%2010.6986%208.93446%209.89648%209.73657C9.09439%2010.5387%207.88901%2010.5981%206.76172%2010.2825C5.61186%209.96051%204.38405%209.21632%203.32031%208.15259C2.25674%207.08894%201.51236%205.86191%201.19043%204.71216C0.874775%203.58481%200.934176%202.37857%201.73633%201.57642Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.76172%205.41479C7.88883%205.09929%209.09442%205.15888%209.89648%205.96069C10.6986%206.76284%2010.758%207.96909%2010.4424%209.09644C10.1204%2010.2462%209.37617%2011.4732%208.3125%2012.5369C7.24882%2013.6005%206.02187%2014.3448%204.87207%2014.6667C3.74472%2014.9824%202.53848%2014.923%201.73633%2014.1208C0.934528%2013.3188%200.874922%2012.1132%201.19043%2010.9861C1.51239%209.83623%202.25659%208.60841%203.32031%207.54468C4.38405%206.48096%205.61186%205.73675%206.76172%205.41479Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.1282%201.03052C12.2553%200.715012%2013.4609%200.774612%2014.263%201.57642C15.0651%202.37857%2015.1246%203.58481%2014.8089%204.71216C14.4869%205.86196%2013.7427%207.08892%2012.679%208.15259C11.6153%209.21627%2010.3884%209.96048%209.23859%2010.2825C8.11124%2010.5981%206.90499%2010.5387%206.10284%209.73657C5.30106%208.9345%205.24144%207.72892%205.55695%206.60181C5.8789%205.45195%206.62311%204.22414%207.68683%203.1604C8.75056%202.09668%209.97838%201.35248%2011.1282%201.03052Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.10284%205.96069C6.90499%205.15855%208.11124%205.09914%209.23859%205.41479C10.3883%205.73673%2011.6154%206.48111%2012.679%207.54468C13.7427%208.60841%2014.4869%209.83623%2014.8089%2010.9861C15.1245%2012.1134%2015.0651%2013.3188%2014.263%2014.1208C13.4609%2014.9229%2012.2555%2014.9823%2011.1282%2014.6667C9.97838%2014.3448%208.75055%2013.6006%207.68683%2012.5369C6.62325%2011.4732%205.87888%2010.2462%205.55695%209.09644C5.24129%207.96909%205.3007%206.76284%206.10284%205.96069Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",M3=Object.freeze(Object.defineProperty({__proto__:null,default:T3},Symbol.toStringTag,{value:"Module"})),L3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM9.91406%205.16699C10.0058%205.16721%2010.0799%205.24128%2010.0801%205.33301V5.9707C10.0801%206.06262%2010.0059%206.13748%209.91406%206.1377H8.64648C8.55457%206.1377%208.47971%206.21185%208.47949%206.30371V10.5469C8.47936%2010.6387%208.40525%2010.7127%208.31348%2010.7129H7.59375C7.50178%2010.7129%207.42689%2010.6388%207.42676%2010.5469V6.30371C7.42654%206.21185%207.35168%206.1377%207.25977%206.1377H6C5.90795%206.1377%205.83301%206.06275%205.83301%205.9707V5.33301C5.83323%205.24115%205.90809%205.16699%206%205.16699H9.91406Z'%20fill='%234089FF'/%3e%3c/svg%3e",I3=Object.freeze(Object.defineProperty({__proto__:null,default:L3},Symbol.toStringTag,{value:"Module"})),j3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.9568%201.33276C11.1238%201.33276%2011.2849%201.39651%2011.408%201.50952L12.3171%202.34644L11.6404%203.08179L10.8269%202.33374H3.66675V13.6667H12.3337V3.7146L11.6433%203.08472L11.6404%203.08276L12.3171%202.34644L13.1169%203.0769C13.2546%203.20307%2013.3336%203.38138%2013.3337%203.56812V14.0007L13.3201%2014.1345C13.2578%2014.4382%2012.9888%2014.6667%2012.6667%2014.6667H3.33374L3.19897%2014.6531C2.93875%2014.5998%202.73378%2014.3947%202.68042%2014.1345L2.66675%2014.0007V2.00073C2.66675%201.67864%202.89529%201.40965%203.19897%201.34741L3.33374%201.33276H10.9568ZM6.05542%207.31616C6.12046%207.25114%206.22568%207.25122%206.29077%207.31616L6.58081%207.6062C6.64589%207.67128%206.64588%207.77646%206.58081%207.84155L6.17358%208.24976C5.73807%208.68527%205.73807%209.39139%206.17358%209.8269C6.60912%2010.2622%207.31529%2010.2624%207.75073%209.8269L8.15796%209.4187C8.22305%209.35363%208.32921%209.35362%208.39429%209.4187L8.68433%209.70874C8.74934%209.77383%208.74937%209.88%208.68433%209.94507L8.27612%2010.3523C7.55026%2011.0782%206.37308%2011.0782%205.64722%2010.3523C4.92174%209.62652%204.92177%208.45016%205.64722%207.72437L6.05542%207.31616ZM8.29468%207.21655C8.35977%207.15147%208.46592%207.15147%208.53101%207.21655L8.82104%207.50659C8.88578%207.5716%208.88575%207.67692%208.82104%207.74194L7.74194%208.82104C7.67692%208.88583%207.57163%208.8858%207.50659%208.82104L7.21655%208.53101C7.15147%208.46592%207.15147%208.35977%207.21655%208.29468L8.29468%207.21655ZM7.72339%205.64722C8.44919%204.92141%209.62642%204.92152%2010.3523%205.64722C11.0782%206.37308%2011.0782%207.55026%2010.3523%208.27612L9.94409%208.68433C9.87904%208.74897%209.77371%208.7491%209.70874%208.68433L9.4187%208.39429C9.35361%208.3292%209.35361%208.22305%209.4187%208.15796L9.8269%207.75073C10.2623%207.31533%2010.2621%206.60913%209.8269%206.17358C9.39139%205.73807%208.68527%205.73807%208.24976%206.17358L7.84155%206.58081C7.77647%206.64589%207.67129%206.64588%207.6062%206.58081L7.31616%206.29077C7.25109%206.22568%207.25108%206.1205%207.31616%206.05542L7.72339%205.64722Z'%20fill='%231998FF'/%3e%3c/svg%3e",_3=Object.freeze(Object.defineProperty({__proto__:null,default:j3},Symbol.toStringTag,{value:"Module"})),H3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM5.77832%205.83301C5.87031%205.83301%205.94933%205.8983%205.9707%205.98828L6.72852%209.2998L7.54492%205.98535C7.56627%205.89541%207.64507%205.83309%207.73535%205.83301H8.26465C8.35498%205.83305%208.43373%205.89538%208.45508%205.98535L9.27344%209.30664L10.0254%205.98828C10.0467%205.89837%2010.1259%205.83313%2010.2178%205.83301H10.8027C10.8329%205.83312%2010.8626%205.84093%2010.8896%205.85449C10.9167%205.86808%2010.9406%205.88781%2010.959%205.91211C10.9773%205.93632%2010.9901%205.96425%2010.9961%205.99414C11.0021%206.02417%2011.0008%206.05533%2010.9932%206.08496L9.77148%2010.6846C9.74853%2010.7727%209.66957%2010.8328%209.58105%2010.833H9.05859C8.96987%2010.833%208.89019%2010.7712%208.86719%2010.6846L8%207.40137L7.13281%2010.6846C7.10985%2010.7728%207.03094%2010.8328%206.94238%2010.833H6.41602C6.32739%2010.8329%206.24857%2010.7712%206.22559%2010.6846L5.00684%206.08496C4.99909%206.05533%204.99796%206.0242%205.00391%205.99414C5.00985%205.9641%205.02262%205.93543%205.04102%205.91113C5.05939%205.88697%205.08338%205.86703%205.11035%205.85352C5.13734%205.84008%205.1672%205.83306%205.19727%205.83301H5.77832Z'%20fill='%23426BFF'/%3e%3c/svg%3e",z3=Object.freeze(Object.defineProperty({__proto__:null,default:H3},Symbol.toStringTag,{value:"Module"})),K3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.29%201.33008C11.457%201.33008%2011.6182%201.39298%2011.7412%201.50586L12.6504%202.34277L11.9736%203.07812L11.1602%202.33008H4V13.6631H12.667V3.71094L11.9766%203.08105L11.9736%203.0791L12.6504%202.34277L13.4502%203.07324C13.588%203.19942%2013.6669%203.37761%2013.667%203.56445V13.9971L13.6533%2014.1309C13.5912%2014.4347%2013.3222%2014.6631%2013%2014.6631H3.66699L3.53223%2014.6494C3.27204%2014.5959%203.06685%2014.3912%203.01367%2014.1309L3%2013.9971V1.99707C3%201.67508%203.22869%201.40611%203.53223%201.34375L3.66699%201.33008H11.29ZM7.36816%206.39941C7.65187%206.39959%207.84768%206.57468%207.95605%206.93066L7.52734%207.78809L7.31641%207.35938C7.24417%207.22007%207.15618%207.14756%207.04785%207.14746H6.19043C6.04599%207.14751%206.00977%207.21486%206.08203%207.35938L7.04199%209.38867C7.68737%208.10825%208.05967%207.27658%208.21973%206.93066C8.40557%206.5332%208.62233%206.39943%208.90625%206.39941H10.791C11.1471%206.39948%2011.2705%206.57449%2011.1621%206.93066C11.0536%207.287%2010.5013%208.46426%209.50488%2010.457C9.46874%2010.5241%209.41249%2010.5762%209.35059%2010.6123C9.1441%2010.731%208.88077%2010.6635%208.75684%2010.457L8.22461%209.28027L8.65332%208.42285L9.13379%209.43945L10.1504%207.35938C10.2175%207.21997%2010.1866%207.14746%2010.042%207.14746H8.97852L7.47656%2010.3535C7.43013%2010.5031%207.31627%2010.6168%207.17188%2010.6582C6.93438%2010.7253%206.68626%2010.591%206.61914%2010.3535C5.62275%208.28844%205.09083%207.1111%205.01855%206.82715C4.94645%206.54338%205.09114%206.39941%205.44727%206.39941H7.36816Z'%20fill='%23ED8E35'/%3e%3c/svg%3e",W3=Object.freeze(Object.defineProperty({__proto__:null,default:K3},Symbol.toStringTag,{value:"Module"})),V3="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%202.66667C2%202.29848%202.29848%202%202.66667%202H13.3333C13.7015%202%2014%202.29848%2014%202.66667V8H2V2.66667Z'%20fill='%234DC6FF'/%3e%3cpath%20d='M2%208H14V13.3333C14%2013.7015%2013.7015%2014%2013.3333%2014H2.66667C2.29848%2014%202%2013.7015%202%2013.3333V8Z'%20fill='%234DCE84'/%3e%3crect%20x='14'%20y='6'%20width='4'%20height='12'%20transform='rotate(90%2014%206)'%20fill='%23FF5F5A'/%3e%3crect%20x='6'%20y='2'%20width='4'%20height='12'%20fill='%23FCC048'/%3e%3crect%20x='5.66667'%20y='5.66667'%20width='4.66667'%20height='4.66667'%20rx='0.666667'%20stroke='white'%20stroke-width='0.666667'/%3e%3c/svg%3e",q3=Object.freeze(Object.defineProperty({__proto__:null,default:V3},Symbol.toStringTag,{value:"Module"})),U3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAV9SURBVHgBvVZfb1VFEJ/ZPS2l9cpFQypSEEMhUmKiYjQBoxDjm8ZoQuKjTyZ+AV9MrOAH8MlHE99rRKOvPgCSoAkalbQx1mBLLV4vpX9u2t6es7vjzOyevZdg5Y2b7N09c3Zn5jfzm9kDcJ9/uN2LZy6c/RAMfoCASFlKcoKAREb8H0Us/G89RH2v9OHc9gYvnQusDPnHU1Ajaky9jAbjGsQhijPV+6IjaVYdcTuY7QzyaT4ouyijU5k8q5hEC1JaK2KFo/ti6Kg+GWrnoID/+yUDmM9TDUxDG50Ssf5jL+SEtQGq98E9ECZDd6IGjWVUlgxjTlKMxl1nkvG+FMhWejtQ+HgzVM1Vt0n/dNfwRneZ/u6u4HK1Dl1f8ZZwV75Xqk1YDyX8tDan2iJirJVjzkZKv0jrkE7yQ5ONggsBtkJFnXIDV7bWYbnswLovMUQnE4mSKn7eMzAiijKhqAaCRIk06YAyUA2K+GDexUh88HwwkOO5Cg6dcxAghiYRNBOVCorhTXRSttZ5jZkVZmGkGmWDyWHCwAgDk8o5z4YqKitHlavQM/raWEKpFipTwe3OCiXMiD18cVYKZw71GUw8kpA0B4bhUGOUxPhiZwlLX8JDQw/S0V378NbmKsysLmTdzjr6q3UTEqJM2x71YkhrapkzZ87kN6m+YKPqwvMPH8K3Dp7AHWDB+0BvjD2L7xx+GTrdDUFPnsPsXQUyF6yzQMOzASszD8syC7JGKgySlZnlZmpqKuJlgYzABtfLLZi5vQA7i0E4vfcYPNHYiy8+MgEXFq/B9U6LwAckz1kNknLCAUyK1Sgb0rUFMTTAT1FuUR1IISXNX2osHEv4sf0HHGjsgVfGnoIju/ZBm0P5+exl4GRq1IwxylIpZKNpjQyJvYawl03IsyxNMthrj0IOPtKttuDb+Z9huNgBR3ePwdTv38GtzTVSbYxKB0UFBcRw9oWOYphl3RsSZjMxMVFTVLwUpKBM9R72jjRz8o/tPgDkHBsKrBplsHJDMhfGyICCDIfXinFUGePnZ7QxvyhhNtPT01TnUPKh2LksmoPDcOLRCbg0/wtMt+fgpf1PwrHmfkAuF84hyYye1y6gGLIcxQFjhSg5Z2JEUEUyJdIcP3481yCm6jD88Prhkyo/f+0ifPL9F+rUu0+/BlyUXHwVUOl47blgvTLTMqKovGYsZCNMquiEdJpGo5GLRq8tdn589z4YGRyCK3PXoL22RJtlF7+ZvgyvTpyEN4+8AOdnLiKzhkPMEbYVrP45D3UtZyXx4r7j+hWyFZ1OJ3ca7jBSF/Db0hx89esFuL60KCiQ80mfXvkSPvvha2QkYG0BwTA6g4IY2SPlpehlMKJD25sYDdB3pbLJ4urVq7JYYWkzukHabYQ0xIO9AMmTvhMDhlQkiqUU2uUSaalAuhQ8xXaVvj8wrrG/tQGjfG9oeOh9fvGYZaWDpoAGk6a58wHpMjAyMKTMNZaTzmetEWoYcOTpRmsR0VGqvxxZzLdwbpqxt9e3vh0dHS3Ksiz8iLfh8WE7ePRgS4mkpR0PxOqm3AkZZfIbIzyT+mhKXuh94UB6odpgfHwcWq0WFUXh7aD1uMGcCHyefTR8ynBk5ZnvK25rJCGUZ+46rMHJHGU6BK2TNMg5VlBJCcm7gLJX3Z+dnSU26tvtNrOo8J25m1tCdzEkSrjuJI9g2Sgb4YGqUHpqMqQzK48Gs+HsAGGVnJJwQq/NxW+cMcA9p5/bkBBJ7vRa096AiXlBc8j0SV0R8ydAok6ug97HaYyp1LicksF4wJ06dcrBAnhG8REqKlQE0kmUjYy2Ro0+hlU7T5LXSKFGKmdiiIkcnQXoK9nJyUkjow9tP/I8+vboOcqEvPfvX+6cfN20TwR9AAAAAElFTkSuQmCC",Z3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVNSURBVHgBvVZLbxxFEK7qmXHWiR1siwNIFnmAhDAIlERw9gFx4J57jty5IIRk5Q8AF/4Cl/wJCyRuFhJInALhsQRC/Iqza292Zrr46tHrjSVzZLS93T3TXY+vvqpuov/54fM+fPTV9A5R9TkWrAoJ6c93sDAJC7GcrhYugiSEytzE5/wAW+8mOvdJWyR5lVyZa+TnlHgTUZEiGGZdJ/Yj//Pe5/lazvJlfa4+kavmhZg34U8Oz+zHc2vdbVg0c42jdy/tH69W/sNDtTuzmsfmhRtv5uogRLvXsUby6XsJu9j2cJmfq1CyzM9ctm0PkY5TGBOj4ljRSYazGxvI+GKRO5D/xbSllfGE5GAkvPuEZPco8/iEaNpDf36eYCp9NCF61hHdf2i6Qrmb5dgXQ3lmQIkhCEIr6lSXidqOZTzpeXQi9GQMoa2bp+jynAs6v7xoH4w4M6/CHTcCPy6cI1OoIq66JbpXuIfSHvzozQDhtg8a+KaiWKSAFFg6n4071jMb3wrxzKCi0B54yEsDptUlKOqFH+6RqLdtJ5yDAFzCED5NO6G9IycTG03tG4cNbEQLoOWsQjW5Sk6otWWmFoFDXHnaRY7RLBRcAtP3LMNd85yfpwwXoRxstjf17du3TZF6gMSko3Gmtmf66XeRHtYbvJJEey4CFKrs1QXQU50iuFywDpQN7TSju+pM9+7dm5miz6TN9NdeT+OTzHDQsyBn/uCGlxmosTjrOMe4qaG0ZrG+0pZinGShJm4qogZ9jb7e2NhIGtweMeuyW5bxN7hgrDDDN9+u6M0rjHgRf/sjEE1aWMx8TsjkKkF1qk4pLMKzSJfyEN8sLQClbjRaaIBeWq3ojSsJZOjk2suJ37nu9eHGqwzPRb7/JXsNgwyEnNQbl5fmCp7XmFksw4A6sDWSwVVAkPjFy4k0z9+/2fDiwlzlx/Pu68R/7DHtPQ32scOoMBHDEK5kPi+NXBJFLojT5JynIAWSXaAgUSkAXa/eE80Xf32Ojom+3u5RgZhWLhF990MLwYkM3yK/GOl5IjPS3Lp1yxfB3sUL+qZQ6HRP1N1ZW75I9OF7iSZwZYoXhSh10jE8wLyxdyCSjgthtC0vL4unhdDJM5GDceZHhz09PMj0z5HQ0+MsJ62wZwOaCU6oPhUdI0cv9om+2cf+EiYPj0MYZJlDR+rhcKigI58yHT/LfDhu6dFhpl8f9zTcy7Q/6vmkjZNAI1RVsLYhkFIwpgnYPZmqBo1f8srpRScALSeHBZPr+/cX1KBDseINxSigLYLYou+0Za+nookPSuLgoJ4zVaAJdNLfRyw1GJZPi8nsQsLlDGX31tJiY4No/2D0yeDi4qfY8AocoEHDtDRIdBmxUrYudlAEIxJIoTLrJpHyQ4vAn487TlkPVgluBLBW4kt6zOxgBmmaneFwYbl+azB4Ya0ZpaVmIV2qF29+9jPY6/nq9ordnwwYVQyNCWyAn5QaZymnucvT7Nzlsl9KHq431/PweNSmapCrBeq7BYSHKiCYgtUeP8kclT9Kda5EEzDqBUc+u54o2XbrsNPDa2+9s7MDQF7L6+uTdnhcy9pot9+Xjtf6ZDGbFYwcSg2p5PPk156gcOTc/NWkpGI5pcLDzc31fnt7G9+Gsm/L1vGhOQQaK3qCGPtIJSc/EoNAqowC3tDjmEfyc7mu2W1PlacHCRZnKFOSoa5Qt7m5idNv2IF2H2Pdb0gCi16FspsyQM7gp1Q6VqZSjeOngrwKErQZgZBiPsb5qnXavvEBytbd4rnRdmtrK2kjv82leJ/Otrk17GyQc2/wZ59/AcalYkfFCITdAAAAAElFTkSuQmCC",G3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVbSURBVHgBvVbLblxFED3V9854bEfEeeBEJkROogjhSCDFC7Zs2LMJ66z4AhaIjZUfgB2ssgYpC8QfZEeQiJBATAIisUGJE5yH7Tjj8X10F1Xd1deTSAZWGann9vSd7lNV51RVA6/4Qwe9eHb1q8vk6HMwjuhv5vgN5xzLh+KP/zrH9oBIxyp5XDkQ8PnVL1flv4vpNOIAFnwyXCZdU5gILuuYfE5iGp59tsqDAMmHRVIAPVx2uMC6kWwt2YHOtbQeFIzzSnIOHA2O5wBzBwMG3RgUQ+1MRrJOOJo9YYyFWM3K68hoKQiByYDxL4De7OcUEk54McDp4OQdmzGIjkvYxUye2GPTiNgZznxZvr5A08yhGjPv7BC2tzk8e0bYGwNtK1jhJW5k/94euG3BD9bZFs2KzOlLHMo8e7gib+bkUMDLaD37vTFhPAaPnoObmpI+Ep/I+hMjaDAtfPsU2hQGYzCGVr8py1m3lha3RVuK8WYJp3DIdP48uTfehP/xB/i1u0miFJ2LhMWDQpD/ynDO3E5y4cR/JC9xGvnoAHOYSL0M3oN9S+Wx4wgbG8CRYwi/3VKCOLBRlzOx14Pf2rRVJTjqxdQ6AWcvXgDUiRIOFUzbsHBKNDeHsL2lYY071STLtXi4a/u8u7GeEgP7XBlgNi1JTWbu0qVLLwpBmZAQhbZRy0H9PtpHD+GbGr6tEYRP8Z5Z3nMjQ6IRjDrOjmQns4CSduLr8tq1axYM0lIim4McGAHJjXZSXCRsCgBXxDwLpsBYgdo2VRhYEiLjmc5cTAjOIXXZbw2TJbCqD0pWefoMtev30H/nItzR47LmRR+aHpT0Z2VMGNc6F2udjmBJykm6KZMtGTOH2UqVacQvT50Gzcxi9O03GFx8DzMffkTN2h/GBlG7dgfN2l3LApf42a9r5lIWTKaWyC0tLWUCk88W8d6Zc2j+WkX/rSX0FHxqSuYX0Fs8B/SnMHj/g0xNdEy/vMZYabF6mHh0MWrqtSKUw+Ewpyorf9Qr5dCzAjBAeXIBKArsfn8d/tHfKOZPYurtd8WYs6hu/QLvGxVQKliq2FS/ctpkPjvxqJDL5eXlzkMVRSFc6eYw2sH2d1+jfSJ5WFUc4/HwHo9/vilxcUlM+vSDeHBhVazrf1bBmZI1ynhALm2aCjKchCoXvt2fbsDvSllra1FiRVnzTpM/isDFc4q6ws7Gr9G79A9rRlkbmGBV3pTj8dgSRfBDUlJ15zZqSeaYi5L8UgCsBzIpF6RgUQMO1NbUShF3ia1c9KjzzoqANTkqMRzqqy2pLnPt8y20Tx9Loj8QMOEmpBEkHbTkWStQWHNF8vXxBnMTdMWqTcjSs/LHXYeKiX9BVDp6+vTT6Znpz+Tk09FIKcSFiIZnDsV8pEEdi3THjXiWCrfn3fv3ietghuz3Be6yVDeF/U4ladFfLp/05o8enl4Y9acHZZjqzQS33NDtmORWf50y47p2HrXhjDOHNC+cGhJMN9bQ9oUa5+UFs2lvd8RuULRNqMj5vguNT+0oNSGEeLuw61pXqLW4cO4PEla2/3Pu7d1FhNMNA+Wj4TC8fupU6M3O1huHGf09ucxhU94cQlSiAVpAKDdDuzCkQmlXOGf1xPrOxLb9C2N5XSYfnzjRrq+vE540tWQhtl7zLsyGbTngsBQDFFaw7dwkIOMz3ZQSAJunE0BmGMhiu+pWVlbC5s2b4cHCQnNj/nE1PT9f/R42KxHnJ1T7Pwtpi6g8ObnWQNRIIhBqZMSnnN+KqhrPQX6LWqHPUMm8TiOoglVUTdiUcQWcm6k8pTcWOkwDuZO4l4cYOfk+U/u/Pv8AUhuD27A+V7IAAAAASUVORK5CYII=",X3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfnSURBVHgB7VhdbFxHFT5n5t7d63XWJnYc167Jj5u2wklDGlciVCJsKUKRAuoLFvAQflRQUQNURZWQ4KHNC1KQihp4QFRFiEgIlaiVEBWPlYUoVUvskASHiqaNg62k+bE39np/7r0zczgzd3e9dt24uwkv1R5rfOfOvXfm+86cv1mAtrSlLW1pS1va0paWBaF1afyWap33vvfIfZJKnwLyR0FSb+/WXT76pRmNdNLo1L9STz43CbdRsJnn1NB/puHZg4e+0DHSCY8GKA8ZjB8gfoL8MqGAzXcNA6KsT0cCzyiEY6/NnT3+0JFxBbcouN740w39navfHwPYd8fDD3ao1DHW8P0ImkEb93mdwDATEAKW6SdTkPDfQYNfxief+yfcZgK1MWTwcI6vI7kcj41Dju/Hr4KAnSPuyWO9B75FwvxcAGUIE9AWqJuAyGob+rfvABCYzIrucX0BploBKX8of/DLX8FtIuDurdZrwOdnZ+WNTMGrKIOpSIvaiz/aP/rtnjQ8aywMcOp2jXkwQ0uC//PbA8N3g+ErCh6zz1ctaIkblN/xnvjFC3CbCDjN53I58TuY9gZ3fL770OHDn2AzCKIoEqK8kElfmb47/faZHwsyG4isSjWgIat0VrZ2k4TzefAqRRjYvhVQsg8Iw5QQ1tp0AlHUOn3Af+rZv8EtEKhr39r61NiIfG3icsfxV089PLB16zZjDEIcynjm/BZz4a39VJi7V2uTMloxeLZ9wztBtm+ANO8LGci/OQ5DO+4CKTy3AwI/iIB1bjEpgvAz+NjzJWhCROONAz8G2Mems/j6ogw85bONZhgObwD/LxcCfe3KkCot3qGU9kmxtpViwDE3DiixBsMNeEzwX+SIWMew5IzbobW1yOSM2RtHmUehSakRwPrcJwD+UxjHrn6NJgo8o5TdfwKLby6fVYvXh0jIbggCpCAAzZEGDQM2muzVNsOEtIrBbooxycy0bsQm8JT6OrRIgGrT9+UAN5ZHsNhrUFN9WLP5GFq41o1LC73ZA19JdX3xG9D9yDfhY2PfBbFnP1AUIcUMOo74bcMaoWRSShzVESDhgqnBhgUbCCCoB8JjT+2CFgg0TJdzAX971IvpwO5uZMNMFJfLQItzXapczlpTXnz1Fci/8FMo/PXP0Ln700B9g2xGOgHPO4BsUmw0kCS1xPbJsamF2dVQ0MGRUNwHLRBw051zs4zDhqUIl7o0pilARWhjZ2jCElGxkIGokkoSleJKwUD89jnnvNDZxQRY+yoCo0Jw/lEFRjW0VUNFukkGjYNRaIFAPeNm70mum8Aqk9gSFOuVVRrHOqoseXGlLKxTcuyG0E9Dau8+BiQhunSBuYVsaRWI+RqFJdBW24YSwCaJUFj16Q9qHKl6oQnxap0jrMc/8joTEwCprMJilZBSRkuQYbkcqahY1NFS0YX+roe+xEnrIET5G/Dey7+B8MK7YHkmYZWRBBHk52/A1OQkBEKC+6i6F/WiotqhhkSNJvChCfFW3HFtM8o4CtsA3pg12GFfwFiB1qiEKcdKlSrlio0tMPPib6Fy7u8uZLrY70IOh1HWNCjWOvsCKG420yblkQMuquaz7OANRFwrzkATstKJTyQ309MAGZ+XynDoNMjGLkP0PN4Ub96YuGwRCQ6TIorARh6KYqI46XPwZx+osPnFDnyCrOq8BMs70OgW1WYLDc4bJ6EFAitiQn+HR+VFSVEFSbDyeSgKunsKXpC+xEvkdaFA2tp4rFwC44bWaY0No+zEdgyjuK6XhiyzjnBCE6mz0IR4qwcK2UYyZdBCOwIy5UfYvfG/nhdc/PfPfrLFD8sZDhkubFq7J6NcCQH2deu4ouaZrCN28pWxE9cErxHP7H3p5CloQlaUElPVFZYupqiUnyctORmHoSPgbegs+4P3zIqg46yvy9c5axlnPsq2yPmCbXYn7A4YDqm1KjpJWtWq9WZizDFoUsTqgfFxcIlscNgzMvbU+dNTJYhLzro7hu6c97LZKTJiOg6VotDafcjArekkTdtIxGMCjauHkgVMdfa1izlw1PD8n/Ibj0OTUj+8WN08U61E86OjIpWdk68XRPpSYWHD58a+NrCwWPEkxbLTUKq/cGVkKF46iqQ7XdGfOB9IexawDmuM2wGfE10ak/PMGrqqAnerV3w/tW/Xi2+ehhYJ1PpocwGbEg6OAl4aGPArlzv8q6aUwpLvi7QRNrn53A4O93+1B81Ri2v5JEbuGCltY/CWkO2/f6ll8CLh9vgnXzrV0qlMrh6wh0XeBXj3Xr7ObqHunsh0dvXoXl/EPYRx50YR3dfphfMlf3Kgi64FUuz3kYMsI/FY1Z4DzZWlO5Mlu5Ngfz8B5lZk1z285+XTz0OLctMj5eM5wGwB8OrmHU5Rb92oiKEhTrJlXf/uTuzbzch/zwXbcK1ormnWxvXqSbMhklIyLnASQnxizysTTZ/CGkWuRSDH1z6+/mUaIM87Qfl5WCzOU//SEMHmNM2GkjZRiq6VBJyX+nIm9H6d9uVF/nqbBOx3SQmXCdQmtiW2EfQPrrCOzmyS3//sHybegVuUm/0qUS/waj+nWN9wP01UxXbHq1eo9g9m99zvS72TrWrUKP1x9oNYo7wuJU3w2fiN3ScmmkpUrRBYMU7Vm6dh3SNVXY4sf1r/HtZNAq3JhwX1ocGvkv8L6La0pS1taUtbPjLyPy268QDdSiqgAAAAAElFTkSuQmCC",Y3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAATKSURBVHgBvVZLbxxFEK7qmXViW7acYA6WIsHBUiRLnCzuBq5cfedXcEHCPC7cOPET4JYfgbghTAQHC4EvCBwrD7/iXXsz092VevXMrGUnOWWk3pme6a6vvqqvqhfgLV9404ePfzz6KgN+GRCRiAY7kICIf4D4k73jObwWSczkb25c+NFPJ1kMidFMahEVzAEE0D3GGSdeQUKucOMXNzDDTt75XAx3xjswoQHXsns9YPF+cC+sZoz43dYQYMAZSN0zCPkrAa9zoAMfMJ1x4AanBynQzZ9xnr6/jLAyboieTBI+Gmd6zPfnU4IpZzPnWWEI3vOG4KIF+ONZIqDeXsnpdQ7Uft/h9SuyJ2aAhgEmLzKDZTjhcdkSJjAjnKc+tDxfnQ9FpTTwxtLpTqA7KA+1e/W+82flZsw5q1ooE6SUMTGBDIbUKRJVkWCBFGuhxNkE5KDlndqGHtCuTKqyHiiTjsjPto1EF+qxc0ps4WLMcbe5lqYuUUoFvEAOANGtcS4lYXBvuablOcBxG6CN7IBr5HgS4Z+jBsq+NAI6fnomZJDUyjC2AD0hQ6i3t7cByiKlx6DM8P67I3xn8TZcvf5+8gL++mVqomBTKXEoc+7k6BS7UFiJlrBbdGoOc8sYdMFqORq3+OisgYOTBp5NIt27M4effnAHHjw8oYcHF+rYySR78SHdXajwwe/HpSbVCQmSMbNUK/6VkEpqrYuQMW2bCOfjKTbz5t/ltMHTs0ugEHhJRRCC5lzZ5IRB3mcoTJ0vWUYH5VoAxTdTH+9imfKIUKVIyMZkYUg8z5ESb1HXlYbRCaSCA0ukdzsglxiUUtF99cbGhs9dxhKCnLggI4TYMtDIosXvQttgqthk0KOCkdDzXihk9juIK4heMKiRE2DzpN7b2/N0lO5QjGQNVakjrhFWCDOnhCmwUUxiGygilI5dsSfUdRgqpWFtXb1ArDc3NzvG/l33iFJTTGzfQirNIMbEcBFzhRorwopozmtOmOVSclA6nYoGrQ/wmwz10tJSJ1s9a3mTGOd0QW4j5JTtK99T02KsghBHSw6DzxGc/fuYbVfFBuTuaPQm0Zck1efn5yUE0tfsOZMykpb2658H8PNv/xNnFBLWmGJEqiRbQZOXYsA0nYImlN+pbrQIgpVEd0CiiWZ3d1dmpzxWuvNUQ2gNgDucMJWMQQ7MHBKIX9xxdfHT4wvi3mddJthhaHVo3LzQurarpwWz/HxhYfELfvtezT+36gCLtypYnh9BbkZwe8TtTfwNNbTIW6pac9Qmov8Ojhg9qk3u++CNxsgNjsDS09FBKx96IN9fXcXTD787q1iCtfoup0XFgkGMWUIb/OBAOyXUZgAp/uyc0LREs4AZleH6+jrs7+/T2toap47dZGWKMpIcSh4cDiVGCpoR8nBqyeuz5Y7PFehThl78vYAK3cJO3WRQPDw8hLuf/DCpgme0dBUJmwfGXA/OUubhyknhM8K+2/CknPjZw5kFTPlLaVB/pnrdaseQErH/pCIiyZuEOBljz1NXj11PNcQg57oDJimsra0tuSfMzbeRu4uWh3YcNp5abrFROlA3RMrcHHjwnxsfvA7IBxcv2rMcqunrIX/c2dkJMpxtr4YrY7DG5P4m/7z9egkURHiCa3UU2QAAAABJRU5ErkJggg==",Q3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVZSURBVHgBvVbNbhxFEK7qmdm1ndhZm40D5M9STCL5BFiIq+EJuPiAxIGn4IKE+XkAngIE8gPkCDxAIKDIUsBEjmMR23H8u/aud7urqKrumd1FdsIpu+rtmZ7p+urnq68X4BV/8LwHH373/EsC/MIhIjMP7EAGZvkBlkdxTe7hpUhqhr4+98UPvt8jNaRGic0iGlgCUMDkMQ458YIg9OPOfZIMDEWna+leDVfGKzANA86M7uWApfcDcxnVkJE0x3cY0OEQpO0ZSPkLAc9yoAIfiHTIgXOcHiiBbf5U6vRt20Oj1WXePg74T4t4S+bDDkNHqkk0TAzFO+wynPQAft8JDNy3V9b0LAfyNC/J+w3d4wmgKwDHpyRgBHsy2j3GANGI1KmfWrlvjrqSpTzgTSxncgKTg3qRJ69mUvzCXEIiMrYwMYRAGCQAgohUMRKNkRATqdZcmedIoARarplt6APGD7GxrA9EbMPLddzGygvzOMUUxMJJS/Ie76017RULqQQvIQcA9T4XJy/UUJgkEQmQ9wHuTGWYYQ6/PT3ldo+Mc+/fGMHdE8K/dk4hFMC7zw40GGSzMpjblDeACtEtLi6aMxp5ngFMjWUwmkmzS1oFFD555xJ8/PYE3GpkEHoB3rzoUNfeu1qDIA5JBiQzOgROhwZGEO/VMKn3OlizA255eblKgg/Rt4kRByRpvHEpckoju/1aYQ5cHc/spfsbJ3IvZfYeXQSJqUve2zUhOyUaa+yskgX53Nyc9qLUirEj9BwpnKTVmedzr0vqjr1Qn2D2ch2p5+HqRHTiz81TZqkzkBSAAjqnc9V4qf04BjPQri5yhVH1sic90ekGGB/JQOt3bbKAJ7un8HCzDdcna1DPkW9fqdt9q91DATSCOY4pNIT0tUhjGuM3goDr3ryJxkphqGSI2xJlITW81ihgeryA++stuPf3kXn31lSO1yfrsP78NBqjmD9ITBRDmGhuDaExOa2W9pS2ifJk9e5djg0oGQoB9zoeJi8WMDs9aiAPN1q81+pZPj56t2lrvz464tCV2im55JGjaD2TXuRKYbhsjSjrbMcZag2T7KqDIKkKSh68dWUUNnY6sL1zjMc95pWNI5y5fMFMPXh8IMYVQSjhXdyt9KCy5aBUOtMHjDpglM2np6cpiYwxtedFP0Ugp8ZrAtjWWjJ1Az5YO4S5a+Owsn4E1JWwMqcsRO46OHi8JbuzqvOpOhqTSPRbkvPt7W091AFL2ZXHv/yxBY82TwxQmInSIvzDT+vw48/rxsbcwBxjpu3j0bc72tJixLEJgCmA4xgZQ7/xAfOVlRV9dV9QG5omTZAzt8jyIlQU/ZJQtLlNsShGozmStWd7Xorvo8o4V7ZiWbxS6CvZzefn57nVan1W1Mc+zzO8WRN9G6vnMDFWwOSFYHQfqwVQUXApDUWWgdhWAeGNp/ty4c2m6D5g4oMFN3AElpqOScCzZvNOrTsyU4SiXtBEIx97Y+EJKb0xHRJKgJiuUoftgIg/cWi6KcWEUb95GJDQZGN2dhZWV/dpamrf48UmB96U1HvEakfU9xAiE2xBLyiTNwJaflH7OkC/ZHa0IAwQCFJ0vLq6yjMzM2Ft7QibLueDlg+Npre0WUeVwBj1uGSYCGhSLe1tN3RSlOdV+h/HZW+WJz6tra3p7Hd2dJqXDg4qGEYSVHm2A9WxPBD+METttONRn8scIIocV62AfeDyzNVuNcklOaaCAi4sLAgD7nlH3W8oeDt6ZEZVBQ491DURayhnea4SJUP+3KRBMjgNCF2M115P9a+gahIZS0tLTkfFgrju/jsG3ol0/z//vNPnXykvrFYTHUlOAAAAAElFTkSuQmCC",J3=Object.assign({}),e6=Object.assign({}),t6=Object.assign({"./rag/csv.svg":f3,"./rag/document.svg":h3,"./rag/excel.svg":m3,"./rag/file.svg":C3,"./rag/folder.svg":y3,"./rag/json.svg":w3,"./rag/knowledgebase.svg":E3,"./rag/netretrive.svg":k3,"./rag/odf.svg":A3,"./rag/pdf.svg":$3,"./rag/pic.svg":O3,"./rag/ppt.svg":P3,"./rag/think.svg":M3,"./rag/txt.svg":I3,"./rag/url.svg":_3,"./rag/word.svg":z3,"./rag/wps.svg":W3,"./rag/zip.svg":q3}),r6=Object.assign({"./assets/img/excel.png":U3,"./assets/img/img.png":Z3,"./assets/img/pdf.png":G3,"./assets/img/ppt.png":X3,"./assets/img/txt.png":Y3,"./assets/img/word.png":Q3}),n6=Object.assign({"./rag/csv.svg":Kf,"./rag/document.svg":Wf,"./rag/excel.svg":Vf,"./rag/file.svg":qf,"./rag/folder.svg":Uf,"./rag/json.svg":Zf,"./rag/knowledgebase.svg":Gf,"./rag/netretrive.svg":Xf,"./rag/odf.svg":Yf,"./rag/pdf.svg":Qf,"./rag/pic.svg":Jf,"./rag/ppt.svg":e2,"./rag/think.svg":t2,"./rag/txt.svg":r2,"./rag/url.svg":n2,"./rag/word.svg":o2,"./rag/wps.svg":a2,"./rag/zip.svg":i2});function u2(e,t,r){let n=e;for(let o=0;o<t.length-1;o+=1){const a=t[o];(!n[a]||typeof n[a]!="object")&&(n[a]={}),n=n[a]}n[t[t.length-1]]=r}function Ws(e,t){return e.replace(/^\.\//,"").split("?")[0].replace(new RegExp(`\\.${t}$`,"i"),"").split("/")}const qa={};function Vs(e){Object.entries(e).forEach(([t,r])=>{let n;const o=r;if(o&&typeof o.ReactComponent=="function")n=o.ReactComponent;else if(o&&typeof o.default=="function")n=o.default;else return;const a=Vo(n),l=Ws(t,"svg");a.displayName=`Icon(${l.join("/")})`,u2(qa,l,a)})}Vs(J3);Vs(e6);Vs(t6);Object.entries(r6).forEach(([e,t])=>{const r=Vo(o=>Kn("img",{src:t,alt:"",...o})),n=Ws(e,"png");r.displayName=`IconImg(${n.join("/")})`,u2(qa,n,r)});Object.entries(n6).forEach(([e,t])=>{const r=Ws(e,"svg");let n=qa;for(let l=0;l<r.length;l+=1){const i=r[l];n[i]||(n[i]={}),n=n[i]}if(typeof n=="function")return;const o=Vo(l=>Kn("img",{src:t,alt:"",...l}));o.displayName=`IconSvgUrl(${r.join("/")})`;let a=qa;for(let l=0;l<r.length-1;l+=1){const i=r[l];(!a[i]||typeof a[i]!="object")&&(a[i]={}),a=a[i]}a[r[r.length-1]]=o});var ir={},o6=Object.defineProperty,a6=(e,t,r)=>t in e?o6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dt=(e,t,r)=>a6(e,typeof t!="symbol"?t+"":t,r),la=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vc={exports:{}},mo={};/**
|
|
90
|
+
* @license React
|
|
91
|
+
* react-jsx-runtime.production.min.js
|
|
92
|
+
*
|
|
93
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the MIT license found in the
|
|
96
|
+
* LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/var Cc;function i6(){if(Cc)return mo;Cc=1;var e=pe,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(i,u,s){var c,p={},d=null,h=null;s!==void 0&&(d=""+s),u.key!==void 0&&(d=""+u.key),u.ref!==void 0&&(h=u.ref);for(c in u)n.call(u,c)&&!a.hasOwnProperty(c)&&(p[c]=u[c]);if(i&&i.defaultProps)for(c in u=i.defaultProps,u)p[c]===void 0&&(p[c]=u[c]);return{$$typeof:t,type:i,key:d,ref:h,props:p,_owner:o.current}}return mo.Fragment=r,mo.jsx=l,mo.jsxs=l,mo}var bc;function l6(){return bc||(bc=1,vc.exports=i6()),vc.exports}var j=l6();/*!
|
|
98
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
99
|
+
*
|
|
100
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
101
|
+
* Released under the MIT License.
|
|
102
|
+
*/function yc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){var t,r;return yc(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(yc(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var c2=Symbol.for("immer-nothing"),xc=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state");function hr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var To=Object.getPrototypeOf;function yn(e){return!!e&&!!e[lr]}function xn(e){var t;return e?d2(e)||Array.isArray(e)||!!e[xc]||!!((t=e.constructor)!=null&&t[xc])||Yo(e)||bi(e):!1}var s6=Object.prototype.constructor.toString(),wc=new WeakMap;function d2(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=wc.get(r);return n===void 0&&(n=Function.toString.call(r),wc.set(r,n)),n===s6}function Ua(e,t,r=!0){Ci(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,o)=>t(o,n,e))}function Ci(e){const t=e[lr];return t?t.type_:Array.isArray(e)?1:Yo(e)?2:bi(e)?3:0}function ql(e,t){return Ci(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function f2(e,t,r){const n=Ci(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function u6(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yo(e){return e instanceof Map}function bi(e){return e instanceof Set}function sn(e){return e.copy_||e.base_}function Ul(e,t){if(Yo(e))return new Map(e);if(bi(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=d2(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[lr];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const l=o[a],i=n[l];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[l]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[l]})}return Object.create(To(e),n)}else{const n=To(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function qs(e,t=!1){return yi(e)||yn(e)||!xn(e)||(Ci(e)>1&&Object.defineProperties(e,{set:sa,add:sa,clear:sa,delete:sa}),Object.freeze(e),t&&Object.values(e).forEach(r=>qs(r,!0))),e}function c6(){hr(2)}var sa={value:c6};function yi(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var d6={};function wn(e){const t=d6[e];return t||hr(0,e),t}var Mo;function p2(){return Mo}function f6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Dc(e,t){t&&(wn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zl(e){Gl(e),e.drafts_.forEach(p6),e.drafts_=null}function Gl(e){e===Mo&&(Mo=e.parent_)}function Ec(e){return Mo=f6(Mo,e)}function p6(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Sc(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[lr].modified_&&(Zl(t),hr(4)),xn(e)&&(e=Za(t,e),t.parent_||Ga(t,e)),t.patches_&&wn("Patches").generateReplacementPatches_(r[lr].base_,e,t.patches_,t.inversePatches_)):e=Za(t,r,[]),Zl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==c2?e:void 0}function Za(e,t,r){if(yi(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[lr];if(!o)return Ua(t,(a,l)=>kc(e,o,t,a,l,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Ga(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const a=o.copy_;let l=a,i=!1;o.type_===3&&(l=new Set(a),a.clear(),i=!0),Ua(l,(u,s)=>kc(e,o,a,u,s,r,i),n),Ga(e,a,!1),r&&e.patches_&&wn("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function kc(e,t,r,n,o,a,l){if(o==null||typeof o!="object"&&!l)return;const i=yi(o);if(!(i&&!l)){if(yn(o)){const u=a&&t&&t.type_!==3&&!ql(t.assigned_,n)?a.concat(n):void 0,s=Za(e,o,u);if(f2(r,n,s),yn(s))e.canAutoFreeze_=!1;else return}else l&&r.add(o);if(xn(o)&&!i){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&i)return;Za(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Yo(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Ga(e,o)}}}function Ga(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qs(t,r)}function h6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:p2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=Us;r&&(o=[n],a=Lo);const{revoke:l,proxy:i}=Proxy.revocable(o,a);return n.draft_=i,n.revoke_=l,i}var Us={get(e,t){if(t===lr)return e;const r=sn(e);if(!ql(r,t))return g6(e,r,t);const n=r[t];return e.finalized_||!xn(n)?n:n===Vi(e.base_,t)?(qi(e),e.copy_[t]=Yl(n,e)):n},has(e,t){return t in sn(e)},ownKeys(e){return Reflect.ownKeys(sn(e))},set(e,t,r){const n=h2(sn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Vi(sn(e),t),a=o==null?void 0:o[lr];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(u6(r,o)&&(r!==void 0||ql(e.base_,t)))return!0;qi(e),Xl(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Vi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,qi(e),Xl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=sn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){hr(11)},getPrototypeOf(e){return To(e.base_)},setPrototypeOf(){hr(12)}},Lo={};Ua(Us,(e,t)=>{Lo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Lo.deleteProperty=function(e,t){return Lo.set.call(this,e,t,void 0)};Lo.set=function(e,t,r){return Us.set.call(this,e[0],t,r,e[0])};function Vi(e,t){const r=e[lr];return(r?sn(r):e)[t]}function g6(e,t,r){var o;const n=h2(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function h2(e,t){if(!(t in e))return;let r=To(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=To(r)}}function Xl(e){e.modified_||(e.modified_=!0,e.parent_&&Xl(e.parent_))}function qi(e){e.copy_||(e.copy_=Ul(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var m6=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const l=this;return function(i=a,...u){return l.produce(i,s=>r.call(this,s,...u))}}typeof r!="function"&&hr(6),n!==void 0&&typeof n!="function"&&hr(7);let o;if(xn(t)){const a=Ec(this),l=Yl(t,void 0);let i=!0;try{o=r(l),i=!1}finally{i?Zl(a):Gl(a)}return Dc(a,n),Sc(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===c2&&(o=void 0),this.autoFreeze_&&qs(o,!0),n){const a=[],l=[];wn("Patches").generateReplacementPatches_(t,o,a,l),n(a,l)}return o}else hr(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...l)=>this.produceWithPatches(a,i=>t(i,...l));let n,o;return[this.produce(t,r,(a,l)=>{n=a,o=l}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){xn(e)||hr(8),yn(e)&&(e=v6(e));const t=Ec(this),r=Yl(e,void 0);return r[lr].isManual_=!0,Gl(t),r}finishDraft(e,t){const r=e&&e[lr];(!r||!r.isManual_)&&hr(9);const{scope_:n}=r;return Dc(n,t),Sc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=wn("Patches").applyPatches_;return yn(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Yl(e,t){const r=Yo(e)?wn("MapSet").proxyMap_(e,t):bi(e)?wn("MapSet").proxySet_(e,t):h6(e,t);return(t?t.scope_:p2()).drafts_.push(r),r}function v6(e){return yn(e)||hr(10,e),g2(e)}function g2(e){if(!xn(e)||yi(e))return e;const t=e[lr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ul(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ul(e,!0);return Ua(r,(o,a)=>{f2(r,o,g2(a))},n),t&&(t.finalized_=!1),r}var Io=new m6,Zs=Io.produce,Bc=Io.createDraft.bind(Io),Ac=Io.finishDraft.bind(Io),C6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=_.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},b6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=at.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},y6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=ne.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Xa=new WeakMap,Ya=new WeakMap,ko=new WeakMap,m2=new WeakMap,Fc=new WeakMap,$c=new WeakMap,Nc=new WeakMap,_={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=_.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n],a=t[n];if(o!==a)break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],l=t[r];return _.equals(n,o)&&a>l},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return _.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],l=t[r];return _.equals(n,o)&&a<l},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return _.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&_.compare(e,t)===0},isBefore(e,t){return _.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&_.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&_.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&_.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&_.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),o=e[e.length-1],a=t[t.length-1];return o!==a&&_.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!_.isAncestor(t,e)&&!_.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:a}=t;(_.equals(a,n)||_.endsBefore(a,n)||_.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:l}=t;if(_.equals(l,n)||_.isAncestor(l,n))return null;_.endsBefore(l,n)&&(n[l.length-1]-=1);break}case"merge_node":{var{path:i,position:u}=t;_.equals(i,n)||_.endsBefore(i,n)?n[i.length-1]-=1:_.isAncestor(i,n)&&(n[i.length-1]-=1,n[i.length]+=u);break}case"split_node":{var{path:s,position:c}=t;if(_.equals(s,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else _.endsBefore(s,n)?n[s.length-1]+=1:_.isAncestor(s,n)&&e[s.length]>=c&&(n[s.length-1]+=1,n[s.length]-=c);break}case"move_node":{var{path:p,newPath:d}=t;if(_.equals(p,d))return n;if(_.isAncestor(p,n)||_.equals(p,n)){var h=d.slice();return _.endsBefore(p,d)&&p.length<d.length&&(h[p.length-1]-=1),h.concat(n.slice(p.length))}else _.isSibling(p,d)&&(_.isAncestor(d,n)||_.equals(d,n))?_.endsBefore(p,n)?n[p.length-1]-=1:n[p.length-1]+=1:_.endsBefore(d,n)||_.equals(d,n)||_.isAncestor(d,n)?(_.endsBefore(p,n)&&(n[p.length-1]-=1),n[d.length-1]+=1):_.endsBefore(p,n)&&(_.equals(d,n)&&(n[d.length-1]+=1),n[p.length-1]-=1);break}}return n}};function jo(e){"@babel/helpers - typeof";return jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo(e)}function x6(e,t){if(jo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w6(e){var t=x6(e,"string");return jo(t)==="symbol"?t:String(t)}function Jt(e,t,r){return t=w6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var D6=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=ke.parent(e,n),l=n[n.length-1];if(l>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(a.children.splice(l,0,o),t)for(var[i,u]of ne.points(t))t[u]=at.transform(i,r);break}case"insert_text":{var{path:s,offset:c,text:p}=r;if(p.length===0)break;var d=ke.leaf(e,s),h=d.text.slice(0,c),g=d.text.slice(c);if(d.text=h+p+g,t)for(var[v,f]of ne.points(t))t[f]=at.transform(v,r);break}case"merge_node":{var{path:C}=r,y=ke.get(e,C),b=_.previous(C),x=ke.get(e,b),B=ke.parent(e,C),A=C[C.length-1];if(Te.isText(y)&&Te.isText(x))x.text+=y.text;else if(!Te.isText(y)&&!Te.isText(x))x.children.push(...y.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(C,"] to nodes of different interfaces: ").concat(_t.stringify(y)," ").concat(_t.stringify(x)));if(B.children.splice(A,1),t)for(var[F,$]of ne.points(t))t[$]=at.transform(F,r);break}case"move_node":{var{path:D,newPath:L}=r;if(_.isAncestor(D,L))throw new Error("Cannot move a path [".concat(D,"] to new path [").concat(L,"] because the destination is inside itself."));var N=ke.get(e,D),T=ke.parent(e,D),P=D[D.length-1];T.children.splice(P,1);var S=_.transform(D,r),k=ke.get(e,_.parent(S)),O=S[S.length-1];if(k.children.splice(O,0,N),t)for(var[E,I]of ne.points(t))t[I]=at.transform(E,r);break}case"remove_node":{var{path:M}=r,H=M[M.length-1],z=ke.parent(e,M);if(z.children.splice(H,1),t)for(var[U,G]of ne.points(t)){var Y=at.transform(U,r);if(t!=null&&Y!=null)t[G]=Y;else{var ae=void 0,R=void 0;for(var[Z,V]of ke.texts(e))if(_.compare(V,M)===-1)ae=[Z,V];else{R=[Z,V];break}var K=!1;ae&&R&&(_.equals(R[1],M)?K=!_.hasPrevious(R[1]):K=_.common(ae[1],M).length<_.common(R[1],M).length),ae&&!K?(U.path=ae[1],U.offset=ae[0].text.length):R?(U.path=R[1],U.offset=0):t=null}}break}case"remove_text":{var{path:X,offset:Q,text:ee}=r;if(ee.length===0)break;var se=ke.leaf(e,X),re=se.text.slice(0,Q),oe=se.text.slice(Q+ee.length);if(se.text=re+oe,t)for(var[ge,ce]of ne.points(t))t[ce]=at.transform(ge,r);break}case"set_node":{var{path:Ee,properties:_e,newProperties:Ue}=r;if(Ee.length===0)throw new Error("Cannot set properties on the root node!");var de=ke.get(e,Ee);for(var be in Ue){if(be==="children"||be==="text")throw new Error('Cannot set the "'.concat(be,'" property of nodes!'));var Se=Ue[be];Se==null?delete de[be]:de[be]=Se}for(var Ke in _e)Ue.hasOwnProperty(Ke)||delete de[Ke];break}case"set_selection":{var{newProperties:Fe}=r;if(Fe==null)t=Fe;else{if(t==null){if(!ne.isRange(Fe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(_t.stringify(Fe)," when there is no current selection."));t=vo({},Fe)}for(var $e in Fe){var rt=Fe[$e];if(rt==null){if($e==="anchor"||$e==="focus")throw new Error('Cannot remove the "'.concat($e,'" selection property'));delete t[$e]}else t[$e]=rt}}break}case"split_node":{var{path:Xe,position:je,properties:Pe}=r;if(Xe.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Xe,"] because the root node cannot be split."));var Ce=ke.get(e,Xe),ye=ke.parent(e,Xe),He=Xe[Xe.length-1],Ye;if(Te.isText(Ce)){var Qe=Ce.text.slice(0,je),We=Ce.text.slice(je);Ce.text=Qe,Ye=vo(vo({},Pe),{},{text:We})}else{var mt=Ce.children.slice(0,je),Ze=Ce.children.slice(je);Ce.children=mt,Ye=vo(vo({},Pe),{},{children:Ze})}if(ye.children.splice(He+1,0,Ye),t)for(var[bt,pt]of ne.points(t))t[pt]=at.transform(bt,r);break}}return t},E6={transform(e,t){e.children=Bc(e.children);var r=e.selection&&Bc(e.selection);try{r=D6(e,r,t)}finally{e.children=Ac(e.children),r?e.selection=yn(r)?Ac(r):r:e.selection=null}}},S6={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},k6={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},v2=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Zt(n)&&Zt(o)){if(!v2(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==o[a])return!1}else if(n!==o)return!1}for(var l in t)if(e[l]===void 0&&t[l]!==void 0)return!1;return!0};function B6(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function jr(e,t){if(e==null)return{};var r=B6(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var A6=["anchor","focus"];function Rc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function F6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ne={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return ne.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=ne.edges(e);return t},equals(e,t){return at.equals(e.anchor,t.anchor)&&at.equals(e.focus,t.focus)},includes(e,t){if(ne.isRange(t)){if(ne.includes(e,t.anchor)||ne.includes(e,t.focus))return!0;var[r,n]=ne.edges(e),[o,a]=ne.edges(t);return at.isBefore(r,o)&&at.isAfter(n,a)}var[l,i]=ne.edges(e),u=!1,s=!1;return at.isPoint(t)?(u=at.compare(t,l)>=0,s=at.compare(t,i)<=0):(u=_.compare(t,l.path)>=0,s=_.compare(t,i.path)<=0),u&&s},intersection(e,t){var r=jr(e,A6),[n,o]=ne.edges(e),[a,l]=ne.edges(t),i=at.isBefore(n,a)?a:n,u=at.isBefore(o,l)?o:l;return at.isBefore(u,i)?null:F6({anchor:i,focus:u},r)},isBackward(e){var{anchor:t,focus:r}=e;return at.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return at.equals(t,r)},isExpanded(e){return!ne.isCollapsed(e)},isForward(e){return!ne.isBackward(e)},isRange(e){return Zt(e)&&at.isPoint(e.anchor)&&at.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=ne.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Zs(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,l;if(o==="inward"){var i=ne.isCollapsed(n);ne.isForward(n)?(a="forward",l=i?a:"backward"):(a="backward",l=i?a:"forward")}else o==="outward"?ne.isForward(n)?(a="backward",l="forward"):(a="forward",l="backward"):(a=o,l=o);var u=at.transform(n.anchor,t,{affinity:a}),s=at.transform(n.focus,t,{affinity:l});if(!u||!s)return null;n.anchor=u,n.focus=s})}},Pc=e=>Zt(e)&&ke.isNodeList(e.children)&&!w.isEditor(e),Le={isAncestor(e){return Zt(e)&&ke.isNodeList(e.children)},isElement:Pc,isElementList(e){return Array.isArray(e)&&e.every(t=>Le.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Pc(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},$6=["children"],N6=["text"],Tc=new WeakMap,ke={ancestor(e,t){var r=ke.get(e,t);if(Te.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(_t.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of _.ancestors(t,r)){var o=ke.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(Te.isText(e))throw new Error("Cannot get the child of a text node: ".concat(_t.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(_t.stringify(e)));return r},children(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var{reverse:n=!1}=r,o=ke.ancestor(e,t),{children:a}=o,l=n?a.length-1:0;n?l>=0:l<a.length;){var i=ke.child(o,l),u=t.concat(l);yield[i,u],l=n?l-1:l+1}})()},common(e,t,r){var n=_.common(t,r),o=ke.get(e,n);return[o,n]},descendant(e,t){var r=ke.get(e,t);if(w.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(_t.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of ke.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of ke.nodes(e,t))Le.isElement(r)&&(yield[r,n])})()},extractProps(e){if(Le.isAncestor(e)){var t=jr(e,$6);return t}else{var t=jr(e,N6);return t}},first(e,t){for(var r=t.slice(),n=ke.get(e,r);n&&!(Te.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(Te.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(_t.stringify(e)));var r=Zs({children:e.children},n=>{var[o,a]=ne.edges(t),l=ke.nodes(n,{reverse:!0,pass:d=>{var[,h]=d;return!ne.includes(t,h)}});for(var[,i]of l){if(!ne.includes(t,i)){var u=ke.parent(n,i),s=i[i.length-1];u.children.splice(s,1)}if(_.equals(i,a.path)){var c=ke.leaf(n,i);c.text=c.text.slice(0,a.offset)}if(_.equals(i,o.path)){var p=ke.leaf(n,i);p.text=p.text.slice(o.offset)}}w.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Te.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(_t.stringify(e)));r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Te.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return Te.isText(e)||Le.isElement(e)||w.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Tc.get(e);if(t!==void 0)return t;var r=e.every(n=>ke.isNode(n));return Tc.set(e,r),r},last(e,t){for(var r=t.slice(),n=ke.get(e,r);n&&!(Te.isText(n)||n.children.length===0);){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=ke.get(e,t);if(!Te.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(_t.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of _.levels(t,r)){var o=ke.get(e,n);yield[o,n]}})()},matches(e,t){return Le.isElement(e)&&Le.isElementProps(t)&&Le.matches(e,t)||Te.isText(e)&&Te.isTextProps(t)&&Te.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:a}=t,l=new Set,i=[],u=e;!(a&&(n?_.isBefore(i,a):_.isAfter(i,a)));){if(l.has(u)||(yield[u,i]),!l.has(u)&&!Te.isText(u)&&u.children.length!==0&&(r==null||r([u,i])===!1)){l.add(u);var s=n?u.children.length-1:0;_.isAncestor(i,o)&&(s=o[i.length]),i=i.concat(s),u=ke.get(e,i);continue}if(i.length===0)break;if(!n){var c=_.next(i);if(ke.has(e,c)){i=c,u=ke.get(e,i);continue}}if(n&&i[i.length-1]!==0){var p=_.previous(i);i=p,u=ke.get(e,i);continue}i=_.parent(i),u=ke.get(e,i),l.add(u)}})()},parent(e,t){var r=_.parent(t),n=ke.get(e,r);if(Te.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return Te.isText(e)?e.text:e.children.map(ke.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of ke.nodes(e,t))Te.isText(r)&&(yield[r,n])})()}};function Mc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function St(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xo={isNodeOperation(e){return xo.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Zt(e))return!1;switch(e.type){case"insert_node":return _.isPath(e.path)&&ke.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&_.isPath(e.path);case"merge_node":return typeof e.position=="number"&&_.isPath(e.path)&&Zt(e.properties);case"move_node":return _.isPath(e.path)&&_.isPath(e.newPath);case"remove_node":return _.isPath(e.path)&&ke.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&_.isPath(e.path);case"set_node":return _.isPath(e.path)&&Zt(e.properties)&&Zt(e.newProperties);case"set_selection":return e.properties===null&&ne.isRange(e.newProperties)||e.newProperties===null&&ne.isRange(e.properties)||Zt(e.properties)&&Zt(e.newProperties);case"split_node":return _.isPath(e.path)&&typeof e.position=="number"&&Zt(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>xo.isOperation(t))},isSelectionOperation(e){return xo.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return xo.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return St(St({},e),{},{type:"remove_node"});case"insert_text":return St(St({},e),{},{type:"remove_text"});case"merge_node":return St(St({},e),{},{type:"split_node",path:_.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(_.equals(t,r))return e;if(_.isSibling(r,t))return St(St({},e),{},{path:t,newPath:r});var n=_.transform(r,e),o=_.transform(_.next(r),e);return St(St({},e),{},{path:n,newPath:o})}case"remove_node":return St(St({},e),{},{type:"insert_node"});case"remove_text":return St(St({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:l}=e;return St(St({},e),{},{properties:l,newProperties:a})}case"set_selection":{var{properties:i,newProperties:u}=e;return i==null?St(St({},e),{},{properties:u,newProperties:null}):u==null?St(St({},e),{},{properties:null,newProperties:i}):St(St({},e),{},{properties:u,newProperties:i})}case"split_node":return St(St({},e),{},{type:"merge_node",path:_.next(e.path)})}}},Lc=new WeakMap,O6=e=>{var t=Lc.get(e);if(t!==void 0)return t;if(!Zt(e))return!1;var r=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Zt(e.marks))&&(e.selection===null||ne.isRange(e.selection))&&ke.isNodeList(e.children)&&xo.isOperationList(e.operations);return Lc.set(e,r),r},w={above(e,t){return e.above(t)},addMark(e,t,r){e.addMark(t,r)},after(e,t,r){return e.after(t,r)},before(e,t,r){return e.before(t,r)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,r){return e.isEdge(t,r)},isEditor(e){return O6(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,r){return e.isEnd(t,r)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,r){return e.isStart(t,r)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,r){return e.leaf(t,r)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,r){return e.node(t,r)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,r){return e.parent(t,r)},path(e,t,r){return e.path(t,r)},pathRef(e,t,r){return e.pathRef(t,r)},pathRefs(e){return e.pathRefs()},point(e,t,r){return e.point(t,r)},pointRef(e,t,r){return e.pointRef(t,r)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,r){return e.range(t,r)},rangeRef(e,t,r){return e.rangeRef(t,r)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,r){return e.string(t,r)},unhangRange(e,t,r){return e.unhangRange(t,r)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)},R6={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(_.isPath)}};function Ic(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function jc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ic(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ic(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var at={compare(e,t){var r=_.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return at.compare(e,t)===1},isBefore(e,t){return at.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&_.equals(e.path,t.path)},isPoint(e){return Zt(e)&&typeof e.offset=="number"&&_.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Zs(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:l}=n;switch(t.type){case"insert_node":case"move_node":{n.path=_.transform(a,t,r);break}case"insert_text":{_.equals(t.path,a)&&(t.offset<l||t.offset===l&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{_.equals(t.path,a)&&(n.offset+=t.position),n.path=_.transform(a,t,r);break}case"remove_text":{_.equals(t.path,a)&&t.offset<=l&&(n.offset-=Math.min(l-t.offset,t.text.length));break}case"remove_node":{if(_.equals(t.path,a)||_.isAncestor(t.path,a))return null;n.path=_.transform(a,t,r);break}case"split_node":{if(_.equals(t.path,a)){if(t.position===l&&o==null)return null;(t.position<l||t.position===l&&o==="forward")&&(n.offset-=t.position,n.path=_.transform(a,t,jc(jc({},r),{},{affinity:"forward"})))}else n.path=_.transform(a,t,r);break}}})}},_c=void 0,_t={setScrubber(e){_c=e},stringify(e){return JSON.stringify(e,_c)}},P6=["text"],T6=["anchor","focus"];function Hc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Te={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var l=jr(a,P6);return l}return v2(n?o(e):e,n?o(t):t)},isText(e){return Zt(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>Te.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[Rr({},e)];for(var n of t){var o=jr(n,T6),[a,l]=ne.edges(n),i=[],u=0,s=a.offset,c=l.offset;for(var p of r){var{length:d}=p.text,h=u;if(u+=d,s<=h&&u<=c){Object.assign(p,o),i.push(p);continue}if(s!==c&&(s===u||c===h)||s>u||c<h||c===h&&h!==0){i.push(p);continue}var g=p,v=void 0,f=void 0;if(c<u){var C=c-h;f=Rr(Rr({},g),{},{text:g.text.slice(C)}),g=Rr(Rr({},g),{},{text:g.text.slice(0,C)})}if(s>h){var y=s-h;v=Rr(Rr({},g),{},{text:g.text.slice(0,y)}),g=Rr(Rr({},g),{},{text:g.text.slice(y)})}Object.assign(g,o),v&&i.push(v),i.push(g),f&&i.push(f)}r=i}return r}},Gs=e=>e.selection?e.selection:e.children.length>0?w.end(e,[]):[0],io=(e,t)=>{var[r]=w.node(e,t);return n=>n===r},Xs=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?H6(e):e,o=Je.None,a=Je.None,l=0,i=null,u=null;for(var s of n){var c=s.codePointAt(0);if(!c)break;var p=J6(s,c);if([o,a]=r?[a,p]:[p,o],Tn(o,Je.ZWJ)&&Tn(a,Je.ExtPict)&&(r?i=zc(e.substring(0,l)):i=zc(e.substring(0,e.length-l)),!i)||Tn(o,Je.RI)&&Tn(a,Je.RI)&&(u!==null?u=!u:r?u=!0:u=o5(e.substring(0,e.length-l)),!u)||o!==Je.None&&a!==Je.None&&t5(o,a))break;l+=s.length}return l||1},M6=/\s/,L6=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,I6=/['\u2018\u2019]/,j6=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=Xs(e,t),[a,l]=Ys(e,o,t);if(_6(a,l,t))n=!0,r+=o;else if(!n)r+=o;else break;e=l}return r},Ys=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},_6=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(M6.test(t))return!1;if(I6.test(t)){var o=Xs(r,n),[a,l]=Ys(r,o,n);if(e(a,l,n))return!0}return!L6.test(t)},H6=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(K6(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(z6(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},z6=e=>e>=55296&&e<=56319,K6=e=>e>=56320&&e<=57343,Je;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(Je||(Je={}));var W6=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,V6=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,q6=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,U6=/^[\u1100-\u115F\uA960-\uA97C]$/,Z6=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,G6=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,X6=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Y6=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Q6=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,J6=(e,t)=>{var r=Je.Any;return e.search(W6)!==-1&&(r|=Je.Extend),t===8205&&(r|=Je.ZWJ),t>=127462&&t<=127487&&(r|=Je.RI),e.search(V6)!==-1&&(r|=Je.Prepend),e.search(q6)!==-1&&(r|=Je.SpacingMark),e.search(U6)!==-1&&(r|=Je.L),e.search(Z6)!==-1&&(r|=Je.V),e.search(G6)!==-1&&(r|=Je.T),e.search(X6)!==-1&&(r|=Je.LV),e.search(Y6)!==-1&&(r|=Je.LVT),e.search(Q6)!==-1&&(r|=Je.ExtPict),r};function Tn(e,t){return(e&t)!==0}var e5=[[Je.L,Je.L|Je.V|Je.LV|Je.LVT],[Je.LV|Je.V,Je.V|Je.T],[Je.LVT|Je.T,Je.T],[Je.Any,Je.Extend|Je.ZWJ],[Je.Any,Je.SpacingMark],[Je.Prepend,Je.Any],[Je.ZWJ,Je.ExtPict],[Je.RI,Je.RI]];function t5(e,t){return e5.findIndex(r=>Tn(e,r[0])&&Tn(t,r[1]))===-1}var r5=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,zc=e=>e.search(r5)!==-1,n5=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,o5=e=>{var t=e.match(n5);if(t===null)return!1;var r=t[0].length/2;return r%2===1},a5={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};w.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=Gs(e)}=r;if(_.isPath(o)&&(o=w.range(e,o)),ne.isRange(o))if(ne.isCollapsed(o))o=o.anchor;else{var a=ne.end(o);if(!n&&w.void(e,{at:a}))return;var l=ne.start(o),i=w.pointRef(e,l),u=w.pointRef(e,a);ve.delete(e,{at:o,voids:n});var s=i.unref(),c=u.unref();o=s||c,ve.setSelection(e,{anchor:o,focus:o})}if(!(!n&&w.void(e,{at:o})||w.elementReadOnly(e,{at:o}))){var{path:p,offset:d}=o;t.length>0&&e.apply({type:"insert_text",path:p,offset:d,text:t})}})}};function Kc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ua(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ve=ua(ua(ua(ua({},E6),S6),k6),a5),Sa=new WeakMap,i5=e=>Sa.get(e)||!1,l5=(e,t,r)=>{var n=Sa.get(e)||!1;Sa.set(e,!0);try{t(),r()}finally{Sa.set(e,n)}};function C2(e,t,r){var n=Xa.get(e)||[],o=Ya.get(e)||new Set,a,l,i=p=>{if(p){var d=p.join(",");l.has(d)||(l.add(d),a.push(p))}};if(r){a=[],l=new Set;for(var u of n){var s=r(u);i(s)}}else a=n,l=o;for(var c of t)i(c);Xa.set(e,a),Ya.set(e,l)}var s5=(e,t)=>{for(var r of w.pathRefs(e))C6.transform(r,t);for(var n of w.pointRefs(e))b6.transform(n,t);for(var o of w.rangeRefs(e))y6.transform(o,t);if(!i5(e)){var a=_.operationCanTransformPath(t)?l=>_.transform(l,t):void 0;C2(e,e.getDirtyPaths(t),a)}ve.transform(e,t),e.operations.push(t),w.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),ko.get(e)||(ko.set(e,!0),Promise.resolve().then(()=>{ko.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},u5=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return _.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=_.levels(o),l=Te.isText(n)?[]:Array.from(ke.nodes(n),L=>{var[,N]=L;return o.concat(N)});return[...a,...l]}case"merge_node":{var{path:i}=t,u=_.ancestors(i),s=_.previous(i);return[...u,s]}case"move_node":{var{path:c,newPath:p}=t;if(_.equals(c,p))return[];var d=[],h=[];for(var g of _.ancestors(c)){var v=_.transform(g,t);d.push(v)}for(var f of _.ancestors(p)){var C=_.transform(f,t);h.push(C)}var y=h[h.length-1],b=p[p.length-1],x=y.concat(b);return[...d,...h,x]}case"remove_node":{var{path:B}=t,A=_.ancestors(B);return[...A]}case"split_node":{var{path:F}=t,$=_.levels(F),D=_.next(F);return[...$,D]}default:return[]}},c5=e=>{var{selection:t}=e;return t?ke.fragment(e,t):[]},d5=(e,t)=>{var[r,n]=t;if(!Te.isText(r)){if(Le.isElement(r)&&r.children.length===0){var o={text:""};ve.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=w.isEditor(r)?!1:Le.isElement(r)&&(e.isInline(r)||r.children.length===0||Te.isText(r.children[0])||e.isInline(r.children[0])),l=0,i=0;i<r.children.length;i++,l++){var u=ke.get(e,n);if(!Te.isText(u)){var s=u.children[l],c=u.children[l-1],p=i===r.children.length-1,d=Te.isText(s)||Le.isElement(s)&&e.isInline(s);if(d!==a)ve.removeNodes(e,{at:n.concat(l),voids:!0}),l--;else if(Le.isElement(s)){if(e.isInline(s)){if(c==null||!Te.isText(c)){var h={text:""};ve.insertNodes(e,h,{at:n.concat(l),voids:!0}),l++}else if(p){var g={text:""};ve.insertNodes(e,g,{at:n.concat(l+1),voids:!0}),l++}}}else{if(!Te.isText(s)&&!("children"in s)){var v=s;v.children=[]}c!=null&&Te.isText(c)&&(Te.equals(s,c,{loose:!0})?(ve.mergeNodes(e,{at:n.concat(l),voids:!0}),l--):c.text===""?(ve.removeNodes(e,{at:n.concat(l-1),voids:!0}),l--):s.text===""&&(ve.removeNodes(e,{at:n.concat(l),voids:!0}),l--))}}}}},f5=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,o=n*42;if(r>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},p5=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:o=e.selection,match:a}=t;if(o){var l=w.path(e,o),i=n==="lowest";for(var[u,s]of w.levels(e,{at:l,voids:r,match:a,reverse:i}))if(!Te.isText(u)){if(ne.isRange(o)){if(_.isAncestor(s,o.anchor.path)&&_.isAncestor(s,o.focus.path))return[u,s]}else if(!_.equals(l,s))return[u,s]}}};function Wc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var h5=(e,t,r)=>{var{selection:n}=e;if(n){var o=(p,d)=>{if(!Te.isText(p))return!1;var[h,g]=w.parent(e,d);return!e.isVoid(h)||e.markableVoid(h)},a=ne.isExpanded(n),l=!1;if(!a){var[i,u]=w.node(e,n);if(i&&o(i,u)){var[s]=w.parent(e,u);l=s&&e.markableVoid(s)}}if(a||l)ve.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var c=Vc(Vc({},w.marks(e)||{}),{},{[t]:r});e.marks=c,ko.get(e)||e.onChange()}}};function qc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Uc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var g5=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=w.point(e,t,{edge:"end"}),o=w.end(e,[]),a={anchor:n,focus:o},{distance:l=1}=r,i=0,u;for(var s of w.positions(e,Uc(Uc({},r),{},{at:a}))){if(i>l)break;i!==0&&(u=s),i++}return u};function Zc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Gc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var m5=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=w.start(e,[]),o=w.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:l=1}=r,i=0,u;for(var s of w.positions(e,Gc(Gc({},r),{},{at:a,reverse:!0}))){if(i>l)break;i!==0&&(u=s),i++}return u},v5=(e,t)=>{var{selection:r}=e;r&&ne.isCollapsed(r)&&ve.delete(e,{unit:t,reverse:!0})},C5=(e,t)=>{var{selection:r}=e;r&&ne.isCollapsed(r)&&ve.delete(e,{unit:t})},b5=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&ne.isExpanded(r)&&ve.delete(e,{reverse:t==="backward"})},y5=(e,t)=>[w.start(e,t),w.end(e,t)];function Xc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Yc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var x5=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return w.above(e,Yc(Yc({},t),{},{match:r=>Le.isElement(r)&&w.isElementReadOnly(e,r)}))},w5=(e,t)=>w.point(e,t,{edge:"end"}),D5=(e,t)=>{var r=w.path(e,t,{edge:"start"});return w.node(e,r)},E5=(e,t)=>{var r=w.range(e,t);return ke.fragment(e,r)};function Qc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Jc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qc(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var S5=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return w.above(e,Jc(Jc({},t),{},{match:r=>Le.isElement(r)&&w.isVoid(e,r)}))},k5=(e,t)=>t.children.some(r=>Le.isElement(r)&&w.isBlock(e,r)),B5=(e,t)=>t.children.some(r=>Te.isText(r)||w.isInline(e,r)),A5=(e,t)=>ke.has(e,t),F5=(e,t)=>t.children.every(r=>Te.isText(r)),$5=e=>{ve.splitNodes(e,{always:!0})},N5=(e,t,r)=>{ve.insertNodes(e,t,r)},O5=e=>{ve.splitNodes(e,{always:!0})};function e0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function R5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e0(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var P5=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:o}=e;if(n){if(o){var a=R5({text:t},o);ve.insertNodes(e,a,{at:r.at,voids:r.voids})}else ve.insertText(e,t,r);e.marks=null}},T5=(e,t)=>!e.isInline(t),M5=(e,t,r)=>w.isStart(e,t,r)||w.isEnd(e,t,r),L5=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&Te.isText(n)&&n.text===""&&!e.isVoid(t)},I5=(e,t,r)=>{var n=w.end(e,r);return at.equals(t,n)},j5=e=>{var t=m2.get(e);return t===void 0?!0:t},_5=(e,t,r)=>{if(t.offset!==0)return!1;var n=w.start(e,r);return at.equals(t,n)},H5=(e,t)=>{var r=w.path(e,t,{edge:"end"});return w.node(e,r)},z5=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=w.path(e,t,r),o=ke.leaf(e,n);return[o,n]};function K5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:o=!1}=t,{match:a}=t;if(a==null&&(a=()=>!0),!!r){var l=[],i=w.path(e,r);for(var[u,s]of ke.levels(e,i))if(a(u,s)&&(l.push([u,s]),!o&&Le.isElement(u)&&w.isVoid(e,u)))break;n&&l.reverse(),yield*l}})()}var W5=["text"],V5=["text"],q5=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(ne.isExpanded(r)){var a=w.isEnd(e,n,n.path);if(a){var l=w.after(e,n);l&&(n=l)}var[i]=w.nodes(e,{match:Te.isText,at:{anchor:n,focus:o}});if(i){var[u]=i,s=jr(u,W5);return s}else return{}}var{path:c}=n,[p]=w.leaf(e,c);if(n.offset===0){var d=w.previous(e,{at:c,match:Te.isText}),h=w.above(e,{match:b=>Le.isElement(b)&&w.isVoid(e,b)&&e.markableVoid(b)});if(!h){var g=w.above(e,{match:b=>Le.isElement(b)&&w.isBlock(e,b)});if(d&&g){var[v,f]=d,[,C]=g;_.isAncestor(C,f)&&(p=v)}}}var y=jr(p,V5);return y},U5=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var l=w.after(e,a,{voids:n});if(l){var[,i]=w.last(e,[]),u=[l.path,i];if(_.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(_.isPath(a)){var[s]=w.parent(e,a);o=p=>s.children.includes(p)}else o=()=>!0;var[c]=w.nodes(e,{at:u,match:o,mode:r,voids:n});return c}}},Z5=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=w.path(e,t,r),o=ke.get(e,n);return[o,n]};function G5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:o=!1,reverse:a=!1,voids:l=!1,ignoreNonSelectable:i=!1}=t,{match:u}=t;if(u||(u=()=>!0),!!r){var s,c;if(R6.isSpan(r))s=r[0],c=r[1];else{var p=w.path(e,r,{edge:"start"}),d=w.path(e,r,{edge:"end"});s=a?d:p,c=a?p:d}var h=ke.nodes(e,{reverse:a,from:s,to:c,pass:x=>{var[B]=x;return Le.isElement(B)?!!(!l&&(w.isVoid(e,B)||w.isElementReadOnly(e,B))||i&&!w.isSelectable(e,B)):!1}}),g=[],v;for(var[f,C]of h)if(!(i&&Le.isElement(f)&&!w.isSelectable(e,f))){var y=v&&_.compare(C,v[1])===0;if(!(n==="highest"&&y)){if(!u(f,C)){if(o&&!y&&Te.isText(f))return;continue}if(n==="lowest"&&y){v=[f,C];continue}var b=n==="lowest"?v:[f,C];b&&(o?g.push(b):yield b),v=[f,C]}}n==="lowest"&&v&&(o?g.push(v):yield v),o&&(yield*g)}})()}var X5=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=s=>Xa.get(s)||[],a=s=>Ya.get(s)||new Set,l=s=>{var c=o(s).pop(),p=c.join(",");return a(s).delete(p),c};if(w.isNormalizing(e)){if(r){var i=Array.from(ke.nodes(e),s=>{var[,c]=s;return c}),u=new Set(i.map(s=>s.join(",")));Xa.set(e,i),Ya.set(e,u)}o(e).length!==0&&w.withoutNormalizing(e,()=>{for(var s of o(e))if(ke.has(e,s)){var c=w.node(e,s),[p,d]=c;Le.isElement(p)&&p.children.length===0&&e.normalizeNode(c,{operation:n})}for(var h=o(e),g=h.length,v=0;h.length!==0;){if(!e.shouldNormalize({dirtyPaths:h,iteration:v,initialDirtyPathsLength:g,operation:n}))return;var f=l(e);if(ke.has(e,f)){var C=w.node(e,f);e.normalizeNode(C,{operation:n})}v++,h=o(e)}})}},Y5=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=w.path(e,t,r),o=_.parent(n),a=w.node(e,o);return a},Q5=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=w.pathRefs(e);return i.delete(o),o.current=null,l}},a=w.pathRefs(e);return a.add(o),o},J5=e=>{var t=Fc.get(e);return t||(t=new Set,Fc.set(e,t)),t},e8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(_.isPath(t)){if(o==="start"){var[,a]=ke.first(e,t);t=a}else if(o==="end"){var[,l]=ke.last(e,t);t=l}}return ne.isRange(t)&&(o==="start"?t=ne.start(t):o==="end"?t=ne.end(t):t=_.common(t.anchor.path,t.focus.path)),at.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},t8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=w.pointRefs(e);return i.delete(o),o.current=null,l}},a=w.pointRefs(e);return a.add(o),o},r8=e=>{var t=$c.get(e);return t||(t=new Set,$c.set(e,t)),t},n8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(_.isPath(t)){var o;if(n==="end"){var[,a]=ke.last(e,t);o=a}else{var[,l]=ke.first(e,t);o=l}var i=ke.get(e,o);if(!Te.isText(i))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:n==="end"?i.text.length:0}}if(ne.isRange(t)){var[u,s]=ne.edges(t);return n==="start"?u:s}return t};function o8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:o=!1,voids:a=!1,ignoreNonSelectable:l=!1}=t;if(!r)return;var i=w.range(e,r),[u,s]=ne.edges(i),c=o?s:u,p=!1,d="",h=0,g=0,v=0;for(var[f,C]of w.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:l})){if(Le.isElement(f)){if(!a&&(e.isVoid(f)||e.isElementReadOnly(f))){yield w.start(e,C);continue}if(e.isInline(f))continue;if(w.hasInlines(e,f)){var y=_.isAncestor(C,s.path)?s:w.end(e,C),b=_.isAncestor(C,u.path)?u:w.start(e,C);d=w.string(e,{anchor:b,focus:y},{voids:a}),p=!0}}if(Te.isText(f)){var x=_.equals(C,c.path);for(x?(g=o?c.offset:f.text.length-c.offset,v=c.offset):(g=f.text.length,v=o?g:0),(x||p||n==="offset")&&(yield{path:C,offset:v},p=!1);;){if(h===0){if(d==="")break;h=B(d,n,o),d=Ys(d,h,o)[1]}if(v=o?v-h:v+h,g=g-h,g<0){h=-g;break}h=0,yield{path:C,offset:v}}}}function B(A,F,$){return F==="character"?Xs(A,$):F==="word"?j6(A,$):F==="line"||F==="block"?A.length:1}})()}var a8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var l=w.before(e,a,{voids:n});if(l){var[,i]=w.first(e,[]),u=[l.path,i];if(_.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(_.isPath(a)){var[s]=w.parent(e,a);o=p=>s.children.includes(p)}else o=()=>!0;var[c]=w.nodes(e,{reverse:!0,at:u,match:o,mode:r,voids:n});return c}}},i8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=w.rangeRefs(e);return i.delete(o),o.current=null,l}},a=w.rangeRefs(e);return a.add(o),o},l8=e=>{var t=Nc.get(e);return t||(t=new Set,Nc.set(e,t)),t},s8=(e,t,r)=>{if(ne.isRange(t)&&!r)return t;var n=w.start(e,t),o=w.end(e,r||t);return{anchor:n,focus:o}};function t0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function u8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t0(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var c8=(e,t)=>{var{selection:r}=e;if(r){var n=(c,p)=>{if(!Te.isText(c))return!1;var[d,h]=w.parent(e,p);return!e.isVoid(d)||e.markableVoid(d)},o=ne.isExpanded(r),a=!1;if(!o){var[l,i]=w.node(e,r);if(l&&n(l,i)){var[u]=w.parent(e,i);a=u&&e.markableVoid(u)}}if(o||a)ve.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var s=u8({},w.marks(e)||{});delete s[t],e.marks=s,ko.get(e)||e.onChange()}}},d8=(e,t)=>{m2.set(e,t)},f8=(e,t)=>w.point(e,t,{edge:"start"}),p8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=w.range(e,t),[a,l]=ne.edges(o),i="";for(var[u,s]of w.nodes(e,{at:o,match:Te.isText,voids:n})){var c=u.text;_.equals(s,l.path)&&(c=c.slice(0,l.offset)),_.equals(s,a.path)&&(c=c.slice(a.offset)),i+=c}return i},h8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,a]=ne.edges(t);if(o.offset!==0||a.offset!==0||ne.isCollapsed(t)||_.hasPrevious(a.path))return t;var l=w.above(e,{at:a,match:h=>Le.isElement(h)&&w.isBlock(e,h),voids:n}),i=l?l[1]:[],u=w.start(e,o),s={anchor:u,focus:a},c=!0;for(var[p,d]of w.nodes(e,{at:s,match:Te.isText,reverse:!0,voids:n})){if(c){c=!1;continue}if(p.text!==""||_.isBefore(d,i)){a={path:d,offset:p.text.length};break}}return{anchor:o,focus:a}},g8=(e,t)=>{var r=w.isNormalizing(e);w.setNormalizing(e,!1);try{t()}finally{w.setNormalizing(e,r)}w.normalize(e)},m8=(e,t,r)=>{var[n,o]=t;return Le.isElement(n)&&w.isEmpty(e,n)||Te.isText(n)&&n.text===""&&o[o.length-1]!==0},v8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};w.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:l=1,voids:i=!1}=t,{at:u=e.selection,hanging:s=!1}=t;if(u){var c=!1;if(ne.isRange(u)&&ne.isCollapsed(u)&&(c=!0,u=u.anchor),at.isPoint(u)){var p=w.void(e,{at:u,mode:"highest"});if(!i&&p){var[,d]=p;u=d}else{var h={unit:a,distance:l},g=o?w.before(e,u,h)||w.start(e,[]):w.after(e,u,h)||w.end(e,[]);u={anchor:u,focus:g},s=!0}}if(_.isPath(u)){ve.removeNodes(e,{at:u,voids:i});return}if(!ne.isCollapsed(u)){if(!s){var[,v]=ne.edges(u),f=w.end(e,[]);at.equals(v,f)||(u=w.unhangRange(e,u,{voids:i}))}var[C,y]=ne.edges(u),b=w.above(e,{match:se=>Le.isElement(se)&&w.isBlock(e,se),at:C,voids:i}),x=w.above(e,{match:se=>Le.isElement(se)&&w.isBlock(e,se),at:y,voids:i}),B=b&&x&&!_.equals(b[1],x[1]),A=_.equals(C.path,y.path),F=i?null:(r=w.void(e,{at:C,mode:"highest"}))!==null&&r!==void 0?r:w.elementReadOnly(e,{at:C,mode:"highest"}),$=i?null:(n=w.void(e,{at:y,mode:"highest"}))!==null&&n!==void 0?n:w.elementReadOnly(e,{at:y,mode:"highest"});if(F){var D=w.before(e,C);D&&b&&_.isAncestor(b[1],D.path)&&(C=D)}if($){var L=w.after(e,y);L&&x&&_.isAncestor(x[1],L.path)&&(y=L)}var N=[],T;for(var P of w.nodes(e,{at:u,voids:i})){var[S,k]=P;T&&_.compare(k,T)===0||(!i&&Le.isElement(S)&&(w.isVoid(e,S)||w.isElementReadOnly(e,S))||!_.isCommon(k,C.path)&&!_.isCommon(k,y.path))&&(N.push(P),T=k)}var O=Array.from(N,se=>{var[,re]=se;return w.pathRef(e,re)}),E=w.pointRef(e,C),I=w.pointRef(e,y),M="";if(!A&&!F){var H=E.current,[z]=w.leaf(e,H),{path:U}=H,{offset:G}=C,Y=z.text.slice(G);Y.length>0&&(e.apply({type:"remove_text",path:U,offset:G,text:Y}),M=Y)}if(O.reverse().map(se=>se.unref()).filter(se=>se!==null).forEach(se=>ve.removeNodes(e,{at:se,voids:i})),!$){var ae=I.current,[R]=w.leaf(e,ae),{path:Z}=ae,V=A?C.offset:0,K=R.text.slice(V,y.offset);K.length>0&&(e.apply({type:"remove_text",path:Z,offset:V,text:K}),M=K)}!A&&B&&I.current&&E.current&&ve.mergeNodes(e,{at:I.current,hanging:!0,voids:i}),c&&o&&a==="character"&&M.length>1&&M.match(/[\u0E00-\u0E7F]+/)&&ve.insertText(e,M.slice(0,M.length-l));var X=E.unref(),Q=I.unref(),ee=o?X||Q:Q||X;t.at==null&&ee&&ve.select(e,ee)}}})},C8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};w.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=Gs(e),batchDirty:l=!0}=r;if(t.length){if(ne.isRange(a))if(n||(a=w.unhangRange(e,a,{voids:o})),ne.isCollapsed(a))a=a.anchor;else{var[,i]=ne.edges(a);if(!o&&w.void(e,{at:i}))return;var u=w.pointRef(e,i);ve.delete(e,{at:a}),a=u.unref()}else _.isPath(a)&&(a=w.start(e,a));if(!(!o&&w.void(e,{at:a}))){var s=w.above(e,{at:a,match:Y=>Le.isElement(Y)&&w.isInline(e,Y),mode:"highest",voids:o});if(s){var[,c]=s;if(w.isEnd(e,a,c)){var p=w.after(e,c);a=p}else if(w.isStart(e,a,c)){var d=w.before(e,c);a=d}}var h=w.above(e,{match:Y=>Le.isElement(Y)&&w.isBlock(e,Y),at:a,voids:o}),[,g]=h,v=w.isStart(e,a,g),f=w.isEnd(e,a,g),C=v&&f,y=!v||v&&f,b=!f,[,x]=ke.first({children:t},[]),[,B]=ke.last({children:t},[]),A=[],F=Y=>{var[ae,R]=Y,Z=R.length===0;return Z?!1:C?!0:!(y&&_.isAncestor(R,x)&&Le.isElement(ae)&&!e.isVoid(ae)&&!e.isInline(ae)||b&&_.isAncestor(R,B)&&Le.isElement(ae)&&!e.isVoid(ae)&&!e.isInline(ae))};for(var $ of ke.nodes({children:t},{pass:F}))F($)&&A.push($);var D=[],L=[],N=[],T=!0,P=!1;for(var[S]of A)Le.isElement(S)&&!e.isInline(S)?(T=!1,P=!0,L.push(S)):T?D.push(S):N.push(S);var[k]=w.nodes(e,{at:a,match:Y=>Te.isText(Y)||w.isInline(e,Y),mode:"highest",voids:o}),[,O]=k,E=w.isStart(e,a,O),I=w.isEnd(e,a,O),M=w.pathRef(e,f&&!N.length?_.next(g):g),H=w.pathRef(e,I?_.next(O):O);ve.splitNodes(e,{at:a,match:Y=>P?Le.isElement(Y)&&w.isBlock(e,Y):Te.isText(Y)||w.isInline(e,Y),mode:P?"lowest":"highest",always:P&&(!v||D.length>0)&&(!f||N.length>0),voids:o});var z=w.pathRef(e,!E||E&&I?_.next(O):O);if(ve.insertNodes(e,D,{at:z.current,match:Y=>Te.isText(Y)||w.isInline(e,Y),mode:"highest",voids:o,batchDirty:l}),C&&!D.length&&L.length&&!N.length&&ve.delete(e,{at:g,voids:o}),ve.insertNodes(e,L,{at:M.current,match:Y=>Le.isElement(Y)&&w.isBlock(e,Y),mode:"lowest",voids:o,batchDirty:l}),ve.insertNodes(e,N,{at:H.current,match:Y=>Te.isText(Y)||w.isInline(e,Y),mode:"highest",voids:o,batchDirty:l}),!r.at){var U;if(N.length>0&&H.current?U=_.previous(H.current):L.length>0&&M.current?U=_.previous(M.current):z.current&&(U=_.previous(z.current)),U){var G=w.end(e,U);ve.select(e,G)}}z.unref(),M.unref(),H.unref()}}})},b8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")ve.select(e,n.anchor);else if(r==="focus")ve.select(e,n.focus);else if(r==="start"){var[o]=ne.edges(n);ve.select(e,o)}else if(r==="end"){var[,a]=ne.edges(n);ve.select(e,a)}}else return},y8=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},x8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:o="character",reverse:a=!1}=t,{edge:l=null}=t;if(r){l==="start"&&(l=ne.isBackward(r)?"focus":"anchor"),l==="end"&&(l=ne.isBackward(r)?"anchor":"focus");var{anchor:i,focus:u}=r,s={distance:n,unit:o,ignoreNonSelectable:!0},c={};if(l==null||l==="anchor"){var p=a?w.before(e,i,s):w.after(e,i,s);p&&(c.anchor=p)}if(l==null||l==="focus"){var d=a?w.before(e,u,s):w.after(e,u,s);d&&(c.focus=d)}ve.setSelection(e,c)}},w8=(e,t)=>{var{selection:r}=e;if(t=w.range(e,t),r){ve.setSelection(e,t);return}if(!ne.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(_t.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function r0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function n0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r0(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var D8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:o="both"}=r;if(n){o==="start"&&(o=ne.isBackward(n)?"focus":"anchor"),o==="end"&&(o=ne.isBackward(n)?"anchor":"focus");var{anchor:a,focus:l}=n,i=o==="anchor"?a:l;ve.setSelection(e,{[o==="anchor"?"anchor":"focus"]:n0(n0({},i),t)})}},E8=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!at.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!at.equals(t.focus,r.focus)||a!=="anchor"&&a!=="focus"&&t[a]!==r[a])&&(n[a]=r[a],o[a]=t[a]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}},S8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};w.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:l=!0}=r,{at:i,match:u,select:s}=r;if(ke.isNode(t)&&(t=[t]),t.length!==0){var[c]=t;if(i||(i=Gs(e),s!==!1&&(s=!0)),s==null&&(s=!1),ne.isRange(i))if(n||(i=w.unhangRange(e,i,{voids:o})),ne.isCollapsed(i))i=i.anchor;else{var[,p]=ne.edges(i),d=w.pointRef(e,p);ve.delete(e,{at:i}),i=d.unref()}if(at.isPoint(i)){u==null&&(Te.isText(c)?u=D=>Te.isText(D):e.isInline(c)?u=D=>Te.isText(D)||w.isInline(e,D):u=D=>Le.isElement(D)&&w.isBlock(e,D));var[h]=w.nodes(e,{at:i.path,match:u,mode:a,voids:o});if(h){var[,g]=h,v=w.pathRef(e,g),f=w.isEnd(e,i,g);ve.splitNodes(e,{at:i,match:u,mode:a,voids:o});var C=v.unref();i=f?_.next(C):C}else return}var y=_.parent(i),b=i[i.length-1];if(!(!o&&w.void(e,{at:y}))){if(l){var x=[],B=_.levels(y);l5(e,()=>{var D=function(){var N=y.concat(b);b++;var T={type:"insert_node",path:N,node:L};e.apply(T),i=_.next(i),x.push(T),Te.isText?B.push(...Array.from(ke.nodes(L),P=>{var[,S]=P;return N.concat(S)})):B.push(N)};for(var L of t)D()},()=>{C2(e,B,D=>{var L=D;for(var N of x)if(_.operationCanTransformPath(N)&&(L=_.transform(L,N),!L))return null;return L})})}else for(var A of t){var F=y.concat(b);b++,e.apply({type:"insert_node",path:F,node:A}),i=_.next(i)}if(i=_.previous(i),s){var $=w.end(e,i);$&&ve.select(e,$)}}}})},k8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};w.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=_.isPath(r)?io(e,r):b=>Le.isElement(b)&&w.isBlock(e,b)),!!r){var l=w.nodes(e,{at:r,match:a,mode:n,voids:o}),i=Array.from(l,b=>{var[,x]=b;return w.pathRef(e,x)});for(var u of i){var s=u.unref();if(s.length<2)throw new Error("Cannot lift node at a path [".concat(s,"] because it has a depth of less than `2`."));var c=w.node(e,_.parent(s)),[p,d]=c,h=s[s.length-1],{length:g}=p.children;if(g===1){var v=_.next(d);ve.moveNodes(e,{at:s,to:v,voids:o}),ve.removeNodes(e,{at:d,voids:o})}else if(h===0)ve.moveNodes(e,{at:s,to:d,voids:o});else if(h===g-1){var f=_.next(d);ve.moveNodes(e,{at:s,to:f,voids:o})}else{var C=_.next(s),y=_.next(d);ve.splitNodes(e,{at:C,voids:o}),ve.moveNodes(e,{at:s,to:y,voids:o})}}}})},B8=["text"],A8=["children"],b2=(e,t)=>{if(Le.isElement(t)){var r=t;return w.isVoid(e,t)?!0:r.children.length===1?b2(e,r.children[0]):!1}else return!w.isEditor(t)},F8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};w.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:l="lowest"}=t;if(n){if(r==null)if(_.isPath(n)){var[i]=w.parent(e,n);r=D=>i.children.includes(D)}else r=D=>Le.isElement(D)&&w.isBlock(e,D);if(!o&&ne.isRange(n)&&(n=w.unhangRange(e,n,{voids:a})),ne.isRange(n))if(ne.isCollapsed(n))n=n.anchor;else{var[,u]=ne.edges(n),s=w.pointRef(e,u);ve.delete(e,{at:n}),n=s.unref(),t.at==null&&ve.select(e,n)}var[c]=w.nodes(e,{at:n,match:r,voids:a,mode:l}),p=w.previous(e,{at:n,match:r,voids:a,mode:l});if(!(!c||!p)){var[d,h]=c,[g,v]=p;if(!(h.length===0||v.length===0)){var f=_.next(v),C=_.common(h,v),y=_.isSibling(h,v),b=Array.from(w.levels(e,{at:h}),D=>{var[L]=D;return L}).slice(C.length).slice(0,-1),x=w.above(e,{at:h,mode:"highest",match:D=>b.includes(D)&&b2(e,D)}),B=x&&w.pathRef(e,x[1]),A,F;if(Te.isText(d)&&Te.isText(g)){var $=jr(d,B8);F=g.text.length,A=$}else if(Le.isElement(d)&&Le.isElement(g)){var $=jr(d,A8);F=g.children.length,A=$}else throw new Error("Cannot merge the node at path [".concat(h,"] with the previous sibling because it is not the same kind: ").concat(_t.stringify(d)," ").concat(_t.stringify(g)));y||ve.moveNodes(e,{at:h,to:f,voids:a}),B&&ve.removeNodes(e,{at:B.current,voids:a}),w.shouldMergeNodesRemovePrevNode(e,p,c)?ve.removeNodes(e,{at:v,voids:a}):e.apply({type:"merge_node",path:f,position:F,properties:A}),B&&B.unref()}}}})},$8=(e,t)=>{w.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:l}=t;if(n){l==null&&(l=_.isPath(n)?io(e,n):h=>Le.isElement(h)&&w.isBlock(e,h));var i=w.pathRef(e,r),u=w.nodes(e,{at:n,match:l,mode:o,voids:a}),s=Array.from(u,h=>{var[,g]=h;return w.pathRef(e,g)});for(var c of s){var p=c.unref(),d=i.current;p.length!==0&&e.apply({type:"move_node",path:p,newPath:d}),i.current&&_.isSibling(d,p)&&_.isAfter(d,p)&&(i.current=_.next(i.current))}i.unref()}})},N8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};w.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:l}=t;if(a){l==null&&(l=_.isPath(a)?io(e,a):d=>Le.isElement(d)&&w.isBlock(e,d)),!r&&ne.isRange(a)&&(a=w.unhangRange(e,a,{voids:n}));var i=w.nodes(e,{at:a,match:l,mode:o,voids:n}),u=Array.from(i,d=>{var[,h]=d;return w.pathRef(e,h)});for(var s of u){var c=s.unref();if(c){var[p]=w.node(e,c);e.apply({type:"remove_node",path:c,node:p})}}}})},O8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};w.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:l}=r,{hanging:i=!1,mode:u="lowest",split:s=!1,voids:c=!1}=r;if(o){if(n==null&&(n=_.isPath(o)?io(e,o):F=>Le.isElement(F)&&w.isBlock(e,F)),!i&&ne.isRange(o)&&(o=w.unhangRange(e,o,{voids:c})),s&&ne.isRange(o)){if(ne.isCollapsed(o)&&w.leaf(e,o.anchor)[0].text.length>0)return;var p=w.rangeRef(e,o,{affinity:"inward"}),[d,h]=ne.edges(o),g=u==="lowest"?"lowest":"highest",v=w.isEnd(e,h,h.path);ve.splitNodes(e,{at:h,match:n,mode:g,voids:c,always:!v});var f=w.isStart(e,d,d.path);ve.splitNodes(e,{at:d,match:n,mode:g,voids:c,always:!f}),o=p.unref(),r.at==null&&ve.select(e,o)}a||(a=(F,$)=>F!==$);for(var[C,y]of w.nodes(e,{at:o,match:n,mode:u,voids:c})){var b={},x={};if(y.length!==0){var B=!1;for(var A in t)A==="children"||A==="text"||a(t[A],C[A])&&(B=!0,C.hasOwnProperty(A)&&(b[A]=C[A]),l?t[A]!=null&&(x[A]=l(C[A],t[A])):t[A]!=null&&(x[A]=t[A]));B&&e.apply({type:"set_node",path:y,properties:b,newProperties:x})}}}})},R8=(e,t)=>{if(ne.isCollapsed(t))return t.anchor;var[,r]=ne.edges(t),n=w.pointRef(e,r);return ve.delete(e,{at:t}),n.unref()},P8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};w.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:l=0,always:i=!1}=t;if(o==null&&(o=I=>Le.isElement(I)&&w.isBlock(e,I)),ne.isRange(a)&&(a=R8(e,a)),_.isPath(a)){var u=a,s=w.point(e,u),[c]=w.parent(e,u);o=I=>I===c,l=s.path.length-u.length+1,a=s,i=!0}if(a){var p=w.pointRef(e,a,{affinity:"backward"}),d;try{var[h]=w.nodes(e,{at:a,match:o,mode:r,voids:n});if(!h)return;var g=w.void(e,{at:a,mode:"highest"}),v=0;if(!n&&g){var[f,C]=g;if(Le.isElement(f)&&e.isInline(f)){var y=w.after(e,C);if(!y){var b={text:""},x=_.next(C);ve.insertNodes(e,b,{at:x,voids:n}),y=w.point(e,x)}a=y,i=!0}var B=a.path.length-C.length;l=B+1,i=!0}d=w.pointRef(e,a);var A=a.path.length-l,[,F]=h,$=a.path.slice(0,A),D=l===0?a.offset:a.path[A]+v;for(var[L,N]of w.levels(e,{at:$,reverse:!0,voids:n})){var T=!1;if(N.length<F.length||N.length===0||!n&&Le.isElement(L)&&w.isVoid(e,L))break;var P=p.current,S=w.isEnd(e,P,N);if(i||!p||!w.isEdge(e,P,N)){T=!0;var k=ke.extractProps(L);e.apply({type:"split_node",path:N,position:D,properties:k})}D=N[N.length-1]+(T||S?1:0)}if(t.at==null){var O=d.current||w.end(e,[]);ve.select(e,O)}}finally{var E;p.unref(),(E=d)===null||E===void 0||E.unref()}}})},T8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var o of t)n[o]=null;ve.setNodes(e,n,r)},M8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};w.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:l}=t;if(a){l==null&&(l=_.isPath(a)?io(e,a):d=>Le.isElement(d)&&w.isBlock(e,d)),_.isPath(a)&&(a=w.range(e,a));var i=ne.isRange(a)?w.rangeRef(e,a):null,u=w.nodes(e,{at:a,match:l,mode:r,voids:o}),s=Array.from(u,d=>{var[,h]=d;return w.pathRef(e,h)}).reverse(),c=function(){var d=p.unref(),[h]=w.node(e,d),g=w.range(e,d);n&&i&&(g=ne.intersection(i.current,g)),ve.liftNodes(e,{at:g,match:v=>Le.isAncestor(h)&&h.children.includes(v),voids:o})};for(var p of s)c();i&&i.unref()}})};function o0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function a0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o0(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var L8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};w.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:l,at:i=e.selection}=r;if(i){if(l==null&&(_.isPath(i)?l=io(e,i):e.isInline(t)?l=g=>Le.isElement(g)&&w.isInline(e,g)||Te.isText(g):l=g=>Le.isElement(g)&&w.isBlock(e,g)),o&&ne.isRange(i)){var[u,s]=ne.edges(i),c=w.rangeRef(e,i,{affinity:"inward"});ve.splitNodes(e,{at:s,match:l,voids:a}),ve.splitNodes(e,{at:u,match:l,voids:a}),i=c.unref(),r.at==null&&ve.select(e,i)}var p=Array.from(w.nodes(e,{at:i,match:e.isInline(t)?g=>Le.isElement(g)&&w.isBlock(e,g):g=>w.isEditor(g),mode:"lowest",voids:a})),d=function(){var g=ne.isRange(i)?ne.intersection(i,w.range(e,h)):i;if(!g)return 0;var v=Array.from(w.nodes(e,{at:g,match:l,mode:n,voids:a}));if(v.length>0){var[f]=v,C=v[v.length-1],[,y]=f,[,b]=C;if(y.length===0&&b.length===0)return 0;var x=_.equals(y,b)?_.parent(y):_.common(y,b),B=w.range(e,y,b),A=w.node(e,x),[F]=A,$=x.length+1,D=_.next(b.slice(0,$)),L=a0(a0({},t),{},{children:[]});ve.insertNodes(e,L,{at:D,voids:a}),ve.moveNodes(e,{at:B,match:N=>Le.isAncestor(F)&&F.children.includes(N),to:D.concat(0),voids:a})}};for(var[,h]of p)d()}})},I8=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s5(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h5(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v5(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C5(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b5(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c5(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $5(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O5(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C8(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N5(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P5(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return d5(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c8(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return u5(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f5(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return p5(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g5(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m5(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b8(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v8(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y8(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y5(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x5(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w5(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D5(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E5(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return q5(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k5(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B5(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return A5(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F5(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S8(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T5(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M5(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L5(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return I5(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return j5(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _5(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H5(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return z5(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return K5(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k8(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F8(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x8(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $8(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return U5(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Z5(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return G5(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return X5(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Y5(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e8(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Q5(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return J5(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return n8(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return t8(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r8(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o8(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a8(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s8(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i8(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return l8(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N8(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w8(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O8(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return d8(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D8(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E8(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P8(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f8(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return p8(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h8(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T8(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M8(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S5(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g8(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L8(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m8(e,...r)}};return e},Ui,i0;function j8(){if(i0)return Ui;i0=1,Ui=o;var e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",t="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",r=new RegExp("^[^"+t+"]*["+e+"]"),n=new RegExp("^[^"+e+"]*["+t+"]");function o(a){return a=String(a||""),r.test(a)?"rtl":n.test(a)?"ltr":"neutral"}return Ui}var _8=j8();const y2=vi(_8);var Zi,l0;function Qs(){if(l0)return Zi;l0=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Zi=e,Zi}var Gi,s0;function H8(){if(s0)return Gi;s0=1;var e=typeof la=="object"&&la&&la.Object===Object&&la;return Gi=e,Gi}var Xi,u0;function x2(){if(u0)return Xi;u0=1;var e=H8(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Xi=r,Xi}var Yi,c0;function z8(){if(c0)return Yi;c0=1;var e=x2(),t=function(){return e.Date.now()};return Yi=t,Yi}var Qi,d0;function K8(){if(d0)return Qi;d0=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Qi=t,Qi}var Ji,f0;function W8(){if(f0)return Ji;f0=1;var e=K8(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Ji=r,Ji}var el,p0;function w2(){if(p0)return el;p0=1;var e=x2(),t=e.Symbol;return el=t,el}var tl,h0;function V8(){if(h0)return tl;h0=1;var e=w2(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(l){var i=r.call(l,o),u=l[o];try{l[o]=void 0;var s=!0}catch{}var c=n.call(l);return s&&(i?l[o]=u:delete l[o]),c}return tl=a,tl}var rl,g0;function q8(){if(g0)return rl;g0=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return rl=r,rl}var nl,m0;function U8(){if(m0)return nl;m0=1;var e=w2(),t=V8(),r=q8(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function l(i){return i==null?i===void 0?o:n:a&&a in Object(i)?t(i):r(i)}return nl=l,nl}var ol,v0;function Z8(){if(v0)return ol;v0=1;function e(t){return t!=null&&typeof t=="object"}return ol=e,ol}var al,C0;function G8(){if(C0)return al;C0=1;var e=U8(),t=Z8(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return al=n,al}var il,b0;function X8(){if(b0)return il;b0=1;var e=W8(),t=Qs(),r=G8(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,i=parseInt;function u(s){if(typeof s=="number")return s;if(r(s))return n;if(t(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=t(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=e(s);var p=a.test(s);return p||l.test(s)?i(s.slice(2),p?2:8):o.test(s)?n:+s}return il=u,il}var ll,y0;function D2(){if(y0)return ll;y0=1;var e=Qs(),t=z8(),r=X8(),n="Expected a function",o=Math.max,a=Math.min;function l(i,u,s){var c,p,d,h,g,v,f=0,C=!1,y=!1,b=!0;if(typeof i!="function")throw new TypeError(n);u=r(u)||0,e(s)&&(C=!!s.leading,y="maxWait"in s,d=y?o(r(s.maxWait)||0,u):d,b="trailing"in s?!!s.trailing:b);function x(P){var S=c,k=p;return c=p=void 0,f=P,h=i.apply(k,S),h}function B(P){return f=P,g=setTimeout($,u),C?x(P):h}function A(P){var S=P-v,k=P-f,O=u-S;return y?a(O,d-k):O}function F(P){var S=P-v,k=P-f;return v===void 0||S>=u||S<0||y&&k>=d}function $(){var P=t();if(F(P))return D(P);g=setTimeout($,A(P))}function D(P){return g=void 0,b&&c?x(P):(c=p=void 0,h)}function L(){g!==void 0&&clearTimeout(g),f=0,c=v=p=g=void 0}function N(){return g===void 0?h:D(t())}function T(){var P=t(),S=F(P);if(c=arguments,p=this,v=P,S){if(g===void 0)return B(v);if(y)return clearTimeout(g),g=setTimeout($,u),x(v)}return g===void 0&&(g=setTimeout($,u)),h}return T.cancel=L,T.flush=N,T}return ll=l,ll}var Y8=D2();const Q8=vi(Y8);var sl,x0;function J8(){if(x0)return sl;x0=1;var e=D2(),t=Qs(),r="Expected a function";function n(o,a,l){var i=!0,u=!0;if(typeof o!="function")throw new TypeError(r);return t(l)&&(i="leading"in l?!!l.leading:i,u="trailing"in l?!!l.trailing:u),e(o,a,{leading:i,maxWait:a,trailing:u})}return sl=n,sl}var eC=J8();const tC=vi(eC),w0=e=>typeof e=="object"&&e!=null&&e.nodeType===1,D0=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",ca=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return D0(r.overflowY,t)||D0(r.overflowX,t)||(n=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},da=(e,t,r,n,o,a,l,i)=>a<e&&l>t||a>e&&l<t?0:a<=e&&i<=r||l>=t&&i>=r?a-e-n:l>t&&i<r||a<e&&i>r?l-t+o:0,rC=e=>e.parentElement??(e.getRootNode().host||null),E0=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:l,block:i,inline:u,boundary:s,skipOverflowHiddenElements:c}=t,p=typeof s=="function"?s:O=>O!==s;if(!w0(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let g=e;for(;w0(g)&&p(g);){if(g=rC(g),g===d){h.push(g);break}g!=null&&g===document.body&&ca(g)&&!ca(document.documentElement)||g!=null&&ca(g,c)&&h.push(g)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,f=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:C,scrollY:y}=window,{height:b,width:x,top:B,right:A,bottom:F,left:$}=e.getBoundingClientRect(),{top:D,right:L,bottom:N,left:T}=(O=>{const E=window.getComputedStyle(O);return{top:parseFloat(E.scrollMarginTop)||0,right:parseFloat(E.scrollMarginRight)||0,bottom:parseFloat(E.scrollMarginBottom)||0,left:parseFloat(E.scrollMarginLeft)||0}})(e);let P=i==="start"||i==="nearest"?B-D:i==="end"?F+N:B+b/2-D+N,S=u==="center"?$+x/2-T+L:u==="end"?A+L:$-T;const k=[];for(let O=0;O<h.length;O++){const E=h[O],{height:I,width:M,top:H,right:z,bottom:U,left:G}=E.getBoundingClientRect();if(l==="if-needed"&&B>=0&&$>=0&&F<=f&&A<=v&&(E===d&&!ca(E)||B>=H&&F<=U&&$>=G&&A<=z))return k;const Y=getComputedStyle(E),ae=parseInt(Y.borderLeftWidth,10),R=parseInt(Y.borderTopWidth,10),Z=parseInt(Y.borderRightWidth,10),V=parseInt(Y.borderBottomWidth,10);let K=0,X=0;const Q="offsetWidth"in E?E.offsetWidth-E.clientWidth-ae-Z:0,ee="offsetHeight"in E?E.offsetHeight-E.clientHeight-R-V:0,se="offsetWidth"in E?E.offsetWidth===0?0:M/E.offsetWidth:0,re="offsetHeight"in E?E.offsetHeight===0?0:I/E.offsetHeight:0;if(d===E)K=i==="start"?P:i==="end"?P-f:i==="nearest"?da(y,y+f,f,R,V,y+P,y+P+b,b):P-f/2,X=u==="start"?S:u==="center"?S-v/2:u==="end"?S-v:da(C,C+v,v,ae,Z,C+S,C+S+x,x),K=Math.max(0,K+y),X=Math.max(0,X+C);else{K=i==="start"?P-H-R:i==="end"?P-U+V+ee:i==="nearest"?da(H,U,I,R,V+ee,P,P+b,b):P-(H+I/2)+ee/2,X=u==="start"?S-G-ae:u==="center"?S-(G+M/2)+Q/2:u==="end"?S-z+Z+Q:da(G,z,M,ae,Z+Q,S,S+x,x);const{scrollLeft:oe,scrollTop:ge}=E;K=re===0?0:Math.max(0,Math.min(ge+K/re,E.scrollHeight-I/re+ee)),X=se===0?0:Math.max(0,Math.min(oe+X/se,E.scrollWidth-M/se+Q)),P+=ge-K,S+=oe-X}k.push({el:E,top:K,left:X})}return k},nC=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function oC(e,t){if(!e.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(e))return;const r=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(E0(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:l}of E0(e,nC(t))){const i=a-r.top+r.bottom,u=l-r.left+r.right;o.scroll({top:i,left:u,behavior:n})}}var pn=[],aC=function(){return pn.some(function(e){return e.activeTargets.length>0})},iC=function(){return pn.some(function(e){return e.skippedTargets.length>0})},S0="ResizeObserver loop completed with undelivered notifications.",lC=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:S0}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=S0),window.dispatchEvent(e)},_o;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(_o||(_o={}));var hn=function(e){return Object.freeze(e)},sC=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,hn(this)}return e})(),E2=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,hn(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,l=t.bottom,i=t.left,u=t.width,s=t.height;return{x:r,y:n,top:o,right:a,bottom:l,left:i,width:u,height:s}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),Js=function(e){return e instanceof SVGElement&&"getBBox"in e},S2=function(e){if(Js(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,l=o.offsetHeight;return!(a||l||e.getClientRects().length)},k0=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},uC=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Bo=typeof window<"u"?window:{},fa=new WeakMap,B0=/auto|scroll/,cC=/^tb|vertical/,dC=/msie|trident/i.test(Bo.navigator&&Bo.navigator.userAgent),wr=function(e){return parseFloat(e||"0")},Hn=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new sC((r?t:e)||0,(r?e:t)||0)},A0=hn({devicePixelContentBoxSize:Hn(),borderBoxSize:Hn(),contentBoxSize:Hn(),contentRect:new E2(0,0,0,0)}),k2=function(e,t){if(t===void 0&&(t=!1),fa.has(e)&&!t)return fa.get(e);if(S2(e))return fa.set(e,A0),A0;var r=getComputedStyle(e),n=Js(e)&&e.ownerSVGElement&&e.getBBox(),o=!dC&&r.boxSizing==="border-box",a=cC.test(r.writingMode||""),l=!n&&B0.test(r.overflowY||""),i=!n&&B0.test(r.overflowX||""),u=n?0:wr(r.paddingTop),s=n?0:wr(r.paddingRight),c=n?0:wr(r.paddingBottom),p=n?0:wr(r.paddingLeft),d=n?0:wr(r.borderTopWidth),h=n?0:wr(r.borderRightWidth),g=n?0:wr(r.borderBottomWidth),v=n?0:wr(r.borderLeftWidth),f=p+s,C=u+c,y=v+h,b=d+g,x=i?e.offsetHeight-b-e.clientHeight:0,B=l?e.offsetWidth-y-e.clientWidth:0,A=o?f+y:0,F=o?C+b:0,$=n?n.width:wr(r.width)-A-B,D=n?n.height:wr(r.height)-F-x,L=$+f+B+y,N=D+C+x+b,T=hn({devicePixelContentBoxSize:Hn(Math.round($*devicePixelRatio),Math.round(D*devicePixelRatio),a),borderBoxSize:Hn(L,N,a),contentBoxSize:Hn($,D,a),contentRect:new E2(p,u,$,D)});return fa.set(e,T),T},B2=function(e,t,r){var n=k2(e,r),o=n.borderBoxSize,a=n.contentBoxSize,l=n.devicePixelContentBoxSize;switch(t){case _o.DEVICE_PIXEL_CONTENT_BOX:return l;case _o.BORDER_BOX:return o;default:return a}},fC=(function(){function e(t){var r=k2(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=hn([r.borderBoxSize]),this.contentBoxSize=hn([r.contentBoxSize]),this.devicePixelContentBoxSize=hn([r.devicePixelContentBoxSize])}return e})(),A2=function(e){if(S2(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},pC=function(){var e=1/0,t=[];pn.forEach(function(a){if(a.activeTargets.length!==0){var l=[];a.activeTargets.forEach(function(i){var u=new fC(i.target),s=A2(i.target);l.push(u),i.lastReportedSize=B2(i.target,i.observedBox),s<e&&(e=s)}),t.push(function(){a.callback.call(a.observer,l,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},F0=function(e){pn.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(A2(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},hC=function(){var e=0;for(F0(e);aC();)e=pC(),F0(e);return iC()&&lC(),e>0},ul,F2=[],gC=function(){return F2.splice(0).forEach(function(e){return e()})},mC=function(e){if(!ul){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return gC()}).observe(r,n),ul=function(){r.textContent="".concat(t?t--:t++)}}F2.push(e),ul()},vC=function(e){mC(function(){requestAnimationFrame(e)})},ka=0,CC=function(){return!!ka},bC=250,yC={attributes:!0,characterData:!0,childList:!0,subtree:!0},$0=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],N0=function(e){return e===void 0&&(e=0),Date.now()+e},cl=!1,xC=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=bC),!cl){cl=!0;var n=N0(t);vC(function(){var o=!1;try{o=hC()}finally{if(cl=!1,t=n-N0(),!CC())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,yC)};document.body?r():Bo.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),$0.forEach(function(r){return Bo.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),$0.forEach(function(r){return Bo.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Ql=new xC,O0=function(e){!ka&&e>0&&Ql.start(),ka+=e,!ka&&Ql.stop()},wC=function(e){return!Js(e)&&!uC(e)&&getComputedStyle(e).display==="inline"},DC=(function(){function e(t,r){this.target=t,this.observedBox=r||_o.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=B2(this.target,this.observedBox,!0);return wC(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),EC=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),pa=new WeakMap,R0=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},ha=(function(){function e(){}return e.connect=function(t,r){var n=new EC(t,r);pa.set(t,n)},e.observe=function(t,r,n){var o=pa.get(t),a=o.observationTargets.length===0;R0(o.observationTargets,r)<0&&(a&&pn.push(o),o.observationTargets.push(new DC(r,n&&n.box)),O0(1),Ql.schedule())},e.unobserve=function(t,r){var n=pa.get(t),o=R0(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&pn.splice(pn.indexOf(n),1),n.observationTargets.splice(o,1),O0(-1))},e.disconnect=function(t){var r=this,n=pa.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),SC=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ha.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!k0(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ha.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!k0(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ha.unobserve(this,t)},e.prototype.disconnect=function(){ha.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),pr={},P0;function kC(){if(P0)return pr;P0=1,Object.defineProperty(pr,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},n={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)n["f"+o]=111+o;function a(d,h,g){h&&!("byKey"in h)&&(g=h,h=null),Array.isArray(d)||(d=[d]);var v=d.map(function(y){return u(y,h)}),f=function(y){return v.some(function(b){return s(b,y)})},C=g==null?f:f(g);return C}function l(d,h){return a(d,h)}function i(d,h){return a(d,{byKey:!0},h)}function u(d,h){var g=h&&h.byKey,v={};d=d.replace("++","+add");var f=d.split("+"),C=f.length;for(var y in t)v[t[y]]=!1;var b=!0,x=!1,B=void 0;try{for(var A=f[Symbol.iterator](),F;!(b=(F=A.next()).done);b=!0){var $=F.value,D=$.endsWith("?")&&$.length>1;D&&($=$.slice(0,-1));var L=p($),N=t[L];if($.length>1&&!N&&!r[$]&&!n[L])throw new TypeError('Unknown modifier: "'+$+'"');(C===1||!N)&&(g?v.key=L:v.which=c($)),N&&(v[N]=D?null:!0)}}catch(T){x=!0,B=T}finally{try{!b&&A.return&&A.return()}finally{if(x)throw B}}return v}function s(d,h){for(var g in d){var v=d[g],f=void 0;if(v!=null&&(g==="key"&&h.key!=null?f=h.key.toLowerCase():g==="which"?f=v===91&&h.which===93?91:h.which:f=h[g],!(f==null&&v===!1)&&f!==v))return!1}return!0}function c(d){d=p(d);var h=n[d]||d.toUpperCase().charCodeAt(0);return h}function p(d){return d=d.toLowerCase(),d=r[d]||d,d}return pr.default=a,pr.isHotkey=a,pr.isCodeHotkey=l,pr.isKeyHotkey=i,pr.parseHotkey=u,pr.compareHotkey=s,pr.toKeyCode=c,pr.toKeyName=p,pr}var dl=kC();function BC(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function qn(e,t){if(e==null)return{};var r=BC(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ho(e){"@babel/helpers - typeof";return Ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ho(e)}function AC(e,t){if(Ho(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ho(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FC(e){var t=AC(e,"string");return Ho(t)==="symbol"?t:String(t)}function dr(e,t,r){return t=FC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var eu=Ar(null),tn=()=>{var e=Jn(eu);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},fl,pl,$2=parseInt(pe.version.split(".")[0],10),N2=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,T0=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Yt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Mn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),un=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),$C=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),O2=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),NC=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),OC=Yt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),RC=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),PC=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),TC=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Ba=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(fl=navigator.userAgent.match(/Version\/(\d+)/))!==null&&fl!==void 0&&fl[1]&&parseInt((pl=navigator.userAgent.match(/Version\/(\d+)/))===null||pl===void 0?void 0:pl[1],10)<17;var Kr=(!NC||!OC)&&!$C&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",zn=new WeakMap,tu=new WeakMap,ru=new WeakMap,R2=new WeakMap,Aa=new WeakMap,Jl=new WeakMap,zo=new WeakMap,gn=new WeakMap,Qa=new WeakMap,xi=new WeakMap,es=new WeakMap,Gr=new WeakMap,dn=new WeakMap,Ao=new WeakMap,ts=new WeakMap,nu=new WeakMap,gr=new WeakMap,Mr=new WeakMap,rr=new WeakMap,Ur=new WeakMap,Zr=new WeakMap,P2=new WeakMap,Un=Symbol("placeholder"),T2=Symbol("mark-placeholder"),M2=globalThis.Node,MC=globalThis.Text,ou=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,LC=e=>Qr(e)&&e.nodeType===8,cr=e=>Qr(e)&&e.nodeType===1,Qr=e=>{var t=ou(e);return!!t&&e instanceof t.Node},rs=e=>{var t=e&&e.anchorNode&&ou(e.anchorNode);return!!t&&e instanceof t.Selection},L2=e=>Qr(e)&&e.nodeType===3,IC=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,jC=e=>{var[t,r]=e;if(cr(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=I2(t,o,n?"backward":"forward"),n=o<r;cr(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=HC(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},_C=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},I2=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,l=!1,i=!1;(LC(o)||cr(o)&&o.childNodes.length===0||cr(o)&&o.getAttribute("contenteditable")==="false")&&!(l&&i);){if(a>=n.length){l=!0,a=t-1,r="backward";continue}if(a<0){i=!0,a=t+1,r="forward";continue}o=n[a],t=a,a+=r==="forward"?1:-1}return[o,t]},HC=(e,t,r)=>{var[n]=I2(e,t,r);return n},j2=e=>{var t="";if(L2(e)&&e.nodeValue)return e.nodeValue;if(cr(e)){for(var r of Array.from(e.childNodes))t+=j2(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
103
|
+
`)}return t},zC=/data-slate-fragment="(.+?)"/m,KC=e=>{var t=e.getData("text/html"),[,r]=t.match(zC)||[];return r},Fo=e=>e.getSelection!=null?e.getSelection():document.getSelection(),au=(e,t,r)=>{var{target:n}=t;if(cr(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=ue.getWindow(e);if(o.contains(n))return ue.hasDOMNode(e,n,{editable:!0});var a=r.find(l=>{var{addedNodes:i,removedNodes:u}=l;for(var s of i)if(s===n||s.contains(n))return!0;for(var c of u)if(c===n||c.contains(n))return!0});return!a||a===t?!1:au(e,a,r)},WC=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(r=e.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var t,r,n;e=(n=e)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return e},M0=(e,t)=>!!(e.compareDocumentPosition(t)&M2.DOCUMENT_POSITION_PRECEDING),VC=(e,t)=>!!(e.compareDocumentPosition(t)&M2.DOCUMENT_POSITION_FOLLOWING),qC=0;class UC{constructor(){dr(this,"id",void 0),this.id="".concat(qC++)}}var ue={androidPendingDiffs:e=>rr.get(e),androidScheduleFlush:e=>{var t;(t=nu.get(e))===null||t===void 0||t()},blur:e=>{var t=ue.toDOMNode(e,e),r=ue.findDocumentOrShadowRoot(e);Gr.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=ue.findDocumentOrShadowRoot(e),n=Fo(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&ve.deselect(e)},findDocumentOrShadowRoot:e=>{var t=ue.toDOMNode(e,e),r=t.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:r,clientY:n,target:o}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var a=ue.toSlateNode(e,t.target),l=ue.findPath(e,a);if(Le.isElement(a)&&w.isVoid(e,a)){var i=o.getBoundingClientRect(),u=e.isInline(a)?r-i.left<i.left+i.width-r:n-i.top<i.top+i.height-n,s=w.point(e,l,{edge:u?"start":"end"}),c=u?w.before(e,s):w.after(e,s);if(c){var p=w.range(e,c);return p}}var d,{document:h}=ue.getWindow(e);if(h.caretRangeFromPoint)d=h.caretRangeFromPoint(r,n);else{var g=h.caretPositionFromPoint(r,n);g&&(d=h.createRange(),d.setStart(g.offsetNode,g.offset),d.setEnd(g.offsetNode,g.offset))}if(!d)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var v=ue.toSlateRange(e,d,{exactMatch:!1,suppressThrow:!1});return v},findKey:(e,t)=>{var r=Qa.get(t);return r||(r=new UC,Qa.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=ru.get(n);if(o==null){if(w.isEditor(n))return r;break}var a=tu.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(_t.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Gr.get(e)){if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{ue.focus(e,{retries:t.retries-1})},10);return}var r=ue.toDOMNode(e,e),n=ue.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Fo(n),a=ue.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||ve.select(e,w.start(e,[])),Gr.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=R2.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:n=!1}=r,o=ue.toDOMNode(e,e),a;try{a=cr(t)?t:t.parentElement}catch(l){if(l instanceof Error&&!l.message.includes('Permission denied to access property "nodeType"'))throw l}return a?a.closest("[data-slate-editor]")===o&&(!n||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&a.closest('[contenteditable="false"]')===o||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>Qr(t)&&ue.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return w.hasPath(e,r.path)&&w.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>ue.hasEditableTarget(e,t)||ue.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Qr(t)&&ue.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!dn.get(e),isFocused:e=>!!Gr.get(e),isReadOnly:e=>!!es.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(es.get(e))return!1;var r=ue.hasTarget(e,t)&&ue.toSlateNode(e,t);return Le.isElement(r)&&w.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=xi.get(e),n=w.isEditor(t)?Aa.get(e):r==null?void 0:r.get(ue.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(_t.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=w.node(e,t.path),n=ue.toDOMNode(e,r),o;w.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",l=Array.from(n.querySelectorAll(a)),i=0,u=0;u<l.length;u++){var s=l[u],c=s.childNodes[0];if(!(c==null||c.textContent==null)){var{length:p}=c.textContent,d=s.getAttribute("data-slate-length"),h=d==null?p:parseInt(d,10),g=i+h,v=l[u+1];if(t.offset===g&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var f,C=v.childNodes[0];o=[C instanceof MC?C:v,(f=v.textContent)!==null&&f!==void 0&&f.startsWith("\uFEFF")?1:0];break}if(t.offset<=g){var y=Math.min(p,Math.max(0,t.offset-i));o=[c,y];break}i=g}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(_t.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=ne.isBackward(t),a=ue.toDOMPoint(e,r),l=ne.isCollapsed(t)?a:ue.toDOMPoint(e,n),i=ue.getWindow(e),u=i.document.createRange(),[s,c]=o?l:a,[p,d]=o?a:l,h=cr(s)?s:s.parentElement,g=!!h.getAttribute("data-slate-zero-width"),v=cr(p)?p:p.parentElement,f=!!v.getAttribute("data-slate-zero-width");return u.setStart(s,g?1:c),u.setEnd(p,f?1:d),u},toSlateNode:(e,t)=>{var r=cr(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?zo.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(e,t,r)=>{var{exactMatch:n,suppressThrow:o,searchDirection:a="backward"}=r,[l,i]=n?t:jC(t),u=l.parentNode,s=null,c=0;if(u){var p,d,h=ue.toDOMNode(e,e),g=u.closest('[data-slate-void="true"]'),v=g&&h.contains(g)?g:null,f=u.closest('[contenteditable="false"]'),C=f&&h.contains(f)?f:null,y=u.closest("[data-slate-leaf]"),b=null;if(y){if(s=y.closest('[data-slate-node="text"]'),s){var x=ue.getWindow(e),B=x.document.createRange();B.setStart(s,0),B.setEnd(l,i);var A=B.cloneContents(),F=[...Array.prototype.slice.call(A.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(A.querySelectorAll("[contenteditable=false]"))];F.forEach(G=>{if(Yt&&!n&&G.hasAttribute("data-slate-zero-width")&&G.textContent.length>0&&G.textContext!=="\uFEFF"){G.textContent.startsWith("\uFEFF")&&(G.textContent=G.textContent.slice(1));return}G.parentNode.removeChild(G)}),c=A.textContent.length,b=s}}else if(v){for(var $=v.querySelectorAll("[data-slate-leaf]"),D=0;D<$.length;D++){var L=$[D];if(ue.hasDOMNode(e,L)){y=L;break}}y?(s=y.closest('[data-slate-node="text"]'),b=y,c=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(G=>{c-=G.textContent.length})):c=1}else if(C){var N=G=>G?G.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],T=C.closest('[data-slate-node="element"]');if(a==="forward"){var P,S=[...N(T),...N(T==null?void 0:T.nextElementSibling)];y=(P=S.find(G=>VC(C,G)))!==null&&P!==void 0?P:null}else{var k,O=[...N(T==null?void 0:T.previousElementSibling),...N(T)];y=(k=O.findLast(G=>M0(C,G)))!==null&&k!==void 0?k:null}y&&(s=y.closest('[data-slate-node="text"]'),b=y,a==="forward"?c=0:(c=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(G=>{c-=G.textContent.length})))}b&&c===b.textContent.length&&Yt&&b.getAttribute("data-slate-zero-width")==="z"&&(p=b.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Mn&&(d=b.textContent)!==null&&d!==void 0&&d.endsWith(`
|
|
104
|
+
|
|
105
|
+
`))&&c--}if(Yt&&!s&&!n){var E=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(E&&ue.hasDOMNode(e,E,{editable:!0})){var I=ue.toSlateNode(e,E),{path:M,offset:H}=w.start(e,ue.findPath(e,I));return E.querySelector("[data-slate-leaf]")||(H=i),{path:M,offset:H}}}if(!s){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var z=ue.toSlateNode(e,s),U=ue.findPath(e,z);return{path:U,offset:c}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,l=rs(t)?t.anchorNode:t.startContainer,i,u,s,c,p;if(l)if(rs(t)){if(Mn&&t.rangeCount>1){s=t.focusNode;var d=t.getRangeAt(0),h=t.getRangeAt(t.rangeCount-1);if(s instanceof HTMLTableRowElement&&d.startContainer instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement){let A=function(F){return F.childElementCount>0?A(F.children[0]):F};var g=d.startContainer,v=h.startContainer,f=A(g.children[d.startOffset]),C=A(v.children[h.startOffset]);c=0,C.childNodes.length>0?i=C.childNodes[0]:i=C,f.childNodes.length>0?s=f.childNodes[0]:s=f,C instanceof HTMLElement?u=C.innerHTML.length:u=0}else d.startContainer===s?(i=h.endContainer,u=h.endOffset,c=d.startOffset):(i=d.startContainer,u=d.endOffset,c=h.startOffset)}else i=t.anchorNode,u=t.anchorOffset,s=t.focusNode,c=t.focusOffset;O2&&_C(i)||Mn?p=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:p=t.isCollapsed}else i=t.startContainer,u=t.startOffset,s=t.endContainer,c=t.endOffset,p=t.collapsed;if(i==null||s==null||u==null||c==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Mn&&(n=s.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
106
|
+
|
|
107
|
+
`)&&c===s.textContent.length&&c--;var y=ue.toSlatePoint(e,[i,u],{exactMatch:o,suppressThrow:a});if(!y)return null;var b=M0(i,s)||i===s&&c<u,x=p?y:ue.toSlatePoint(e,[s,c],{exactMatch:o,suppressThrow:a,searchDirection:b?"forward":"backward"});if(!x)return null;var B={anchor:y,focus:x};return ne.isExpanded(B)&&ne.isForward(B)&&cr(s)&&w.void(e,{at:B.focus,mode:"highest"})&&(B=w.unhangRange(e,B,{voids:!0})),B}};function ZC(e,t){var{path:r,diff:n}=t;if(!w.hasPath(e,r))return!1;var o=ke.get(e,r);if(!Te.isText(o))return!1;if(n.start!==o.text.length||n.text.length===0)return o.text.slice(n.start,n.start+n.text.length)===n.text;var a=_.next(r);if(!w.hasPath(e,a))return!1;var l=ke.get(e,a);return Te.isText(l)&&l.text.startsWith(n.text)}function _2(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((o,a)=>o.slice(0,a.start)+a.text+o.slice(a.end),e)}function GC(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n))return n;return r}function XC(e,t,r){for(var n=Math.min(e.length,t.length,r),o=0;o<n;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return n}function H2(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),l=GC(a,o),i=Math.min(a.length-l,o.length-l),u=XC(a,o,i),s={start:r+l,end:n-u,text:o.slice(l,o.length-u)};return s.start===s.end&&s.text.length===0?null:s}function YC(e,t,r){var n=Math.min(t.start,r.start),o=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),a=_2(e,t,r),l=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),i=a.slice(n,l),u=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return H2(e,{start:n,end:u,text:i})}function QC(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function ns(e,t){var{path:r,offset:n}=t;if(!w.hasPath(e,r))return null;var o=ke.get(e,r);if(!Te.isText(o))return null;var a=w.above(e,{match:i=>Le.isElement(i)&&w.isBlock(e,i),at:r});if(!a)return null;for(;n>o.text.length;){var l=w.next(e,{at:r,match:Te.isText});if(!l||!_.isDescendant(l[1],a[1]))return null;n-=o.text.length,o=l[0],r=l[1]}return{path:r,offset:n}}function L0(e,t){var r=ns(e,t.anchor);if(!r)return null;if(ne.isCollapsed(t))return{anchor:r,focus:r};var n=ns(e,t.focus);return n?{anchor:r,focus:n}:null}function os(e,t,r){var n=rr.get(e),o=n==null?void 0:n.find(c=>{var{path:p}=c;return _.equals(p,t.path)});if(!o||t.offset<=o.diff.start)return at.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var l={path:t.path,offset:a.start},i=at.transform(l,r,{affinity:"backward"});return i?{path:i.path,offset:i.offset+t.offset-a.start}:null}var u={path:t.path,offset:t.offset-a.text.length+a.end-a.start},s=at.transform(u,r,{affinity:"backward"});return s?r.type==="split_node"&&_.equals(r.path,t.path)&&u.offset<r.position&&a.start<r.position?s:{path:s.path,offset:s.offset+a.text.length-a.end+a.start}:null}function I0(e,t,r){var n=os(e,t.anchor,r);if(!n)return null;if(ne.isCollapsed(t))return{anchor:n,focus:n};var o=os(e,t.focus,r);return o?{anchor:n,focus:o}:null}function JC(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!_.equals(t.path,r)||t.offset>=n.end?e:t.offset<=n.start?{diff:{start:t.text.length+n.start,end:t.text.length+n.end,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:o,path:r};case"remove_text":return!_.equals(t.path,r)||t.offset>=n.end?e:t.offset+t.text.length<=n.start?{diff:{start:n.start-t.text.length,end:n.end-t.text.length,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:o,path:r};case"split_node":return!_.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:_.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:o,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:o,path:_.transform(r,t,{affinity:"forward"})};case"merge_node":return _.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:_.transform(r,t)}:{diff:n,id:o,path:_.transform(r,t)}}var a=_.transform(r,t);return a?{diff:n,path:a,id:o}:null}function j0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ga(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j0(Object(r),!0).forEach(function(n){dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var e7=25,t7=200,r7=function(){},n7=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function o7(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,l=null,i=null,u=0,s=!1,c=()=>{var T=Zr.get(t);if(Zr.delete(t),T){var{selection:P}=t,S=L0(t,T);S&&(!P||!ne.equals(S,P))&&ve.select(t,S)}},p=()=>{var T=Ur.get(t);if(Ur.delete(t),!!T){if(T.at){var P=at.isPoint(T.at)?ns(t,T.at):L0(t,T.at);if(!P)return;var S=w.range(t,P);(!t.selection||!ne.equals(t.selection,S))&&ve.select(t,P)}T.run()}},d=()=>{if(l&&(clearTimeout(l),l=null),i&&(clearTimeout(i),i=null),!x()&&!b()){c();return}o||(o=!0,setTimeout(()=>o=!1)),b()&&(o="action");var T=t.selection&&w.rangeRef(t,t.selection,{affinity:"forward"});Mr.set(t,t.marks),r7("flush",Ur.get(t),rr.get(t));for(var P=x(),S;S=(k=rr.get(t))===null||k===void 0?void 0:k[0];){var k,O,E=gr.get(t);E!==void 0&&(gr.delete(t),t.marks=E),E&&s===!1&&(s=null);var I=QC(S);(!t.selection||!ne.equals(t.selection,I))&&ve.select(t,I),S.diff.text?w.insertText(t,S.diff.text):w.deleteFragment(t),rr.set(t,(O=rr.get(t))===null||O===void 0?void 0:O.filter(z=>{var{id:U}=z;return U!==S.id})),ZC(t,S)||(P=!1,Ur.delete(t),Mr.delete(t),o="action",Zr.delete(t),r.cancel(),n.cancel(),T==null||T.unref())}var M=T==null?void 0:T.unref();if(M&&!Zr.get(t)&&(!t.selection||!ne.equals(M,t.selection))&&ve.select(t,M),b()){p();return}P&&r(),r.flush(),n.flush(),c();var H=Mr.get(t);Mr.delete(t),H!==void 0&&(t.marks=H,t.onChange())},h=T=>{a&&clearTimeout(a),a=setTimeout(()=>{dn.set(t,!1),d()},e7)},g=T=>{dn.set(t,!0),a&&(clearTimeout(a),a=null)},v=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,P=Jl.get(t);if(P){if(x()||T){P.style.display="none";return}P.style.removeProperty("display")}},f=(T,P)=>{var S,k=(S=rr.get(t))!==null&&S!==void 0?S:[];rr.set(t,k);var O=ke.leaf(t,T),E=k.findIndex(H=>_.equals(H.path,T));if(E<0){var I=H2(O.text,P);I&&k.push({path:T,diff:P,id:u++}),v();return}var M=YC(O.text,k[E].diff,P);if(!M){k.splice(E,1),v();return}k[E]=ga(ga({},k[E]),{},{diff:M})},C=function(T){var{at:P}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s=!1,Zr.delete(t),r.cancel(),n.cancel(),b()&&d(),Ur.set(t,{at:P,run:T}),i=setTimeout(d)},y=T=>{var P;if(l&&(clearTimeout(l),l=null),!zn.get(t)){var{inputType:S}=T,k=null,O=T.dataTransfer||T.data||void 0;s!==!1&&S!=="insertText"&&S!=="insertCompositionText"&&(s=!1);var[E]=T.getTargetRanges();E&&(k=ue.toSlateRange(t,E,{exactMatch:!1,suppressThrow:!0}));var I=ue.getWindow(t),M=I.getSelection();if(!k&&M&&(E=M,k=ue.toSlateRange(t,M,{exactMatch:!1,suppressThrow:!0})),k=(P=k)!==null&&P!==void 0?P:t.selection,!!k){var H=!0;if(S.startsWith("delete")){if(ne.isExpanded(k)){var[z,U]=ne.edges(k),G=ke.leaf(t,z.path);if(G.text.length===z.offset&&U.offset===0){var Y=w.next(t,{at:z.path,match:Te.isText});Y&&_.equals(Y[1],U.path)&&(k={anchor:U,focus:U})}}var ae=S.endsWith("Backward")?"backward":"forward",[R,Z]=ne.edges(k),[V,K]=w.leaf(t,R.path),X={text:"",start:R.offset,end:Z.offset},Q=rr.get(t),ee=Q==null?void 0:Q.find(Xe=>_.equals(Xe.path,K)),se=ee?[ee.diff,X]:[X],re=_2(V.text,...se);if(re.length===0&&(H=!1),ne.isExpanded(k)){if(H&&_.equals(k.anchor.path,k.focus.path)){var oe={path:k.anchor.path,offset:R.offset},ge=w.range(t,oe,oe);return F(ge),f(k.anchor.path,{text:"",end:Z.offset,start:R.offset})}return C(()=>w.deleteFragment(t,{direction:ae}),{at:k})}}switch(S){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return C(()=>w.deleteFragment(t),{at:k});case"deleteContent":case"deleteContentForward":{var{anchor:ce}=k;if(H&&ne.isCollapsed(k)){var Ee=ke.leaf(t,ce.path);if(ce.offset<Ee.text.length)return f(ce.path,{text:"",start:ce.offset,end:ce.offset+1})}return C(()=>w.deleteForward(t),{at:k})}case"deleteContentBackward":{var _e,{anchor:Ue}=k,de=rs(E)?E.isCollapsed:!!((_e=E)!==null&&_e!==void 0&&_e.collapsed);return H&&de&&ne.isCollapsed(k)&&Ue.offset>0?f(Ue.path,{text:"",start:Ue.offset-1,end:Ue.offset}):C(()=>w.deleteBackward(t),{at:k})}case"deleteEntireSoftLine":return C(()=>{w.deleteBackward(t,{unit:"line"}),w.deleteForward(t,{unit:"line"})},{at:k});case"deleteHardLineBackward":return C(()=>w.deleteBackward(t,{unit:"block"}),{at:k});case"deleteSoftLineBackward":return C(()=>w.deleteBackward(t,{unit:"line"}),{at:k});case"deleteHardLineForward":return C(()=>w.deleteForward(t,{unit:"block"}),{at:k});case"deleteSoftLineForward":return C(()=>w.deleteForward(t,{unit:"line"}),{at:k});case"deleteWordBackward":return C(()=>w.deleteBackward(t,{unit:"word"}),{at:k});case"deleteWordForward":return C(()=>w.deleteForward(t,{unit:"word"}),{at:k});case"insertLineBreak":return C(()=>w.insertSoftBreak(t),{at:k});case"insertParagraph":return C(()=>w.insertBreak(t),{at:k});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(n7(O))return C(()=>ue.insertData(t,O),{at:k});var be=O??"";if(gr.get(t)&&(be=be.replace("\uFEFF","")),S==="insertText"&&/.*\n.*\n$/.test(be)&&(be=be.slice(0,-1)),be.includes(`
|
|
108
|
+
`))return C(()=>{var Xe=be.split(`
|
|
109
|
+
`);Xe.forEach((je,Pe)=>{je&&w.insertText(t,je),Pe!==Xe.length-1&&w.insertSoftBreak(t)})},{at:k});if(_.equals(k.anchor.path,k.focus.path)){var[Se,Ke]=ne.edges(k),Fe={start:Se.offset,end:Ke.offset,text:be};if(be&&s&&S==="insertCompositionText"){var $e=s.start+s.text.search(/\S|$/),rt=Fe.start+Fe.text.search(/\S|$/);rt===$e+1&&Fe.end===s.start+s.text.length?(Fe.start-=1,s=null,L()):s=!1}else S==="insertText"?s===null?s=Fe:s&&ne.isCollapsed(k)&&s.end+s.text.length===Se.offset?s=ga(ga({},s),{},{text:s.text+be}):s=!1:s=!1;if(H){f(Se.path,Fe);return}}return C(()=>w.insertText(t,be),{at:k})}}}}},b=()=>!!Ur.get(t),x=()=>{var T;return!!((T=rr.get(t))!==null&&T!==void 0&&T.length)},B=()=>b()||x(),A=()=>o,F=T=>{Zr.set(t,T),l&&(clearTimeout(l),l=null);var{selection:P}=t;if(T){var S=!P||!_.equals(P.anchor.path,T.anchor.path),k=!P||!_.equals(P.anchor.path.slice(0,-1),T.anchor.path.slice(0,-1));(S&&s||k)&&(s=!1),(S||x())&&(l=setTimeout(d,t7))}},$=()=>{(b()||!x())&&d()},D=T=>{x()||(v(!0),setTimeout(v))},L=()=>{b()||(i=setTimeout(d))},N=T=>{if(!(x()||b())&&T.some(S=>au(t,S,T))){var P;(P=P2.get(t))===null||P===void 0||P()}};return{flush:d,scheduleFlush:L,hasPendingDiffs:x,hasPendingAction:b,hasPendingChanges:B,isFlushing:A,handleUserSelect:F,handleCompositionEnd:h,handleCompositionStart:g,handleDOMBeforeInput:y,handleKeyDown:D,handleDomMutations:N,handleInput:$}}function a7(){var e=ct(!1);return xt(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var Ko=Ba?I1:xt;function i7(e,t,r){var[n]=ut(()=>new MutationObserver(t));Ko(()=>{n.takeRecords()}),xt(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(e.current,r),()=>n.disconnect()},[n,e,r])}var l7=["node"];function _0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_0(Object(r),!0).forEach(function(n){dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var u7={subtree:!0,childList:!0,characterData:!0},c7=Yt?e=>{var{node:t}=e,r=qn(e,l7);if(!Yt)return null;var n=tn(),o=a7(),[a]=ut(()=>o7(s7({editor:n},r)));return i7(t,a.handleDomMutations,u7),nu.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,d7=["anchor","focus"],f7=["anchor","focus"],p7=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),z2=(e,t)=>{var r=qn(e,d7),n=qn(t,f7);return e[Un]===t[Un]&&p7(r,n)},h7=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(!ne.equals(n,o)||!z2(n,o))return!1}return!0},g7=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(n.anchor.offset!==o.anchor.offset||n.focus.offset!==o.focus.offset||!z2(n,o))return!1}return!0};function H0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function m7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H0(Object(r),!0).forEach(function(n){dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var v7=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=tn(),l=ue.findPath(a,o),i=_.parent(l),u=!!r[T2];return a.isVoid(n)?pe.createElement(hl,{length:ke.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&w.string(a,i)===""?pe.createElement(hl,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?pe.createElement(hl,{isMarkPlaceholder:u}):t&&r.text.slice(-1)===`
|
|
110
|
+
`?pe.createElement(z0,{isTrailing:!0,text:r.text}):pe.createElement(z0,{text:r.text})},z0=e=>{var{text:t,isTrailing:r=!1}=e,n=ct(null),o=()=>"".concat(t??"").concat(r?`
|
|
111
|
+
`:""),[a]=ut(o);return Ko(()=>{var l=o();n.current&&n.current.textContent!==l&&(n.current.textContent=l)}),pe.createElement(C7,{ref:n},a)},C7=Vo(Jr((e,t)=>pe.createElement("span",{"data-slate-string":!0,ref:t},e.children))),hl=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,o={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(o["data-slate-mark-placeholder"]=!0),pe.createElement("span",m7({},o),!(Yt||N2)||!r?"\uFEFF":null,r?pe.createElement("br",null):null)};function K0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function K2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K0(Object(r),!0).forEach(function(n){dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var b7=Yt?300:0;function y7(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function W0(e){e.current&&(clearTimeout(e.current),e.current=null)}var x7=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:l=y=>pe.createElement(D7,K2({},y))}=e,i=tn(),u=ct(null),s=ct(null),[c,p]=ut(!1),d=ct(null),h=ze(y=>{if(y7(u,y==null),y==null){var b;Jl.delete(i),(b=t.onPlaceholderResize)===null||b===void 0||b.call(t,null)}else{if(Jl.set(i,y),!u.current){var x=window.ResizeObserver||SC;u.current=new x(()=>{var B;(B=t.onPlaceholderResize)===null||B===void 0||B.call(t,y)})}u.current.observe(y),s.current=y}},[s,t,i]),g=pe.createElement(v7,{isLast:r,leaf:t,parent:o,text:n}),v=!!t[Un];if(xt(()=>(v?d.current||(d.current=setTimeout(()=>{p(!0),d.current=null},b7)):(W0(d),p(!1)),()=>W0(d)),[v,p]),v&&c){var f={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:un?"inherit":void 0},contentEditable:!1,ref:h}};g=pe.createElement(pe.Fragment,null,a(f),g)}var C={"data-slate-leaf":!0};return l({attributes:C,children:g,leaf:t,text:n})},w7=pe.memo(x7,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Te.equals(t.leaf,e.leaf)&&t.leaf[Un]===e.leaf[Un]),D7=e=>{var{attributes:t,children:r}=e;return pe.createElement("span",K2({},t),r)},E7=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:l}=e,i=tn(),u=ct(null),s=Te.decorations(l,t),c=ue.findKey(i,l),p=[],d=0;d<s.length;d++){var h=s[d];p.push(pe.createElement(w7,{isLast:r&&d===s.length-1,key:"".concat(c.id,"-").concat(d),renderPlaceholder:o,leaf:h,text:l,parent:n,renderLeaf:a}))}var g=ze(v=>{var f=xi.get(i);v?(f==null||f.set(c,v),gn.set(l,v),zo.set(v,l)):(f==null||f.delete(c),gn.delete(l),u.current&&zo.delete(u.current)),u.current=v},[u,i,c,l]);return pe.createElement("span",{"data-slate-node":"text",ref:g},p)},W2=pe.memo(E7,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&g7(t.decorations,e.decorations));function V0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function as(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V0(Object(r),!0).forEach(function(n){dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var S7=e=>{var{decorations:t,element:r,renderElement:n=y=>pe.createElement(B7,as({},y)),renderPlaceholder:o,renderLeaf:a,selection:l}=e,i=tn(),u=$7(),s=i.isInline(r),c=ue.findKey(i,r),p=ze(y=>{var b=xi.get(i);y?(b==null||b.set(c,y),gn.set(r,y),zo.set(y,r)):(b==null||b.delete(c),gn.delete(r))},[i,c,r]),d=q2({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:l}),h={"data-slate-node":"element",ref:p};if(s&&(h["data-slate-inline"]=!0),!s&&w.hasInlines(i,r)){var g=ke.string(r),v=y2(g);v==="rtl"&&(h.dir=v)}if(w.isVoid(i,r)){h["data-slate-void"]=!0,!u&&s&&(h.contentEditable=!1);var f=s?"span":"div",[[C]]=ke.texts(r);d=pe.createElement(f,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},pe.createElement(W2,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:C})),tu.set(C,0),ru.set(C,r)}return n({attributes:h,children:d,element:r})},k7=pe.memo(S7,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&h7(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&ne.equals(e.selection,t.selection))),B7=e=>{var{attributes:t,children:r,element:n}=e,o=tn(),a=o.isInline(n)?"span":"div";return pe.createElement(a,as(as({},t),{},{style:{position:"relative"}}),r)},V2=Ar(()=>[]),A7=()=>Jn(V2),F7=Ar(!1),q2=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:l}=e,i=A7(),u=tn();zn.set(u,!1);for(var s=ue.findPath(u,r),c=[],p=Le.isElement(r)&&!u.isInline(r)&&w.hasInlines(u,r),d=0;d<r.children.length;d++){var h=s.concat(d),g=r.children[d],v=ue.findKey(u,g),f=w.range(u,h),C=l&&ne.intersection(f,l),y=i([g,h]);for(var b of t){var x=ne.intersection(b,f);x&&y.push(x)}Le.isElement(g)?c.push(pe.createElement(F7.Provider,{key:"provider-".concat(v.id),value:!!C},pe.createElement(k7,{decorations:y,element:g,key:v.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:C}))):c.push(pe.createElement(W2,{decorations:y,key:v.id,isLast:p&&d===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:g})),tu.set(g,d),ru.set(g,r)}return c},U2=Ar(!1),$7=()=>Jn(U2),Z2=Ar(null),G2=()=>{var e=Jn(Z2);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function N7(){var e=tn(),t=ct(!1),r=ct(0),n=ze(()=>{if(!t.current){t.current=!0;var o=ue.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return xt(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var O7=3,R7={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},P7={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},T7={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},kt=e=>{var t=R7[e],r=P7[e],n=T7[e],o=t&&dl.isHotkey(t),a=r&&dl.isHotkey(r),l=n&&dl.isHotkey(n);return i=>!!(o&&o(i)||T0&&a&&a(i)||!T0&&l&&l(i))},Bt={isBold:kt("bold"),isCompose:kt("compose"),isMoveBackward:kt("moveBackward"),isMoveForward:kt("moveForward"),isDeleteBackward:kt("deleteBackward"),isDeleteForward:kt("deleteForward"),isDeleteLineBackward:kt("deleteLineBackward"),isDeleteLineForward:kt("deleteLineForward"),isDeleteWordBackward:kt("deleteWordBackward"),isDeleteWordForward:kt("deleteWordForward"),isExtendBackward:kt("extendBackward"),isExtendForward:kt("extendForward"),isExtendLineBackward:kt("extendLineBackward"),isExtendLineForward:kt("extendLineForward"),isItalic:kt("italic"),isMoveLineBackward:kt("moveLineBackward"),isMoveLineForward:kt("moveLineForward"),isMoveWordBackward:kt("moveWordBackward"),isMoveWordForward:kt("moveWordForward"),isRedo:kt("redo"),isSoftBreak:kt("insertSoftBreak"),isSplitBlock:kt("splitBlock"),isTransposeCharacter:kt("transposeCharacter"),isUndo:kt("undo")},M7=(e,t)=>{var r=[],n=()=>{r=[]},o=l=>{if(t.current){var i=l.filter(u=>au(e,u,l));r.push(...i)}};function a(){r.length>0&&(r.reverse().forEach(l=>{l.type!=="characterData"&&(l.removedNodes.forEach(i=>{l.target.insertBefore(i,l.nextSibling)}),l.addedNodes.forEach(i=>{l.target.removeChild(i)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},L7={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class X2 extends _1{constructor(){super(...arguments),dr(this,"context",null),dr(this,"manager",null),dr(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,L7)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=M7(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}dr(X2,"contextType",eu);var I7=Yt?X2:e=>{var{children:t}=e;return pe.createElement(pe.Fragment,null,t)},j7=Ar(!1),_7=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],H7=["text"];function q0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(r),!0).forEach(function(n){dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var z7=e=>pe.createElement(pe.Fragment,null,q2(e)),gl=Jr((e,t)=>{var r=ze(R=>pe.createElement(K7,Er({},R)),[]),{autoFocus:n,decorate:o=W7,onDOMBeforeInput:a,placeholder:l,readOnly:i=!1,renderElement:u,renderLeaf:s,renderPlaceholder:c=r,scrollSelectionIntoView:p=V7,style:d={},as:h="div",disableDefaultStyles:g=!1}=e,v=qn(e,_7),f=G2(),[C,y]=ut(!1),b=ct(null),x=ct([]),[B,A]=ut(),F=ct(!1),{onUserInput:$,receivedUserInput:D}=N7(),[,L]=j1(R=>R+1,0);P2.set(f,L),es.set(f,i);var N=et(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);xt(()=>{b.current&&n&&b.current.focus()},[n]);var T=ct(),P=et(()=>tC(()=>{if(zn.get(f)){P();return}var R=ue.toDOMNode(f,f),Z=R.getRootNode();if(!F.current&&un&&Z instanceof ShadowRoot){F.current=!0;var V=WC();V?document.execCommand("indent"):ve.deselect(f),F.current=!1;return}var K=T.current;if((Yt||!ue.isComposing(f))&&(!N.isUpdatingSelection||K!=null&&K.isFlushing())&&!N.isDraggingInternally){var X=ue.findDocumentOrShadowRoot(f),{activeElement:Q}=X,ee=ue.toDOMNode(f,f),se=Fo(X);if(Q===ee?(N.latestElement=Q,Gr.set(f,!0)):Gr.delete(f),!se)return ve.deselect(f);var{anchorNode:re,focusNode:oe}=se,ge=ue.hasEditableTarget(f,re)||ue.isTargetInsideNonReadonlyVoid(f,re),ce=ue.hasTarget(f,oe);if(ge&&ce){var Ee=ue.toSlateRange(f,se,{exactMatch:!1,suppressThrow:!0});Ee&&(!ue.isComposing(f)&&!(K!=null&&K.hasPendingChanges())&&!(K!=null&&K.isFlushing())?ve.select(f,Ee):K==null||K.handleUserSelect(Ee))}i&&(!ge||!ce)&&ve.deselect(f)}},100),[f,i,N]),S=et(()=>Q8(P,0),[P]);T.current=c7({node:b,onDOMSelectionChange:P,scheduleOnDOMSelectionChange:S}),Ko(()=>{var R,Z,V;b.current&&(V=ou(b.current))?(R2.set(f,V),Aa.set(f,b.current),gn.set(f,b.current),zo.set(b.current,f)):gn.delete(f);var{selection:K}=f,X=ue.findDocumentOrShadowRoot(f),Q=Fo(X);if(!(!Q||!ue.isFocused(f)||(R=T.current)!==null&&R!==void 0&&R.hasPendingAction())){var ee=ge=>{var ce=Q.type!=="None";if(!(!K&&!ce)){var Ee=Q.focusNode,_e;if(Mn&&Q.rangeCount>1){var Ue=Q.getRangeAt(0),de=Q.getRangeAt(Q.rangeCount-1);Ue.startContainer===Ee?_e=de.endContainer:_e=Ue.startContainer}else _e=Q.anchorNode;var be=Aa.get(f),Se=!1;if(be.contains(_e)&&be.contains(Ee)&&(Se=!0),ce&&Se&&K&&!ge){var Ke=ue.toSlateRange(f,Q,{exactMatch:!0,suppressThrow:!0});if(Ke&&ne.equals(Ke,K)){var Fe;if(!N.hasMarkPlaceholder||(Fe=_e)!==null&&Fe!==void 0&&(Fe=Fe.parentElement)!==null&&Fe!==void 0&&Fe.hasAttribute("data-slate-mark-placeholder"))return}}if(K&&!ue.hasRange(f,K)){f.selection=ue.toSlateRange(f,Q,{exactMatch:!1,suppressThrow:!0});return}N.isUpdatingSelection=!0;var $e=K&&ue.toDOMRange(f,K);return $e?(ue.isComposing(f)&&!Yt?Q.collapseToEnd():ne.isBackward(K)?Q.setBaseAndExtent($e.endContainer,$e.endOffset,$e.startContainer,$e.startOffset):Q.setBaseAndExtent($e.startContainer,$e.startOffset,$e.endContainer,$e.endOffset),p(f,$e)):Q.removeAllRanges(),$e}};Q.rangeCount<=1&&ee();var se=((Z=T.current)===null||Z===void 0?void 0:Z.isFlushing())==="action";if(!Yt||!se){setTimeout(()=>{N.isUpdatingSelection=!1});return}var re=null,oe=requestAnimationFrame(()=>{if(se){var ge=ce=>{try{var Ee=ue.toDOMNode(f,f);Ee.focus(),ee(ce)}catch{}};ge(),re=setTimeout(()=>{ge(!0),N.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(oe),re&&clearTimeout(re)}}});var k=ze(R=>{var Z=ue.toDOMNode(f,f),V=Z.getRootNode();if(F!=null&&F.current&&un&&V instanceof ShadowRoot){var K=R.getTargetRanges(),X=K[0],Q=new window.Range;Q.setStart(X.startContainer,X.startOffset),Q.setEnd(X.endContainer,X.endOffset);var ee=ue.toSlateRange(f,Q,{exactMatch:!1,suppressThrow:!1});ve.select(f,ee),R.preventDefault(),R.stopImmediatePropagation();return}if($(),!i&&ue.hasEditableTarget(f,R.target)&&!q7(R,a)){var se;if(T.current)return T.current.handleDOMBeforeInput(R);S.flush(),P.flush();var{selection:re}=f,{inputType:oe}=R,ge=R.dataTransfer||R.data||void 0,ce=oe==="insertCompositionText"||oe==="deleteCompositionText";if(ce&&ue.isComposing(f))return;var Ee=!1;if(oe==="insertText"&&re&&ne.isCollapsed(re)&&R.data&&R.data.length===1&&/[a-z ]/i.test(R.data)&&re.anchor.offset!==0&&(Ee=!0,f.marks&&(Ee=!1),!zn.get(f))){var _e,Ue,{anchor:de}=re,[be,Se]=ue.toDOMPoint(f,de),Ke=(_e=be.parentElement)===null||_e===void 0?void 0:_e.closest("a"),Fe=ue.getWindow(f);if(Ee&&Ke&&ue.hasDOMNode(f,Ke)){var $e,rt=Fe==null?void 0:Fe.document.createTreeWalker(Ke,NodeFilter.SHOW_TEXT).lastChild();rt===be&&(($e=rt.textContent)===null||$e===void 0?void 0:$e.length)===Se&&(Ee=!1)}if(Ee&&be.parentElement&&(Fe==null||(Ue=Fe.getComputedStyle(be.parentElement))===null||Ue===void 0?void 0:Ue.whiteSpace)==="pre"){var Xe=w.above(f,{at:de.path,match:Ye=>Le.isElement(Ye)&&w.isBlock(f,Ye)});Xe&&ke.string(Xe[0]).includes(" ")&&(Ee=!1)}}if((!oe.startsWith("delete")||oe.startsWith("deleteBy"))&&!zn.get(f)){var[je]=R.getTargetRanges();if(je){var Pe=ue.toSlateRange(f,je,{exactMatch:!1,suppressThrow:!1});if(!re||!ne.equals(re,Pe)){Ee=!1;var Ce=!ce&&f.selection&&w.rangeRef(f,f.selection);ve.select(f,Pe),Ce&&Ao.set(f,Ce)}}}if(ce)return;if(Ee||R.preventDefault(),re&&ne.isExpanded(re)&&oe.startsWith("delete")){var ye=oe.endsWith("Backward")?"backward":"forward";w.deleteFragment(f,{direction:ye});return}switch(oe){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{w.deleteFragment(f);break}case"deleteContent":case"deleteContentForward":{w.deleteForward(f);break}case"deleteContentBackward":{w.deleteBackward(f);break}case"deleteEntireSoftLine":{w.deleteBackward(f,{unit:"line"}),w.deleteForward(f,{unit:"line"});break}case"deleteHardLineBackward":{w.deleteBackward(f,{unit:"block"});break}case"deleteSoftLineBackward":{w.deleteBackward(f,{unit:"line"});break}case"deleteHardLineForward":{w.deleteForward(f,{unit:"block"});break}case"deleteSoftLineForward":{w.deleteForward(f,{unit:"line"});break}case"deleteWordBackward":{w.deleteBackward(f,{unit:"word"});break}case"deleteWordForward":{w.deleteForward(f,{unit:"word"});break}case"insertLineBreak":w.insertSoftBreak(f);break;case"insertParagraph":{w.insertBreak(f);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{oe==="insertFromComposition"&&ue.isComposing(f)&&(y(!1),dn.set(f,!1)),(ge==null?void 0:ge.constructor.name)==="DataTransfer"?ue.insertData(f,ge):typeof ge=="string"&&(Ee?x.current.push(()=>w.insertText(f,ge)):w.insertText(f,ge));break}}var He=(se=Ao.get(f))===null||se===void 0?void 0:se.unref();Ao.delete(f),He&&(!f.selection||!ne.equals(f.selection,He))&&ve.select(f,He)}},[f,P,$,a,i,S]),O=ze(R=>{R==null?(P.cancel(),S.cancel(),Aa.delete(f),gn.delete(f),b.current&&Kr&&b.current.removeEventListener("beforeinput",k)):Kr&&R.addEventListener("beforeinput",k),b.current=R,typeof t=="function"?t(R):t&&(t.current=R)},[P,S,f,k,t]);Ko(()=>{var R=ue.getWindow(f);R.document.addEventListener("selectionchange",S);var Z=()=>{N.isDraggingInternally=!1};return R.document.addEventListener("dragend",Z),R.document.addEventListener("drop",Z),()=>{R.document.removeEventListener("selectionchange",S),R.document.removeEventListener("dragend",Z),R.document.removeEventListener("drop",Z)}},[S,N]);var E=o([f,[]]),I=l&&f.children.length===1&&Array.from(ke.texts(f)).length===1&&ke.string(f)===""&&!C,M=ze(R=>{if(R&&I){var Z;A((Z=R.getBoundingClientRect())===null||Z===void 0?void 0:Z.height)}else A(void 0)},[I]);if(I){var H=w.start(f,[]);E.push({[Un]:!0,placeholder:l,onPlaceholderResize:M,anchor:H,focus:H})}var{marks:z}=f;if(N.hasMarkPlaceholder=!1,f.selection&&ne.isCollapsed(f.selection)&&z){var{anchor:U}=f.selection,G=ke.leaf(f,U.path),Y=qn(G,H7);if(!Te.equals(G,z,{loose:!0})){N.hasMarkPlaceholder=!0;var ae=Object.fromEntries(Object.keys(Y).map(R=>[R,null]));E.push(Er(Er(Er({[T2]:!0},ae),z),{},{anchor:U,focus:U}))}}return xt(()=>{setTimeout(()=>{var{selection:R}=f;if(R){var{anchor:Z}=R,V=ke.leaf(f,Z.path);if(z&&!Te.equals(V,z,{loose:!0})){gr.set(f,z);return}}gr.delete(f)})}),pe.createElement(U2.Provider,{value:i},pe.createElement(j7.Provider,{value:C},pe.createElement(V2.Provider,{value:o},pe.createElement(I7,{node:b,receivedUserInput:D},pe.createElement(h,Er(Er({role:i?void 0:"textbox","aria-multiline":i?void 0:!0},v),{},{spellCheck:Kr||!Ba?v.spellCheck:!1,autoCorrect:Kr||!Ba?v.autoCorrect:"false",autoCapitalize:Kr||!Ba?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!i,zindex:-1,suppressContentEditableWarning:!0,ref:O,style:Er(Er({},g?{}:Er({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},B?{minHeight:B}:{})),d),onBeforeInput:ze(R=>{if(!Kr&&!i&&!Xt(R,v.onBeforeInput)&&ue.hasSelectableTarget(f,R.target)&&(R.preventDefault(),!ue.isComposing(f))){var Z=R.data;w.insertText(f,Z)}},[v.onBeforeInput,f,i]),onInput:ze(R=>{if(!Xt(R,v.onInput)){if(T.current){T.current.handleInput();return}for(var Z of x.current)Z();if(x.current=[],!ue.isFocused(f)){var V=R.nativeEvent,K=f;if(V.inputType==="historyUndo"&&typeof K.undo=="function"){K.undo();return}if(V.inputType==="historyRedo"&&typeof K.redo=="function"){K.redo();return}}}},[v.onInput,f]),onBlur:ze(R=>{if(!(i||N.isUpdatingSelection||!ue.hasSelectableTarget(f,R.target)||Xt(R,v.onBlur))){var Z=ue.findDocumentOrShadowRoot(f);if(N.latestElement!==Z.activeElement){var{relatedTarget:V}=R,K=ue.toDOMNode(f,f);if(V!==K&&!(cr(V)&&V.hasAttribute("data-slate-spacer"))){if(V!=null&&Qr(V)&&ue.hasDOMNode(f,V)){var X=ue.toSlateNode(f,V);if(Le.isElement(X)&&!f.isVoid(X))return}if(un){var Q=Fo(Z);Q==null||Q.removeAllRanges()}Gr.delete(f)}}}},[i,N.isUpdatingSelection,N.latestElement,f,v.onBlur]),onClick:ze(R=>{if(ue.hasTarget(f,R.target)&&!Xt(R,v.onClick)&&Qr(R.target)){var Z=ue.toSlateNode(f,R.target),V=ue.findPath(f,Z);if(!w.hasPath(f,V)||ke.get(f,V)!==Z)return;if(R.detail===O7&&V.length>=1){var K=V;if(!(Le.isElement(Z)&&w.isBlock(f,Z))){var X,Q=w.above(f,{match:Ee=>Le.isElement(Ee)&&w.isBlock(f,Ee),at:V});K=(X=Q==null?void 0:Q[1])!==null&&X!==void 0?X:V.slice(0,1)}var ee=w.range(f,K);ve.select(f,ee);return}if(i)return;var se=w.start(f,V),re=w.end(f,V),oe=w.void(f,{at:se}),ge=w.void(f,{at:re});if(oe&&ge&&_.equals(oe[1],ge[1])){var ce=w.range(f,se);ve.select(f,ce)}}},[f,v.onClick,i]),onCompositionEnd:ze(R=>{if(ue.hasSelectableTarget(f,R.target)){var Z;if(ue.isComposing(f)&&Promise.resolve().then(()=>{y(!1),dn.set(f,!1)}),(Z=T.current)===null||Z===void 0||Z.handleCompositionEnd(R),Xt(R,v.onCompositionEnd)||Yt)return;if(!un&&!RC&&!N2&&!TC&&!PC&&R.data){var V=gr.get(f);gr.delete(f),V!==void 0&&(Mr.set(f,f.marks),f.marks=V),w.insertText(f,R.data);var K=Mr.get(f);Mr.delete(f),K!==void 0&&(f.marks=K)}}},[v.onCompositionEnd,f]),onCompositionUpdate:ze(R=>{ue.hasSelectableTarget(f,R.target)&&!Xt(R,v.onCompositionUpdate)&&(ue.isComposing(f)||(y(!0),dn.set(f,!0)))},[v.onCompositionUpdate,f]),onCompositionStart:ze(R=>{if(ue.hasSelectableTarget(f,R.target)){var Z;if((Z=T.current)===null||Z===void 0||Z.handleCompositionStart(R),Xt(R,v.onCompositionStart)||Yt)return;y(!0);var{selection:V}=f;if(V&&ne.isExpanded(V)){w.deleteFragment(f);return}}},[v.onCompositionStart,f]),onCopy:ze(R=>{ue.hasSelectableTarget(f,R.target)&&!Xt(R,v.onCopy)&&!U0(R)&&(R.preventDefault(),ue.setFragmentData(f,R.clipboardData,"copy"))},[v.onCopy,f]),onCut:ze(R=>{if(!i&&ue.hasSelectableTarget(f,R.target)&&!Xt(R,v.onCut)&&!U0(R)){R.preventDefault(),ue.setFragmentData(f,R.clipboardData,"cut");var{selection:Z}=f;if(Z)if(ne.isExpanded(Z))w.deleteFragment(f);else{var V=ke.parent(f,Z.anchor.path);w.isVoid(f,V)&&ve.delete(f)}}},[i,f,v.onCut]),onDragOver:ze(R=>{if(ue.hasTarget(f,R.target)&&!Xt(R,v.onDragOver)){var Z=ue.toSlateNode(f,R.target);Le.isElement(Z)&&w.isVoid(f,Z)&&R.preventDefault()}},[v.onDragOver,f]),onDragStart:ze(R=>{if(!i&&ue.hasTarget(f,R.target)&&!Xt(R,v.onDragStart)){var Z=ue.toSlateNode(f,R.target),V=ue.findPath(f,Z),K=Le.isElement(Z)&&w.isVoid(f,Z)||w.void(f,{at:V,voids:!0});if(K){var X=w.range(f,V);ve.select(f,X)}N.isDraggingInternally=!0,ue.setFragmentData(f,R.dataTransfer,"drag")}},[i,f,v.onDragStart,N]),onDrop:ze(R=>{if(!i&&ue.hasTarget(f,R.target)&&!Xt(R,v.onDrop)){R.preventDefault();var Z=f.selection,V=ue.findEventRange(f,R),K=R.dataTransfer;ve.select(f,V),N.isDraggingInternally&&Z&&!ne.equals(Z,V)&&!w.void(f,{at:V,voids:!0})&&ve.delete(f,{at:Z}),ue.insertData(f,K),ue.isFocused(f)||ue.focus(f)}},[i,f,v.onDrop,N]),onDragEnd:ze(R=>{!i&&N.isDraggingInternally&&v.onDragEnd&&ue.hasTarget(f,R.target)&&v.onDragEnd(R)},[i,N,v,f]),onFocus:ze(R=>{if(!i&&!N.isUpdatingSelection&&ue.hasEditableTarget(f,R.target)&&!Xt(R,v.onFocus)){var Z=ue.toDOMNode(f,f),V=ue.findDocumentOrShadowRoot(f);if(N.latestElement=V.activeElement,Mn&&R.target!==Z){Z.focus();return}Gr.set(f,!0)}},[i,N,f,v.onFocus]),onKeyDown:ze(R=>{if(!i&&ue.hasEditableTarget(f,R.target)){var Z;(Z=T.current)===null||Z===void 0||Z.handleKeyDown(R);var{nativeEvent:V}=R;if(ue.isComposing(f)&&V.isComposing===!1&&(dn.set(f,!1),y(!1)),Xt(R,v.onKeyDown)||ue.isComposing(f))return;var{selection:K}=f,X=f.children[K!==null?K.focus.path[0]:0],Q=y2(ke.string(X))==="rtl";if(Bt.isRedo(V)){R.preventDefault();var ee=f;typeof ee.redo=="function"&&ee.redo();return}if(Bt.isUndo(V)){R.preventDefault();var se=f;typeof se.undo=="function"&&se.undo();return}if(Bt.isMoveLineBackward(V)){R.preventDefault(),ve.move(f,{unit:"line",reverse:!0});return}if(Bt.isMoveLineForward(V)){R.preventDefault(),ve.move(f,{unit:"line"});return}if(Bt.isExtendLineBackward(V)){R.preventDefault(),ve.move(f,{unit:"line",edge:"focus",reverse:!0});return}if(Bt.isExtendLineForward(V)){R.preventDefault(),ve.move(f,{unit:"line",edge:"focus"});return}if(Bt.isMoveBackward(V)){R.preventDefault(),K&&ne.isCollapsed(K)?ve.move(f,{reverse:!Q}):ve.collapse(f,{edge:Q?"end":"start"});return}if(Bt.isMoveForward(V)){R.preventDefault(),K&&ne.isCollapsed(K)?ve.move(f,{reverse:Q}):ve.collapse(f,{edge:Q?"start":"end"});return}if(Bt.isMoveWordBackward(V)){R.preventDefault(),K&&ne.isExpanded(K)&&ve.collapse(f,{edge:"focus"}),ve.move(f,{unit:"word",reverse:!Q});return}if(Bt.isMoveWordForward(V)){R.preventDefault(),K&&ne.isExpanded(K)&&ve.collapse(f,{edge:"focus"}),ve.move(f,{unit:"word",reverse:Q});return}if(Kr){if((O2||un)&&K&&(Bt.isDeleteBackward(V)||Bt.isDeleteForward(V))&&ne.isCollapsed(K)){var re=ke.parent(f,K.anchor.path);if(Le.isElement(re)&&w.isVoid(f,re)&&(w.isInline(f,re)||w.isBlock(f,re))){R.preventDefault(),w.deleteBackward(f,{unit:"block"});return}}}else{if(Bt.isBold(V)||Bt.isItalic(V)||Bt.isTransposeCharacter(V)){R.preventDefault();return}if(Bt.isSoftBreak(V)){R.preventDefault(),w.insertSoftBreak(f);return}if(Bt.isSplitBlock(V)){R.preventDefault(),w.insertBreak(f);return}if(Bt.isDeleteBackward(V)){R.preventDefault(),K&&ne.isExpanded(K)?w.deleteFragment(f,{direction:"backward"}):w.deleteBackward(f);return}if(Bt.isDeleteForward(V)){R.preventDefault(),K&&ne.isExpanded(K)?w.deleteFragment(f,{direction:"forward"}):w.deleteForward(f);return}if(Bt.isDeleteLineBackward(V)){R.preventDefault(),K&&ne.isExpanded(K)?w.deleteFragment(f,{direction:"backward"}):w.deleteBackward(f,{unit:"line"});return}if(Bt.isDeleteLineForward(V)){R.preventDefault(),K&&ne.isExpanded(K)?w.deleteFragment(f,{direction:"forward"}):w.deleteForward(f,{unit:"line"});return}if(Bt.isDeleteWordBackward(V)){R.preventDefault(),K&&ne.isExpanded(K)?w.deleteFragment(f,{direction:"backward"}):w.deleteBackward(f,{unit:"word"});return}if(Bt.isDeleteWordForward(V)){R.preventDefault(),K&&ne.isExpanded(K)?w.deleteFragment(f,{direction:"forward"}):w.deleteForward(f,{unit:"word"});return}}}},[i,f,v.onKeyDown]),onPaste:ze(R=>{!i&&ue.hasEditableTarget(f,R.target)&&!Xt(R,v.onPaste)&&(!Kr||IC(R.nativeEvent)||un)&&(R.preventDefault(),ue.insertData(f,R.clipboardData))},[i,f,v.onPaste])}),pe.createElement(z7,{decorations:E,node:f,renderElement:u,renderPlaceholder:c,renderLeaf:s,selection:f.selection}))))))}),K7=e=>{var{attributes:t,children:r}=e;return pe.createElement("span",Er({},t),r,Yt&&pe.createElement("br",null))},W7=()=>[],V7=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&ne.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),oC(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},Xt=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},U0=e=>Qr(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),q7=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},U7=Ar(!1),Z7=Ar({});function G7(e){var t=ct([]).current,r=ct({editor:e}).current,n=ze(a=>{r.editor=a,t.forEach(l=>l(a))},[t,r]),o=et(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var X7=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],ml=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:l}=e,i=qn(e,X7),[u,s]=pe.useState(()=>{if(!ke.isNodeList(l))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(_t.stringify(l)));if(!w.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(_t.stringify(t)));return t.children=l,Object.assign(t,i),{v:0,editor:t}}),{selectorContext:c,onChange:p}=G7(t),d=ze(v=>{var f;switch(n&&n(t.children),v==null||(f=v.operation)===null||f===void 0?void 0:f.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}s(C=>({v:C.v+1,editor:t})),p(t)},[t,p,n,o,a]);xt(()=>(ts.set(t,d),()=>{ts.set(t,()=>{})}),[t,d]);var[h,g]=ut(ue.isFocused(t));return xt(()=>{g(ue.isFocused(t))},[t]),Ko(()=>{var v=()=>g(ue.isFocused(t));return $2>=17?(document.addEventListener("focusin",v),document.addEventListener("focusout",v),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",v)}):(document.addEventListener("focus",v,!0),document.addEventListener("blur",v,!0),()=>{document.removeEventListener("focus",v,!0),document.removeEventListener("blur",v,!0)})},[]),pe.createElement(Z7.Provider,{value:c},pe.createElement(Z2.Provider,{value:u},pe.createElement(eu.Provider,{value:u.editor},pe.createElement(U7.Provider,{value:h},r))))},Z0=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},G0=(e,t,r)=>{var n=ue.toDOMRange(e,t).getBoundingClientRect(),o=ue.toDOMRange(e,r).getBoundingClientRect();return Z0(n,o)&&Z0(o,n)},Y7=(e,t)=>{var r=w.range(e,ne.end(t)),n=Array.from(w.positions(e,{at:t})),o=0,a=n.length,l=Math.floor(a/2);if(G0(e,w.range(e,n[o]),r))return w.range(e,n[o],r);if(n.length<2)return w.range(e,n[n.length-1],r);for(;l!==n.length&&l!==o;)G0(e,w.range(e,n[l]),r)?a=l:o=l,l=Math.floor((o+a)/2);return w.range(e,n[a],r)};function X0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Y0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X0(Object(r),!0).forEach(function(n){dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Q7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:o,deleteBackward:a,addMark:l,removeMark:i}=r;return xi.set(r,new WeakMap),r.addMark=(u,s)=>{var c,p;(c=nu.get(r))===null||c===void 0||c(),!gr.get(r)&&(p=rr.get(r))!==null&&p!==void 0&&p.length&&gr.set(r,null),Mr.delete(r),l(u,s)},r.removeMark=u=>{var s;!gr.get(r)&&(s=rr.get(r))!==null&&s!==void 0&&s.length&&gr.set(r,null),Mr.delete(r),i(u)},r.deleteBackward=u=>{if(u!=="line")return a(u);if(r.selection&&ne.isCollapsed(r.selection)){var s=w.above(r,{match:h=>Le.isElement(h)&&w.isBlock(r,h),at:r.selection});if(s){var[,c]=s,p=w.range(r,c,r.selection.anchor),d=Y7(r,p);ne.isCollapsed(d)||ve.delete(r,{at:d})}}},r.apply=u=>{var s=[],c=[],p=rr.get(r);if(p!=null&&p.length){var d=p.map(P=>JC(P,u)).filter(Boolean);rr.set(r,d)}var h=Zr.get(r);h&&Zr.set(r,I0(r,h,u));var g=Ur.get(r);if(g!=null&&g.at){var v=at.isPoint(g==null?void 0:g.at)?os(r,g.at,u):I0(r,g.at,u);Ur.set(r,v?Y0(Y0({},g),{},{at:v}):null)}switch(u.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{s.push(...On(r,u.path));break}case"set_selection":{var f;(f=Ao.get(r))===null||f===void 0||f.unref(),Ao.delete(r);break}case"insert_node":case"remove_node":{s.push(...On(r,_.parent(u.path)));break}case"merge_node":{var C=_.previous(u.path);s.push(...On(r,C));break}case"move_node":{var y=_.common(_.parent(u.path),_.parent(u.newPath));s.push(...On(r,y));var b;_.isBefore(u.path,u.newPath)?(s.push(...On(r,_.parent(u.path))),b=u.newPath):(s.push(...On(r,_.parent(u.newPath))),b=u.path);var x=ke.get(e,_.parent(b)),B=ue.findKey(r,x),A=w.pathRef(r,_.parent(b));c.push([A,B]);break}}switch(n(u),u.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":zn.set(r,!0)}for(var[F,$]of s){var[D]=w.node(r,F);Qa.set(D,$)}for(var[L,N]of c){if(L.current){var[T]=w.node(r,L.current);Qa.set(T,N)}L.unref()}},r.setFragmentData=u=>{var{selection:s}=r;if(s){var[c,p]=ne.edges(s),d=w.void(r,{at:c.path}),h=w.void(r,{at:p.path});if(!(ne.isCollapsed(s)&&!d)){var g=ue.toDOMRange(r,s),v=g.cloneContents(),f=v.childNodes[0];if(v.childNodes.forEach(D=>{D.textContent&&D.textContent.trim()!==""&&(f=D)}),h){var[C]=h,y=g.cloneRange(),b=ue.toDOMNode(r,C);y.setEndAfter(b),v=y.cloneContents()}if(d&&(f=v.querySelector("[data-slate-spacer]")),Array.from(v.querySelectorAll("[data-slate-zero-width]")).forEach(D=>{var L=D.getAttribute("data-slate-zero-width")==="n";D.textContent=L?`
|
|
112
|
+
`:""}),L2(f)){var x=f.ownerDocument.createElement("span");x.style.whiteSpace="pre",x.appendChild(f),v.appendChild(x),f=x}var B=r.getFragment(),A=JSON.stringify(B),F=window.btoa(encodeURIComponent(A));f.setAttribute("data-slate-fragment",F),u.setData("application/".concat(t),F);var $=v.ownerDocument.createElement("div");return $.appendChild(v),$.setAttribute("hidden","true"),v.ownerDocument.body.appendChild($),u.setData("text/html",$.innerHTML),u.setData("text/plain",j2($)),v.ownerDocument.body.removeChild($),u}}},r.insertData=u=>{r.insertFragmentData(u)||r.insertTextData(u)},r.insertFragmentData=u=>{var s=u.getData("application/".concat(t))||KC(u);if(s){var c=decodeURIComponent(window.atob(s)),p=JSON.parse(c);return r.insertFragment(p),!0}return!1},r.insertTextData=u=>{var s=u.getData("text/plain");if(s){var c=s.split(/\r\n|\r|\n/),p=!1;for(var d of c)p&&ve.splitNodes(r,{always:!0}),r.insertText(d),p=!0;return!0}return!1},r.onChange=u=>{var s=$2<18?kl.unstable_batchedUpdates:c=>c();s(()=>{var c=ts.get(r);c&&c(u),o(u)})},r},On=(e,t)=>{var r=[];for(var[n,o]of w.levels(e,{at:t})){var a=ue.findKey(e,n);r.push([o,a])}return r};function iu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var En=iu();function Y2(e){En=e}var $o={exec:()=>null};function Ct(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let l=typeof a=="string"?a:a.source;return l=l.replace(Qt.caret,"$1"),r=r.replace(o,l),n},getRegex:()=>new RegExp(r,t)};return n}var Qt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},J7=/^(?:[ \t]*(?:\n|$))+/,e4=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,t4=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,r4=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,lu=/(?:[*+-]|\d{1,9}[.)])/,Q2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,J2=Ct(Q2).replace(/bull/g,lu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),n4=Ct(Q2).replace(/bull/g,lu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),su=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,o4=/^[^\n]+/,uu=/(?!\s*\])(?:\\.|[^\[\]\\])+/,a4=Ct(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",uu).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),i4=Ct(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,lu).getRegex(),wi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",cu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,l4=Ct("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",cu).replace("tag",wi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),e1=Ct(su).replace("hr",Qo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wi).getRegex(),s4=Ct(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",e1).getRegex(),du={blockquote:s4,code:e4,def:a4,fences:t4,heading:r4,hr:Qo,html:l4,lheading:J2,list:i4,newline:J7,paragraph:e1,table:$o,text:o4},Q0=Ct("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Qo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wi).getRegex(),u4={...du,lheading:n4,table:Q0,paragraph:Ct(su).replace("hr",Qo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Q0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",wi).getRegex()},c4={...du,html:Ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",cu).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$o,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ct(su).replace("hr",Qo).replace("heading",` *#{1,6} *[^
|
|
113
|
+
]`).replace("lheading",J2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},d4=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,f4=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,t1=/^( {2,}|\\)\n(?!\s*$)/,p4=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Di=/[\p{P}\p{S}]/u,fu=/[\s\p{P}\p{S}]/u,r1=/[^\s\p{P}\p{S}]/u,h4=Ct(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,fu).getRegex(),n1=/(?!~)[\p{P}\p{S}]/u,g4=/(?!~)[\s\p{P}\p{S}]/u,m4=/(?:[^\s\p{P}\p{S}]|~)/u,v4=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,o1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,C4=Ct(o1,"u").replace(/punct/g,Di).getRegex(),b4=Ct(o1,"u").replace(/punct/g,n1).getRegex(),a1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",y4=Ct(a1,"gu").replace(/notPunctSpace/g,r1).replace(/punctSpace/g,fu).replace(/punct/g,Di).getRegex(),x4=Ct(a1,"gu").replace(/notPunctSpace/g,m4).replace(/punctSpace/g,g4).replace(/punct/g,n1).getRegex(),w4=Ct("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,r1).replace(/punctSpace/g,fu).replace(/punct/g,Di).getRegex(),D4=Ct(/\\(punct)/,"gu").replace(/punct/g,Di).getRegex(),E4=Ct(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),S4=Ct(cu).replace("(?:-->|$)","-->").getRegex(),k4=Ct("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",S4).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ja=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,B4=Ct(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ja).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),i1=Ct(/^!?\[(label)\]\[(ref)\]/).replace("label",Ja).replace("ref",uu).getRegex(),l1=Ct(/^!?\[(ref)\](?:\[\])?/).replace("ref",uu).getRegex(),A4=Ct("reflink|nolink(?!\\()","g").replace("reflink",i1).replace("nolink",l1).getRegex(),pu={_backpedal:$o,anyPunctuation:D4,autolink:E4,blockSkip:v4,br:t1,code:f4,del:$o,emStrongLDelim:C4,emStrongRDelimAst:y4,emStrongRDelimUnd:w4,escape:d4,link:B4,nolink:l1,punctuation:h4,reflink:i1,reflinkSearch:A4,tag:k4,text:p4,url:$o},F4={...pu,link:Ct(/^!?\[(label)\]\((.*?)\)/).replace("label",Ja).getRegex(),reflink:Ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ja).getRegex()},is={...pu,emStrongRDelimAst:x4,emStrongLDelim:b4,url:Ct(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},$4={...is,br:Ct(t1).replace("{2,}","*").getRegex(),text:Ct(is.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ma={normal:du,gfm:u4,pedantic:c4},Co={normal:pu,gfm:is,breaks:$4,pedantic:F4},N4={"&":"&","<":"<",">":">",'"':""","'":"'"},J0=e=>N4[e];function Sr(e,t){if(t){if(Qt.escapeTest.test(e))return e.replace(Qt.escapeReplace,J0)}else if(Qt.escapeTestNoEncode.test(e))return e.replace(Qt.escapeReplaceNoEncode,J0);return e}function ed(e){try{e=encodeURI(e).replace(Qt.percentDecode,"%")}catch{return null}return e}function td(e,t){var a;const r=e.replace(Qt.findPipe,(l,i,u)=>{let s=!1,c=i;for(;--c>=0&&u[c]==="\\";)s=!s;return s?"|":" |"}),n=r.split(Qt.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(Qt.slashPipe,"|");return n}function bo(e,t,r){const n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function O4(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function rd(e,t,r,n,o){const a=t.href,l=t.title||null,i=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:l,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,u}function R4(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const o=n[1];return t.split(`
|
|
114
|
+
`).map(a=>{const l=a.match(r.other.beginningSpace);if(l===null)return a;const[i]=l;return i.length>=o.length?a.slice(o.length):a}).join(`
|
|
115
|
+
`)}var ei=class{constructor(e){Dt(this,"options"),Dt(this,"rules"),Dt(this,"lexer"),this.options=e||En}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:bo(r,`
|
|
116
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=R4(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const n=bo(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bo(t[0],`
|
|
117
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=bo(t[0],`
|
|
118
|
+
`).split(`
|
|
119
|
+
`),n="",o="";const a=[];for(;r.length>0;){let l=!1;const i=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))i.push(r[u]),l=!0;else if(!l)i.push(r[u]);else break;r=r.slice(u);const s=i.join(`
|
|
120
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
121
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
122
|
+
${s}`:s,o=o?`${o}
|
|
123
|
+
${c}`:c;const p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=p,r.length===0)break;const d=a.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){const h=d,g=h.raw+`
|
|
124
|
+
`+r.join(`
|
|
125
|
+
`),v=this.blockquote(g);a[a.length-1]=v,n=n.substring(0,n.length-h.raw.length)+v.raw,o=o.substring(0,o.length-h.text.length)+v.text;break}else if((d==null?void 0:d.type)==="list"){const h=d,g=h.raw+`
|
|
126
|
+
`+r.join(`
|
|
127
|
+
`),v=this.list(g);a[a.length-1]=v,n=n.substring(0,n.length-d.raw.length)+v.raw,o=o.substring(0,o.length-h.raw.length)+v.raw,r=g.substring(a.at(-1).raw.length).split(`
|
|
128
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let l=!1;for(;e;){let u=!1,s="",c="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let p=t[2].split(`
|
|
129
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),d=e.split(`
|
|
130
|
+
`,1)[0],h=!p.trim(),g=0;if(this.options.pedantic?(g=2,c=p.trimStart()):h?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,c=p.slice(g),g+=t[1].length),h&&this.rules.other.blankLine.test(d)&&(s+=d+`
|
|
131
|
+
`,e=e.substring(d.length+1),u=!0),!u){const C=this.rules.other.nextBulletRegex(g),y=this.rules.other.hrRegex(g),b=this.rules.other.fencesBeginRegex(g),x=this.rules.other.headingBeginRegex(g),B=this.rules.other.htmlBeginRegex(g);for(;e;){const A=e.split(`
|
|
132
|
+
`,1)[0];let F;if(d=A,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),F=d):F=d.replace(this.rules.other.tabCharGlobal," "),b.test(d)||x.test(d)||B.test(d)||C.test(d)||y.test(d))break;if(F.search(this.rules.other.nonSpaceChar)>=g||!d.trim())c+=`
|
|
133
|
+
`+F.slice(g);else{if(h||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(p)||x.test(p)||y.test(p))break;c+=`
|
|
134
|
+
`+d}!h&&!d.trim()&&(h=!0),s+=A+`
|
|
135
|
+
`,e=e.substring(A.length+1),p=F.slice(g)}}o.loose||(l?o.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(l=!0));let v=null,f;this.options.gfm&&(v=this.rules.other.listIsTask.exec(c),v&&(f=v[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:s,task:!!v,checked:f,loose:!1,text:c,tokens:[]}),o.raw+=s}const i=o.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let u=0;u<o.items.length;u++)if(this.lexer.state.top=!1,o.items[u].tokens=this.lexer.blockTokens(o.items[u].text,[]),!o.loose){const s=o.items[u].tokens.filter(p=>p.type==="space"),c=s.length>0&&s.some(p=>this.rules.other.anyLine.test(p.raw));o.loose=c}if(o.loose)for(let u=0;u<o.items.length;u++)o.items[u].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:o}}}table(e){var l;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=td(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
136
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const i of n)this.rules.other.tableAlignRight.test(i)?a.align.push("right"):this.rules.other.tableAlignCenter.test(i)?a.align.push("center"):this.rules.other.tableAlignLeft.test(i)?a.align.push("left"):a.align.push(null);for(let i=0;i<r.length;i++)a.header.push({text:r[i],tokens:this.lexer.inline(r[i]),header:!0,align:a.align[i]});for(const i of o)a.rows.push(td(i,a.header.length).map((u,s)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[s]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
137
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=bo(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=O4(t[2],"()");if(a===-2)return;if(a>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),rd(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[n.toLowerCase()];if(!o){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return rd(r,o,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){const o=[...n[0]].length-1;let a,l,i=o,u=0;const s=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+o);(n=s.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(l=[...a].length,n[3]||n[4]){i+=l;continue}else if((n[5]||n[6])&&o%3&&!((o+l)%3)){u+=l;continue}if(i-=l,i>0)continue;l=Math.min(l,l+i+u);const c=[...n[0]][0].length,p=e.slice(0,o+n.index+c+l);if(Math.min(o,l)%2){const h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}const d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Lr=class ls{constructor(t){Dt(this,"tokens"),Dt(this,"options"),Dt(this,"state"),Dt(this,"tokenizer"),Dt(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||En,this.options.tokenizer=this.options.tokenizer||new ei,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:Qt,block:ma.normal,inline:Co.normal};this.options.pedantic?(r.block=ma.pedantic,r.inline=Co.pedantic):this.options.gfm&&(r.block=ma.gfm,this.options.breaks?r.inline=Co.breaks:r.inline=Co.gfm),this.tokenizer.rules=r}static get rules(){return{block:ma,inline:Co}}static lex(t,r){return new ls(r).lex(t)}static lexInline(t,r){return new ls(r).inlineTokens(t)}lex(t){t=t.replace(Qt.carriageReturn,`
|
|
138
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var o,a,l;for(this.options.pedantic&&(t=t.replace(Qt.tabCharGlobal," ").replace(Qt.spaceLine,""));t;){let i;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(s=>(i=s.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);const s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
|
|
139
|
+
`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="paragraph"||(s==null?void 0:s.type)==="text"?(s.raw+=`
|
|
140
|
+
`+i.raw,s.text+=`
|
|
141
|
+
`+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="paragraph"||(s==null?void 0:s.type)==="text"?(s.raw+=`
|
|
142
|
+
`+i.raw,s.text+=`
|
|
143
|
+
`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let u=t;if((l=this.options.extensions)!=null&&l.startBlock){let s=1/0;const c=t.slice(1);let p;this.options.extensions.startBlock.forEach(d=>{p=d.call({lexer:this},c),typeof p=="number"&&p>=0&&(s=Math.min(s,p))}),s<1/0&&s>=0&&(u=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(u))){const s=r.at(-1);n&&(s==null?void 0:s.type)==="paragraph"?(s.raw+=`
|
|
144
|
+
`+i.raw,s.text+=`
|
|
145
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=u.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="text"?(s.raw+=`
|
|
146
|
+
`+i.raw,s.text+=`
|
|
147
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var i,u,s;let n=t,o=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,l="";for(;t;){a||(l=""),a=!1;let c;if((u=(i=this.options.extensions)==null?void 0:i.inline)!=null&&u.some(d=>(c=d.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);const d=r.at(-1);c.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=c.raw,d.text+=c.text):r.push(c);continue}if(c=this.tokenizer.emStrong(t,n,l)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),r.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),r.push(c);continue}let p=t;if((s=this.options.extensions)!=null&&s.startInline){let d=1/0;const h=t.slice(1);let g;this.options.extensions.startInline.forEach(v=>{g=v.call({lexer:this},h),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(p=t.substring(0,d+1))}if(c=this.tokenizer.inlineText(p)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(l=c.raw.slice(-1)),a=!0;const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=c.raw,d.text+=c.text):r.push(c);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return r}},ti=class{constructor(e){Dt(this,"options"),Dt(this,"parser"),this.options=e||En}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(Qt.notSpaceStart))==null?void 0:a[0],o=e.replace(Qt.endingNewline,"")+`
|
|
148
|
+
`;return n?'<pre><code class="language-'+Sr(n)+'">'+(r?o:Sr(o,!0))+`</code></pre>
|
|
149
|
+
`:"<pre><code>"+(r?o:Sr(o,!0))+`</code></pre>
|
|
150
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
151
|
+
${this.parser.parse(e)}</blockquote>
|
|
152
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
153
|
+
`}hr(e){return`<hr>
|
|
154
|
+
`}list(e){const t=e.ordered,r=e.start;let n="";for(let l=0;l<e.items.length;l++){const i=e.items[l];n+=this.listitem(i)}const o=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+o+a+`>
|
|
155
|
+
`+n+"</"+o+`>
|
|
156
|
+
`}listitem(e){var r;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Sr(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
157
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
158
|
+
`}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const a=e.rows[o];r="";for(let l=0;l<a.length;l++)r+=this.tablecell(a[l]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
159
|
+
<thead>
|
|
160
|
+
`+t+`</thead>
|
|
161
|
+
`+n+`</table>
|
|
162
|
+
`}tablerow({text:e}){return`<tr>
|
|
163
|
+
${e}</tr>
|
|
164
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
165
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Sr(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=ed(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Sr(t)+'"'),a+=">"+n+"</a>",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=ed(e);if(o===null)return Sr(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Sr(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Sr(e.text)}},hu=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},Ir=class ss{constructor(t){Dt(this,"options"),Dt(this,"renderer"),Dt(this,"textRenderer"),this.options=t||En,this.options.renderer=this.options.renderer||new ti,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new hu}static parse(t,r){return new ss(r).parse(t)}static parseInline(t,r){return new ss(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let l=0;l<t.length;l++){const i=t[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[i.type]){const s=i,c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){n+=c||"";continue}}const u=i;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let s=u,c=this.renderer.text(s);for(;l+1<t.length&&t[l+1].type==="text";)s=t[++l],c+=`
|
|
166
|
+
`+this.renderer.text(s);r?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const s='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,r=this.renderer){var o,a;let n="";for(let l=0;l<t.length;l++){const i=t[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[i.type]){const s=this.options.extensions.renderers[i.type].call({parser:this},i);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=s||"";continue}}const u=i;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{const s='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}},vl,Fa=(vl=class{constructor(e){Dt(this,"options"),Dt(this,"block"),this.options=e||En}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Lr.lex:Lr.lexInline}provideParser(){return this.block?Ir.parse:Ir.parseInline}},Dt(vl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),vl),P4=class{constructor(...e){Dt(this,"defaults",iu()),Dt(this,"options",this.setOptions),Dt(this,"parse",this.parseMarkdown(!0)),Dt(this,"parseInline",this.parseMarkdown(!1)),Dt(this,"Parser",Ir),Dt(this,"Renderer",ti),Dt(this,"TextRenderer",hu),Dt(this,"Lexer",Lr),Dt(this,"Tokenizer",ei),Dt(this,"Hooks",Fa),this.use(...e)}walkTokens(e,t){var n,o;let r=[];for(const a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{const l=a;for(const i of l.header)r=r.concat(this.walkTokens(i.tokens,t));for(const i of l.rows)for(const u of i)r=r.concat(this.walkTokens(u.tokens,t));break}case"list":{const l=a;r=r.concat(this.walkTokens(l.items,t));break}default:{const l=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[l.type]?this.defaults.extensions.childTokens[l.type].forEach(i=>{const u=l[i].flat(1/0);r=r.concat(this.walkTokens(u,t))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const a=t.renderers[o.name];a?t.renderers[o.name]=function(...l){let i=o.renderer.apply(this,l);return i===!1&&(i=a.apply(this,l)),i}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=this.defaults.renderer||new ti(this.defaults);for(const a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const l=a,i=r.renderer[l],u=o[l];o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new ei(this.defaults);for(const a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const l=a,i=r.tokenizer[l],u=o[l];o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new Fa;for(const a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const l=a,i=r.hooks[l],u=o[l];Fa.passThroughHooks.has(a)?o[l]=s=>{if(this.defaults.async)return Promise.resolve(i.call(o,s)).then(p=>u.call(o,p));const c=i.call(o,s);return u.call(o,c)}:o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(l){let i=[];return i.push(a.call(this,l)),o&&(i=i.concat(o.call(this,l))),i}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Lr.lex(e,t??this.defaults)}parser(e,t){return Ir.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?Lr.lex:Lr.lexInline,i=o.hooks?o.hooks.provideParser():e?Ir.parse:Ir.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(u=>l(u,o)).then(u=>o.hooks?o.hooks.processAllTokens(u):u).then(u=>o.walkTokens?Promise.all(this.walkTokens(u,o.walkTokens)).then(()=>u):u).then(u=>i(u,o)).then(u=>o.hooks?o.hooks.postprocess(u):u).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let u=l(t,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let s=i(u,o);return o.hooks&&(s=o.hooks.postprocess(s)),s}catch(u){return a(u)}}}onError(e,t){return r=>{if(r.message+=`
|
|
167
|
+
Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Sr(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Dn=new P4;function gt(e,t){return Dn.parse(e,t)}gt.options=gt.setOptions=function(e){return Dn.setOptions(e),gt.defaults=Dn.defaults,Y2(gt.defaults),gt};gt.getDefaults=iu;gt.defaults=En;gt.use=function(...e){return Dn.use(...e),gt.defaults=Dn.defaults,Y2(gt.defaults),gt};gt.walkTokens=function(e,t){return Dn.walkTokens(e,t)};gt.parseInline=Dn.parseInline;gt.Parser=Ir;gt.parser=Ir.parse;gt.Renderer=ti;gt.TextRenderer=hu;gt.Lexer=Lr;gt.lexer=Lr.lex;gt.Tokenizer=ei;gt.Hooks=Fa;gt.parse=gt;gt.options;gt.setOptions;gt.use;gt.walkTokens;gt.parseInline;Ir.parse;Lr.lex;var or=function(){return or=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},or.apply(this,arguments)};function ri(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Et="-ms-",No="-moz-",vt="-webkit-",s1="comm",Ei="rule",gu="decl",T4="@import",u1="@keyframes",M4="@layer",c1=Math.abs,mu=String.fromCharCode,us=Object.assign;function L4(e,t){return jt(e,0)^45?(((t<<2^jt(e,0))<<2^jt(e,1))<<2^jt(e,2))<<2^jt(e,3):0}function d1(e){return e.trim()}function Tr(e,t){return(e=t.exec(e))?e[0]:e}function nt(e,t,r){return e.replace(t,r)}function $a(e,t,r){return e.indexOf(t,r)}function jt(e,t){return e.charCodeAt(t)|0}function Zn(e,t,r){return e.slice(t,r)}function kr(e){return e.length}function f1(e){return e.length}function wo(e,t){return t.push(e),e}function I4(e,t){return e.map(t).join("")}function nd(e,t){return e.filter(function(r){return!Tr(r,t)})}var Si=1,Gn=1,p1=0,fr=0,Rt=0,lo="";function ki(e,t,r,n,o,a,l,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Si,column:Gn,length:l,return:"",siblings:i}}function Vr(e,t){return us(ki("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Rn(e){for(;e.root;)e=Vr(e.root,{children:[e]});wo(e,e.siblings)}function j4(){return Rt}function _4(){return Rt=fr>0?jt(lo,--fr):0,Gn--,Rt===10&&(Gn=1,Si--),Rt}function vr(){return Rt=fr<p1?jt(lo,fr++):0,Gn++,Rt===10&&(Gn=1,Si++),Rt}function mn(){return jt(lo,fr)}function Na(){return fr}function Bi(e,t){return Zn(lo,e,t)}function cs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function H4(e){return Si=Gn=1,p1=kr(lo=e),fr=0,[]}function z4(e){return lo="",e}function Cl(e){return d1(Bi(fr-1,ds(e===91?e+2:e===40?e+1:e)))}function K4(e){for(;(Rt=mn())&&Rt<33;)vr();return cs(e)>2||cs(Rt)>3?"":" "}function W4(e,t){for(;--t&&vr()&&!(Rt<48||Rt>102||Rt>57&&Rt<65||Rt>70&&Rt<97););return Bi(e,Na()+(t<6&&mn()==32&&vr()==32))}function ds(e){for(;vr();)switch(Rt){case e:return fr;case 34:case 39:e!==34&&e!==39&&ds(Rt);break;case 40:e===41&&ds(e);break;case 92:vr();break}return fr}function V4(e,t){for(;vr()&&e+Rt!==57&&!(e+Rt===84&&mn()===47););return"/*"+Bi(t,fr-1)+"*"+mu(e===47?e:vr())}function q4(e){for(;!cs(mn());)vr();return Bi(e,fr)}function U4(e){return z4(Oa("",null,null,null,[""],e=H4(e),0,[0],e))}function Oa(e,t,r,n,o,a,l,i,u){for(var s=0,c=0,p=l,d=0,h=0,g=0,v=1,f=1,C=1,y=0,b="",x=o,B=a,A=n,F=b;f;)switch(g=y,y=vr()){case 40:if(g!=108&&jt(F,p-1)==58){$a(F+=nt(Cl(y),"&","&\f"),"&\f",c1(s?i[s-1]:0))!=-1&&(C=-1);break}case 34:case 39:case 91:F+=Cl(y);break;case 9:case 10:case 13:case 32:F+=K4(g);break;case 92:F+=W4(Na()-1,7);continue;case 47:switch(mn()){case 42:case 47:wo(Z4(V4(vr(),Na()),t,r,u),u);break;default:F+="/"}break;case 123*v:i[s++]=kr(F)*C;case 125*v:case 59:case 0:switch(y){case 0:case 125:f=0;case 59+c:C==-1&&(F=nt(F,/\f/g,"")),h>0&&kr(F)-p&&wo(h>32?ad(F+";",n,r,p-1,u):ad(nt(F," ","")+";",n,r,p-2,u),u);break;case 59:F+=";";default:if(wo(A=od(F,t,r,s,c,o,i,b,x=[],B=[],p,a),a),y===123)if(c===0)Oa(F,t,A,A,x,a,p,i,B);else switch(d===99&&jt(F,3)===110?100:d){case 100:case 108:case 109:case 115:Oa(e,A,A,n&&wo(od(e,A,A,0,0,o,i,b,o,x=[],p,B),B),o,B,p,i,n?x:B);break;default:Oa(F,A,A,A,[""],B,0,i,B)}}s=c=h=0,v=C=1,b=F="",p=l;break;case 58:p=1+kr(F),h=g;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&_4()==125)continue}switch(F+=mu(y),y*v){case 38:C=c>0?1:(F+="\f",-1);break;case 44:i[s++]=(kr(F)-1)*C,C=1;break;case 64:mn()===45&&(F+=Cl(vr())),d=mn(),c=p=kr(b=F+=q4(Na())),y++;break;case 45:g===45&&kr(F)==2&&(v=0)}}return a}function od(e,t,r,n,o,a,l,i,u,s,c,p){for(var d=o-1,h=o===0?a:[""],g=f1(h),v=0,f=0,C=0;v<n;++v)for(var y=0,b=Zn(e,d+1,d=c1(f=l[v])),x=e;y<g;++y)(x=d1(f>0?h[y]+" "+b:nt(b,/&\f/g,h[y])))&&(u[C++]=x);return ki(e,t,r,o===0?Ei:i,u,s,c,p)}function Z4(e,t,r,n){return ki(e,t,r,s1,mu(j4()),Zn(e,2,-2),0,n)}function ad(e,t,r,n,o){return ki(e,t,r,gu,Zn(e,0,n),Zn(e,n+1,-1),n,o)}function h1(e,t,r){switch(L4(e,t)){case 5103:return vt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return vt+e+e;case 4789:return No+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return vt+e+No+e+Et+e+e;case 5936:switch(jt(e,t+11)){case 114:return vt+e+Et+nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return vt+e+Et+nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return vt+e+Et+nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return vt+e+Et+e+e;case 6165:return vt+e+Et+"flex-"+e+e;case 5187:return vt+e+nt(e,/(\w+).+(:[^]+)/,vt+"box-$1$2"+Et+"flex-$1$2")+e;case 5443:return vt+e+Et+"flex-item-"+nt(e,/flex-|-self/g,"")+(Tr(e,/flex-|baseline/)?"":Et+"grid-row-"+nt(e,/flex-|-self/g,""))+e;case 4675:return vt+e+Et+"flex-line-pack"+nt(e,/align-content|flex-|-self/g,"")+e;case 5548:return vt+e+Et+nt(e,"shrink","negative")+e;case 5292:return vt+e+Et+nt(e,"basis","preferred-size")+e;case 6060:return vt+"box-"+nt(e,"-grow","")+vt+e+Et+nt(e,"grow","positive")+e;case 4554:return vt+nt(e,/([^-])(transform)/g,"$1"+vt+"$2")+e;case 6187:return nt(nt(nt(e,/(zoom-|grab)/,vt+"$1"),/(image-set)/,vt+"$1"),e,"")+e;case 5495:case 3959:return nt(e,/(image-set\([^]*)/,vt+"$1$`$1");case 4968:return nt(nt(e,/(.+:)(flex-)?(.*)/,vt+"box-pack:$3"+Et+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+vt+e+e;case 4200:if(!Tr(e,/flex-|baseline/))return Et+"grid-column-align"+Zn(e,t)+e;break;case 2592:case 3360:return Et+nt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,Tr(n.props,/grid-\w+-end/)})?~$a(e+(r=r[t].value),"span",0)?e:Et+nt(e,"-start","")+e+Et+"grid-row-span:"+(~$a(r,"span",0)?Tr(r,/\d+/):+Tr(r,/\d+/)-+Tr(e,/\d+/))+";":Et+nt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return Tr(n.props,/grid-\w+-start/)})?e:Et+nt(nt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return nt(e,/(.+)-inline(.+)/,vt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(kr(e)-1-t>6)switch(jt(e,t+1)){case 109:if(jt(e,t+4)!==45)break;case 102:return nt(e,/(.+:)(.+)-([^]+)/,"$1"+vt+"$2-$3$1"+No+(jt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~$a(e,"stretch",0)?h1(nt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return nt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,l,i,u,s){return Et+o+":"+a+s+(l?Et+o+"-span:"+(i?u:+u-+a)+s:"")+e});case 4949:if(jt(e,t+6)===121)return nt(e,":",":"+vt)+e;break;case 6444:switch(jt(e,jt(e,14)===45?18:11)){case 120:return nt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+vt+(jt(e,14)===45?"inline-":"")+"box$3$1"+vt+"$2$3$1"+Et+"$2box$3")+e;case 100:return nt(e,":",":"+Et)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return nt(e,"scroll-","scroll-snap-")+e}return e}function ni(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function G4(e,t,r,n){switch(e.type){case M4:if(e.children.length)break;case T4:case gu:return e.return=e.return||e.value;case s1:return"";case u1:return e.return=e.value+"{"+ni(e.children,n)+"}";case Ei:if(!kr(e.value=e.props.join(",")))return""}return kr(r=ni(e.children,n))?e.return=e.value+"{"+r+"}":""}function X4(e){var t=f1(e);return function(r,n,o,a){for(var l="",i=0;i<t;i++)l+=e[i](r,n,o,a)||"";return l}}function Y4(e){return function(t){t.root||(t=t.return)&&e(t)}}function Q4(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case gu:e.return=h1(e.value,e.length,r);return;case u1:return ni([Vr(e,{value:nt(e.value,"@","@"+vt)})],n);case Ei:if(e.length)return I4(r=e.props,function(o){switch(Tr(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Rn(Vr(e,{props:[nt(o,/:(read-\w+)/,":"+No+"$1")]})),Rn(Vr(e,{props:[o]})),us(e,{props:nd(r,n)});break;case"::placeholder":Rn(Vr(e,{props:[nt(o,/:(plac\w+)/,":"+vt+"input-$1")]})),Rn(Vr(e,{props:[nt(o,/:(plac\w+)/,":"+No+"$1")]})),Rn(Vr(e,{props:[nt(o,/:(plac\w+)/,Et+"input-$1")]})),Rn(Vr(e,{props:[o]})),us(e,{props:nd(r,n)});break}return""})}}var J4={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Xn=typeof process<"u"&&ir!==void 0&&(ir.REACT_APP_SC_ATTR||ir.SC_ATTR)||"data-styled",g1="active",m1="data-styled-version",Ai="6.1.19",vu=`/*!sc*/
|
|
168
|
+
`,oi=typeof window<"u"&&typeof document<"u",eb=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&ir!==void 0&&ir.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&ir.REACT_APP_SC_DISABLE_SPEEDY!==""?ir.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&ir.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&ir!==void 0&&ir.SC_DISABLE_SPEEDY!==void 0&&ir.SC_DISABLE_SPEEDY!==""&&ir.SC_DISABLE_SPEEDY!=="false"&&ir.SC_DISABLE_SPEEDY),Fi=Object.freeze([]),Yn=Object.freeze({});function tb(e,t,r){return r===void 0&&(r=Yn),e.theme!==r.theme&&e.theme||t||r.theme}var v1=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),rb=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,nb=/(^-|-$)/g;function id(e){return e.replace(rb,"-").replace(nb,"")}var ob=/(a)(d)/gi,va=52,ld=function(e){return String.fromCharCode(e+(e>25?39:97))};function fs(e){var t,r="";for(t=Math.abs(e);t>va;t=t/va|0)r=ld(t%va)+r;return(ld(t%va)+r).replace(ob,"$1-$2")}var bl,C1=5381,Ln=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},b1=function(e){return Ln(C1,e)};function ab(e){return fs(b1(e)>>>0)}function ib(e){return e.displayName||e.name||"Component"}function yl(e){return typeof e=="string"&&!0}var y1=typeof Symbol=="function"&&Symbol.for,x1=y1?Symbol.for("react.memo"):60115,lb=y1?Symbol.for("react.forward_ref"):60112,sb={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ub={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},w1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},cb=((bl={})[lb]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bl[x1]=w1,bl);function sd(e){return("type"in(t=e)&&t.type.$$typeof)===x1?w1:"$$typeof"in e?cb[e.$$typeof]:sb;var t}var db=Object.defineProperty,fb=Object.getOwnPropertyNames,ud=Object.getOwnPropertySymbols,pb=Object.getOwnPropertyDescriptor,hb=Object.getPrototypeOf,cd=Object.prototype;function D1(e,t,r){if(typeof t!="string"){if(cd){var n=hb(t);n&&n!==cd&&D1(e,n,r)}var o=fb(t);ud&&(o=o.concat(ud(t)));for(var a=sd(e),l=sd(t),i=0;i<o.length;++i){var u=o[i];if(!(u in ub||r&&r[u]||l&&u in l||a&&u in a)){var s=pb(t,u);try{db(e,u,s)}catch{}}}}return e}function Qn(e){return typeof e=="function"}function Cu(e){return typeof e=="object"&&"styledComponentId"in e}function fn(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function dd(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Wo(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ps(e,t,r){if(r===void 0&&(r=!1),!r&&!Wo(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=ps(e[n],t[n]);else if(Wo(t))for(var n in t)e[n]=ps(e[n],t[n]);return e}function bu(e,t){Object.defineProperty(e,"toString",{value:t})}function Jo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var gb=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,a=o;t>=a;)if((a<<=1)<0)throw Jo(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var l=o;l<a;l++)this.groupSizes[l]=0}for(var i=this.indexOfGroup(t+1),u=(l=0,r.length);l<u;l++)this.tag.insertRule(i,r[l])&&(this.groupSizes[t]++,i++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),o=n+r;this.groupSizes[t]=0;for(var a=n;a<o;a++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),a=o+n,l=o;l<a;l++)r+="".concat(this.tag.getRule(l)).concat(vu);return r},e})(),Ra=new Map,ai=new Map,Pa=1,Ca=function(e){if(Ra.has(e))return Ra.get(e);for(;ai.has(Pa);)Pa++;var t=Pa++;return Ra.set(e,t),ai.set(t,e),t},mb=function(e,t){Pa=t+1,Ra.set(e,t),ai.set(t,e)},vb="style[".concat(Xn,"][").concat(m1,'="').concat(Ai,'"]'),Cb=new RegExp("^".concat(Xn,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),bb=function(e,t,r){for(var n,o=r.split(","),a=0,l=o.length;a<l;a++)(n=o[a])&&e.registerName(t,n)},yb=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(vu),o=[],a=0,l=n.length;a<l;a++){var i=n[a].trim();if(i){var u=i.match(Cb);if(u){var s=0|parseInt(u[1],10),c=u[2];s!==0&&(mb(c,s),bb(e,c,u[3]),e.getTag().insertRules(s,o)),o.length=0}else o.push(i)}}},fd=function(e){for(var t=document.querySelectorAll(vb),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(Xn)!==g1&&(yb(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function xb(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var E1=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(i){var u=Array.from(i.querySelectorAll("style[".concat(Xn,"]")));return u[u.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(Xn,g1),n.setAttribute(m1,Ai);var l=xb();return l&&n.setAttribute("nonce",l),r.insertBefore(n,a),n},wb=(function(){function e(t){this.element=E1(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,o=0,a=n.length;o<a;o++){var l=n[o];if(l.ownerNode===r)return l}throw Jo(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e})(),Db=(function(){function e(t){this.element=E1(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),Eb=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),pd=oi,Sb={isServer:!oi,useCSSOMInjection:!eb},S1=(function(){function e(t,r,n){t===void 0&&(t=Yn),r===void 0&&(r={});var o=this;this.options=or(or({},Sb),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&oi&&pd&&(pd=!1,fd(this)),bu(this,function(){return(function(a){for(var l=a.getTag(),i=l.length,u="",s=function(p){var d=(function(C){return ai.get(C)})(p);if(d===void 0)return"continue";var h=a.names.get(d),g=l.getGroup(p);if(h===void 0||!h.size||g.length===0)return"continue";var v="".concat(Xn,".g").concat(p,'[id="').concat(d,'"]'),f="";h!==void 0&&h.forEach(function(C){C.length>0&&(f+="".concat(C,","))}),u+="".concat(g).concat(v,'{content:"').concat(f,'"}').concat(vu)},c=0;c<i;c++)s(c);return u})(o)})}return e.registerId=function(t){return Ca(t)},e.prototype.rehydrate=function(){!this.server&&oi&&fd(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(or(or({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(r){var n=r.useCSSOMInjection,o=r.target;return r.isServer?new Eb(o):n?new wb(o):new Db(o)})(this.options),new gb(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(Ca(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(Ca(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Ca(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),kb=/&/g,Bb=/^\s*\/\/.*$/gm;function k1(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=k1(r.children,t)),r})}function Ab(e){var t,r,n,o=Yn,a=o.options,l=a===void 0?Yn:a,i=o.plugins,u=i===void 0?Fi:i,s=function(d,h,g){return g.startsWith(r)&&g.endsWith(r)&&g.replaceAll(r,"").length>0?".".concat(t):d},c=u.slice();c.push(function(d){d.type===Ei&&d.value.includes("&")&&(d.props[0]=d.props[0].replace(kb,r).replace(n,s))}),l.prefix&&c.push(Q4),c.push(G4);var p=function(d,h,g,v){h===void 0&&(h=""),g===void 0&&(g=""),v===void 0&&(v="&"),t=v,r=h,n=new RegExp("\\".concat(r,"\\b"),"g");var f=d.replace(Bb,""),C=U4(g||h?"".concat(g," ").concat(h," { ").concat(f," }"):f);l.namespace&&(C=k1(C,l.namespace));var y=[];return ni(C,X4(c.concat(Y4(function(b){return y.push(b)})))),y};return p.hash=u.length?u.reduce(function(d,h){return h.name||Jo(15),Ln(d,h.name)},C1).toString():"",p}var Fb=new S1,hs=Ab(),B1=pe.createContext({shouldForwardProp:void 0,styleSheet:Fb,stylis:hs});B1.Consumer;pe.createContext(void 0);function hd(){return Jn(B1)}var $b=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=hs);var l=n.name+a.hash;o.hasNameForId(n.id,l)||o.insertRules(n.id,l,a(n.rules,l,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,bu(this,function(){throw Jo(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=hs),this.name+t.hash},e})(),Nb=function(e){return e>="A"&&e<="Z"};function gd(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;Nb(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var A1=function(e){return e==null||e===!1||e===""},F1=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!A1(a)&&(Array.isArray(a)&&a.isCss||Qn(a)?n.push("".concat(gd(o),":"),a,";"):Wo(a)?n.push.apply(n,ri(ri(["".concat(o," {")],F1(a),!1),["}"],!1)):n.push("".concat(gd(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in J4||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function vn(e,t,r,n){if(A1(e))return[];if(Cu(e))return[".".concat(e.styledComponentId)];if(Qn(e)){if(!Qn(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return vn(o,t,r,n)}var a;return e instanceof $b?r?(e.inject(r,n),[e.getName(n)]):[e]:Wo(e)?F1(e):Array.isArray(e)?Array.prototype.concat.apply(Fi,e.map(function(l){return vn(l,t,r,n)})):[e.toString()]}function Ob(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Qn(r)&&!Cu(r))return!1}return!0}var Rb=b1(Ai),Pb=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&Ob(t),this.componentId=r,this.baseHash=Ln(Rb,r),this.baseStyle=n,S1.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))o=fn(o,this.staticRulesId);else{var a=dd(vn(this.rules,t,r,n)),l=fs(Ln(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,l)){var i=n(a,".".concat(l),void 0,this.componentId);r.insertRules(this.componentId,l,i)}o=fn(o,l),this.staticRulesId=l}else{for(var u=Ln(this.baseHash,n.hash),s="",c=0;c<this.rules.length;c++){var p=this.rules[c];if(typeof p=="string")s+=p;else if(p){var d=dd(vn(p,t,r,n));u=Ln(u,d+c),s+=d}}if(s){var h=fs(u>>>0);r.hasNameForId(this.componentId,h)||r.insertRules(this.componentId,h,n(s,".".concat(h),void 0,this.componentId)),o=fn(o,h)}}return o},e})(),$1=pe.createContext(void 0);$1.Consumer;var xl={};function Tb(e,t,r){var n=Cu(e),o=e,a=!yl(e),l=t.attrs,i=l===void 0?Fi:l,u=t.componentId,s=u===void 0?(function(x,B){var A=typeof x!="string"?"sc":id(x);xl[A]=(xl[A]||0)+1;var F="".concat(A,"-").concat(ab(Ai+A+xl[A]));return B?"".concat(B,"-").concat(F):F})(t.displayName,t.parentComponentId):u,c=t.displayName,p=c===void 0?(function(x){return yl(x)?"styled.".concat(x):"Styled(".concat(ib(x),")")})(e):c,d=t.displayName&&t.componentId?"".concat(id(t.displayName),"-").concat(t.componentId):t.componentId||s,h=n&&o.attrs?o.attrs.concat(i).filter(Boolean):i,g=t.shouldForwardProp;if(n&&o.shouldForwardProp){var v=o.shouldForwardProp;if(t.shouldForwardProp){var f=t.shouldForwardProp;g=function(x,B){return v(x,B)&&f(x,B)}}else g=v}var C=new Pb(r,d,n?o.componentStyle:void 0);function y(x,B){return(function(A,F,$){var D=A.attrs,L=A.componentStyle,N=A.defaultProps,T=A.foldedComponentIds,P=A.styledComponentId,S=A.target,k=pe.useContext($1),O=hd(),E=A.shouldForwardProp||O.shouldForwardProp,I=tb(F,k,N)||Yn,M=(function(ae,R,Z){for(var V,K=or(or({},R),{className:void 0,theme:Z}),X=0;X<ae.length;X+=1){var Q=Qn(V=ae[X])?V(K):V;for(var ee in Q)K[ee]=ee==="className"?fn(K[ee],Q[ee]):ee==="style"?or(or({},K[ee]),Q[ee]):Q[ee]}return R.className&&(K.className=fn(K.className,R.className)),K})(D,F,I),H=M.as||S,z={};for(var U in M)M[U]===void 0||U[0]==="$"||U==="as"||U==="theme"&&M.theme===I||(U==="forwardedAs"?z.as=M.forwardedAs:E&&!E(U,H)||(z[U]=M[U]));var G=(function(ae,R){var Z=hd(),V=ae.generateAndInjectStyles(R,Z.styleSheet,Z.stylis);return V})(L,M),Y=fn(T,P);return G&&(Y+=" "+G),M.className&&(Y+=" "+M.className),z[yl(H)&&!v1.has(H)?"class":"className"]=Y,$&&(z.ref=$),Ta(H,z)})(b,x,B)}y.displayName=p;var b=pe.forwardRef(y);return b.attrs=h,b.componentStyle=C,b.displayName=p,b.shouldForwardProp=g,b.foldedComponentIds=n?fn(o.foldedComponentIds,o.styledComponentId):"",b.styledComponentId=d,b.target=n?o.target:e,Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(x){this._foldedDefaultProps=n?(function(B){for(var A=[],F=1;F<arguments.length;F++)A[F-1]=arguments[F];for(var $=0,D=A;$<D.length;$++)ps(B,D[$],!0);return B})({},o.defaultProps,x):x}}),bu(b,function(){return".".concat(b.styledComponentId)}),a&&D1(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function md(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var vd=function(e){return Object.assign(e,{isCss:!0})};function Mb(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Qn(e)||Wo(e))return vd(vn(md(Fi,ri([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?vn(n):vd(vn(md(n,t)))}function gs(e,t,r){if(r===void 0&&(r=Yn),!t)throw Jo(1,t);var n=function(o){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];return e(t,r,Mb.apply(void 0,ri([o],a,!1)))};return n.attrs=function(o){return gs(e,t,or(or({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return gs(e,t,or(or({},r),o))},n}var N1=function(e){return gs(Tb,e)},$t=N1;v1.forEach(function(e){$t[e]=N1(e)});const Lb=$t.span`
|
|
169
|
+
display: inline-block;
|
|
170
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
171
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
172
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
173
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
174
|
+
border: none !important;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
transition: all 0.2s;
|
|
177
|
+
font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
|
|
178
|
+
user-select: none;
|
|
179
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
180
|
+
line-height: 2;
|
|
181
|
+
width: auto; /* 让宽度根据内容自动调整 */
|
|
182
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
183
|
+
min-height: ${e=>{var l,i,u,s;const t=((i=(l=e.$styles)==null?void 0:l.templateField)==null?void 0:i.padding)||"2px 6px",r=((s=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:s.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
|
|
184
|
+
|
|
185
|
+
/* 高度自适应 */
|
|
186
|
+
height: auto; /* 允许高度根据内容自动调整 */
|
|
187
|
+
white-space: normal; /* 允许换行 */
|
|
188
|
+
box-sizing: border-box; /* 确保padding和border包含在宽度内 */
|
|
189
|
+
overflow: visible; /* 确保内容不被隐藏 */
|
|
190
|
+
word-wrap: break-word; /* 允许长单词换行 */
|
|
191
|
+
max-width: 100%; /* 限制在容器宽度内 */
|
|
192
|
+
|
|
193
|
+
/* 使用传入的样式配置 */
|
|
194
|
+
background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
|
|
195
|
+
color: #055AFF;
|
|
196
|
+
border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
197
|
+
|
|
198
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
199
|
+
background-color: white !important;
|
|
200
|
+
color: #055AFF !important;
|
|
201
|
+
border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
|
|
202
|
+
outline: none;
|
|
203
|
+
min-width: 30px;
|
|
204
|
+
`}}
|
|
205
|
+
|
|
206
|
+
&:hover {
|
|
207
|
+
opacity: 0.8;
|
|
208
|
+
}
|
|
209
|
+
`,Ib=$t.input`
|
|
210
|
+
background: white;
|
|
211
|
+
border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
212
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
213
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
214
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
215
|
+
min-width: ${"30px"};
|
|
216
|
+
width: ${e=>{var s,c,p,d;const t=e.$value.length;if(t===0)return((c=(s=e.$styles)==null?void 0:s.templateField)==null?void 0:c.minWidth)||"120px";const r=((d=(p=e.$styles)==null?void 0:p.templateField)==null?void 0:d.padding)||"2px 6.2px",n=r.split(" ").map(h=>parseInt(h)),o=n.length===2?n[1]:n[0],a=12.5,l=20,i=t*a+o*2+l,u=Math.min(Math.max(i,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:a,bufferSpace:l,calculatedWidth:i,maxWidth:e.$maxWidth,finalWidth:u,inputValue:e.$value}),u+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
217
|
+
height: ${e=>{var l,i,u,s;const t=((i=(l=e.$styles)==null?void 0:l.templateField)==null?void 0:i.padding)||"2px 6px",r=((s=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:s.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
|
|
218
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
219
|
+
font-family: inherit;
|
|
220
|
+
outline: none;
|
|
221
|
+
color: #055AFF;
|
|
222
|
+
line-height: 2;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
white-space: nowrap; /* 防止内部换行 */
|
|
225
|
+
overflow: hidden; /* 隐藏超出部分 */
|
|
226
|
+
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
227
|
+
|
|
228
|
+
&:focus {
|
|
229
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
230
|
+
box-shadow: 0 0 0 3px ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}}20;
|
|
231
|
+
}
|
|
232
|
+
`,O1=Jr(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var A,F,$,D,L,N,T,P,S,k,O,E;const l=G2(),[i,u]=ut(!1),[s,c]=ut(e.value||""),[p,d]=ut(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[h,g]=ut(600),v=ct(null),f=ze(()=>{try{const I=document.querySelector('[data-slate-editor="true"]');if(I){const M=I.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||I.parentElement;if(M){const H=M.clientWidth,z=H-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",H,"\u53EF\u7528\u5BBD\u5EA6:",z),Math.max(z,200)}}return 600}catch(I){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",I),600}},[]);xt(()=>{d(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const I=f();g(I)},[e.value,e.placeholder,f]);const C=ze(()=>{u(!0),c(e.value||""),setTimeout(()=>{v.current&&(v.current.focus(),v.current.select())},0)},[e.value]),y=ze(I=>{const M=I.target.value;c(M)},[]),b=ze(()=>{const I=ue.findPath(l,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",I),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",s),ve.setNodes(l,{value:s},{at:I});const M=s.trim()!==""?s:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";d(M);const H=l.children[I[0]];if(H&&"children"in H){const z=H.children[I[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",z)}u(!1)},[l,e,s]),x=ze(()=>{b()},[b]),B=ze(I=>{I.key==="Enter"?(I.preventDefault(),b()):I.key==="Escape"&&(I.preventDefault(),c(e.value||""),u(!1))},[b,e.value]);return i?j.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[j.jsx(Ib,{ref:v,value:s,onChange:y,onBlur:x,onKeyDown:B,placeholder:"",$styles:n,$value:s,$maxWidth:h,style:{backgroundColor:"white",color:((A=n==null?void 0:n.templateField)==null?void 0:A.textColor)||"#055AFF",border:`2px solid ${((F=n==null?void 0:n.templateField)==null?void 0:F.borderColor)||"#84ADFF"}`,minWidth:(($=n==null?void 0:n.templateField)==null?void 0:$.minWidth)||"120px"}}),r]}):j.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[j.jsxs(Lb,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:p.length,onClick:C,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(D=n==null?void 0:n.templateField)==null?void 0:D.backgroundColor,borderColor:(L=n==null?void 0:n.templateField)==null?void 0:L.borderColor,borderRadius:(N=n==null?void 0:n.templateField)==null?void 0:N.borderRadius,padding:(T=n==null?void 0:n.templateField)==null?void 0:T.padding,margin:(P=n==null?void 0:n.templateField)==null?void 0:P.margin,fontSize:(S=n==null?void 0:n.templateField)==null?void 0:S.fontSize,fontWeight:(k=n==null?void 0:n.templateField)==null?void 0:k.fontWeight,minWidth:(O=n==null?void 0:n.templateField)==null?void 0:O.minWidth,color:(E=n==null?void 0:n.templateField)==null?void 0:E.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:p,displayValueLength:p.length,contentLength:p.length}),null),p]}),j.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});O1.displayName="TemplateField";const jb=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return j.jsxs("div",{...t,className:"think-container",children:[j.jsx("div",{className:"think-indicator"}),j.jsx("div",{className:"think-content",children:j.jsx("div",{className:"think-text text-[#86909C] pl-5 my-3 border border-[#ECECEE] border-solid border-l-3 border-t-0 border-b-0 border-r-0",style:{color:`${(a=r==null?void 0:r.text)==null?void 0:a.color} !important`,display:o?"none":"block"},children:e})})]})},R1=pe.forwardRef(({attributes:e,element:t,eventsEmit:r,onDataUpdate:n,dataSource:o,tagIndex:a},l)=>{var B;const[i,u]=ut(null),[s,c]=ut(!0),[p,d]=ut(1),[h,g]=ut(10);xt(()=>{if(!i){if(!o){c(!0);try{const A=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(A)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const A=(o==null?void 0:o.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",A);let F=null,$=null,D;for(const T of A){const P=T==null?void 0:T.reply;if(!(P!=null&&P.databaseReference))continue;const S=P.databaseReference;console.log(S,"123123123jk123lk12j3l12jl3"),S!=null&&S.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",S.retrieveSqlData.filePath),D=S.retrieveSqlData.filePath);let k=S;if(typeof S=="string")try{k=JSON.parse(S)}catch{}if(!k)continue;const O=Array.isArray(k)?k:[k],E=O.findIndex(H=>(H==null?void 0:H.id)===t.id),I=E>=0?O[E]:null;if(console.log("~~~~~~~~~~~~~~~",I),I){F=I,$=I.retrieveSqlData||I.retrieve_table_data||I.retrieveTableData;break}const M=O.find(H=>{var z,U;return(((U=(z=H==null?void 0:H.retrieveSqlData)==null?void 0:z.preData)==null?void 0:U.length)||0)>0});!F&&M&&(F=M,$=M.retrieveSqlData||M.retrieve_table_data||M.retrieveTableData)}if(!F||!$){console.warn("No databaseReference with preData found for id:",t.id),c(!1);return}const L=Array.isArray($==null?void 0:$.preData)?$.preData[0]:null;if(!L){console.warn("Matched item has no preData"),c(!1);return}const N={columns:(L.columns||[]).map(T=>({key:T.key,title:T.title})),rows:L.data||L.rows||[],total:($==null?void 0:$.total)||0,fetchUrl:($==null?void 0:$.fetchUrl)||"/index/knowledgeBase/file/stream",source:D||($==null?void 0:$.source)||(F==null?void 0:F.source)};u(N),c(!1)}catch(A){console.error("Init preData parsing failed:",A),c(!1)}}},[t.id,i,o]),xt(()=>{const A=F=>{try{const $=(F==null?void 0:F.detail)||{},D=$==null?void 0:$.id;if(!D||String(D)!==String(t.id))return;const L=$.databaseReference;if(!L)return;let N=L;if(typeof L=="string")try{N=JSON.parse(L)}catch{}if(!N)return;const T=Array.isArray(N)?N:[N],P=T.findIndex(I=>String(I==null?void 0:I.id)===String(t.id)),S=P>=0?T[P]:null;if(!S)return;const k=(S==null?void 0:S.retrieveSqlData)||(S==null?void 0:S.retrieve_table_data)||(S==null?void 0:S.retrieveTableData),O=Array.isArray(k==null?void 0:k.preData)?k.preData[0]:null;if(!O)return;const E={columns:(O.columns||[]).map(I=>({key:I.key,title:I.title})),rows:O.data||O.rows||[],total:(k==null?void 0:k.total)||0,fetchUrl:(k==null?void 0:k.fetchUrl)||"/index/knowledgeBase/file/stream",source:(S==null?void 0:S.source)||(k==null?void 0:k.source)};u(E),c(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",A),()=>{window.removeEventListener("retrieve-sql-data:data-response",A)}},[t.id]),xt(()=>{n&&i&&n(i)},[i,n]);const v=A=>{if(!A||A.length===0)return[];const F=A.find($=>$&&typeof $=="object")||{};return Object.keys(F).map($=>({key:$,title:$}))},f=(A,F)=>{d(A),F&&g(F);const $=D=>{let L=null;if(D&&Array.isArray(D.columns)&&Array.isArray(D.rows))L={columns:D.columns,rows:D.rows,total:Number(D.total)||0,fetchUrl:D.fetchUrl||(i==null?void 0:i.fetchUrl)||"",source:D.source||(i==null?void 0:i.source)};else if(D&&Array.isArray(D.data)){const N=D.data;L={columns:i!=null&&i.columns&&i.columns.length>0?i.columns:v(N),rows:N,total:Number(D.totalCount??D.total??(i==null?void 0:i.total)??N.length)||0,fetchUrl:(i==null?void 0:i.fetchUrl)||"",source:i==null?void 0:i.source},typeof D.currentPage=="number"&&d(D.currentPage),typeof D.pageSize=="number"&&g(D.pageSize)}else if(Array.isArray(D)){const N=D;L={columns:i!=null&&i.columns&&i.columns.length>0?i.columns:v(N),rows:N,total:Number((i==null?void 0:i.total)??N.length)||0,fetchUrl:(i==null?void 0:i.fetchUrl)||"",source:i==null?void 0:i.source}}if(!L){console.warn("replacePredataFunction received unsupported data format:",D);return}console.log("Replacing table data with:",L),u(L)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:A,pageSize:F||h,fetchUrl:i==null?void 0:i.fetchUrl,total:i==null?void 0:i.total,source:i==null?void 0:i.source,replacePredataFunction:$})},C=A=>i!=null&&i.rows?Math.max(...i.rows.map(F=>{const $=F[A];return $?String($).length:0})):0,y=(((B=i==null?void 0:i.columns)==null?void 0:B.length)||0)===1,b=(i==null?void 0:i.columns.map((A,F)=>({title:A.title||A.key,dataIndex:A.key,key:A.key,render:$=>{const D=$==null||$===""?"-":$;return y?j.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(D)}):D},...y?{width:void 0}:{}})))||[],x=(i==null?void 0:i.rows.map((A,F)=>({key:F,...A})))||[];return j.jsx("div",{...e,ref:l,className:"retrieve-sql-data-container my-4",children:s?j.jsxs("div",{className:"flex items-center justify-center py-8",children:[j.jsx(Dd,{size:"large"}),j.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):i?j.jsxs("div",{className:"retrieve-sql-data-content",children:[a!==null&&j.jsxs("div",{className:"mb-2 flex items-center",children:[j.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center",children:a}),j.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]}),j.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:j.jsx(Hr,{columns:b.map((A,F)=>({...A,...y?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:F===0?160:void 0,minWidth:120,maxWidth:F===0?180:300,fixed:F===0?"left":void 0,ellipsis:{showTitle:!0}},render:$=>{if($==null)return"-";const D=String($);if(y)return j.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:D,children:D});const L=C(A.key);let N="200px";return F===0?N="80px":L<=8?N="100px":L<=15?N="150px":L<=25?N="200px":L<=40?N="250px":N="300px",j.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:N,display:"inline-block",cursor:"default"},title:D,children:D})}})),dataSource:x,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:y?"100%":"1000px"},scroll:{x:y?void 0:"max-content",y:400}})}),i.total>h&&j.jsx("div",{className:"flex justify-center mt-3",children:j.jsx(Ed,{current:p,pageSize:h,total:i.total,onChange:f,onShowSizeChange:f,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):j.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});R1.displayName="RetrieveSqlDataElement";const _b=e=>{var a,l,i,u,s,c,p,d;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return j.jsx("div",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(a=t==null?void 0:t.text)==null?void 0:a.color} !important`,margin:"0 0 0.75rem 0"},children:n});case"heading-one":return j.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(l=t==null?void 0:t.text)==null?void 0:l.color} !important`},children:n});case"heading-two":return j.jsx("h2",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(i=t==null?void 0:t.text)==null?void 0:i.color} !important`},children:n});case"heading-three":return j.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(u=t==null?void 0:t.text)==null?void 0:u.color} !important`},children:n});case"bulleted-list":return j.jsx("ul",{...o,children:n});case"numbered-list":return j.jsx("ol",{...o,children:n});case"list-item":return j.jsx("li",{...o,children:n});case"table":return j.jsx("div",{className:"table-container",children:j.jsx("table",{...o,children:j.jsx("tbody",{children:n})})});case"table-row":return j.jsx("tr",{...o,children:n});case"table-cell":return r.header?j.jsx("th",{...o,children:n}):j.jsx("td",{...o,children:n});case"block-quote":return j.jsx("blockquote",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(s=t==null?void 0:t.text)==null?void 0:s.color} !important`},children:n});case"code-block":return j.jsx("pre",{...o,children:j.jsx("code",{style:{color:`${(c=t==null?void 0:t.text)==null?void 0:c.color} !important`},children:n})});case"think":const h=e.extraProps||{},g=h.isCollapsed!==void 0?h.isCollapsed:Object.values(h)[1]===!0,v={...h,isCollapsed:g};return console.log("renderElement think case - fixed extraProps:",v),j.jsx(jb,{attributes:o,styles:t,extraProps:v,children:n});case"template":return j.jsx(O1,{...o,element:r,children:n,styles:t});case"retrieve-sql-data":const f=(C=>{if(!C)return null;try{const y=typeof C=="string"?JSON.parse(C):C;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(y)?y[0]:y}}]}}catch(y){return console.error("Failed to parse databaseReference:",y),null}})(((p=e.extraProps)==null?void 0:p.databaseReference)||e.databaseReference);return j.jsx(R1,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:f||void 0,tagIndex:1,onDataUpdate:C=>{var y;(y=e.eventsEmit)==null||y.call(e,"rtext_table_data_updated",{id:r.id,data:C})}});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),j.jsx("img",{...o,src:r.url,alt:r.alt||"",style:{maxWidth:"100%",height:"auto",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",transition:"transform 0.2s ease-in-out",display:"block"},onError:C=>{const y=C.target;y.style.display="none",console.warn("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25:",r.url)}});case"iframe":return console.log("\u6E32\u67D3iframe\u5143\u7D20:",{src:r.src,width:r.width,height:r.height}),j.jsx("iframe",{...o,src:r.src,width:r.width||"100%",height:r.height||"400",frameBorder:r.frameborder||"0",title:r.title||"",style:{width:r.width||"100%",height:r.height||"400px",border:"none",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",display:"block"},onError:C=>{const y=C.target;y.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return j.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(d=t==null?void 0:t.text)==null?void 0:d.color} !important`},children:n})}},Hb=e=>{var l,i,u,s,c,p;const{attributes:t,children:r,leaf:n,styles:o}=e;(l=o==null?void 0:o.text)!=null&&l.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let a=r;if(n.retrive){const d=n.fromtype==="0",h=n.fromtype==="1",g=n.fromtype==="2",v=n.text||"";let f=v,C="#e6f7ff",y="#1890ff",b="#bae7ff";return d?(f=`${v}`,C="#e6f7ff",y="#1890ff",b="#bae7ff"):h?(f=`${v}`,C="#f6ffed",y="#52c41a",b="#d9f7be"):g&&(f=`${v}`,C="#f9f0ff",y="#722ed1",b="#efdbff"),a=j.jsx("span",{...t,style:{display:"inline-block",background:C,color:y,height:24,width:24,borderRadius:3,padding:"1px 9px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"22px",cursor:"pointer",verticalAlign:"middle"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:x=>x.currentTarget.style.background=b,onMouseLeave:x=>x.currentTarget.style.background=C,children:f}),a}if(n.code)a=j.jsx("code",{...t,style:{color:`${(i=o==null?void 0:o.text)==null?void 0:i.color} !important`},children:a});else{const d=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),h={color:`${(u=o==null?void 0:o.text)==null?void 0:u.color} !important`,fontSize:(s=o==null?void 0:o.text)==null?void 0:s.fontSize,lineHeight:(c=o==null?void 0:o.text)==null?void 0:c.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=j.jsx("span",{...t,className:d,style:h,children:a})}return n.link&&(a=j.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(p=o==null?void 0:o.text)==null?void 0:p.color} !important`},children:a})),a},wl=$t.div`
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
& > * + * {
|
|
236
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* 标题样式 */
|
|
240
|
+
& h1 {
|
|
241
|
+
font-size: ${e=>e.$size==="sm"?"20px":"32px"};
|
|
242
|
+
font-weight: 600;
|
|
243
|
+
margin: 24px 0 16px 0;
|
|
244
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
245
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
246
|
+
padding-bottom: 8px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
& h2 {
|
|
250
|
+
font-size: ${e=>e.$size==="sm"?"18px":"24px"};
|
|
251
|
+
font-weight: 600;
|
|
252
|
+
margin: 24px 0 16px 0;
|
|
253
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
254
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
255
|
+
padding-bottom: 6px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
& h3 {
|
|
259
|
+
font-size: ${e=>e.$size==="sm"?"16px":"20px"};
|
|
260
|
+
font-weight: 600;
|
|
261
|
+
margin: 24px 0 16px 0;
|
|
262
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* 段落样式 */
|
|
266
|
+
& p {
|
|
267
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
268
|
+
margin: 16px 0;
|
|
269
|
+
line-height: 1.6;
|
|
270
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* 列表样式 - GitHub 风格简约设计 */
|
|
274
|
+
& ul, & ol {
|
|
275
|
+
margin: 16px 0;
|
|
276
|
+
padding-left: 24px;
|
|
277
|
+
line-height: 1.6;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
& ul {
|
|
281
|
+
list-style-type: disc;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
& ol {
|
|
285
|
+
list-style-type: decimal;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
& li {
|
|
289
|
+
margin: 4px 0;
|
|
290
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* 嵌套列表 */
|
|
294
|
+
& ul ul, & ol ol, & ul ol, & ol ul {
|
|
295
|
+
margin: 8px 0;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* 引用块样式 */
|
|
299
|
+
& blockquote {
|
|
300
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
301
|
+
border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
302
|
+
padding: 0 16px;
|
|
303
|
+
margin: 16px 0;
|
|
304
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
|
|
305
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/* 行内代码样式 */
|
|
309
|
+
& code {
|
|
310
|
+
font-size: 0.875em;
|
|
311
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
312
|
+
padding: 0.125em 0.25em;
|
|
313
|
+
border-radius: 6px;
|
|
314
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
315
|
+
color: #d73a49;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* 代码块样式 */
|
|
319
|
+
& pre {
|
|
320
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
321
|
+
padding: 16px;
|
|
322
|
+
border-radius: 6px;
|
|
323
|
+
overflow-x: auto;
|
|
324
|
+
margin: 16px 0;
|
|
325
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
& pre code {
|
|
329
|
+
background-color: transparent;
|
|
330
|
+
padding: 0;
|
|
331
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* 表格样式 */
|
|
335
|
+
& table {
|
|
336
|
+
width: 100%;
|
|
337
|
+
border-collapse: collapse;
|
|
338
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
339
|
+
margin: 16px 0;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
& th, & td {
|
|
343
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
344
|
+
padding: 8px 12px;
|
|
345
|
+
text-align: left;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
& th {
|
|
349
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
350
|
+
font-weight: 600;
|
|
351
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
& tr:nth-child(even) {
|
|
355
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
& td {
|
|
359
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* 图片样式 */
|
|
363
|
+
& img {
|
|
364
|
+
max-width: 100%;
|
|
365
|
+
height: auto;
|
|
366
|
+
border-radius: 6px;
|
|
367
|
+
margin: 16px 0;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* 链接样式 */
|
|
371
|
+
& a {
|
|
372
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
|
|
373
|
+
text-decoration: none;
|
|
374
|
+
|
|
375
|
+
&:hover {
|
|
376
|
+
text-decoration: underline;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* 文本样式 */
|
|
381
|
+
& strong {
|
|
382
|
+
font-weight: 600;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
& em {
|
|
386
|
+
font-style: italic;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
& u {
|
|
390
|
+
text-decoration: underline;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
& s {
|
|
394
|
+
text-decoration: line-through;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* 分割线样式 */
|
|
398
|
+
& hr {
|
|
399
|
+
border: none;
|
|
400
|
+
border-top: 1px solid #d0d7de;
|
|
401
|
+
margin: 24px 0;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* 思考容器样式 */
|
|
405
|
+
& .think-container {
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
& .think-header {
|
|
411
|
+
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
& .think-icon {
|
|
415
|
+
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
& .think-title {
|
|
419
|
+
font-weight: 600;
|
|
420
|
+
color: #24292f;
|
|
421
|
+
font-size: 14px;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
& .think-text {
|
|
425
|
+
color: #86909C;
|
|
426
|
+
font-size: 14px;
|
|
427
|
+
line-height: 1.6;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* 召回标签样式 */
|
|
431
|
+
& .retrive-tag {
|
|
432
|
+
display: inline-block;
|
|
433
|
+
background: #e6f7ff;
|
|
434
|
+
color: #1890ff;
|
|
435
|
+
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
436
|
+
border-radius: 6px;
|
|
437
|
+
padding: 2px 6px;
|
|
438
|
+
margin: 0 2px;
|
|
439
|
+
font-weight: 500;
|
|
440
|
+
font-size: 12px;
|
|
441
|
+
line-height: 1.4;
|
|
442
|
+
cursor: pointer;
|
|
443
|
+
vertical-align: middle;
|
|
444
|
+
transition: background-color 0.2s ease;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
& .retrive-tag:hover {
|
|
448
|
+
background: #bae7ff;
|
|
449
|
+
}
|
|
450
|
+
`;function P1(e){return e.map(t=>!t.children||t.children.length===0?{...t,children:[{text:""}]}:{...t,children:t.children.map(r=>typeof r=="object"&&"type"in r?P1([r])[0]:r)})}function T1(e,t){const r=(t==null?void 0:t.disabledTags)||[];console.log("\u{1F50D} deserializeMarkdown \u5F00\u59CB\u5904\u7406:",{markdownLength:e.length,basePath:t==null?void 0:t.basePath,hasImgTags:e.includes("<img"),hasMarkdownImages:e.includes("![")});function n(s){var c;if(s.indexOf("<think>")>-1)if(s.indexOf("</think>")>-1){const p=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,d=s.match(p);return d?{thinkContent:d[1],content:d[2],finish:!0}:{thinkContent:"",content:s,finish:!0}}else{const p=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((c=s.match(p))==null?void 0:c[1])||"",content:""}}else return{thinkContent:"",content:s}}const{thinkContent:o,content:a,finish:l}=n(e||"");let i=[],u=0;if(!r.includes("think")&&o){const s=o.split(/\n+/).map(c=>c.trim()).filter(Boolean).flatMap(c=>{if(/<retrive-tag/i.test(c)){const p=document.createElement("div");return p.innerHTML=c,Cd(p,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:c}]}]});i.push({type:"think",id:`think-${u++}`,thinkContent:o,finish:l,children:s})}if(a){let s=a;r.includes("retrive")||(s=s.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(d,h,g)=>`<retrive-tag${h?" "+h.trim():""}>${g}</retrive-tag>`)),r.includes("retrieve-sql-data")||(s=s.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(d,h)=>`<retrieve-sql-data id="${h}"></retrieve-sql-data>`)),gt.setOptions({gfm:!0,breaks:!0,pedantic:!1});const c=gt(s),p=typeof c=="string"?c:"";if(console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:p.length,hasImgTags:p.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:p}),typeof c=="string"){const d=document.createElement("div");d.innerHTML=c,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:d.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(d.querySelectorAll("*")).map(g=>g.tagName),imgElements:Array.from(d.querySelectorAll("img")).map(g=>({src:g.src,alt:g.alt}))});const h=Cd(d,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:h.length,hasImageElements:h.some(g=>g.type==="image")}),h&&h.length>0&&(i=i.concat(h))}}return!i||i.length===0?[{type:"paragraph",children:[{text:""}]}]:P1(i)}function Cd(e,t){const r=[];return console.log("\u{1F3AF} deserializeHtmlNode \u5F00\u59CB\u89E3\u6790:",{nodeType:e.nodeType,nodeName:e.nodeName,basePath:t,childNodesCount:e.childNodes.length}),((n,o)=>(o.forEach(a=>{var l;if(a.nodeType===Node.ELEMENT_NODE){const i=a;switch(console.log("\u{1F50D} \u5904\u7406\u5143\u7D20\u8282\u70B9:",{tagName:i.tagName,isImg:i.tagName==="IMG",src:i.getAttribute("src"),basePath:t}),i.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:It(i,t)});break;case"h1":n.push({type:"heading-one",children:It(i,t)});break;case"h2":n.push({type:"heading-two",children:It(i,t)});break;case"h3":n.push({type:"heading-three",children:It(i,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(i.children).map(s=>({type:"list-item",children:It(s)}))});break;case"ol":const u={type:"numbered-list",children:Array.from(i.children).map(s=>({type:"list-item",children:It(s)}))};n.push(u);break;case"li":n.push({type:"list-item",children:It(i,t)});break;case"pre":{const s=i.querySelector("code");s?n.push({type:"code-block",children:It(s)}):n.push({type:"code-block",children:It(i,t)});break}case"code":{i.closest("pre")||n.push({type:"paragraph",children:It(i,t)});break}case"retrive-tag":{const s=It(i,t);s.length>0&&n.push({type:"paragraph",children:s});break}case"retrieve-sql-data":{const s=i.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:s,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:It(i,t)});break;case"table":n.push(zb(i));break;case"img":{const s=i.getAttribute("src")||"",c=i.getAttribute("alt")||"";let p=s;if(t)if(s.startsWith("./"))p=s.replace(/^\.\//,t+"/");else if(s.startsWith("../")){const d=t.substring(0,t.lastIndexOf("/"));p=s.replace(/^\.\.\//,d+"/")}else!s.startsWith("/")&&!s.startsWith("http")&&(p=`${t}/${s}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:s,basePath:t,processedSrc:p}),n.push({type:"image",url:p,alt:c,children:[{text:""}]});break}case"iframe":{const s=i.getAttribute("src")||"",c=i.getAttribute("width")||"100%",p=i.getAttribute("height")||"400",d=i.getAttribute("frameborder")||"0",h=i.getAttribute("title")||"";let g=s;if(t)if(s.startsWith("./"))g=s.replace(/^\.\//,t+"/");else if(s.startsWith("../")){const v=t.substring(0,t.lastIndexOf("/"));g=s.replace(/^\.\.\//,v+"/")}else!s.startsWith("/")&&!s.startsWith("http")&&(g=`${t}/${s}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:s,basePath:t,processedSrc:g}),n.push({type:"iframe",src:g,width:c,height:p,frameborder:d,title:h,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:It(i)});break;default:n.push({type:"paragraph",children:It(i,t)});break}}else a.nodeType===Node.TEXT_NODE&&((l=a.textContent)!=null&&l.trim())&&n.push({type:"paragraph",children:[{text:a.textContent}]})}),n))(r,e.childNodes),r}function It(e,t){const r=[];function n(a){const l=[];let i="",u=!1,s=!1,c=0;for(;c<a.length;)a.startsWith("**",c)?(i&&(l.push({text:i,code:!0,bold:u,italic:s}),i=""),u=!u,c+=2):a.startsWith("*",c)?(i&&(l.push({text:i,code:!0,bold:u,italic:s}),i=""),s=!s,c+=1):(i+=a[c],c+=1);return i&&l.push({text:i,code:!0,bold:u,italic:s}),l}function o(a,l={}){var i,u;if(a.nodeType===Node.TEXT_NODE){const s=(i=a.textContent)==null?void 0:i.trim();return s?l.code?n(s):[{text:s,...l}]:[]}if(a.nodeType===Node.ELEMENT_NODE){const s=a,c={...l};switch(s.tagName.toLowerCase()){case"em":case"i":c.italic=!0;break;case"strong":case"b":c.bold=!0;break;case"code":s.closest("pre")||(c.code=!0);break;case"del":case"s":c.strikethrough=!0;break;case"u":c.underline=!0;break;case"a":c.link=s.getAttribute("href")||void 0;break;case"retrive-tag":{const d={};for(const{name:h,value:g}of Array.from(s.attributes))d[h]=g;return[{text:s.textContent||""||"[0]",retrive:!0,...d}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:s.getAttribute("id")||"",children:[{text:""}]}];case"img":{const d=s.getAttribute("src")||"",h=s.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:d,alt:h,basePath:t});let g=d;if(t)if(d.startsWith("./"))g=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const v=t.substring(0,t.lastIndexOf("/"));g=d.replace(/^\.\.\//,v+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(g=`${t}/${d}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:d,processedSrc:g}),[{type:"image",url:g,alt:h,children:[{text:""}]}]}case"iframe":{const d=s.getAttribute("src")||"",h=s.getAttribute("width")||"100%",g=s.getAttribute("height")||"400",v=s.getAttribute("frameborder")||"0",f=s.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:d,width:h,height:g,basePath:t});let C=d;if(t)if(d.startsWith("./"))C=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const y=t.substring(0,t.lastIndexOf("/"));C=d.replace(/^\.\.\//,y+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(C=`${t}/${d}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:d,processedSrc:C}),[{type:"iframe",src:C,width:h,height:g,frameborder:v,title:f,children:[{text:""}]}]}}if(s.childNodes.length===0&&((u=s.textContent)!=null&&u.trim()))return c.code?n(s.textContent):[{text:s.textContent,...c}];let p=[];for(const d of Array.from(s.childNodes))p=p.concat(o(d,c));return p}return[]}for(const a of Array.from(e.childNodes))r.push(...o(a));return r}function zb(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const o=Array.from(e.querySelectorAll("tr"));o.length>0&&(t.push({type:"table-row",children:Array.from(o[0].children).map(a=>({type:"table-cell",header:!0,children:It(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(l=>({type:"table-cell",header:!1,children:It(l)}))})}))}else{if(r){const o=r.querySelector("tr");o&&t.push({type:"table-row",children:Array.from(o.querySelectorAll("th")).map(a=>({type:"table-cell",header:!0,children:It(a)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(o=>{t.push({type:"table-row",children:Array.from(o.querySelectorAll("td")).map(a=>({type:"table-cell",header:!1,children:It(a)}))})})}return{type:"table",children:t}}const Kb=$t.div`
|
|
451
|
+
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
452
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
453
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
454
|
+
min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
455
|
+
overflow: hidden;
|
|
456
|
+
transition: all 0.2s ease-in-out;
|
|
457
|
+
|
|
458
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
459
|
+
&:focus-within {
|
|
460
|
+
border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
|
|
461
|
+
box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
|
|
462
|
+
}
|
|
463
|
+
`}}
|
|
464
|
+
`,Dl=$t.div`
|
|
465
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
|
|
466
|
+
min-height: inherit;
|
|
467
|
+
outline: none;
|
|
468
|
+
|
|
469
|
+
& > * + * {
|
|
470
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
471
|
+
}
|
|
472
|
+
`;var ii=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(ii||{});const yu=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:a={},onChange:l,onFocus:i,onBlur:u,renderElement:s,renderLeaf:c,onRetriveTagClick:p,eventsEmit:d,extraProps:h={},className:g,style:v,styles:f,enableTemplateInput:C=!1,disabledTags:y=[]})=>{const b=ui(),x=et(()=>{var z,U,G,Y,ae,R,Z,V,K;return{primaryColor:((z=b==null?void 0:b.colors)==null?void 0:z.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((U=b==null?void 0:b.colors)==null?void 0:U.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((G=b==null?void 0:b.colors)==null?void 0:G.background)||(a==null?void 0:a.backgroundColor)||"transparent",textColor:((Y=b==null?void 0:b.colors)==null?void 0:Y.text)||(a==null?void 0:a.textColor)||"#24292f",borderColor:((ae=b==null?void 0:b.colors)==null?void 0:ae.border)||(a==null?void 0:a.borderColor)||"#dee2e6",disabledBackground:((R=b==null?void 0:b.colors)==null?void 0:R.disabledBackground)||(a==null?void 0:a.disabledBackground)||"#f8f9fa",hoverBackground:(a==null?void 0:a.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((Z=b==null?void 0:b.space)==null?void 0:Z.radius)||(a==null?void 0:a.borderRadius)||"4px",padding:((V=b==null?void 0:b.space)==null?void 0:V.padding)||(a==null?void 0:a.padding)||"0rem 1rem",margin:((K=b==null?void 0:b.space)==null?void 0:K.margin)||(a==null?void 0:a.margin)||"0.5rem",minHeight:(a==null?void 0:a.minHeight)||"200px",baseFontSize:(a==null?void 0:a.baseFontSize)||(o==="md"?14:12),...a}},[b,a,o]),B=ct();if(!B.current){const z=I8(),U=Q7(z),{isInline:G}=U;U.isInline=R=>!y.includes("template")&&R.type==="template"?!0:G(R);const{isVoid:Y}=U;U.isVoid=R=>!y.includes("template")&&R.type==="template"?!0:Y(R);const ae=R=>{if(!(C&&!y.includes("template")))return R;const{insertText:Z,insertData:V}=R,K=()=>{const X=/<template>([^<]*)<\/template>/g,Q=Array.from(w.nodes(R,{match:ee=>Te.isText(ee)&&X.test(ee.text)}));if(Q.length!==0)for(const ee of Q){const[se,re]=ee,oe=se.text||"",ge=[];let ce=0,Ee;for(X.lastIndex=0;(Ee=X.exec(oe))!==null;){if(Ee.index>ce){const _e=oe.slice(ce,Ee.index);_e&&ge.push({text:_e})}ge.push({type:"template",placeholder:(Ee[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),ce=Ee.index+Ee[0].length}if(ce<oe.length){const _e=oe.slice(ce);_e&&ge.push({text:_e})}ve.removeNodes(R,{at:re}),ve.insertNodes(R,ge,{at:re})}};return R.insertText=X=>{Z(X),K()},R.insertData=X=>{const Q=X.getData("text/plain");if(Q&&/<template>[\s\S]*?<\/template>/.test(Q)){Z(Q),K();return}return V(X)},R};B.current=ae(U)}const A=B.current,[F,$]=ut(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[D,L]=ut(0);xt(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const z=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",z),$(z),L(U=>U+1)}},[e.type,e.content]);const N=ct(void 0);xt(()=>{if(e.type!=="markdown")return;const z=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");N.current!==z&&(N.current=z,L(U=>U+1))},[e.type,e.content]);const T=ct("");xt(()=>{if(e.type!=="markdown")return;const z=JSON.stringify(h||{});z!==T.current&&(T.current=z,L(U=>U+1))},[h,e.type]);const P=ze(z=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",z),z&&Array.isArray(z)?($(z),l==null||l(z,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",z)},[l]),S=et(()=>{const z=x==null?void 0:x.baseFontSize;return typeof z=="number"&&!Number.isNaN(z)?z:o==="md"?14:12},[x,o]),k=ze(z=>{const U={...z,size:o,styles:f,eventsEmit:d,extraProps:h};return s?s(U):_b(U)},[s,o,f,d,h]),O=ze(z=>{const U={...z,styles:f,onRetriveTagClick:p};return c?c(U):Hb(U)},[c,f,p]);xt(()=>(window.copyCodeFromData=z=>{const U=z.getAttribute("data-code");if(!U){console.error("No code content found");return}const G=U.replace(/\\n/g,`
|
|
473
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(G).then(()=>{const Y=z.innerHTML;z.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#2da44e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20,6 9,17 4,12"></polyline></svg>',z.classList.add("copied"),setTimeout(()=>{z.innerHTML=Y,z.classList.remove("copied")},2e3)}).catch(Y=>{console.error("\u590D\u5236\u5931\u8D25:",Y);const ae=z.innerHTML;z.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',z.style.background="#d73a49",z.style.borderColor="#d73a49",z.style.color="white",setTimeout(()=>{z.innerHTML=ae,z.style.background="",z.style.borderColor="",z.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const E=et(()=>{var z,U;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(z=e.content)==null?void 0:z.length,basePath:n,hasImages:(U=e.content)==null?void 0:U.includes("![")});const G=T1(e.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:G.length,hasImageElements:G.some(K=>K.type==="image"),imageElements:G.filter(K=>K.type==="image")}),G&&G.length>0)return j.jsx(wl,{theme:x,$size:o,children:j.jsx(ml,{editor:A,initialValue:G,onChange:()=>{},children:j.jsx(Dl,{theme:x,children:j.jsx(gl,{renderElement:k,renderLeaf:O,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${S}px`}})})},D)});const Y={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let ae=gt(e.content||"",Y);ae=ae.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),ae=ae.replace(/<\/table>/g,"</table></div>"),ae=ae.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(K,X,Q)=>{const ee=Q.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<pre><code${X}>${Q}</code><button class="code-copy-btn" data-code="${ee}" onclick="copyCodeFromData(this)" title="\u590D\u5236\u4EE3\u7801"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></pre>`});const R=(x==null?void 0:x.disabledBackground)||(x==null?void 0:x.backgroundColor)||"#ffffff",Z=(K,X)=>K.startsWith("#")?`${K}${Math.round(X*255).toString(16).padStart(2,"0")}`:K,V=`
|
|
474
|
+
<style>
|
|
475
|
+
.table-container{ overflow:auto; border:1px solid ${(x==null?void 0:x.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(x==null?void 0:x.backgroundColor)||"transparent"} !important; }
|
|
476
|
+
.table-container table{ background:${(x==null?void 0:x.backgroundColor)||"transparent"} !important; color:${(x==null?void 0:x.textColor)||"#24292f"} !important; }
|
|
477
|
+
.table-container th{ background:${(x==null?void 0:x.disabledBackground)||"#f6f8fa"} !important; color:${(x==null?void 0:x.textColor)||"#24292f"} !important; }
|
|
478
|
+
.table-container td{ color:${(x==null?void 0:x.textColor)||"#24292f"} !important; background:${(x==null?void 0:x.backgroundColor)||"transparent"} !important; }
|
|
479
|
+
.table-container tr:nth-child(even) td{ background:${(x==null?void 0:x.disabledBackground)||"#f6f8fa"} !important; }
|
|
480
|
+
pre{ position:relative; background:${R}; border:1px solid ${(x==null?void 0:x.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(x==null?void 0:x.textColor)||"#e5e7eb"}; }
|
|
481
|
+
pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${Z("#22c55e",.25)}, ${Z("#f59e0b",.25)}, ${Z("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
|
|
482
|
+
pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(x==null?void 0:x.borderColor)||"#e5e7eb"}; color:${(x==null?void 0:x.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
|
|
483
|
+
pre .code-copy-btn:hover{ background:${(x==null?void 0:x.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
484
|
+
</style>
|
|
485
|
+
`;return j.jsx("div",{style:{padding:(x==null?void 0:x.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(x==null?void 0:x.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:V+ae}})}catch(G){return console.error("Markdown parsing error:",G),j.jsx("div",{children:e.content})}},[e,x,A,D,k,O,S]),I=et(()=>e.type!=="html"?null:j.jsx("div",{style:{padding:(x==null?void 0:x.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(x==null?void 0:x.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,x,S]),M=et(()=>e.type!=="text"?null:j.jsx("div",{style:{padding:(x==null?void 0:x.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(x==null?void 0:x.textColor)||"#24292f"},children:j.jsx("span",{children:e.content||""})}),[e,x,S]),H=()=>{switch(e.type){case"markdown":return E;case"html":return I;case"text":return M;case"slate":default:return t?j.jsx(wl,{theme:x,$size:o,children:j.jsx(ml,{editor:A,initialValue:F,onChange:P,children:j.jsx(Dl,{theme:x,children:j.jsx(gl,{renderElement:k,renderLeaf:O,placeholder:r,readOnly:!1,onFocus:i,onBlur:u,style:{minHeight:"inherit",outline:"none",fontSize:`${S}px`}})})},D)}):j.jsx(wl,{theme:x,$size:o,children:j.jsx(ml,{editor:A,initialValue:F,onChange:()=>{},children:j.jsx(Dl,{theme:x,children:j.jsx(gl,{renderElement:k,renderLeaf:O,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${S}px`}})})},D)})}};return j.jsx(Kb,{theme:x,$isEditing:t,className:g,style:v,children:H()})};var ms={exports:{}},Wb=ms.exports,bd;function Vb(){return bd||(bd=1,(function(e,t){(function(r,n){e.exports=n()})(Wb,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",l="second",i="minute",u="hour",s="day",c="week",p="month",d="quarter",h="year",g="date",v="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var k=["th","st","nd","rd"],O=S%100;return"["+S+(k[(O-20)%10]||k[O]||k[0])+"]"}},b=function(S,k,O){var E=String(S);return!E||E.length>=k?S:""+Array(k+1-E.length).join(O)+S},x={s:b,z:function(S){var k=-S.utcOffset(),O=Math.abs(k),E=Math.floor(O/60),I=O%60;return(k<=0?"+":"-")+b(E,2,"0")+":"+b(I,2,"0")},m:function S(k,O){if(k.date()<O.date())return-S(O,k);var E=12*(O.year()-k.year())+(O.month()-k.month()),I=k.clone().add(E,p),M=O-I<0,H=k.clone().add(E+(M?-1:1),p);return+(-(E+(O-I)/(M?I-H:H-I))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:p,y:h,w:c,d:s,D:g,h:u,m:i,s:l,ms:a,Q:d}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},B="en",A={};A[B]=y;var F="$isDayjsObject",$=function(S){return S instanceof T||!(!S||!S[F])},D=function S(k,O,E){var I;if(!k)return B;if(typeof k=="string"){var M=k.toLowerCase();A[M]&&(I=M),O&&(A[M]=O,I=M);var H=k.split("-");if(!I&&H.length>1)return S(H[0])}else{var z=k.name;A[z]=k,I=z}return!E&&I&&(B=I),I||!E&&B},L=function(S,k){if($(S))return S.clone();var O=typeof k=="object"?k:{};return O.date=S,O.args=arguments,new T(O)},N=x;N.l=D,N.i=$,N.w=function(S,k){return L(S,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var T=(function(){function S(O){this.$L=D(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[F]=!0}var k=S.prototype;return k.parse=function(O){this.$d=(function(E){var I=E.date,M=E.utc;if(I===null)return new Date(NaN);if(N.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var H=I.match(f);if(H){var z=H[2]-1||0,U=(H[7]||"0").substring(0,3);return M?new Date(Date.UTC(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,U)):new Date(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,U)}}return new Date(I)})(O),this.init()},k.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},k.$utils=function(){return N},k.isValid=function(){return this.$d.toString()!==v},k.isSame=function(O,E){var I=L(O);return this.startOf(E)<=I&&I<=this.endOf(E)},k.isAfter=function(O,E){return L(O)<this.startOf(E)},k.isBefore=function(O,E){return this.endOf(E)<L(O)},k.$g=function(O,E,I){return N.u(O)?this[E]:this.set(I,O)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(O,E){var I=this,M=!!N.u(E)||E,H=N.p(O),z=function(K,X){var Q=N.w(I.$u?Date.UTC(I.$y,X,K):new Date(I.$y,X,K),I);return M?Q:Q.endOf(s)},U=function(K,X){return N.w(I.toDate()[K].apply(I.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(X)),I)},G=this.$W,Y=this.$M,ae=this.$D,R="set"+(this.$u?"UTC":"");switch(H){case h:return M?z(1,0):z(31,11);case p:return M?z(1,Y):z(0,Y+1);case c:var Z=this.$locale().weekStart||0,V=(G<Z?G+7:G)-Z;return z(M?ae-V:ae+(6-V),Y);case s:case g:return U(R+"Hours",0);case u:return U(R+"Minutes",1);case i:return U(R+"Seconds",2);case l:return U(R+"Milliseconds",3);default:return this.clone()}},k.endOf=function(O){return this.startOf(O,!1)},k.$set=function(O,E){var I,M=N.p(O),H="set"+(this.$u?"UTC":""),z=(I={},I[s]=H+"Date",I[g]=H+"Date",I[p]=H+"Month",I[h]=H+"FullYear",I[u]=H+"Hours",I[i]=H+"Minutes",I[l]=H+"Seconds",I[a]=H+"Milliseconds",I)[M],U=M===s?this.$D+(E-this.$W):E;if(M===p||M===h){var G=this.clone().set(g,1);G.$d[z](U),G.init(),this.$d=G.set(g,Math.min(this.$D,G.daysInMonth())).$d}else z&&this.$d[z](U);return this.init(),this},k.set=function(O,E){return this.clone().$set(O,E)},k.get=function(O){return this[N.p(O)]()},k.add=function(O,E){var I,M=this;O=Number(O);var H=N.p(E),z=function(Y){var ae=L(M);return N.w(ae.date(ae.date()+Math.round(Y*O)),M)};if(H===p)return this.set(p,this.$M+O);if(H===h)return this.set(h,this.$y+O);if(H===s)return z(1);if(H===c)return z(7);var U=(I={},I[i]=n,I[u]=o,I[l]=r,I)[H]||1,G=this.$d.getTime()+O*U;return N.w(G,this)},k.subtract=function(O,E){return this.add(-1*O,E)},k.format=function(O){var E=this,I=this.$locale();if(!this.isValid())return I.invalidDate||v;var M=O||"YYYY-MM-DDTHH:mm:ssZ",H=N.z(this),z=this.$H,U=this.$m,G=this.$M,Y=I.weekdays,ae=I.months,R=I.meridiem,Z=function(X,Q,ee,se){return X&&(X[Q]||X(E,M))||ee[Q].slice(0,se)},V=function(X){return N.s(z%12||12,X,"0")},K=R||function(X,Q,ee){var se=X<12?"AM":"PM";return ee?se.toLowerCase():se};return M.replace(C,(function(X,Q){return Q||(function(ee){switch(ee){case"YY":return String(E.$y).slice(-2);case"YYYY":return N.s(E.$y,4,"0");case"M":return G+1;case"MM":return N.s(G+1,2,"0");case"MMM":return Z(I.monthsShort,G,ae,3);case"MMMM":return Z(ae,G);case"D":return E.$D;case"DD":return N.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return Z(I.weekdaysMin,E.$W,Y,2);case"ddd":return Z(I.weekdaysShort,E.$W,Y,3);case"dddd":return Y[E.$W];case"H":return String(z);case"HH":return N.s(z,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return K(z,U,!0);case"A":return K(z,U,!1);case"m":return String(U);case"mm":return N.s(U,2,"0");case"s":return String(E.$s);case"ss":return N.s(E.$s,2,"0");case"SSS":return N.s(E.$ms,3,"0");case"Z":return H}return null})(X)||H.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(O,E,I){var M,H=this,z=N.p(E),U=L(O),G=(U.utcOffset()-this.utcOffset())*n,Y=this-U,ae=function(){return N.m(H,U)};switch(z){case h:M=ae()/12;break;case p:M=ae();break;case d:M=ae()/3;break;case c:M=(Y-G)/6048e5;break;case s:M=(Y-G)/864e5;break;case u:M=Y/o;break;case i:M=Y/n;break;case l:M=Y/r;break;default:M=Y}return I?M:N.a(M)},k.daysInMonth=function(){return this.endOf(p).$D},k.$locale=function(){return A[this.$L]},k.locale=function(O,E){if(!O)return this.$L;var I=this.clone(),M=D(O,E,!0);return M&&(I.$L=M),I},k.clone=function(){return N.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},S})(),P=T.prototype;return L.prototype=P,[["$ms",a],["$s",l],["$m",i],["$H",u],["$W",s],["$M",p],["$y",h],["$D",g]].forEach((function(S){P[S[1]]=function(k){return this.$g(k,S[0],S[1])}})),L.extend=function(S,k){return S.$i||(S(k,T,L),S.$i=!0),L},L.locale=D,L.isDayjs=$,L.unix=function(S){return L(1e3*S)},L.en=A[B],L.Ls=A,L.p={},L}))})(ms)),ms.exports}var qb=Vb();const Ub=vi(qb);/**
|
|
486
|
+
* @license lucide-react v0.456.0 - ISC
|
|
487
|
+
*
|
|
488
|
+
* This source code is licensed under the ISC license.
|
|
489
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
490
|
+
*/const Zb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M1=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
491
|
+
* @license lucide-react v0.456.0 - ISC
|
|
492
|
+
*
|
|
493
|
+
* This source code is licensed under the ISC license.
|
|
494
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
495
|
+
*/var Gb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
496
|
+
* @license lucide-react v0.456.0 - ISC
|
|
497
|
+
*
|
|
498
|
+
* This source code is licensed under the ISC license.
|
|
499
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
500
|
+
*/const Xb=Jr(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:l,...i},u)=>Ta("svg",{ref:u,...Gb,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:M1("lucide",o),...i},[...l.map(([s,c])=>Ta(s,c)),...Array.isArray(a)?a:[a]]));/**
|
|
501
|
+
* @license lucide-react v0.456.0 - ISC
|
|
502
|
+
*
|
|
503
|
+
* This source code is licensed under the ISC license.
|
|
504
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
505
|
+
*/const er=(e,t)=>{const r=Jr(({className:n,...o},a)=>Ta(Xb,{ref:a,iconNode:t,className:M1(`lucide-${Zb(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
506
|
+
* @license lucide-react v0.456.0 - ISC
|
|
507
|
+
*
|
|
508
|
+
* This source code is licensed under the ISC license.
|
|
509
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
510
|
+
*/const ba=er("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
511
|
+
* @license lucide-react v0.456.0 - ISC
|
|
512
|
+
*
|
|
513
|
+
* This source code is licensed under the ISC license.
|
|
514
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
515
|
+
*/const Yb=er("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
516
|
+
* @license lucide-react v0.456.0 - ISC
|
|
517
|
+
*
|
|
518
|
+
* This source code is licensed under the ISC license.
|
|
519
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
520
|
+
*/const ya=er("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
521
|
+
* @license lucide-react v0.456.0 - ISC
|
|
522
|
+
*
|
|
523
|
+
* This source code is licensed under the ISC license.
|
|
524
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
525
|
+
*/const Qb=er("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
526
|
+
* @license lucide-react v0.456.0 - ISC
|
|
527
|
+
*
|
|
528
|
+
* This source code is licensed under the ISC license.
|
|
529
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
530
|
+
*/const Jb=er("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
531
|
+
* @license lucide-react v0.456.0 - ISC
|
|
532
|
+
*
|
|
533
|
+
* This source code is licensed under the ISC license.
|
|
534
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
535
|
+
*/const e9=er("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
536
|
+
* @license lucide-react v0.456.0 - ISC
|
|
537
|
+
*
|
|
538
|
+
* This source code is licensed under the ISC license.
|
|
539
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
540
|
+
*/const t9=er("FileSymlink",[["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 11V4a2 2 0 0 1 2-2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"50q2rw"}]]);/**
|
|
541
|
+
* @license lucide-react v0.456.0 - ISC
|
|
542
|
+
*
|
|
543
|
+
* This source code is licensed under the ISC license.
|
|
544
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
545
|
+
*/const r9=er("MessageSquareDot",[["path",{d:"M11.7 3H5a2 2 0 0 0-2 2v16l4-4h12a2 2 0 0 0 2-2v-2.7",key:"uodpkb"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
|
|
546
|
+
* @license lucide-react v0.456.0 - ISC
|
|
547
|
+
*
|
|
548
|
+
* This source code is licensed under the ISC license.
|
|
549
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
550
|
+
*/const n9=er("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
551
|
+
* @license lucide-react v0.456.0 - ISC
|
|
552
|
+
*
|
|
553
|
+
* This source code is licensed under the ISC license.
|
|
554
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
555
|
+
*/const o9=er("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
556
|
+
* @license lucide-react v0.456.0 - ISC
|
|
557
|
+
*
|
|
558
|
+
* This source code is licensed under the ISC license.
|
|
559
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
560
|
+
*/const a9=er("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
561
|
+
* @license lucide-react v0.456.0 - ISC
|
|
562
|
+
*
|
|
563
|
+
* This source code is licensed under the ISC license.
|
|
564
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
565
|
+
*/const i9=er("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
|
|
566
|
+
* @license lucide-react v0.456.0 - ISC
|
|
567
|
+
*
|
|
568
|
+
* This source code is licensed under the ISC license.
|
|
569
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
570
|
+
*/const l9=er("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
571
|
+
* @license lucide-react v0.456.0 - ISC
|
|
572
|
+
*
|
|
573
|
+
* This source code is licensed under the ISC license.
|
|
574
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
575
|
+
*/const s9=er("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
576
|
+
* @license lucide-react v0.456.0 - ISC
|
|
577
|
+
*
|
|
578
|
+
* This source code is licensed under the ISC license.
|
|
579
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
580
|
+
*/const u9=er("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function yd(e){const t=(e||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t)?"rag/pic":t==="pdf"?"rag/pdf":["doc","docx"].includes(t)?"rag/word":["xls","xlsx"].includes(t)?"rag/excel":["ppt","pptx"].includes(t)?"rag/ppt":t==="txt"||t==="md"?"rag/txt":t==="csv"?"rag/csv":t==="json"?"rag/json":["zip","rar","7z"].includes(t)?"rag/zip":["odt","ods","odp","odf"].includes(t)?"rag/odf":t==="wps"?"rag/wps":["html","htm","url"].includes(t)?"rag/url":["mp4","avi","mov","wmv","flv","webm","mkv"].includes(t)?"rag/video":"rag/file"}function Pn(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Pn(r.children)));return t}function c9(e){const t=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g,r=[];let n;for(;n=t.exec(e);){const o=n[1].split(";").map(a=>a.trim()).filter(Boolean);r.push(...o)}return Array.from(new Set(r))}const d9=$t.div`
|
|
581
|
+
display: flex;
|
|
582
|
+
flex-direction: column;
|
|
583
|
+
margin-bottom: 0.5rem;
|
|
584
|
+
animation: fadeIn 0.3s ease-in-out;
|
|
585
|
+
width: 100%;
|
|
586
|
+
text-wrap: wrap;
|
|
587
|
+
|
|
588
|
+
${e=>e.$align==="right"&&`
|
|
589
|
+
align-items: flex-end;
|
|
590
|
+
`}
|
|
591
|
+
|
|
592
|
+
${e=>e.$align==="center"&&`
|
|
593
|
+
align-items: center;
|
|
594
|
+
`}
|
|
595
|
+
|
|
596
|
+
@keyframes fadeIn {
|
|
597
|
+
from { opacity: 0; transform: translateY(10px); }
|
|
598
|
+
to { opacity: 1; transform: translateY(0); }
|
|
599
|
+
}
|
|
600
|
+
`,f9=$t.div`
|
|
601
|
+
display: flex;
|
|
602
|
+
align-items: center;
|
|
603
|
+
gap: 0.25rem;
|
|
604
|
+
margin-bottom: 0.5rem;
|
|
605
|
+
width: 100%;
|
|
606
|
+
|
|
607
|
+
${e=>e.$isUser&&`
|
|
608
|
+
flex-direction: row-reverse;
|
|
609
|
+
justify-content: end;
|
|
610
|
+
`}
|
|
611
|
+
`,p9=$t.div`
|
|
612
|
+
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
613
|
+
border-radius: 50%;
|
|
614
|
+
width: 2rem;
|
|
615
|
+
height: 2rem;
|
|
616
|
+
|
|
617
|
+
flex-shrink: 0;
|
|
618
|
+
display: flex;
|
|
619
|
+
align-items: center;
|
|
620
|
+
justify-content: center;
|
|
621
|
+
font-size: 1rem;
|
|
622
|
+
`,h9=$t.div`
|
|
623
|
+
width: 100%;
|
|
624
|
+
margin-top: 0.5rem;
|
|
625
|
+
.message-time {
|
|
626
|
+
font-size: 0.75rem;
|
|
627
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.message-card {
|
|
631
|
+
background: ${e=>e.$isUser?"#E3ECFF":"#ffffff"};
|
|
632
|
+
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
633
|
+
border-radius: 0.5rem;
|
|
634
|
+
|
|
635
|
+
overflow: hidden;
|
|
636
|
+
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
637
|
+
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
638
|
+
padding: 0.25rem 1.8rem;
|
|
639
|
+
.message-text {
|
|
640
|
+
width: 100%;
|
|
641
|
+
line-height: 1.6;
|
|
642
|
+
|
|
643
|
+
border-radius: 0.5rem;
|
|
644
|
+
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
645
|
+
font-size: 0.875rem;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
`,g9=$t.div`
|
|
649
|
+
margin-top: 0.5rem;
|
|
650
|
+
display: flex;
|
|
651
|
+
padding: 0.5rem;
|
|
652
|
+
align-items: center;
|
|
653
|
+
|
|
654
|
+
gap: 0.75rem;
|
|
655
|
+
|
|
656
|
+
button {
|
|
657
|
+
display: flex;
|
|
658
|
+
align-items: center;
|
|
659
|
+
gap: 0.25rem;
|
|
660
|
+
font-size: 0.875rem;
|
|
661
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
662
|
+
background: none;
|
|
663
|
+
border: none;
|
|
664
|
+
cursor: pointer;
|
|
665
|
+
transition: color 0.2s;
|
|
666
|
+
|
|
667
|
+
&:hover {
|
|
668
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
&.active {
|
|
672
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
`,m9=$t.div`
|
|
676
|
+
margin-top: 1rem;
|
|
677
|
+
padding: 0 2.9rem;
|
|
678
|
+
|
|
679
|
+
border-radius: 0.5rem;
|
|
680
|
+
|
|
681
|
+
@keyframes followUpIn {
|
|
682
|
+
from {
|
|
683
|
+
opacity: 0;
|
|
684
|
+
transform: translateY(6px);
|
|
685
|
+
}
|
|
686
|
+
to {
|
|
687
|
+
opacity: 1;
|
|
688
|
+
transform: translateY(0);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.follow-up-title {
|
|
693
|
+
font-size: 0.875rem;
|
|
694
|
+
font-weight: 600;
|
|
695
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
696
|
+
margin-bottom: 0.75rem;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.follow-up-list {
|
|
700
|
+
display: flex;
|
|
701
|
+
flex-direction: column;
|
|
702
|
+
gap: 0.5rem;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.follow-up-item {
|
|
706
|
+
width: fit-content;
|
|
707
|
+
background: #ffffff;
|
|
708
|
+
border: 1px solid #e5e7eb;
|
|
709
|
+
border-radius: 0.375rem;
|
|
710
|
+
padding: 0.75rem 1rem;
|
|
711
|
+
cursor: pointer;
|
|
712
|
+
transition: all 0.2s ease;
|
|
713
|
+
text-align: left;
|
|
714
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
715
|
+
font-size: 0.875rem;
|
|
716
|
+
line-height: 1.4;
|
|
717
|
+
opacity: 0;
|
|
718
|
+
transform: translateY(6px);
|
|
719
|
+
animation: followUpIn 280ms ease forwards;
|
|
720
|
+
animation-play-state: running;
|
|
721
|
+
|
|
722
|
+
&:hover {
|
|
723
|
+
background: #e5e7eb;
|
|
724
|
+
border-color: #d1d5db;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
&:active {
|
|
728
|
+
transform: translateY(1px);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
`,xa=$t.div`
|
|
732
|
+
|
|
733
|
+
padding: 1rem;
|
|
734
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
735
|
+
|
|
736
|
+
border-radius: 0.5rem;
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
.reference-title {
|
|
740
|
+
font-size: 0.875rem;
|
|
741
|
+
font-weight: 600;
|
|
742
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
743
|
+
margin-bottom: 0.75rem;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.reference-list {
|
|
747
|
+
display: flex;
|
|
748
|
+
flex-direction: column;
|
|
749
|
+
gap: 0.5rem;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.reference-item {
|
|
753
|
+
background: #ffffff;
|
|
754
|
+
|
|
755
|
+
border-radius: 0.375rem;
|
|
756
|
+
padding: 0.75rem 0;
|
|
757
|
+
display: flex;
|
|
758
|
+
align-items: center;
|
|
759
|
+
gap: 0.5rem;
|
|
760
|
+
|
|
761
|
+
.file-icon {
|
|
762
|
+
width: 2rem;
|
|
763
|
+
height: 2rem;
|
|
764
|
+
background: #e2e8f0;
|
|
765
|
+
border-radius: 0.25rem;
|
|
766
|
+
display: flex;
|
|
767
|
+
align-items: center;
|
|
768
|
+
justify-content: center;
|
|
769
|
+
font-size: 0.75rem;
|
|
770
|
+
color: #64748b;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.file-info {
|
|
774
|
+
flex: 1;
|
|
775
|
+
|
|
776
|
+
.file-name {
|
|
777
|
+
font-size: 0.875rem;
|
|
778
|
+
font-weight: 500;
|
|
779
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
780
|
+
margin-bottom: 0.25rem;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.file-meta {
|
|
784
|
+
font-size: 0.75rem;
|
|
785
|
+
color: #64748b;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.file-score {
|
|
790
|
+
font-size: 0.75rem;
|
|
791
|
+
color: #059669;
|
|
792
|
+
font-weight: 500;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
`,v9=$t.div`
|
|
796
|
+
position: fixed;
|
|
797
|
+
top: 0;
|
|
798
|
+
left: 0;
|
|
799
|
+
right: 0;
|
|
800
|
+
bottom: 0;
|
|
801
|
+
background: rgba(0, 0, 0, 0.8);
|
|
802
|
+
display: ${e=>e.$show?"flex":"none"};
|
|
803
|
+
align-items: center;
|
|
804
|
+
justify-content: center;
|
|
805
|
+
z-index: 1000;
|
|
806
|
+
cursor: pointer;
|
|
807
|
+
|
|
808
|
+
.modal-content {
|
|
809
|
+
max-width: 90vw;
|
|
810
|
+
max-height: 90vh;
|
|
811
|
+
position: relative;
|
|
812
|
+
cursor: default;
|
|
813
|
+
display: flex;
|
|
814
|
+
flex-direction: column;
|
|
815
|
+
align-items: center;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.modal-image {
|
|
819
|
+
max-width: 100%;
|
|
820
|
+
max-height: calc(90vh - 60px);
|
|
821
|
+
object-fit: contain;
|
|
822
|
+
border-radius: 8px;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.modal-close {
|
|
826
|
+
margin-top: 16px;
|
|
827
|
+
background: rgba(255, 255, 255, 0.3);
|
|
828
|
+
border: none;
|
|
829
|
+
border-radius: 20px;
|
|
830
|
+
padding: 8px 20px;
|
|
831
|
+
display: flex;
|
|
832
|
+
align-items: center;
|
|
833
|
+
justify-content: center;
|
|
834
|
+
cursor: pointer;
|
|
835
|
+
font-size: 14px;
|
|
836
|
+
color: #333;
|
|
837
|
+
font-weight: 500;
|
|
838
|
+
transition: all 0.2s ease;
|
|
839
|
+
|
|
840
|
+
&:hover {
|
|
841
|
+
background: rgba(255, 255, 255, 1);
|
|
842
|
+
transform: translateY(-1px);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
`,El=$t.div`
|
|
846
|
+
|
|
847
|
+
padding:0rem 1rem;
|
|
848
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
849
|
+
|
|
850
|
+
.gallery-grid {
|
|
851
|
+
display: grid;
|
|
852
|
+
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
853
|
+
gap: 0.75rem;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.gallery-item {
|
|
857
|
+
position: relative;
|
|
858
|
+
aspect-ratio: 1;
|
|
859
|
+
border-radius: 0.375rem;
|
|
860
|
+
overflow: hidden;
|
|
861
|
+
cursor: pointer;
|
|
862
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
863
|
+
border: 2px solid transparent;
|
|
864
|
+
|
|
865
|
+
&:hover {
|
|
866
|
+
transform: translateY(-2px);
|
|
867
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
868
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.gallery-image {
|
|
872
|
+
width: 100%;
|
|
873
|
+
height: 100%;
|
|
874
|
+
object-fit: cover;
|
|
875
|
+
background: #f3f4f6;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.gallery-overlay {
|
|
879
|
+
position: absolute;
|
|
880
|
+
bottom: 0;
|
|
881
|
+
left: 0;
|
|
882
|
+
right: 0;
|
|
883
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
884
|
+
color: white;
|
|
885
|
+
padding: 0.5rem;
|
|
886
|
+
font-size: 0.75rem;
|
|
887
|
+
text-align: center;
|
|
888
|
+
opacity: 0;
|
|
889
|
+
transition: opacity 0.2s ease;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
&:hover .gallery-overlay {
|
|
893
|
+
opacity: 1;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
`,N9=({is_download:e,content:t,contentType:r="plainText",align:n="left",displayStatus:o="ready",avatar:a,isUser:l=!1,userAvatar:i,aiAvatar:u,date:s,time:c,timestamp:p,showTime:d=!0,errorMessage:h,styles:g,reference:v,webReference:f,databaseReference:C,graphReference:y,filePaths:b,currentFiles:x,fileManagerData:B,audioUrl:A,feedbackResult:F,queryId:$,defaultAnswer:D,isWelcome:L=!1,isLast:N=!1,respTime:T,tokens:P,resultType:S,followUpQuestions:k=[],tools:O={},eventsEmit:E,referenceMode:I="list"})=>{xt(()=>{console.log("isUser",l),console.log("isLast",N)},[N,l]);const M=ui(),H=et(()=>{var q,fe,Re,Be,he,we,Me,te,me,J,W;return{colors:{primary:((q=M==null?void 0:M.colors)==null?void 0:q.primary)||"#3b82f6",background:((fe=M==null?void 0:M.colors)==null?void 0:fe.background)||"#ffffff",userBackground:((Re=M==null?void 0:M.colors)==null?void 0:Re.primary)||"#3b82f6",border:((Be=M==null?void 0:M.colors)==null?void 0:Be.border)||"#e5e7eb",text:((he=M==null?void 0:M.colors)==null?void 0:he.text)||"#374151",disabled:((we=M==null?void 0:M.colors)==null?void 0:we.disabled)||"#6b7280",info:((Me=M==null?void 0:M.colors)==null?void 0:Me.info)||"#3b82f6",warning:((te=M==null?void 0:M.colors)==null?void 0:te.warning)||"#f59e0b",error:((me=M==null?void 0:M.colors)==null?void 0:me.error)||"#ef4444",...(J=g==null?void 0:g.theme)==null?void 0:J.colors},icons:{aiAvatar:u||"/vite.svg",userAvatar:i||"/default-user-avatar.png",...(W=g==null?void 0:g.theme)==null?void 0:W.icons}}},[M,g,u,i]),z=et(()=>{const q=c||s||p;return!q||!d?null:Ub(q).format("YY-MM-DD HH:mm:ss")},[c,s,p,d]),[U,G]=ut([]),[Y,ae]=ut(null),[R,Z]=ut(!1),[V,K]=ut(!1),[X,Q]=ut(!1),[ee,se]=ut(!1),[re,oe]=ut(!1),ge=()=>{const q={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:"\u{1F4AD}"},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:"\u{1F4AD}"},uploading:{text:"\u6587\u4EF6\u4E0A\u4F20\u4E2D...",icon:"\u{1F4E4}"},analyzing:{text:"\u77E5\u8BC6\u89E3\u6790\u4E2D...",icon:"\u{1F50D}"},error:{text:h||"\u62B1\u6B49\uFF0C\u672C\u6B21\u8BF7\u6C42\u51FA\u9519\u4E86\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",icon:"\u274C"},initializing:{text:"\u6B63\u5728\u521D\u59CB\u5316...",icon:"\u2699\uFE0F"},ready:{text:"\u601D\u8003\u5B8C\u6210",icon:j.jsx(ia,{type:"rag/think",size:16})}}[o]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},fe=T?`(\u7528\u65F6 ${Math.round(T/1e3)} \u79D2)`:"";return j.jsx("div",{className:"think-header",children:j.jsx("div",{className:"think-header-left ml-[16px]",children:j.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-full",children:[j.jsx("div",{className:"think-icon",children:q.icon}),j.jsx("div",{className:"think-title",children:q.text}),fe&&j.jsx("div",{className:"think-time",children:fe}),ye&&j.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{oe(!re)},children:j.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:re?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:j.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},[ce,Ee]=ut([]),[_e,Ue]=ut(null),de=et(()=>{try{if(!v)return[];const q=JSON.parse(v);return Array.isArray(q)?q:[]}catch{return[]}},[v]),be=(q,fe)=>{var Me,te,me;const Re=((Me=q==null?void 0:q.metadata)==null?void 0:Me.source)||(q==null?void 0:q.file_path)||(q==null?void 0:q.path)||(q==null?void 0:q.convertedFilePath)||(q==null?void 0:q.parsedFilePath)||"",Be=((te=q==null?void 0:q.metadata)==null?void 0:te.title)||(q==null?void 0:q.file_name)||"",he=((me=q==null?void 0:q.metadata)==null?void 0:me.id)||(q==null?void 0:q.id)||(q==null?void 0:q.file_id)||"",we=de.find(J=>{var Ge,dt,Oe;const W=((Ge=J==null?void 0:J.metadata)==null?void 0:Ge.source)||(J==null?void 0:J.file_path)||(J==null?void 0:J.path)||(J==null?void 0:J.convertedFilePath)||(J==null?void 0:J.parsedFilePath)||"",ie=((dt=J==null?void 0:J.metadata)==null?void 0:dt.title)||(J==null?void 0:J.file_name)||"",Ae=((Oe=J==null?void 0:J.metadata)==null?void 0:Oe.id)||(J==null?void 0:J.id)||"";return he&&Ae&&String(he)===String(Ae)||Re&&W&&W===Re||Be&&ie&&ie===Be});if(we){const J=(we!=null&&we.references&&Array.isArray(we.references)?we.references:[we]).find(W=>String(W.order_num)===String(fe)||String(W.id)===String(fe));if(J)return J}for(const J of de){if(J!=null&&J.references&&Array.isArray(J.references)){const W=J.references.find(ie=>String(ie.order_num)===String(fe)||String(ie.id)===String(fe));if(W)return W}if(String(J.order_num)===String(fe)||String(J.id)===String(fe))return J}return null},Se=(q,fe)=>{function Re(te,me){for(const J of te){if(J.references&&Array.isArray(J.references)){const W=J.references.find(ie=>String(ie.order_num)===String(me)||String(ie.id)===String(me));if(W)return W}if(String(J.order_num)===String(me)||String(J.id)===String(me))return J}return null}let Be=[];try{v&&(Be=JSON.parse(v))}catch(te){console.error("Failed to parse reference:",te)}const he=Re(Be,q.id),we=te=>{if(typeof t!="string")return;const me=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${te}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(t);if(me&&me[1]){const J=Number(me[1]);return Number.isNaN(J)?void 0:J}},Me={tagInfo:{id:q==null?void 0:q.id,index:we(String(q==null?void 0:q.id)),image_urls:(q==null?void 0:q.imageUrls)||(q==null?void 0:q.image_urls)||[]},fromtype:String((q==null?void 0:q.fromtype)??""),leaf:q,attributes:fe,referenceDoc:he||void 0};if(String(q==null?void 0:q.fromtype)==="2"&&y)try{const te=JSON.parse(y||"[]"),me=(Array.isArray(te)?te:[]).find(J=>{if(Array.isArray(J==null?void 0:J.traceNodes))return J.traceNodes.some(ie=>String(ie==null?void 0:ie.id)===String(q.id));const W=String(q.id||"").split("_")[0];return String(J==null?void 0:J.id)===W});me&&(Me.graph={id:me.id,graphName:me.graphName,fetchUrl:me.fetchUrl,cyphers:me.cyphers},Me.traceNode=Array.isArray(me.traceNodes)?me.traceNodes.find(J=>String(J==null?void 0:J.id)===String(q.id)):void 0)}catch{}E==null||E("action_retrive_tag",Me),E==null||E("retrive_tag:click",Me)},Ke=q=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",q),console.log("databaseReference available:",!!C),q.id&&C){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",C);const fe=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:q.id,databaseReference:C}});console.log("Dispatching event:",fe),window.dispatchEvent(fe)}else console.log("Cannot send response - missing id or databaseReference")};pe.useEffect(()=>{const q=fe=>{Ke(fe.detail)};return window.addEventListener("retrieve-sql-data:request-data",q),()=>{window.removeEventListener("retrieve-sql-data:request-data",q)}},[C]),pe.useEffect(()=>{const q=fe=>{Fe(fe.detail)};return window.addEventListener("rtext_pagination_click",q),()=>{window.removeEventListener("rtext_pagination_click",q)}},[_e]);const Fe=q=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",q),q.replacePredataFunction&&_e){const fe={..._e,rows:_e.rows};q.replacePredataFunction(fe)}E==null||E("rtext_pagination_click",q)},$e=ct(new Map),rt=ct(1),Xe=ct(""),je=ct({0:1,1:1,2:1,3:1}),Pe=et(()=>{if(r==="stream"&&typeof t=="string"){let q=t;const fe=[];return $&&$!==Xe.current&&($e.current.clear(),rt.current=1,je.current={0:1,1:1,2:1,3:1},Xe.current=$),q=q.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Re,Be)=>{const he=Be.match(/id=['"]([^'"]+)['"]/),we=Be.match(/fromType=['"]([^'"]+)['"]/);if(he){const Me=he[1],te=we?we[1]:"0";if(!$e.current.has(Me)){const J=je.current,W=te==="1"?"1":te==="2"?"2":te==="3"?"3":"0",ie=J[W]??1;$e.current.set(Me,ie),J[W]=ie+1,je.current=J}const me=$e.current.get(Me);return`[retrive-tag${Be}][${me}][/retrive-tag]`}return Re}),q=q.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Re=>{const Be=Re.match(/image_urls=['"]([^'"]+)['"]/);if(Be){const he=Be[1].split(";").map(we=>we.trim()).filter(Boolean);fe.push(...he)}return Re}),G(fe),q}return t},[t,r,$]),Ce=et(()=>{if(r==="stream"&&typeof Pe=="string")try{return T1(Pe)}catch(q){return console.error("Failed to deserialize markdown:",q),[]}return[]},[Pe,r]);xt(()=>{try{r==="stream"&&C&&(q=>{try{const fe=typeof q=="string"?JSON.parse(q):q;return fe?Array.isArray(fe)?fe:[fe]:[]}catch{return[]}})(C).forEach(q=>{const fe=q==null?void 0:q.id;if(!fe)return;const Re=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:fe,databaseReference:q}});window.dispatchEvent(Re)})}catch{}},[r,C]);const ye=et(()=>{if(!Array.isArray(Ce))return!1;const q=Re=>{for(const Be of Re)if(Be.type==="think"||Array.isArray(Be.children)&&q(Be.children))return!0;return!1},fe=q(Ce);return console.log("Think detection:",{slateContent:Ce,hasThinkElement:fe,displayStatus:o,isUser:l}),fe},[Ce,o,l]),He=et(()=>({databaseReference:C,...ye&&{isThinkCollapsed:re}}),[C,ye,re]),Ye=et(()=>a||(l?H.icons.userAvatar:H.icons.aiAvatar),[a,l,H.icons]),Qe=et(()=>typeof t=="string"?t:Array.isArray(t)?t.map(q=>typeof q=="string"?q:q.text||"").join(""):D||"",[t,D]),We=()=>{if(L)return null;const q=[{key:"copy",show:O.copy!==!1,icon:Qb,label:"\u590D\u5236",onClick:()=>E==null?void 0:E("chatbox:copy",{content:Qe})},{key:"like",show:O.like!==!1,icon:s9,label:"\u8D5E",onClick:()=>E==null?void 0:E("chatbox:like",{result:F,queryId:$}),active:F===1},{key:"dislike",show:O.dislike!==!1,icon:l9,label:"\u8E29",onClick:()=>E==null?void 0:E("chatbox:dislike",{result:F,queryId:$}),active:F===0},{key:"repeat",show:!l&&N,icon:a9,label:"\u91CD\u590D",onClick:()=>E==null?void 0:E("chatbox:repeat",{content:t,queryId:$,filePaths:b,audioUrl:A})},{key:"forward",show:O.forward,icon:i9,label:"\u8F6C\u53D1",onClick:()=>E==null?void 0:E("chatbox:forward",{content:Qe,queryId:$})},{key:"delete",show:O.delete,icon:u9,label:"\u5220\u9664",onClick:()=>E==null?void 0:E("chatbox:delete",{queryId:$})},{key:"edit",show:O.edit,icon:n9,label:"\u7F16\u8F91",onClick:()=>E==null?void 0:E("chatbox:edit",{content:Qe,queryId:$})}];return j.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[j.jsx(g9,{$theme:H,children:q.filter(fe=>fe.show).map(fe=>{const Re=fe.icon;return j.jsx(La,{title:fe.label,placement:"top",children:j.jsx("button",{className:fe.active?"active":"",onClick:fe.onClick,children:j.jsx(Re,{size:18})})},fe.key)})}),!l&&o=="ready"&&!L&&j.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017"," ",j.jsx("span",{style:{color:H.colors.primary},children:P||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",j.jsx("span",{style:{color:H.colors.primary},children:Math.round((T||0)/1e3)}),"\u79D2"]})]})},mt=et(()=>{if(!v)return[];let q=[];try{const he=JSON.parse(v);q=Array.isArray(he)?he:[]}catch{return[]}let fe=q.map(he=>{try{const we=he.metadata||{};let Me="";we.type==="video"&&we.source_name&&typeof we.source_name=="string"?Me=we.source_name:he.name&&typeof he.name=="string"?Me=he.name:he.file_name&&typeof he.file_name=="string"?Me=he.file_name:we.title&&typeof we.title=="string"?Me=we.title:we.source&&typeof we.source=="string"?Me=we.source.split("/").pop()||"":he.order_num?Me=String(he.order_num):Me="\u672A\u77E5\u6587\u6863";let te="pdf";if(we.type&&typeof we.type=="string")te=we.type.toLowerCase();else if(he.name&&typeof he.name=="string"){const J=he.name.split(".").pop();J&&(te=J.toLowerCase())}else if(we.source&&typeof we.source=="string"){const J=we.source.split(".").pop();J&&(te=J.toLowerCase())}else if(he.file_path&&typeof he.file_path=="string"){const J=he.file_path.split(".").pop();J&&(te=J.toLowerCase())}const me=he.parsedFilePath||we.file_path||he.file_path||he.convertedFilePath||we.link||we.source_link||"";return{file_id:we.id||he.uid||"",file_name:Me,file_type:te,path:me,score:Number(he.score||we.score)||0,tags:[],parsedFilePath:he.parsedFilePath,...he}}catch(we){return console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",we,he),{file_id:he.uid||"",file_name:he.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:he.convertedFilePath||he.file_path||"",score:0,tags:[],parsedFilePath:he.parsedFilePath,...he}}});const Re=Pn(Ce||[]);if(Re&&Re.length){const he=te=>{if(typeof Pe!="string")return"";const me=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${te}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Pe);if(me&&me[1]){const J=Number(me[1]);return Number.isNaN(J)?"":J}return""},we=Re.filter(te=>te.fromtype==="0"),Me=Re.filter(te=>te.fromtype==="3");fe=fe.map(te=>{const me=we.filter(W=>{var Ae,Ge;const ie=q.find(dt=>String(dt.order_num)===String(W.id));return((Ae=ie==null?void 0:ie.metadata)==null?void 0:Ae.source)&&((Ge=te==null?void 0:te.metadata)==null?void 0:Ge.source)&&ie.metadata.source===te.metadata.source}).map(W=>({id:W.id||"",index:he(String(W.id))||W.indexId||"",image_urls:W.imageUrls?Array.isArray(W.imageUrls)?W.imageUrls:[W.imageUrls]:W.image_urls?W.image_urls.split(";").map(ie=>ie.trim()).filter(Boolean):[]})),J=Me.filter(W=>{var Ae,Ge;const ie=q.find(dt=>String(dt.order_num)===String(W.id));return((Ae=ie==null?void 0:ie.metadata)==null?void 0:Ae.source)&&((Ge=te==null?void 0:te.metadata)==null?void 0:Ge.source)&&ie.metadata.source===te.metadata.source}).map(W=>({id:W.id||"",index:he(String(W.id))||W.indexId||"",image_urls:W.imageUrls?Array.isArray(W.imageUrls)?W.imageUrls:[W.imageUrls]:W.image_urls?W.image_urls.split(";").map(ie=>ie.trim()).filter(Boolean):[]}));return{...te,tags:[...me,...J]}})}const Be=new Map;return fe.filter(he=>{var Me;const we=((Me=he==null?void 0:he.metadata)==null?void 0:Me.source)||he.file_name;return we?Be.has(we)?!1:(Be.set(we,!0),!0):!0}).sort((he,we)=>((we==null?void 0:we.score)||0)-((he==null?void 0:he.score)||0))},[v,Ce,Pe]),Ze=et(()=>{if(!f)return[];let q=[];try{const Be=JSON.parse(f);q=Array.isArray(Be)?Be:[]}catch{return[]}if(!(q!=null&&q.length))return[];let fe=q.map(Be=>{var he,we,Me;return{link:(he=Be==null?void 0:Be.metadata)==null?void 0:he.link,file_name:(we=Be==null?void 0:Be.metadata)==null?void 0:we.title,score:(Me=Be==null?void 0:Be.metadata)==null?void 0:Me.score,tags:[]}});const Re=Pn(Ce||[]);if(Re&&Re.length){const Be=we=>{if(typeof Pe!="string")return"";const Me=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${we}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Pe);if(Me&&Me[1]){const te=Number(Me[1]);return Number.isNaN(te)?"":te}return""},he=Re.filter(we=>we.fromtype==="1");fe=fe.map(we=>{const Me=he.filter(te=>{var J;const me=q.find(W=>String(W.order_num)===String(te.id));return((J=me==null?void 0:me.metadata)==null?void 0:J.title)&&me.metadata.title===we.file_name}).map(te=>({id:te.id||"",index:Be(String(te.id))||te.indexId||"",image_urls:te.imageUrls?Array.isArray(te.imageUrls)?te.imageUrls:[te.imageUrls]:te.image_urls?te.image_urls.split(";").map(me=>me.trim()).filter(Boolean):[]}));return{...we,tags:Me}})}return fe.sort((Be,he)=>((he==null?void 0:he.score)||0)-((Be==null?void 0:Be.score)||0))},[f,Ce,Pe]),bt=et(()=>{if(!y)return[];let q=[];try{const Be=JSON.parse(y);q=Array.isArray(Be)?Be:[]}catch(Be){return console.error("Failed to parse graphReference:",Be),[]}let fe=q.map((Be,he)=>({id:Be.id||`graph-${he}`,graphName:Be.graphName||`\u56FE\u8C31${he+1}`,tags:[],...Be}));const Re=Pn(Ce||[]);if(Re&&Re.length){const Be=Re.filter(he=>he.fromtype==="2");fe=fe.map(he=>{const we=J=>{if(typeof Pe!="string")return;const W=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${J}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(Pe);if(W&&W[1]){const ie=Number(W[1]);return Number.isNaN(ie)?void 0:ie}};let Me=[];Array.isArray(he.traceNodes)&&he.traceNodes.length>0?Me=he.traceNodes.map((J,W)=>({id:J.id,index:we(String(J.id))??W+1,image_urls:[]})):Me=Be.filter(J=>String(J.id)===String(he.id)).map(J=>({id:J.id||"",index:J.indexId||"",image_urls:J.imageUrls?Array.isArray(J.imageUrls)?J.imageUrls:[J.imageUrls]:J.image_urls?J.image_urls.split(";").map(W=>W.trim()).filter(Boolean):[]}));const te=new Set,me=Me.filter(J=>te.has(String(J.id))?!1:(te.add(String(J.id)),!0)).sort((J,W)=>Number(J.index)-Number(W.index));return{...he,tags:me}})}return fe},[y,Ce,Pe]),pt=et(()=>{const q=[...Pn(Ce||[]).filter(fe=>fe.imageUrls&&Array.isArray(fe.imageUrls)).flatMap(fe=>fe.imageUrls),...U];return Array.from(new Set(q))},[Ce,U]),ht=et(()=>typeof t!="string"?[]:c9(t),[t]),Ie=et(()=>{var q,fe,Re,Be,he,we,Me,te;if(!C)return null;try{const me=typeof C=="string"?JSON.parse(C):C;if(Array.isArray(me)&&me.length>0){const J=me[0];if(J.retrieveSqlData)return{dataFetchUrl:J.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:J.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:J.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:J.retrieveSqlData.total||0,type:J.retrieveSqlData.type||"COLLECTION",preData:{columns:((fe=(q=J.retrieveSqlData.preData)==null?void 0:q[0])==null?void 0:fe.columns)||[],rows:((Be=(Re=J.retrieveSqlData.preData)==null?void 0:Re[0])==null?void 0:Be.data)||[]}}}return me.retrieveSqlData?{dataFetchUrl:me.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:me.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:me.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:me.retrieveSqlData.total||0,type:me.retrieveSqlData.type||"COLLECTION",preData:{columns:((we=(he=me.retrieveSqlData.preData)==null?void 0:he[0])==null?void 0:we.columns)||[],rows:((te=(Me=me.retrieveSqlData.preData)==null?void 0:Me[0])==null?void 0:te.data)||[]}}:{dataFetchUrl:me.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:me.databaseName||"\u6570\u636E\u5E93",tableName:me.tableName||"\u6570\u636E\u8868",total:me.total||0,type:me.type||"COLLECTION",preData:me.preData||{columns:[],rows:[]}}}catch(me){return console.error("Failed to parse databaseReference:",me),null}},[C]),ar=q=>{const{dataSourceType:fe,databaseName:Re,businessTableName:Be,tableName:he}=q;return fe==="DataTable"?`${Re||"\u6570\u636E\u5E93"} - ${Be||"\u6570\u636E\u8868"}`:fe==="DirectDB"?`${Re||"\u6570\u636E\u5E93"} - ${he||"\u6570\u636E\u8868"}`:Re||Be||he||"\u6570\u636E\u5E93"};pe.useEffect(()=>{var q,fe,Re,Be,he,we,Me,te;if(C)try{const me=typeof C=="string"?JSON.parse(C):C;if(Array.isArray(me)&&me.length>0){const J=me[0];if(J.retrieveTableDataList&&Array.isArray(J.retrieveTableDataList)){Ee(J.retrieveTableDataList);return}if((Re=(fe=(q=J.retrieveSqlData)==null?void 0:q.preData)==null?void 0:fe[0])!=null&&Re.data&&Array.isArray(J.retrieveSqlData.preData[0].data)){Ee(J.retrieveSqlData.preData[0].data);return}}if(me.retrieveTableDataList&&Array.isArray(me.retrieveTableDataList)){Ee(me.retrieveTableDataList);return}if((we=(he=(Be=me.retrieveSqlData)==null?void 0:Be.preData)==null?void 0:he[0])!=null&&we.data&&Array.isArray(me.retrieveSqlData.preData[0].data)){Ee(me.retrieveSqlData.preData[0].data);return}(Me=Ie==null?void 0:Ie.preData)!=null&&Me.rows&&Ee(Ie.preData.rows)}catch(me){console.error("Failed to parse databaseReference for retrieveTableDataList:",me),(te=Ie==null?void 0:Ie.preData)!=null&&te.rows&&Ee(Ie.preData.rows)}},[C,Ie]);const Tt=ze(()=>{try{const q=Array.isArray(mt)?mt:[],fe=Array.isArray(Ze)?Ze:[],Re=Array.isArray(bt)?bt:[],Be=Array.from(new Set([...pt||[],...ht||[]])),he=Pn(Ce||[]),we=W=>typeof Pe!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${W}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(Pe),Me=W=>{const ie=new Map;return W.forEach(Ae=>{if(Ae.id){const Ge=String(Ae.id);if(!ie.has(Ge))ie.set(Ge,Ae);else{const dt=ie.get(Ge),Oe=Number(Ae.index)||0,it=Number(dt.index)||0;(Oe<it||Oe===it&&!dt.index)&&ie.set(Ge,Ae)}}}),Array.from(ie.values())},te=q.map(W=>({...W,tags:Me((W.tags||[]).filter(ie=>ie.id&&we(String(ie.id))))})),me=fe.map(W=>({...W,tags:Me((W.tags||[]).filter(ie=>ie.id&&we(String(ie.id))))})),J=Re.map(W=>({...W,tags:Me((W.tags||[]).filter(ie=>ie.id&&we(String(ie.id))))}));return{queryId:$,knowledgeRefs:te,webRefs:me,graphRefs:J,databaseRef:Ie,databaseDataRows:ce,images:Be,raw:{reference:v,webReference:f,graphReference:y,databaseReference:C,retriveNodes:he}}}catch{return{queryId:$,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRef:null,databaseDataRows:[],images:[],raw:{reference:v,webReference:f,graphReference:y,databaseReference:C,retriveNodes:[]}}}},[mt,Ze,bt,Ie,ce,pt,ht,Ce,$,v,f,y,C,Pe]),tr=et(()=>{if(!l)return[];if(Array.isArray(x))return x;if(typeof x=="string"&&x)try{return JSON.parse(x)}catch{return[]}return[]},[l,x]),zt=()=>{if(!l||tr.length===0)return null;const q=te=>te!=null&&te.status&&(String(te.status).toLowerCase()==="uploading"||String(te.status).toLowerCase()==="parsing")?!1:!!(te!=null&&te.url||te!=null&&te.filePath||te!=null&&te.convertedFilePath),fe=tr.filter(te=>{const me=(te.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(me.toLowerCase())}),Re=tr.filter(te=>{const me=(te.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(me.toLowerCase())}),Be=fe.filter(q),he=fe.filter(te=>!q(te)),we=Re.filter(q),Me=Re.filter(te=>!q(te));return j.jsxs("div",{className:"w-full mt-4",children:[(Be.length>0||he.length>0)&&j.jsx(El,{$theme:H,children:j.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[he.map((te,me)=>{var J;return j.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:j.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((J=H.colors)==null?void 0:J.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${me}`)}),Be.map(te=>j.jsxs("div",{className:"gallery-item",onClick:()=>{ae(te.url||te.filePath||null),E==null||E("reference_file:click",{file:te.name,file_type:"image",url:te.url||te.filePath,parse_url:te.parseUrl||te.convertedFilePath,retrieve_tags:te.retrieveTags||[],file_id:te.uid,parsed_file_type:"image",references:te,type:"image",isUploadFile:!0,pdfPages:te.pdfPages||0})},children:[j.jsx("img",{src:te.url||te.filePath,alt:te.name,className:"gallery-image",onError:me=>{const J=me.target;J.style.display="none"}}),j.jsx("div",{className:"gallery-overlay",children:te.name})]},te.uid||te.name))]})}),(we.length>0||Me.length>0)&&j.jsxs("div",{className:"w-full",children:[j.jsxs("div",{className:"text-sm font-semibold text-gray-700 mb-3 px-4",children:["\u4E0A\u4F20\u6587\u6863 (",we.length,")"]}),j.jsxs("div",{className:"flex flex-col gap-2 px-4",style:{direction:"ltr"},children:[Me.map((te,me)=>{var J;return j.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 bg-gray-50/40",children:[j.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded bg-gray-200"}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"h-3 rounded bg-gray-200 w-[60%]"})}),j.jsx("div",{className:"w-6 h-6",children:j.jsx("div",{className:"animate-spin",style:{width:18,height:18,border:"2px solid #d1d5db",borderTopColor:((J=H.colors)==null?void 0:J.primary)||"#3b82f6",borderRadius:"9999px"}})})]},`pending-doc-${me}`)}),we.map(te=>{const me=(te.name||"").split(".").pop()||"";return j.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 hover:border-blue-300 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>{E==null||E("reference_file:click",{file:te.name,file_type:me,url:te.url||te.filePath,parse_url:te.parseUrl||te.convertedFilePath,retrieve_tags:te.retrieveTags||[],file_id:te.uid,parsed_file_type:me,references:te,type:"file",isUploadFile:!0,pdfPages:te.pdfPages||0})},children:[j.jsx("div",{className:"flex-shrink-0",children:j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center ",children:j.jsx(ia,{type:yd(me),size:16})})}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:J=>{J.stopPropagation(),E==null||E("referenceFile_question",{data:{...te,file_type:me,file_name:te.name,metadata:te,parsedFilePath:te.url||te.filePath}})},children:te.name})}),te.size&&j.jsx("div",{className:"text-sm text-gray-600",children:te.size})]},te.uid||te.name)})]})]})]})},Kt=()=>{var J;if(l)return null;const q=Array.isArray(mt)?mt:[],fe=Array.isArray(Ze)?Ze:[],Re=Array.isArray(bt)?bt:[],Be=q.length>0&&S!==5,he=fe.length>0,we=Re.length>0,Me=((pt==null?void 0:pt.length)||0)>0||((ht==null?void 0:ht.length)||0)>0,te=ce&&ce.length>0,me=Be||he||we||Me||te;if(I==="button"){if(!me)return null;const W=((q==null?void 0:q.length)||0)+((fe==null?void 0:fe.length)||0)+((Re==null?void 0:Re.length)||0)+(te?1:0)+(((pt==null?void 0:pt.length)||0)+((ht==null?void 0:ht.length)||0)>0?1:0);return j.jsxs(j.Fragment,{children:[Me&&j.jsx(El,{$theme:H,children:j.jsx("div",{className:"gallery-grid",children:[...pt,...ht].map((ie,Ae)=>j.jsxs("div",{className:"gallery-item",onClick:()=>{ae(ie),E==null||E("reference_file:click",{file:`\u56FE${Ae+1}`,file_type:"image",url:ie,parse_url:ie,retrieve_tags:[],references:{url:ie},type:"image",isUploadFile:!1})},children:[j.jsx("img",{src:ie,alt:`\u56FE${Ae+1}`,className:"gallery-image",onError:Ge=>{const dt=Ge.target;dt.style.display="none"}}),j.jsxs("div",{className:"gallery-overlay",children:["\u56FE",Ae+1]})]},ie+Ae))})}),j.jsx("div",{style:{padding:"6px 2.9rem"},children:j.jsxs("button",{style:{cursor:"pointer",color:((J=H.colors)==null?void 0:J.textDisabled)||"#86909C"},className:"text-sm flex items-center gap-x-1 px-3 py-1 rounded border border-gray-200 hover:border-blue-300 transition-colors",onClick:()=>{const ie=Tt();E==null||E("references:click",ie)},onMouseEnter:ie=>{var Ae;ie.currentTarget.style.color=((Ae=H.colors)==null?void 0:Ae.primary)||"#3b82f6"},onMouseLeave:ie=>{var Ae;ie.currentTarget.style.color=((Ae=H.colors)==null?void 0:Ae.textDisabled)||"#86909C"},children:[j.jsx(t9,{size:16}),j.jsxs("span",{children:["\u5F15\u7528\u6EAF\u6E90",W?` (${W})`:""]}),j.jsx(Yb,{size:16})]})})]})}return me?j.jsxs(j.Fragment,{children:[Me&&j.jsx(El,{$theme:H,children:j.jsx("div",{className:"gallery-grid",children:[...pt,...ht].map((W,ie)=>j.jsxs("div",{className:"gallery-item",onClick:()=>{ae(W),E==null||E("reference_file:click",{file:`\u56FE${ie+1}`,file_type:"image",url:W,parse_url:W,retrieve_tags:[],references:{url:W},type:"image",isUploadFile:!1})},children:[j.jsx("img",{src:W,alt:`\u56FE${ie+1}`,className:"gallery-image",onError:Ae=>{const Ge=Ae.target;Ge.style.display="none"}}),j.jsxs("div",{className:"gallery-overlay",children:["\u56FE",ie+1]})]},W+ie))})}),Be&&j.jsxs(xa,{$theme:H,children:[j.jsx("div",{className:"reference-title justify-between items-center flex",children:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),j.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${q.length})`}),q.length>2&&j.jsx("div",{onClick:()=>Z(!R),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:R?j.jsx(ya,{size:16,className:"text-[#b4b4b4]"}):j.jsx(ba,{size:16,className:"text-[#b4b4b4]"})})]})}),j.jsx("div",{className:"reference-list",children:(R?q:q.slice(0,2)).map((W,ie)=>W&&j.jsx("div",{className:"reference-item",children:j.jsxs("div",{className:"file-info flex items-end gap-2",children:[j.jsx("div",{className:"flex-shrink-0",children:(()=>{const Ae=W.file_type||(W.file_name||"").split(".").pop()||"pdf",Ge=(W.file_name||"").split(".").pop()||"file";return Ae==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(Ae)?j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:j.jsx(o9,{size:16,className:"text-red-600"})}):j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:j.jsx(ia,{type:yd(Ge),size:16})})})()}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Ae=>{Ae.stopPropagation(),E==null||E("knowledge_referenceFile_title:click",{data:{...W,file_type:W.file_type,file_name:W.file_name,metadata:W.metadata,parsedFilePath:W.parsedFilePath}})},children:W.file_name})}),j.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Ae=new Set,Ge=(W.tags||[]).filter(Oe=>Ae.has(Oe.id)?!1:(Ae.add(Oe.id),!0)).sort((Oe,it)=>Number(Oe.index)-Number(it.index)),dt=Oe=>{if(typeof Pe!="string")return Oe;const it=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Oe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Pe);return it?it[1]:Oe};return Ge.slice(0,10).map(Oe=>j.jsx("span",{className:"w-6 h-6 bg-[#e6f7ff] text-[#1890ff] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:it=>{it.stopPropagation();const Ft=be(W,Oe.id),sr=W.file_type==="video"?"3":"0";E==null||E("retrive_tag:click",{tagInfo:Ft||W,fromtype:sr,leaf:{id:Oe.id,fromtype:sr},attributes:{}})},children:dt(Oe.id)},Oe.id))})()}),j.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",W.score?Number(W.score).toFixed(2):"N/A"]}),W.file_type!=="video"&&j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(e9,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:e?"pointer":"not-allowed"},onClick:Ae=>{e&&(Ae.stopPropagation(),E==null||E("referenceFile_download",{data:{...W,file_type:W.file_type,file_name:W.file_name,metadata:W.metadata,parsedFilePath:W.parsedFilePath}}))}}),j.jsx("div",{className:"w-px h-4 bg-gray-300"}),j.jsx(r9,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:Ae=>{Ae.stopPropagation(),E==null||E("referenceFile_filechat",{data:{...W,file_type:W.file_type,file_name:W.file_name,metadata:W.metadata,parsedFilePath:W.parsedFilePath}})}})]})]})},W.file_id||ie))})]}),te&&j.jsxs(xa,{$theme:H,children:[j.jsx("div",{className:"reference-title justify-between items-center flex",children:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),j.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${ce.length||0})`}),ce.length>2&&j.jsx("div",{onClick:()=>Q(!X),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:X?j.jsx(ya,{size:16,className:"text-[#b4b4b4]"}):j.jsx(ba,{size:16,className:"text-[#b4b4b4]"})})]})}),j.jsx("div",{className:"reference-list",children:(X?ce:ce.slice(0,2)).map((W,ie)=>j.jsx("div",{className:"reference-item",children:j.jsxs("div",{className:"file-info flex items-end gap-2",children:[j.jsx("div",{className:"flex-shrink-0",children:j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:j.jsx(Jb,{size:20,className:"text-blue-600"})})}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Ae=>{Ae.stopPropagation(),E==null||E("database_referenceFile_title:click",{data:{...W,file_type:"database",file_name:ar(W),metadata:W,parsedFilePath:W.fetchUrl||(Ie==null?void 0:Ie.dataFetchUrl)||"",file:W.databaseName||"database",url:W.fetchUrl||(Ie==null?void 0:Ie.dataFetchUrl)||"",parse_url:W.fetchUrl||(Ie==null?void 0:Ie.dataFetchUrl)||"",retrieve_tags:[],references:W,type:"database",isUploadFile:!1}})},children:ar(W)})}),j.jsx("div",{className:"flex items-center gap-1",children:j.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",children:ie+1})}),j.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",W.score?Number(W.score).toFixed(2):"N/A"]})]})},W.tableName||ie))})]}),he&&j.jsxs(xa,{$theme:H,children:[j.jsx("div",{className:"reference-title justify-between items-center flex",children:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),j.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${fe.length})`}),fe.length>2&&j.jsx("div",{onClick:()=>K(!V),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:V?j.jsx(ya,{size:16,className:"text-[#b4b4b4]"}):j.jsx(ba,{size:16,className:"text-[#b4b4b4]"})})]})}),j.jsx("div",{className:"reference-list",children:(V?fe:fe.slice(0,2)).map((W,ie)=>j.jsx("div",{className:"reference-item",children:j.jsxs("div",{className:"file-info flex items-end gap-2",children:[j.jsx("div",{className:"flex-shrink-0",children:j.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:j.jsx(ia,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Ae=>{Ae.stopPropagation(),E==null||E("web_referenceFile_title:click",{data:{...W,file_type:W.file_type,file_name:W.file_name,metadata:W.metadata,parsedFilePath:W.parsedFilePath,file:W.file_name,url:W.link,parse_url:W.link,retrieve_tags:W.tags||[],references:W,type:"file",isUploadFile:!1}})},children:W.file_name})}),j.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Ae=new Set,Ge=(W.tags||[]).filter(Oe=>Ae.has(Oe.id)?!1:(Ae.add(Oe.id),!0)).sort((Oe,it)=>Number(Oe.index)-Number(it.index)),dt=Oe=>{if(typeof Pe!="string")return Oe;const it=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Oe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Pe);return it?it[1]:Oe};return Ge.slice(0,1).map(Oe=>j.jsx("span",{className:"w-6 h-6 bg-[#f6ffed] text-[#52c41a] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:it=>{it.stopPropagation();const Ft=be(W,Oe.id);E==null||E("retrive_tag:click",{tagInfo:Ft||W,fromtype:"1",leaf:{id:Oe.id,fromtype:"1"},attributes:{}})},children:dt(Oe.id)},Oe.id))})()}),j.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",W.score?W.score.toFixed(2):"N/A"]})]})},(W.link||"")+ie))})]}),we&&j.jsxs(xa,{$theme:H,children:[j.jsx("div",{className:"reference-title justify-between items-center flex",children:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),j.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Re.length})`}),Re.length>2&&j.jsx("div",{onClick:()=>se(!ee),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:ee?j.jsx(ya,{size:16,className:"text-[#b4b4b4]"}):j.jsx(ba,{size:16,className:"text-[#b4b4b4]"})})]})}),j.jsx("div",{className:"reference-list",children:(ee?Re:Re.slice(0,2)).map((W,ie)=>j.jsx("div",{className:"reference-item",children:j.jsxs("div",{className:"file-info flex items-end gap-2",children:[j.jsx("div",{className:"flex-shrink-0",children:j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:j.jsx("div",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center",children:"\u56FE"})})}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:W.graphName||`\u56FE\u8C31${ie+1}`})}),j.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Ae=new Set,Ge=(W.tags||[]).filter(Oe=>Ae.has(Oe.id)?!1:(Ae.add(Oe.id),!0)).sort((Oe,it)=>Number(Oe.index)-Number(it.index)),dt=Oe=>{if(typeof Pe!="string")return null;const it=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Oe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Pe);return it?it[1]??null:null};return Ge.map(Oe=>({tag:Oe,num:dt(Oe.id)})).filter(Oe=>Oe.num!==null&&Oe.num!==void 0&&Oe.num!=="").slice(0,10).map(({tag:Oe,num:it})=>j.jsx("span",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-purple-200 transition-colors",onClick:Ft=>{Ft.stopPropagation();const sr=Array.isArray(W.traceNodes)?W.traceNodes.find(Fr=>String(Fr==null?void 0:Fr.id)===String(Oe.id)):void 0;E==null||E("retrive_tag:click",{tagInfo:{id:Oe.id,index:Oe.index,image_urls:Oe.image_urls||[]},fromtype:"2",graph:{id:W.id,graphName:W.graphName,fetchUrl:W.fetchUrl,cyphers:W.cyphers},traceNode:sr})},children:it},Oe.id))})()})]})},W.id||ie))})]})]}):null},Mt=()=>l||!N||!k||k.length===0?null:j.jsx(m9,{$theme:H,children:j.jsx("div",{className:"follow-up-list",children:k.map((q,fe)=>j.jsx("div",{className:"follow-up-item",style:{animationDelay:`${fe*260}ms`},onClick:()=>{E==null||E("chatbox:follow_up_question_click",{question:q,queryId:$})},children:q},`${String(q)}-${fe}`))})});return j.jsxs(d9,{$align:n,$isUser:l,children:[j.jsxs(f9,{$isUser:l,children:[j.jsx(p9,{$src:Ye,$isUser:l}),z&&j.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:z})]}),j.jsx(h9,{$isUser:l,$theme:H,children:j.jsx("div",{className:"message-card",children:j.jsx("div",{className:"message-text",children:r==="stream"?j.jsxs(j.Fragment,{children:[!l&&ge(),j.jsx(yu,{dataSource:{type:ii.MARKDOWN,content:Pe},styles:{letterSpacing:g==null?void 0:g.letterSpacing,lineHeight:g==null?void 0:g.lineHeight,templateField:g==null?void 0:g.templateField,text:g==null?void 0:g.text},theme:{...g==null?void 0:g.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:Se,eventsEmit:E,extraProps:He},`md-${(Pe||"").length}-think-${re}`)]}):j.jsx("div",{children:Qe})})})}),zt(),Kt(),!l&&We(),Mt(),typeof document<"u"&&K1(j.jsx(v9,{$show:Y!==null,onClick:()=>ae(null),children:Y&&j.jsxs("div",{className:"modal-content",onClick:q=>q.stopPropagation(),children:[j.jsx("img",{src:Y,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),j.jsx("button",{className:"modal-close",onClick:()=>ae(null),children:"\u5173\u95ED"})]})}),document.body)]})},C9=$t.div`
|
|
897
|
+
position: relative;
|
|
898
|
+
width: 100%;
|
|
899
|
+
height: 100%;
|
|
900
|
+
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
901
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
902
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
903
|
+
|
|
904
|
+
/* 自定义滚动条 */
|
|
905
|
+
&::-webkit-scrollbar {
|
|
906
|
+
width: 8px;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
&::-webkit-scrollbar-track {
|
|
910
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
911
|
+
border-radius: 4px;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
&::-webkit-scrollbar-thumb {
|
|
915
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
916
|
+
border-radius: 4px;
|
|
917
|
+
|
|
918
|
+
&:hover {
|
|
919
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
`,b9=$t.div`
|
|
923
|
+
position: relative;
|
|
924
|
+
width: 100%;
|
|
925
|
+
height: 100%;
|
|
926
|
+
overflow: auto;
|
|
927
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
928
|
+
|
|
929
|
+
/* 自定义滚动条 */
|
|
930
|
+
&::-webkit-scrollbar {
|
|
931
|
+
width: 8px;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
&::-webkit-scrollbar-track {
|
|
935
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
936
|
+
border-radius: 4px;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
&::-webkit-scrollbar-thumb {
|
|
940
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
941
|
+
border-radius: 4px;
|
|
942
|
+
|
|
943
|
+
&:hover {
|
|
944
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
`,xd=$t.div`
|
|
948
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
949
|
+
min-height: ${e=>e.height||"auto"};
|
|
950
|
+
|
|
951
|
+
/* 富文本内容样式增强 */
|
|
952
|
+
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
953
|
+
scroll-margin-top: 2rem;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
& img {
|
|
957
|
+
max-width: 100%;
|
|
958
|
+
height: auto;
|
|
959
|
+
border-radius: 0.5rem;
|
|
960
|
+
margin: 1rem 0;
|
|
961
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
962
|
+
transition: transform 0.2s ease-in-out;
|
|
963
|
+
|
|
964
|
+
&:hover {
|
|
965
|
+
transform: scale(1.02);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/* 表格样式 - 主题感知 */
|
|
970
|
+
& .table-container {
|
|
971
|
+
overflow: auto;
|
|
972
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
973
|
+
border-radius: 6px;
|
|
974
|
+
margin: 1rem 0;
|
|
975
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
& .table-container table {
|
|
979
|
+
width: 100%;
|
|
980
|
+
border-collapse: collapse;
|
|
981
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
982
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
& .table-container th,
|
|
986
|
+
& .table-container td {
|
|
987
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
988
|
+
padding: 8px 12px;
|
|
989
|
+
text-align: left;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
& .table-container th {
|
|
993
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
994
|
+
font-weight: 600;
|
|
995
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
& .table-container td {
|
|
999
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
& .table-container tr:nth-child(even) {
|
|
1003
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
& pre {
|
|
1007
|
+
position: relative;
|
|
1008
|
+
|
|
1009
|
+
&::before {
|
|
1010
|
+
content: '';
|
|
1011
|
+
position: absolute;
|
|
1012
|
+
top: 0;
|
|
1013
|
+
left: 0;
|
|
1014
|
+
right: 0;
|
|
1015
|
+
height: 2px;
|
|
1016
|
+
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
1017
|
+
border-radius: 2px 2px 0 0;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
& blockquote {
|
|
1022
|
+
position: relative;
|
|
1023
|
+
|
|
1024
|
+
&::before {
|
|
1025
|
+
content: '"';
|
|
1026
|
+
position: absolute;
|
|
1027
|
+
top: -0.5rem;
|
|
1028
|
+
left: -1rem;
|
|
1029
|
+
font-size: 3rem;
|
|
1030
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1031
|
+
opacity: 0.3;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
`,y9=$t.div`
|
|
1037
|
+
display: flex;
|
|
1038
|
+
align-items: center;
|
|
1039
|
+
justify-content: center;
|
|
1040
|
+
padding: 2rem;
|
|
1041
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1042
|
+
font-size: 0.875rem;
|
|
1043
|
+
|
|
1044
|
+
&::before {
|
|
1045
|
+
content: '';
|
|
1046
|
+
width: 20px;
|
|
1047
|
+
height: 20px;
|
|
1048
|
+
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
1049
|
+
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1050
|
+
border-radius: 50%;
|
|
1051
|
+
animation: spin 1s linear infinite;
|
|
1052
|
+
margin-right: 0.5rem;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
@keyframes spin {
|
|
1056
|
+
0% { transform: rotate(0deg); }
|
|
1057
|
+
100% { transform: rotate(360deg); }
|
|
1058
|
+
}
|
|
1059
|
+
`,x9=$t.div`
|
|
1060
|
+
display: flex;
|
|
1061
|
+
flex-direction: column;
|
|
1062
|
+
align-items: center;
|
|
1063
|
+
justify-content: center;
|
|
1064
|
+
padding: 3rem;
|
|
1065
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1066
|
+
text-align: center;
|
|
1067
|
+
|
|
1068
|
+
&::before {
|
|
1069
|
+
content: '📄';
|
|
1070
|
+
font-size: 3rem;
|
|
1071
|
+
margin-bottom: 1rem;
|
|
1072
|
+
}
|
|
1073
|
+
`,w9=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:l=!1,size:i="sm",basePath:u,theme:s={},onChange:c,onScroll:p,onScrollToTop:d,onScrollToBottom:h,onSegmentClick:g,className:v,style:f,height:C="100%"})=>{const y=ui(),b=et(()=>{var X,Q,ee,se,re,oe,ge,ce,Ee;return{primaryColor:(s==null?void 0:s.primaryColor)||((X=y==null?void 0:y.colors)==null?void 0:X.primary)||"#007bff",secondaryColor:(s==null?void 0:s.secondaryColor)||((Q=y==null?void 0:y.colors)==null?void 0:Q.secondary)||"#6c757d",backgroundColor:(s==null?void 0:s.backgroundColor)||((ee=y==null?void 0:y.colors)==null?void 0:ee.background)||"#ffffff",textColor:(s==null?void 0:s.textColor)||((se=y==null?void 0:y.colors)==null?void 0:se.text)||"#24292f",borderColor:(s==null?void 0:s.borderColor)||((re=y==null?void 0:y.colors)==null?void 0:re.border)||"#dee2e6",disabledBackground:(s==null?void 0:s.disabledBackground)||((oe=y==null?void 0:y.colors)==null?void 0:oe.disabledBackground)||"#f8f9fa",hoverBackground:(s==null?void 0:s.hoverBackground)||((ge=y==null?void 0:y.colors)==null?void 0:ge.hoverBackground)||"#e9ecef",borderRadius:(s==null?void 0:s.borderRadius)||((ce=y==null?void 0:y.space)==null?void 0:ce.radius)||"8px",padding:(s==null?void 0:s.padding)||((Ee=y==null?void 0:y.space)==null?void 0:Ee.padding)||"1rem",scrollbarTrack:(s==null?void 0:s.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(s==null?void 0:s.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(s==null?void 0:s.scrollbarThumbHover)||"#a8a8a8",...s}},[y,s]),x=ct(0);x.current+=1,console.log("[Markdownit] render count:",x.current);const[B,A]=ut([]),[F,$]=ut({start:0,end:10}),[D,L]=ut(0),[N,T]=ut(0),[P,S]=ut(!1),[k,O]=ut(!1),[E,I]=ut(!1),M=ct(null),H=ct(null),z=ct(null),U=et(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);xt(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(U)?U.length:"n/a"),A(U)},[U]);const G=et(()=>t?`${B.length*r}px`:"auto",[B.length,r,t]),Y=et(()=>{if(!t)return B;const X=Math.max(0,F.start-n),Q=Math.min(B.length,F.end+n);return B.slice(X,Q).map((ee,se)=>({...ee,virtualIndex:X+se}))},[B,F,t,n]),ae=ze(X=>{const{scrollTop:Q,scrollHeight:ee,clientHeight:se}=X.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:Q,scrollHeight:ee,clientHeight:se});const re=!t&&!p&&!d&&!h&&!o;if(console.log("[Markdownit] passiveOnly:",re),re||L(oe=>oe!==Q?(console.log("[Markdownit] setScrollTop:",Q),Q):oe),t&&!re){const oe=Math.floor(Q/r),ge=Math.min(B.length,oe+Math.ceil(N/r)+1);$(ce=>ce.start!==oe||ce.end!==ge?(console.log("[Markdownit] setVisibleRange:",{start:oe,end:ge}),{start:oe,end:ge}):ce)}if(!re){const oe=Q<=10;oe!==k&&(console.log("[Markdownit] isAtTop ->",oe),O(oe),oe&&d&&(console.log("[Markdownit] onScrollToTop callback"),d()))}if(!re){const oe=Q+se>=ee-10;oe!==E&&(console.log("[Markdownit] isAtBottom ->",oe),I(oe),oe&&h&&(console.log("[Markdownit] onScrollToBottom callback"),h()))}p&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:Q,scrollHeight:ee}),p(Q,ee)),o&&a&&!P&&!l&&ee-Q-N<100&&R()},[t,r,B.length,N,o,a,P,l,k,E,d,h,p]),R=ze(async()=>{if(!(!a||P||l)){S(!0);try{const X=B[B.length-1],Q=await a(X.id);A(ee=>[...ee,...Q])}catch(X){console.error("Failed to load more segments:",X)}finally{S(!1)}}},[a,B,P,l]);xt(()=>{const X=()=>{M.current&&T(M.current.clientHeight)};return X(),window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[]);const Z=ze((X,Q)=>{const ee={type:X.type,content:X.content},se=t?{position:"absolute",top:`${(X.virtualIndex||Q)*r}px`,left:0,right:0,height:`${r}px`}:{};return j.jsx("div",{style:se,onClick:()=>g==null?void 0:g(X.id,X),className:g?"cursor-pointer hover:bg-gray-50":"",children:j.jsx(yu,{dataSource:ee,isEditing:!1,size:i,basePath:u,theme:b,onChange:c,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},X.id)},[t,r,b,c,g]),V=()=>(console.log("[Markdownit] renderContent segments.len:",B.length,"enableVirtualScroll:",t),B.length===0?j.jsxs(x9,{theme:b,children:[j.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),j.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?j.jsx("div",{ref:z,style:{height:G,position:"relative"},children:Y.map(Z)}):j.jsx("div",{ref:z,children:B.map(Z)})),K=()=>!P&&!l?null:j.jsx(y9,{theme:b,children:l?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return j.jsx(C9,{ref:M,theme:b,$isVirtualized:t,className:v,style:{height:C,...f},children:t?j.jsx(b9,{ref:H,theme:b,onScroll:ae,children:j.jsx(xd,{theme:b,height:G,children:V()})}):j.jsxs(xd,{theme:b,onScroll:ae,children:[V(),K()]})})},O9=e=>{const{onRendered:t}=e;return xt(()=>{if(!t)return;const r=requestAnimationFrame(()=>{const n=document.querySelector('[data-markdownit-root="1"]');n&&(console.log("[Markdownit _onRendered] fired"),t(n))});return()=>cancelAnimationFrame(r)},[e.dataSource,e.enableVirtualScroll,t]),j.jsx("div",{"data-markdownit-root":"1",children:j.jsx(w9,{...e})})};$t.div`
|
|
1074
|
+
background: #f6f8fa;
|
|
1075
|
+
border: 1px solid #d0d7de;
|
|
1076
|
+
border-radius: 6px;
|
|
1077
|
+
padding: 16px;
|
|
1078
|
+
margin-bottom: 20px;
|
|
1079
|
+
`;$t.p`
|
|
1080
|
+
margin: 0 0 16px 0;
|
|
1081
|
+
color: #656d76;
|
|
1082
|
+
font-size: 14px;
|
|
1083
|
+
line-height: 1.5;
|
|
1084
|
+
`;const wd=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,o,a=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(o=t.exec(e))!==null;){const l=o[0],i=o[1]||"",u=(o[2]||"").trim(),s=o.index,c=s+l.length;if(s>n){const C=e.slice(n,s);C.trim()!==""&&(r.push({text:C}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:C}))}const p=C=>{const y=new RegExp(`${C}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
1085
|
+
])*?)\\1`,"i"),b=i.match(y);return b?b[2]:void 0},d=/\S/.test(i),h=p("key"),g=p("placeholder"),v=h||`template-${Date.now()}-${a++}`,f={type:"template",key:v,placeholder:d?g||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":u||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:d?u:"",style:"blue",fieldId:v,children:[{text:""}],inline:!0};r.push(f),console.log("\u6DFB\u52A0template\u5143\u7D20:",f),n=c}if(n<e.length){const l=e.slice(n);l.trim()!==""&&(r.push({text:l}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:l}))}return r.length===0&&(e.trim()===""?r.push({text:""}):r.push({text:e}),console.log("\u6CA1\u6709\u627E\u5230template\u6807\u7B7E\uFF0C\u8FD4\u56DE\u539F\u59CB\u6587\u672C")),r.length>0&&r[0].type!=="paragraph"?[{type:"paragraph",children:r}]:(console.log("\u89E3\u6790\u5B8C\u6210\uFF0C\u7ED3\u679C:",r),r)},Sl=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="",n="";return console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2)),t.children.forEach(o=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",o),o.type==="template"){const a=o.key||o.fieldId||"",l=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",i=o.value||"",u=` key="${String(a)}" placeholder="${String(l)}"`;r+=`<template${u}>${i}</template>`,n=i||l}else if(o.text!==void 0){const a=o.text||"";a.trim()!==""?a!==n?(console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${a}`),r+=a,n=a):console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20"):console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20")}else{console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",o);const a=o.text||"";a.trim()!==""&&a!==n&&(r+=a,n=a)}}),console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},D9=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=n.value||n.placeholder||"")}),r},E9=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=`\`\`\`template\`\`\`
|
|
1086
|
+
${n.value||n.placeholder}\`\`\`
|
|
1087
|
+
\`\`\`
|
|
1088
|
+
`)}),r},S9=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if(n.text!==void 0)r+=n.text;else if(n.type==="template"){const o=n.key||n.fieldId||"",a=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",l=n.value||"",i=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${i}>${l}</template>`}}),r},R9=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var h,g,v,f,C,y,b,x,B,A,F,$,D,L,N,T,P,S,k,O,E,I,M,H,z,U,G,Y,ae,R,Z,V,K,X,Q,ee,se,re,oe,ge,ce,Ee,_e,Ue,de,be,Se,Ke,Fe,$e,rt,Xe;const a=ui(),l={theme:{colors:{primary:((h=a==null?void 0:a.colors)==null?void 0:h.primary)||"#055AFF",secondary:((g=a==null?void 0:a.colors)==null?void 0:g.secondary)||"#84ADFF",background:((v=a==null?void 0:a.colors)==null?void 0:v.background)||"#E5EEFF",text:((f=a==null?void 0:a.colors)==null?void 0:f.text)||"#055AFF",border:((C=a==null?void 0:a.colors)==null?void 0:C.border)||"#84ADFF",success:((y=a==null?void 0:a.colors)==null?void 0:y.success)||"#008000",warning:((b=a==null?void 0:a.colors)==null?void 0:b.warning)||"#FFA500",error:((x=a==null?void 0:a.colors)==null?void 0:x.error)||"#FF0000",info:((B=a==null?void 0:a.colors)==null?void 0:B.info)||"#0000FF",disabled:((A=a==null?void 0:a.colors)==null?void 0:A.disabled)||"#808080",disabledBackground:((F=a==null?void 0:a.colors)==null?void 0:F.disabledBackground)||"#F5F5F5",disabledText:(($=a==null?void 0:a.colors)==null?void 0:$.disabledText)||"#808080",shadow:((D=a==null?void 0:a.colors)==null?void 0:D.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((L=a==null?void 0:a.colors)==null?void 0:L.appBackground)||"transparent",listBackground:((N=a==null?void 0:a.colors)==null?void 0:N.listBackground)||"#f9f9f9",dashboardBackground:((T=a==null?void 0:a.colors)==null?void 0:T.dashboardBackground)||"#ffffff",textSecondary:((P=a==null?void 0:a.colors)==null?void 0:P.textSecondary)||"#6b7280"},space:{sidebar:((S=a==null?void 0:a.space)==null?void 0:S.sidebar)||"260px",size:((k=a==null?void 0:a.space)==null?void 0:k.size)||"12px",radius:((O=a==null?void 0:a.space)==null?void 0:O.radius)||"6px",padding:((E=a==null?void 0:a.space)==null?void 0:E.padding)||"16px",margin:((I=a==null?void 0:a.space)==null?void 0:I.margin)||"20px",shadow:((M=a==null?void 0:a.space)==null?void 0:M.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((H=a==null?void 0:a.space)==null?void 0:H.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((U=(z=a==null?void 0:a.fonts)==null?void 0:z.body)==null?void 0:U.size)||"14px",weight:((Y=(G=a==null?void 0:a.fonts)==null?void 0:G.body)==null?void 0:Y.weight)||"normal",family:((R=(ae=a==null?void 0:a.fonts)==null?void 0:ae.body)==null?void 0:R.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((V=(Z=a==null?void 0:a.fonts)==null?void 0:Z.heading)==null?void 0:V.size)||"16px",weight:((X=(K=a==null?void 0:a.fonts)==null?void 0:K.heading)==null?void 0:X.weight)||"600",family:((ee=(Q=a==null?void 0:a.fonts)==null?void 0:Q.heading)==null?void 0:ee.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((se=a==null?void 0:a.others)==null?void 0:se.baseFontWeight)||"normal"}},mode:(a==null?void 0:a.mode)||"light"},i={backgroundColor:((re=a==null?void 0:a.colors)==null?void 0:re.background)||"#E5EEFF",borderColor:((oe=a==null?void 0:a.colors)==null?void 0:oe.border)||"#84ADFF",borderRadius:((ge=a==null?void 0:a.space)==null?void 0:ge.radius)||"6px",padding:((ce=a==null?void 0:a.space)==null?void 0:ce.padding)||"8px 12px",margin:"2px",fontSize:((_e=(Ee=a==null?void 0:a.fonts)==null?void 0:Ee.body)==null?void 0:_e.size)||"14px",fontWeight:((de=(Ue=a==null?void 0:a.fonts)==null?void 0:Ue.body)==null?void 0:de.weight)||"500",minWidth:"30px",textColor:((be=a==null?void 0:a.colors)==null?void 0:be.text)||"#84ADFF"},u={...l,...n,theme:{...l.theme,...n==null?void 0:n.theme,colors:{...(Se=l.theme)==null?void 0:Se.colors,...(Ke=n==null?void 0:n.theme)==null?void 0:Ke.colors},space:{...(Fe=l.theme)==null?void 0:Fe.space,...($e=n==null?void 0:n.theme)==null?void 0:$e.space},fonts:{...(rt=l.theme)==null?void 0:rt.fonts,...(Xe=n==null?void 0:n.theme)==null?void 0:Xe.fonts}},templateField:{...i,...n==null?void 0:n.templateField}},[s,c]=ut(()=>wd(e));xt(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const je=wd(e);console.log("\u65B0\u7684Slate\u6570\u636E:",je),c(je)},[e]),xt(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",s)},[s]);const p=ze((je,Pe)=>{if(Pe===ii.SLATE&&je){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",je),c(je);const Ce=Sl(je);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Ce),t==null||t(Ce)}},[t]),d=ze(je=>{if(!s||s.length===0)return"";switch(je){case"pure_string":return D9(s);case"string":return Sl(s);case"markdown":return E9(s);case"html":return S9(s);default:return Sl(s)}},[s]);return xt(()=>{o==null||o(d)},[d,o]),j.jsx(yu,{dataSource:{type:ii.SLATE,content:s},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:p,size:"md",styles:u,enableTemplateInput:!0})};export{Rs as D,Hr as F,ia as I,Ks as T,O9 as W,N9 as _,ii as o,R9 as q};
|