@gientech/modual 2.1.38 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{GientechStreamReader-C8rYtUxB.js → GientechStreamReader-C5jijqVw.js} +57 -57
- package/assets/LeftOutlined-9XTSYGbi.js +1 -0
- package/assets/{index-Bg1CcQn9.js → index-B64Nj5uU.js} +1 -1
- package/assets/{index-B-AFa3n1.js → index-B872BsjL.js} +1 -1
- package/assets/{index-w1SriKuR.js → index-BIrUv1JE.js} +1 -1
- package/assets/index-Bk-pRt65.js +27 -0
- package/assets/{index-8h59dJlj.js → index-BvpN2hYX.js} +1 -1
- package/assets/{index-BdNcL3V6.js → index-BxR_BLxA.js} +1 -1
- package/assets/index-CkVpaVb6.js +1 -0
- package/assets/{index-DoUk2Ei_.js → index-D3Z0MZbL.js} +4 -4
- package/assets/{index-C6WKbL3A.js → index-DaM9Fbys.js} +3 -3
- package/assets/{index-CVis9Agw.js → index-SbYeytsI.js} +1 -1
- package/assets/index-hDlFWjNU.js +1969 -0
- package/assets/{index-CtPe9ln8.js → index-sWqCalkt.js} +152 -181
- package/assets/{plus-CnVxGdOo.js → plus-DDbDO7lA.js} +1 -1
- package/assets/search-BoBdGjgo.js +6 -0
- package/assets/style-DwfpZJI9.js +196 -0
- package/assets/style4.css +1 -1
- package/assets/{triangle-alert-BycMPaz2.js → triangle-alert-DF53kXdm.js} +1 -1
- package/assets/{x-CmbLQ9dc.js → x-DfdS1_QC.js} +1 -1
- package/assistantConfig.js +152 -1
- package/chat.d.ts +11 -1
- package/chat.js +1 -196
- package/chatCompare.js +1 -1
- package/database.js +1 -1
- package/databaseId.d.ts +1 -0
- package/databaseId.js +1 -1
- package/databaseTable.js +2 -2
- package/index.d.ts +301 -0
- package/index.js +1 -1
- package/modelManage.d.ts +124 -0
- package/modelManage.js +1 -1
- package/package.json +1 -1
- package/sensitive.d.ts +134 -2
- package/sensitive.js +205 -1
- package/streamFilesReader.js +1 -1
- package/assets/index-BN3yu4iN.js +0 -1
- package/assets/index-C9ax6WsW.js +0 -1995
- package/assets/index-pbEQPM5Z.js +0 -157
package/assets/index-C9ax6WsW.js
DELETED
|
@@ -1,1995 +0,0 @@
|
|
|
1
|
-
import*as C from"react";import _e,{useState as Ot,useCallback as St,useImperativeHandle as M0,forwardRef as No,useMemo as Ct,useRef as Lt,createContext as uo,useContext as $o,useEffect as er,createElement as ds,useLayoutEffect as X4,useReducer as Y4,Component as G4,memo as Z4}from"react";import Pu,{flushSync as J4,unstable_batchedUpdates as Q4,createPortal as e2}from"react-dom";import{R as rp,d as jo}from"./index-CtPe9ln8.js";import{aX as An,bB as t2,aB as np,K as Pr,a2 as op,bC as O0,bD as fs,M as gr,V as gt,f as rt,aW as ap,O as xt,X as Ne,bE as T0,bF as So,W as je,_ as zt,aZ as ip,p as so,U as Xn,N as sp,aC as co,bG as lp,bH as up,b0 as cp,a$ as dp,b1 as Va,t as js,A as R0,ad as Cn,ac as tn,n as fo,s as pa,T as hs,bI as r2,a4 as n2,y as Je,af as fp,bo as I0,h as mi,m as Wo,bJ as hp,bi as ps,i as P0,aJ as zu,r as gi,bc as gn,bK as o2,a3 as _s,aq as In,as as vi,bL as pp,bl as a2,bk as i2,bn as s2,bm as l2,j as u2,bj as qd,a1 as Wd,l as c2,k as d2,ax as Ls,am as z0,bM as f2,a5 as h2,bx as p2,bs as m2,L as ms,Z as g2,aG as v2,bN as b2,bO as y2,ay as x2,q as gs,u as w2,an as C2,bP as D2,Y as Ao,bQ as j0,a_ as _0,bR as Vd,bS as L0,bT as Ud,bU as Xd,Q as vs,bV as mp,a9 as bs,bW as E2,aS as Gt,bX as k2,w as S2,at as A2,b3 as B2,bY as F2,bZ as N2,E as gp,aQ as Yd,b_ as $2,G as M2,aN as O2,D as T2,J as R2,aK as I2,g as Hs}from"./index-8h59dJlj.js";import{R as ys,a as xs,S as vp,P as bp}from"./index-C6WKbL3A.js";import{S as P2}from"./index-CVis9Agw.js";function ju(e){return e!=null&&e===e.window}const z2=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return ju(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!ju(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 j2(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 _2(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),u=z2(a),l=Date.now(),f=()=>{const p=Date.now()-l,v=j2(p>o?o:p,u,e,o);ju(a)?a.scrollTo(window.pageXOffset,v):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=v:a.scrollTop=v,p<o?An(f):typeof n=="function"&&n()};An(f)}const L2=e=>{const[t,r]=Ot(null);return[St((o,a,u)=>{const l=t??o,f=Math.min(l||0,o),d=Math.max(l||0,o),p=a.slice(f,d+1).map(e),v=p.some(b=>!u.has(b)),g=[];return p.forEach(b=>{v?(u.has(b)||g.push(b),u.add(b)):(u.delete(b),g.push(b))}),r(v?d:null),g},[t]),r]};function H2(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 K2=(e,t)=>M0(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)}}):H2(n,r)}),q2=e=>{const t=C.useRef(e),[,r]=t2();return[()=>t.current,n=>{t.current=n,r()}]};var yp=function(t){if(np()&&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},W2=function(t,r){if(!yp(t))return!1;var n=document.createElement("div"),o=n.style[t];return n.style[t]=r,n.style[t]!==o};function V2(e,t){return!Array.isArray(e)&&t!==void 0?W2(e,t):yp(e)}var U2=Pr.ESC,X2=Pr.TAB;function Y2(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,u=C.useRef(!1),l=function(){if(t){var v,g;(v=r.current)===null||v===void 0||(g=v.focus)===null||g===void 0||g.call(v),n==null||n(!1)}},f=function(){var v;return(v=a.current)!==null&&v!==void 0&&v.focus?(a.current.focus(),u.current=!0,!0):!1},d=function(v){switch(v.keyCode){case U2:l();break;case X2:{var g=!1;u.current||(g=f()),g?v.preventDefault():l();break}}};C.useEffect(function(){return t?(window.addEventListener("keydown",d),o&&An(f,3),function(){window.removeEventListener("keydown",d),u.current=!1}):function(){u.current=!1}},[t])}var G2=No(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=Ct(function(){var l;return typeof r=="function"?l=r():l=r,l},[r]),u=op(t,O0(a));return _e.createElement(_e.Fragment,null,n&&_e.createElement("div",{className:"".concat(o,"-arrow")}),_e.cloneElement(a,{ref:fs(a)?u:void 0}))}),ea={adjustX:1,adjustY:1},ta=[0,0],Z2={topLeft:{points:["bl","tl"],overflow:ea,offset:[0,-4],targetOffset:ta},top:{points:["bc","tc"],overflow:ea,offset:[0,-4],targetOffset:ta},topRight:{points:["br","tr"],overflow:ea,offset:[0,-4],targetOffset:ta},bottomLeft:{points:["tl","bl"],overflow:ea,offset:[0,4],targetOffset:ta},bottom:{points:["tc","bc"],overflow:ea,offset:[0,4],targetOffset:ta},bottomRight:{points:["tr","br"],overflow:ea,offset:[0,4],targetOffset:ta}},J2=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Q2(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,u=a===void 0?"rc-dropdown":a,l=e.transitionName,f=e.animation,d=e.align,p=e.placement,v=p===void 0?"bottomLeft":p,g=e.placements,b=g===void 0?Z2:g,x=e.getPopupContainer,D=e.showAction,m=e.hideAction,S=e.overlayClassName,F=e.overlayStyle,B=e.visible,O=e.trigger,A=O===void 0?["hover"]:O,P=e.autoFocus,T=e.overlay,_=e.children,M=e.onVisibleChange,q=gr(e,J2),L=_e.useState(),Y=gt(L,2),V=Y[0],z=Y[1],K="visible"in e?B:V,X=_e.useRef(null),W=_e.useRef(null),J=_e.useRef(null);_e.useImperativeHandle(t,function(){return X.current});var R=function(se){z(se),M==null||M(se)};Y2({visible:K,triggerRef:J,onVisibleChange:R,autoFocus:P,overlayRef:W});var ie=function(se){var te=e.onOverlayClick;z(!1),te&&te(se)},me=function(){return _e.createElement(G2,{ref:W,overlay:T,prefixCls:u,arrow:o})},xe=function(){return typeof T=="function"?me:me()},ge=function(){var se=e.minOverlayWidthMatchTrigger,te=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?se:!te},ae=function(){var se=e.openClassName;return se!==void 0?se:"".concat(u,"-open")},ke=_e.cloneElement(_,{className:rt((r=_.props)===null||r===void 0?void 0:r.className,K&&ae()),ref:fs(_)?op(J,O0(_)):void 0}),Z=m;return!Z&&A.indexOf("contextMenu")!==-1&&(Z=["click"]),_e.createElement(ap,xt({builtinPlacements:b},q,{prefixCls:u,ref:X,popupClassName:rt(S,Ne({},"".concat(u,"-show-arrow"),o)),popupStyle:F,action:A,showAction:D,hideAction:Z,popupPlacement:v,popupAlign:d,popupTransitionName:l,popupAnimation:f,popupVisible:K,stretch:ge()?"minWidth":"",popup:xe(),onPopupVisibleChange:R,onPopupClick:ie,getPopupContainer:x}),ke)}const e3=_e.forwardRef(Q2),t3=e=>typeof e!="object"&&typeof e!="function"||e===null;var xp=C.createContext(null);function wp(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function Cp(e){var t=C.useContext(xp);return wp(t,e)}var r3=["children","locked"],Pn=C.createContext(null);function n3(e,t){var r=je({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function ti(e){var t=e.children,r=e.locked,n=gr(e,r3),o=C.useContext(Pn),a=T0(function(){return n3(o,n)},[o,n],function(u,l){return!r&&(u[0]!==l[0]||!So(u[1],l[1],!0))});return C.createElement(Pn.Provider,{value:a},t)}var o3=[],Dp=C.createContext(null);function Ks(){return C.useContext(Dp)}var Ep=C.createContext(o3);function Da(e){var t=C.useContext(Ep);return C.useMemo(function(){return e!==void 0?[].concat(zt(t),[e]):t},[t,e])}var kp=C.createContext(null),H0=C.createContext({});function Gd(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(ip(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),u=null;return o&&!Number.isNaN(a)?u=a:n&&u===null&&(u=0),n&&e.disabled&&(u=null),u!==null&&(u>=0||t&&u<0)}return!1}function a3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=zt(e.querySelectorAll("*")).filter(function(n){return Gd(n,t)});return Gd(e,t)&&r.unshift(e),r}var _u=Pr.LEFT,Lu=Pr.RIGHT,Hu=Pr.UP,Zi=Pr.DOWN,Ji=Pr.ENTER,Sp=Pr.ESC,Ra=Pr.HOME,Ia=Pr.END,Zd=[Hu,Zi,_u,Lu];function i3(e,t,r,n){var o,a="prev",u="next",l="children",f="parent";if(e==="inline"&&n===Ji)return{inlineTrigger:!0};var d=Ne(Ne({},Hu,a),Zi,u),p=Ne(Ne(Ne(Ne({},_u,r?u:a),Lu,r?a:u),Zi,l),Ji,l),v=Ne(Ne(Ne(Ne(Ne(Ne({},Hu,a),Zi,u),Ji,l),Sp,f),_u,r?l:f),Lu,r?f:l),g={inline:d,horizontal:p,vertical:v,inlineSub:d,horizontalSub:v,verticalSub:v},b=(o=g["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(b){case a:return{offset:-1,sibling:!0};case u:return{offset:1,sibling:!0};case f:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function s3(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function l3(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function K0(e,t){var r=a3(e,!0);return r.filter(function(n){return t.has(n)})}function Jd(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=K0(e,t),a=o.length,u=o.findIndex(function(l){return r===l});return n<0?u===-1?u=a-1:u-=1:n>0&&(u+=1),u=(u+a)%a,o[u]}var Ku=function(t,r){var n=new Set,o=new Map,a=new Map;return t.forEach(function(u){var l=document.querySelector("[data-menu-id='".concat(wp(r,u),"']"));l&&(n.add(l),a.set(l,u),o.set(u,l))}),{elements:n,key2element:o,element2key:a}};function u3(e,t,r,n,o,a,u,l,f,d){var p=C.useRef(),v=C.useRef();v.current=t;var g=function(){An.cancel(p.current)};return C.useEffect(function(){return function(){g()}},[]),function(b){var x=b.which;if([].concat(Zd,[Ji,Sp,Ra,Ia]).includes(x)){var D=a(),m=Ku(D,n),S=m,F=S.elements,B=S.key2element,O=S.element2key,A=B.get(t),P=l3(A,F),T=O.get(P),_=i3(e,u(T,!0).length===1,r,x);if(!_&&x!==Ra&&x!==Ia)return;(Zd.includes(x)||[Ra,Ia].includes(x))&&b.preventDefault();var M=function(W){if(W){var J=W,R=W.querySelector("a");R!=null&&R.getAttribute("href")&&(J=R);var ie=O.get(W);l(ie),g(),p.current=An(function(){v.current===ie&&J.focus()})}};if([Ra,Ia].includes(x)||_.sibling||!P){var q;!P||e==="inline"?q=o.current:q=s3(P);var L,Y=K0(q,F);x===Ra?L=Y[0]:x===Ia?L=Y[Y.length-1]:L=Jd(q,F,P,_.offset),M(L)}else if(_.inlineTrigger)f(T);else if(_.offset>0)f(T,!0),g(),p.current=An(function(){m=Ku(D,n);var X=P.getAttribute("aria-controls"),W=document.getElementById(X),J=Jd(W,m.elements);M(J)},5);else if(_.offset<0){var V=u(T,!0),z=V[V.length-2],K=B.get(z);f(z,!1),M(K)}}d==null||d(b)}}function c3(e){Promise.resolve().then(e)}var q0="__RC_UTIL_PATH_SPLIT__",Qd=function(t){return t.join(q0)},d3=function(t){return t.split(q0)},qu="rc-menu-more";function f3(){var e=C.useState({}),t=gt(e,2),r=t[1],n=Lt(new Map),o=Lt(new Map),a=C.useState([]),u=gt(a,2),l=u[0],f=u[1],d=Lt(0),p=Lt(!1),v=function(){p.current||r({})},g=St(function(B,O){var A=Qd(O);o.current.set(A,B),n.current.set(B,A),d.current+=1;var P=d.current;c3(function(){P===d.current&&v()})},[]),b=St(function(B,O){var A=Qd(O);o.current.delete(A),n.current.delete(B)},[]),x=St(function(B){f(B)},[]),D=St(function(B,O){var A=n.current.get(B)||"",P=d3(A);return O&&l.includes(P[0])&&P.unshift(qu),P},[l]),m=St(function(B,O){return B.filter(function(A){return A!==void 0}).some(function(A){var P=D(A,!0);return P.includes(O)})},[D]),S=function(){var O=zt(n.current.keys());return l.length&&O.push(qu),O},F=St(function(B){var O="".concat(n.current.get(B)).concat(q0),A=new Set;return zt(o.current.keys()).forEach(function(P){P.startsWith(O)&&A.add(o.current.get(P))}),A},[]);return C.useEffect(function(){return function(){p.current=!0}},[]),{registerPath:g,unregisterPath:b,refreshOverflowKeys:x,isSubPathKey:m,getKeyPath:D,getKeys:S,getSubPathKeys:F}}function La(e){var t=C.useRef(e);t.current=e;var r=C.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var h3=Math.random().toFixed(5).toString().slice(2),ef=0;function p3(e){var t=so(e,{value:e}),r=gt(t,2),n=r[0],o=r[1];return C.useEffect(function(){ef+=1;var a="".concat(h3,"-").concat(ef);o("rc-menu-uuid-".concat(a))},[]),n}function Ap(e,t,r,n){var o=C.useContext(Pn),a=o.activeKey,u=o.onActive,l=o.onInactive,f={active:a===e};return t||(f.onMouseEnter=function(d){r==null||r({key:e,domEvent:d}),u(e)},f.onMouseLeave=function(d){n==null||n({key:e,domEvent:d}),l(e)}),f}function Bp(e){var t=C.useContext(Pn),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 Fp(e){var t=e.icon,r=e.props,n=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=C.createElement(t,je({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var m3=["item"];function ws(e){var t=e.item,r=gr(e,m3);return Object.defineProperty(r,"item",{get:function(){return Xn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var g3=["title","attribute","elementRef"],v3=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],b3=["active"],y3=(function(e){lp(r,e);var t=up(r);function r(){return cp(this,r),t.apply(this,arguments)}return dp(r,[{key:"render",value:function(){var o=this.props,a=o.title,u=o.attribute,l=o.elementRef,f=gr(o,g3),d=co(f,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Xn(!u,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),C.createElement(Va.Item,xt({},u,{title:typeof a=="string"?a:void 0},d,{ref:l}))}}]),r})(C.Component),x3=C.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.eventKey;e.warnKey;var a=e.disabled,u=e.itemIcon,l=e.children,f=e.role,d=e.onMouseEnter,p=e.onMouseLeave,v=e.onClick,g=e.onKeyDown,b=e.onFocus,x=gr(e,v3),D=Cp(o),m=C.useContext(Pn),S=m.prefixCls,F=m.onItemClick,B=m.disabled,O=m.overflowDisabled,A=m.itemIcon,P=m.selectedKeys,T=m.onActive,_=C.useContext(H0),M=_._internalRenderMenuItem,q="".concat(S,"-item"),L=C.useRef(),Y=C.useRef(),V=B||a,z=sp(t,Y),K=Da(o),X=function(te){return{key:o,keyPath:zt(K).reverse(),item:L.current,domEvent:te}},W=u||A,J=Ap(o,V,d,p),R=J.active,ie=gr(J,b3),me=P.includes(o),xe=Bp(K.length),ge=function(te){if(!V){var ce=X(te);v==null||v(ws(ce)),F(ce)}},ae=function(te){if(g==null||g(te),te.which===Pr.ENTER){var ce=X(te);v==null||v(ws(ce)),F(ce)}},ke=function(te){T(o),b==null||b(te)},Z={};e.role==="option"&&(Z["aria-selected"]=me);var he=C.createElement(y3,xt({ref:L,elementRef:z,role:f===null?"none":f||"menuitem",tabIndex:a?null:-1,"data-menu-id":O&&D?null:D},co(x,["extra"]),ie,Z,{component:"li","aria-disabled":a,style:je(je({},xe),r),className:rt(q,Ne(Ne(Ne({},"".concat(q,"-active"),R),"".concat(q,"-selected"),me),"".concat(q,"-disabled"),V),n),onClick:ge,onKeyDown:ae,onFocus:ke}),l,C.createElement(Fp,{props:je(je({},e),{},{isSelected:me}),icon:W}));return M&&(he=M(he,e,{selected:me})),he});function w3(e,t){var r=e.eventKey,n=Ks(),o=Da(r);return C.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:C.createElement(x3,xt({},e,{ref:t}))}const qs=C.forwardRef(w3);var C3=["className","children"],D3=function(t,r){var n=t.className,o=t.children,a=gr(t,C3),u=C.useContext(Pn),l=u.prefixCls,f=u.mode,d=u.rtl;return C.createElement("ul",xt({className:rt(l,d&&"".concat(l,"-rtl"),"".concat(l,"-sub"),"".concat(l,"-").concat(f==="inline"?"inline":"vertical"),n),role:"menu"},a,{"data-menu-list":!0,ref:r}),o)},W0=C.forwardRef(D3);W0.displayName="SubMenuList";function V0(e,t){return js(e).map(function(r,n){if(C.isValidElement(r)){var o,a,u=r.key,l=(o=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&o!==void 0?o:u,f=l==null;f&&(l="tmp_key-".concat([].concat(zt(t),[n]).join("-")));var d={key:l,eventKey:l};return C.cloneElement(r,d)}return r})}var Qr={adjustX:1,adjustY:1},E3={topLeft:{points:["bl","tl"],overflow:Qr},topRight:{points:["br","tr"],overflow:Qr},bottomLeft:{points:["tl","bl"],overflow:Qr},bottomRight:{points:["tr","br"],overflow:Qr},leftTop:{points:["tr","tl"],overflow:Qr},leftBottom:{points:["br","bl"],overflow:Qr},rightTop:{points:["tl","tr"],overflow:Qr},rightBottom:{points:["bl","br"],overflow:Qr}},k3={topLeft:{points:["bl","tl"],overflow:Qr},topRight:{points:["br","tr"],overflow:Qr},bottomLeft:{points:["tl","bl"],overflow:Qr},bottomRight:{points:["tr","br"],overflow:Qr},rightTop:{points:["tr","tl"],overflow:Qr},rightBottom:{points:["br","bl"],overflow:Qr},leftTop:{points:["tl","tr"],overflow:Qr},leftBottom:{points:["bl","br"],overflow:Qr}};function Np(e,t,r){if(t)return t;if(r)return r[e]||r.other}var S3={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function A3(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,u=e.popupClassName,l=e.popupOffset,f=e.disabled,d=e.mode,p=e.onVisibleChange,v=C.useContext(Pn),g=v.getPopupContainer,b=v.rtl,x=v.subMenuOpenDelay,D=v.subMenuCloseDelay,m=v.builtinPlacements,S=v.triggerSubMenuAction,F=v.forceSubMenuRender,B=v.rootClassName,O=v.motion,A=v.defaultMotions,P=C.useState(!1),T=gt(P,2),_=T[0],M=T[1],q=b?je(je({},k3),m):je(je({},E3),m),L=S3[d],Y=Np(d,O,A),V=C.useRef(Y);d!=="inline"&&(V.current=Y);var z=je(je({},V.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),K=C.useRef();return C.useEffect(function(){return K.current=An(function(){M(r)}),function(){An.cancel(K.current)}},[r]),C.createElement(ap,{prefixCls:t,popupClassName:rt("".concat(t,"-popup"),Ne({},"".concat(t,"-rtl"),b),u,B),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:q,popupPlacement:L,popupVisible:_,popup:o,popupStyle:a,popupAlign:l&&{offset:l},action:f?[]:[S],mouseEnterDelay:x,mouseLeaveDelay:D,onPopupVisibleChange:p,forceRender:F,popupMotion:z,fresh:!0},n)}function B3(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",u=C.useContext(Pn),l=u.prefixCls,f=u.forceSubMenuRender,d=u.motion,p=u.defaultMotions,v=u.mode,g=C.useRef(!1);g.current=v===a;var b=C.useState(!g.current),x=gt(b,2),D=x[0],m=x[1],S=g.current?r:!1;C.useEffect(function(){g.current&&m(!1)},[v]);var F=je({},Np(a,d,p));n.length>1&&(F.motionAppear=!1);var B=F.onVisibleChanged;return F.onVisibleChanged=function(O){return!g.current&&!O&&m(!0),B==null?void 0:B(O)},D?null:C.createElement(ti,{mode:a,locked:!g.current},C.createElement(R0,xt({visible:S},F,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),function(O){var A=O.className,P=O.style;return C.createElement(W0,{id:t,className:A,style:P},o)}))}var F3=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],N3=["active"],$3=C.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.title,a=e.eventKey;e.warnKey;var u=e.disabled,l=e.internalPopupClose,f=e.children,d=e.itemIcon,p=e.expandIcon,v=e.popupClassName,g=e.popupOffset,b=e.popupStyle,x=e.onClick,D=e.onMouseEnter,m=e.onMouseLeave,S=e.onTitleClick,F=e.onTitleMouseEnter,B=e.onTitleMouseLeave,O=gr(e,F3),A=Cp(a),P=C.useContext(Pn),T=P.prefixCls,_=P.mode,M=P.openKeys,q=P.disabled,L=P.overflowDisabled,Y=P.activeKey,V=P.selectedKeys,z=P.itemIcon,K=P.expandIcon,X=P.onItemClick,W=P.onOpenChange,J=P.onActive,R=C.useContext(H0),ie=R._internalRenderSubMenuItem,me=C.useContext(kp),xe=me.isSubPathKey,ge=Da(),ae="".concat(T,"-submenu"),ke=q||u,Z=C.useRef(),he=C.useRef(),se=d??z,te=p??K,ce=M.includes(a),Ce=!L&&ce,we=xe(V,a),Se=Ap(a,ke,F,B),Ee=Se.active,Ae=gr(Se,N3),$e=C.useState(!1),Te=gt($e,2),He=Te[0],pt=Te[1],at=function(Et){ke||pt(Et)},Me=function(Et){at(!0),D==null||D({key:a,domEvent:Et})},Le=function(Et){at(!1),m==null||m({key:a,domEvent:Et})},Xe=C.useMemo(function(){return Ee||(_!=="inline"?He||xe([Y],a):!1)},[_,Ee,Y,He,a,xe]),ft=Bp(ge.length),it=function(Et){ke||(S==null||S({key:a,domEvent:Et}),_==="inline"&&W(a,!ce))},et=La(function(Ft){x==null||x(ws(Ft)),X(Ft)}),$t=function(Et){_!=="inline"&&W(a,Et)},Dt=function(){J(a)},vt=A&&"".concat(A,"-popup"),ht=C.useMemo(function(){return C.createElement(Fp,{icon:_!=="horizontal"?te:void 0,props:je(je({},e),{},{isOpen:Ce,isSubMenu:!0})},C.createElement("i",{className:"".concat(ae,"-arrow")}))},[_,te,e,Ce,ae]),Pe=C.createElement("div",xt({role:"menuitem",style:ft,className:"".concat(ae,"-title"),tabIndex:ke?null:-1,ref:Z,title:typeof o=="string"?o:null,"data-menu-id":L&&A?null:A,"aria-expanded":Ce,"aria-haspopup":!0,"aria-controls":vt,"aria-disabled":ke,onClick:it,onFocus:Dt},Ae),o,ht),de=C.useRef(_);if(_!=="inline"&&ge.length>1?de.current="vertical":de.current=_,!L){var bt=de.current;Pe=C.createElement(A3,{mode:bt,prefixCls:ae,visible:!l&&Ce&&_!=="inline",popupClassName:v,popupOffset:g,popupStyle:b,popup:C.createElement(ti,{mode:bt==="horizontal"?"vertical":bt},C.createElement(W0,{id:vt,ref:he},f)),disabled:ke,onVisibleChange:$t},Pe)}var kt=C.createElement(Va.Item,xt({ref:t,role:"none"},O,{component:"li",style:r,className:rt(ae,"".concat(ae,"-").concat(_),n,Ne(Ne(Ne(Ne({},"".concat(ae,"-open"),Ce),"".concat(ae,"-active"),Xe),"".concat(ae,"-selected"),we),"".concat(ae,"-disabled"),ke)),onMouseEnter:Me,onMouseLeave:Le}),Pe,!L&&C.createElement(B3,{id:vt,open:Ce,keyPath:ge},f));return ie&&(kt=ie(kt,e,{selected:we,active:Xe,open:Ce,disabled:ke})),C.createElement(ti,{onItemClick:et,mode:_==="horizontal"?"vertical":_,itemIcon:se,expandIcon:te},kt)}),Ws=C.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=Da(r),a=V0(n,o),u=Ks();C.useEffect(function(){if(u)return u.registerPath(r,o),function(){u.unregisterPath(r,o)}},[o]);var l;return u?l=a:l=C.createElement($3,xt({ref:t},e),a),C.createElement(Ep.Provider,{value:o},l)});function U0(e){var t=e.className,r=e.style,n=C.useContext(Pn),o=n.prefixCls,a=Ks();return a?null:C.createElement("li",{role:"separator",className:rt("".concat(o,"-item-divider"),t),style:r})}var M3=["className","title","eventKey","children"],O3=C.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var o=e.children,a=gr(e,M3),u=C.useContext(Pn),l=u.prefixCls,f="".concat(l,"-item-group");return C.createElement("li",xt({ref:t,role:"presentation"},a,{onClick:function(p){return p.stopPropagation()},className:rt(f,r)}),C.createElement("div",{role:"presentation",className:"".concat(f,"-title"),title:typeof n=="string"?n:void 0},n),C.createElement("ul",{role:"group",className:"".concat(f,"-list")},o))}),X0=C.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=Da(r),a=V0(n,o),u=Ks();return u?a:C.createElement(O3,xt({ref:t},co(e,["warnKey"])),a)}),T3=["label","children","key","type","extra"];function Wu(e,t,r){var n=t.item,o=t.group,a=t.submenu,u=t.divider;return(e||[]).map(function(l,f){if(l&&Cn(l)==="object"){var d=l,p=d.label,v=d.children,g=d.key,b=d.type,x=d.extra,D=gr(d,T3),m=g??"tmp-".concat(f);return v||b==="group"?b==="group"?C.createElement(o,xt({key:m},D,{title:p}),Wu(v,t,r)):C.createElement(a,xt({key:m},D,{title:p}),Wu(v,t,r)):b==="divider"?C.createElement(u,xt({key:m},D)):C.createElement(n,xt({key:m},D,{extra:x}),p,(!!x||x===0)&&C.createElement("span",{className:"".concat(r,"-item-extra")},x))}return null}).filter(function(l){return l})}function tf(e,t,r,n,o){var a=e,u=je({divider:U0,item:qs,group:X0,submenu:Ws},n);return t&&(a=Wu(t,u,o)),V0(a,r)}var R3=["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"],To=[],I3=C.forwardRef(function(e,t){var r,n=e,o=n.prefixCls,a=o===void 0?"rc-menu":o,u=n.rootClassName,l=n.style,f=n.className,d=n.tabIndex,p=d===void 0?0:d,v=n.items,g=n.children,b=n.direction,x=n.id,D=n.mode,m=D===void 0?"vertical":D,S=n.inlineCollapsed,F=n.disabled,B=n.disabledOverflow,O=n.subMenuOpenDelay,A=O===void 0?.1:O,P=n.subMenuCloseDelay,T=P===void 0?.1:P,_=n.forceSubMenuRender,M=n.defaultOpenKeys,q=n.openKeys,L=n.activeKey,Y=n.defaultActiveFirst,V=n.selectable,z=V===void 0?!0:V,K=n.multiple,X=K===void 0?!1:K,W=n.defaultSelectedKeys,J=n.selectedKeys,R=n.onSelect,ie=n.onDeselect,me=n.inlineIndent,xe=me===void 0?24:me,ge=n.motion,ae=n.defaultMotions,ke=n.triggerSubMenuAction,Z=ke===void 0?"hover":ke,he=n.builtinPlacements,se=n.itemIcon,te=n.expandIcon,ce=n.overflowedIndicator,Ce=ce===void 0?"...":ce,we=n.overflowedIndicatorPopupClassName,Se=n.getPopupContainer,Ee=n.onClick,Ae=n.onOpenChange,$e=n.onKeyDown;n.openAnimation,n.openTransitionName;var Te=n._internalRenderMenuItem,He=n._internalRenderSubMenuItem,pt=n._internalComponents,at=gr(n,R3),Me=C.useMemo(function(){return[tf(g,v,To,pt,a),tf(g,v,To,{},a)]},[g,v,pt]),Le=gt(Me,2),Xe=Le[0],ft=Le[1],it=C.useState(!1),et=gt(it,2),$t=et[0],Dt=et[1],vt=C.useRef(),ht=p3(x),Pe=b==="rtl",de=so(M,{value:q,postState:function(Qt){return Qt||To}}),bt=gt(de,2),kt=bt[0],Ft=bt[1],Et=function(Qt){var cr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Vr(){Ft(Qt),Ae==null||Ae(Qt)}cr?J4(Vr):Vr()},or=C.useState(kt),At=gt(or,2),Rt=At[0],tr=At[1],ur=C.useRef(!1),Bt=C.useMemo(function(){return(m==="inline"||m==="vertical")&&S?["vertical",S]:[m,!1]},[m,S]),Ht=gt(Bt,2),jt=Ht[0],Cr=Ht[1],zr=jt==="inline",jr=C.useState(jt),Tr=gt(jr,2),vr=Tr[0],pr=Tr[1],_t=C.useState(Cr),w=gt(_t,2),E=w[0],Ie=w[1];C.useEffect(function(){pr(jt),Ie(Cr),ur.current&&(zr?Ft(Rt):Et(To))},[jt,Cr]);var $=C.useState(0),Q=gt($,2),Zt=Q[0],nt=Q[1],Ke=Zt>=Xe.length-1||vr!=="horizontal"||B;C.useEffect(function(){zr&&tr(kt)},[kt]),C.useEffect(function(){return ur.current=!0,function(){ur.current=!1}},[]);var wt=f3(),tt=wt.registerPath,Mt=wt.unregisterPath,ar=wt.refreshOverflowKeys,$r=wt.isSubPathKey,ee=wt.getKeyPath,br=wt.getKeys,oe=wt.getSubPathKeys,ue=C.useMemo(function(){return{registerPath:tt,unregisterPath:Mt}},[tt,Mt]),Oe=C.useMemo(function(){return{isSubPathKey:$r}},[$r]);C.useEffect(function(){ar(Ke?To:Xe.slice(Zt+1).map(function(yr){return yr.key}))},[Zt,Ke]);var st=so(L||Y&&((r=Xe[0])===null||r===void 0?void 0:r.key),{value:L}),ze=gt(st,2),le=ze[0],Ye=ze[1],Ue=La(function(yr){Ye(yr)}),ut=La(function(){Ye(void 0)});M0(t,function(){return{list:vt.current,focus:function(Qt){var cr,Vr=br(),_r=Ku(Vr,ht),Yn=_r.elements,Oo=_r.key2element,Gn=_r.element2key,Zn=K0(vt.current,Yn),po=le??(Zn[0]?Gn.get(Zn[0]):(cr=Xe.find(function(Nn){return!Nn.props.disabled}))===null||cr===void 0?void 0:cr.key),be=Oo.get(po);if(po&&be){var dr;be==null||(dr=be.focus)===null||dr===void 0||dr.call(be,Qt)}}}});var fe=so(W||[],{value:J,postState:function(Qt){return Array.isArray(Qt)?Qt:Qt==null?To:[Qt]}}),De=gt(fe,2),ve=De[0],qe=De[1],ct=function(Qt){if(z){var cr=Qt.key,Vr=ve.includes(cr),_r;X?Vr?_r=ve.filter(function(Oo){return Oo!==cr}):_r=[].concat(zt(ve),[cr]):_r=[cr],qe(_r);var Yn=je(je({},Qt),{},{selectedKeys:_r});Vr?ie==null||ie(Yn):R==null||R(Yn)}!X&&kt.length&&vr!=="inline"&&Et(To)},Vt=La(function(yr){Ee==null||Ee(ws(yr)),ct(yr)}),Tt=La(function(yr,Qt){var cr=kt.filter(function(_r){return _r!==yr});if(Qt)cr.push(yr);else if(vr!=="inline"){var Vr=oe(yr);cr=cr.filter(function(_r){return!Vr.has(_r)})}So(kt,cr,!0)||Et(cr,!0)}),dt=function(Qt,cr){var Vr=cr??!kt.includes(Qt);Tt(Qt,Vr)},qt=u3(vr,le,Pe,ht,vt,br,ee,Ye,dt,$e);C.useEffect(function(){Dt(!0)},[]);var Jr=C.useMemo(function(){return{_internalRenderMenuItem:Te,_internalRenderSubMenuItem:He}},[Te,He]),Ar=vr!=="horizontal"||B?Xe:Xe.map(function(yr,Qt){return C.createElement(ti,{key:yr.key,overflowDisabled:Qt>Zt},yr)}),dn=C.createElement(Va,xt({id:x,ref:vt,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:qs,className:rt(a,"".concat(a,"-root"),"".concat(a,"-").concat(vr),f,Ne(Ne({},"".concat(a,"-inline-collapsed"),E),"".concat(a,"-rtl"),Pe),u),dir:b,style:l,role:"menu",tabIndex:p,data:Ar,renderRawItem:function(Qt){return Qt},renderRawRest:function(Qt){var cr=Qt.length,Vr=cr?Xe.slice(-cr):null;return C.createElement(Ws,{eventKey:qu,title:Ce,disabled:Ke,internalPopupClose:cr===0,popupClassName:we},Vr)},maxCount:vr!=="horizontal"||B?Va.INVALIDATE:Va.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Qt){nt(Qt)},onKeyDown:qt},at));return C.createElement(H0.Provider,{value:Jr},C.createElement(xp.Provider,{value:ht},C.createElement(ti,{prefixCls:a,rootClassName:u,mode:vr,openKeys:kt,rtl:Pe,disabled:F,motion:$t?ge:null,defaultMotions:$t?ae:null,activeKey:le,onActive:Ue,onInactive:ut,selectedKeys:ve,inlineIndent:xe,subMenuOpenDelay:A,subMenuCloseDelay:T,forceSubMenuRender:_,builtinPlacements:he,triggerSubMenuAction:Z,getPopupContainer:Se,itemIcon:se,expandIcon:te,onItemClick:Vt,onOpenChange:Tt},C.createElement(kp.Provider,{value:Oe},dn),C.createElement("div",{style:{display:"none"},"aria-hidden":!0},C.createElement(Dp.Provider,{value:ue},ft)))))}),bi=I3;bi.Item=qs;bi.SubMenu=Ws;bi.ItemGroup=X0;bi.Divider=U0;const $p=C.createContext({});var P3={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"},z3=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:P3}))},Mp=C.forwardRef(z3);const Cs=uo({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var j3=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 Op=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=j3(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=C.useContext(fo),u=a("menu",t),l=rt({[`${u}-item-divider-dashed`]:!!n},r);return C.createElement(U0,Object.assign({className:l},o))},Tp=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:u,extra:l}=e,{prefixCls:f,firstLevel:d,direction:p,disableMenuItemTitleTooltip:v,inlineCollapsed:g}=C.useContext(Cs),b=B=>{const O=n==null?void 0:n[0],A=C.createElement("span",{className:rt(`${f}-title-content`,{[`${f}-title-content-with-extra`]:!!l||l===0})},n);return(!o||C.isValidElement(n)&&n.type==="span")&&n&&B&&d&&typeof O=="string"?C.createElement("div",{className:`${f}-inline-collapsed-noicon`},O.charAt(0)):A},{siderCollapsed:x}=C.useContext($p);let D=a;typeof a>"u"?D=d?n:"":a===!1&&(D="");const m={title:D};!x&&!g&&(m.title=null,m.open=!1);const S=js(n).length;let F=C.createElement(qs,Object.assign({},co(e,["title","icon","danger"]),{className:rt({[`${f}-item-danger`]:u,[`${f}-item-only-child`]:(o?S+1:S)===1},r),title:typeof a=="string"?a:void 0}),pa(o,{className:rt(C.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${f}-item-icon`)}),b(g));return v||(F=C.createElement(hs,Object.assign({},m,{placement:p==="rtl"?"left":"right",classNames:{root:`${f}-inline-collapsed-tooltip`}}),F)),F};var _3=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 Ds=C.createContext(null),Rp=C.forwardRef((e,t)=>{const{children:r}=e,n=_3(e,["children"]),o=C.useContext(Ds),a=C.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),u=r2(r),l=sp(t,u?O0(r):null);return C.createElement(Ds.Provider,{value:a},C.createElement(n2,{space:!0},u?C.cloneElement(r,{ref:l}):r))}),L3=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:a,lineType:u,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${Je(a)} ${u} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${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"}}}},H3=({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(${Je(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Je(t)})`}}}}),rf=e=>fp(e),nf=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:u,itemBg:l,subMenuItemBg:f,itemSelectedBg:d,activeBarHeight:p,activeBarWidth:v,activeBarBorderWidth:g,motionDurationSlow:b,motionEaseInOut:x,motionEaseOut:D,itemPaddingInline:m,motionDurationMid:S,itemHoverColor:F,lineType:B,colorSplit:O,itemDisabledColor:A,dangerItemColor:P,dangerItemHoverColor:T,dangerItemSelectedColor:_,dangerItemActiveBg:M,dangerItemSelectedBg:q,popupBg:L,itemHoverBg:Y,itemActiveBg:V,menuSubMenuBg:z,horizontalItemSelectedColor:K,horizontalItemSelectedBg:X,horizontalItemBorderRadius:W,horizontalItemHoverBg:J}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:l,[`&${r}-root:focus-visible`]:Object.assign({},rf(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:u}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:a},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},rf(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${A} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:F}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:Y},"&:active":{backgroundColor:V}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:Y},"&:active":{backgroundColor:V}}},[`${r}-item-danger`]:{color:P,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:T}},[`&${r}-item:active`]:{background:M}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:_},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:d,[`&${r}-item-danger`]:{backgroundColor:q}},[`&${r}-submenu > ${r}`]:{backgroundColor:z},[`&${r}-popup > ${r}`]:{backgroundColor:L},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:L},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:W,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${Je(p)} solid transparent`,transition:`border-color ${b} ${x}`,content:'""'},"&:hover, &-active, &-open":{background:J,"&::after":{borderBottomWidth:p,borderBottomColor:K}},"&-selected":{color:K,backgroundColor:X,"&:hover":{backgroundColor:X},"&::after":{borderBottomWidth:p,borderBottomColor:K}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${Je(g)} ${B} ${O}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:f},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Je(v)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${S} ${D}`,`opacity ${S} ${D}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:_}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${S} ${x}`,`opacity ${S} ${x}`].join(",")}}}}}},of=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:u,itemMarginBlock:l,itemWidth:f,itemPaddingInline:d}=e,p=e.calc(a).add(o).add(u).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:Je(r),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:l,width:f},[`> ${t}-item,
|
|
5
|
-
> ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:Je(r)},[`${t}-item-group-list ${t}-submenu-title,
|
|
6
|
-
${t}-submenu-title`]:{paddingInlineEnd:p}}},K3=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:u,motionEaseOut:l,paddingXL:f,itemMarginInline:d,fontSizeLG:p,motionDurationFast:v,motionDurationSlow:g,paddingXS:b,boxShadowSecondary:x,collapsedWidth:D,collapsedIconSize:m}=e,S={height:n,lineHeight:Je(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},of(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},of(e)),{boxShadow:x})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${Je(e.calc(u).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 ${g}`,`background ${g}`,`padding ${v} ${l}`].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`]:S,[`& ${t}-item-group-title`]:{paddingInlineStart:f}},[`${t}-item`]:S}},{[`${t}-inline-collapsed`]:{width:D,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:p,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% - ${Je(e.calc(m).div(2).equal())} - ${Je(d)})`,textOverflow:"clip",[`
|
|
10
|
-
${t}-submenu-arrow,
|
|
11
|
-
${t}-submenu-expand-icon
|
|
12
|
-
`]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:m,lineHeight:Je(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({},I0),{paddingInline:b})}}]},af=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:u,iconSize:l,iconMarginInlineEnd:f}=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, ${u}`]:{minWidth:l,fontSize:l,transition:[`font-size ${n} ${a}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:f,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},o2()),[`&${t}-item-only-child`]:{[`> ${u}, > ${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"}}}},sf=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:a,menuArrowOffset:u}=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(${Je(e.calc(u).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Je(u)})`}}}}},q3=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:u,paddingXS:l,padding:f,colorSplit:d,lineWidth:p,zIndexPopup:v,borderRadiusLG:g,subMenuItemBorderRadius:b,menuArrowSize:x,menuArrowOffset:D,lineType:m,groupTitleLineHeight:S,groupTitleFontSize:F}=e;return[{"":{[r]:Object.assign(Object.assign({},zu()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},gi(e)),zu()),{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:`${Je(l)} ${Je(f)}`,fontSize:F,lineHeight:S,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${o} ${u}`,`background ${o} ${u}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o} ${u}`,`background ${o} ${u}`,`padding ${a} ${u}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${o} ${u}`,`padding ${o} ${u}`].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:d,borderStyle:m,borderWidth:0,borderTopWidth:p,marginBlock:p,padding:0,"&-dashed":{borderStyle:"dashed"}}}),af(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${Je(e.calc(n).mul(2).equal())} ${Je(f)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:v,borderRadius:g,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:g},af(e)),sf(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:b},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${u}`}})},"\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}}}),sf(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
|
|
13
|
-
&-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Je(D)})`},"&::after":{transform:`rotate(45deg) translateX(${Je(e.calc(D).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${Je(e.calc(x).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Je(e.calc(D).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Je(D)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},W3=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:u,colorErrorBg:l,colorText:f,colorTextDescription:d,colorBgContainer:p,colorFillAlter:v,colorFillContent:g,lineWidth:b,lineWidthBold:x,controlItemBgActive:D,colorBgTextHover:m,controlHeightLG:S,lineHeight:F,colorBgElevated:B,marginXXS:O,padding:A,fontSize:P,controlHeightSM:T,fontSizeLG:_,colorTextLightSolid:M,colorErrorHover:q}=e,L=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,Y=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:b,V=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,z=new gn(M).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:f,itemColor:f,colorItemTextHover:f,itemHoverColor:f,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:p,itemBg:p,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:g,itemActiveBg:D,colorSubItemBg:v,subMenuItemBg:v,colorItemBgSelected:D,itemSelectedBg:D,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:L,colorActiveBarHeight:x,activeBarHeight:x,colorActiveBarBorderSize:b,activeBarBorderWidth:Y,colorItemTextDisabled:u,itemDisabledColor:u,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:V,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:S,groupTitleLineHeight:F,collapsedWidth:S*2,popupBg:B,itemMarginBlock:O,itemPaddingInline:A,horizontalLineHeight:`${S*1.15}px`,iconSize:P,iconMarginInlineEnd:T-P,collapsedIconSize:_,groupTitleFontSize:P,darkItemDisabledColor:new gn(M).setA(.25).toRgbString(),darkItemColor:z,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:M,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:z,darkItemHoverColor:M,darkDangerItemHoverColor:q,darkDangerItemSelectedColor:M,darkDangerItemActiveBg:a,itemWidth:L?`calc(100% + ${Y}px)`:`calc(100% - ${V*2}px)`}},V3=(e,t=e,r=!0)=>mi("Menu",o=>{const{colorBgElevated:a,controlHeightLG:u,fontSize:l,darkItemColor:f,darkDangerItemColor:d,darkItemBg:p,darkSubMenuItemBg:v,darkItemSelectedColor:g,darkItemSelectedBg:b,darkDangerItemSelectedBg:x,darkItemHoverBg:D,darkGroupTitleColor:m,darkItemHoverColor:S,darkItemDisabledColor:F,darkDangerItemHoverColor:B,darkDangerItemSelectedColor:O,darkDangerItemActiveBg:A,popupBg:P,darkPopupBg:T}=o,_=o.calc(l).div(7).mul(5).equal(),M=Wo(o,{menuArrowSize:_,menuHorizontalHeight:o.calc(u).mul(1.15).equal(),menuArrowOffset:o.calc(_).mul(.25).equal(),menuSubMenuBg:a,calc:o.calc,popupBg:P}),q=Wo(M,{itemColor:f,itemHoverColor:S,groupTitleColor:m,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:p,popupBg:T,subMenuItemBg:v,itemActiveBg:"transparent",itemSelectedBg:b,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:D,itemDisabledColor:F,dangerItemColor:d,dangerItemHoverColor:B,dangerItemSelectedColor:O,dangerItemActiveBg:A,dangerItemSelectedBg:x,menuSubMenuBg:v,horizontalItemSelectedColor:g,horizontalItemSelectedBg:b});return[q3(M),L3(M),K3(M),nf(M,"light"),nf(q,"dark"),H3(M),hp(M),ps(M,"slide-up"),ps(M,"slide-down"),P0(M,"zoom-big")]},W3,{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),Ip=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,u=C.useContext(Cs),{prefixCls:l,inlineCollapsed:f,theme:d}=u,p=Da();let v;if(!n)v=f&&!p.length&&o&&typeof o=="string"?C.createElement("div",{className:`${l}-inline-collapsed-noicon`},o.charAt(0)):C.createElement("span",{className:`${l}-title-content`},o);else{const x=C.isValidElement(o)&&o.type==="span";v=C.createElement(C.Fragment,null,pa(n,{className:rt(C.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${l}-item-icon`)}),x?o:C.createElement("span",{className:`${l}-title-content`},o))}const g=C.useMemo(()=>Object.assign(Object.assign({},u),{firstLevel:!1}),[u]),[b]=_s("Menu");return C.createElement(Cs.Provider,{value:g},C.createElement(Ws,Object.assign({},co(e,["icon"]),{title:v,popupClassName:rt(l,r,`${l}-${a||d}`),popupStyle:Object.assign({zIndex:b},e.popupStyle)})))};var U3=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 Kl(e){return e===null||e===!1}const X3={item:Tp,submenu:Ip,divider:Op},Y3=No((e,t)=>{var r;const n=C.useContext(Ds),o=n||{},{getPrefixCls:a,getPopupContainer:u,direction:l,menu:f}=C.useContext(fo),d=a(),{prefixCls:p,className:v,style:g,theme:b="light",expandIcon:x,_internalDisableMenuItemTitleTooltip:D,inlineCollapsed:m,siderCollapsed:S,rootClassName:F,mode:B,selectable:O,onClick:A,overflowedIndicatorPopupClassName:P}=e,T=U3(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),_=co(T,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:B});const M=In((...xe)=>{var ge;A==null||A.apply(void 0,xe),(ge=o.onClick)===null||ge===void 0||ge.call(o)}),q=o.mode||B,L=O??o.selectable,Y=m??S,V={horizontal:{motionName:`${d}-slide-up`},inline:pp(d),other:{motionName:`${d}-zoom-big`}},z=a("menu",p||o.prefixCls),K=vi(z),[X,W,J]=V3(z,K,!n),R=rt(`${z}-${b}`,f==null?void 0:f.className,v),ie=C.useMemo(()=>{var xe,ge;if(typeof x=="function"||Kl(x))return x||null;if(typeof o.expandIcon=="function"||Kl(o.expandIcon))return o.expandIcon||null;if(typeof(f==null?void 0:f.expandIcon)=="function"||Kl(f==null?void 0:f.expandIcon))return(f==null?void 0:f.expandIcon)||null;const ae=(xe=x??(o==null?void 0:o.expandIcon))!==null&&xe!==void 0?xe:f==null?void 0:f.expandIcon;return pa(ae,{className:rt(`${z}-submenu-expand-icon`,C.isValidElement(ae)?(ge=ae.props)===null||ge===void 0?void 0:ge.className:void 0)})},[x,o==null?void 0:o.expandIcon,f==null?void 0:f.expandIcon,z]),me=C.useMemo(()=>({prefixCls:z,inlineCollapsed:Y||!1,direction:l,firstLevel:!0,theme:b,mode:q,disableMenuItemTitleTooltip:D}),[z,Y,l,D,b]);return X(C.createElement(Ds.Provider,{value:null},C.createElement(Cs.Provider,{value:me},C.createElement(bi,Object.assign({getPopupContainer:u,overflowedIndicator:C.createElement(Mp,null),overflowedIndicatorPopupClassName:rt(z,`${z}-${b}`,P),mode:q,selectable:L,onClick:M},_,{inlineCollapsed:Y,style:Object.assign(Object.assign({},f==null?void 0:f.style),g),className:R,prefixCls:z,direction:l,defaultMotions:V,expandIcon:ie,ref:t,rootClassName:rt(F,W,o.rootClassName,J,K),_internalComponents:X3})))))}),Ea=No((e,t)=>{const r=Lt(null),n=C.useContext($p);return M0(t,()=>({menu:r.current,focus:o=>{var a;(a=r.current)===null||a===void 0||a.focus(o)}})),C.createElement(Y3,Object.assign({ref:r},e,n))});Ea.Item=Tp;Ea.SubMenu=Ip;Ea.Divider=Op;Ea.ItemGroup=X0;const G3=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}}}}}},Z3=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:a,antCls:u,iconCls:l,motionDurationMid:f,paddingBlock:d,fontSize:p,dropdownEdgeChildPadding:v,colorTextDisabled:g,fontSizeIcon:b,controlPaddingHorizontal:x,colorBgElevated:D}=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${u}-btn`]:{[`& > ${l}-down, & > ${u}-btn-icon > ${l}-down`]:{fontSize:b}},[`${t}-wrap`]:{position:"relative",[`${u}-btn > ${l}-down`]:{fontSize:b},[`${l}-down::before`]:{transition:`transform ${f}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${u}-slide-down-enter${u}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
14
|
-
&${u}-slide-down-appear${u}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
15
|
-
&${u}-slide-down-enter${u}-slide-down-enter-active${t}-placement-bottom,
|
|
16
|
-
&${u}-slide-down-appear${u}-slide-down-appear-active${t}-placement-bottom,
|
|
17
|
-
&${u}-slide-down-enter${u}-slide-down-enter-active${t}-placement-bottomRight,
|
|
18
|
-
&${u}-slide-down-appear${u}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:l2},[`&${u}-slide-up-enter${u}-slide-up-enter-active${t}-placement-topLeft,
|
|
19
|
-
&${u}-slide-up-appear${u}-slide-up-appear-active${t}-placement-topLeft,
|
|
20
|
-
&${u}-slide-up-enter${u}-slide-up-enter-active${t}-placement-top,
|
|
21
|
-
&${u}-slide-up-appear${u}-slide-up-appear-active${t}-placement-top,
|
|
22
|
-
&${u}-slide-up-enter${u}-slide-up-enter-active${t}-placement-topRight,
|
|
23
|
-
&${u}-slide-up-appear${u}-slide-up-appear-active${t}-placement-topRight`]:{animationName:s2},[`&${u}-slide-down-leave${u}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
24
|
-
&${u}-slide-down-leave${u}-slide-down-leave-active${t}-placement-bottom,
|
|
25
|
-
&${u}-slide-down-leave${u}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:i2},[`&${u}-slide-up-leave${u}-slide-up-leave-active${t}-placement-topLeft,
|
|
26
|
-
&${u}-slide-up-leave${u}-slide-up-leave-active${t}-placement-top,
|
|
27
|
-
&${u}-slide-up-leave${u}-slide-up-leave-active${t}-placement-topRight`]:{animationName:a2}}},u2(e,D,{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({},gi(e)),{[r]:Object.assign(Object.assign({padding:v,listStyleType:"none",backgroundColor:D,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Wd(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${Je(d)} ${Je(x)}`,color:e.colorTextDescription,transition:`all ${f}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:p,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 ${f}`,"&: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:`${Je(d)} ${Je(x)}`,color:e.colorText,fontWeight:"normal",fontSize:p,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${f}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Wd(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:D,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Je(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:b,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${Je(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(x).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:D,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[ps(e,"slide-up"),ps(e,"slide-down"),qd(e,"move-up"),qd(e,"move-down"),P0(e,"zoom-big")]]},J3=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},c2({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),d2(e)),Q3=mi("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=Wo(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[Z3(a),G3(a)]},J3,{resetStyle:!1}),Vs=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:u,disabled:l,dropdownRender:f,popupRender:d,getPopupContainer:p,overlayClassName:v,rootClassName:g,overlayStyle:b,open:x,onOpenChange:D,visible:m,onVisibleChange:S,mouseEnterDelay:F=.15,mouseLeaveDelay:B=.1,autoAdjustOverflow:O=!0,placement:A="",overlay:P,transitionName:T,destroyOnHidden:_,destroyPopupOnHide:M}=e,{getPopupContainer:q,getPrefixCls:L,direction:Y,dropdown:V}=C.useContext(fo),z=d||f;Ls();const K=C.useMemo(()=>{const Te=L();return T!==void 0?T:A.includes("top")?`${Te}-slide-down`:`${Te}-slide-up`},[L,A,T]),X=C.useMemo(()=>A?A.includes("Center")?A.slice(0,A.indexOf("Center")):A:Y==="rtl"?"bottomRight":"bottomLeft",[A,Y]),W=L("dropdown",o),J=vi(W),[R,ie,me]=Q3(W,J),[,xe]=z0(),ge=C.Children.only(t3(a)?C.createElement("span",null,a):a),ae=pa(ge,{className:rt(`${W}-trigger`,{[`${W}-rtl`]:Y==="rtl"},ge.props.className),disabled:(t=ge.props.disabled)!==null&&t!==void 0?t:l}),ke=l?[]:u,Z=!!(ke!=null&&ke.includes("contextMenu")),[he,se]=so(!1,{value:x??m}),te=In(Te=>{D==null||D(Te,{source:"trigger"}),S==null||S(Te),se(Te)}),ce=rt(v,g,ie,me,J,V==null?void 0:V.className,{[`${W}-rtl`]:Y==="rtl"}),Ce=f2({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:O,offset:xe.marginXXS,arrowWidth:n?xe.sizePopupArrow:0,borderRadius:xe.borderRadius}),we=In(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(D==null||D(!1,{source:"menu"}),se(!1))}),Se=()=>{let Te;return r!=null&&r.items?Te=C.createElement(Ea,Object.assign({},r)):typeof P=="function"?Te=P():Te=P,z&&(Te=z(Te)),Te=C.Children.only(typeof Te=="string"?C.createElement("span",null,Te):Te),C.createElement(Rp,{prefixCls:`${W}-menu`,rootClassName:rt(me,J),expandIcon:C.createElement("span",{className:`${W}-menu-submenu-arrow`},Y==="rtl"?C.createElement(ys,{className:`${W}-menu-submenu-arrow-icon`}):C.createElement(xs,{className:`${W}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:we,validator:({mode:He})=>{}},Te)},[Ee,Ae]=_s("Dropdown",b==null?void 0:b.zIndex);let $e=C.createElement(e3,Object.assign({alignPoint:Z},co(e,["rootClassName"]),{mouseEnterDelay:F,mouseLeaveDelay:B,visible:he,builtinPlacements:Ce,arrow:!!n,overlayClassName:ce,prefixCls:W,getPopupContainer:p||q,transitionName:K,trigger:ke,overlay:Se,placement:X,onVisibleChange:te,overlayStyle:Object.assign(Object.assign(Object.assign({},V==null?void 0:V.style),b),{zIndex:Ee}),autoDestroy:_??M}),ae);return Ee&&($e=C.createElement(h2.Provider,{value:Ae},$e)),R($e)},ev=p2(Vs,"align",void 0,"dropdown",e=>e),tv=e=>C.createElement(ev,Object.assign({},e),C.createElement("span",null));Vs._InternalPanelDoNotUseOrYouWillBeFired=tv;function mn(e,t){return e[t]}var rv=["children"];function Pp(e,t){return"".concat(e,"-").concat(t)}function nv(e){return e&&e.type&&e.type.isTreeNode}function yi(e,t){return e??t}function ma(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,u=r||"title";return{title:u,_title:n||[u],key:o||"key",children:a||"children"}}function zp(e){function t(r){var n=js(r);return n.map(function(o){if(!nv(o))return Xn(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,u=o.props,l=u.children,f=gr(u,rv),d=je({key:a},f),p=t(l);return p.length&&(d.children=p),d}).filter(function(o){return o})}return t(e)}function ql(e,t,r){var n=ma(r),o=n._title,a=n.key,u=n.children,l=new Set(t===!0?[]:t),f=[];function d(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(g,b){for(var x=Pp(v?v.pos:"0",b),D=yi(g[a],x),m,S=0;S<o.length;S+=1){var F=o[S];if(g[F]!==void 0){m=g[F];break}}var B=Object.assign(co(g,[].concat(zt(o),[a,u])),{title:m,key:D,parent:v,pos:x,children:null,data:g,isStart:[].concat(zt(v?v.isStart:[]),[b===0]),isEnd:[].concat(zt(v?v.isEnd:[]),[b===p.length-1])});return f.push(B),t===!0||l.has(D)?B.children=d(g[u]||[],B):B.children=[],B})}return d(e),f}function ov(e,t,r){var n={};Cn(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,u=o.externalGetKey,l=o.fieldNames,f=ma(l),d=f.key,p=f.children,v=a||p,g;u?typeof u=="string"?g=function(D){return D[u]}:typeof u=="function"&&(g=function(D){return u(D)}):g=function(D,m){return yi(D[d],m)};function b(x,D,m,S){var F=x?x[v]:e,B=x?Pp(m.pos,D):"0",O=x?[].concat(zt(S),[x]):[];if(x){var A=g(x,B),P={node:x,index:D,pos:B,key:A,parentPos:m.node?m.pos:null,level:m.level+1,nodes:O};t(P)}F&&F.forEach(function(T,_){b(T,_,{node:x,pos:B,level:m?m.level+1:-1},O)})}b(null)}function Y0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,u=t.childrenPropName,l=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,d=a||f,p={},v={},g={posEntities:p,keyEntities:v};return r&&(g=r(g)||g),ov(e,function(b){var x=b.node,D=b.index,m=b.pos,S=b.key,F=b.parentPos,B=b.level,O=b.nodes,A={node:x,nodes:O,index:D,key:S,pos:m,level:B},P=yi(S,m);p[m]=A,v[P]=A,A.parent=p[F],A.parent&&(A.parent.children=A.parent.children||[],A.parent.children.push(A)),n&&n(A,g)},{externalGetKey:d,childrenPropName:u,fieldNames:l}),o&&o(g),g}function Ua(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,u=t.checkedKeys,l=t.halfCheckedKeys,f=t.dragOverNodeKey,d=t.dropPosition,p=t.keyEntities,v=mn(p,e),g={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:u.indexOf(e)!==-1,halfChecked:l.indexOf(e)!==-1,pos:String(v?v.pos:""),dragOver:f===e&&d===0,dragOverGapTop:f===e&&d===-1,dragOverGapBottom:f===e&&d===1};return g}function Lr(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,u=e.loading,l=e.halfChecked,f=e.dragOver,d=e.dragOverGapTop,p=e.dragOverGapBottom,v=e.pos,g=e.active,b=e.eventKey,x=je(je({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:u,halfChecked:l,dragOver:f,dragOverGapTop:d,dragOverGapBottom:p,pos:v,active:g,key:b});return"props"in x||Object.defineProperty(x,"props",{get:function(){return Xn(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),x}function jp(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function av(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function iv(e,t,r,n){for(var o=new Set(e),a=new Set,u=0;u<=r;u+=1){var l=t.get(u)||new Set;l.forEach(function(v){var g=v.key,b=v.node,x=v.children,D=x===void 0?[]:x;o.has(g)&&!n(b)&&D.filter(function(m){return!n(m.node)}).forEach(function(m){o.add(m.key)})})}for(var f=new Set,d=r;d>=0;d-=1){var p=t.get(d)||new Set;p.forEach(function(v){var g=v.parent,b=v.node;if(!(n(b)||!v.parent||f.has(v.parent.key))){if(n(v.parent.node)){f.add(g.key);return}var x=!0,D=!1;(g.children||[]).filter(function(m){return!n(m.node)}).forEach(function(m){var S=m.key,F=o.has(S);x&&!F&&(x=!1),!D&&(F||a.has(S))&&(D=!0)}),x&&o.add(g.key),D&&a.add(g.key),f.add(g.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(jp(a,o))}}function sv(e,t,r,n,o){for(var a=new Set(e),u=new Set(t),l=0;l<=n;l+=1){var f=r.get(l)||new Set;f.forEach(function(g){var b=g.key,x=g.node,D=g.children,m=D===void 0?[]:D;!a.has(b)&&!u.has(b)&&!o(x)&&m.filter(function(S){return!o(S.node)}).forEach(function(S){a.delete(S.key)})})}u=new Set;for(var d=new Set,p=n;p>=0;p-=1){var v=r.get(p)||new Set;v.forEach(function(g){var b=g.parent,x=g.node;if(!(o(x)||!g.parent||d.has(g.parent.key))){if(o(g.parent.node)){d.add(b.key);return}var D=!0,m=!1;(b.children||[]).filter(function(S){return!o(S.node)}).forEach(function(S){var F=S.key,B=a.has(F);D&&!B&&(D=!1),!m&&(B||u.has(F))&&(m=!0)}),D||a.delete(b.key),m&&u.add(b.key),d.add(b.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(jp(u,a))}}function ua(e,t,r,n){var o=[],a;n?a=n:a=av;var u=new Set(e.filter(function(p){var v=!!mn(r,p);return v||o.push(p),v})),l=new Map,f=0;Object.keys(r).forEach(function(p){var v=r[p],g=v.level,b=l.get(g);b||(b=new Set,l.set(g,b)),b.add(v),f=Math.max(f,g)}),Xn(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(p){return"'".concat(p,"'")}).join(", ")));var d;return t===!0?d=iv(u,l,f,a):d=sv(u,t.halfCheckedKeys,l,f,a),d}var lv=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 _p=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=C.useContext(fo),{prefixCls:o,type:a="default",danger:u,disabled:l,loading:f,onClick:d,htmlType:p,children:v,className:g,menu:b,arrow:x,autoFocus:D,overlay:m,trigger:S,align:F,open:B,onOpenChange:O,placement:A,getPopupContainer:P,href:T,icon:_=C.createElement(Mp,null),title:M,buttonsRender:q=Ce=>Ce,mouseEnterDelay:L,mouseLeaveDelay:Y,overlayClassName:V,overlayStyle:z,destroyOnHidden:K,destroyPopupOnHide:X,dropdownRender:W,popupRender:J}=e,R=lv(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"]),ie=r("dropdown",o),me=`${ie}-button`,ge={menu:b,arrow:x,autoFocus:D,align:F,disabled:l,trigger:l?[]:S,onOpenChange:O,getPopupContainer:P||t,mouseEnterDelay:L,mouseLeaveDelay:Y,overlayClassName:V,overlayStyle:z,destroyOnHidden:K,popupRender:J||W},{compactSize:ae,compactItemClassnames:ke}=m2(ie,n),Z=rt(me,ke,g);"destroyPopupOnHide"in e&&(ge.destroyPopupOnHide=X),"overlay"in e&&(ge.overlay=m),"open"in e&&(ge.open=B),"placement"in e?ge.placement=A:ge.placement=n==="rtl"?"bottomLeft":"bottomRight";const he=C.createElement(ms,{type:a,danger:u,disabled:l,loading:f,onClick:d,htmlType:p,href:T,title:M},v),se=C.createElement(ms,{type:a,danger:u,icon:_}),[te,ce]=q([he,se]);return C.createElement(P2.Compact,Object.assign({className:Z,size:ae,block:!0},R),te,C.createElement(Vs,Object.assign({},ge),ce))};_p.__ANT_BUTTON=!0;const G0=Vs;G0.Button=_p;function Lp(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function uv(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{left:t.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}function Eo(e,t,r,n){var o=Pu.unstable_batchedUpdates?function(u){Pu.unstable_batchedUpdates(r,u)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var xi=C.createContext(null),cv=function(t){var r=t.visible,n=t.maskTransitionName,o=t.getContainer,a=t.prefixCls,u=t.rootClassName,l=t.icons,f=t.countRender,d=t.showSwitch,p=t.showProgress,v=t.current,g=t.transform,b=t.count,x=t.scale,D=t.minScale,m=t.maxScale,S=t.closeIcon,F=t.onActive,B=t.onClose,O=t.onZoomIn,A=t.onZoomOut,P=t.onRotateRight,T=t.onRotateLeft,_=t.onFlipX,M=t.onFlipY,q=t.onReset,L=t.toolbarRender,Y=t.zIndex,V=t.image,z=$o(xi),K=l.rotateLeft,X=l.rotateRight,W=l.zoomIn,J=l.zoomOut,R=l.close,ie=l.left,me=l.right,xe=l.flipX,ge=l.flipY,ae="".concat(a,"-operations-operation");C.useEffect(function(){var $e=function(He){He.keyCode===Pr.ESC&&B()};return r&&window.addEventListener("keydown",$e),function(){window.removeEventListener("keydown",$e)}},[r]);var ke=function(Te,He){Te.preventDefault(),Te.stopPropagation(),F(He)},Z=C.useCallback(function($e){var Te=$e.type,He=$e.disabled,pt=$e.onClick,at=$e.icon;return C.createElement("div",{key:Te,className:rt(ae,"".concat(a,"-operations-operation-").concat(Te),Ne({},"".concat(a,"-operations-operation-disabled"),!!He)),onClick:pt},at)},[ae,a]),he=d?Z({icon:ie,onClick:function(Te){return ke(Te,-1)},type:"prev",disabled:v===0}):void 0,se=d?Z({icon:me,onClick:function(Te){return ke(Te,1)},type:"next",disabled:v===b-1}):void 0,te=Z({icon:ge,onClick:M,type:"flipY"}),ce=Z({icon:xe,onClick:_,type:"flipX"}),Ce=Z({icon:K,onClick:T,type:"rotateLeft"}),we=Z({icon:X,onClick:P,type:"rotateRight"}),Se=Z({icon:J,onClick:A,type:"zoomOut",disabled:x<=D}),Ee=Z({icon:W,onClick:O,type:"zoomIn",disabled:x===m}),Ae=C.createElement("div",{className:"".concat(a,"-operations")},te,ce,Ce,we,Se,Ee);return C.createElement(R0,{visible:r,motionName:n},function($e){var Te=$e.className,He=$e.style;return C.createElement(g2,{open:!0,getContainer:o??document.body},C.createElement("div",{className:rt("".concat(a,"-operations-wrapper"),Te,u),style:je(je({},He),{},{zIndex:Y})},S===null?null:C.createElement("button",{className:"".concat(a,"-close"),onClick:B},S||R),d&&C.createElement(C.Fragment,null,C.createElement("div",{className:rt("".concat(a,"-switch-left"),Ne({},"".concat(a,"-switch-left-disabled"),v===0)),onClick:function(at){return ke(at,-1)}},ie),C.createElement("div",{className:rt("".concat(a,"-switch-right"),Ne({},"".concat(a,"-switch-right-disabled"),v===b-1)),onClick:function(at){return ke(at,1)}},me)),C.createElement("div",{className:"".concat(a,"-footer")},p&&C.createElement("div",{className:"".concat(a,"-progress")},f?f(v+1,b):C.createElement("bdi",null,"".concat(v+1," / ").concat(b))),L?L(Ae,je(je({icons:{prevIcon:he,nextIcon:se,flipYIcon:te,flipXIcon:ce,rotateLeftIcon:Ce,rotateRightIcon:we,zoomOutIcon:Se,zoomInIcon:Ee},actions:{onActive:F,onFlipY:M,onFlipX:_,onRotateLeft:T,onRotateRight:P,onZoomOut:A,onZoomIn:O,onReset:q,onClose:B},transform:g},z?{current:v,total:b}:{}),{},{image:V})):Ae)))})},Ri={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function dv(e,t,r,n){var o=Lt(null),a=Lt([]),u=Ot(Ri),l=gt(u,2),f=l[0],d=l[1],p=function(x){d(Ri),So(Ri,f)||n==null||n({transform:Ri,action:x})},v=function(x,D){o.current===null&&(a.current=[],o.current=An(function(){d(function(m){var S=m;return a.current.forEach(function(F){S=je(je({},S),F)}),o.current=null,n==null||n({transform:S,action:D}),S})})),a.current.push(je(je({},f),x))},g=function(x,D,m,S,F){var B=e.current,O=B.width,A=B.height,P=B.offsetWidth,T=B.offsetHeight,_=B.offsetLeft,M=B.offsetTop,q=x,L=f.scale*x;L>r?(L=r,q=r/f.scale):L<t&&(L=F?L:t,q=L/f.scale);var Y=m??innerWidth/2,V=S??innerHeight/2,z=q-1,K=z*O*.5,X=z*A*.5,W=z*(Y-f.x-_),J=z*(V-f.y-M),R=f.x-(W-K),ie=f.y-(J-X);if(x<1&&L===1){var me=P*L,xe=T*L,ge=Lp(),ae=ge.width,ke=ge.height;me<=ae&&xe<=ke&&(R=0,ie=0)}v({x:R,y:ie,scale:L},D)};return{transform:f,resetTransform:p,updateTransform:v,dispatchZoomChange:g}}function lf(e,t,r,n){var o=t+r,a=(r-n)/2;if(r>n){if(t>0)return Ne({},e,a);if(t<0&&o<n)return Ne({},e,-a)}else if(t<0||o>n)return Ne({},e,t<0?a:-a);return{}}function Hp(e,t,r,n){var o=Lp(),a=o.width,u=o.height,l=null;return e<=a&&t<=u?l={x:0,y:0}:(e>a||t>u)&&(l=je(je({},lf("x",r,e,a)),lf("y",n,t,u))),l}var aa=1,fv=1;function hv(e,t,r,n,o,a,u){var l=o.rotate,f=o.scale,d=o.x,p=o.y,v=Ot(!1),g=gt(v,2),b=g[0],x=g[1],D=Lt({diffX:0,diffY:0,transformX:0,transformY:0}),m=function(A){!t||A.button!==0||(A.preventDefault(),A.stopPropagation(),D.current={diffX:A.pageX-d,diffY:A.pageY-p,transformX:d,transformY:p},x(!0))},S=function(A){r&&b&&a({x:A.pageX-D.current.diffX,y:A.pageY-D.current.diffY},"move")},F=function(){if(r&&b){x(!1);var A=D.current,P=A.transformX,T=A.transformY,_=d!==P&&p!==T;if(!_)return;var M=e.current.offsetWidth*f,q=e.current.offsetHeight*f,L=e.current.getBoundingClientRect(),Y=L.left,V=L.top,z=l%180!==0,K=Hp(z?q:M,z?M:q,Y,V);K&&a(je({},K),"dragRebound")}},B=function(A){if(!(!r||A.deltaY==0)){var P=Math.abs(A.deltaY/100),T=Math.min(P,fv),_=aa+T*n;A.deltaY>0&&(_=aa/_),u(_,"wheel",A.clientX,A.clientY)}};return er(function(){var O,A,P,T;if(t){P=Eo(window,"mouseup",F,!1),T=Eo(window,"mousemove",S,!1);try{window.top!==window.self&&(O=Eo(window.top,"mouseup",F,!1),A=Eo(window.top,"mousemove",S,!1))}catch{}}return function(){var _,M,q,L;(_=P)===null||_===void 0||_.remove(),(M=T)===null||M===void 0||M.remove(),(q=O)===null||q===void 0||q.remove(),(L=A)===null||L===void 0||L.remove()}},[r,b,d,p,l,t]),{isMoving:b,onMouseDown:m,onMouseMove:S,onMouseUp:F,onWheel:B}}function pv(e){return new Promise(function(t){if(!e){t(!1);return}var r=document.createElement("img");r.onerror=function(){return t(!1)},r.onload=function(){return t(!0)},r.src=e})}function Kp(e){var t=e.src,r=e.isCustomPlaceholder,n=e.fallback,o=Ot(r?"loading":"normal"),a=gt(o,2),u=a[0],l=a[1],f=Lt(!1),d=u==="error";er(function(){var b=!0;return pv(t).then(function(x){!x&&b&&l("error")}),function(){b=!1}},[t]),er(function(){r&&!f.current?l("loading"):d&&l("normal")},[t]);var p=function(){l("normal")},v=function(x){f.current=!1,u==="loading"&&x!==null&&x!==void 0&&x.complete&&(x.naturalWidth||x.naturalHeight)&&(f.current=!0,p())},g=d&&n?{src:n}:{onLoad:p,src:t};return[v,g,u]}function Es(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.hypot(r,n)}function mv(e,t,r,n){var o=Es(e,r),a=Es(t,n);if(o===0&&a===0)return[e.x,e.y];var u=o/(o+a),l=e.x+u*(t.x-e.x),f=e.y+u*(t.y-e.y);return[l,f]}function gv(e,t,r,n,o,a,u){var l=o.rotate,f=o.scale,d=o.x,p=o.y,v=Ot(!1),g=gt(v,2),b=g[0],x=g[1],D=Lt({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),m=function(A){D.current=je(je({},D.current),A)},S=function(A){if(t){A.stopPropagation(),x(!0);var P=A.touches,T=P===void 0?[]:P;T.length>1?m({point1:{x:T[0].clientX,y:T[0].clientY},point2:{x:T[1].clientX,y:T[1].clientY},eventType:"touchZoom"}):m({point1:{x:T[0].clientX-d,y:T[0].clientY-p},eventType:"move"})}},F=function(A){var P=A.touches,T=P===void 0?[]:P,_=D.current,M=_.point1,q=_.point2,L=_.eventType;if(T.length>1&&L==="touchZoom"){var Y={x:T[0].clientX,y:T[0].clientY},V={x:T[1].clientX,y:T[1].clientY},z=mv(M,q,Y,V),K=gt(z,2),X=K[0],W=K[1],J=Es(Y,V)/Es(M,q);u(J,"touchZoom",X,W,!0),m({point1:Y,point2:V,eventType:"touchZoom"})}else L==="move"&&(a({x:T[0].clientX-M.x,y:T[0].clientY-M.y},"move"),m({eventType:"move"}))},B=function(){if(r){if(b&&x(!1),m({eventType:"none"}),n>f)return a({x:0,y:0,scale:n},"touchZoom");var A=e.current.offsetWidth*f,P=e.current.offsetHeight*f,T=e.current.getBoundingClientRect(),_=T.left,M=T.top,q=l%180!==0,L=Hp(q?P:A,q?A:P,_,M);L&&a(je({},L),"dragRebound")}};return er(function(){var O;return r&&t&&(O=Eo(window,"touchmove",function(A){return A.preventDefault()},{passive:!1})),function(){var A;(A=O)===null||A===void 0||A.remove()}},[r,t]),{isTouching:b,onTouchStart:S,onTouchMove:F,onTouchEnd:B}}var vv=["fallback","src","imgRef"],bv=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],yv=function(t){var r=t.fallback,n=t.src,o=t.imgRef,a=gr(t,vv),u=Kp({src:n,fallback:r}),l=gt(u,2),f=l[0],d=l[1];return _e.createElement("img",xt({ref:function(v){o.current=v,f(v)}},a,d))},qp=function(t){var r=t.prefixCls,n=t.src,o=t.alt,a=t.imageInfo,u=t.fallback,l=t.movable,f=l===void 0?!0:l,d=t.onClose,p=t.visible,v=t.icons,g=v===void 0?{}:v,b=t.rootClassName,x=t.closeIcon,D=t.getContainer,m=t.current,S=m===void 0?0:m,F=t.count,B=F===void 0?1:F,O=t.countRender,A=t.scaleStep,P=A===void 0?.5:A,T=t.minScale,_=T===void 0?1:T,M=t.maxScale,q=M===void 0?50:M,L=t.transitionName,Y=L===void 0?"zoom":L,V=t.maskTransitionName,z=V===void 0?"fade":V,K=t.imageRender,X=t.imgCommonProps,W=t.toolbarRender,J=t.onTransform,R=t.onChange,ie=gr(t,bv),me=Lt(),xe=$o(xi),ge=xe&&B>1,ae=xe&&B>=1,ke=Ot(!0),Z=gt(ke,2),he=Z[0],se=Z[1],te=dv(me,_,q,J),ce=te.transform,Ce=te.resetTransform,we=te.updateTransform,Se=te.dispatchZoomChange,Ee=hv(me,f,p,P,ce,we,Se),Ae=Ee.isMoving,$e=Ee.onMouseDown,Te=Ee.onWheel,He=gv(me,f,p,_,ce,we,Se),pt=He.isTouching,at=He.onTouchStart,Me=He.onTouchMove,Le=He.onTouchEnd,Xe=ce.rotate,ft=ce.scale,it=rt(Ne({},"".concat(r,"-moving"),Ae));er(function(){he||se(!0)},[he]);var et=function(){Ce("close")},$t=function(){Se(aa+P,"zoomIn")},Dt=function(){Se(aa/(aa+P),"zoomOut")},vt=function(){we({rotate:Xe+90},"rotateRight")},ht=function(){we({rotate:Xe-90},"rotateLeft")},Pe=function(){we({flipX:!ce.flipX},"flipX")},de=function(){we({flipY:!ce.flipY},"flipY")},bt=function(){Ce("reset")},kt=function(tr){var ur=S+tr;!Number.isInteger(ur)||ur<0||ur>B-1||(se(!1),Ce(tr<0?"prev":"next"),R==null||R(ur,S))},Ft=function(tr){!p||!ge||(tr.keyCode===Pr.LEFT?kt(-1):tr.keyCode===Pr.RIGHT&&kt(1))},Et=function(tr){p&&(ft!==1?we({x:0,y:0,scale:1},"doubleClick"):Se(aa+P,"doubleClick",tr.clientX,tr.clientY))};er(function(){var Rt=Eo(window,"keydown",Ft,!1);return function(){Rt.remove()}},[p,ge,S]);var or=_e.createElement(yv,xt({},X,{width:t.width,height:t.height,imgRef:me,className:"".concat(r,"-img"),alt:o,style:{transform:"translate3d(".concat(ce.x,"px, ").concat(ce.y,"px, 0) scale3d(").concat(ce.flipX?"-":"").concat(ft,", ").concat(ce.flipY?"-":"").concat(ft,", 1) rotate(").concat(Xe,"deg)"),transitionDuration:(!he||pt)&&"0s"},fallback:u,src:n,onWheel:Te,onMouseDown:$e,onDoubleClick:Et,onTouchStart:at,onTouchMove:Me,onTouchEnd:Le,onTouchCancel:Le})),At=je({url:n,alt:o},a);return _e.createElement(_e.Fragment,null,_e.createElement(v2,xt({transitionName:Y,maskTransitionName:z,closable:!1,keyboard:!0,prefixCls:r,onClose:d,visible:p,classNames:{wrapper:it},rootClassName:b,getContainer:D},ie,{afterClose:et}),_e.createElement("div",{className:"".concat(r,"-img-wrapper")},K?K(or,je({transform:ce,image:At},xe?{current:S}:{})):or)),_e.createElement(cv,{visible:p,transform:ce,maskTransitionName:z,closeIcon:x,getContainer:D,prefixCls:r,rootClassName:b,icons:g,countRender:O,showSwitch:ge,showProgress:ae,current:S,count:B,scale:ft,minScale:_,maxScale:q,toolbarRender:W,onActive:kt,onZoomIn:$t,onZoomOut:Dt,onRotateRight:vt,onRotateLeft:ht,onFlipX:Pe,onFlipY:de,onClose:d,onReset:bt,zIndex:ie.zIndex!==void 0?ie.zIndex+1:void 0,image:At}))},Vu=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function xv(e){var t=C.useState({}),r=gt(t,2),n=r[0],o=r[1],a=C.useCallback(function(l,f){return o(function(d){return je(je({},d),{},Ne({},l,f))}),function(){o(function(d){var p=je({},d);return delete p[l],p})}},[]),u=C.useMemo(function(){return e?e.map(function(l){if(typeof l=="string")return{data:{src:l}};var f={};return Object.keys(l).forEach(function(d){["src"].concat(zt(Vu)).includes(d)&&(f[d]=l[d])}),{data:f}}):Object.keys(n).reduce(function(l,f){var d=n[f],p=d.canPreview,v=d.data;return p&&l.push({data:v,id:f}),l},[])},[e,n]);return[u,a,!!e]}var wv=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Cv=["src"],Dv=function(t){var r,n=t.previewPrefixCls,o=n===void 0?"rc-image-preview":n,a=t.children,u=t.icons,l=u===void 0?{}:u,f=t.items,d=t.preview,p=t.fallback,v=Cn(d)==="object"?d:{},g=v.visible,b=v.onVisibleChange,x=v.getContainer,D=v.current,m=v.movable,S=v.minScale,F=v.maxScale,B=v.countRender,O=v.closeIcon,A=v.onChange,P=v.onTransform,T=v.toolbarRender,_=v.imageRender,M=gr(v,wv),q=xv(f),L=gt(q,3),Y=L[0],V=L[1],z=L[2],K=so(0,{value:D}),X=gt(K,2),W=X[0],J=X[1],R=Ot(!1),ie=gt(R,2),me=ie[0],xe=ie[1],ge=((r=Y[W])===null||r===void 0?void 0:r.data)||{},ae=ge.src,ke=gr(ge,Cv),Z=so(!!g,{value:g,onChange:function(pt,at){b==null||b(pt,at,W)}}),he=gt(Z,2),se=he[0],te=he[1],ce=Ot(null),Ce=gt(ce,2),we=Ce[0],Se=Ce[1],Ee=C.useCallback(function(He,pt,at,Me){var Le=z?Y.findIndex(function(Xe){return Xe.data.src===pt}):Y.findIndex(function(Xe){return Xe.id===He});J(Le<0?0:Le),te(!0),Se({x:at,y:Me}),xe(!0)},[Y,z]);C.useEffect(function(){se?me||J(0):xe(!1)},[se]);var Ae=function(pt,at){J(pt),A==null||A(pt,at)},$e=function(){te(!1),Se(null)},Te=C.useMemo(function(){return{register:V,onPreview:Ee}},[V,Ee]);return C.createElement(xi.Provider,{value:Te},a,C.createElement(qp,xt({"aria-hidden":!se,movable:m,visible:se,prefixCls:o,closeIcon:O,onClose:$e,mousePosition:we,imgCommonProps:ke,src:ae,fallback:p,icons:l,minScale:S,maxScale:F,getContainer:x,current:W,count:Y.length,countRender:B,onTransform:P,toolbarRender:T,imageRender:_,onChange:Ae},M)))},uf=0;function Ev(e,t){var r=C.useState(function(){return uf+=1,String(uf)}),n=gt(r,1),o=n[0],a=C.useContext(xi),u={data:t,canPreview:e};return C.useEffect(function(){if(a)return a.register(o,u)},[]),C.useEffect(function(){a&&a.register(o,u)},[e,t]),o}var kv=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Sv=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Z0=function(t){var r=t.src,n=t.alt,o=t.onPreviewClose,a=t.prefixCls,u=a===void 0?"rc-image":a,l=t.previewPrefixCls,f=l===void 0?"".concat(u,"-preview"):l,d=t.placeholder,p=t.fallback,v=t.width,g=t.height,b=t.style,x=t.preview,D=x===void 0?!0:x,m=t.className,S=t.onClick,F=t.onError,B=t.wrapperClassName,O=t.wrapperStyle,A=t.rootClassName,P=gr(t,kv),T=d&&d!==!0,_=Cn(D)==="object"?D:{},M=_.src,q=_.visible,L=q===void 0?void 0:q,Y=_.onVisibleChange,V=Y===void 0?o:Y,z=_.getContainer,K=z===void 0?void 0:z,X=_.mask,W=_.maskClassName,J=_.movable,R=_.icons,ie=_.scaleStep,me=_.minScale,xe=_.maxScale,ge=_.imageRender,ae=_.toolbarRender,ke=gr(_,Sv),Z=M??r,he=so(!!L,{value:L,onChange:V}),se=gt(he,2),te=se[0],ce=se[1],Ce=Kp({src:r,isCustomPlaceholder:T,fallback:p}),we=gt(Ce,3),Se=we[0],Ee=we[1],Ae=we[2],$e=Ot(null),Te=gt($e,2),He=Te[0],pt=Te[1],at=$o(xi),Me=!!D,Le=function(){ce(!1),pt(null)},Xe=rt(u,B,A,Ne({},"".concat(u,"-error"),Ae==="error")),ft=Ct(function(){var Dt={};return Vu.forEach(function(vt){t[vt]!==void 0&&(Dt[vt]=t[vt])}),Dt},Vu.map(function(Dt){return t[Dt]})),it=Ct(function(){return je(je({},ft),{},{src:Z})},[Z,ft]),et=Ev(Me,it),$t=function(vt){var ht=uv(vt.target),Pe=ht.left,de=ht.top;at?at.onPreview(et,Z,Pe,de):(pt({x:Pe,y:de}),ce(!0)),S==null||S(vt)};return C.createElement(C.Fragment,null,C.createElement("div",xt({},P,{className:Xe,onClick:Me?$t:S,style:je({width:v,height:g},O)}),C.createElement("img",xt({},ft,{className:rt("".concat(u,"-img"),Ne({},"".concat(u,"-img-placeholder"),d===!0),m),style:je({height:g},b),ref:Se},Ee,{width:v,height:g,onError:F})),Ae==="loading"&&C.createElement("div",{"aria-hidden":"true",className:"".concat(u,"-placeholder")},d),X&&Me&&C.createElement("div",{className:rt("".concat(u,"-mask"),W),style:{display:(b==null?void 0:b.display)==="none"?"none":void 0}},X)),!at&&Me&&C.createElement(qp,xt({"aria-hidden":!te,visible:te,prefixCls:f,onClose:Le,mousePosition:He,src:Z,alt:n,imageInfo:{width:v,height:g},fallback:p,getContainer:K,icons:R,movable:J,scaleStep:ie,minScale:me,maxScale:xe,rootClassName:A,imageRender:ge,imgCommonProps:ft,toolbarRender:ae},ke)))};Z0.PreviewGroup=Dv;var Av={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},Bv=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:Av}))},Fv=C.forwardRef(Bv),Nv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},$v=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:Nv}))},Mv=C.forwardRef($v),Ov={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},Tv=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:Ov}))},cf=C.forwardRef(Tv),Rv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},Iv=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:Rv}))},Pv=C.forwardRef(Iv),zv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},jv=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:zv}))},_v=C.forwardRef(jv);const Uu=e=>({position:e||"absolute",inset:0}),Lv=e=>{const{iconCls:t,motionDurationSlow:r,paddingXXS:n,marginXXS:o,prefixCls:a,colorTextLightSolid:u}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:u,background:new gn("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${a}-mask-info`]:Object.assign(Object.assign({},I0),{padding:`0 ${Je(n)}`,[t]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},Hv=e=>{const{previewCls:t,modalMaskBg:r,paddingSM:n,marginXL:o,margin:a,paddingLG:u,previewOperationColorDisabled:l,previewOperationHoverColor:f,motionDurationSlow:d,iconCls:p,colorTextLightSolid:v}=e,g=new gn(r).setA(.1),b=g.clone().setA(.2);return{[`${t}-footer`]:{position:"fixed",bottom:o,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)"},[`${t}-progress`]:{marginBottom:a},[`${t}-close`]:{position:"fixed",top:o,right:{_skip_check_:!0,value:o},display:"flex",color:v,backgroundColor:g.toRgbString(),borderRadius:"50%",padding:n,outline:0,border:0,cursor:"pointer",transition:`all ${d}`,"&:hover":{backgroundColor:b.toRgbString()},[`& > ${p}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${Je(u)}`,backgroundColor:g.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${d}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${p}`]:{color:f},"&-disabled":{color:l,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${p}`]:{fontSize:e.previewOperationSize}}}}},Kv=e=>{const{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:n,previewCls:o,zIndexPopup:a,motionDurationSlow:u}=e,l=new gn(t).setA(.1),f=l.clone().setA(.2);return{[`${o}-switch-left, ${o}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:e.calc(a).add(1).equal(),display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:e.calc(e.imagePreviewSwitchSize).mul(-1).div(2).equal(),color:e.previewOperationColor,background:l.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${u}`,userSelect:"none","&:hover":{background:f.toRgbString()},"&-disabled":{"&, &:hover":{color:n,background:"transparent",cursor:"not-allowed",[`> ${r}`]:{cursor:"not-allowed"}}},[`> ${r}`]:{fontSize:e.previewOperationSize}},[`${o}-switch-left`]:{insetInlineStart:e.marginSM},[`${o}-switch-right`]:{insetInlineEnd:e.marginSM}}},qv=e=>{const{motionEaseOut:t,previewCls:r,motionDurationSlow:n,componentCls:o}=e;return[{[`${o}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:Object.assign(Object.assign({},Uu()),{overflow:"hidden"}),[`${r}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${n} ${t} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},Uu()),{transition:`transform ${n} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${r}-moving`]:{[`${r}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${o}-preview-root`]:{[`${r}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${o}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.calc(e.zIndexPopup).add(1).equal()},"&":[Hv(e),Kv(e)]}]},Wv=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:Object.assign({},Lv(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},Uu())}}},Vv=e=>{const{previewCls:t}=e;return{[`${t}-root`]:P0(e,"zoom"),"&":y2(e,!0)}},Uv=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new gn(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new gn(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new gn(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),Wp=mi("Image",e=>{const t=`${e.componentCls}-preview`,r=Wo(e,{previewCls:t,modalMaskBg:new gn("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[Wv(r),qv(r),b2(Wo(r,{componentCls:t})),Vv(r)]},Uv);var Xv=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 Vp={rotateLeft:C.createElement(Fv,null),rotateRight:C.createElement(Mv,null),zoomIn:C.createElement(Pv,null),zoomOut:C.createElement(_v,null),close:C.createElement(x2,null),left:C.createElement(ys,null),right:C.createElement(xs,null),flipX:C.createElement(cf,null),flipY:C.createElement(cf,{rotate:90})},Yv=e=>{var{previewPrefixCls:t,preview:r}=e,n=Xv(e,["previewPrefixCls","preview"]);const{getPrefixCls:o,direction:a}=C.useContext(fo),u=o("image",t),l=`${u}-preview`,f=o(),d=vi(u),[p,v,g]=Wp(u,d),[b]=_s("ImagePreview",typeof r=="object"?r.zIndex:void 0),x=C.useMemo(()=>Object.assign(Object.assign({},Vp),{left:a==="rtl"?C.createElement(xs,null):C.createElement(ys,null),right:a==="rtl"?C.createElement(ys,null):C.createElement(xs,null)}),[a]),D=C.useMemo(()=>{var m;if(r===!1)return r;const S=typeof r=="object"?r:{},F=rt(v,g,d,(m=S.rootClassName)!==null&&m!==void 0?m:"");return Object.assign(Object.assign({},S),{transitionName:gs(f,"zoom",S.transitionName),maskTransitionName:gs(f,"fade",S.maskTransitionName),rootClassName:F,zIndex:b})},[r,f,b,v,g,d]);return p(C.createElement(Z0.PreviewGroup,Object.assign({preview:D,previewPrefixCls:l,icons:x},n)))};var df=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Up=e=>{const{prefixCls:t,preview:r,className:n,rootClassName:o,style:a,fallback:u}=e,l=df(e,["prefixCls","preview","className","rootClassName","style","fallback"]),{getPrefixCls:f,getPopupContainer:d,className:p,style:v,preview:g,fallback:b}=w2("image"),[x]=C2("Image"),D=f("image",t),m=f(),S=vi(D),[F,B,O]=Wp(D,S),A=rt(o,B,O,S),P=rt(n,B,p),[T]=_s("ImagePreview",typeof r=="object"?r.zIndex:void 0),_=C.useMemo(()=>{if(r===!1)return r;const L=typeof r=="object"?r:{},{getContainer:Y,closeIcon:V,rootClassName:z,destroyOnClose:K,destroyOnHidden:X}=L,W=df(L,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:C.createElement("div",{className:`${D}-mask-info`},C.createElement(D2,null),x==null?void 0:x.preview),icons:Vp},W),{destroyOnClose:X??K,rootClassName:rt(A,z),getContainer:Y??d,transitionName:gs(m,"zoom",L.transitionName),maskTransitionName:gs(m,"fade",L.maskTransitionName),zIndex:T,closeIcon:V??(g==null?void 0:g.closeIcon)})},[r,x,g==null?void 0:g.closeIcon]),M=Object.assign(Object.assign({},v),a),q=u??b;return F(C.createElement(Z0,Object.assign({prefixCls:D,preview:_,rootClassName:A,className:P,style:M,fallback:q},l)))};Up.PreviewGroup=Yv;var wo={},wi="rc-table-internal-hook";function J0(e){var t=C.createContext(void 0),r=function(o){var a=o.value,u=o.children,l=C.useRef(a);l.current=a;var f=C.useState(function(){return{getValue:function(){return l.current},listeners:new Set}}),d=gt(f,1),p=d[0];return Ao(function(){Q4(function(){p.listeners.forEach(function(v){v(a)})})},[a]),C.createElement(t.Provider,{value:p},u)};return{Context:t,Provider:r,defaultValue:e}}function Gr(e,t){var r=In(typeof t=="function"?t:function(v){if(t===void 0)return v;if(!Array.isArray(t))return v[t];var g={};return t.forEach(function(b){g[b]=v[b]}),g}),n=C.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,u=o.getValue,l=C.useRef();l.current=r(n?u():e==null?void 0:e.defaultValue);var f=C.useState({}),d=gt(f,2),p=d[1];return Ao(function(){if(!n)return;function v(g){var b=r(g);So(l.current,b,!0)||p({})}return a.add(v),function(){a.delete(v)}},[n]),l.current}function Gv(){var e=C.createContext(null);function t(){return C.useContext(e)}function r(o,a){var u=fs(o),l=function(d,p){var v=u?{ref:p}:{},g=C.useRef(0),b=C.useRef(d),x=t();return x!==null?C.createElement(o,xt({},d,v)):((!a||a(b.current,d))&&(g.current+=1),b.current=d,C.createElement(e.Provider,{value:g.current},C.createElement(o,xt({},d,v))))};return u?C.forwardRef(l):l}function n(o,a){var u=fs(o),l=function(d,p){var v=u?{ref:p}:{};return t(),C.createElement(o,xt({},d,v))};return u?C.memo(C.forwardRef(l),a):C.memo(l,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var Q0=Gv(),Xp=Q0.makeImmutable,ka=Q0.responseImmutable,Zv=Q0.useImmutableMark,rn=J0(),Yp=C.createContext({renderWithProps:!1}),Jv="RC_TABLE_KEY";function Qv(e){return e==null?[]:Array.isArray(e)?e:[e]}function Us(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,u=o.dataIndex,l=a||Qv(u).join("-")||Jv;r[l];)l="".concat(l,"_next");r[l]=!0,t.push(l)}),t}function Xu(e){return e!=null}function e5(e){return typeof e=="number"&&!Number.isNaN(e)}function t5(e){return e&&Cn(e)==="object"&&!Array.isArray(e)&&!C.isValidElement(e)}function r5(e,t,r,n,o,a){var u=C.useContext(Yp),l=Zv(),f=T0(function(){if(Xu(n))return[n];var d=t==null||t===""?[]:Array.isArray(t)?t:[t],p=j0(e,d),v=p,g=void 0;if(o){var b=o(p,e,r);t5(b)?(v=b.children,g=b.props,u.renderWithProps=!0):v=b}return[v,g]},[l,e,n,t,o,r],function(d,p){if(a){var v=gt(d,2),g=v[1],b=gt(p,2),x=b[1];return a(x,g)}return u.renderWithProps?!0:!So(d,p,!0)});return f}function n5(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function o5(e,t){return Gr(rn,function(r){var n=n5(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var a5=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,a,u=r===!0?{showTitle:!0}:r;return u&&(u.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?a=o.toString():C.isValidElement(o)&&typeof o.props.children=="string"&&(a=o.props.children)),a};function i5(e){var t,r,n,o,a,u,l,f,d=e.component,p=e.children,v=e.ellipsis,g=e.scope,b=e.prefixCls,x=e.className,D=e.align,m=e.record,S=e.render,F=e.dataIndex,B=e.renderIndex,O=e.shouldCellUpdate,A=e.index,P=e.rowType,T=e.colSpan,_=e.rowSpan,M=e.fixLeft,q=e.fixRight,L=e.firstFixLeft,Y=e.lastFixLeft,V=e.firstFixRight,z=e.lastFixRight,K=e.appendNode,X=e.additionalProps,W=X===void 0?{}:X,J=e.isSticky,R="".concat(b,"-cell"),ie=Gr(rn,["supportSticky","allColumnsFixedLeft","rowHoverable"]),me=ie.supportSticky,xe=ie.allColumnsFixedLeft,ge=ie.rowHoverable,ae=r5(m,F,B,p,S,O),ke=gt(ae,2),Z=ke[0],he=ke[1],se={},te=typeof M=="number"&&me,ce=typeof q=="number"&&me;te&&(se.position="sticky",se.left=M),ce&&(se.position="sticky",se.right=q);var Ce=(t=(r=(n=he==null?void 0:he.colSpan)!==null&&n!==void 0?n:W.colSpan)!==null&&r!==void 0?r:T)!==null&&t!==void 0?t:1,we=(o=(a=(u=he==null?void 0:he.rowSpan)!==null&&u!==void 0?u:W.rowSpan)!==null&&a!==void 0?a:_)!==null&&o!==void 0?o:1,Se=o5(A,we),Ee=gt(Se,2),Ae=Ee[0],$e=Ee[1],Te=In(function(ft){var it;m&&$e(A,A+we-1),W==null||(it=W.onMouseEnter)===null||it===void 0||it.call(W,ft)}),He=In(function(ft){var it;m&&$e(-1,-1),W==null||(it=W.onMouseLeave)===null||it===void 0||it.call(W,ft)});if(Ce===0||we===0)return null;var pt=(l=W.title)!==null&&l!==void 0?l:a5({rowType:P,ellipsis:v,children:Z}),at=rt(R,x,(f={},Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(f,"".concat(R,"-fix-left"),te&&me),"".concat(R,"-fix-left-first"),L&&me),"".concat(R,"-fix-left-last"),Y&&me),"".concat(R,"-fix-left-all"),Y&&xe&&me),"".concat(R,"-fix-right"),ce&&me),"".concat(R,"-fix-right-first"),V&&me),"".concat(R,"-fix-right-last"),z&&me),"".concat(R,"-ellipsis"),v),"".concat(R,"-with-append"),K),"".concat(R,"-fix-sticky"),(te||ce)&&J&&me),Ne(f,"".concat(R,"-row-hover"),!he&&Ae)),W.className,he==null?void 0:he.className),Me={};D&&(Me.textAlign=D);var Le=je(je(je(je({},he==null?void 0:he.style),se),Me),W.style),Xe=Z;return Cn(Xe)==="object"&&!Array.isArray(Xe)&&!C.isValidElement(Xe)&&(Xe=null),v&&(Y||V)&&(Xe=C.createElement("span",{className:"".concat(R,"-content")},Xe)),C.createElement(d,xt({},he,W,{className:at,style:Le,title:pt,scope:g,onMouseEnter:ge?Te:void 0,onMouseLeave:ge?He:void 0,colSpan:Ce!==1?Ce:null,rowSpan:we!==1?we:null}),K,Xe)}const Sa=C.memo(i5);function ec(e,t,r,n,o){var a=r[e]||{},u=r[t]||{},l,f;a.fixed==="left"?l=n.left[o==="rtl"?t:e]:u.fixed==="right"&&(f=n.right[o==="rtl"?e:t]);var d=!1,p=!1,v=!1,g=!1,b=r[t+1],x=r[e-1],D=b&&!b.fixed||x&&!x.fixed||r.every(function(O){return O.fixed==="left"});if(o==="rtl"){if(l!==void 0){var m=x&&x.fixed==="left";g=!m&&D}else if(f!==void 0){var S=b&&b.fixed==="right";v=!S&&D}}else if(l!==void 0){var F=b&&b.fixed==="left";d=!F&&D}else if(f!==void 0){var B=x&&x.fixed==="right";p=!B&&D}return{fixLeft:l,fixRight:f,lastFixLeft:d,firstFixRight:p,lastFixRight:v,firstFixLeft:g,isSticky:n.isSticky}}var Gp=C.createContext({});function s5(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,u=e.rowSpan,l=e.align,f=Gr(rn,["prefixCls","direction"]),d=f.prefixCls,p=f.direction,v=C.useContext(Gp),g=v.scrollColumnIndex,b=v.stickyOffsets,x=v.flattenColumns,D=r+a-1,m=D+1===g?a+1:a,S=ec(r,r+m-1,x,b,p);return C.createElement(Sa,xt({className:t,index:r,component:"td",prefixCls:d,record:null,dataIndex:null,align:l,colSpan:m,rowSpan:u,render:function(){return n}},S))}var l5=["children"];function u5(e){var t=e.children,r=gr(e,l5);return C.createElement("tr",r,t)}function Xs(e){var t=e.children;return t}Xs.Row=u5;Xs.Cell=s5;function c5(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Gr(rn,"prefixCls"),a=n.length-1,u=n[a],l=C.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:u!=null&&u.scrollbar?a:null}},[u,n,a,r]);return C.createElement(Gp.Provider,{value:l},C.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const Ii=ka(c5);var Zp=Xs;function d5(e){return null}function f5(e){return null}function Jp(e,t,r,n,o,a,u){var l=a(t,u);e.push({record:t,indent:r,index:u,rowKey:l});var f=o==null?void 0:o.has(l);if(t&&Array.isArray(t[n])&&f)for(var d=0;d<t[n].length;d+=1)Jp(e,t[n][d],r+1,n,o,a,d)}function Qp(e,t,r,n){var o=C.useMemo(function(){if(r!=null&&r.size){for(var a=[],u=0;u<(e==null?void 0:e.length);u+=1){var l=e[u];Jp(a,l,0,t,r,n,u)}return a}return e==null?void 0:e.map(function(f,d){return{record:f,indent:0,index:d,rowKey:n(f,d)}})},[e,t,r,n]);return o}function em(e,t,r,n){var o=Gr(rn,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,u=o.expandableType,l=o.expandedKeys,f=o.childrenColumnName,d=o.onTriggerExpand,p=o.rowExpandable,v=o.onRow,g=o.expandRowByClick,b=o.rowClassName,x=u==="nest",D=u==="row"&&(!p||p(e)),m=D||x,S=l&&l.has(t),F=f&&e&&e[f],B=In(d),O=v==null?void 0:v(e,r),A=O==null?void 0:O.onClick,P=function(q){g&&m&&d(e,q);for(var L=arguments.length,Y=new Array(L>1?L-1:0),V=1;V<L;V++)Y[V-1]=arguments[V];A==null||A.apply(void 0,[q].concat(Y))},T;typeof b=="string"?T=b:typeof b=="function"&&(T=b(e,r,n));var _=Us(a);return je(je({},o),{},{columnsKey:_,nestExpandable:x,expanded:S,hasNestChildren:F,record:e,onTriggerExpand:B,rowSupportExpand:D,expandable:m,rowProps:je(je({},O),{},{className:rt(T,O==null?void 0:O.className),onClick:P})})}function tm(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,u=e.expanded,l=e.colSpan,f=e.isEmpty,d=e.stickyOffset,p=d===void 0?0:d,v=Gr(rn,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),g=v.scrollbarSize,b=v.fixHeader,x=v.fixColumn,D=v.componentWidth,m=v.horizonScroll,S=r;return(f?m&&D:x)&&(S=C.createElement("div",{style:{width:D-p-(b&&!f?g:0),position:"sticky",left:p,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},S)),C.createElement(n,{className:a,style:{display:u?null:"none"}},C.createElement(Sa,{component:o,prefixCls:t,colSpan:l},S))}function h5(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,u="".concat(t,"-row-expand-icon");if(!a)return C.createElement("span",{className:rt(u,"".concat(t,"-row-spaced"))});var l=function(d){n(r,d),d.stopPropagation()};return C.createElement("span",{className:rt(u,Ne(Ne({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:l})}function p5(e,t,r){var n=[];function o(a){(a||[]).forEach(function(u,l){n.push(t(u,l)),o(u[r])})}return o(e),n}function rm(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function nm(e,t,r,n,o){var a,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,f=e.record,d=e.prefixCls,p=e.columnsKey,v=e.fixedInfoList,g=e.expandIconColumnIndex,b=e.nestExpandable,x=e.indentSize,D=e.expandIcon,m=e.expanded,S=e.hasNestChildren,F=e.onTriggerExpand,B=e.expandable,O=e.expandedKeys,A=p[r],P=v[r],T;r===(g||0)&&b&&(T=C.createElement(C.Fragment,null,C.createElement("span",{style:{paddingLeft:"".concat(x*n,"px")},className:"".concat(d,"-row-indent indent-level-").concat(n)}),D({prefixCls:d,expanded:m,expandable:S,record:f,onExpand:F})));var _=((a=t.onCell)===null||a===void 0?void 0:a.call(t,f,o))||{};if(l){var M=_.rowSpan,q=M===void 0?1:M;if(B&&q&&r<l){for(var L=q,Y=o;Y<o+q;Y+=1){var V=u[Y];O.has(V)&&(L+=1)}_.rowSpan=L}}return{key:A,fixedInfo:P,appendCellNode:T,additionalCellProps:_}}function m5(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,u=e.rowKey,l=e.rowKeys,f=e.indent,d=f===void 0?0:f,p=e.rowComponent,v=e.cellComponent,g=e.scopeCellComponent,b=e.expandedRowInfo,x=em(n,u,o,d),D=x.prefixCls,m=x.flattenColumns,S=x.expandedRowClassName,F=x.expandedRowRender,B=x.rowProps,O=x.expanded,A=x.rowSupportExpand,P=C.useRef(!1);P.current||(P.current=O);var T=rm(S,n,o,d),_=C.createElement(p,xt({},B,{"data-row-key":u,className:rt(t,"".concat(D,"-row"),"".concat(D,"-row-level-").concat(d),B==null?void 0:B.className,Ne({},T,d>=1)),style:je(je({},r),B==null?void 0:B.style)}),m.map(function(L,Y){var V=L.render,z=L.dataIndex,K=L.className,X=nm(x,L,Y,d,o,l,b==null?void 0:b.offset),W=X.key,J=X.fixedInfo,R=X.appendCellNode,ie=X.additionalCellProps;return C.createElement(Sa,xt({className:K,ellipsis:L.ellipsis,align:L.align,scope:L.rowScope,component:L.rowScope?g:v,prefixCls:D,key:W,record:n,index:o,renderIndex:a,dataIndex:z,render:V,shouldCellUpdate:L.shouldCellUpdate},J,{appendNode:R,additionalProps:ie}))})),M;if(A&&(P.current||O)){var q=F(n,o,d+1,O);M=C.createElement(tm,{expanded:O,className:rt("".concat(D,"-expanded-row"),"".concat(D,"-expanded-row-level-").concat(d+1),T),prefixCls:D,component:p,cellComponent:v,colSpan:b?b.colSpan:m.length,stickyOffset:b==null?void 0:b.sticky,isEmpty:!1},q)}return C.createElement(C.Fragment,null,_,M)}const g5=ka(m5);function v5(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=C.useRef();return Ao(function(){a.current&&r(t,a.current.offsetWidth)},[]),C.createElement(_0,{data:t},C.createElement("th",{ref:a,className:"".concat(n,"-measure-cell")},C.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function b5(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,a=C.useRef(null),u=Gr(rn,["measureRowRender"]),l=u.measureRowRender,f=C.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:a,tabIndex:-1},C.createElement(_0.Collection,{onBatchResize:function(p){ip(a.current)&&p.forEach(function(v){var g=v.data,b=v.size;n(g,b.offsetWidth)})}},r.map(function(d){var p=o.find(function(b){return b.key===d}),v=p==null?void 0:p.title,g=C.isValidElement(v)?C.cloneElement(v,{ref:null}):v;return C.createElement(v5,{prefixCls:t,key:d,columnKey:d,onColumnResize:n,title:g})})));return l?l(f):f}function y5(e){var t=e.data,r=e.measureColumnWidth,n=Gr(rn,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,u=n.onColumnResize,l=n.flattenColumns,f=n.getRowKey,d=n.expandedKeys,p=n.childrenColumnName,v=n.emptyNode,g=n.expandedRowOffset,b=g===void 0?0:g,x=n.colWidths,D=Qp(t,p,d,f),m=C.useMemo(function(){return D.map(function(M){return M.rowKey})},[D]),S=C.useRef({renderWithProps:!1}),F=C.useMemo(function(){for(var M=l.length-b,q=0,L=0;L<b;L+=1)q+=x[L]||0;return{offset:b,colSpan:M,sticky:q}},[l.length,b,x]),B=a(["body","wrapper"],"tbody"),O=a(["body","row"],"tr"),A=a(["body","cell"],"td"),P=a(["body","cell"],"th"),T;t.length?T=D.map(function(M,q){var L=M.record,Y=M.indent,V=M.index,z=M.rowKey;return C.createElement(g5,{key:z,rowKey:z,rowKeys:m,record:L,index:q,renderIndex:V,rowComponent:O,cellComponent:A,scopeCellComponent:P,indent:Y,expandedRowInfo:F})}):T=C.createElement(tm,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:O,cellComponent:A,colSpan:l.length,isEmpty:!0},v);var _=Us(l);return C.createElement(Yp.Provider,{value:S.current},C.createElement(B,{className:"".concat(o,"-tbody")},r&&C.createElement(b5,{prefixCls:o,columnsKey:_,onColumnResize:u,columns:l}),T))}const x5=ka(y5);var w5=["expandable"],Xa="RC_TABLE_INTERNAL_COL_DEFINE";function C5(e){var t=e.expandable,r=gr(e,w5),n;return"expandable"in e?n=je(je({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var D5=["columnType"];function om(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Gr(rn,["tableLayout"]),a=o.tableLayout,u=[],l=n||r.length,f=!1,d=l-1;d>=0;d-=1){var p=t[d],v=r&&r[d],g=void 0,b=void 0;if(v&&(g=v[Xa],a==="auto"&&(b=v.minWidth)),p||b||g||f){var x=g||{};x.columnType;var D=gr(x,D5);u.unshift(C.createElement("col",xt({key:d,style:{width:p,minWidth:b}},D))),f=!0}}return u.length>0?C.createElement("colgroup",null,u):null}var E5=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function k5(e,t){return Ct(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 S5=C.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,u=e.colWidths,l=e.colGroup,f=e.columCount,d=e.stickyOffsets,p=e.direction,v=e.fixHeader,g=e.stickyTopOffset,b=e.stickyBottomOffset,x=e.stickyClassName,D=e.scrollX,m=e.tableLayout,S=m===void 0?"fixed":m,F=e.onScroll,B=e.children,O=gr(e,E5),A=Gr(rn,["prefixCls","scrollbarSize","isSticky","getComponent"]),P=A.prefixCls,T=A.scrollbarSize,_=A.isSticky,M=A.getComponent,q=M(["header","table"],"table"),L=_&&!v?0:T,Y=C.useRef(null),V=C.useCallback(function(me){Vd(t,me),Vd(Y,me)},[]);C.useEffect(function(){function me(ge){var ae=ge,ke=ae.currentTarget,Z=ae.deltaX;Z&&(F({currentTarget:ke,scrollLeft:ke.scrollLeft+Z}),ge.preventDefault())}var xe=Y.current;return xe==null||xe.addEventListener("wheel",me,{passive:!1}),function(){xe==null||xe.removeEventListener("wheel",me)}},[]);var z=a[a.length-1],K={fixed:z?z.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(P,"-cell-scrollbar")}}},X=Ct(function(){return L?[].concat(zt(o),[K]):o},[L,o]),W=Ct(function(){return L?[].concat(zt(a),[K]):a},[L,a]),J=Ct(function(){var me=d.right,xe=d.left;return je(je({},d),{},{left:p==="rtl"?[].concat(zt(xe.map(function(ge){return ge+L})),[0]):xe,right:p==="rtl"?me:[].concat(zt(me.map(function(ge){return ge+L})),[0]),isSticky:_})},[L,d,_]),R=k5(u,f),ie=Ct(function(){var me=!R||!R.length||R.every(function(xe){return!xe});return n||me},[n,R]);return C.createElement("div",{style:je({overflow:"hidden"},_?{top:g,bottom:b}:{}),ref:V,className:rt(r,Ne({},x,!!x))},C.createElement(q,{style:{tableLayout:S,minWidth:"100%",width:D}},ie?l:C.createElement(om,{colWidths:[].concat(zt(R),[L]),columCount:f+1,columns:W}),B(je(je({},O),{},{stickyOffsets:J,columns:X,flattenColumns:W}))))});const ff=C.memo(S5);var A5=function(t){var r=t.cells,n=t.stickyOffsets,o=t.flattenColumns,a=t.rowComponent,u=t.cellComponent,l=t.onHeaderRow,f=t.index,d=Gr(rn,["prefixCls","direction"]),p=d.prefixCls,v=d.direction,g;l&&(g=l(r.map(function(x){return x.column}),f));var b=Us(r.map(function(x){return x.column}));return C.createElement(a,g,r.map(function(x,D){var m=x.column,S=ec(x.colStart,x.colEnd,o,n,v),F;return m&&m.onHeaderCell&&(F=x.column.onHeaderCell(m)),C.createElement(Sa,xt({},x,{scope:m.title?x.colSpan>1?"colgroup":"col":null,ellipsis:m.ellipsis,align:m.align,component:u,prefixCls:p,key:b[D]},S,{additionalProps:F,rowType:"header"}))}))};function B5(e){var t=[];function r(u,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[f]=t[f]||[];var d=l,p=u.filter(Boolean).map(function(v){var g={key:v.key,className:v.className||"",children:v.title,column:v,colStart:d},b=1,x=v.children;return x&&x.length>0&&(b=r(x,d,f+1).reduce(function(D,m){return D+m},0),g.hasSubColumns=!0),"colSpan"in v&&(b=v.colSpan),"rowSpan"in v&&(g.rowSpan=v.rowSpan),g.colSpan=b,g.colEnd=g.colStart+b-1,t[f].push(g),d+=b,b});return p}r(e,0);for(var n=t.length,o=function(l){t[l].forEach(function(f){!("rowSpan"in f)&&!f.hasSubColumns&&(f.rowSpan=n-l)})},a=0;a<n;a+=1)o(a);return t}var F5=function(t){var r=t.stickyOffsets,n=t.columns,o=t.flattenColumns,a=t.onHeaderRow,u=Gr(rn,["prefixCls","getComponent"]),l=u.prefixCls,f=u.getComponent,d=C.useMemo(function(){return B5(n)},[n]),p=f(["header","wrapper"],"thead"),v=f(["header","row"],"tr"),g=f(["header","cell"],"th");return C.createElement(p,{className:"".concat(l,"-thead")},d.map(function(b,x){var D=C.createElement(A5,{key:x,flattenColumns:o,cells:b,stickyOffsets:r,rowComponent:v,cellComponent:g,onHeaderRow:a,index:x});return D}))};const hf=ka(F5);function pf(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 N5(e,t,r){return C.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(g){var b=pf(t,g.width);b?n+=b:o+=1});var a=Math.max(t,r),u=Math.max(a-n,o),l=o,f=u/o,d=0,p=e.map(function(g){var b=je({},g),x=pf(t,b.width);if(x)b.width=x;else{var D=Math.floor(f);b.width=l===1?u:D,u-=D,l-=1}return d+=b.width,b});if(d<a){var v=a/d;u=a,p.forEach(function(g,b){var x=Math.floor(g.width*v);g.width=b===p.length-1?u:x,u-=x})}return[p,Math.max(d,a)]}return[e,t]},[e,t,r])}var $5=["children"],M5=["fixed"];function tc(e){return js(e).filter(function(t){return C.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=gr(n,$5),u=je({key:r},a);return o&&(u.children=tc(o)),u})}function am(e){return e.filter(function(t){return t&&Cn(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?je(je({},t),{},{children:am(r)}):t})}function Yu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&Cn(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,u=a===!0?"left":a,l="".concat(t,"-").concat(o),f=n.children;return f&&f.length>0?[].concat(zt(r),zt(Yu(f,l).map(function(d){var p;return je(je({},d),{},{fixed:(p=d.fixed)!==null&&p!==void 0?p:u})}))):[].concat(zt(r),[je(je({key:l},n),{},{fixed:u})])},[])}function O5(e){return e.map(function(t){var r=t.fixed,n=gr(t,M5),o=r;return r==="left"?o="right":r==="right"&&(o="left"),je({fixed:o},n)})}function T5(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,u=e.expandedKeys,l=e.columnTitle,f=e.getRowKey,d=e.onTriggerExpand,p=e.expandIcon,v=e.rowExpandable,g=e.expandIconColumnIndex,b=e.expandedRowOffset,x=b===void 0?0:b,D=e.direction,m=e.expandRowByClick,S=e.columnWidth,F=e.fixed,B=e.scrollWidth,O=e.clientWidth,A=C.useMemo(function(){var z=n||tc(o)||[];return am(z.slice())},[n,o]),P=C.useMemo(function(){if(a){var z=A.slice();if(!z.includes(wo)){var K=g||0,X=K===0&&F==="right"?A.length:K;X>=0&&z.splice(X,0,wo)}var W=z.indexOf(wo);z=z.filter(function(me,xe){return me!==wo||xe===W});var J=A[W],R;F?R=F:R=J?J.fixed:null;var ie=Ne(Ne(Ne(Ne(Ne(Ne({},Xa,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",l),"fixed",R),"className","".concat(r,"-row-expand-icon-cell")),"width",S),"render",function(xe,ge,ae){var ke=f(ge,ae),Z=u.has(ke),he=v?v(ge):!0,se=p({prefixCls:r,expanded:Z,expandable:he,record:ge,onExpand:d});return m?C.createElement("span",{onClick:function(ce){return ce.stopPropagation()}},se):se});return z.map(function(me,xe){var ge=me===wo?ie:me;return xe<x?je(je({},ge),{},{fixed:ge.fixed||"left"}):ge})}return A.filter(function(me){return me!==wo})},[a,A,f,u,p,D,x]),T=C.useMemo(function(){var z=P;return t&&(z=t(z)),z.length||(z=[{render:function(){return null}}]),z},[t,P,D]),_=C.useMemo(function(){return D==="rtl"?O5(Yu(T)):Yu(T)},[T,D,B]),M=C.useMemo(function(){for(var z=-1,K=_.length-1;K>=0;K-=1){var X=_[K].fixed;if(X==="left"||X===!0){z=K;break}}if(z>=0)for(var W=0;W<=z;W+=1){var J=_[W].fixed;if(J!=="left"&&J!==!0)return!0}var R=_.findIndex(function(xe){var ge=xe.fixed;return ge==="right"});if(R>=0)for(var ie=R;ie<_.length;ie+=1){var me=_[ie].fixed;if(me!=="right")return!0}return!1},[_]),q=N5(_,B,O),L=gt(q,2),Y=L[0],V=L[1];return[T,Y,V,M]}function R5(e,t,r){var n=C5(e),o=n.expandIcon,a=n.expandedRowKeys,u=n.defaultExpandedRowKeys,l=n.defaultExpandAllRows,f=n.expandedRowRender,d=n.onExpand,p=n.onExpandedRowsChange,v=n.childrenColumnName,g=o||h5,b=v||"children",x=C.useMemo(function(){return f?"row":e.expandable&&e.internalHooks===wi&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(A){return A&&Cn(A)==="object"&&A[b]})?"nest":!1},[!!f,t]),D=C.useState(function(){return u||(l?p5(t,r,b):[])}),m=gt(D,2),S=m[0],F=m[1],B=C.useMemo(function(){return new Set(a||S||[])},[a,S]),O=C.useCallback(function(A){var P=r(A,t.indexOf(A)),T,_=B.has(P);_?(B.delete(P),T=zt(B)):T=[].concat(zt(B),[P]),F(T),d&&d(!_,A),p&&p(T)},[r,B,t,d,p]);return[n,x,B,g,b,O]}function I5(e,t,r){var n=e.map(function(o,a){return ec(a,a,e,t,r)});return T0(function(){return n},[n],function(o,a){return!So(o,a)})}function P5(e){var t=Lt(e),r=Ot({}),n=gt(r,2),o=n[1],a=Lt(null),u=Lt([]);function l(f){u.current.push(f);var d=Promise.resolve();a.current=d,d.then(function(){if(a.current===d){var p=u.current,v=t.current;u.current=[],p.forEach(function(g){t.current=g(t.current)}),a.current=null,v!==t.current&&o({})}})}return er(function(){return function(){a.current=null}},[]),[t.current,l]}function z5(e){var t=Lt(null),r=Lt();function n(){window.clearTimeout(r.current)}function o(u){t.current=u,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return er(function(){return n},[]),[o,a]}function j5(){var e=C.useState(-1),t=gt(e,2),r=t[0],n=t[1],o=C.useState(-1),a=gt(o,2),u=a[0],l=a[1],f=C.useCallback(function(d,p){n(d),l(p)},[]);return[r,u,f]}var mf=np()?window:null;function _5(e,t){var r=Cn(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,u=a===void 0?0:a,l=r.offsetScroll,f=l===void 0?0:l,d=r.getContainer,p=d===void 0?function(){return mf}:d,v=p()||mf,g=!!e;return C.useMemo(function(){return{isSticky:g,stickyClassName:g?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:u,offsetScroll:f,container:v}},[g,f,o,u,t,v])}function L5(e,t,r){var n=Ct(function(){var o=t.length,a=function(d,p,v){for(var g=[],b=0,x=d;x!==p;x+=v)g.push(b),t[x].fixed&&(b+=e[x]||0);return g},u=a(0,o,1),l=a(o-1,-1,-1).reverse();return r==="rtl"?{left:l,right:u}:{left:u,right:l}},[e,t,r]);return n}function gf(e){var t=e.className,r=e.children;return C.createElement("div",{className:t},r)}function vf(e){var t=L0(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 H5=function(t,r){var n,o,a=t.scrollBodyRef,u=t.onScroll,l=t.offsetScroll,f=t.container,d=t.direction,p=Gr(rn,"prefixCls"),v=((n=a.current)===null||n===void 0?void 0:n.scrollWidth)||0,g=((o=a.current)===null||o===void 0?void 0:o.clientWidth)||0,b=v&&g*(g/v),x=C.useRef(),D=P5({scrollLeft:0,isHiddenScrollBar:!0}),m=gt(D,2),S=m[0],F=m[1],B=C.useRef({delta:0,x:0}),O=C.useState(!1),A=gt(O,2),P=A[0],T=A[1],_=C.useRef(null);C.useEffect(function(){return function(){An.cancel(_.current)}},[]);var M=function(){T(!1)},q=function(K){K.persist(),B.current.delta=K.pageX-S.scrollLeft,B.current.x=0,T(!0),K.preventDefault()},L=function(K){var X,W=K||((X=window)===null||X===void 0?void 0:X.event),J=W.buttons;if(!P||J===0){P&&T(!1);return}var R=B.current.x+K.pageX-B.current.x-B.current.delta,ie=d==="rtl";R=Math.max(ie?b-g:0,Math.min(ie?0:g-b,R));var me=!ie||Math.abs(R)+Math.abs(b)<g;me&&(u({scrollLeft:R/g*(v+2)}),B.current.x=K.pageX)},Y=function(){An.cancel(_.current),_.current=An(function(){if(a.current){var K=vf(a.current).top,X=K+a.current.offsetHeight,W=f===window?document.documentElement.scrollTop+window.innerHeight:vf(f).top+f.clientHeight;F(function(J){return je(je({},J),{},{isHiddenScrollBar:X-Ud()<=W||K>=W-l})})}})},V=function(K){F(function(X){return je(je({},X),{},{scrollLeft:v?K/v*g:0})})};return C.useImperativeHandle(r,function(){return{setScrollLeft:V,checkScrollBarVisible:Y}}),C.useEffect(function(){var z=Eo(document.body,"mouseup",M,!1),K=Eo(document.body,"mousemove",L,!1);return Y(),function(){z.remove(),K.remove()}},[b,P]),C.useEffect(function(){if(a.current){for(var z=[],K=L0(a.current);K;)z.push(K),K=K.parentElement;return z.forEach(function(X){return X.addEventListener("scroll",Y,!1)}),window.addEventListener("resize",Y,!1),window.addEventListener("scroll",Y,!1),f.addEventListener("scroll",Y,!1),function(){z.forEach(function(X){return X.removeEventListener("scroll",Y)}),window.removeEventListener("resize",Y),window.removeEventListener("scroll",Y),f.removeEventListener("scroll",Y)}}},[f]),C.useEffect(function(){S.isHiddenScrollBar||F(function(z){var K=a.current;return K?je(je({},z),{},{scrollLeft:K.scrollLeft/K.scrollWidth*K.clientWidth}):z})},[S.isHiddenScrollBar]),v<=g||!b||S.isHiddenScrollBar?null:C.createElement("div",{style:{height:Ud(),width:g,bottom:l},className:"".concat(p,"-sticky-scroll")},C.createElement("div",{onMouseDown:q,ref:x,className:rt("".concat(p,"-sticky-scroll-bar"),Ne({},"".concat(p,"-sticky-scroll-bar-active"),P)),style:{width:"".concat(b,"px"),transform:"translate3d(".concat(S.scrollLeft,"px, 0, 0)")}}))};const K5=C.forwardRef(H5);var im="rc-table",q5=[],W5={};function V5(){return"No Data"}function U5(e,t){var r=je({rowKey:"key",prefixCls:im,emptyText:V5},e),n=r.prefixCls,o=r.className,a=r.rowClassName,u=r.style,l=r.data,f=r.rowKey,d=r.scroll,p=r.tableLayout,v=r.direction,g=r.title,b=r.footer,x=r.summary,D=r.caption,m=r.id,S=r.showHeader,F=r.components,B=r.emptyText,O=r.onRow,A=r.onHeaderRow,P=r.measureRowRender,T=r.onScroll,_=r.internalHooks,M=r.transformColumns,q=r.internalRefs,L=r.tailor,Y=r.getContainerWidth,V=r.sticky,z=r.rowHoverable,K=z===void 0?!0:z,X=l||q5,W=!!X.length,J=_===wi,R=C.useCallback(function(Nt,Ut){return j0(F,Nt)||Ut},[F]),ie=C.useMemo(function(){return typeof f=="function"?f:function(Nt){var Ut=Nt&&Nt[f];return Ut}},[f]),me=R(["body"]),xe=j5(),ge=gt(xe,3),ae=ge[0],ke=ge[1],Z=ge[2],he=R5(r,X,ie),se=gt(he,6),te=se[0],ce=se[1],Ce=se[2],we=se[3],Se=se[4],Ee=se[5],Ae=d==null?void 0:d.x,$e=C.useState(0),Te=gt($e,2),He=Te[0],pt=Te[1],at=T5(je(je(je({},r),te),{},{expandable:!!te.expandedRowRender,columnTitle:te.columnTitle,expandedKeys:Ce,getRowKey:ie,onTriggerExpand:Ee,expandIcon:we,expandIconColumnIndex:te.expandIconColumnIndex,direction:v,scrollWidth:J&&L&&typeof Ae=="number"?Ae:null,clientWidth:He}),J?M:null),Me=gt(at,4),Le=Me[0],Xe=Me[1],ft=Me[2],it=Me[3],et=ft??Ae,$t=C.useMemo(function(){return{columns:Le,flattenColumns:Xe}},[Le,Xe]),Dt=C.useRef(),vt=C.useRef(),ht=C.useRef(),Pe=C.useRef();C.useImperativeHandle(t,function(){return{nativeElement:Dt.current,scrollTo:function(Ut){var Kr;if(ht.current instanceof HTMLElement){var nn=Ut.index,Rr=Ut.top,$n=Ut.key;if(e5(Rr)){var ot;(ot=ht.current)===null||ot===void 0||ot.scrollTo({top:Rr})}else{var on,zn=$n??ie(X[nn]);(on=ht.current.querySelector('[data-row-key="'.concat(zn,'"]')))===null||on===void 0||on.scrollIntoView()}}else(Kr=ht.current)!==null&&Kr!==void 0&&Kr.scrollTo&&ht.current.scrollTo(Ut)}}});var de=C.useRef(),bt=C.useState(!1),kt=gt(bt,2),Ft=kt[0],Et=kt[1],or=C.useState(!1),At=gt(or,2),Rt=At[0],tr=At[1],ur=C.useState(new Map),Bt=gt(ur,2),Ht=Bt[0],jt=Bt[1],Cr=Us(Xe),zr=Cr.map(function(Nt){return Ht.get(Nt)}),jr=C.useMemo(function(){return zr},[zr.join("_")]),Tr=L5(jr,Xe,v),vr=d&&Xu(d.y),pr=d&&Xu(et)||!!te.fixed,_t=pr&&Xe.some(function(Nt){var Ut=Nt.fixed;return Ut}),w=C.useRef(),E=_5(V,n),Ie=E.isSticky,$=E.offsetHeader,Q=E.offsetSummary,Zt=E.offsetScroll,nt=E.stickyClassName,Ke=E.container,wt=C.useMemo(function(){return x==null?void 0:x(X)},[x,X]),tt=(vr||Ie)&&C.isValidElement(wt)&&wt.type===Xs&&wt.props.fixed,Mt,ar,$r;vr&&(ar={overflowY:W?"scroll":"auto",maxHeight:d.y}),pr&&(Mt={overflowX:"auto"},vr||(ar={overflowY:"hidden"}),$r={width:et===!0?"auto":et,minWidth:"100%"});var ee=C.useCallback(function(Nt,Ut){jt(function(Kr){if(Kr.get(Nt)!==Ut){var nn=new Map(Kr);return nn.set(Nt,Ut),nn}return Kr})},[]),br=z5(),oe=gt(br,2),ue=oe[0],Oe=oe[1];function st(Nt,Ut){Ut&&(typeof Ut=="function"?Ut(Nt):Ut.scrollLeft!==Nt&&(Ut.scrollLeft=Nt,Ut.scrollLeft!==Nt&&setTimeout(function(){Ut.scrollLeft=Nt},0)))}var ze=In(function(Nt){var Ut=Nt.currentTarget,Kr=Nt.scrollLeft,nn=v==="rtl",Rr=typeof Kr=="number"?Kr:Ut.scrollLeft,$n=Ut||W5;if(!Oe()||Oe()===$n){var ot;ue($n),st(Rr,vt.current),st(Rr,ht.current),st(Rr,de.current),st(Rr,(ot=w.current)===null||ot===void 0?void 0:ot.setScrollLeft)}var on=Ut||vt.current;if(on){var zn=J&&L&&typeof et=="number"?et:on.scrollWidth,Dr=on.clientWidth;if(zn===Dr){Et(!1),tr(!1);return}nn?(Et(-Rr<zn-Dr),tr(-Rr>0)):(Et(Rr>0),tr(Rr<zn-Dr))}}),le=In(function(Nt){ze(Nt),T==null||T(Nt)}),Ye=function(){if(pr&&ht.current){var Ut;ze({currentTarget:L0(ht.current),scrollLeft:(Ut=ht.current)===null||Ut===void 0?void 0:Ut.scrollLeft})}else Et(!1),tr(!1)},Ue=function(Ut){var Kr,nn=Ut.width;(Kr=w.current)===null||Kr===void 0||Kr.checkScrollBarVisible();var Rr=Dt.current?Dt.current.offsetWidth:nn;J&&Y&&Dt.current&&(Rr=Y(Dt.current,Rr)||Rr),Rr!==He&&(Ye(),pt(Rr))},ut=C.useRef(!1);C.useEffect(function(){ut.current&&Ye()},[pr,l,Le.length]),C.useEffect(function(){ut.current=!0},[]);var fe=C.useState(0),De=gt(fe,2),ve=De[0],qe=De[1],ct=C.useState(!0),Vt=gt(ct,2),Tt=Vt[0],dt=Vt[1];Ao(function(){(!L||!J)&&(ht.current instanceof Element?qe(Xd(ht.current).width):qe(Xd(Pe.current).width)),dt(V2("position","sticky"))},[]),C.useEffect(function(){J&&q&&(q.body.current=ht.current)});var qt=C.useCallback(function(Nt){return C.createElement(C.Fragment,null,C.createElement(hf,Nt),tt==="top"&&C.createElement(Ii,Nt,wt))},[tt,wt]),Jr=C.useCallback(function(Nt){return C.createElement(Ii,Nt,wt)},[wt]),Ar=R(["table"],"table"),dn=C.useMemo(function(){return p||(_t?et==="max-content"?"auto":"fixed":vr||Ie||Xe.some(function(Nt){var Ut=Nt.ellipsis;return Ut})?"fixed":"auto")},[vr,_t,Xe,p,Ie]),yr,Qt={colWidths:jr,columCount:Xe.length,stickyOffsets:Tr,onHeaderRow:A,fixHeader:vr,scroll:d},cr=C.useMemo(function(){return W?null:typeof B=="function"?B():B},[W,B]),Vr=C.createElement(x5,{data:X,measureColumnWidth:vr||pr||Ie}),_r=C.createElement(om,{colWidths:Xe.map(function(Nt){var Ut=Nt.width;return Ut}),columns:Xe}),Yn=D!=null?C.createElement("caption",{className:"".concat(n,"-caption")},D):void 0,Oo=vs(r,{data:!0}),Gn=vs(r,{aria:!0});if(vr||Ie){var Zn;typeof me=="function"?(Zn=me(X,{scrollbarSize:ve,ref:ht,onScroll:ze}),Qt.colWidths=Xe.map(function(Nt,Ut){var Kr=Nt.width,nn=Ut===Xe.length-1?Kr-ve:Kr;return typeof nn=="number"&&!Number.isNaN(nn)?nn:0})):Zn=C.createElement("div",{style:je(je({},Mt),ar),onScroll:le,ref:ht,className:rt("".concat(n,"-body"))},C.createElement(Ar,xt({style:je(je({},$r),{},{tableLayout:dn})},Gn),Yn,_r,Vr,!tt&&wt&&C.createElement(Ii,{stickyOffsets:Tr,flattenColumns:Xe},wt)));var po=je(je(je({noData:!X.length},Qt),$t),{},{direction:v,stickyClassName:nt,scrollX:et,tableLayout:dn,onScroll:ze});yr=C.createElement(C.Fragment,null,S!==!1&&C.createElement(ff,xt({},po,{stickyTopOffset:$,className:"".concat(n,"-header"),ref:vt,colGroup:_r}),qt),Zn,tt&&tt!=="top"&&C.createElement(ff,xt({},po,{stickyBottomOffset:Q,className:"".concat(n,"-summary"),ref:de,colGroup:_r}),Jr),Ie&&ht.current&&ht.current instanceof Element&&C.createElement(K5,{ref:w,offsetScroll:Zt,scrollBodyRef:ht,onScroll:ze,container:Ke,direction:v}))}else yr=C.createElement("div",{style:je(je({},Mt),ar),className:rt("".concat(n,"-content")),onScroll:ze,ref:ht},C.createElement(Ar,xt({style:je(je({},$r),{},{tableLayout:dn})},Gn),Yn,_r,S!==!1&&C.createElement(hf,xt({},Qt,$t)),Vr,wt&&C.createElement(Ii,{stickyOffsets:Tr,flattenColumns:Xe},wt)));var be=C.createElement("div",xt({className:rt(n,o,Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne({},"".concat(n,"-rtl"),v==="rtl"),"".concat(n,"-ping-left"),Ft),"".concat(n,"-ping-right"),Rt),"".concat(n,"-layout-fixed"),p==="fixed"),"".concat(n,"-fixed-header"),vr),"".concat(n,"-fixed-column"),_t),"".concat(n,"-fixed-column-gapped"),_t&&it),"".concat(n,"-scroll-horizontal"),pr),"".concat(n,"-has-fix-left"),Xe[0]&&Xe[0].fixed),"".concat(n,"-has-fix-right"),Xe[Xe.length-1]&&Xe[Xe.length-1].fixed==="right")),style:u,id:m,ref:Dt},Oo),g&&C.createElement(gf,{className:"".concat(n,"-title")},g(X)),C.createElement("div",{ref:Pe,className:"".concat(n,"-container")},yr),b&&C.createElement(gf,{className:"".concat(n,"-footer")},b(X)));pr&&(be=C.createElement(_0,{onResize:Ue},be));var dr=I5(Xe,Tr,v),Nn=C.useMemo(function(){return{scrollX:et,prefixCls:n,getComponent:R,scrollbarSize:ve,direction:v,fixedInfoList:dr,isSticky:Ie,supportSticky:Tt,componentWidth:He,fixHeader:vr,fixColumn:_t,horizonScroll:pr,tableLayout:dn,rowClassName:a,expandedRowClassName:te.expandedRowClassName,expandIcon:we,expandableType:ce,expandRowByClick:te.expandRowByClick,expandedRowRender:te.expandedRowRender,expandedRowOffset:te.expandedRowOffset,onTriggerExpand:Ee,expandIconColumnIndex:te.expandIconColumnIndex,indentSize:te.indentSize,allColumnsFixedLeft:Xe.every(function(Nt){return Nt.fixed==="left"}),emptyNode:cr,columns:Le,flattenColumns:Xe,onColumnResize:ee,colWidths:jr,hoverStartRow:ae,hoverEndRow:ke,onHover:Z,rowExpandable:te.rowExpandable,onRow:O,getRowKey:ie,expandedKeys:Ce,childrenColumnName:Se,rowHoverable:K,measureRowRender:P}},[et,n,R,ve,v,dr,Ie,Tt,He,vr,_t,pr,dn,a,te.expandedRowClassName,we,ce,te.expandRowByClick,te.expandedRowRender,te.expandedRowOffset,Ee,te.expandIconColumnIndex,te.indentSize,cr,Le,Xe,ee,jr,ae,ke,Z,te.rowExpandable,O,ie,Ce,Se,K,P]);return C.createElement(rn.Provider,{value:Nn},be)}var X5=C.forwardRef(U5);function sm(e){return Xp(X5,e)}var Aa=sm();Aa.EXPAND_COLUMN=wo;Aa.INTERNAL_HOOKS=wi;Aa.Column=d5;Aa.ColumnGroup=f5;Aa.Summary=Zp;var rc=J0(null),lm=J0(null);function Y5(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function G5(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,u=e.component,l=e.renderIndex,f=e.record,d=e.style,p=e.className,v=e.inverse,g=e.getHeight,b=r.render,x=r.dataIndex,D=r.className,m=r.width,S=Gr(lm,["columnsOffset"]),F=S.columnsOffset,B=nm(t,r,n,o,a),O=B.key,A=B.fixedInfo,P=B.appendCellNode,T=B.additionalCellProps,_=T.style,M=T.colSpan,q=M===void 0?1:M,L=T.rowSpan,Y=L===void 0?1:L,V=n-1,z=Y5(V,q,F),K=q>1?m-z:0,X=je(je(je({},_),d),{},{flex:"0 0 ".concat(z,"px"),width:"".concat(z,"px"),marginRight:K,pointerEvents:"auto"}),W=C.useMemo(function(){return v?Y<=1:q===0||Y===0||Y>1},[Y,q,v]);W?X.visibility="hidden":v&&(X.height=g==null?void 0:g(Y));var J=W?function(){return null}:b,R={};return(Y===0||q===0)&&(R.rowSpan=1,R.colSpan=1),C.createElement(Sa,xt({className:rt(D,p),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:u,prefixCls:t.prefixCls,key:O,record:f,index:a,renderIndex:l,dataIndex:x,render:J,shouldCellUpdate:r.shouldCellUpdate},A,{appendNode:P,additionalProps:je(je({},T),{},{style:X},R)}))}var Z5=["data","index","className","rowKey","style","extra","getHeight"],J5=C.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,u=e.style,l=e.extra,f=e.getHeight,d=gr(e,Z5),p=r.record,v=r.indent,g=r.index,b=Gr(rn,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),x=b.scrollX,D=b.flattenColumns,m=b.prefixCls,S=b.fixColumn,F=b.componentWidth,B=Gr(rc,["getComponent"]),O=B.getComponent,A=em(p,a,n,v),P=O(["body","row"],"div"),T=O(["body","cell"],"div"),_=A.rowSupportExpand,M=A.expanded,q=A.rowProps,L=A.expandedRowRender,Y=A.expandedRowClassName,V;if(_&&M){var z=L(p,n,v+1,M),K=rm(Y,p,n,v),X={};S&&(X={style:Ne({},"--virtual-width","".concat(F,"px"))});var W="".concat(m,"-expanded-row-cell");V=C.createElement(P,{className:rt("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(v+1),K)},C.createElement(Sa,{component:T,prefixCls:m,className:rt(W,Ne({},"".concat(W,"-fixed"),S)),additionalProps:X},z))}var J=je(je({},u),{},{width:x});l&&(J.position="absolute",J.pointerEvents="none");var R=C.createElement(P,xt({},q,d,{"data-row-key":a,ref:_?null:t,className:rt(o,"".concat(m,"-row"),q==null?void 0:q.className,Ne({},"".concat(m,"-row-extra"),l)),style:je(je({},J),q==null?void 0:q.style)}),D.map(function(ie,me){return C.createElement(G5,{key:me,component:T,rowInfo:A,column:ie,colIndex:me,indent:v,index:n,renderIndex:g,record:p,inverse:l,getHeight:f})}));return _?C.createElement("div",{ref:t},R,V):R}),bf=ka(J5),Q5=C.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Gr(rn,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,u=o.onColumnResize,l=o.getRowKey,f=o.expandedKeys,d=o.prefixCls,p=o.childrenColumnName,v=o.scrollX,g=o.direction,b=Gr(rc),x=b.sticky,D=b.scrollY,m=b.listItemHeight,S=b.getComponent,F=b.onScroll,B=C.useRef(),O=Qp(r,p,f,l),A=C.useMemo(function(){var V=0;return a.map(function(z){var K=z.width,X=z.minWidth,W=z.key,J=Math.max(K||0,X||0);return V+=J,[W,J,V]})},[a]),P=C.useMemo(function(){return A.map(function(V){return V[2]})},[A]);C.useEffect(function(){A.forEach(function(V){var z=gt(V,2),K=z[0],X=z[1];u(K,X)})},[A]),C.useImperativeHandle(t,function(){var V,z={scrollTo:function(X){var W;(W=B.current)===null||W===void 0||W.scrollTo(X)},nativeElement:(V=B.current)===null||V===void 0?void 0:V.nativeElement};return Object.defineProperty(z,"scrollLeft",{get:function(){var X;return((X=B.current)===null||X===void 0?void 0:X.getScrollInfo().x)||0},set:function(X){var W;(W=B.current)===null||W===void 0||W.scrollTo({left:X})}}),Object.defineProperty(z,"scrollTop",{get:function(){var X;return((X=B.current)===null||X===void 0?void 0:X.getScrollInfo().y)||0},set:function(X){var W;(W=B.current)===null||W===void 0||W.scrollTo({top:X})}}),z});var T=function(z,K){var X,W=(X=O[K])===null||X===void 0?void 0:X.record,J=z.onCell;if(J){var R,ie=J(W,K);return(R=ie==null?void 0:ie.rowSpan)!==null&&R!==void 0?R:1}return 1},_=function(z){var K=z.start,X=z.end,W=z.getSize,J=z.offsetY;if(X<0)return null;for(var R=a.filter(function(Ce){return T(Ce,K)===0}),ie=K,me=function(we){if(R=R.filter(function(Se){return T(Se,we)===0}),!R.length)return ie=we,1},xe=K;xe>=0&&!me(xe);xe-=1);for(var ge=a.filter(function(Ce){return T(Ce,X)!==1}),ae=X,ke=function(we){if(ge=ge.filter(function(Se){return T(Se,we)!==1}),!ge.length)return ae=Math.max(we-1,X),1},Z=X;Z<O.length&&!ke(Z);Z+=1);for(var he=[],se=function(we){var Se=O[we];if(!Se)return 1;a.some(function(Ee){return T(Ee,we)>1})&&he.push(we)},te=ie;te<=ae;te+=1)se(te);var ce=he.map(function(Ce){var we=O[Ce],Se=l(we.record,Ce),Ee=function(Te){var He=Ce+Te-1,pt=l(O[He].record,He),at=W(Se,pt);return at.bottom-at.top},Ae=W(Se);return C.createElement(bf,{key:Ce,data:we,rowKey:Se,index:Ce,style:{top:-J+Ae.top},extra:!0,getHeight:Ee})});return ce},M=C.useMemo(function(){return{columnsOffset:P}},[P]),q="".concat(d,"-tbody"),L=S(["body","wrapper"]),Y={};return x&&(Y.position="sticky",Y.bottom=0,Cn(x)==="object"&&x.offsetScroll&&(Y.bottom=x.offsetScroll)),C.createElement(lm.Provider,{value:M},C.createElement(mp,{fullHeight:!1,ref:B,prefixCls:"".concat(q,"-virtual"),styles:{horizontalScrollBar:Y},className:q,height:D,itemHeight:m||24,data:O,itemKey:function(z){return l(z.record)},component:L,scrollWidth:v,direction:g,onVirtualScroll:function(z){var K,X=z.x;n({currentTarget:(K=B.current)===null||K===void 0?void 0:K.nativeElement,scrollLeft:X})},onScroll:F,extraRender:_},function(V,z,K){var X=l(V.record,z);return C.createElement(bf,{data:V,rowKey:X,index:z,style:K.style})}))}),e6=ka(Q5),t6=function(t,r){var n=r.ref,o=r.onScroll;return C.createElement(e6,{ref:n,data:t,onScroll:o})};function r6(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,u=e.prefixCls,l=u===void 0?im:u,f=e.className,d=e.listItemHeight,p=e.components,v=e.onScroll,g=o||{},b=g.x,x=g.y;typeof b!="number"&&(b=1),typeof x!="number"&&(x=500);var D=In(function(F,B){return j0(p,F)||B}),m=In(v),S=C.useMemo(function(){return{sticky:a,scrollY:x,listItemHeight:d,getComponent:D,onScroll:m}},[a,x,d,D,m]);return C.createElement(rc.Provider,{value:S},C.createElement(Aa,xt({},e,{className:rt(f,"".concat(l,"-virtual")),scroll:je(je({},o),{},{x:b}),components:je(je({},p),{},{body:r!=null&&r.length?t6:void 0}),columns:n,internalHooks:wi,tailor:!0,ref:t})))}var n6=C.forwardRef(r6);function um(e){return Xp(n6,e)}um();const o6=e=>null,a6=e=>null;var nc=C.createContext(null),i6=C.createContext({}),s6=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,a=t.isEnd,u="".concat(r,"-indent-unit"),l=[],f=0;f<n;f+=1)l.push(C.createElement("span",{key:f,className:rt(u,Ne(Ne({},"".concat(u,"-start"),o[f]),"".concat(u,"-end"),a[f]))}));return C.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},l)};const l6=C.memo(s6);var u6=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],yf="open",xf="close",c6="---",ri=function(t){var r,n,o,a=t.eventKey,u=t.className,l=t.style,f=t.dragOver,d=t.dragOverGapTop,p=t.dragOverGapBottom,v=t.isLeaf,g=t.isStart,b=t.isEnd,x=t.expanded,D=t.selected,m=t.checked,S=t.halfChecked,F=t.loading,B=t.domRef,O=t.active,A=t.data,P=t.onMouseMove,T=t.selectable,_=gr(t,u6),M=_e.useContext(nc),q=_e.useContext(i6),L=_e.useRef(null),Y=_e.useState(!1),V=gt(Y,2),z=V[0],K=V[1],X=!!(M.disabled||t.disabled||(r=q.nodeDisabled)!==null&&r!==void 0&&r.call(q,A)),W=_e.useMemo(function(){return!M.checkable||t.checkable===!1?!1:M.checkable},[M.checkable,t.checkable]),J=function(de){X||M.onNodeSelect(de,Lr(t))},R=function(de){X||!W||t.disableCheckbox||M.onNodeCheck(de,Lr(t),!m)},ie=_e.useMemo(function(){return typeof T=="boolean"?T:M.selectable},[T,M.selectable]),me=function(de){M.onNodeClick(de,Lr(t)),ie?J(de):R(de)},xe=function(de){M.onNodeDoubleClick(de,Lr(t))},ge=function(de){M.onNodeMouseEnter(de,Lr(t))},ae=function(de){M.onNodeMouseLeave(de,Lr(t))},ke=function(de){M.onNodeContextMenu(de,Lr(t))},Z=_e.useMemo(function(){return!!(M.draggable&&(!M.draggable.nodeDraggable||M.draggable.nodeDraggable(A)))},[M.draggable,A]),he=function(de){de.stopPropagation(),K(!0),M.onNodeDragStart(de,t);try{de.dataTransfer.setData("text/plain","")}catch{}},se=function(de){de.preventDefault(),de.stopPropagation(),M.onNodeDragEnter(de,t)},te=function(de){de.preventDefault(),de.stopPropagation(),M.onNodeDragOver(de,t)},ce=function(de){de.stopPropagation(),M.onNodeDragLeave(de,t)},Ce=function(de){de.stopPropagation(),K(!1),M.onNodeDragEnd(de,t)},we=function(de){de.preventDefault(),de.stopPropagation(),K(!1),M.onNodeDrop(de,t)},Se=function(de){F||M.onNodeExpand(de,Lr(t))},Ee=_e.useMemo(function(){var Pe=mn(M.keyEntities,a)||{},de=Pe.children;return!!(de||[]).length},[M.keyEntities,a]),Ae=_e.useMemo(function(){return v===!1?!1:v||!M.loadData&&!Ee||M.loadData&&t.loaded&&!Ee},[v,M.loadData,Ee,t.loaded]);_e.useEffect(function(){F||typeof M.loadData=="function"&&x&&!Ae&&!t.loaded&&M.onNodeLoad(Lr(t))},[F,M.loadData,M.onNodeLoad,x,Ae,t]);var $e=_e.useMemo(function(){var Pe;return(Pe=M.draggable)!==null&&Pe!==void 0&&Pe.icon?_e.createElement("span",{className:"".concat(M.prefixCls,"-draggable-icon")},M.draggable.icon):null},[M.draggable]),Te=function(de){var bt=t.switcherIcon||M.switcherIcon;return typeof bt=="function"?bt(je(je({},t),{},{isLeaf:de})):bt},He=function(){if(Ae){var de=Te(!0);return de!==!1?_e.createElement("span",{className:rt("".concat(M.prefixCls,"-switcher"),"".concat(M.prefixCls,"-switcher-noop"))},de):null}var bt=Te(!1);return bt!==!1?_e.createElement("span",{onClick:Se,className:rt("".concat(M.prefixCls,"-switcher"),"".concat(M.prefixCls,"-switcher_").concat(x?yf:xf))},bt):null},pt=_e.useMemo(function(){if(!W)return null;var Pe=typeof W!="boolean"?W:null;return _e.createElement("span",{className:rt("".concat(M.prefixCls,"-checkbox"),Ne(Ne(Ne({},"".concat(M.prefixCls,"-checkbox-checked"),m),"".concat(M.prefixCls,"-checkbox-indeterminate"),!m&&S),"".concat(M.prefixCls,"-checkbox-disabled"),X||t.disableCheckbox)),onClick:R,role:"checkbox","aria-checked":S?"mixed":m,"aria-disabled":X||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},Pe)},[W,m,S,X,t.disableCheckbox,t.title]),at=_e.useMemo(function(){return Ae?null:x?yf:xf},[Ae,x]),Me=_e.useMemo(function(){return _e.createElement("span",{className:rt("".concat(M.prefixCls,"-iconEle"),"".concat(M.prefixCls,"-icon__").concat(at||"docu"),Ne({},"".concat(M.prefixCls,"-icon_loading"),F))})},[M.prefixCls,at,F]),Le=_e.useMemo(function(){var Pe=!!M.draggable,de=!t.disabled&&Pe&&M.dragOverNodeKey===a;return de?M.dropIndicatorRender({dropPosition:M.dropPosition,dropLevelOffset:M.dropLevelOffset,indent:M.indent,prefixCls:M.prefixCls,direction:M.direction}):null},[M.dropPosition,M.dropLevelOffset,M.indent,M.prefixCls,M.direction,M.draggable,M.dragOverNodeKey,M.dropIndicatorRender]),Xe=_e.useMemo(function(){var Pe=t.title,de=Pe===void 0?c6:Pe,bt="".concat(M.prefixCls,"-node-content-wrapper"),kt;if(M.showIcon){var Ft=t.icon||M.icon;kt=Ft?_e.createElement("span",{className:rt("".concat(M.prefixCls,"-iconEle"),"".concat(M.prefixCls,"-icon__customize"))},typeof Ft=="function"?Ft(t):Ft):Me}else M.loadData&&F&&(kt=Me);var Et;return typeof de=="function"?Et=de(A):M.titleRender?Et=M.titleRender(A):Et=de,_e.createElement("span",{ref:L,title:typeof de=="string"?de:"",className:rt(bt,"".concat(bt,"-").concat(at||"normal"),Ne({},"".concat(M.prefixCls,"-node-selected"),!X&&(D||z))),onMouseEnter:ge,onMouseLeave:ae,onContextMenu:ke,onClick:me,onDoubleClick:xe},kt,_e.createElement("span",{className:"".concat(M.prefixCls,"-title")},Et),Le)},[M.prefixCls,M.showIcon,t,M.icon,Me,M.titleRender,A,at,ge,ae,ke,me,xe]),ft=vs(_,{aria:!0,data:!0}),it=mn(M.keyEntities,a)||{},et=it.level,$t=b[b.length-1],Dt=!X&&Z,vt=M.draggingNodeKey===a,ht=T!==void 0?{"aria-selected":!!T}:void 0;return _e.createElement("div",xt({ref:B,role:"treeitem","aria-expanded":v?void 0:x,className:rt(u,"".concat(M.prefixCls,"-treenode"),(o={},Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(o,"".concat(M.prefixCls,"-treenode-disabled"),X),"".concat(M.prefixCls,"-treenode-switcher-").concat(x?"open":"close"),!v),"".concat(M.prefixCls,"-treenode-checkbox-checked"),m),"".concat(M.prefixCls,"-treenode-checkbox-indeterminate"),S),"".concat(M.prefixCls,"-treenode-selected"),D),"".concat(M.prefixCls,"-treenode-loading"),F),"".concat(M.prefixCls,"-treenode-active"),O),"".concat(M.prefixCls,"-treenode-leaf-last"),$t),"".concat(M.prefixCls,"-treenode-draggable"),Z),"dragging",vt),Ne(Ne(Ne(Ne(Ne(Ne(Ne(o,"drop-target",M.dropTargetKey===a),"drop-container",M.dropContainerKey===a),"drag-over",!X&&f),"drag-over-gap-top",!X&&d),"drag-over-gap-bottom",!X&&p),"filter-node",(n=M.filterTreeNode)===null||n===void 0?void 0:n.call(M,Lr(t))),"".concat(M.prefixCls,"-treenode-leaf"),Ae))),style:l,draggable:Dt,onDragStart:Dt?he:void 0,onDragEnter:Z?se:void 0,onDragOver:Z?te:void 0,onDragLeave:Z?ce:void 0,onDrop:Z?we:void 0,onDragEnd:Z?Ce:void 0,onMouseMove:P},ht,ft),_e.createElement(l6,{prefixCls:M.prefixCls,level:et,isStart:g,isEnd:b}),$e,He(),pt,Xe)};ri.isTreeNode=1;function qn(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function ro(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function oc(e){return e.split("-")}function d6(e,t){var r=[],n=mn(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(u){var l=u.key,f=u.children;r.push(l),o(f)})}return o(n.children),r}function f6(e){if(e.parent){var t=oc(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function h6(e){var t=oc(e.pos);return Number(t[t.length-1])===0}function wf(e,t,r,n,o,a,u,l,f,d){var p,v=e.clientX,g=e.clientY,b=e.target.getBoundingClientRect(),x=b.top,D=b.height,m=(d==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-v),S=(m-12)/n,F=f.filter(function(X){var W;return(W=l[X])===null||W===void 0||(W=W.children)===null||W===void 0?void 0:W.length}),B=mn(l,r.eventKey);if(g<x+D/2){var O=u.findIndex(function(X){return X.key===B.key}),A=O<=0?0:O-1,P=u[A].key;B=mn(l,P)}var T=B.key,_=B,M=B.key,q=0,L=0;if(!F.includes(T))for(var Y=0;Y<S&&f6(B);Y+=1)B=B.parent,L+=1;var V=t.data,z=B.node,K=!0;return h6(B)&&B.level===0&&g<x+D/2&&a({dragNode:V,dropNode:z,dropPosition:-1})&&B.key===r.eventKey?q=-1:(_.children||[]).length&&F.includes(M)?a({dragNode:V,dropNode:z,dropPosition:0})?q=0:K=!1:L===0?S>-1.5?a({dragNode:V,dropNode:z,dropPosition:1})?q=1:K=!1:a({dragNode:V,dropNode:z,dropPosition:0})?q=0:a({dragNode:V,dropNode:z,dropPosition:1})?q=1:K=!1:a({dragNode:V,dropNode:z,dropPosition:1})?q=1:K=!1,{dropPosition:q,dropLevelOffset:L,dropTargetKey:B.key,dropTargetPos:B.pos,dragOverNodeKey:M,dropContainerKey:q===0?null:((p=B.parent)===null||p===void 0?void 0:p.key)||null,dropAllowed:K}}function Cf(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function Wl(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(Cn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Xn(!1,"`checkedKeys` is not an array or an object"),null;return t}function Gu(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=mn(t,o);if(a){r.add(o);var u=a.parent,l=a.node;l.disabled||u&&n(u.key)}}}return(e||[]).forEach(function(o){n(o)}),zt(r)}const yo={},Zu="SELECT_ALL",Ju="SELECT_INVERT",Qu="SELECT_NONE",Df=[],cm=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&cm(e,n[e],r)}),r),p6=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:u,onChange:l,onSelect:f,onSelectAll:d,onSelectInvert:p,onSelectNone:v,onSelectMultiple:g,columnWidth:b,type:x,selections:D,fixed:m,renderCell:S,hideSelectAll:F,checkStrictly:B=!0}=t||{},{prefixCls:O,data:A,pageData:P,getRecordByKey:T,getRowKey:_,expandType:M,childrenColumnName:q,locale:L,getPopupContainer:Y}=e,V=Ls(),[z,K]=L2(we=>we),[X,W]=so(n||o||Df,{value:n}),J=C.useRef(new Map),R=St(we=>{if(r){const Se=new Map;we.forEach(Ee=>{let Ae=T(Ee);!Ae&&J.current.has(Ee)&&(Ae=J.current.get(Ee)),Se.set(Ee,Ae)}),J.current=Se}},[T,r]);C.useEffect(()=>{R(X)},[X]);const ie=Ct(()=>cm(q,P),[q,P]),{keyEntities:me}=Ct(()=>{if(B)return{keyEntities:null};let we=A;if(r){const Se=new Set(ie.map((Ae,$e)=>_(Ae,$e))),Ee=Array.from(J.current).reduce((Ae,[$e,Te])=>Se.has($e)?Ae:Ae.concat(Te),[]);we=[].concat(zt(we),zt(Ee))}return Y0(we,{externalGetKey:_,childrenPropName:q})},[A,_,B,q,r,ie]),xe=Ct(()=>{const we=new Map;return ie.forEach((Se,Ee)=>{const Ae=_(Se,Ee),$e=(a?a(Se):null)||{};we.set(Ae,$e)}),we},[ie,_,a]),ge=St(we=>{const Se=_(we);let Ee;return xe.has(Se)?Ee=xe.get(_(we)):Ee=a?a(we):void 0,!!(Ee!=null&&Ee.disabled)},[xe,_]),[ae,ke]=Ct(()=>{if(B)return[X||[],[]];const{checkedKeys:we,halfCheckedKeys:Se}=ua(X,!0,me,ge);return[we||[],Se]},[X,B,me,ge]),Z=Ct(()=>{const we=x==="radio"?ae.slice(0,1):ae;return new Set(we)},[ae,x]),he=Ct(()=>x==="radio"?new Set:new Set(ke),[ke,x]);C.useEffect(()=>{t||W(Df)},[!!t]);const se=St((we,Se)=>{let Ee,Ae;R(we),r?(Ee=we,Ae=we.map($e=>J.current.get($e))):(Ee=[],Ae=[],we.forEach($e=>{const Te=T($e);Te!==void 0&&(Ee.push($e),Ae.push(Te))})),W(Ee),l==null||l(Ee,Ae,{type:Se})},[W,T,l,r]),te=St((we,Se,Ee,Ae)=>{if(f){const $e=Ee.map(Te=>T(Te));f(T(we),Se,$e,Ae)}se(Ee,"single")},[f,T,se]),ce=Ct(()=>!D||F?null:(D===!0?[Zu,Ju,Qu]:D).map(Se=>Se===Zu?{key:"all",text:L.selectionAll,onSelect(){se(A.map((Ee,Ae)=>_(Ee,Ae)).filter(Ee=>{const Ae=xe.get(Ee);return!(Ae!=null&&Ae.disabled)||Z.has(Ee)}),"all")}}:Se===Ju?{key:"invert",text:L.selectInvert,onSelect(){const Ee=new Set(Z);P.forEach(($e,Te)=>{const He=_($e,Te),pt=xe.get(He);pt!=null&&pt.disabled||(Ee.has(He)?Ee.delete(He):Ee.add(He))});const Ae=Array.from(Ee);p&&(V.deprecated(!1,"onSelectInvert","onChange"),p(Ae)),se(Ae,"invert")}}:Se===Qu?{key:"none",text:L.selectNone,onSelect(){v==null||v(),se(Array.from(Z).filter(Ee=>{const Ae=xe.get(Ee);return Ae==null?void 0:Ae.disabled}),"none")}}:Se).map(Se=>Object.assign(Object.assign({},Se),{onSelect:(...Ee)=>{var Ae,$e;($e=Se.onSelect)===null||$e===void 0||(Ae=$e).call.apply(Ae,[Se].concat(Ee)),K(null)}})),[D,Z,P,_,p,se]);return[St(we=>{var Se;if(!t)return we.filter(Pe=>Pe!==yo);let Ee=zt(we);const Ae=new Set(Z),$e=ie.map(_).filter(Pe=>!xe.get(Pe).disabled),Te=$e.every(Pe=>Ae.has(Pe)),He=$e.some(Pe=>Ae.has(Pe)),pt=()=>{const Pe=[];Te?$e.forEach(bt=>{Ae.delete(bt),Pe.push(bt)}):$e.forEach(bt=>{Ae.has(bt)||(Ae.add(bt),Pe.push(bt))});const de=Array.from(Ae);d==null||d(!Te,de.map(bt=>T(bt)),Pe.map(bt=>T(bt))),se(de,"all"),K(null)};let at,Me;if(x!=="radio"){let Pe;if(ce){const Rt={getPopupContainer:Y,items:ce.map((tr,ur)=>{const{key:Bt,text:Ht,onSelect:jt}=tr;return{key:Bt??ur,onClick:()=>{jt==null||jt($e)},label:Ht}})};Pe=C.createElement("div",{className:`${O}-selection-extra`},C.createElement(G0,{menu:Rt,getPopupContainer:Y},C.createElement("span",null,C.createElement(E2,null))))}const de=ie.map((Rt,tr)=>{const ur=_(Rt,tr),Bt=xe.get(ur)||{};return Object.assign({checked:Ae.has(ur)},Bt)}).filter(({disabled:Rt})=>Rt),bt=!!de.length&&de.length===ie.length,kt=bt&&de.every(({checked:Rt})=>Rt),Ft=bt&&de.some(({checked:Rt})=>Rt),Et=(u==null?void 0:u())||{},{onChange:or,disabled:At}=Et;Me=C.createElement(bs,Object.assign({"aria-label":Pe?"Custom selection":"Select all"},Et,{checked:bt?kt:!!ie.length&&Te,indeterminate:bt?!kt&&Ft:!Te&&He,onChange:Rt=>{pt(),or==null||or(Rt)},disabled:At??(ie.length===0||bt),skipGroup:!0})),at=!F&&C.createElement("div",{className:`${O}-selection`},Me,Pe)}let Le;x==="radio"?Le=(Pe,de,bt)=>{const kt=_(de,bt),Ft=Ae.has(kt),Et=xe.get(kt);return{node:C.createElement(rp,Object.assign({},Et,{checked:Ft,onClick:or=>{var At;or.stopPropagation(),(At=Et==null?void 0:Et.onClick)===null||At===void 0||At.call(Et,or)},onChange:or=>{var At;Ae.has(kt)||te(kt,!0,[kt],or.nativeEvent),(At=Et==null?void 0:Et.onChange)===null||At===void 0||At.call(Et,or)}})),checked:Ft}}:Le=(Pe,de,bt)=>{var kt;const Ft=_(de,bt),Et=Ae.has(Ft),or=he.has(Ft),At=xe.get(Ft);let Rt;return M==="nest"?Rt=or:Rt=(kt=At==null?void 0:At.indeterminate)!==null&&kt!==void 0?kt:or,{node:C.createElement(bs,Object.assign({},At,{indeterminate:Rt,checked:Et,skipGroup:!0,onClick:tr=>{var ur;tr.stopPropagation(),(ur=At==null?void 0:At.onClick)===null||ur===void 0||ur.call(At,tr)},onChange:tr=>{var ur;const{nativeEvent:Bt}=tr,{shiftKey:Ht}=Bt,jt=$e.indexOf(Ft),Cr=ae.some(zr=>$e.includes(zr));if(Ht&&B&&Cr){const zr=z(jt,$e,Ae),jr=Array.from(Ae);g==null||g(!Et,jr.map(Tr=>T(Tr)),zr.map(Tr=>T(Tr))),se(jr,"multiple")}else{const zr=ae;if(B){const jr=Et?qn(zr,Ft):ro(zr,Ft);te(Ft,!Et,jr,Bt)}else{const jr=ua([].concat(zt(zr),[Ft]),!0,me,ge),{checkedKeys:Tr,halfCheckedKeys:vr}=jr;let pr=Tr;if(Et){const _t=new Set(Tr);_t.delete(Ft),pr=ua(Array.from(_t),{halfCheckedKeys:vr},me,ge).checkedKeys}te(Ft,!Et,pr,Bt)}}K(Et?null:jt),(ur=At==null?void 0:At.onChange)===null||ur===void 0||ur.call(At,tr)}})),checked:Et}};const Xe=(Pe,de,bt)=>{const{node:kt,checked:Ft}=Le(Pe,de,bt);return S?S(Ft,de,bt,kt):kt};if(!Ee.includes(yo))if(Ee.findIndex(Pe=>{var de;return((de=Pe[Xa])===null||de===void 0?void 0:de.columnType)==="EXPAND_COLUMN"})===0){const[Pe,...de]=Ee;Ee=[Pe,yo].concat(zt(de))}else Ee=[yo].concat(zt(Ee));const ft=Ee.indexOf(yo);Ee=Ee.filter((Pe,de)=>Pe!==yo||de===ft);const it=Ee[ft-1],et=Ee[ft+1];let $t=m;$t===void 0&&((et==null?void 0:et.fixed)!==void 0?$t=et.fixed:(it==null?void 0:it.fixed)!==void 0&&($t=it.fixed)),$t&&it&&((Se=it[Xa])===null||Se===void 0?void 0:Se.columnType)==="EXPAND_COLUMN"&&it.fixed===void 0&&(it.fixed=$t);const Dt=rt(`${O}-selection-col`,{[`${O}-selection-col-with-dropdown`]:D&&x==="checkbox"}),vt=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Me):t.columnTitle:at,ht={fixed:$t,width:b,className:`${O}-selection-column`,title:vt(),render:Xe,onCell:t.onCell,align:t.align,[Xa]:{className:Dt}};return Ee.map(Pe=>Pe===yo?ht:Pe)},[_,ie,t,ae,Z,he,b,ce,M,xe,g,te,ge]),Z]};function m6(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:u}=t,l=`${r}-row-expand-icon`;return C.createElement("button",{type:"button",onClick:f=>{n(o,f),f.stopPropagation()},className:rt(l,{[`${l}-spaced`]:!u,[`${l}-expanded`]:u&&a,[`${l}-collapsed`]:u&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function g6(e){return(r,n)=>{const o=r.querySelector(`.${e}-container`);let a=n;if(o){const u=getComputedStyle(o),l=Number.parseInt(u.borderLeftWidth,10),f=Number.parseInt(u.borderRightWidth,10);a=n-l-f}return a}}const Bo=(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 Ba(e,t){return t?`${t}-${e}`:`${e}`}const Ys=(e,t)=>typeof e=="function"?e(t):e,v6=(e,t)=>{const r=Ys(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var b6={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"},y6=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:b6}))},x6=C.forwardRef(y6),w6=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 _e.createElement("div",{style:a})};function dm(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function C6(e,t){var r=C.useState(!1),n=gt(r,2),o=n[0],a=n[1];Ao(function(){if(o)return e(),function(){t()}},[o]),Ao(function(){return a(!0),function(){a(!1)}},[])}var D6=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],E6=C.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,u=e.motionType,l=e.onMotionStart,f=e.onMotionEnd,d=e.active,p=e.treeNodeRequiredProps,v=gr(e,D6),g=C.useState(!0),b=gt(g,2),x=b[0],D=b[1],m=C.useContext(nc),S=m.prefixCls,F=a&&u!=="hide";Ao(function(){a&&F!==x&&D(F)},[a]);var B=function(){a&&l()},O=C.useRef(!1),A=function(){a&&!O.current&&(O.current=!0,f())};C6(B,A);var P=function(_){F===_&&A()};return a?C.createElement(R0,xt({ref:t,visible:x},o,{motionAppear:u==="show",onVisibleChanged:P}),function(T,_){var M=T.className,q=T.style;return C.createElement("div",{ref:_,className:rt("".concat(S,"-treenode-motion"),M),style:q},a.map(function(L){var Y=Object.assign({},(dm(L.data),L.data)),V=L.title,z=L.key,K=L.isStart,X=L.isEnd;delete Y.children;var W=Ua(z,p);return C.createElement(ri,xt({},Y,W,{title:V,active:d,data:L.data,key:z,isStart:K,isEnd:X}))}))}):C.createElement(ri,xt({domRef:t,className:r,style:n},v,{active:d}))});function k6(){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,u){var l=new Map;a.forEach(function(d){l.set(d,!0)});var f=u.filter(function(d){return!l.has(d)});return f.length===1?f[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function Ef(e,t,r){var n=e.findIndex(function(l){return l.key===r}),o=e[n+1],a=t.findIndex(function(l){return l.key===r});if(o){var u=t.findIndex(function(l){return l.key===o.key});return t.slice(a+1,u)}return t.slice(a+1)}var S6=["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"],kf={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},A6=function(){},Vo="RC_TREE_MOTION_".concat(Math.random()),e0={key:Vo},fm={key:Vo,level:0,index:0,pos:"0",node:e0,nodes:[e0]},Sf={parent:null,children:[],pos:fm.pos,data:e0,title:null,key:Vo,isStart:[],isEnd:[]};function Af(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function Bf(e){var t=e.key,r=e.pos;return yi(t,r)}function B6(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 F6=C.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,u=e.checkedKeys,l=e.loadedKeys,f=e.loadingKeys,d=e.halfCheckedKeys,p=e.keyEntities,v=e.disabled,g=e.dragging,b=e.dragOverNodeKey,x=e.dropPosition,D=e.motion,m=e.height,S=e.itemHeight,F=e.virtual,B=e.scrollWidth,O=e.focusable,A=e.activeItem,P=e.focused,T=e.tabIndex,_=e.onKeyDown,M=e.onFocus,q=e.onBlur,L=e.onActiveChange,Y=e.onListChangeStart,V=e.onListChangeEnd,z=gr(e,S6),K=C.useRef(null),X=C.useRef(null);C.useImperativeHandle(t,function(){return{scrollTo:function(Le){K.current.scrollTo(Le)},getIndentWidth:function(){return X.current.offsetWidth}}});var W=C.useState(o),J=gt(W,2),R=J[0],ie=J[1],me=C.useState(n),xe=gt(me,2),ge=xe[0],ae=xe[1],ke=C.useState(n),Z=gt(ke,2),he=Z[0],se=Z[1],te=C.useState([]),ce=gt(te,2),Ce=ce[0],we=ce[1],Se=C.useState(null),Ee=gt(Se,2),Ae=Ee[0],$e=Ee[1],Te=C.useRef(n);Te.current=n;function He(){var Me=Te.current;ae(Me),se(Me),we([]),$e(null),V()}Ao(function(){ie(o);var Me=k6(R,o);if(Me.key!==null)if(Me.add){var Le=ge.findIndex(function(Dt){var vt=Dt.key;return vt===Me.key}),Xe=Af(Ef(ge,n,Me.key),F,m,S),ft=ge.slice();ft.splice(Le+1,0,Sf),se(ft),we(Xe),$e("show")}else{var it=n.findIndex(function(Dt){var vt=Dt.key;return vt===Me.key}),et=Af(Ef(n,ge,Me.key),F,m,S),$t=n.slice();$t.splice(it+1,0,Sf),se($t),we(et),$e("hide")}else ge!==n&&(ae(n),se(n))},[o,n]),C.useEffect(function(){g||He()},[g]);var pt=D?he:n,at={expandedKeys:o,selectedKeys:a,loadedKeys:l,loadingKeys:f,checkedKeys:u,halfCheckedKeys:d,dragOverNodeKey:b,dropPosition:x,keyEntities:p};return C.createElement(C.Fragment,null,P&&A&&C.createElement("span",{style:kf,"aria-live":"assertive"},B6(A)),C.createElement("div",null,C.createElement("input",{style:kf,disabled:O===!1||v,tabIndex:O!==!1?T:null,onKeyDown:_,onFocus:M,onBlur:q,value:"",onChange:A6,"aria-label":"for screen reader"})),C.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},C.createElement("div",{className:"".concat(r,"-indent")},C.createElement("div",{ref:X,className:"".concat(r,"-indent-unit")}))),C.createElement(mp,xt({},z,{data:pt,itemKey:Bf,height:m,fullHeight:!1,virtual:F,itemHeight:S,scrollWidth:B,prefixCls:"".concat(r,"-list"),ref:K,role:"tree",onVisibleChange:function(Le){Le.every(function(Xe){return Bf(Xe)!==Vo})&&He()}}),function(Me){var Le=Me.pos,Xe=Object.assign({},(dm(Me.data),Me.data)),ft=Me.title,it=Me.key,et=Me.isStart,$t=Me.isEnd,Dt=yi(it,Le);delete Xe.key,delete Xe.children;var vt=Ua(Dt,at);return C.createElement(E6,xt({},Xe,vt,{title:ft,active:!!A&&it===A.key,pos:Le,data:Me.data,isStart:et,isEnd:$t,motion:D,motionNodes:it===Vo?Ce:null,motionType:Ae,onMotionStart:Y,onMotionEnd:He,treeNodeRequiredProps:at,onMouseMove:function(){L(null)}}))}))}),N6=10,ac=(function(e){lp(r,e);var t=up(r);function r(){var n;cp(this,r);for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),Ne(Gt(n),"destroyed",!1),Ne(Gt(n),"delayedDragEnterLogic",void 0),Ne(Gt(n),"loadingRetryTimes",{}),Ne(Gt(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:ma()}),Ne(Gt(n),"dragStartMousePosition",null),Ne(Gt(n),"dragNodeProps",null),Ne(Gt(n),"currentMouseOverDroppableNodeKey",null),Ne(Gt(n),"listRef",C.createRef()),Ne(Gt(n),"onNodeDragStart",function(l,f){var d=n.state,p=d.expandedKeys,v=d.keyEntities,g=n.props.onDragStart,b=f.eventKey;n.dragNodeProps=f,n.dragStartMousePosition={x:l.clientX,y:l.clientY};var x=qn(p,b);n.setState({draggingNodeKey:b,dragChildrenKeys:d6(b,v),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(x),window.addEventListener("dragend",n.onWindowDragEnd),g==null||g({event:l,node:Lr(f)})}),Ne(Gt(n),"onNodeDragEnter",function(l,f){var d=n.state,p=d.expandedKeys,v=d.keyEntities,g=d.dragChildrenKeys,b=d.flattenNodes,x=d.indent,D=n.props,m=D.onDragEnter,S=D.onExpand,F=D.allowDrop,B=D.direction,O=f.pos,A=f.eventKey;if(n.currentMouseOverDroppableNodeKey!==A&&(n.currentMouseOverDroppableNodeKey=A),!n.dragNodeProps){n.resetDragState();return}var P=wf(l,n.dragNodeProps,f,x,n.dragStartMousePosition,F,b,v,p,B),T=P.dropPosition,_=P.dropLevelOffset,M=P.dropTargetKey,q=P.dropContainerKey,L=P.dropTargetPos,Y=P.dropAllowed,V=P.dragOverNodeKey;if(g.includes(M)||!Y){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(z){clearTimeout(n.delayedDragEnterLogic[z])}),n.dragNodeProps.eventKey!==f.eventKey&&(l.persist(),n.delayedDragEnterLogic[O]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var z=zt(p),K=mn(v,f.eventKey);K&&(K.children||[]).length&&(z=ro(p,f.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(z),S==null||S(z,{node:Lr(f),expanded:!0,nativeEvent:l.nativeEvent})}},800)),n.dragNodeProps.eventKey===M&&_===0){n.resetDragState();return}n.setState({dragOverNodeKey:V,dropPosition:T,dropLevelOffset:_,dropTargetKey:M,dropContainerKey:q,dropTargetPos:L,dropAllowed:Y}),m==null||m({event:l,node:Lr(f),expandedKeys:p})}),Ne(Gt(n),"onNodeDragOver",function(l,f){var d=n.state,p=d.dragChildrenKeys,v=d.flattenNodes,g=d.keyEntities,b=d.expandedKeys,x=d.indent,D=n.props,m=D.onDragOver,S=D.allowDrop,F=D.direction;if(n.dragNodeProps){var B=wf(l,n.dragNodeProps,f,x,n.dragStartMousePosition,S,v,g,b,F),O=B.dropPosition,A=B.dropLevelOffset,P=B.dropTargetKey,T=B.dropContainerKey,_=B.dropTargetPos,M=B.dropAllowed,q=B.dragOverNodeKey;p.includes(P)||!M||(n.dragNodeProps.eventKey===P&&A===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():O===n.state.dropPosition&&A===n.state.dropLevelOffset&&P===n.state.dropTargetKey&&T===n.state.dropContainerKey&&_===n.state.dropTargetPos&&M===n.state.dropAllowed&&q===n.state.dragOverNodeKey||n.setState({dropPosition:O,dropLevelOffset:A,dropTargetKey:P,dropContainerKey:T,dropTargetPos:_,dropAllowed:M,dragOverNodeKey:q}),m==null||m({event:l,node:Lr(f)}))}}),Ne(Gt(n),"onNodeDragLeave",function(l,f){n.currentMouseOverDroppableNodeKey===f.eventKey&&!l.currentTarget.contains(l.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var d=n.props.onDragLeave;d==null||d({event:l,node:Lr(f)})}),Ne(Gt(n),"onWindowDragEnd",function(l){n.onNodeDragEnd(l,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),Ne(Gt(n),"onNodeDragEnd",function(l,f){var d=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),d==null||d({event:l,node:Lr(f)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),Ne(Gt(n),"onNodeDrop",function(l,f){var d,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,v=n.state,g=v.dragChildrenKeys,b=v.dropPosition,x=v.dropTargetKey,D=v.dropTargetPos,m=v.dropAllowed;if(m){var S=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),x!==null){var F=je(je({},Ua(x,n.getTreeNodeRequiredProps())),{},{active:((d=n.getActiveItem())===null||d===void 0?void 0:d.key)===x,data:mn(n.state.keyEntities,x).node}),B=g.includes(x);Xn(!B,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var O=oc(D),A={event:l,node:Lr(F),dragNode:n.dragNodeProps?Lr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(g),dropToGap:b!==0,dropPosition:b+Number(O[O.length-1])};p||S==null||S(A),n.dragNodeProps=null}}}),Ne(Gt(n),"cleanDragState",function(){var l=n.state.draggingNodeKey;l!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),Ne(Gt(n),"triggerExpandActionExpand",function(l,f){var d=n.state,p=d.expandedKeys,v=d.flattenNodes,g=f.expanded,b=f.key,x=f.isLeaf;if(!(x||l.shiftKey||l.metaKey||l.ctrlKey)){var D=v.filter(function(S){return S.key===b})[0],m=Lr(je(je({},Ua(b,n.getTreeNodeRequiredProps())),{},{data:D.data}));n.setExpandedKeys(g?qn(p,b):ro(p,b)),n.onNodeExpand(l,m)}}),Ne(Gt(n),"onNodeClick",function(l,f){var d=n.props,p=d.onClick,v=d.expandAction;v==="click"&&n.triggerExpandActionExpand(l,f),p==null||p(l,f)}),Ne(Gt(n),"onNodeDoubleClick",function(l,f){var d=n.props,p=d.onDoubleClick,v=d.expandAction;v==="doubleClick"&&n.triggerExpandActionExpand(l,f),p==null||p(l,f)}),Ne(Gt(n),"onNodeSelect",function(l,f){var d=n.state.selectedKeys,p=n.state,v=p.keyEntities,g=p.fieldNames,b=n.props,x=b.onSelect,D=b.multiple,m=f.selected,S=f[g.key],F=!m;F?D?d=ro(d,S):d=[S]:d=qn(d,S);var B=d.map(function(O){var A=mn(v,O);return A?A.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:d}),x==null||x(d,{event:"select",selected:F,node:f,selectedNodes:B,nativeEvent:l.nativeEvent})}),Ne(Gt(n),"onNodeCheck",function(l,f,d){var p=n.state,v=p.keyEntities,g=p.checkedKeys,b=p.halfCheckedKeys,x=n.props,D=x.checkStrictly,m=x.onCheck,S=f.key,F,B={event:"check",node:f,checked:d,nativeEvent:l.nativeEvent};if(D){var O=d?ro(g,S):qn(g,S),A=qn(b,S);F={checked:O,halfChecked:A},B.checkedNodes=O.map(function(L){return mn(v,L)}).filter(Boolean).map(function(L){return L.node}),n.setUncontrolledState({checkedKeys:O})}else{var P=ua([].concat(zt(g),[S]),!0,v),T=P.checkedKeys,_=P.halfCheckedKeys;if(!d){var M=new Set(T);M.delete(S);var q=ua(Array.from(M),{halfCheckedKeys:_},v);T=q.checkedKeys,_=q.halfCheckedKeys}F=T,B.checkedNodes=[],B.checkedNodesPositions=[],B.halfCheckedKeys=_,T.forEach(function(L){var Y=mn(v,L);if(Y){var V=Y.node,z=Y.pos;B.checkedNodes.push(V),B.checkedNodesPositions.push({node:V,pos:z})}}),n.setUncontrolledState({checkedKeys:T},!1,{halfCheckedKeys:_})}m==null||m(F,B)}),Ne(Gt(n),"onNodeLoad",function(l){var f,d=l.key,p=n.state.keyEntities,v=mn(p,d);if(!(v!=null&&(f=v.children)!==null&&f!==void 0&&f.length)){var g=new Promise(function(b,x){n.setState(function(D){var m=D.loadedKeys,S=m===void 0?[]:m,F=D.loadingKeys,B=F===void 0?[]:F,O=n.props,A=O.loadData,P=O.onLoad;if(!A||S.includes(d)||B.includes(d))return null;var T=A(l);return T.then(function(){var _=n.state.loadedKeys,M=ro(_,d);P==null||P(M,{event:"load",node:l}),n.setUncontrolledState({loadedKeys:M}),n.setState(function(q){return{loadingKeys:qn(q.loadingKeys,d)}}),b()}).catch(function(_){if(n.setState(function(q){return{loadingKeys:qn(q.loadingKeys,d)}}),n.loadingRetryTimes[d]=(n.loadingRetryTimes[d]||0)+1,n.loadingRetryTimes[d]>=N6){var M=n.state.loadedKeys;Xn(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:ro(M,d)}),b()}x(_)}),{loadingKeys:ro(B,d)}})});return g.catch(function(){}),g}}),Ne(Gt(n),"onNodeMouseEnter",function(l,f){var d=n.props.onMouseEnter;d==null||d({event:l,node:f})}),Ne(Gt(n),"onNodeMouseLeave",function(l,f){var d=n.props.onMouseLeave;d==null||d({event:l,node:f})}),Ne(Gt(n),"onNodeContextMenu",function(l,f){var d=n.props.onRightClick;d&&(l.preventDefault(),d({event:l,node:f}))}),Ne(Gt(n),"onFocus",function(){var l=n.props.onFocus;n.setState({focused:!0});for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];l==null||l.apply(void 0,d)}),Ne(Gt(n),"onBlur",function(){var l=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];l==null||l.apply(void 0,d)}),Ne(Gt(n),"getTreeNodeRequiredProps",function(){var l=n.state,f=l.expandedKeys,d=l.selectedKeys,p=l.loadedKeys,v=l.loadingKeys,g=l.checkedKeys,b=l.halfCheckedKeys,x=l.dragOverNodeKey,D=l.dropPosition,m=l.keyEntities;return{expandedKeys:f||[],selectedKeys:d||[],loadedKeys:p||[],loadingKeys:v||[],checkedKeys:g||[],halfCheckedKeys:b||[],dragOverNodeKey:x,dropPosition:D,keyEntities:m}}),Ne(Gt(n),"setExpandedKeys",function(l){var f=n.state,d=f.treeData,p=f.fieldNames,v=ql(d,l,p);n.setUncontrolledState({expandedKeys:l,flattenNodes:v},!0)}),Ne(Gt(n),"onNodeExpand",function(l,f){var d=n.state.expandedKeys,p=n.state,v=p.listChanging,g=p.fieldNames,b=n.props,x=b.onExpand,D=b.loadData,m=f.expanded,S=f[g.key];if(!v){var F=d.includes(S),B=!m;if(Xn(m&&F||!m&&!F,"Expand state not sync with index check"),d=B?ro(d,S):qn(d,S),n.setExpandedKeys(d),x==null||x(d,{node:f,expanded:B,nativeEvent:l.nativeEvent}),B&&D){var O=n.onNodeLoad(f);O&&O.then(function(){var A=ql(n.state.treeData,d,g);n.setUncontrolledState({flattenNodes:A})}).catch(function(){var A=n.state.expandedKeys,P=qn(A,S);n.setExpandedKeys(P)})}}}),Ne(Gt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),Ne(Gt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),Ne(Gt(n),"onActiveChange",function(l){var f=n.state.activeKey,d=n.props,p=d.onActiveChange,v=d.itemScrollOffset,g=v===void 0?0:v;f!==l&&(n.setState({activeKey:l}),l!==null&&n.scrollTo({key:l,offset:g}),p==null||p(l))}),Ne(Gt(n),"getActiveItem",function(){var l=n.state,f=l.activeKey,d=l.flattenNodes;return f===null?null:d.find(function(p){var v=p.key;return v===f})||null}),Ne(Gt(n),"offsetActiveKey",function(l){var f=n.state,d=f.flattenNodes,p=f.activeKey,v=d.findIndex(function(x){var D=x.key;return D===p});v===-1&&l<0&&(v=d.length),v=(v+l+d.length)%d.length;var g=d[v];if(g){var b=g.key;n.onActiveChange(b)}else n.onActiveChange(null)}),Ne(Gt(n),"onKeyDown",function(l){var f=n.state,d=f.activeKey,p=f.expandedKeys,v=f.checkedKeys,g=f.fieldNames,b=n.props,x=b.onKeyDown,D=b.checkable,m=b.selectable;switch(l.which){case Pr.UP:{n.offsetActiveKey(-1),l.preventDefault();break}case Pr.DOWN:{n.offsetActiveKey(1),l.preventDefault();break}}var S=n.getActiveItem();if(S&&S.data){var F=n.getTreeNodeRequiredProps(),B=S.data.isLeaf===!1||!!(S.data[g.children]||[]).length,O=Lr(je(je({},Ua(d,F)),{},{data:S.data,active:!0}));switch(l.which){case Pr.LEFT:{B&&p.includes(d)?n.onNodeExpand({},O):S.parent&&n.onActiveChange(S.parent.key),l.preventDefault();break}case Pr.RIGHT:{B&&!p.includes(d)?n.onNodeExpand({},O):S.children&&S.children.length&&n.onActiveChange(S.children[0].key),l.preventDefault();break}case Pr.ENTER:case Pr.SPACE:{D&&!O.disabled&&O.checkable!==!1&&!O.disableCheckbox?n.onNodeCheck({},O,!v.includes(d)):!D&&m&&!O.disabled&&O.selectable!==!1&&n.onNodeSelect({},O);break}}}x==null||x(l)}),Ne(Gt(n),"setUncontrolledState",function(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var p=!1,v=!0,g={};Object.keys(l).forEach(function(b){if(n.props.hasOwnProperty(b)){v=!1;return}p=!0,g[b]=l[b]}),p&&(!f||v)&&n.setState(je(je({},g),d))}}),Ne(Gt(n),"scrollTo",function(l){n.listRef.current.scrollTo(l)}),n}return dp(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,u=o.itemScrollOffset,l=u===void 0?0:u;a!==void 0&&a!==this.state.activeKey&&(this.setState({activeKey:a}),a!==null&&this.scrollTo({key:a,offset:l}))}},{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,u=o.flattenNodes,l=o.keyEntities,f=o.draggingNodeKey,d=o.activeKey,p=o.dropLevelOffset,v=o.dropContainerKey,g=o.dropTargetKey,b=o.dropPosition,x=o.dragOverNodeKey,D=o.indent,m=this.props,S=m.prefixCls,F=m.className,B=m.style,O=m.showLine,A=m.focusable,P=m.tabIndex,T=P===void 0?0:P,_=m.selectable,M=m.showIcon,q=m.icon,L=m.switcherIcon,Y=m.draggable,V=m.checkable,z=m.checkStrictly,K=m.disabled,X=m.motion,W=m.loadData,J=m.filterTreeNode,R=m.height,ie=m.itemHeight,me=m.scrollWidth,xe=m.virtual,ge=m.titleRender,ae=m.dropIndicatorRender,ke=m.onContextMenu,Z=m.onScroll,he=m.direction,se=m.rootClassName,te=m.rootStyle,ce=vs(this.props,{aria:!0,data:!0}),Ce;Y&&(Cn(Y)==="object"?Ce=Y:typeof Y=="function"?Ce={nodeDraggable:Y}:Ce={});var we={prefixCls:S,selectable:_,showIcon:M,icon:q,switcherIcon:L,draggable:Ce,draggingNodeKey:f,checkable:V,checkStrictly:z,disabled:K,keyEntities:l,dropLevelOffset:p,dropContainerKey:v,dropTargetKey:g,dropPosition:b,dragOverNodeKey:x,indent:D,direction:he,dropIndicatorRender:ae,loadData:W,filterTreeNode:J,titleRender:ge,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 C.createElement(nc.Provider,{value:we},C.createElement("div",{className:rt(S,F,se,Ne(Ne(Ne({},"".concat(S,"-show-line"),O),"".concat(S,"-focused"),a),"".concat(S,"-active-focused"),d!==null)),style:te},C.createElement(F6,xt({ref:this.listRef,prefixCls:S,style:B,data:u,disabled:K,selectable:_,checkable:!!V,motion:X,dragging:f!==null,height:R,itemHeight:ie,virtual:xe,focusable:A,focused:a,tabIndex:T,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ke,onScroll:Z,scrollWidth:me},this.getTreeNodeRequiredProps(),ce))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var u=a.prevProps,l={prevProps:o};function f(T){return!u&&o.hasOwnProperty(T)||u&&u[T]!==o[T]}var d,p=a.fieldNames;if(f("fieldNames")&&(p=ma(o.fieldNames),l.fieldNames=p),f("treeData")?d=o.treeData:f("children")&&(Xn(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=zp(o.children)),d){l.treeData=d;var v=Y0(d,{fieldNames:p});l.keyEntities=je(Ne({},Vo,fm),v.keyEntities)}var g=l.keyEntities||a.keyEntities;if(f("expandedKeys")||u&&f("autoExpandParent"))l.expandedKeys=o.autoExpandParent||!u&&o.defaultExpandParent?Gu(o.expandedKeys,g):o.expandedKeys;else if(!u&&o.defaultExpandAll){var b=je({},g);delete b[Vo];var x=[];Object.keys(b).forEach(function(T){var _=b[T];_.children&&_.children.length&&x.push(_.key)}),l.expandedKeys=x}else!u&&o.defaultExpandedKeys&&(l.expandedKeys=o.autoExpandParent||o.defaultExpandParent?Gu(o.defaultExpandedKeys,g):o.defaultExpandedKeys);if(l.expandedKeys||delete l.expandedKeys,d||l.expandedKeys){var D=ql(d||a.treeData,l.expandedKeys||a.expandedKeys,p);l.flattenNodes=D}if(o.selectable&&(f("selectedKeys")?l.selectedKeys=Cf(o.selectedKeys,o):!u&&o.defaultSelectedKeys&&(l.selectedKeys=Cf(o.defaultSelectedKeys,o))),o.checkable){var m;if(f("checkedKeys")?m=Wl(o.checkedKeys)||{}:!u&&o.defaultCheckedKeys?m=Wl(o.defaultCheckedKeys)||{}:d&&(m=Wl(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),m){var S=m,F=S.checkedKeys,B=F===void 0?[]:F,O=S.halfCheckedKeys,A=O===void 0?[]:O;if(!o.checkStrictly){var P=ua(B,!0,g);B=P.checkedKeys,A=P.halfCheckedKeys}l.checkedKeys=B,l.halfCheckedKeys=A}}return f("loadedKeys")&&(l.loadedKeys=o.loadedKeys),l}}]),r})(C.Component);Ne(ac,"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:w6,allowDrop:function(){return!0},expandAction:!1});Ne(ac,"TreeNode",ri);var $6={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"},M6=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:$6}))},hm=C.forwardRef(M6),O6={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"},T6=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:O6}))},R6=C.forwardRef(T6),I6={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"},P6=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:I6}))},z6=C.forwardRef(P6),j6={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"},_6=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:j6}))},L6=C.forwardRef(_6);const H6=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:u})=>({[`${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:u}},[`${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}}}}}),K6=new S2("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),q6=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),W6=(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:`${Je(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),V6=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:u,nodeSelectedBg:l,nodeHoverBg:f,colorTextQuaternary:d,controlItemBgActiveDisabled:p}=t;return{[r]:Object.assign(Object.assign({},gi(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)`]:fp(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:K6,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:Je(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:p},[`${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:d},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:u}},[`${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({},q6(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`},W6(e,t)),{"&:hover":{backgroundColor:f},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${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:`${Je(t.calc(a).div(2).equal())} !important`}})}},U6=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),u=Wo(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[V6(e,u),r&&H6(u)].filter(Boolean)},X6=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}},Y6=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},X6(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},G6=mi("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:k2(`${t}-checkbox`,e)},U6(t,e),hp(e)],Y6),Ff=4;function Z6(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,u=a==="ltr"?"left":"right",l=a==="ltr"?"right":"left",f={[u]:-r*o+Ff,[l]:0};switch(t){case-1:f.top=-3;break;case 1:f.bottom=-3;break;default:f.bottom=-3,f[u]=o+Ff;break}return _e.createElement("div",{style:f,className:`${n}-drop-indicator`})}var J6={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"},Q6=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:J6}))},e7=C.forwardRef(Q6),t7={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"},r7=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:t7}))},n7=C.forwardRef(r7),o7={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"},a7=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:o7}))},i7=C.forwardRef(a7);const s7=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:u,switcherLoadingIcon:l}=e,{isLeaf:f,expanded:d,loading:p}=a;if(p)return C.isValidElement(l)?l:C.createElement(A2,{className:`${n}-switcher-loading-icon`});let v;if(u&&typeof u=="object"&&(v=u.showLeafIcon),f){if(!u)return null;if(typeof v!="boolean"&&v){const x=typeof v=="function"?v(a):v,D=`${n}-switcher-line-custom-icon`;return C.isValidElement(x)?pa(x,{className:rt((t=x.props)===null||t===void 0?void 0:t.className,D)}):x}return v?C.createElement(hm,{className:`${n}-switcher-line-icon`}):C.createElement("span",{className:`${n}-switcher-leaf-line`})}const g=`${n}-switcher-icon`,b=typeof o=="function"?o(a):o;return C.isValidElement(b)?pa(b,{className:rt((r=b.props)===null||r===void 0?void 0:r.className,g)}):b!==void 0?b:u?d?C.createElement(n7,{className:`${n}-switcher-line-icon`}):C.createElement(i7,{className:`${n}-switcher-line-icon`}):C.createElement(e7,{className:g})},pm=_e.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:u}=_e.useContext(fo),{prefixCls:l,className:f,showIcon:d=!1,showLine:p,switcherIcon:v,switcherLoadingIcon:g,blockNode:b=!1,children:x,checkable:D=!1,selectable:m=!0,draggable:S,disabled:F,motion:B,style:O}=e,A=n("tree",l),P=n(),T=_e.useContext(B2),_=F??T,M=B??Object.assign(Object.assign({},pp(P)),{motionAppear:!1}),q=Object.assign(Object.assign({},e),{checkable:D,selectable:m,showIcon:d,motion:M,blockNode:b,disabled:_,showLine:!!p,dropIndicatorRender:Z6}),[L,Y,V]=G6(A),[,z]=z0(),K=z.paddingXS/2+(((r=z.Tree)===null||r===void 0?void 0:r.titleHeight)||z.controlHeightSM),X=_e.useMemo(()=>{if(!S)return!1;let J={};switch(typeof S){case"function":J.nodeDraggable=S;break;case"object":J=Object.assign({},S);break}return J.icon!==!1&&(J.icon=J.icon||_e.createElement(L6,null)),J},[S]),W=J=>_e.createElement(s7,{prefixCls:A,switcherIcon:v,switcherLoadingIcon:g,treeNodeProps:J,showLine:p});return L(_e.createElement(ac,Object.assign({itemHeight:K,ref:t,virtual:a},q,{style:Object.assign(Object.assign({},u==null?void 0:u.style),O),prefixCls:A,className:rt({[`${A}-icon-hide`]:!d,[`${A}-block-node`]:b,[`${A}-unselectable`]:!m,[`${A}-rtl`]:o==="rtl",[`${A}-disabled`]:_},u==null?void 0:u.className,f,Y,V),direction:o,checkable:D&&_e.createElement("span",{className:`${A}-checkbox-inner`}),selectable:m,switcherIcon:W,draggable:X}),x))}),Nf=0,Vl=1,$f=2;function ic(e,t,r){const{key:n,children:o}=r;function a(u){const l=u[n],f=u[o];t(l,u)!==!1&&ic(f||[],t,r)}e.forEach(a)}function l7({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let u=Nf;if(r&&r===n)return[r];if(!r||!n)return[];function l(f){return f===r||f===n}return ic(e,f=>{if(u===$f)return!1;if(l(f)){if(a.push(f),u===Nf)u=Vl;else if(u===Vl)return u=$f,!1}else u===Vl&&a.push(f);return t.includes(f)},ma(o)),a}function Ul(e,t,r){const n=zt(t),o=[];return ic(e,(a,u)=>{const l=n.indexOf(a);return l!==-1&&(o.push(u),n.splice(l,1)),!!n.length},ma(r)),o}var Mf=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 u7(e){const{isLeaf:t,expanded:r}=e;return t?C.createElement(hm,null):r?C.createElement(R6,null):C.createElement(z6,null)}function Of({treeData:e,children:t}){return e||zp(t)}const c7=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=Mf(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const u=C.useRef(null),l=C.useRef(null),f=()=>{const{keyEntities:_}=Y0(Of(a),{fieldNames:a.fieldNames});let M;return r?M=Object.keys(_):n?M=Gu(a.expandedKeys||o||[],_):M=a.expandedKeys||o||[],M},[d,p]=C.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[v,g]=C.useState(()=>f());C.useEffect(()=>{"selectedKeys"in a&&p(a.selectedKeys)},[a.selectedKeys]),C.useEffect(()=>{"expandedKeys"in a&&g(a.expandedKeys)},[a.expandedKeys]);const b=(_,M)=>{var q;return"expandedKeys"in a||g(_),(q=a.onExpand)===null||q===void 0?void 0:q.call(a,_,M)},x=(_,M)=>{var q;const{multiple:L,fieldNames:Y}=a,{node:V,nativeEvent:z}=M,{key:K=""}=V,X=Of(a),W=Object.assign(Object.assign({},M),{selected:!0}),J=(z==null?void 0:z.ctrlKey)||(z==null?void 0:z.metaKey),R=z==null?void 0:z.shiftKey;let ie;L&&J?(ie=_,u.current=K,l.current=ie,W.selectedNodes=Ul(X,ie,Y)):L&&R?(ie=Array.from(new Set([].concat(zt(l.current||[]),zt(l7({treeData:X,expandedKeys:v,startKey:K,endKey:u.current,fieldNames:Y}))))),W.selectedNodes=Ul(X,ie,Y)):(ie=[K],u.current=K,l.current=ie,W.selectedNodes=Ul(X,ie,Y)),(q=a.onSelect)===null||q===void 0||q.call(a,ie,W),"selectedKeys"in a||p(ie)},{getPrefixCls:D,direction:m}=C.useContext(fo),{prefixCls:S,className:F,showIcon:B=!0,expandAction:O="click"}=a,A=Mf(a,["prefixCls","className","showIcon","expandAction"]),P=D("tree",S),T=rt(`${P}-directory`,{[`${P}-directory-rtl`]:m==="rtl"},F);return C.createElement(pm,Object.assign({icon:u7,ref:t,blockNode:!0},A,{showIcon:B,expandAction:O,prefixCls:P,className:T,expandedKeys:v,selectedKeys:d,onSelect:x,onExpand:b}))},d7=C.forwardRef(c7),sc=pm;sc.DirectoryTree=d7;sc.TreeNode=ri;const Tf=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?C.createElement("div",{className:`${n}-filter-dropdown-search`},C.createElement(F2,{prefix:C.createElement(N2,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},f7=e=>{const{keyCode:t}=e;t===Pr.ENTER&&e.stopPropagation()},h7=C.forwardRef((e,t)=>C.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:f7,ref:t},e.children));function ca(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(zt(t),zt(ca(n))))}),t}function p7(e){return e.some(({children:t})=>t)}function mm(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function gm({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((u,l)=>{const f=String(u.value);if(u.children)return{key:f||l,label:u.text,popupClassName:`${t}-dropdown-submenu`,children:gm({filters:u.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const d=n?bs:rp,p={key:u.value!==void 0?f:l,label:C.createElement(C.Fragment,null,C.createElement(d,{checked:r.includes(f)}),C.createElement("span",null,u.text))};return o.trim()?typeof a=="function"?a(o,u)?p:null:mm(o,u.text)?p:null:p})}function Xl(e){return e||[]}const m7=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:u,column:l,dropdownPrefixCls:f,columnKey:d,filterOnClose:p,filterMultiple:v,filterMode:g="menu",filterSearch:b=!1,filterState:x,triggerFilter:D,locale:m,children:S,getPopupContainer:F,rootClassName:B}=e,{filterResetToDefaultFilteredValue:O,defaultFilteredValue:A,filterDropdownProps:P={},filterDropdownOpen:T,filterDropdownVisible:_,onFilterDropdownVisibleChange:M,onFilterDropdownOpenChange:q}=l,[L,Y]=C.useState(!1),V=!!(x&&(!((t=x.filteredKeys)===null||t===void 0)&&t.length||x.forceFiltered)),z=Me=>{var Le;Y(Me),(Le=P.onOpenChange)===null||Le===void 0||Le.call(P,Me),q==null||q(Me),M==null||M(Me)},K=(o=(n=(r=P.open)!==null&&r!==void 0?r:T)!==null&&n!==void 0?n:_)!==null&&o!==void 0?o:L,X=x==null?void 0:x.filteredKeys,[W,J]=q2(Xl(X)),R=({selectedKeys:Me})=>{J(Me)},ie=(Me,{node:Le,checked:Xe})=>{R(v?{selectedKeys:Me}:{selectedKeys:Xe&&Le.key?[Le.key]:[]})};C.useEffect(()=>{L&&R({selectedKeys:Xl(X)})},[X]);const[me,xe]=C.useState([]),ge=Me=>{xe(Me)},[ae,ke]=C.useState(""),Z=Me=>{const{value:Le}=Me.target;ke(Le)};C.useEffect(()=>{L||ke("")},[L]);const he=Me=>{const Le=Me!=null&&Me.length?Me:null;if(Le===null&&(!x||!x.filteredKeys)||So(Le,x==null?void 0:x.filteredKeys,!0))return null;D({column:l,key:d,filteredKeys:Le})},se=()=>{z(!1),he(W())},te=({confirm:Me,closeDropdown:Le}={confirm:!1,closeDropdown:!1})=>{Me&&he([]),Le&&z(!1),ke(""),J(O?(A||[]).map(Xe=>String(Xe)):[])},ce=({closeDropdown:Me}={closeDropdown:!0})=>{Me&&z(!1),he(W())},Ce=(Me,Le)=>{Le.source==="trigger"&&(Me&&X!==void 0&&J(Xl(X)),z(Me),!Me&&!l.filterDropdown&&p&&se())},we=rt({[`${f}-menu-without-submenu`]:!p7(l.filters||[])}),Se=Me=>{if(Me.target.checked){const Le=ca(l==null?void 0:l.filters).map(Xe=>String(Xe));J(Le)}else J([])},Ee=({filters:Me})=>(Me||[]).map((Le,Xe)=>{const ft=String(Le.value),it={title:Le.text,key:Le.value!==void 0?ft:String(Xe)};return Le.children&&(it.children=Ee({filters:Le.children})),it}),Ae=Me=>{var Le;return Object.assign(Object.assign({},Me),{text:Me.title,value:Me.key,children:((Le=Me.children)===null||Le===void 0?void 0:Le.map(Xe=>Ae(Xe)))||[]})};let $e;const{direction:Te,renderEmpty:He}=C.useContext(fo);if(typeof l.filterDropdown=="function")$e=l.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:Me=>R({selectedKeys:Me}),selectedKeys:W(),confirm:ce,clearFilters:te,filters:l.filters,visible:K,close:()=>{z(!1)}});else if(l.filterDropdown)$e=l.filterDropdown;else{const Me=W()||[],Le=()=>{var ft,it;const et=(ft=He==null?void 0:He("Table.filter"))!==null&&ft!==void 0?ft:C.createElement(Yd,{image:Yd.PRESENTED_IMAGE_SIMPLE,description:m.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((l.filters||[]).length===0)return et;if(g==="tree")return C.createElement(C.Fragment,null,C.createElement(Tf,{filterSearch:b,value:ae,onChange:Z,tablePrefixCls:a,locale:m}),C.createElement("div",{className:`${a}-filter-dropdown-tree`},v?C.createElement(bs,{checked:Me.length===ca(l.filters).length,indeterminate:Me.length>0&&Me.length<ca(l.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:Se},(it=m==null?void 0:m.filterCheckall)!==null&&it!==void 0?it:m==null?void 0:m.filterCheckAll):null,C.createElement(sc,{checkable:!0,selectable:!1,blockNode:!0,multiple:v,checkStrictly:!v,className:`${f}-menu`,onCheck:ie,checkedKeys:Me,selectedKeys:Me,showIcon:!1,treeData:Ee({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:ae.trim()?vt=>typeof b=="function"?b(ae,Ae(vt)):mm(ae,vt.title):void 0})));const $t=gm({filters:l.filters||[],filterSearch:b,prefixCls:u,filteredKeys:W(),filterMultiple:v,searchValue:ae}),Dt=$t.every(vt=>vt===null);return C.createElement(C.Fragment,null,C.createElement(Tf,{filterSearch:b,value:ae,onChange:Z,tablePrefixCls:a,locale:m}),Dt?et:C.createElement(Ea,{selectable:!0,multiple:v,prefixCls:`${f}-menu`,className:we,onSelect:R,onDeselect:R,selectedKeys:Me,getPopupContainer:F,openKeys:me,onOpenChange:ge,items:$t}))},Xe=()=>O?So((A||[]).map(ft=>String(ft)),Me,!0):Me.length===0;$e=C.createElement(C.Fragment,null,Le(),C.createElement("div",{className:`${u}-dropdown-btns`},C.createElement(ms,{type:"link",size:"small",disabled:Xe(),onClick:()=>te()},m.filterReset),C.createElement(ms,{type:"primary",size:"small",onClick:se},m.filterConfirm)))}l.filterDropdown&&($e=C.createElement(Rp,{selectable:void 0},$e)),$e=C.createElement(h7,{className:`${u}-dropdown`},$e);const at=gp({trigger:["click"],placement:Te==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let Me;return typeof l.filterIcon=="function"?Me=l.filterIcon(V):l.filterIcon?Me=l.filterIcon:Me=C.createElement(x6,null),C.createElement("span",{role:"button",tabIndex:-1,className:rt(`${u}-trigger`,{active:V}),onClick:Le=>{Le.stopPropagation()}},Me)})(),getPopupContainer:F},Object.assign(Object.assign({},P),{rootClassName:rt(B,P.rootClassName),open:K,onOpenChange:Ce,popupRender:()=>typeof(P==null?void 0:P.dropdownRender)=="function"?P.dropdownRender($e):$e}));return C.createElement("div",{className:`${u}-column`},C.createElement("span",{className:`${a}-column-title`},S),C.createElement(G0,Object.assign({},at)))},t0=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var u;const l=Ba(a,r),f=o.filterDropdown!==void 0;if(o.filters||f||"onFilter"in o)if("filteredValue"in o){let d=o.filteredValue;f||(d=(u=d==null?void 0:d.map(String))!==null&&u!==void 0?u:d),n.push({column:o,key:Bo(o,l),filteredKeys:d,forceFiltered:o.filtered})}else n.push({column:o,key:Bo(o,l),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(zt(n),zt(t0(o.children,t,l))))}),n};function vm(e,t,r,n,o,a,u,l,f){return r.map((d,p)=>{const v=Ba(p,l),{filterOnClose:g=!0,filterMultiple:b=!0,filterMode:x,filterSearch:D}=d;let m=d;if(m.filters||m.filterDropdown){const S=Bo(m,v),F=n.find(({key:B})=>S===B);m=Object.assign(Object.assign({},m),{title:B=>C.createElement(m7,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:S,filterState:F,filterOnClose:g,filterMultiple:b,filterMode:x,filterSearch:D,triggerFilter:a,locale:o,getPopupContainer:u,rootClassName:f},Ys(d.title,B))})}return"children"in m&&(m=Object.assign(Object.assign({},m),{children:vm(e,t,m.children,n,o,a,u,v,f)})),m})}const Rf=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:u,filterDropdown:l}=o;if(l)t[a]=n||null;else if(Array.isArray(n)){const f=ca(u);t[a]=f.filter(d=>n.includes(String(d)))}else t[a]=null}),t},r0=(e,t,r)=>t.reduce((o,a)=>{const{column:{onFilter:u,filters:l},filteredKeys:f}=a;return u&&f&&f.length?o.map(d=>Object.assign({},d)).filter(d=>f.some(p=>{const v=ca(l),g=v.findIndex(x=>String(x)===String(p)),b=g!==-1?v[g]:p;return d[r]&&(d[r]=r0(d[r],t,r)),u(b,d)})):o},e),bm=e=>e.flatMap(t=>"children"in t?[t].concat(zt(bm(t.children||[]))):[t]),g7=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:u,rootClassName:l}=e;Ls();const f=C.useMemo(()=>bm(n||[]),[n]),[d,p]=C.useState(()=>t0(f,!0)),v=C.useMemo(()=>{const D=t0(f,!1);if(D.length===0)return D;let m=!0;if(D.forEach(({filteredKeys:S})=>{S!==void 0&&(m=!1)}),m){const S=(f||[]).map((F,B)=>Bo(F,Ba(B)));return d.filter(({key:F})=>S.includes(F)).map(F=>{const B=f[S.indexOf(F.key)];return Object.assign(Object.assign({},F),{column:Object.assign(Object.assign({},F.column),B),forceFiltered:B.filtered})})}return D},[f,d]),g=C.useMemo(()=>Rf(v),[v]),b=D=>{const m=v.filter(({key:S})=>S!==D.key);m.push(D),p(m),o(Rf(m),m)};return[D=>vm(t,r,D,v,u,b,a,void 0,l),v,g]},v7=(e,t,r)=>{const n=C.useRef({});function o(a){var u;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let f=function(d){d.forEach((p,v)=>{const g=r(p,v);l.set(g,p),p&&typeof p=="object"&&t in p&&f(p[t]||[])})};const l=new Map;f(e),n.current={data:e,childrenColumnName:t,kvMap:l,getRowKey:r}}return(u=n.current.kvMap)===null||u===void 0?void 0:u.get(a)}return[o]};var b7=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 ym=10;function y7(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 x7(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=b7(n,["total"]),[u,l]=Ot(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:ym})),f=gp(u,a,{total:o>0?o:e}),d=Math.ceil((o||e)/f.pageSize);f.current>d&&(f.current=d||1);const p=(g,b)=>{l({current:g??1,pageSize:b||f.pageSize})},v=(g,b)=>{var x;r&&((x=r.onChange)===null||x===void 0||x.call(r,g,b)),p(g,b),t(g,b||(f==null?void 0:f.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},f),{onChange:v}),p]}var w7={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"},C7=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:w7}))},D7=C.forwardRef(C7),E7={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"},k7=function(t,r){return C.createElement(tn,xt({},t,{ref:r,icon:E7}))},S7=C.forwardRef(k7);const Qi="ascend",Yl="descend",ks=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,If=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,A7=(e,t)=>t?e[e.indexOf(t)+1]:e[0],n0=(e,t,r)=>{let n=[];const o=(a,u)=>{n.push({column:a,key:Bo(a,u),multiplePriority:ks(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,u)=>{const l=Ba(u,r);a.children?("sortOrder"in a&&o(a,l),n=[].concat(zt(n),zt(n0(a.children,t,l)))):a.sorter&&("sortOrder"in a?o(a,l):t&&a.defaultSortOrder&&n.push({column:a,key:Bo(a,l),multiplePriority:ks(a),sortOrder:a.defaultSortOrder}))}),n},xm=(e,t,r,n,o,a,u,l)=>(t||[]).map((d,p)=>{const v=Ba(p,l);let g=d;if(g.sorter){const b=g.sortDirections||o,x=g.showSorterTooltip===void 0?u:g.showSorterTooltip,D=Bo(g,v),m=r.find(({key:M})=>M===D),S=m?m.sortOrder:null,F=A7(b,S);let B;if(d.sortIcon)B=d.sortIcon({sortOrder:S});else{const M=b.includes(Qi)&&C.createElement(S7,{className:rt(`${e}-column-sorter-up`,{active:S===Qi})}),q=b.includes(Yl)&&C.createElement(D7,{className:rt(`${e}-column-sorter-down`,{active:S===Yl})});B=C.createElement("span",{className:rt(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(M&&q)})},C.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},M,q))}const{cancelSort:O,triggerAsc:A,triggerDesc:P}=a||{};let T=O;F===Yl?T=P:F===Qi&&(T=A);const _=typeof x=="object"?Object.assign({title:T},x):{title:T};g=Object.assign(Object.assign({},g),{className:rt(g.className,{[`${e}-column-sort`]:S}),title:M=>{const q=`${e}-column-sorters`,L=C.createElement("span",{className:`${e}-column-title`},Ys(d.title,M)),Y=C.createElement("div",{className:q},L,B);return x?typeof x!="boolean"&&(x==null?void 0:x.target)==="sorter-icon"?C.createElement("div",{className:`${q} ${e}-column-sorters-tooltip-target-sorter`},L,C.createElement(hs,Object.assign({},_),B)):C.createElement(hs,Object.assign({},_),Y):Y},onHeaderCell:M=>{var q;const L=((q=d.onHeaderCell)===null||q===void 0?void 0:q.call(d,M))||{},Y=L.onClick,V=L.onKeyDown;L.onClick=X=>{n({column:d,key:D,sortOrder:F,multiplePriority:ks(d)}),Y==null||Y(X)},L.onKeyDown=X=>{X.keyCode===Pr.ENTER&&(n({column:d,key:D,sortOrder:F,multiplePriority:ks(d)}),V==null||V(X))};const z=v6(d.title,{}),K=z==null?void 0:z.toString();return S&&(L["aria-sort"]=S==="ascend"?"ascending":"descending"),L["aria-label"]=K||"",L.className=rt(L.className,`${e}-column-has-sorters`),L.tabIndex=0,d.ellipsis&&(L.title=(z??"").toString()),L}})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:xm(e,g.children,r,n,o,a,u,v)})),g}),Pf=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},zf=e=>{const t=e.filter(({sortOrder:r})=>r).map(Pf);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},Pf(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},o0=(e,t,r)=>{const n=t.slice().sort((u,l)=>l.multiplePriority-u.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:u},sortOrder:l})=>If(u)&&l);return a.length?o.sort((u,l)=>{for(let f=0;f<a.length;f+=1){const d=a[f],{column:{sorter:p},sortOrder:v}=d,g=If(p);if(g&&v){const b=g(u,l,v);if(b!==0)return v===Qi?b:-b}}return 0}).map(u=>{const l=u[r];return l?Object.assign(Object.assign({},u),{[r]:o0(l,t,r)}):u}):o},B7=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:u}=e,[l,f]=C.useState(()=>n0(r,!0)),d=(D,m)=>{const S=[];return D.forEach((F,B)=>{const O=Ba(B,m);if(S.push(Bo(F,O)),Array.isArray(F.children)){const A=d(F.children,O);S.push.apply(S,zt(A))}}),S},p=C.useMemo(()=>{let D=!0;const m=n0(r,!1);if(!m.length){const O=d(r);return l.filter(({key:A})=>O.includes(A))}const S=[];function F(O){D?S.push(O):S.push(Object.assign(Object.assign({},O),{sortOrder:null}))}let B=null;return m.forEach(O=>{B===null?(F(O),O.sortOrder&&(O.multiplePriority===!1?D=!1:B=!0)):(B&&O.multiplePriority!==!1||(D=!1),F(O))}),S},[r,l]),v=C.useMemo(()=>{var D,m;const S=p.map(({column:F,sortOrder:B})=>({column:F,order:B}));return{sortColumns:S,sortColumn:(D=S[0])===null||D===void 0?void 0:D.column,sortOrder:(m=S[0])===null||m===void 0?void 0:m.order}},[p]),g=D=>{let m;D.multiplePriority===!1||!p.length||p[0].multiplePriority===!1?m=[D]:m=[].concat(zt(p.filter(({key:S})=>S!==D.key)),[D]),f(m),u(zf(m),m)};return[D=>xm(t,D,p,g,n,o,a),p,v,()=>zf(p)]},wm=(e,t)=>e.map(n=>{const o=Object.assign({},n);return o.title=Ys(n.title,t),"children"in o&&(o.children=wm(o.children,t)),o}),F7=e=>[C.useCallback(r=>wm(r,e),[e])],N7=sm((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),$7=um((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),M7=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:u,tablePaddingHorizontal:l,calc:f}=e,d=`${Je(r)} ${n} ${o}`,p=(v,g,b)=>({[`&${t}-${v}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${Je(f(g).mul(-1).equal())}
|
|
28
|
-
${Je(f(f(b).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:d,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:d,borderTop:d,[`
|
|
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:d},"> thead":{"> tr:not(:last-child) > th":{borderBottom:d},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:d}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${Je(f(u).mul(-1).equal())} ${Je(f(f(l).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:d,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
|
|
34
|
-
> tr${t}-expanded-row,
|
|
35
|
-
> tr${t}-placeholder
|
|
36
|
-
`]:{"> th, > td":{borderInlineEnd:0}}}}}},p("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),p("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:d,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Je(r)} 0 ${Je(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:d}}}},O7=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},I0),{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"}})}}},T7=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}}}}},R7=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:u,tableBorderColor:l,tableExpandIconBg:f,tableExpandColumnWidth:d,borderRadius:p,tablePaddingVertical:v,tablePaddingHorizontal:g,tableExpandedRowBg:b,paddingXXS:x,expandIconMarginTop:D,expandIconSize:m,expandIconHalfInner:S,expandIconScale:F,calc:B}=e,O=`${Je(o)} ${u} ${l}`,A=B(x).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:d},[`${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({},$2(e)),{position:"relative",float:"left",width:m,height:m,color:"inherit",lineHeight:Je(m),background:f,border:O,borderRadius:p,transform:`scale(${F})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:S,insetInlineEnd:A,insetInlineStart:A,height:o},"&::after":{top:A,bottom:A,insetInlineStart:S,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:D,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:b}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${Je(B(v).mul(-1).equal())} ${Je(B(g).mul(-1).equal())}`,padding:`${Je(v)} ${Je(g)}`}}}},I7=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:u,paddingXS:l,colorText:f,lineWidth:d,lineType:p,tableBorderColor:v,headerIconColor:g,fontSizeSM:b,tablePaddingHorizontal:x,borderRadius:D,motionDurationSlow:m,colorIcon:S,colorPrimary:F,tableHeaderFilterActiveBg:B,colorTextDisabled:O,tableFilterDropdownBg:A,tableFilterDropdownHeight:P,controlItemBgHover:T,controlItemBgActive:_,boxShadowSecondary:M,filterDropdownMenuBg:q,calc:L}=e,Y=`${r}-dropdown`,V=`${t}-filter-dropdown`,z=`${r}-tree`,K=`${Je(d)} ${p} ${v}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:L(u).mul(-1).equal(),marginInline:`${Je(u)} ${Je(L(x).div(2).mul(-1).equal())}`,padding:`0 ${Je(u)}`,color:g,fontSize:b,borderRadius:D,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:S,background:B},"&.active":{color:F}}}},{[`${r}-dropdown`]:{[V]:Object.assign(Object.assign({},gi(e)),{minWidth:o,backgroundColor:A,borderRadius:D,boxShadow:M,overflow:"hidden",[`${Y}-menu`]:{maxHeight:P,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:q,"&:empty::after":{display:"block",padding:`${Je(l)} 0`,color:O,fontSize:b,textAlign:"center",content:'"Not Found"'}},[`${V}-tree`]:{paddingBlock:`${Je(l)} 0`,paddingInline:l,[z]:{padding:0},[`${z}-treenode ${z}-node-content-wrapper:hover`]:{backgroundColor:T},[`${z}-treenode-checkbox-checked ${z}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:_}}},[`${V}-search`]:{padding:l,borderBottom:K,"&-input":{input:{minWidth:a},[n]:{color:O}}},[`${V}-checkall`]:{width:"100%",marginBottom:u,marginInlineStart:u},[`${V}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Je(L(l).sub(d).equal())} ${Je(l)}`,overflow:"hidden",borderTop:K}})}},{[`${r}-dropdown ${V}, ${V}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:f},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},P7=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:u,zIndexTableSticky:l,calc:f}=e,d=n;return{[`${t}-wrapper`]:{[`
|
|
40
|
-
${t}-cell-fix-left,
|
|
41
|
-
${t}-cell-fix-right
|
|
42
|
-
`]:{position:"sticky !important",zIndex:a,background:u},[`
|
|
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:f(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:f(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:f(l).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 ${d}`},[`
|
|
49
|
-
${t}-cell-fix-left-first::after,
|
|
50
|
-
${t}-cell-fix-left-last::after
|
|
51
|
-
`]:{boxShadow:`inset 10px 0 8px -8px ${d}`},[`${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 ${d}`},[`
|
|
52
|
-
${t}-cell-fix-right-first::after,
|
|
53
|
-
${t}-cell-fix-right-last::after
|
|
54
|
-
`]:{boxShadow:`inset -10px 0 8px -8px ${d}`}},[`${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"}}}}},z7=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${Je(n)} 0`}}},j7=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${Je(r)} ${Je(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 ${Je(r)} ${Je(r)}`}}}}},_7=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"}}}}},L7=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:u,headerIconColor:l,headerIconHoverColor:f,tableSelectionColumnWidth:d,tableSelectedRowBg:p,tableSelectedRowHoverBg:v,tableRowHoverBg:g,tablePaddingHorizontal:b,calc:x}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:d,[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(o).add(x(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:x(d).add(x(u).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(o).add(x(a).div(4)).add(x(u).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:x(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:Je(x(b).div(4).equal()),[n]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:f}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:p,"&-row-hover":{background:v}}},[`> ${t}-cell-row-hover`]:{background:g}}}}}},H7=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,u,l,f)=>({[`${t}${t}-${a}`]:{fontSize:f,[`
|
|
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:`${Je(u)} ${Je(l)}`},[`${t}-filter-trigger`]:{marginInlineEnd:Je(n(l).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${Je(n(u).mul(-1).equal())} ${Je(n(l).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:Je(n(u).mul(-1).equal()),marginInline:`${Je(n(r).sub(l).equal())} ${Je(n(l).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:Je(n(l).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))}},K7=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}}}},q7=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:u,zIndexTableSticky:l,stickyScrollBarBorderRadius:f,lineWidth:d,lineType:p,tableBorderColor:v}=e,g=`${Je(d)} ${p} ${v}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Je(a)} !important`,zIndex:l,display:"flex",alignItems:"center",background:u,borderTop:g,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:f,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},jf=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${Je(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 ${Je(o(r).mul(-1).equal())} 0 ${n}`}}}},W7=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:u}=e,l=`${Je(n)} ${o} ${a}`,f=`${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:l,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${f}${f}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Je(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:l,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:l,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:u(n).mul(-1).equal(),borderInlineStart:l}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:l,borderBottom:l}}}}}},V7=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:u,lineType:l,tableBorderColor:f,tableFontSize:d,tableBg:p,tableRadius:v,tableHeaderTextColor:g,motionDurationMid:b,tableHeaderBg:x,tableHeaderCellSplitColor:D,tableFooterTextColor:m,tableFooterBg:S,calc:F}=e,B=`${Je(u)} ${l} ${f}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},zu()),{[t]:Object.assign(Object.assign({},gi(e)),{fontSize:d,background:p,borderRadius:`${Je(v)} ${Je(v)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${Je(v)} ${Je(v)} 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:`${Je(n)} ${Je(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${Je(n)} ${Je(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:x,borderBottom:B,transition:`background ${b} 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:D,transform:"translateY(-50%)",transition:`background-color ${b}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${b}, border-color ${b}`,borderBottom:B,[`
|
|
86
|
-
> ${t}-wrapper:only-child,
|
|
87
|
-
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
88
|
-
`]:{[t]:{marginBlock:Je(F(n).mul(-1).equal()),marginInline:`${Je(F(a).sub(o).equal())}
|
|
89
|
-
${Je(F(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:x,borderBottom:B,transition:`background ${b} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${Je(n)} ${Je(o)}`,color:m,background:S}})}},U7=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:u,controlItemBgActiveHover:l,padding:f,paddingSM:d,paddingXS:p,colorBorderSecondary:v,borderRadiusLG:g,controlHeight:b,colorTextPlaceholder:x,fontSize:D,fontSizeSM:m,lineHeight:S,lineWidth:F,colorIcon:B,colorIconHover:O,opacityLoading:A,controlInteractiveSize:P}=e,T=new gn(o).onBackground(r).toHexString(),_=new gn(a).onBackground(r).toHexString(),M=new gn(t).onBackground(r).toHexString(),q=new gn(B),L=new gn(O),Y=P/2-F,V=Y*2+F*3;return{headerBg:M,headerColor:n,headerSortActiveBg:T,headerSortHoverBg:_,bodySortBg:M,rowHoverBg:M,rowSelectedBg:u,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:p,cellPaddingBlockSM:p,cellPaddingInlineSM:p,borderColor:v,headerBorderRadius:g,footerBg:M,footerColor:n,cellFontSize:D,cellFontSizeMD:D,cellFontSizeSM:D,headerSplitColor:v,fixedHeaderSortActiveBg:T,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:b,stickyScrollBarBg:x,stickyScrollBarBorderRadius:100,expandIconMarginTop:(D*S-F*3)/2-Math.ceil((m*1.4-F*3)/2),headerIconColor:q.clone().setA(q.a*A).toRgbString(),headerIconHoverColor:L.clone().setA(L.a*A).toRgbString(),expandIconHalfInner:Y,expandIconSize:V,expandIconScale:P/V}},_f=2,X7=mi("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:u,headerSortActiveBg:l,headerSortHoverBg:f,bodySortBg:d,rowHoverBg:p,rowSelectedBg:v,rowSelectedHoverBg:g,rowExpandedBg:b,cellPaddingBlock:x,cellPaddingInline:D,cellPaddingBlockMD:m,cellPaddingInlineMD:S,cellPaddingBlockSM:F,cellPaddingInlineSM:B,borderColor:O,footerBg:A,footerColor:P,headerBorderRadius:T,cellFontSize:_,cellFontSizeMD:M,cellFontSizeSM:q,headerSplitColor:L,fixedHeaderSortActiveBg:Y,headerFilterHoverBg:V,filterDropdownBg:z,expandIconBg:K,selectionColumnWidth:X,stickyScrollBarBg:W,calc:J}=e,R=Wo(e,{tableFontSize:_,tableBg:n,tableRadius:T,tablePaddingVertical:x,tablePaddingHorizontal:D,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:S,tablePaddingVerticalSmall:F,tablePaddingHorizontalSmall:B,tableBorderColor:O,tableHeaderTextColor:u,tableHeaderBg:a,tableFooterTextColor:P,tableFooterBg:A,tableHeaderCellSplitColor:L,tableHeaderSortBg:l,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:Y,tableHeaderFilterActiveBg:V,tableFilterDropdownBg:z,tableRowHoverBg:p,tableSelectedRowBg:v,tableSelectedRowHoverBg:g,zIndexTableFixed:_f,zIndexTableSticky:J(_f).add(1).equal({unit:!1}),tableFontSizeMiddle:M,tableFontSizeSmall:q,tableSelectionColumnWidth:X,tableExpandIconBg:K,tableExpandColumnWidth:J(o).add(J(e.padding).mul(2)).equal(),tableExpandedRowBg:b,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:W,tableScrollThumbBgHover:t,tableScrollBg:r});return[V7(R),z7(R),jf(R),K7(R),I7(R),M7(R),j7(R),R7(R),jf(R),T7(R),L7(R),P7(R),q7(R),O7(R),H7(R),_7(R),W7(R)]},U7,{unitless:{expandIconScale:!0}}),Lf=[],Y7=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:u,style:l,size:f,bordered:d,dropdownPrefixCls:p,dataSource:v,pagination:g,rowSelection:b,rowKey:x="key",rowClassName:D,columns:m,children:S,childrenColumnName:F,onChange:B,getPopupContainer:O,loading:A,expandIcon:P,expandable:T,expandedRowRender:_,expandIconColumnIndex:M,indentSize:q,scroll:L,sortDirections:Y,locale:V,showSorterTooltip:z={target:"full-header"},virtual:K}=e;Ls();const X=C.useMemo(()=>m||tc(S),[m,S]),W=C.useMemo(()=>X.some(Ke=>Ke.responsive),[X]),J=M2(W),R=C.useMemo(()=>{const Ke=new Set(Object.keys(J).filter(wt=>J[wt]));return X.filter(wt=>!wt.responsive||wt.responsive.some(tt=>Ke.has(tt)))},[X,J]),ie=co(e,["className","style","columns"]),{locale:me=O2,direction:xe,table:ge,renderEmpty:ae,getPrefixCls:ke,getPopupContainer:Z}=C.useContext(fo),he=T2(f),se=Object.assign(Object.assign({},me.Table),V),te=v||Lf,ce=ke("table",o),Ce=ke("dropdown",p),[,we]=z0(),Se=vi(ce),[Ee,Ae,$e]=X7(ce,Se),Te=Object.assign(Object.assign({childrenColumnName:F,expandIconColumnIndex:M},T),{expandIcon:(r=T==null?void 0:T.expandIcon)!==null&&r!==void 0?r:(n=ge==null?void 0:ge.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:He="children"}=Te,pt=C.useMemo(()=>te.some(Ke=>Ke==null?void 0:Ke[He])?"nest":_||T!=null&&T.expandedRowRender?"row":null,[te]),at={body:C.useRef(null)},Me=g6(ce),Le=C.useRef(null),Xe=C.useRef(null);K2(t,()=>Object.assign(Object.assign({},Xe.current),{nativeElement:Le.current}));const ft=C.useMemo(()=>typeof x=="function"?x:Ke=>Ke==null?void 0:Ke[x],[x]),[it]=v7(te,He,ft),et={},$t=(Ke,wt,tt=!1)=>{var Mt,ar,$r,ee;const br=Object.assign(Object.assign({},et),Ke);tt&&((Mt=et.resetPagination)===null||Mt===void 0||Mt.call(et),!((ar=br.pagination)===null||ar===void 0)&&ar.current&&(br.pagination.current=1),g&&(($r=g.onChange)===null||$r===void 0||$r.call(g,1,(ee=br.pagination)===null||ee===void 0?void 0:ee.pageSize))),L&&L.scrollToFirstRowOnChange!==!1&&at.body.current&&_2(0,{getContainer:()=>at.body.current}),B==null||B(br.pagination,br.filters,br.sorter,{currentDataSource:r0(o0(te,br.sorterStates,He),br.filterStates,He),action:wt})},Dt=(Ke,wt)=>{$t({sorter:Ke,sorterStates:wt},"sort",!1)},[vt,ht,Pe,de]=B7({prefixCls:ce,mergedColumns:R,onSorterChange:Dt,sortDirections:Y||["ascend","descend"],tableLocale:se,showSorterTooltip:z}),bt=C.useMemo(()=>o0(te,ht,He),[te,ht]);et.sorter=de(),et.sorterStates=ht;const kt=(Ke,wt)=>{$t({filters:Ke,filterStates:wt},"filter",!0)},[Ft,Et,or]=g7({prefixCls:ce,locale:se,dropdownPrefixCls:Ce,mergedColumns:R,onFilterChange:kt,getPopupContainer:O||Z,rootClassName:rt(u,Se)}),At=r0(bt,Et,He);et.filters=or,et.filterStates=Et;const Rt=C.useMemo(()=>{const Ke={};return Object.keys(or).forEach(wt=>{or[wt]!==null&&(Ke[wt]=or[wt])}),Object.assign(Object.assign({},Pe),{filters:Ke})},[Pe,or]),[tr]=F7(Rt),ur=(Ke,wt)=>{$t({pagination:Object.assign(Object.assign({},et.pagination),{current:Ke,pageSize:wt})},"paginate")},[Bt,Ht]=x7(At.length,ur,g);et.pagination=g===!1?{}:y7(Bt,g),et.resetPagination=Ht;const jt=C.useMemo(()=>{if(g===!1||!Bt.pageSize)return At;const{current:Ke=1,total:wt,pageSize:tt=ym}=Bt;return At.length<wt?At.length>tt?At.slice((Ke-1)*tt,Ke*tt):At:At.slice((Ke-1)*tt,Ke*tt)},[!!g,At,Bt==null?void 0:Bt.current,Bt==null?void 0:Bt.pageSize,Bt==null?void 0:Bt.total]),[Cr,zr]=p6({prefixCls:ce,data:At,pageData:jt,getRowKey:ft,getRecordByKey:it,expandType:pt,childrenColumnName:He,locale:se,getPopupContainer:O||Z},b),jr=(Ke,wt,tt)=>{let Mt;return typeof D=="function"?Mt=rt(D(Ke,wt,tt)):Mt=rt(D),rt({[`${ce}-row-selected`]:zr.has(ft(Ke,wt))},Mt)};Te.__PARENT_RENDER_ICON__=Te.expandIcon,Te.expandIcon=Te.expandIcon||P||m6(se),pt==="nest"&&Te.expandIconColumnIndex===void 0?Te.expandIconColumnIndex=b?1:0:Te.expandIconColumnIndex>0&&b&&(Te.expandIconColumnIndex-=1),typeof Te.indentSize!="number"&&(Te.indentSize=typeof q=="number"?q:15);const Tr=C.useCallback(Ke=>tr(Cr(Ft(vt(Ke)))),[vt,Ft,Cr]),vr=()=>{if(g===!1||!(Bt!=null&&Bt.total))return{};const Ke=()=>Bt.size||(he==="small"||he==="middle"?"small":void 0),wt=ze=>{const le=ze==="left"?"start":ze==="right"?"end":ze;return C.createElement(bp,Object.assign({},Bt,{align:Bt.align||le,className:rt(`${ce}-pagination`,Bt.className),size:Ke()}))},tt=xe==="rtl"?"left":"right",Mt=Bt.position;if(Mt===null||!Array.isArray(Mt))return{bottom:wt(tt)};const ar=Mt.find(ze=>typeof ze=="string"&&ze.toLowerCase().includes("top")),$r=Mt.find(ze=>typeof ze=="string"&&ze.toLowerCase().includes("bottom")),ee=Mt.every(ze=>`${ze}`=="none"),br=ar?ar.toLowerCase().replace("top",""):"",oe=$r?$r.toLowerCase().replace("bottom",""):"",ue=!ar&&!$r&&!ee,Oe=()=>br?wt(br):void 0,st=()=>{if(oe)return wt(oe);if(ue)return wt(tt)};return{top:Oe(),bottom:st()}},pr=C.useMemo(()=>typeof A=="boolean"?{spinning:A}:typeof A=="object"&&A!==null?Object.assign({spinning:!0},A):void 0,[A]),_t=rt($e,Se,`${ce}-wrapper`,ge==null?void 0:ge.className,{[`${ce}-wrapper-rtl`]:xe==="rtl"},a,u,Ae),w=Object.assign(Object.assign({},ge==null?void 0:ge.style),l),E=C.useMemo(()=>pr!=null&&pr.spinning&&te===Lf?null:typeof(V==null?void 0:V.emptyText)<"u"?V.emptyText:(ae==null?void 0:ae("Table"))||C.createElement(R2,{componentName:"Table"}),[pr==null?void 0:pr.spinning,te,V==null?void 0:V.emptyText,ae]),Ie=K?$7:N7,$={},Q=C.useMemo(()=>{const{fontSize:Ke,lineHeight:wt,lineWidth:tt,padding:Mt,paddingXS:ar,paddingSM:$r}=we,ee=Math.floor(Ke*wt);switch(he){case"middle":return $r*2+ee+tt;case"small":return ar*2+ee+tt;default:return Mt*2+ee+tt}},[we,he]);K&&($.listItemHeight=Q);const{top:Zt,bottom:nt}=vr();return Ee(C.createElement("div",{ref:Le,className:_t,style:w},C.createElement(vp,Object.assign({spinning:!1},pr),Zt,C.createElement(Ie,Object.assign({},$,ie,{ref:Xe,columns:R,direction:xe,expandable:Te,prefixCls:ce,className:rt({[`${ce}-middle`]:he==="middle",[`${ce}-small`]:he==="small",[`${ce}-bordered`]:d,[`${ce}-empty`]:te.length===0},$e,Se,Ae),data:jt,rowKey:ft,rowClassName:jr,emptyText:E,internalHooks:wi,internalRefs:at,transformColumns:Tr,getContainerWidth:Me,measureRowRender:Ke=>C.createElement(I2,{getPopupContainer:wt=>wt},Ke)})),nt)))},G7=C.forwardRef(Y7),Z7=(e,t)=>{const r=C.useRef(0);return r.current+=1,C.createElement(G7,Object.assign({},e,{ref:t,_renderTimes:r.current}))},ho=C.forwardRef(Z7);ho.SELECTION_COLUMN=yo;ho.EXPAND_COLUMN=wo;ho.SELECTION_ALL=Zu;ho.SELECTION_INVERT=Ju;ho.SELECTION_NONE=Qu;ho.Column=o6;ho.ColumnGroup=a6;ho.Summary=Zp;var xn={},J7=Object.defineProperty,Q7=(e,t,r)=>t in e?J7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wr=(e,t,r)=>Q7(e,typeof t!="symbol"?t+"":t,r),Pi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hf={exports:{}},Pa={};/**
|
|
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 Kf;function eb(){if(Kf)return Pa;Kf=1;var e=_e,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 u(l,f,d){var p,v={},g=null,b=null;d!==void 0&&(g=""+d),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(b=f.ref);for(p in f)n.call(f,p)&&!a.hasOwnProperty(p)&&(v[p]=f[p]);if(l&&l.defaultProps)for(p in f=l.defaultProps,f)v[p]===void 0&&(v[p]=f[p]);return{$$typeof:t,type:l,key:g,ref:b,props:v,_owner:o.current}}return Pa.Fragment=r,Pa.jsx=u,Pa.jsxs=u,Pa}var qf;function tb(){return qf||(qf=1,Hf.exports=eb()),Hf.exports}var U=tb();/*!
|
|
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 Wf(e){return Object.prototype.toString.call(e)==="[object Object]"}function en(e){var t,r;return Wf(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Wf(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Cm=Symbol.for("immer-nothing"),Vf=Symbol.for("immer-draftable"),wn=Symbol.for("immer-state");function On(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ni=Object.getPrototypeOf;function Uo(e){return!!e&&!!e[wn]}function Xo(e){var t;return e?Dm(e)||Array.isArray(e)||!!e[Vf]||!!((t=e.constructor)!=null&&t[Vf])||Ci(e)||Js(e):!1}var rb=Object.prototype.constructor.toString(),Uf=new WeakMap;function Dm(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=Uf.get(r);return n===void 0&&(n=Function.toString.call(r),Uf.set(r,n)),n===rb}function Ss(e,t,r=!0){Zs(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 Zs(e){const t=e[wn];return t?t.type_:Array.isArray(e)?1:Ci(e)?2:Js(e)?3:0}function a0(e,t){return Zs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Em(e,t,r){const n=Zs(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function nb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ci(e){return e instanceof Map}function Js(e){return e instanceof Set}function Ro(e){return e.copy_||e.base_}function i0(e,t){if(Ci(e))return new Map(e);if(Js(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=Dm(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[wn];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const u=o[a],l=n[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(ni(e),n)}else{const n=ni(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function lc(e,t=!1){return Qs(e)||Uo(e)||!Xo(e)||(Zs(e)>1&&Object.defineProperties(e,{set:zi,add:zi,clear:zi,delete:zi}),Object.freeze(e),t&&Object.values(e).forEach(r=>lc(r,!0))),e}function ob(){On(2)}var zi={value:ob};function Qs(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var ab={};function Yo(e){const t=ab[e];return t||On(0,e),t}var oi;function km(){return oi}function ib(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xf(e,t){t&&(Yo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function s0(e){l0(e),e.drafts_.forEach(sb),e.drafts_=null}function l0(e){e===oi&&(oi=e.parent_)}function Yf(e){return oi=ib(oi,e)}function sb(e){const t=e[wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Gf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[wn].modified_&&(s0(t),On(4)),Xo(e)&&(e=As(t,e),t.parent_||Bs(t,e)),t.patches_&&Yo("Patches").generateReplacementPatches_(r[wn].base_,e,t.patches_,t.inversePatches_)):e=As(t,r,[]),s0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Cm?e:void 0}function As(e,t,r){if(Qs(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[wn];if(!o)return Ss(t,(a,u)=>Zf(e,o,t,a,u,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Bs(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const a=o.copy_;let u=a,l=!1;o.type_===3&&(u=new Set(a),a.clear(),l=!0),Ss(u,(f,d)=>Zf(e,o,a,f,d,r,l),n),Bs(e,a,!1),r&&e.patches_&&Yo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Zf(e,t,r,n,o,a,u){if(o==null||typeof o!="object"&&!u)return;const l=Qs(o);if(!(l&&!u)){if(Uo(o)){const f=a&&t&&t.type_!==3&&!a0(t.assigned_,n)?a.concat(n):void 0,d=As(e,o,f);if(Em(r,n,d),Uo(d))e.canAutoFreeze_=!1;else return}else u&&r.add(o);if(Xo(o)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&l)return;As(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Ci(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Bs(e,o)}}}function Bs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lc(t,r)}function lb(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:km(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=uc;r&&(o=[n],a=ai);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return n.draft_=l,n.revoke_=u,l}var uc={get(e,t){if(t===wn)return e;const r=Ro(e);if(!a0(r,t))return ub(e,r,t);const n=r[t];return e.finalized_||!Xo(n)?n:n===Gl(e.base_,t)?(Zl(e),e.copy_[t]=c0(n,e)):n},has(e,t){return t in Ro(e)},ownKeys(e){return Reflect.ownKeys(Ro(e))},set(e,t,r){const n=Sm(Ro(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Gl(Ro(e),t),a=o==null?void 0:o[wn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(nb(r,o)&&(r!==void 0||a0(e.base_,t)))return!0;Zl(e),u0(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 Gl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zl(e),u0(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ro(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){On(11)},getPrototypeOf(e){return ni(e.base_)},setPrototypeOf(){On(12)}},ai={};Ss(uc,(e,t)=>{ai[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ai.deleteProperty=function(e,t){return ai.set.call(this,e,t,void 0)};ai.set=function(e,t,r){return uc.set.call(this,e[0],t,r,e[0])};function Gl(e,t){const r=e[wn];return(r?Ro(r):e)[t]}function ub(e,t,r){var o;const n=Sm(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Sm(e,t){if(!(t in e))return;let r=ni(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ni(r)}}function u0(e){e.modified_||(e.modified_=!0,e.parent_&&u0(e.parent_))}function Zl(e){e.copy_||(e.copy_=i0(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var cb=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 u=this;return function(l=a,...f){return u.produce(l,d=>r.call(this,d,...f))}}typeof r!="function"&&On(6),n!==void 0&&typeof n!="function"&&On(7);let o;if(Xo(t)){const a=Yf(this),u=c0(t,void 0);let l=!0;try{o=r(u),l=!1}finally{l?s0(a):l0(a)}return Xf(a,n),Gf(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Cm&&(o=void 0),this.autoFreeze_&&lc(o,!0),n){const a=[],u=[];Yo("Patches").generateReplacementPatches_(t,o,a,u),n(a,u)}return o}else On(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...u)=>this.produceWithPatches(a,l=>t(l,...u));let n,o;return[this.produce(t,r,(a,u)=>{n=a,o=u}),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){Xo(e)||On(8),Uo(e)&&(e=db(e));const t=Yf(this),r=c0(e,void 0);return r[wn].isManual_=!0,l0(t),r}finishDraft(e,t){const r=e&&e[wn];(!r||!r.isManual_)&&On(9);const{scope_:n}=r;return Xf(n,t),Gf(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=Yo("Patches").applyPatches_;return Uo(e)?n(e,t):this.produce(e,o=>n(o,t))}};function c0(e,t){const r=Ci(e)?Yo("MapSet").proxyMap_(e,t):Js(e)?Yo("MapSet").proxySet_(e,t):lb(e,t);return(t?t.scope_:km()).drafts_.push(r),r}function db(e){return Uo(e)||On(10,e),Am(e)}function Am(e){if(!Xo(e)||Qs(e))return e;const t=e[wn];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=i0(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=i0(e,!0);return Ss(r,(o,a)=>{Em(r,o,Am(a))},n),t&&(t.finalized_=!1),r}var ii=new cb,cc=ii.produce,Jf=ii.createDraft.bind(ii),Qf=ii.finishDraft.bind(ii),fb={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()}}},hb={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Xt.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},pb={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Fe.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Fs=new WeakMap,Ns=new WeakMap,Ya=new WeakMap,Bm=new WeakMap,eh=new WeakMap,th=new WeakMap,rh=new WeakMap,ne={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=ne.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],u=t[r];return ne.equals(n,o)&&a>u},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return ne.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],u=t[r];return ne.equals(n,o)&&a<u},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 ne.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&ne.compare(e,t)===0},isBefore(e,t){return ne.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&ne.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&ne.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&ne.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&ne.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&&ne.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(!ne.isAncestor(t,e)&&!ne.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;(ne.equals(a,n)||ne.endsBefore(a,n)||ne.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:u}=t;if(ne.equals(u,n)||ne.isAncestor(u,n))return null;ne.endsBefore(u,n)&&(n[u.length-1]-=1);break}case"merge_node":{var{path:l,position:f}=t;ne.equals(l,n)||ne.endsBefore(l,n)?n[l.length-1]-=1:ne.isAncestor(l,n)&&(n[l.length-1]-=1,n[l.length]+=f);break}case"split_node":{var{path:d,position:p}=t;if(ne.equals(d,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else ne.endsBefore(d,n)?n[d.length-1]+=1:ne.isAncestor(d,n)&&e[d.length]>=p&&(n[d.length-1]+=1,n[d.length]-=p);break}case"move_node":{var{path:v,newPath:g}=t;if(ne.equals(v,g))return n;if(ne.isAncestor(v,n)||ne.equals(v,n)){var b=g.slice();return ne.endsBefore(v,g)&&v.length<g.length&&(b[v.length-1]-=1),b.concat(n.slice(v.length))}else ne.isSibling(v,g)&&(ne.isAncestor(g,n)||ne.equals(g,n))?ne.endsBefore(v,n)?n[v.length-1]-=1:n[v.length-1]+=1:ne.endsBefore(g,n)||ne.equals(g,n)||ne.isAncestor(g,n)?(ne.endsBefore(v,n)&&(n[v.length-1]-=1),n[g.length-1]+=1):ne.endsBefore(v,n)&&(ne.equals(g,n)&&(n[g.length-1]+=1),n[v.length-1]-=1);break}}return n}};function si(e){"@babel/helpers - typeof";return si=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},si(e)}function mb(e,t){if(si(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(si(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gb(e){var t=mb(e,"string");return si(t)==="symbol"?t:String(t)}function cn(e,t,r){return t=gb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nh(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 za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vb=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Qe.parent(e,n),u=n[n.length-1];if(u>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(u,0,o),t)for(var[l,f]of Fe.points(t))t[f]=Xt.transform(l,r);break}case"insert_text":{var{path:d,offset:p,text:v}=r;if(v.length===0)break;var g=Qe.leaf(e,d),b=g.text.slice(0,p),x=g.text.slice(p);if(g.text=b+v+x,t)for(var[D,m]of Fe.points(t))t[m]=Xt.transform(D,r);break}case"merge_node":{var{path:S}=r,F=Qe.get(e,S),B=ne.previous(S),O=Qe.get(e,B),A=Qe.parent(e,S),P=S[S.length-1];if(mt.isText(F)&&mt.isText(O))O.text+=F.text;else if(!mt.isText(F)&&!mt.isText(O))O.children.push(...F.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(S,"] to nodes of different interfaces: ").concat(Yr.stringify(F)," ").concat(Yr.stringify(O)));if(A.children.splice(P,1),t)for(var[T,_]of Fe.points(t))t[_]=Xt.transform(T,r);break}case"move_node":{var{path:M,newPath:q}=r;if(ne.isAncestor(M,q))throw new Error("Cannot move a path [".concat(M,"] to new path [").concat(q,"] because the destination is inside itself."));var L=Qe.get(e,M),Y=Qe.parent(e,M),V=M[M.length-1];Y.children.splice(V,1);var z=ne.transform(M,r),K=Qe.get(e,ne.parent(z)),X=z[z.length-1];if(K.children.splice(X,0,L),t)for(var[W,J]of Fe.points(t))t[J]=Xt.transform(W,r);break}case"remove_node":{var{path:R}=r,ie=R[R.length-1],me=Qe.parent(e,R);if(me.children.splice(ie,1),t)for(var[xe,ge]of Fe.points(t)){var ae=Xt.transform(xe,r);if(t!=null&&ae!=null)t[ge]=ae;else{var ke=void 0,Z=void 0;for(var[he,se]of Qe.texts(e))if(ne.compare(se,R)===-1)ke=[he,se];else{Z=[he,se];break}var te=!1;ke&&Z&&(ne.equals(Z[1],R)?te=!ne.hasPrevious(Z[1]):te=ne.common(ke[1],R).length<ne.common(Z[1],R).length),ke&&!te?(xe.path=ke[1],xe.offset=ke[0].text.length):Z?(xe.path=Z[1],xe.offset=0):t=null}}break}case"remove_text":{var{path:ce,offset:Ce,text:we}=r;if(we.length===0)break;var Se=Qe.leaf(e,ce),Ee=Se.text.slice(0,Ce),Ae=Se.text.slice(Ce+we.length);if(Se.text=Ee+Ae,t)for(var[$e,Te]of Fe.points(t))t[Te]=Xt.transform($e,r);break}case"set_node":{var{path:He,properties:pt,newProperties:at}=r;if(He.length===0)throw new Error("Cannot set properties on the root node!");var Me=Qe.get(e,He);for(var Le in at){if(Le==="children"||Le==="text")throw new Error('Cannot set the "'.concat(Le,'" property of nodes!'));var Xe=at[Le];Xe==null?delete Me[Le]:Me[Le]=Xe}for(var ft in pt)at.hasOwnProperty(ft)||delete Me[ft];break}case"set_selection":{var{newProperties:it}=r;if(it==null)t=it;else{if(t==null){if(!Fe.isRange(it))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Yr.stringify(it)," when there is no current selection."));t=za({},it)}for(var et in it){var $t=it[et];if($t==null){if(et==="anchor"||et==="focus")throw new Error('Cannot remove the "'.concat(et,'" selection property'));delete t[et]}else t[et]=$t}}break}case"split_node":{var{path:Dt,position:vt,properties:ht}=r;if(Dt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Dt,"] because the root node cannot be split."));var Pe=Qe.get(e,Dt),de=Qe.parent(e,Dt),bt=Dt[Dt.length-1],kt;if(mt.isText(Pe)){var Ft=Pe.text.slice(0,vt),Et=Pe.text.slice(vt);Pe.text=Ft,kt=za(za({},ht),{},{text:Et})}else{var or=Pe.children.slice(0,vt),At=Pe.children.slice(vt);Pe.children=or,kt=za(za({},ht),{},{children:At})}if(de.children.splice(bt+1,0,kt),t)for(var[Rt,tr]of Fe.points(t))t[tr]=Xt.transform(Rt,r);break}}return t},bb={transform(e,t){e.children=Jf(e.children);var r=e.selection&&Jf(e.selection);try{r=vb(e,r,t)}finally{e.children=Qf(e.children),r?e.selection=Uo(r)?Qf(r):r:e.selection=null}}},yb={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)}},xb={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)}},Fm=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(en(n)&&en(o)){if(!Fm(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 u in t)if(e[u]===void 0&&t[u]!==void 0)return!1;return!0};function wb(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 lo(e,t){if(e==null)return{};var r=wb(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 Cb=["anchor","focus"];function oh(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 Db(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Fe={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return Fe.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=Fe.edges(e);return t},equals(e,t){return Xt.equals(e.anchor,t.anchor)&&Xt.equals(e.focus,t.focus)},includes(e,t){if(Fe.isRange(t)){if(Fe.includes(e,t.anchor)||Fe.includes(e,t.focus))return!0;var[r,n]=Fe.edges(e),[o,a]=Fe.edges(t);return Xt.isBefore(r,o)&&Xt.isAfter(n,a)}var[u,l]=Fe.edges(e),f=!1,d=!1;return Xt.isPoint(t)?(f=Xt.compare(t,u)>=0,d=Xt.compare(t,l)<=0):(f=ne.compare(t,u.path)>=0,d=ne.compare(t,l.path)<=0),f&&d},intersection(e,t){var r=lo(e,Cb),[n,o]=Fe.edges(e),[a,u]=Fe.edges(t),l=Xt.isBefore(n,a)?a:n,f=Xt.isBefore(o,u)?o:u;return Xt.isBefore(f,l)?null:Db({anchor:l,focus:f},r)},isBackward(e){var{anchor:t,focus:r}=e;return Xt.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Xt.equals(t,r)},isExpanded(e){return!Fe.isCollapsed(e)},isForward(e){return!Fe.isBackward(e)},isRange(e){return en(e)&&Xt.isPoint(e.anchor)&&Xt.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Fe.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return cc(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,u;if(o==="inward"){var l=Fe.isCollapsed(n);Fe.isForward(n)?(a="forward",u=l?a:"backward"):(a="backward",u=l?a:"forward")}else o==="outward"?Fe.isForward(n)?(a="backward",u="forward"):(a="forward",u="backward"):(a=o,u=o);var f=Xt.transform(n.anchor,t,{affinity:a}),d=Xt.transform(n.focus,t,{affinity:u});if(!f||!d)return null;n.anchor=f,n.focus=d})}},ah=e=>en(e)&&Qe.isNodeList(e.children)&&!I.isEditor(e),yt={isAncestor(e){return en(e)&&Qe.isNodeList(e.children)},isElement:ah,isElementList(e){return Array.isArray(e)&&e.every(t=>yt.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 ah(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},Eb=["children"],kb=["text"],ih=new WeakMap,Qe={ancestor(e,t){var r=Qe.get(e,t);if(mt.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Yr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ne.ancestors(t,r)){var o=Qe.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(mt.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Yr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Yr.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=Qe.ancestor(e,t),{children:a}=o,u=n?a.length-1:0;n?u>=0:u<a.length;){var l=Qe.child(o,u),f=t.concat(u);yield[l,f],u=n?u-1:u+1}})()},common(e,t,r){var n=ne.common(t,r),o=Qe.get(e,n);return[o,n]},descendant(e,t){var r=Qe.get(e,t);if(I.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Yr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Qe.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 Qe.nodes(e,t))yt.isElement(r)&&(yield[r,n])})()},extractProps(e){if(yt.isAncestor(e)){var t=lo(e,Eb);return t}else{var t=lo(e,kb);return t}},first(e,t){for(var r=t.slice(),n=Qe.get(e,r);n&&!(mt.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(mt.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Yr.stringify(e)));var r=cc({children:e.children},n=>{var[o,a]=Fe.edges(t),u=Qe.nodes(n,{reverse:!0,pass:g=>{var[,b]=g;return!Fe.includes(t,b)}});for(var[,l]of u){if(!Fe.includes(t,l)){var f=Qe.parent(n,l),d=l[l.length-1];f.children.splice(d,1)}if(ne.equals(l,a.path)){var p=Qe.leaf(n,l);p.text=p.text.slice(0,a.offset)}if(ne.equals(l,o.path)){var v=Qe.leaf(n,l);v.text=v.text.slice(o.offset)}}I.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(mt.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Yr.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(mt.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return mt.isText(e)||yt.isElement(e)||I.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=ih.get(e);if(t!==void 0)return t;var r=e.every(n=>Qe.isNode(n));return ih.set(e,r),r},last(e,t){for(var r=t.slice(),n=Qe.get(e,r);n&&!(mt.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=Qe.get(e,t);if(!mt.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Yr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ne.levels(t,r)){var o=Qe.get(e,n);yield[o,n]}})()},matches(e,t){return yt.isElement(e)&&yt.isElementProps(t)&&yt.matches(e,t)||mt.isText(e)&&mt.isTextProps(t)&&mt.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,u=new Set,l=[],f=e;!(a&&(n?ne.isBefore(l,a):ne.isAfter(l,a)));){if(u.has(f)||(yield[f,l]),!u.has(f)&&!mt.isText(f)&&f.children.length!==0&&(r==null||r([f,l])===!1)){u.add(f);var d=n?f.children.length-1:0;ne.isAncestor(l,o)&&(d=o[l.length]),l=l.concat(d),f=Qe.get(e,l);continue}if(l.length===0)break;if(!n){var p=ne.next(l);if(Qe.has(e,p)){l=p,f=Qe.get(e,l);continue}}if(n&&l[l.length-1]!==0){var v=ne.previous(l);l=v,f=Qe.get(e,l);continue}l=ne.parent(l),f=Qe.get(e,l),u.add(f)}})()},parent(e,t){var r=ne.parent(t),n=Qe.get(e,r);if(mt.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 mt.isText(e)?e.text:e.children.map(Qe.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Qe.nodes(e,t))mt.isText(r)&&(yield[r,n])})()}};function sh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ha={isNodeOperation(e){return Ha.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!en(e))return!1;switch(e.type){case"insert_node":return ne.isPath(e.path)&&Qe.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ne.isPath(e.path);case"merge_node":return typeof e.position=="number"&&ne.isPath(e.path)&&en(e.properties);case"move_node":return ne.isPath(e.path)&&ne.isPath(e.newPath);case"remove_node":return ne.isPath(e.path)&&Qe.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ne.isPath(e.path);case"set_node":return ne.isPath(e.path)&&en(e.properties)&&en(e.newProperties);case"set_selection":return e.properties===null&&Fe.isRange(e.newProperties)||e.newProperties===null&&Fe.isRange(e.properties)||en(e.properties)&&en(e.newProperties);case"split_node":return ne.isPath(e.path)&&typeof e.position=="number"&&en(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Ha.isOperation(t))},isSelectionOperation(e){return Ha.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Ha.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Fr(Fr({},e),{},{type:"remove_node"});case"insert_text":return Fr(Fr({},e),{},{type:"remove_text"});case"merge_node":return Fr(Fr({},e),{},{type:"split_node",path:ne.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(ne.equals(t,r))return e;if(ne.isSibling(r,t))return Fr(Fr({},e),{},{path:t,newPath:r});var n=ne.transform(r,e),o=ne.transform(ne.next(r),e);return Fr(Fr({},e),{},{path:n,newPath:o})}case"remove_node":return Fr(Fr({},e),{},{type:"insert_node"});case"remove_text":return Fr(Fr({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:u}=e;return Fr(Fr({},e),{},{properties:u,newProperties:a})}case"set_selection":{var{properties:l,newProperties:f}=e;return l==null?Fr(Fr({},e),{},{properties:f,newProperties:null}):f==null?Fr(Fr({},e),{},{properties:null,newProperties:l}):Fr(Fr({},e),{},{properties:f,newProperties:l})}case"split_node":return Fr(Fr({},e),{},{type:"merge_node",path:ne.next(e.path)})}}},lh=new WeakMap,Sb=e=>{var t=lh.get(e);if(t!==void 0)return t;if(!en(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||en(e.marks))&&(e.selection===null||Fe.isRange(e.selection))&&Qe.isNodeList(e.children)&&Ha.isOperationList(e.operations);return lh.set(e,r),r},I={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 Sb(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)},Ab={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(ne.isPath)}};function uh(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 ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Xt={compare(e,t){var r=ne.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Xt.compare(e,t)===1},isBefore(e,t){return Xt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&ne.equals(e.path,t.path)},isPoint(e){return en(e)&&typeof e.offset=="number"&&ne.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return cc(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:u}=n;switch(t.type){case"insert_node":case"move_node":{n.path=ne.transform(a,t,r);break}case"insert_text":{ne.equals(t.path,a)&&(t.offset<u||t.offset===u&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{ne.equals(t.path,a)&&(n.offset+=t.position),n.path=ne.transform(a,t,r);break}case"remove_text":{ne.equals(t.path,a)&&t.offset<=u&&(n.offset-=Math.min(u-t.offset,t.text.length));break}case"remove_node":{if(ne.equals(t.path,a)||ne.isAncestor(t.path,a))return null;n.path=ne.transform(a,t,r);break}case"split_node":{if(ne.equals(t.path,a)){if(t.position===u&&o==null)return null;(t.position<u||t.position===u&&o==="forward")&&(n.offset-=t.position,n.path=ne.transform(a,t,ch(ch({},r),{},{affinity:"forward"})))}else n.path=ne.transform(a,t,r);break}}})}},dh=void 0,Yr={setScrubber(e){dh=e},stringify(e){return JSON.stringify(e,dh)}},Bb=["text"],Fb=["anchor","focus"];function fh(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 to(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mt={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var u=lo(a,Bb);return u}return Fm(n?o(e):e,n?o(t):t)},isText(e){return en(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>mt.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=[to({},e)];for(var n of t){var o=lo(n,Fb),[a,u]=Fe.edges(n),l=[],f=0,d=a.offset,p=u.offset;for(var v of r){var{length:g}=v.text,b=f;if(f+=g,d<=b&&f<=p){Object.assign(v,o),l.push(v);continue}if(d!==p&&(d===f||p===b)||d>f||p<b||p===b&&b!==0){l.push(v);continue}var x=v,D=void 0,m=void 0;if(p<f){var S=p-b;m=to(to({},x),{},{text:x.text.slice(S)}),x=to(to({},x),{},{text:x.text.slice(0,S)})}if(d>b){var F=d-b;D=to(to({},x),{},{text:x.text.slice(0,F)}),x=to(to({},x),{},{text:x.text.slice(F)})}Object.assign(x,o),D&&l.push(D),l.push(x),m&&l.push(m)}r=l}return r}},dc=e=>e.selection?e.selection:e.children.length>0?I.end(e,[]):[0],Fa=(e,t)=>{var[r]=I.node(e,t);return n=>n===r},fc=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?Rb(e):e,o=It.None,a=It.None,u=0,l=null,f=null;for(var d of n){var p=d.codePointAt(0);if(!p)break;var v=Ub(d,p);if([o,a]=r?[a,v]:[v,o],ia(o,It.ZWJ)&&ia(a,It.ExtPict)&&(r?l=hh(e.substring(0,u)):l=hh(e.substring(0,e.length-u)),!l)||ia(o,It.RI)&&ia(a,It.RI)&&(f!==null?f=!f:r?f=!0:f=Jb(e.substring(0,e.length-u)),!f)||o!==It.None&&a!==It.None&&Yb(o,a))break;u+=d.length}return u||1},Nb=/\s/,$b=/[\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]/,Mb=/['\u2018\u2019]/,Ob=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=fc(e,t),[a,u]=hc(e,o,t);if(Tb(a,u,t))n=!0,r+=o;else if(!n)r+=o;else break;e=u}return r},hc=(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)]},Tb=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(Nb.test(t))return!1;if(Mb.test(t)){var o=fc(r,n),[a,u]=hc(r,o,n);if(e(a,u,n))return!0}return!$b.test(t)},Rb=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(Pb(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(Ib(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},Ib=e=>e>=55296&&e<=56319,Pb=e=>e>=56320&&e<=57343,It;(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"})(It||(It={}));var zb=/^(?:[\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])$/,jb=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,_b=/^(?:[\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])$/,Lb=/^[\u1100-\u115F\uA960-\uA97C]$/,Hb=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Kb=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,qb=/^[\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]$/,Wb=/^[\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]$/,Vb=/^(?:[\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])$/,Ub=(e,t)=>{var r=It.Any;return e.search(zb)!==-1&&(r|=It.Extend),t===8205&&(r|=It.ZWJ),t>=127462&&t<=127487&&(r|=It.RI),e.search(jb)!==-1&&(r|=It.Prepend),e.search(_b)!==-1&&(r|=It.SpacingMark),e.search(Lb)!==-1&&(r|=It.L),e.search(Hb)!==-1&&(r|=It.V),e.search(Kb)!==-1&&(r|=It.T),e.search(qb)!==-1&&(r|=It.LV),e.search(Wb)!==-1&&(r|=It.LVT),e.search(Vb)!==-1&&(r|=It.ExtPict),r};function ia(e,t){return(e&t)!==0}var Xb=[[It.L,It.L|It.V|It.LV|It.LVT],[It.LV|It.V,It.V|It.T],[It.LVT|It.T,It.T],[It.Any,It.Extend|It.ZWJ],[It.Any,It.SpacingMark],[It.Prepend,It.Any],[It.ZWJ,It.ExtPict],[It.RI,It.RI]];function Yb(e,t){return Xb.findIndex(r=>ia(e,r[0])&&ia(t,r[1]))===-1}var Gb=/(?:[\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$/,hh=e=>e.search(Gb)!==-1,Zb=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Jb=e=>{var t=e.match(Zb);if(t===null)return!1;var r=t[0].length/2;return r%2===1},Qb={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]:{};I.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=dc(e)}=r;if(ne.isPath(o)&&(o=I.range(e,o)),Fe.isRange(o))if(Fe.isCollapsed(o))o=o.anchor;else{var a=Fe.end(o);if(!n&&I.void(e,{at:a}))return;var u=Fe.start(o),l=I.pointRef(e,u),f=I.pointRef(e,a);We.delete(e,{at:o,voids:n});var d=l.unref(),p=f.unref();o=d||p,We.setSelection(e,{anchor:o,focus:o})}if(!(!n&&I.void(e,{at:o})||I.elementReadOnly(e,{at:o}))){var{path:v,offset:g}=o;t.length>0&&e.apply({type:"insert_text",path:v,offset:g,text:t})}})}};function ph(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 ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var We=ji(ji(ji(ji({},bb),yb),xb),Qb),es=new WeakMap,e8=e=>es.get(e)||!1,t8=(e,t,r)=>{var n=es.get(e)||!1;es.set(e,!0);try{t(),r()}finally{es.set(e,n)}};function Nm(e,t,r){var n=Fs.get(e)||[],o=Ns.get(e)||new Set,a,u,l=v=>{if(v){var g=v.join(",");u.has(g)||(u.add(g),a.push(v))}};if(r){a=[],u=new Set;for(var f of n){var d=r(f);l(d)}}else a=n,u=o;for(var p of t)l(p);Fs.set(e,a),Ns.set(e,u)}var r8=(e,t)=>{for(var r of I.pathRefs(e))fb.transform(r,t);for(var n of I.pointRefs(e))hb.transform(n,t);for(var o of I.rangeRefs(e))pb.transform(o,t);if(!e8(e)){var a=ne.operationCanTransformPath(t)?u=>ne.transform(u,t):void 0;Nm(e,e.getDirtyPaths(t),a)}We.transform(e,t),e.operations.push(t),I.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Ya.get(e)||(Ya.set(e,!0),Promise.resolve().then(()=>{Ya.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},n8=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return ne.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=ne.levels(o),u=mt.isText(n)?[]:Array.from(Qe.nodes(n),q=>{var[,L]=q;return o.concat(L)});return[...a,...u]}case"merge_node":{var{path:l}=t,f=ne.ancestors(l),d=ne.previous(l);return[...f,d]}case"move_node":{var{path:p,newPath:v}=t;if(ne.equals(p,v))return[];var g=[],b=[];for(var x of ne.ancestors(p)){var D=ne.transform(x,t);g.push(D)}for(var m of ne.ancestors(v)){var S=ne.transform(m,t);b.push(S)}var F=b[b.length-1],B=v[v.length-1],O=F.concat(B);return[...g,...b,O]}case"remove_node":{var{path:A}=t,P=ne.ancestors(A);return[...P]}case"split_node":{var{path:T}=t,_=ne.levels(T),M=ne.next(T);return[..._,M]}default:return[]}},o8=e=>{var{selection:t}=e;return t?Qe.fragment(e,t):[]},a8=(e,t)=>{var[r,n]=t;if(!mt.isText(r)){if(yt.isElement(r)&&r.children.length===0){var o={text:""};We.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=I.isEditor(r)?!1:yt.isElement(r)&&(e.isInline(r)||r.children.length===0||mt.isText(r.children[0])||e.isInline(r.children[0])),u=0,l=0;l<r.children.length;l++,u++){var f=Qe.get(e,n);if(!mt.isText(f)){var d=f.children[u],p=f.children[u-1],v=l===r.children.length-1,g=mt.isText(d)||yt.isElement(d)&&e.isInline(d);if(g!==a)We.removeNodes(e,{at:n.concat(u),voids:!0}),u--;else if(yt.isElement(d)){if(e.isInline(d)){if(p==null||!mt.isText(p)){var b={text:""};We.insertNodes(e,b,{at:n.concat(u),voids:!0}),u++}else if(v){var x={text:""};We.insertNodes(e,x,{at:n.concat(u+1),voids:!0}),u++}}}else{if(!mt.isText(d)&&!("children"in d)){var D=d;D.children=[]}p!=null&&mt.isText(p)&&(mt.equals(d,p,{loose:!0})?(We.mergeNodes(e,{at:n.concat(u),voids:!0}),u--):p.text===""?(We.removeNodes(e,{at:n.concat(u-1),voids:!0}),u--):d.text===""&&(We.removeNodes(e,{at:n.concat(u),voids:!0}),u--))}}}}},i8=(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},s8=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 u=I.path(e,o),l=n==="lowest";for(var[f,d]of I.levels(e,{at:u,voids:r,match:a,reverse:l}))if(!mt.isText(f)){if(Fe.isRange(o)){if(ne.isAncestor(d,o.anchor.path)&&ne.isAncestor(d,o.focus.path))return[f,d]}else if(!ne.equals(u,d))return[f,d]}}};function mh(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 gh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var l8=(e,t,r)=>{var{selection:n}=e;if(n){var o=(v,g)=>{if(!mt.isText(v))return!1;var[b,x]=I.parent(e,g);return!e.isVoid(b)||e.markableVoid(b)},a=Fe.isExpanded(n),u=!1;if(!a){var[l,f]=I.node(e,n);if(l&&o(l,f)){var[d]=I.parent(e,f);u=d&&e.markableVoid(d)}}if(a||u)We.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var p=gh(gh({},I.marks(e)||{}),{},{[t]:r});e.marks=p,Ya.get(e)||e.onChange()}}};function vh(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 bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var u8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.point(e,t,{edge:"end"}),o=I.end(e,[]),a={anchor:n,focus:o},{distance:u=1}=r,l=0,f;for(var d of I.positions(e,bh(bh({},r),{},{at:a}))){if(l>u)break;l!==0&&(f=d),l++}return f};function yh(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 xh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var c8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.start(e,[]),o=I.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:u=1}=r,l=0,f;for(var d of I.positions(e,xh(xh({},r),{},{at:a,reverse:!0}))){if(l>u)break;l!==0&&(f=d),l++}return f},d8=(e,t)=>{var{selection:r}=e;r&&Fe.isCollapsed(r)&&We.delete(e,{unit:t,reverse:!0})},f8=(e,t)=>{var{selection:r}=e;r&&Fe.isCollapsed(r)&&We.delete(e,{unit:t})},h8=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Fe.isExpanded(r)&&We.delete(e,{reverse:t==="backward"})},p8=(e,t)=>[I.start(e,t),I.end(e,t)];function wh(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 Ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var m8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I.above(e,Ch(Ch({},t),{},{match:r=>yt.isElement(r)&&I.isElementReadOnly(e,r)}))},g8=(e,t)=>I.point(e,t,{edge:"end"}),v8=(e,t)=>{var r=I.path(e,t,{edge:"start"});return I.node(e,r)},b8=(e,t)=>{var r=I.range(e,t);return Qe.fragment(e,r)};function Dh(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 Eh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var y8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I.above(e,Eh(Eh({},t),{},{match:r=>yt.isElement(r)&&I.isVoid(e,r)}))},x8=(e,t)=>t.children.some(r=>yt.isElement(r)&&I.isBlock(e,r)),w8=(e,t)=>t.children.some(r=>mt.isText(r)||I.isInline(e,r)),C8=(e,t)=>Qe.has(e,t),D8=(e,t)=>t.children.every(r=>mt.isText(r)),E8=e=>{We.splitNodes(e,{always:!0})},k8=(e,t,r)=>{We.insertNodes(e,t,r)},S8=e=>{We.splitNodes(e,{always:!0})};function kh(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 A8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var B8=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=A8({text:t},o);We.insertNodes(e,a,{at:r.at,voids:r.voids})}else We.insertText(e,t,r);e.marks=null}},F8=(e,t)=>!e.isInline(t),N8=(e,t,r)=>I.isStart(e,t,r)||I.isEnd(e,t,r),$8=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&mt.isText(n)&&n.text===""&&!e.isVoid(t)},M8=(e,t,r)=>{var n=I.end(e,r);return Xt.equals(t,n)},O8=e=>{var t=Bm.get(e);return t===void 0?!0:t},T8=(e,t,r)=>{if(t.offset!==0)return!1;var n=I.start(e,r);return Xt.equals(t,n)},R8=(e,t)=>{var r=I.path(e,t,{edge:"end"});return I.node(e,r)},I8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.path(e,t,r),o=Qe.leaf(e,n);return[o,n]};function P8(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 u=[],l=I.path(e,r);for(var[f,d]of Qe.levels(e,l))if(a(f,d)&&(u.push([f,d]),!o&&yt.isElement(f)&&I.isVoid(e,f)))break;n&&u.reverse(),yield*u}})()}var z8=["text"],j8=["text"],_8=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(Fe.isExpanded(r)){var a=I.isEnd(e,n,n.path);if(a){var u=I.after(e,n);u&&(n=u)}var[l]=I.nodes(e,{match:mt.isText,at:{anchor:n,focus:o}});if(l){var[f]=l,d=lo(f,z8);return d}else return{}}var{path:p}=n,[v]=I.leaf(e,p);if(n.offset===0){var g=I.previous(e,{at:p,match:mt.isText}),b=I.above(e,{match:B=>yt.isElement(B)&&I.isVoid(e,B)&&e.markableVoid(B)});if(!b){var x=I.above(e,{match:B=>yt.isElement(B)&&I.isBlock(e,B)});if(g&&x){var[D,m]=g,[,S]=x;ne.isAncestor(S,m)&&(v=D)}}}var F=lo(v,j8);return F},L8=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 u=I.after(e,a,{voids:n});if(u){var[,l]=I.last(e,[]),f=[u.path,l];if(ne.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(ne.isPath(a)){var[d]=I.parent(e,a);o=v=>d.children.includes(v)}else o=()=>!0;var[p]=I.nodes(e,{at:f,match:o,mode:r,voids:n});return p}}},H8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.path(e,t,r),o=Qe.get(e,n);return[o,n]};function K8(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:u=!1,ignoreNonSelectable:l=!1}=t,{match:f}=t;if(f||(f=()=>!0),!!r){var d,p;if(Ab.isSpan(r))d=r[0],p=r[1];else{var v=I.path(e,r,{edge:"start"}),g=I.path(e,r,{edge:"end"});d=a?g:v,p=a?v:g}var b=Qe.nodes(e,{reverse:a,from:d,to:p,pass:O=>{var[A]=O;return yt.isElement(A)?!!(!u&&(I.isVoid(e,A)||I.isElementReadOnly(e,A))||l&&!I.isSelectable(e,A)):!1}}),x=[],D;for(var[m,S]of b)if(!(l&&yt.isElement(m)&&!I.isSelectable(e,m))){var F=D&&ne.compare(S,D[1])===0;if(!(n==="highest"&&F)){if(!f(m,S)){if(o&&!F&&mt.isText(m))return;continue}if(n==="lowest"&&F){D=[m,S];continue}var B=n==="lowest"?D:[m,S];B&&(o?x.push(B):yield B),D=[m,S]}}n==="lowest"&&D&&(o?x.push(D):yield D),o&&(yield*x)}})()}var q8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=d=>Fs.get(d)||[],a=d=>Ns.get(d)||new Set,u=d=>{var p=o(d).pop(),v=p.join(",");return a(d).delete(v),p};if(I.isNormalizing(e)){if(r){var l=Array.from(Qe.nodes(e),d=>{var[,p]=d;return p}),f=new Set(l.map(d=>d.join(",")));Fs.set(e,l),Ns.set(e,f)}o(e).length!==0&&I.withoutNormalizing(e,()=>{for(var d of o(e))if(Qe.has(e,d)){var p=I.node(e,d),[v,g]=p;yt.isElement(v)&&v.children.length===0&&e.normalizeNode(p,{operation:n})}for(var b=o(e),x=b.length,D=0;b.length!==0;){if(!e.shouldNormalize({dirtyPaths:b,iteration:D,initialDirtyPathsLength:x,operation:n}))return;var m=u(e);if(Qe.has(e,m)){var S=I.node(e,m);e.normalizeNode(S,{operation:n})}D++,b=o(e)}})}},W8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.path(e,t,r),o=ne.parent(n),a=I.node(e,o);return a},V8=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:u}=o,l=I.pathRefs(e);return l.delete(o),o.current=null,u}},a=I.pathRefs(e);return a.add(o),o},U8=e=>{var t=eh.get(e);return t||(t=new Set,eh.set(e,t)),t},X8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(ne.isPath(t)){if(o==="start"){var[,a]=Qe.first(e,t);t=a}else if(o==="end"){var[,u]=Qe.last(e,t);t=u}}return Fe.isRange(t)&&(o==="start"?t=Fe.start(t):o==="end"?t=Fe.end(t):t=ne.common(t.anchor.path,t.focus.path)),Xt.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},Y8=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:u}=o,l=I.pointRefs(e);return l.delete(o),o.current=null,u}},a=I.pointRefs(e);return a.add(o),o},G8=e=>{var t=th.get(e);return t||(t=new Set,th.set(e,t)),t},Z8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(ne.isPath(t)){var o;if(n==="end"){var[,a]=Qe.last(e,t);o=a}else{var[,u]=Qe.first(e,t);o=u}var l=Qe.get(e,o);if(!mt.isText(l))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"?l.text.length:0}}if(Fe.isRange(t)){var[f,d]=Fe.edges(t);return n==="start"?f:d}return t};function J8(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:u=!1}=t;if(!r)return;var l=I.range(e,r),[f,d]=Fe.edges(l),p=o?d:f,v=!1,g="",b=0,x=0,D=0;for(var[m,S]of I.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:u})){if(yt.isElement(m)){if(!a&&(e.isVoid(m)||e.isElementReadOnly(m))){yield I.start(e,S);continue}if(e.isInline(m))continue;if(I.hasInlines(e,m)){var F=ne.isAncestor(S,d.path)?d:I.end(e,S),B=ne.isAncestor(S,f.path)?f:I.start(e,S);g=I.string(e,{anchor:B,focus:F},{voids:a}),v=!0}}if(mt.isText(m)){var O=ne.equals(S,p.path);for(O?(x=o?p.offset:m.text.length-p.offset,D=p.offset):(x=m.text.length,D=o?x:0),(O||v||n==="offset")&&(yield{path:S,offset:D},v=!1);;){if(b===0){if(g==="")break;b=A(g,n,o),g=hc(g,b,o)[1]}if(D=o?D-b:D+b,x=x-b,x<0){b=-x;break}b=0,yield{path:S,offset:D}}}}function A(P,T,_){return T==="character"?fc(P,_):T==="word"?Ob(P,_):T==="line"||T==="block"?P.length:1}})()}var Q8=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 u=I.before(e,a,{voids:n});if(u){var[,l]=I.first(e,[]),f=[u.path,l];if(ne.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(ne.isPath(a)){var[d]=I.parent(e,a);o=v=>d.children.includes(v)}else o=()=>!0;var[p]=I.nodes(e,{reverse:!0,at:f,match:o,mode:r,voids:n});return p}}},ey=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:u}=o,l=I.rangeRefs(e);return l.delete(o),o.current=null,u}},a=I.rangeRefs(e);return a.add(o),o},ty=e=>{var t=rh.get(e);return t||(t=new Set,rh.set(e,t)),t},ry=(e,t,r)=>{if(Fe.isRange(t)&&!r)return t;var n=I.start(e,t),o=I.end(e,r||t);return{anchor:n,focus:o}};function Sh(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 ny(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var oy=(e,t)=>{var{selection:r}=e;if(r){var n=(p,v)=>{if(!mt.isText(p))return!1;var[g,b]=I.parent(e,v);return!e.isVoid(g)||e.markableVoid(g)},o=Fe.isExpanded(r),a=!1;if(!o){var[u,l]=I.node(e,r);if(u&&n(u,l)){var[f]=I.parent(e,l);a=f&&e.markableVoid(f)}}if(o||a)We.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var d=ny({},I.marks(e)||{});delete d[t],e.marks=d,Ya.get(e)||e.onChange()}}},ay=(e,t)=>{Bm.set(e,t)},iy=(e,t)=>I.point(e,t,{edge:"start"}),sy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=I.range(e,t),[a,u]=Fe.edges(o),l="";for(var[f,d]of I.nodes(e,{at:o,match:mt.isText,voids:n})){var p=f.text;ne.equals(d,u.path)&&(p=p.slice(0,u.offset)),ne.equals(d,a.path)&&(p=p.slice(a.offset)),l+=p}return l},ly=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,a]=Fe.edges(t);if(o.offset!==0||a.offset!==0||Fe.isCollapsed(t)||ne.hasPrevious(a.path))return t;var u=I.above(e,{at:a,match:b=>yt.isElement(b)&&I.isBlock(e,b),voids:n}),l=u?u[1]:[],f=I.start(e,o),d={anchor:f,focus:a},p=!0;for(var[v,g]of I.nodes(e,{at:d,match:mt.isText,reverse:!0,voids:n})){if(p){p=!1;continue}if(v.text!==""||ne.isBefore(g,l)){a={path:g,offset:v.text.length};break}}return{anchor:o,focus:a}},uy=(e,t)=>{var r=I.isNormalizing(e);I.setNormalizing(e,!1);try{t()}finally{I.setNormalizing(e,r)}I.normalize(e)},cy=(e,t,r)=>{var[n,o]=t;return yt.isElement(n)&&I.isEmpty(e,n)||mt.isText(n)&&n.text===""&&o[o.length-1]!==0},dy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:u=1,voids:l=!1}=t,{at:f=e.selection,hanging:d=!1}=t;if(f){var p=!1;if(Fe.isRange(f)&&Fe.isCollapsed(f)&&(p=!0,f=f.anchor),Xt.isPoint(f)){var v=I.void(e,{at:f,mode:"highest"});if(!l&&v){var[,g]=v;f=g}else{var b={unit:a,distance:u},x=o?I.before(e,f,b)||I.start(e,[]):I.after(e,f,b)||I.end(e,[]);f={anchor:f,focus:x},d=!0}}if(ne.isPath(f)){We.removeNodes(e,{at:f,voids:l});return}if(!Fe.isCollapsed(f)){if(!d){var[,D]=Fe.edges(f),m=I.end(e,[]);Xt.equals(D,m)||(f=I.unhangRange(e,f,{voids:l}))}var[S,F]=Fe.edges(f),B=I.above(e,{match:Se=>yt.isElement(Se)&&I.isBlock(e,Se),at:S,voids:l}),O=I.above(e,{match:Se=>yt.isElement(Se)&&I.isBlock(e,Se),at:F,voids:l}),A=B&&O&&!ne.equals(B[1],O[1]),P=ne.equals(S.path,F.path),T=l?null:(r=I.void(e,{at:S,mode:"highest"}))!==null&&r!==void 0?r:I.elementReadOnly(e,{at:S,mode:"highest"}),_=l?null:(n=I.void(e,{at:F,mode:"highest"}))!==null&&n!==void 0?n:I.elementReadOnly(e,{at:F,mode:"highest"});if(T){var M=I.before(e,S);M&&B&&ne.isAncestor(B[1],M.path)&&(S=M)}if(_){var q=I.after(e,F);q&&O&&ne.isAncestor(O[1],q.path)&&(F=q)}var L=[],Y;for(var V of I.nodes(e,{at:f,voids:l})){var[z,K]=V;Y&&ne.compare(K,Y)===0||(!l&&yt.isElement(z)&&(I.isVoid(e,z)||I.isElementReadOnly(e,z))||!ne.isCommon(K,S.path)&&!ne.isCommon(K,F.path))&&(L.push(V),Y=K)}var X=Array.from(L,Se=>{var[,Ee]=Se;return I.pathRef(e,Ee)}),W=I.pointRef(e,S),J=I.pointRef(e,F),R="";if(!P&&!T){var ie=W.current,[me]=I.leaf(e,ie),{path:xe}=ie,{offset:ge}=S,ae=me.text.slice(ge);ae.length>0&&(e.apply({type:"remove_text",path:xe,offset:ge,text:ae}),R=ae)}if(X.reverse().map(Se=>Se.unref()).filter(Se=>Se!==null).forEach(Se=>We.removeNodes(e,{at:Se,voids:l})),!_){var ke=J.current,[Z]=I.leaf(e,ke),{path:he}=ke,se=P?S.offset:0,te=Z.text.slice(se,F.offset);te.length>0&&(e.apply({type:"remove_text",path:he,offset:se,text:te}),R=te)}!P&&A&&J.current&&W.current&&We.mergeNodes(e,{at:J.current,hanging:!0,voids:l}),p&&o&&a==="character"&&R.length>1&&R.match(/[\u0E00-\u0E7F]+/)&&We.insertText(e,R.slice(0,R.length-u));var ce=W.unref(),Ce=J.unref(),we=o?ce||Ce:Ce||ce;t.at==null&&we&&We.select(e,we)}}})},fy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=dc(e),batchDirty:u=!0}=r;if(t.length){if(Fe.isRange(a))if(n||(a=I.unhangRange(e,a,{voids:o})),Fe.isCollapsed(a))a=a.anchor;else{var[,l]=Fe.edges(a);if(!o&&I.void(e,{at:l}))return;var f=I.pointRef(e,l);We.delete(e,{at:a}),a=f.unref()}else ne.isPath(a)&&(a=I.start(e,a));if(!(!o&&I.void(e,{at:a}))){var d=I.above(e,{at:a,match:ae=>yt.isElement(ae)&&I.isInline(e,ae),mode:"highest",voids:o});if(d){var[,p]=d;if(I.isEnd(e,a,p)){var v=I.after(e,p);a=v}else if(I.isStart(e,a,p)){var g=I.before(e,p);a=g}}var b=I.above(e,{match:ae=>yt.isElement(ae)&&I.isBlock(e,ae),at:a,voids:o}),[,x]=b,D=I.isStart(e,a,x),m=I.isEnd(e,a,x),S=D&&m,F=!D||D&&m,B=!m,[,O]=Qe.first({children:t},[]),[,A]=Qe.last({children:t},[]),P=[],T=ae=>{var[ke,Z]=ae,he=Z.length===0;return he?!1:S?!0:!(F&&ne.isAncestor(Z,O)&&yt.isElement(ke)&&!e.isVoid(ke)&&!e.isInline(ke)||B&&ne.isAncestor(Z,A)&&yt.isElement(ke)&&!e.isVoid(ke)&&!e.isInline(ke))};for(var _ of Qe.nodes({children:t},{pass:T}))T(_)&&P.push(_);var M=[],q=[],L=[],Y=!0,V=!1;for(var[z]of P)yt.isElement(z)&&!e.isInline(z)?(Y=!1,V=!0,q.push(z)):Y?M.push(z):L.push(z);var[K]=I.nodes(e,{at:a,match:ae=>mt.isText(ae)||I.isInline(e,ae),mode:"highest",voids:o}),[,X]=K,W=I.isStart(e,a,X),J=I.isEnd(e,a,X),R=I.pathRef(e,m&&!L.length?ne.next(x):x),ie=I.pathRef(e,J?ne.next(X):X);We.splitNodes(e,{at:a,match:ae=>V?yt.isElement(ae)&&I.isBlock(e,ae):mt.isText(ae)||I.isInline(e,ae),mode:V?"lowest":"highest",always:V&&(!D||M.length>0)&&(!m||L.length>0),voids:o});var me=I.pathRef(e,!W||W&&J?ne.next(X):X);if(We.insertNodes(e,M,{at:me.current,match:ae=>mt.isText(ae)||I.isInline(e,ae),mode:"highest",voids:o,batchDirty:u}),S&&!M.length&&q.length&&!L.length&&We.delete(e,{at:x,voids:o}),We.insertNodes(e,q,{at:R.current,match:ae=>yt.isElement(ae)&&I.isBlock(e,ae),mode:"lowest",voids:o,batchDirty:u}),We.insertNodes(e,L,{at:ie.current,match:ae=>mt.isText(ae)||I.isInline(e,ae),mode:"highest",voids:o,batchDirty:u}),!r.at){var xe;if(L.length>0&&ie.current?xe=ne.previous(ie.current):q.length>0&&R.current?xe=ne.previous(R.current):me.current&&(xe=ne.previous(me.current)),xe){var ge=I.end(e,xe);We.select(e,ge)}}me.unref(),R.unref(),ie.unref()}}})},hy=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")We.select(e,n.anchor);else if(r==="focus")We.select(e,n.focus);else if(r==="start"){var[o]=Fe.edges(n);We.select(e,o)}else if(r==="end"){var[,a]=Fe.edges(n);We.select(e,a)}}else return},py=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},my=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:u=null}=t;if(r){u==="start"&&(u=Fe.isBackward(r)?"focus":"anchor"),u==="end"&&(u=Fe.isBackward(r)?"anchor":"focus");var{anchor:l,focus:f}=r,d={distance:n,unit:o,ignoreNonSelectable:!0},p={};if(u==null||u==="anchor"){var v=a?I.before(e,l,d):I.after(e,l,d);v&&(p.anchor=v)}if(u==null||u==="focus"){var g=a?I.before(e,f,d):I.after(e,f,d);g&&(p.focus=g)}We.setSelection(e,p)}},gy=(e,t)=>{var{selection:r}=e;if(t=I.range(e,t),r){We.setSelection(e,t);return}if(!Fe.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(Yr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function Ah(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 Bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ah(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vy=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=Fe.isBackward(n)?"focus":"anchor"),o==="end"&&(o=Fe.isBackward(n)?"anchor":"focus");var{anchor:a,focus:u}=n,l=o==="anchor"?a:u;We.setSelection(e,{[o==="anchor"?"anchor":"focus"]:Bh(Bh({},l),t)})}},by=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!Xt.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!Xt.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})}},yy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:u=!0}=r,{at:l,match:f,select:d}=r;if(Qe.isNode(t)&&(t=[t]),t.length!==0){var[p]=t;if(l||(l=dc(e),d!==!1&&(d=!0)),d==null&&(d=!1),Fe.isRange(l))if(n||(l=I.unhangRange(e,l,{voids:o})),Fe.isCollapsed(l))l=l.anchor;else{var[,v]=Fe.edges(l),g=I.pointRef(e,v);We.delete(e,{at:l}),l=g.unref()}if(Xt.isPoint(l)){f==null&&(mt.isText(p)?f=M=>mt.isText(M):e.isInline(p)?f=M=>mt.isText(M)||I.isInline(e,M):f=M=>yt.isElement(M)&&I.isBlock(e,M));var[b]=I.nodes(e,{at:l.path,match:f,mode:a,voids:o});if(b){var[,x]=b,D=I.pathRef(e,x),m=I.isEnd(e,l,x);We.splitNodes(e,{at:l,match:f,mode:a,voids:o});var S=D.unref();l=m?ne.next(S):S}else return}var F=ne.parent(l),B=l[l.length-1];if(!(!o&&I.void(e,{at:F}))){if(u){var O=[],A=ne.levels(F);t8(e,()=>{var M=function(){var L=F.concat(B);B++;var Y={type:"insert_node",path:L,node:q};e.apply(Y),l=ne.next(l),O.push(Y),mt.isText?A.push(...Array.from(Qe.nodes(q),V=>{var[,z]=V;return L.concat(z)})):A.push(L)};for(var q of t)M()},()=>{Nm(e,A,M=>{var q=M;for(var L of O)if(ne.operationCanTransformPath(L)&&(q=ne.transform(q,L),!q))return null;return q})})}else for(var P of t){var T=F.concat(B);B++,e.apply({type:"insert_node",path:T,node:P}),l=ne.next(l)}if(l=ne.previous(l),d){var _=I.end(e,l);_&&We.select(e,_)}}}})},xy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=ne.isPath(r)?Fa(e,r):B=>yt.isElement(B)&&I.isBlock(e,B)),!!r){var u=I.nodes(e,{at:r,match:a,mode:n,voids:o}),l=Array.from(u,B=>{var[,O]=B;return I.pathRef(e,O)});for(var f of l){var d=f.unref();if(d.length<2)throw new Error("Cannot lift node at a path [".concat(d,"] because it has a depth of less than `2`."));var p=I.node(e,ne.parent(d)),[v,g]=p,b=d[d.length-1],{length:x}=v.children;if(x===1){var D=ne.next(g);We.moveNodes(e,{at:d,to:D,voids:o}),We.removeNodes(e,{at:g,voids:o})}else if(b===0)We.moveNodes(e,{at:d,to:g,voids:o});else if(b===x-1){var m=ne.next(g);We.moveNodes(e,{at:d,to:m,voids:o})}else{var S=ne.next(d),F=ne.next(g);We.splitNodes(e,{at:S,voids:o}),We.moveNodes(e,{at:d,to:F,voids:o})}}}})},wy=["text"],Cy=["children"],$m=(e,t)=>{if(yt.isElement(t)){var r=t;return I.isVoid(e,t)?!0:r.children.length===1?$m(e,r.children[0]):!1}else return!I.isEditor(t)},Dy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:u="lowest"}=t;if(n){if(r==null)if(ne.isPath(n)){var[l]=I.parent(e,n);r=M=>l.children.includes(M)}else r=M=>yt.isElement(M)&&I.isBlock(e,M);if(!o&&Fe.isRange(n)&&(n=I.unhangRange(e,n,{voids:a})),Fe.isRange(n))if(Fe.isCollapsed(n))n=n.anchor;else{var[,f]=Fe.edges(n),d=I.pointRef(e,f);We.delete(e,{at:n}),n=d.unref(),t.at==null&&We.select(e,n)}var[p]=I.nodes(e,{at:n,match:r,voids:a,mode:u}),v=I.previous(e,{at:n,match:r,voids:a,mode:u});if(!(!p||!v)){var[g,b]=p,[x,D]=v;if(!(b.length===0||D.length===0)){var m=ne.next(D),S=ne.common(b,D),F=ne.isSibling(b,D),B=Array.from(I.levels(e,{at:b}),M=>{var[q]=M;return q}).slice(S.length).slice(0,-1),O=I.above(e,{at:b,mode:"highest",match:M=>B.includes(M)&&$m(e,M)}),A=O&&I.pathRef(e,O[1]),P,T;if(mt.isText(g)&&mt.isText(x)){var _=lo(g,wy);T=x.text.length,P=_}else if(yt.isElement(g)&&yt.isElement(x)){var _=lo(g,Cy);T=x.children.length,P=_}else throw new Error("Cannot merge the node at path [".concat(b,"] with the previous sibling because it is not the same kind: ").concat(Yr.stringify(g)," ").concat(Yr.stringify(x)));F||We.moveNodes(e,{at:b,to:m,voids:a}),A&&We.removeNodes(e,{at:A.current,voids:a}),I.shouldMergeNodesRemovePrevNode(e,v,p)?We.removeNodes(e,{at:D,voids:a}):e.apply({type:"merge_node",path:m,position:T,properties:P}),A&&A.unref()}}}})},Ey=(e,t)=>{I.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:u}=t;if(n){u==null&&(u=ne.isPath(n)?Fa(e,n):b=>yt.isElement(b)&&I.isBlock(e,b));var l=I.pathRef(e,r),f=I.nodes(e,{at:n,match:u,mode:o,voids:a}),d=Array.from(f,b=>{var[,x]=b;return I.pathRef(e,x)});for(var p of d){var v=p.unref(),g=l.current;v.length!==0&&e.apply({type:"move_node",path:v,newPath:g}),l.current&&ne.isSibling(g,v)&&ne.isAfter(g,v)&&(l.current=ne.next(l.current))}l.unref()}})},ky=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:u}=t;if(a){u==null&&(u=ne.isPath(a)?Fa(e,a):g=>yt.isElement(g)&&I.isBlock(e,g)),!r&&Fe.isRange(a)&&(a=I.unhangRange(e,a,{voids:n}));var l=I.nodes(e,{at:a,match:u,mode:o,voids:n}),f=Array.from(l,g=>{var[,b]=g;return I.pathRef(e,b)});for(var d of f){var p=d.unref();if(p){var[v]=I.node(e,p);e.apply({type:"remove_node",path:p,node:v})}}}})},Sy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:u}=r,{hanging:l=!1,mode:f="lowest",split:d=!1,voids:p=!1}=r;if(o){if(n==null&&(n=ne.isPath(o)?Fa(e,o):T=>yt.isElement(T)&&I.isBlock(e,T)),!l&&Fe.isRange(o)&&(o=I.unhangRange(e,o,{voids:p})),d&&Fe.isRange(o)){if(Fe.isCollapsed(o)&&I.leaf(e,o.anchor)[0].text.length>0)return;var v=I.rangeRef(e,o,{affinity:"inward"}),[g,b]=Fe.edges(o),x=f==="lowest"?"lowest":"highest",D=I.isEnd(e,b,b.path);We.splitNodes(e,{at:b,match:n,mode:x,voids:p,always:!D});var m=I.isStart(e,g,g.path);We.splitNodes(e,{at:g,match:n,mode:x,voids:p,always:!m}),o=v.unref(),r.at==null&&We.select(e,o)}a||(a=(T,_)=>T!==_);for(var[S,F]of I.nodes(e,{at:o,match:n,mode:f,voids:p})){var B={},O={};if(F.length!==0){var A=!1;for(var P in t)P==="children"||P==="text"||a(t[P],S[P])&&(A=!0,S.hasOwnProperty(P)&&(B[P]=S[P]),u?t[P]!=null&&(O[P]=u(S[P],t[P])):t[P]!=null&&(O[P]=t[P]));A&&e.apply({type:"set_node",path:F,properties:B,newProperties:O})}}}})},Ay=(e,t)=>{if(Fe.isCollapsed(t))return t.anchor;var[,r]=Fe.edges(t),n=I.pointRef(e,r);return We.delete(e,{at:t}),n.unref()},By=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:u=0,always:l=!1}=t;if(o==null&&(o=J=>yt.isElement(J)&&I.isBlock(e,J)),Fe.isRange(a)&&(a=Ay(e,a)),ne.isPath(a)){var f=a,d=I.point(e,f),[p]=I.parent(e,f);o=J=>J===p,u=d.path.length-f.length+1,a=d,l=!0}if(a){var v=I.pointRef(e,a,{affinity:"backward"}),g;try{var[b]=I.nodes(e,{at:a,match:o,mode:r,voids:n});if(!b)return;var x=I.void(e,{at:a,mode:"highest"}),D=0;if(!n&&x){var[m,S]=x;if(yt.isElement(m)&&e.isInline(m)){var F=I.after(e,S);if(!F){var B={text:""},O=ne.next(S);We.insertNodes(e,B,{at:O,voids:n}),F=I.point(e,O)}a=F,l=!0}var A=a.path.length-S.length;u=A+1,l=!0}g=I.pointRef(e,a);var P=a.path.length-u,[,T]=b,_=a.path.slice(0,P),M=u===0?a.offset:a.path[P]+D;for(var[q,L]of I.levels(e,{at:_,reverse:!0,voids:n})){var Y=!1;if(L.length<T.length||L.length===0||!n&&yt.isElement(q)&&I.isVoid(e,q))break;var V=v.current,z=I.isEnd(e,V,L);if(l||!v||!I.isEdge(e,V,L)){Y=!0;var K=Qe.extractProps(q);e.apply({type:"split_node",path:L,position:M,properties:K})}M=L[L.length-1]+(Y||z?1:0)}if(t.at==null){var X=g.current||I.end(e,[]);We.select(e,X)}}finally{var W;v.unref(),(W=g)===null||W===void 0||W.unref()}}})},Fy=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;We.setNodes(e,n,r)},Ny=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:u}=t;if(a){u==null&&(u=ne.isPath(a)?Fa(e,a):g=>yt.isElement(g)&&I.isBlock(e,g)),ne.isPath(a)&&(a=I.range(e,a));var l=Fe.isRange(a)?I.rangeRef(e,a):null,f=I.nodes(e,{at:a,match:u,mode:r,voids:o}),d=Array.from(f,g=>{var[,b]=g;return I.pathRef(e,b)}).reverse(),p=function(){var g=v.unref(),[b]=I.node(e,g),x=I.range(e,g);n&&l&&(x=Fe.intersection(l.current,x)),We.liftNodes(e,{at:x,match:D=>yt.isAncestor(b)&&b.children.includes(D),voids:o})};for(var v of d)p();l&&l.unref()}})};function Fh(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 Nh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fh(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $y=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:u,at:l=e.selection}=r;if(l){if(u==null&&(ne.isPath(l)?u=Fa(e,l):e.isInline(t)?u=x=>yt.isElement(x)&&I.isInline(e,x)||mt.isText(x):u=x=>yt.isElement(x)&&I.isBlock(e,x)),o&&Fe.isRange(l)){var[f,d]=Fe.edges(l),p=I.rangeRef(e,l,{affinity:"inward"});We.splitNodes(e,{at:d,match:u,voids:a}),We.splitNodes(e,{at:f,match:u,voids:a}),l=p.unref(),r.at==null&&We.select(e,l)}var v=Array.from(I.nodes(e,{at:l,match:e.isInline(t)?x=>yt.isElement(x)&&I.isBlock(e,x):x=>I.isEditor(x),mode:"lowest",voids:a})),g=function(){var x=Fe.isRange(l)?Fe.intersection(l,I.range(e,b)):l;if(!x)return 0;var D=Array.from(I.nodes(e,{at:x,match:u,mode:n,voids:a}));if(D.length>0){var[m]=D,S=D[D.length-1],[,F]=m,[,B]=S;if(F.length===0&&B.length===0)return 0;var O=ne.equals(F,B)?ne.parent(F):ne.common(F,B),A=I.range(e,F,B),P=I.node(e,O),[T]=P,_=O.length+1,M=ne.next(B.slice(0,_)),q=Nh(Nh({},t),{},{children:[]});We.insertNodes(e,q,{at:M,voids:a}),We.moveNodes(e,{at:A,match:L=>yt.isAncestor(T)&&T.children.includes(L),to:M.concat(0),voids:a})}};for(var[,b]of v)g()}})},My=()=>{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 r8(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return l8(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return d8(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f8(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h8(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o8(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E8(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S8(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fy(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k8(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B8(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a8(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return oy(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return n8(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i8(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s8(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return u8(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c8(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hy(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dy(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return py(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return p8(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m8(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g8(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v8(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b8(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _8(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x8(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w8(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C8(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D8(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yy(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F8(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N8(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $8(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M8(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O8(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T8(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return R8(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return I8(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P8(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xy(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dy(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return my(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ey(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L8(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H8(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return K8(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return q8(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return W8(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return X8(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return V8(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return U8(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Z8(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Y8(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return G8(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return J8(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Q8(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ry(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ey(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ty(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ky(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gy(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sy(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ay(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vy(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return by(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return By(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return iy(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sy(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ly(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fy(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ny(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y8(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uy(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $y(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cy(e,...r)}};return e},Jl,$h;function Oy(){if($h)return Jl;$h=1,Jl=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 Jl}var Ty=Oy();const Mm=Gs(Ty);var Ql,Mh;function pc(){if(Mh)return Ql;Mh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Ql=e,Ql}var eu,Oh;function Ry(){if(Oh)return eu;Oh=1;var e=typeof Pi=="object"&&Pi&&Pi.Object===Object&Πreturn eu=e,eu}var tu,Th;function Om(){if(Th)return tu;Th=1;var e=Ry(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return tu=r,tu}var ru,Rh;function Iy(){if(Rh)return ru;Rh=1;var e=Om(),t=function(){return e.Date.now()};return ru=t,ru}var nu,Ih;function Py(){if(Ih)return nu;Ih=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return nu=t,nu}var ou,Ph;function zy(){if(Ph)return ou;Ph=1;var e=Py(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return ou=r,ou}var au,zh;function Tm(){if(zh)return au;zh=1;var e=Om(),t=e.Symbol;return au=t,au}var iu,jh;function jy(){if(jh)return iu;jh=1;var e=Tm(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(u){var l=r.call(u,o),f=u[o];try{u[o]=void 0;var d=!0}catch{}var p=n.call(u);return d&&(l?u[o]=f:delete u[o]),p}return iu=a,iu}var su,_h;function _y(){if(_h)return su;_h=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return su=r,su}var lu,Lh;function Ly(){if(Lh)return lu;Lh=1;var e=Tm(),t=jy(),r=_y(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function u(l){return l==null?l===void 0?o:n:a&&a in Object(l)?t(l):r(l)}return lu=u,lu}var uu,Hh;function Hy(){if(Hh)return uu;Hh=1;function e(t){return t!=null&&typeof t=="object"}return uu=e,uu}var cu,Kh;function Ky(){if(Kh)return cu;Kh=1;var e=Ly(),t=Hy(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return cu=n,cu}var du,qh;function qy(){if(qh)return du;qh=1;var e=zy(),t=pc(),r=Ky(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;function f(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=t(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=e(d);var v=a.test(d);return v||u.test(d)?l(d.slice(2),v?2:8):o.test(d)?n:+d}return du=f,du}var fu,Wh;function Rm(){if(Wh)return fu;Wh=1;var e=pc(),t=Iy(),r=qy(),n="Expected a function",o=Math.max,a=Math.min;function u(l,f,d){var p,v,g,b,x,D,m=0,S=!1,F=!1,B=!0;if(typeof l!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(S=!!d.leading,F="maxWait"in d,g=F?o(r(d.maxWait)||0,f):g,B="trailing"in d?!!d.trailing:B);function O(V){var z=p,K=v;return p=v=void 0,m=V,b=l.apply(K,z),b}function A(V){return m=V,x=setTimeout(_,f),S?O(V):b}function P(V){var z=V-D,K=V-m,X=f-z;return F?a(X,g-K):X}function T(V){var z=V-D,K=V-m;return D===void 0||z>=f||z<0||F&&K>=g}function _(){var V=t();if(T(V))return M(V);x=setTimeout(_,P(V))}function M(V){return x=void 0,B&&p?O(V):(p=v=void 0,b)}function q(){x!==void 0&&clearTimeout(x),m=0,p=D=v=x=void 0}function L(){return x===void 0?b:M(t())}function Y(){var V=t(),z=T(V);if(p=arguments,v=this,D=V,z){if(x===void 0)return A(D);if(F)return clearTimeout(x),x=setTimeout(_,f),O(D)}return x===void 0&&(x=setTimeout(_,f)),b}return Y.cancel=q,Y.flush=L,Y}return fu=u,fu}var Wy=Rm();const Vy=Gs(Wy);var hu,Vh;function Uy(){if(Vh)return hu;Vh=1;var e=Rm(),t=pc(),r="Expected a function";function n(o,a,u){var l=!0,f=!0;if(typeof o!="function")throw new TypeError(r);return t(u)&&(l="leading"in u?!!u.leading:l,f="trailing"in u?!!u.trailing:f),e(o,a,{leading:l,maxWait:a,trailing:f})}return hu=n,hu}var Xy=Uy();const Yy=Gs(Xy),Uh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Xh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",_i=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return Xh(r.overflowY,t)||Xh(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},Li=(e,t,r,n,o,a,u,l)=>a<e&&u>t||a>e&&u<t?0:a<=e&&l<=r||u>=t&&l>=r?a-e-n:u>t&&l<r||a<e&&l>r?u-t+o:0,Gy=e=>e.parentElement??(e.getRootNode().host||null),Yh=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:u,block:l,inline:f,boundary:d,skipOverflowHiddenElements:p}=t,v=typeof d=="function"?d:X=>X!==d;if(!Uh(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,b=[];let x=e;for(;Uh(x)&&v(x);){if(x=Gy(x),x===g){b.push(x);break}x!=null&&x===document.body&&_i(x)&&!_i(document.documentElement)||x!=null&&_i(x,p)&&b.push(x)}const D=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,m=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:S,scrollY:F}=window,{height:B,width:O,top:A,right:P,bottom:T,left:_}=e.getBoundingClientRect(),{top:M,right:q,bottom:L,left:Y}=(X=>{const W=window.getComputedStyle(X);return{top:parseFloat(W.scrollMarginTop)||0,right:parseFloat(W.scrollMarginRight)||0,bottom:parseFloat(W.scrollMarginBottom)||0,left:parseFloat(W.scrollMarginLeft)||0}})(e);let V=l==="start"||l==="nearest"?A-M:l==="end"?T+L:A+B/2-M+L,z=f==="center"?_+O/2-Y+q:f==="end"?P+q:_-Y;const K=[];for(let X=0;X<b.length;X++){const W=b[X],{height:J,width:R,top:ie,right:me,bottom:xe,left:ge}=W.getBoundingClientRect();if(u==="if-needed"&&A>=0&&_>=0&&T<=m&&P<=D&&(W===g&&!_i(W)||A>=ie&&T<=xe&&_>=ge&&P<=me))return K;const ae=getComputedStyle(W),ke=parseInt(ae.borderLeftWidth,10),Z=parseInt(ae.borderTopWidth,10),he=parseInt(ae.borderRightWidth,10),se=parseInt(ae.borderBottomWidth,10);let te=0,ce=0;const Ce="offsetWidth"in W?W.offsetWidth-W.clientWidth-ke-he:0,we="offsetHeight"in W?W.offsetHeight-W.clientHeight-Z-se:0,Se="offsetWidth"in W?W.offsetWidth===0?0:R/W.offsetWidth:0,Ee="offsetHeight"in W?W.offsetHeight===0?0:J/W.offsetHeight:0;if(g===W)te=l==="start"?V:l==="end"?V-m:l==="nearest"?Li(F,F+m,m,Z,se,F+V,F+V+B,B):V-m/2,ce=f==="start"?z:f==="center"?z-D/2:f==="end"?z-D:Li(S,S+D,D,ke,he,S+z,S+z+O,O),te=Math.max(0,te+F),ce=Math.max(0,ce+S);else{te=l==="start"?V-ie-Z:l==="end"?V-xe+se+we:l==="nearest"?Li(ie,xe,J,Z,se+we,V,V+B,B):V-(ie+J/2)+we/2,ce=f==="start"?z-ge-ke:f==="center"?z-(ge+R/2)+Ce/2:f==="end"?z-me+he+Ce:Li(ge,me,R,ke,he+Ce,z,z+O,O);const{scrollLeft:Ae,scrollTop:$e}=W;te=Ee===0?0:Math.max(0,Math.min($e+te/Ee,W.scrollHeight-J/Ee+we)),ce=Se===0?0:Math.max(0,Math.min(Ae+ce/Se,W.scrollWidth-R/Se+Ce)),V+=$e-te,z+=Ae-ce}K.push({el:W,top:te,left:ce})}return K},Zy=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function Jy(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(Yh(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:u}of Yh(e,Zy(t))){const l=a-r.top+r.bottom,f=u-r.left+r.right;o.scroll({top:l,left:f,behavior:n})}}var _o=[],Qy=function(){return _o.some(function(e){return e.activeTargets.length>0})},ex=function(){return _o.some(function(e){return e.skippedTargets.length>0})},Gh="ResizeObserver loop completed with undelivered notifications.",tx=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Gh}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Gh),window.dispatchEvent(e)},li;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(li||(li={}));var Lo=function(e){return Object.freeze(e)},rx=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Lo(this)}return e})(),Im=(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,Lo(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,u=t.bottom,l=t.left,f=t.width,d=t.height;return{x:r,y:n,top:o,right:a,bottom:u,left:l,width:f,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),mc=function(e){return e instanceof SVGElement&&"getBBox"in e},Pm=function(e){if(mc(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,u=o.offsetHeight;return!(a||u||e.getClientRects().length)},Zh=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)},nx=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},Ga=typeof window<"u"?window:{},Hi=new WeakMap,Jh=/auto|scroll/,ox=/^tb|vertical/,ax=/msie|trident/i.test(Ga.navigator&&Ga.navigator.userAgent),Kn=function(e){return parseFloat(e||"0")},da=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new rx((r?t:e)||0,(r?e:t)||0)},Qh=Lo({devicePixelContentBoxSize:da(),borderBoxSize:da(),contentBoxSize:da(),contentRect:new Im(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),Hi.has(e)&&!t)return Hi.get(e);if(Pm(e))return Hi.set(e,Qh),Qh;var r=getComputedStyle(e),n=mc(e)&&e.ownerSVGElement&&e.getBBox(),o=!ax&&r.boxSizing==="border-box",a=ox.test(r.writingMode||""),u=!n&&Jh.test(r.overflowY||""),l=!n&&Jh.test(r.overflowX||""),f=n?0:Kn(r.paddingTop),d=n?0:Kn(r.paddingRight),p=n?0:Kn(r.paddingBottom),v=n?0:Kn(r.paddingLeft),g=n?0:Kn(r.borderTopWidth),b=n?0:Kn(r.borderRightWidth),x=n?0:Kn(r.borderBottomWidth),D=n?0:Kn(r.borderLeftWidth),m=v+d,S=f+p,F=D+b,B=g+x,O=l?e.offsetHeight-B-e.clientHeight:0,A=u?e.offsetWidth-F-e.clientWidth:0,P=o?m+F:0,T=o?S+B:0,_=n?n.width:Kn(r.width)-P-A,M=n?n.height:Kn(r.height)-T-O,q=_+m+A+F,L=M+S+O+B,Y=Lo({devicePixelContentBoxSize:da(Math.round(_*devicePixelRatio),Math.round(M*devicePixelRatio),a),borderBoxSize:da(q,L,a),contentBoxSize:da(_,M,a),contentRect:new Im(v,f,_,M)});return Hi.set(e,Y),Y},jm=function(e,t,r){var n=zm(e,r),o=n.borderBoxSize,a=n.contentBoxSize,u=n.devicePixelContentBoxSize;switch(t){case li.DEVICE_PIXEL_CONTENT_BOX:return u;case li.BORDER_BOX:return o;default:return a}},ix=(function(){function e(t){var r=zm(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Lo([r.borderBoxSize]),this.contentBoxSize=Lo([r.contentBoxSize]),this.devicePixelContentBoxSize=Lo([r.devicePixelContentBoxSize])}return e})(),_m=function(e){if(Pm(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},sx=function(){var e=1/0,t=[];_o.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(l){var f=new ix(l.target),d=_m(l.target);u.push(f),l.lastReportedSize=jm(l.target,l.observedBox),d<e&&(e=d)}),t.push(function(){a.callback.call(a.observer,u,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},e1=function(e){_o.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(_m(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},lx=function(){var e=0;for(e1(e);Qy();)e=sx(),e1(e);return ex()&&tx(),e>0},pu,Lm=[],ux=function(){return Lm.splice(0).forEach(function(e){return e()})},cx=function(e){if(!pu){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return ux()}).observe(r,n),pu=function(){r.textContent="".concat(t?t--:t++)}}Lm.push(e),pu()},dx=function(e){cx(function(){requestAnimationFrame(e)})},ts=0,fx=function(){return!!ts},hx=250,px={attributes:!0,characterData:!0,childList:!0,subtree:!0},t1=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],r1=function(e){return e===void 0&&(e=0),Date.now()+e},mu=!1,mx=(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=hx),!mu){mu=!0;var n=r1(t);dx(function(){var o=!1;try{o=lx()}finally{if(mu=!1,t=n-r1(),!fx())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,px)};document.body?r():Ga.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),t1.forEach(function(r){return Ga.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),t1.forEach(function(r){return Ga.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),d0=new mx,n1=function(e){!ts&&e>0&&d0.start(),ts+=e,!ts&&d0.stop()},gx=function(e){return!mc(e)&&!nx(e)&&getComputedStyle(e).display==="inline"},vx=(function(){function e(t,r){this.target=t,this.observedBox=r||li.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=jm(this.target,this.observedBox,!0);return gx(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),bx=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ki=new WeakMap,o1=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},qi=(function(){function e(){}return e.connect=function(t,r){var n=new bx(t,r);Ki.set(t,n)},e.observe=function(t,r,n){var o=Ki.get(t),a=o.observationTargets.length===0;o1(o.observationTargets,r)<0&&(a&&_o.push(o),o.observationTargets.push(new vx(r,n&&n.box)),n1(1),d0.schedule())},e.unobserve=function(t,r){var n=Ki.get(t),o=o1(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&_o.splice(_o.indexOf(n),1),n.observationTargets.splice(o,1),n1(-1))},e.disconnect=function(t){var r=this,n=Ki.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),yx=(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.");qi.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(!Zh(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");qi.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(!Zh(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");qi.unobserve(this,t)},e.prototype.disconnect=function(){qi.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Mn={},a1;function xx(){if(a1)return Mn;a1=1,Object.defineProperty(Mn,"__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(g,b,x){b&&!("byKey"in b)&&(x=b,b=null),Array.isArray(g)||(g=[g]);var D=g.map(function(F){return f(F,b)}),m=function(F){return D.some(function(B){return d(B,F)})},S=x==null?m:m(x);return S}function u(g,b){return a(g,b)}function l(g,b){return a(g,{byKey:!0},b)}function f(g,b){var x=b&&b.byKey,D={};g=g.replace("++","+add");var m=g.split("+"),S=m.length;for(var F in t)D[t[F]]=!1;var B=!0,O=!1,A=void 0;try{for(var P=m[Symbol.iterator](),T;!(B=(T=P.next()).done);B=!0){var _=T.value,M=_.endsWith("?")&&_.length>1;M&&(_=_.slice(0,-1));var q=v(_),L=t[q];if(_.length>1&&!L&&!r[_]&&!n[q])throw new TypeError('Unknown modifier: "'+_+'"');(S===1||!L)&&(x?D.key=q:D.which=p(_)),L&&(D[L]=M?null:!0)}}catch(Y){O=!0,A=Y}finally{try{!B&&P.return&&P.return()}finally{if(O)throw A}}return D}function d(g,b){for(var x in g){var D=g[x],m=void 0;if(D!=null&&(x==="key"&&b.key!=null?m=b.key.toLowerCase():x==="which"?m=D===91&&b.which===93?91:b.which:m=b[x],!(m==null&&D===!1)&&m!==D))return!1}return!0}function p(g){g=v(g);var b=n[g]||g.toUpperCase().charCodeAt(0);return b}function v(g){return g=g.toLowerCase(),g=r[g]||g,g}return Mn.default=a,Mn.isHotkey=a,Mn.isCodeHotkey=u,Mn.isKeyHotkey=l,Mn.parseHotkey=f,Mn.compareHotkey=d,Mn.toKeyCode=p,Mn.toKeyName=v,Mn}var gu=xx();function wx(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 ga(e,t){if(e==null)return{};var r=wx(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 ui(e){"@babel/helpers - typeof";return ui=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},ui(e)}function Cx(e,t){if(ui(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dx(e){var t=Cx(e,"string");return ui(t)==="symbol"?t:String(t)}function Bn(e,t,r){return t=Dx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var gc=uo(null),Mo=()=>{var e=$o(gc);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},vu,bu,Hm=parseInt(_e.version.split(".")[0],10),Km=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,i1=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),ln=typeof navigator<"u"&&/Android/.test(navigator.userAgent),sa=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Io=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),Ex=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),qm=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),kx=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Sx=ln&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),Ax=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),Bx=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),Fx=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),rs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(vu=navigator.userAgent.match(/Version\/(\d+)/))!==null&&vu!==void 0&&vu[1]&&parseInt((bu=navigator.userAgent.match(/Version\/(\d+)/))===null||bu===void 0?void 0:bu[1],10)<17;var bo=(!kx||!Sx)&&!Ex&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",fa=new WeakMap,vc=new WeakMap,bc=new WeakMap,Wm=new WeakMap,ns=new WeakMap,f0=new WeakMap,ci=new WeakMap,Ho=new WeakMap,$s=new WeakMap,el=new WeakMap,h0=new WeakMap,ko=new WeakMap,Po=new WeakMap,Za=new WeakMap,p0=new WeakMap,yc=new WeakMap,Tn=new WeakMap,oo=new WeakMap,pn=new WeakMap,Co=new WeakMap,Do=new WeakMap,Vm=new WeakMap,va=Symbol("placeholder"),Um=Symbol("mark-placeholder"),Xm=globalThis.Node,Nx=globalThis.Text,xc=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,$x=e=>Fo(e)&&e.nodeType===8,Sn=e=>Fo(e)&&e.nodeType===1,Fo=e=>{var t=xc(e);return!!t&&e instanceof t.Node},m0=e=>{var t=e&&e.anchorNode&&xc(e.anchorNode);return!!t&&e instanceof t.Selection},Ym=e=>Fo(e)&&e.nodeType===3,Mx=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,Ox=e=>{var[t,r]=e;if(Sn(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=Gm(t,o,n?"backward":"forward"),n=o<r;Sn(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=Rx(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},Tx=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},Gm=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,u=!1,l=!1;($x(o)||Sn(o)&&o.childNodes.length===0||Sn(o)&&o.getAttribute("contenteditable")==="false")&&!(u&&l);){if(a>=n.length){u=!0,a=t-1,r="backward";continue}if(a<0){l=!0,a=t+1,r="forward";continue}o=n[a],t=a,a+=r==="forward"?1:-1}return[o,t]},Rx=(e,t,r)=>{var[n]=Gm(e,t,r);return n},Zm=e=>{var t="";if(Ym(e)&&e.nodeValue)return e.nodeValue;if(Sn(e)){for(var r of Array.from(e.childNodes))t+=Zm(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
103
|
-
`)}return t},Ix=/data-slate-fragment="(.+?)"/m,Px=e=>{var t=e.getData("text/html"),[,r]=t.match(Ix)||[];return r},Ja=e=>e.getSelection!=null?e.getSelection():document.getSelection(),wc=(e,t,r)=>{var{target:n}=t;if(Sn(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=Re.getWindow(e);if(o.contains(n))return Re.hasDOMNode(e,n,{editable:!0});var a=r.find(u=>{var{addedNodes:l,removedNodes:f}=u;for(var d of l)if(d===n||d.contains(n))return!0;for(var p of f)if(p===n||p.contains(n))return!0});return!a||a===t?!1:wc(e,a,r)},zx=()=>{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},s1=(e,t)=>!!(e.compareDocumentPosition(t)&Xm.DOCUMENT_POSITION_PRECEDING),jx=(e,t)=>!!(e.compareDocumentPosition(t)&Xm.DOCUMENT_POSITION_FOLLOWING),_x=0;class Lx{constructor(){Bn(this,"id",void 0),this.id="".concat(_x++)}}var Re={androidPendingDiffs:e=>pn.get(e),androidScheduleFlush:e=>{var t;(t=yc.get(e))===null||t===void 0||t()},blur:e=>{var t=Re.toDOMNode(e,e),r=Re.findDocumentOrShadowRoot(e);ko.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=Re.findDocumentOrShadowRoot(e),n=Ja(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&We.deselect(e)},findDocumentOrShadowRoot:e=>{var t=Re.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=Re.toSlateNode(e,t.target),u=Re.findPath(e,a);if(yt.isElement(a)&&I.isVoid(e,a)){var l=o.getBoundingClientRect(),f=e.isInline(a)?r-l.left<l.left+l.width-r:n-l.top<l.top+l.height-n,d=I.point(e,u,{edge:f?"start":"end"}),p=f?I.before(e,d):I.after(e,d);if(p){var v=I.range(e,p);return v}}var g,{document:b}=Re.getWindow(e);if(b.caretRangeFromPoint)g=b.caretRangeFromPoint(r,n);else{var x=b.caretPositionFromPoint(r,n);x&&(g=b.createRange(),g.setStart(x.offsetNode,x.offset),g.setEnd(x.offsetNode,x.offset))}if(!g)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var D=Re.toSlateRange(e,g,{exactMatch:!1,suppressThrow:!1});return D},findKey:(e,t)=>{var r=$s.get(t);return r||(r=new Lx,$s.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=bc.get(n);if(o==null){if(I.isEditor(n))return r;break}var a=vc.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Yr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!ko.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(()=>{Re.focus(e,{retries:t.retries-1})},10);return}var r=Re.toDOMNode(e,e),n=Re.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Ja(n),a=Re.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||We.select(e,I.start(e,[])),ko.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=Wm.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=Re.toDOMNode(e,e),a;try{a=Sn(t)?t:t.parentElement}catch(u){if(u instanceof Error&&!u.message.includes('Permission denied to access property "nodeType"'))throw u}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)=>Fo(t)&&Re.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return I.hasPath(e,r.path)&&I.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>Re.hasEditableTarget(e,t)||Re.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Fo(t)&&Re.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Po.get(e),isFocused:e=>!!ko.get(e),isReadOnly:e=>!!h0.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(h0.get(e))return!1;var r=Re.hasTarget(e,t)&&Re.toSlateNode(e,t);return yt.isElement(r)&&I.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=el.get(e),n=I.isEditor(t)?ns.get(e):r==null?void 0:r.get(Re.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Yr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=I.node(e,t.path),n=Re.toDOMNode(e,r),o;I.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",u=Array.from(n.querySelectorAll(a)),l=0,f=0;f<u.length;f++){var d=u[f],p=d.childNodes[0];if(!(p==null||p.textContent==null)){var{length:v}=p.textContent,g=d.getAttribute("data-slate-length"),b=g==null?v:parseInt(g,10),x=l+b,D=u[f+1];if(t.offset===x&&D!==null&&D!==void 0&&D.hasAttribute("data-slate-mark-placeholder")){var m,S=D.childNodes[0];o=[S instanceof Nx?S:D,(m=D.textContent)!==null&&m!==void 0&&m.startsWith("\uFEFF")?1:0];break}if(t.offset<=x){var F=Math.min(v,Math.max(0,t.offset-l));o=[p,F];break}l=x}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Yr.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=Fe.isBackward(t),a=Re.toDOMPoint(e,r),u=Fe.isCollapsed(t)?a:Re.toDOMPoint(e,n),l=Re.getWindow(e),f=l.document.createRange(),[d,p]=o?u:a,[v,g]=o?a:u,b=Sn(d)?d:d.parentElement,x=!!b.getAttribute("data-slate-zero-width"),D=Sn(v)?v:v.parentElement,m=!!D.getAttribute("data-slate-zero-width");return f.setStart(d,x?1:p),f.setEnd(v,m?1:g),f},toSlateNode:(e,t)=>{var r=Sn(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?ci.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,[u,l]=n?t:Ox(t),f=u.parentNode,d=null,p=0;if(f){var v,g,b=Re.toDOMNode(e,e),x=f.closest('[data-slate-void="true"]'),D=x&&b.contains(x)?x:null,m=f.closest('[contenteditable="false"]'),S=m&&b.contains(m)?m:null,F=f.closest("[data-slate-leaf]"),B=null;if(F){if(d=F.closest('[data-slate-node="text"]'),d){var O=Re.getWindow(e),A=O.document.createRange();A.setStart(d,0),A.setEnd(u,l);var P=A.cloneContents(),T=[...Array.prototype.slice.call(P.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(P.querySelectorAll("[contenteditable=false]"))];T.forEach(ge=>{if(ln&&!n&&ge.hasAttribute("data-slate-zero-width")&&ge.textContent.length>0&&ge.textContext!=="\uFEFF"){ge.textContent.startsWith("\uFEFF")&&(ge.textContent=ge.textContent.slice(1));return}ge.parentNode.removeChild(ge)}),p=P.textContent.length,B=d}}else if(D){for(var _=D.querySelectorAll("[data-slate-leaf]"),M=0;M<_.length;M++){var q=_[M];if(Re.hasDOMNode(e,q)){F=q;break}}F?(d=F.closest('[data-slate-node="text"]'),B=F,p=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(ge=>{p-=ge.textContent.length})):p=1}else if(S){var L=ge=>ge?ge.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],Y=S.closest('[data-slate-node="element"]');if(a==="forward"){var V,z=[...L(Y),...L(Y==null?void 0:Y.nextElementSibling)];F=(V=z.find(ge=>jx(S,ge)))!==null&&V!==void 0?V:null}else{var K,X=[...L(Y==null?void 0:Y.previousElementSibling),...L(Y)];F=(K=X.findLast(ge=>s1(S,ge)))!==null&&K!==void 0?K:null}F&&(d=F.closest('[data-slate-node="text"]'),B=F,a==="forward"?p=0:(p=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(ge=>{p-=ge.textContent.length})))}B&&p===B.textContent.length&&ln&&B.getAttribute("data-slate-zero-width")==="z"&&(v=B.textContent)!==null&&v!==void 0&&v.startsWith("\uFEFF")&&(f.hasAttribute("data-slate-zero-width")||sa&&(g=B.textContent)!==null&&g!==void 0&&g.endsWith(`
|
|
104
|
-
|
|
105
|
-
`))&&p--}if(ln&&!d&&!n){var W=f.hasAttribute("data-slate-node")?f:f.closest("[data-slate-node]");if(W&&Re.hasDOMNode(e,W,{editable:!0})){var J=Re.toSlateNode(e,W),{path:R,offset:ie}=I.start(e,Re.findPath(e,J));return W.querySelector("[data-slate-leaf]")||(ie=l),{path:R,offset:ie}}}if(!d){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var me=Re.toSlateNode(e,d),xe=Re.findPath(e,me);return{path:xe,offset:p}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,u=m0(t)?t.anchorNode:t.startContainer,l,f,d,p,v;if(u)if(m0(t)){if(sa&&t.rangeCount>1){d=t.focusNode;var g=t.getRangeAt(0),b=t.getRangeAt(t.rangeCount-1);if(d instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement&&b.startContainer instanceof HTMLTableRowElement){let P=function(T){return T.childElementCount>0?P(T.children[0]):T};var x=g.startContainer,D=b.startContainer,m=P(x.children[g.startOffset]),S=P(D.children[b.startOffset]);p=0,S.childNodes.length>0?l=S.childNodes[0]:l=S,m.childNodes.length>0?d=m.childNodes[0]:d=m,S instanceof HTMLElement?f=S.innerHTML.length:f=0}else g.startContainer===d?(l=b.endContainer,f=b.endOffset,p=g.startOffset):(l=g.startContainer,f=g.endOffset,p=b.startOffset)}else l=t.anchorNode,f=t.anchorOffset,d=t.focusNode,p=t.focusOffset;qm&&Tx(l)||sa?v=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:v=t.isCollapsed}else l=t.startContainer,f=t.startOffset,d=t.endContainer,p=t.endOffset,v=t.collapsed;if(l==null||d==null||f==null||p==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));sa&&(n=d.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
106
|
-
|
|
107
|
-
`)&&p===d.textContent.length&&p--;var F=Re.toSlatePoint(e,[l,f],{exactMatch:o,suppressThrow:a});if(!F)return null;var B=s1(l,d)||l===d&&p<f,O=v?F:Re.toSlatePoint(e,[d,p],{exactMatch:o,suppressThrow:a,searchDirection:B?"forward":"backward"});if(!O)return null;var A={anchor:F,focus:O};return Fe.isExpanded(A)&&Fe.isForward(A)&&Sn(d)&&I.void(e,{at:A.focus,mode:"highest"})&&(A=I.unhangRange(e,A,{voids:!0})),A}};function Hx(e,t){var{path:r,diff:n}=t;if(!I.hasPath(e,r))return!1;var o=Qe.get(e,r);if(!mt.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=ne.next(r);if(!I.hasPath(e,a))return!1;var u=Qe.get(e,a);return mt.isText(u)&&u.text.startsWith(n.text)}function Jm(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 Kx(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 qx(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 Qm(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),u=Kx(a,o),l=Math.min(a.length-u,o.length-u),f=qx(a,o,l),d={start:r+u,end:n-f,text:o.slice(u,o.length-f)};return d.start===d.end&&d.text.length===0?null:d}function Wx(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=Jm(e,t,r),u=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),l=a.slice(n,u),f=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return Qm(e,{start:n,end:f,text:l})}function Vx(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function g0(e,t){var{path:r,offset:n}=t;if(!I.hasPath(e,r))return null;var o=Qe.get(e,r);if(!mt.isText(o))return null;var a=I.above(e,{match:l=>yt.isElement(l)&&I.isBlock(e,l),at:r});if(!a)return null;for(;n>o.text.length;){var u=I.next(e,{at:r,match:mt.isText});if(!u||!ne.isDescendant(u[1],a[1]))return null;n-=o.text.length,o=u[0],r=u[1]}return{path:r,offset:n}}function l1(e,t){var r=g0(e,t.anchor);if(!r)return null;if(Fe.isCollapsed(t))return{anchor:r,focus:r};var n=g0(e,t.focus);return n?{anchor:r,focus:n}:null}function v0(e,t,r){var n=pn.get(e),o=n==null?void 0:n.find(p=>{var{path:v}=p;return ne.equals(v,t.path)});if(!o||t.offset<=o.diff.start)return Xt.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var u={path:t.path,offset:a.start},l=Xt.transform(u,r,{affinity:"backward"});return l?{path:l.path,offset:l.offset+t.offset-a.start}:null}var f={path:t.path,offset:t.offset-a.text.length+a.end-a.start},d=Xt.transform(f,r,{affinity:"backward"});return d?r.type==="split_node"&&ne.equals(r.path,t.path)&&f.offset<r.position&&a.start<r.position?d:{path:d.path,offset:d.offset+a.text.length-a.end+a.start}:null}function u1(e,t,r){var n=v0(e,t.anchor,r);if(!n)return null;if(Fe.isCollapsed(t))return{anchor:n,focus:n};var o=v0(e,t.focus,r);return o?{anchor:n,focus:o}:null}function Ux(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!ne.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!ne.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!ne.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:ne.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:ne.transform(r,t,{affinity:"forward"})};case"merge_node":return ne.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:ne.transform(r,t)}:{diff:n,id:o,path:ne.transform(r,t)}}var a=ne.transform(r,t);return a?{diff:n,path:a,id:o}:null}function c1(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 Wi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c1(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Xx=25,Yx=200,Gx=function(){},Zx=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function Jx(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,u=null,l=null,f=0,d=!1,p=()=>{var Y=Do.get(t);if(Do.delete(t),Y){var{selection:V}=t,z=l1(t,Y);z&&(!V||!Fe.equals(z,V))&&We.select(t,z)}},v=()=>{var Y=Co.get(t);if(Co.delete(t),!!Y){if(Y.at){var V=Xt.isPoint(Y.at)?g0(t,Y.at):l1(t,Y.at);if(!V)return;var z=I.range(t,V);(!t.selection||!Fe.equals(t.selection,z))&&We.select(t,V)}Y.run()}},g=()=>{if(u&&(clearTimeout(u),u=null),l&&(clearTimeout(l),l=null),!O()&&!B()){p();return}o||(o=!0,setTimeout(()=>o=!1)),B()&&(o="action");var Y=t.selection&&I.rangeRef(t,t.selection,{affinity:"forward"});oo.set(t,t.marks),Gx("flush",Co.get(t),pn.get(t));for(var V=O(),z;z=(K=pn.get(t))===null||K===void 0?void 0:K[0];){var K,X,W=Tn.get(t);W!==void 0&&(Tn.delete(t),t.marks=W),W&&d===!1&&(d=null);var J=Vx(z);(!t.selection||!Fe.equals(t.selection,J))&&We.select(t,J),z.diff.text?I.insertText(t,z.diff.text):I.deleteFragment(t),pn.set(t,(X=pn.get(t))===null||X===void 0?void 0:X.filter(me=>{var{id:xe}=me;return xe!==z.id})),Hx(t,z)||(V=!1,Co.delete(t),oo.delete(t),o="action",Do.delete(t),r.cancel(),n.cancel(),Y==null||Y.unref())}var R=Y==null?void 0:Y.unref();if(R&&!Do.get(t)&&(!t.selection||!Fe.equals(R,t.selection))&&We.select(t,R),B()){v();return}V&&r(),r.flush(),n.flush(),p();var ie=oo.get(t);oo.delete(t),ie!==void 0&&(t.marks=ie,t.onChange())},b=Y=>{a&&clearTimeout(a),a=setTimeout(()=>{Po.set(t,!1),g()},Xx)},x=Y=>{Po.set(t,!0),a&&(clearTimeout(a),a=null)},D=function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,V=f0.get(t);if(V){if(O()||Y){V.style.display="none";return}V.style.removeProperty("display")}},m=(Y,V)=>{var z,K=(z=pn.get(t))!==null&&z!==void 0?z:[];pn.set(t,K);var X=Qe.leaf(t,Y),W=K.findIndex(ie=>ne.equals(ie.path,Y));if(W<0){var J=Qm(X.text,V);J&&K.push({path:Y,diff:V,id:f++}),D();return}var R=Wx(X.text,K[W].diff,V);if(!R){K.splice(W,1),D();return}K[W]=Wi(Wi({},K[W]),{},{diff:R})},S=function(Y){var{at:V}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};d=!1,Do.delete(t),r.cancel(),n.cancel(),B()&&g(),Co.set(t,{at:V,run:Y}),l=setTimeout(g)},F=Y=>{var V;if(u&&(clearTimeout(u),u=null),!fa.get(t)){var{inputType:z}=Y,K=null,X=Y.dataTransfer||Y.data||void 0;d!==!1&&z!=="insertText"&&z!=="insertCompositionText"&&(d=!1);var[W]=Y.getTargetRanges();W&&(K=Re.toSlateRange(t,W,{exactMatch:!1,suppressThrow:!0}));var J=Re.getWindow(t),R=J.getSelection();if(!K&&R&&(W=R,K=Re.toSlateRange(t,R,{exactMatch:!1,suppressThrow:!0})),K=(V=K)!==null&&V!==void 0?V:t.selection,!!K){var ie=!0;if(z.startsWith("delete")){if(Fe.isExpanded(K)){var[me,xe]=Fe.edges(K),ge=Qe.leaf(t,me.path);if(ge.text.length===me.offset&&xe.offset===0){var ae=I.next(t,{at:me.path,match:mt.isText});ae&&ne.equals(ae[1],xe.path)&&(K={anchor:xe,focus:xe})}}var ke=z.endsWith("Backward")?"backward":"forward",[Z,he]=Fe.edges(K),[se,te]=I.leaf(t,Z.path),ce={text:"",start:Z.offset,end:he.offset},Ce=pn.get(t),we=Ce==null?void 0:Ce.find(Dt=>ne.equals(Dt.path,te)),Se=we?[we.diff,ce]:[ce],Ee=Jm(se.text,...Se);if(Ee.length===0&&(ie=!1),Fe.isExpanded(K)){if(ie&&ne.equals(K.anchor.path,K.focus.path)){var Ae={path:K.anchor.path,offset:Z.offset},$e=I.range(t,Ae,Ae);return T($e),m(K.anchor.path,{text:"",end:he.offset,start:Z.offset})}return S(()=>I.deleteFragment(t,{direction:ke}),{at:K})}}switch(z){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return S(()=>I.deleteFragment(t),{at:K});case"deleteContent":case"deleteContentForward":{var{anchor:Te}=K;if(ie&&Fe.isCollapsed(K)){var He=Qe.leaf(t,Te.path);if(Te.offset<He.text.length)return m(Te.path,{text:"",start:Te.offset,end:Te.offset+1})}return S(()=>I.deleteForward(t),{at:K})}case"deleteContentBackward":{var pt,{anchor:at}=K,Me=m0(W)?W.isCollapsed:!!((pt=W)!==null&&pt!==void 0&&pt.collapsed);return ie&&Me&&Fe.isCollapsed(K)&&at.offset>0?m(at.path,{text:"",start:at.offset-1,end:at.offset}):S(()=>I.deleteBackward(t),{at:K})}case"deleteEntireSoftLine":return S(()=>{I.deleteBackward(t,{unit:"line"}),I.deleteForward(t,{unit:"line"})},{at:K});case"deleteHardLineBackward":return S(()=>I.deleteBackward(t,{unit:"block"}),{at:K});case"deleteSoftLineBackward":return S(()=>I.deleteBackward(t,{unit:"line"}),{at:K});case"deleteHardLineForward":return S(()=>I.deleteForward(t,{unit:"block"}),{at:K});case"deleteSoftLineForward":return S(()=>I.deleteForward(t,{unit:"line"}),{at:K});case"deleteWordBackward":return S(()=>I.deleteBackward(t,{unit:"word"}),{at:K});case"deleteWordForward":return S(()=>I.deleteForward(t,{unit:"word"}),{at:K});case"insertLineBreak":return S(()=>I.insertSoftBreak(t),{at:K});case"insertParagraph":return S(()=>I.insertBreak(t),{at:K});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(Zx(X))return S(()=>Re.insertData(t,X),{at:K});var Le=X??"";if(Tn.get(t)&&(Le=Le.replace("\uFEFF","")),z==="insertText"&&/.*\n.*\n$/.test(Le)&&(Le=Le.slice(0,-1)),Le.includes(`
|
|
108
|
-
`))return S(()=>{var Dt=Le.split(`
|
|
109
|
-
`);Dt.forEach((vt,ht)=>{vt&&I.insertText(t,vt),ht!==Dt.length-1&&I.insertSoftBreak(t)})},{at:K});if(ne.equals(K.anchor.path,K.focus.path)){var[Xe,ft]=Fe.edges(K),it={start:Xe.offset,end:ft.offset,text:Le};if(Le&&d&&z==="insertCompositionText"){var et=d.start+d.text.search(/\S|$/),$t=it.start+it.text.search(/\S|$/);$t===et+1&&it.end===d.start+d.text.length?(it.start-=1,d=null,q()):d=!1}else z==="insertText"?d===null?d=it:d&&Fe.isCollapsed(K)&&d.end+d.text.length===Xe.offset?d=Wi(Wi({},d),{},{text:d.text+Le}):d=!1:d=!1;if(ie){m(Xe.path,it);return}}return S(()=>I.insertText(t,Le),{at:K})}}}}},B=()=>!!Co.get(t),O=()=>{var Y;return!!((Y=pn.get(t))!==null&&Y!==void 0&&Y.length)},A=()=>B()||O(),P=()=>o,T=Y=>{Do.set(t,Y),u&&(clearTimeout(u),u=null);var{selection:V}=t;if(Y){var z=!V||!ne.equals(V.anchor.path,Y.anchor.path),K=!V||!ne.equals(V.anchor.path.slice(0,-1),Y.anchor.path.slice(0,-1));(z&&d||K)&&(d=!1),(z||O())&&(u=setTimeout(g,Yx))}},_=()=>{(B()||!O())&&g()},M=Y=>{O()||(D(!0),setTimeout(D))},q=()=>{B()||(l=setTimeout(g))},L=Y=>{if(!(O()||B())&&Y.some(z=>wc(t,z,Y))){var V;(V=Vm.get(t))===null||V===void 0||V()}};return{flush:g,scheduleFlush:q,hasPendingDiffs:O,hasPendingAction:B,hasPendingChanges:A,isFlushing:P,handleUserSelect:T,handleCompositionEnd:b,handleCompositionStart:x,handleDOMBeforeInput:F,handleKeyDown:M,handleDomMutations:L,handleInput:_}}function Qx(){var e=Lt(!1);return er(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var di=rs?X4:er;function ew(e,t,r){var[n]=Ot(()=>new MutationObserver(t));di(()=>{n.takeRecords()}),er(()=>{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 tw=["node"];function d1(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 rw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d1(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nw={subtree:!0,childList:!0,characterData:!0},ow=ln?e=>{var{node:t}=e,r=ga(e,tw);if(!ln)return null;var n=Mo(),o=Qx(),[a]=Ot(()=>Jx(rw({editor:n},r)));return ew(t,a.handleDomMutations,nw),yc.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,aw=["anchor","focus"],iw=["anchor","focus"],sw=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),eg=(e,t)=>{var r=ga(e,aw),n=ga(t,iw);return e[va]===t[va]&&sw(r,n)},lw=(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(!Fe.equals(n,o)||!eg(n,o))return!1}return!0},uw=(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||!eg(n,o))return!1}return!0};function f1(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 cw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f1(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var dw=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=Mo(),u=Re.findPath(a,o),l=ne.parent(u),f=!!r[Um];return a.isVoid(n)?_e.createElement(yu,{length:Qe.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&I.string(a,l)===""?_e.createElement(yu,{isLineBreak:!0,isMarkPlaceholder:f}):r.text===""?_e.createElement(yu,{isMarkPlaceholder:f}):t&&r.text.slice(-1)===`
|
|
110
|
-
`?_e.createElement(h1,{isTrailing:!0,text:r.text}):_e.createElement(h1,{text:r.text})},h1=e=>{var{text:t,isTrailing:r=!1}=e,n=Lt(null),o=()=>"".concat(t??"").concat(r?`
|
|
111
|
-
`:""),[a]=Ot(o);return di(()=>{var u=o();n.current&&n.current.textContent!==u&&(n.current.textContent=u)}),_e.createElement(fw,{ref:n},a)},fw=Z4(No((e,t)=>_e.createElement("span",{"data-slate-string":!0,ref:t},e.children))),yu=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),_e.createElement("span",cw({},o),!(ln||Km)||!r?"\uFEFF":null,r?_e.createElement("br",null):null)};function p1(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 tg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?p1(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var hw=ln?300:0;function pw(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function m1(e){e.current&&(clearTimeout(e.current),e.current=null)}var mw=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:u=F=>_e.createElement(vw,tg({},F))}=e,l=Mo(),f=Lt(null),d=Lt(null),[p,v]=Ot(!1),g=Lt(null),b=St(F=>{if(pw(f,F==null),F==null){var B;f0.delete(l),(B=t.onPlaceholderResize)===null||B===void 0||B.call(t,null)}else{if(f0.set(l,F),!f.current){var O=window.ResizeObserver||yx;f.current=new O(()=>{var A;(A=t.onPlaceholderResize)===null||A===void 0||A.call(t,F)})}f.current.observe(F),d.current=F}},[d,t,l]),x=_e.createElement(dw,{isLast:r,leaf:t,parent:o,text:n}),D=!!t[va];if(er(()=>(D?g.current||(g.current=setTimeout(()=>{v(!0),g.current=null},hw)):(m1(g),v(!1)),()=>m1(g)),[D,v]),D&&p){var m={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:Io?"inherit":void 0},contentEditable:!1,ref:b}};x=_e.createElement(_e.Fragment,null,a(m),x)}var S={"data-slate-leaf":!0};return u({attributes:S,children:x,leaf:t,text:n})},gw=_e.memo(mw,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&mt.equals(t.leaf,e.leaf)&&t.leaf[va]===e.leaf[va]),vw=e=>{var{attributes:t,children:r}=e;return _e.createElement("span",tg({},t),r)},bw=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:u}=e,l=Mo(),f=Lt(null),d=mt.decorations(u,t),p=Re.findKey(l,u),v=[],g=0;g<d.length;g++){var b=d[g];v.push(_e.createElement(gw,{isLast:r&&g===d.length-1,key:"".concat(p.id,"-").concat(g),renderPlaceholder:o,leaf:b,text:u,parent:n,renderLeaf:a}))}var x=St(D=>{var m=el.get(l);D?(m==null||m.set(p,D),Ho.set(u,D),ci.set(D,u)):(m==null||m.delete(p),Ho.delete(u),f.current&&ci.delete(f.current)),f.current=D},[f,l,p,u]);return _e.createElement("span",{"data-slate-node":"text",ref:x},v)},rg=_e.memo(bw,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&uw(t.decorations,e.decorations));function g1(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 b0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var yw=e=>{var{decorations:t,element:r,renderElement:n=F=>_e.createElement(ww,b0({},F)),renderPlaceholder:o,renderLeaf:a,selection:u}=e,l=Mo(),f=Ew(),d=l.isInline(r),p=Re.findKey(l,r),v=St(F=>{var B=el.get(l);F?(B==null||B.set(p,F),Ho.set(r,F),ci.set(F,r)):(B==null||B.delete(p),Ho.delete(r))},[l,p,r]),g=og({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:u}),b={"data-slate-node":"element",ref:v};if(d&&(b["data-slate-inline"]=!0),!d&&I.hasInlines(l,r)){var x=Qe.string(r),D=Mm(x);D==="rtl"&&(b.dir=D)}if(I.isVoid(l,r)){b["data-slate-void"]=!0,!f&&d&&(b.contentEditable=!1);var m=d?"span":"div",[[S]]=Qe.texts(r);g=_e.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},_e.createElement(rg,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:S})),vc.set(S,0),bc.set(S,r)}return n({attributes:b,children:g,element:r})},xw=_e.memo(yw,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&lw(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Fe.equals(e.selection,t.selection))),ww=e=>{var{attributes:t,children:r,element:n}=e,o=Mo(),a=o.isInline(n)?"span":"div";return _e.createElement(a,b0(b0({},t),{},{style:{position:"relative"}}),r)},ng=uo(()=>[]),Cw=()=>$o(ng),Dw=uo(!1),og=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:u}=e,l=Cw(),f=Mo();fa.set(f,!1);for(var d=Re.findPath(f,r),p=[],v=yt.isElement(r)&&!f.isInline(r)&&I.hasInlines(f,r),g=0;g<r.children.length;g++){var b=d.concat(g),x=r.children[g],D=Re.findKey(f,x),m=I.range(f,b),S=u&&Fe.intersection(m,u),F=l([x,b]);for(var B of t){var O=Fe.intersection(B,m);O&&F.push(O)}yt.isElement(x)?p.push(_e.createElement(Dw.Provider,{key:"provider-".concat(D.id),value:!!S},_e.createElement(xw,{decorations:F,element:x,key:D.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:S}))):p.push(_e.createElement(rg,{decorations:F,key:D.id,isLast:v&&g===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:x})),vc.set(x,g),bc.set(x,r)}return p},ag=uo(!1),Ew=()=>$o(ag),ig=uo(null),sg=()=>{var e=$o(ig);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function kw(){var e=Mo(),t=Lt(!1),r=Lt(0),n=St(()=>{if(!t.current){t.current=!0;var o=Re.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return er(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var Sw=3,Aw={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"},Bw={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"},Fw={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Nr=e=>{var t=Aw[e],r=Bw[e],n=Fw[e],o=t&&gu.isHotkey(t),a=r&&gu.isHotkey(r),u=n&&gu.isHotkey(n);return l=>!!(o&&o(l)||i1&&a&&a(l)||!i1&&u&&u(l))},Or={isBold:Nr("bold"),isCompose:Nr("compose"),isMoveBackward:Nr("moveBackward"),isMoveForward:Nr("moveForward"),isDeleteBackward:Nr("deleteBackward"),isDeleteForward:Nr("deleteForward"),isDeleteLineBackward:Nr("deleteLineBackward"),isDeleteLineForward:Nr("deleteLineForward"),isDeleteWordBackward:Nr("deleteWordBackward"),isDeleteWordForward:Nr("deleteWordForward"),isExtendBackward:Nr("extendBackward"),isExtendForward:Nr("extendForward"),isExtendLineBackward:Nr("extendLineBackward"),isExtendLineForward:Nr("extendLineForward"),isItalic:Nr("italic"),isMoveLineBackward:Nr("moveLineBackward"),isMoveLineForward:Nr("moveLineForward"),isMoveWordBackward:Nr("moveWordBackward"),isMoveWordForward:Nr("moveWordForward"),isRedo:Nr("redo"),isSoftBreak:Nr("insertSoftBreak"),isSplitBlock:Nr("splitBlock"),isTransposeCharacter:Nr("transposeCharacter"),isUndo:Nr("undo")},Nw=(e,t)=>{var r=[],n=()=>{r=[]},o=u=>{if(t.current){var l=u.filter(f=>wc(e,f,u));r.push(...l)}};function a(){r.length>0&&(r.reverse().forEach(u=>{u.type!=="characterData"&&(u.removedNodes.forEach(l=>{u.target.insertBefore(l,u.nextSibling)}),u.addedNodes.forEach(l=>{u.target.removeChild(l)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},$w={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class lg extends G4{constructor(){super(...arguments),Bn(this,"context",null),Bn(this,"manager",null),Bn(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,$w)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=Nw(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}}Bn(lg,"contextType",gc);var Mw=ln?lg:e=>{var{children:t}=e;return _e.createElement(_e.Fragment,null,t)},Ow=uo(!1),Tw=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Rw=["text"];function v1(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 Wn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Iw=e=>_e.createElement(_e.Fragment,null,og(e)),xu=No((e,t)=>{var r=St(Z=>_e.createElement(Pw,Wn({},Z)),[]),{autoFocus:n,decorate:o=zw,onDOMBeforeInput:a,placeholder:u,readOnly:l=!1,renderElement:f,renderLeaf:d,renderPlaceholder:p=r,scrollSelectionIntoView:v=jw,style:g={},as:b="div",disableDefaultStyles:x=!1}=e,D=ga(e,Tw),m=sg(),[S,F]=Ot(!1),B=Lt(null),O=Lt([]),[A,P]=Ot(),T=Lt(!1),{onUserInput:_,receivedUserInput:M}=kw(),[,q]=Y4(Z=>Z+1,0);Vm.set(m,q),h0.set(m,l);var L=Ct(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);er(()=>{B.current&&n&&B.current.focus()},[n]);var Y=Lt(),V=Ct(()=>Yy(()=>{if(fa.get(m)){V();return}var Z=Re.toDOMNode(m,m),he=Z.getRootNode();if(!T.current&&Io&&he instanceof ShadowRoot){T.current=!0;var se=zx();se?document.execCommand("indent"):We.deselect(m),T.current=!1;return}var te=Y.current;if((ln||!Re.isComposing(m))&&(!L.isUpdatingSelection||te!=null&&te.isFlushing())&&!L.isDraggingInternally){var ce=Re.findDocumentOrShadowRoot(m),{activeElement:Ce}=ce,we=Re.toDOMNode(m,m),Se=Ja(ce);if(Ce===we?(L.latestElement=Ce,ko.set(m,!0)):ko.delete(m),!Se)return We.deselect(m);var{anchorNode:Ee,focusNode:Ae}=Se,$e=Re.hasEditableTarget(m,Ee)||Re.isTargetInsideNonReadonlyVoid(m,Ee),Te=Re.hasTarget(m,Ae);if($e&&Te){var He=Re.toSlateRange(m,Se,{exactMatch:!1,suppressThrow:!0});He&&(!Re.isComposing(m)&&!(te!=null&&te.hasPendingChanges())&&!(te!=null&&te.isFlushing())?We.select(m,He):te==null||te.handleUserSelect(He))}l&&(!$e||!Te)&&We.deselect(m)}},100),[m,l,L]),z=Ct(()=>Vy(V,0),[V]);Y.current=ow({node:B,onDOMSelectionChange:V,scheduleOnDOMSelectionChange:z}),di(()=>{var Z,he,se;B.current&&(se=xc(B.current))?(Wm.set(m,se),ns.set(m,B.current),Ho.set(m,B.current),ci.set(B.current,m)):Ho.delete(m);var{selection:te}=m,ce=Re.findDocumentOrShadowRoot(m),Ce=Ja(ce);if(!(!Ce||!Re.isFocused(m)||(Z=Y.current)!==null&&Z!==void 0&&Z.hasPendingAction())){var we=$e=>{var Te=Ce.type!=="None";if(!(!te&&!Te)){var He=Ce.focusNode,pt;if(sa&&Ce.rangeCount>1){var at=Ce.getRangeAt(0),Me=Ce.getRangeAt(Ce.rangeCount-1);at.startContainer===He?pt=Me.endContainer:pt=at.startContainer}else pt=Ce.anchorNode;var Le=ns.get(m),Xe=!1;if(Le.contains(pt)&&Le.contains(He)&&(Xe=!0),Te&&Xe&&te&&!$e){var ft=Re.toSlateRange(m,Ce,{exactMatch:!0,suppressThrow:!0});if(ft&&Fe.equals(ft,te)){var it;if(!L.hasMarkPlaceholder||(it=pt)!==null&&it!==void 0&&(it=it.parentElement)!==null&&it!==void 0&&it.hasAttribute("data-slate-mark-placeholder"))return}}if(te&&!Re.hasRange(m,te)){m.selection=Re.toSlateRange(m,Ce,{exactMatch:!1,suppressThrow:!0});return}L.isUpdatingSelection=!0;var et=te&&Re.toDOMRange(m,te);return et?(Re.isComposing(m)&&!ln?Ce.collapseToEnd():Fe.isBackward(te)?Ce.setBaseAndExtent(et.endContainer,et.endOffset,et.startContainer,et.startOffset):Ce.setBaseAndExtent(et.startContainer,et.startOffset,et.endContainer,et.endOffset),v(m,et)):Ce.removeAllRanges(),et}};Ce.rangeCount<=1&&we();var Se=((he=Y.current)===null||he===void 0?void 0:he.isFlushing())==="action";if(!ln||!Se){setTimeout(()=>{L.isUpdatingSelection=!1});return}var Ee=null,Ae=requestAnimationFrame(()=>{if(Se){var $e=Te=>{try{var He=Re.toDOMNode(m,m);He.focus(),we(Te)}catch{}};$e(),Ee=setTimeout(()=>{$e(!0),L.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Ae),Ee&&clearTimeout(Ee)}}});var K=St(Z=>{var he=Re.toDOMNode(m,m),se=he.getRootNode();if(T!=null&&T.current&&Io&&se instanceof ShadowRoot){var te=Z.getTargetRanges(),ce=te[0],Ce=new window.Range;Ce.setStart(ce.startContainer,ce.startOffset),Ce.setEnd(ce.endContainer,ce.endOffset);var we=Re.toSlateRange(m,Ce,{exactMatch:!1,suppressThrow:!1});We.select(m,we),Z.preventDefault(),Z.stopImmediatePropagation();return}if(_(),!l&&Re.hasEditableTarget(m,Z.target)&&!_w(Z,a)){var Se;if(Y.current)return Y.current.handleDOMBeforeInput(Z);z.flush(),V.flush();var{selection:Ee}=m,{inputType:Ae}=Z,$e=Z.dataTransfer||Z.data||void 0,Te=Ae==="insertCompositionText"||Ae==="deleteCompositionText";if(Te&&Re.isComposing(m))return;var He=!1;if(Ae==="insertText"&&Ee&&Fe.isCollapsed(Ee)&&Z.data&&Z.data.length===1&&/[a-z ]/i.test(Z.data)&&Ee.anchor.offset!==0&&(He=!0,m.marks&&(He=!1),!fa.get(m))){var pt,at,{anchor:Me}=Ee,[Le,Xe]=Re.toDOMPoint(m,Me),ft=(pt=Le.parentElement)===null||pt===void 0?void 0:pt.closest("a"),it=Re.getWindow(m);if(He&&ft&&Re.hasDOMNode(m,ft)){var et,$t=it==null?void 0:it.document.createTreeWalker(ft,NodeFilter.SHOW_TEXT).lastChild();$t===Le&&((et=$t.textContent)===null||et===void 0?void 0:et.length)===Xe&&(He=!1)}if(He&&Le.parentElement&&(it==null||(at=it.getComputedStyle(Le.parentElement))===null||at===void 0?void 0:at.whiteSpace)==="pre"){var Dt=I.above(m,{at:Me.path,match:kt=>yt.isElement(kt)&&I.isBlock(m,kt)});Dt&&Qe.string(Dt[0]).includes(" ")&&(He=!1)}}if((!Ae.startsWith("delete")||Ae.startsWith("deleteBy"))&&!fa.get(m)){var[vt]=Z.getTargetRanges();if(vt){var ht=Re.toSlateRange(m,vt,{exactMatch:!1,suppressThrow:!1});if(!Ee||!Fe.equals(Ee,ht)){He=!1;var Pe=!Te&&m.selection&&I.rangeRef(m,m.selection);We.select(m,ht),Pe&&Za.set(m,Pe)}}}if(Te)return;if(He||Z.preventDefault(),Ee&&Fe.isExpanded(Ee)&&Ae.startsWith("delete")){var de=Ae.endsWith("Backward")?"backward":"forward";I.deleteFragment(m,{direction:de});return}switch(Ae){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{I.deleteFragment(m);break}case"deleteContent":case"deleteContentForward":{I.deleteForward(m);break}case"deleteContentBackward":{I.deleteBackward(m);break}case"deleteEntireSoftLine":{I.deleteBackward(m,{unit:"line"}),I.deleteForward(m,{unit:"line"});break}case"deleteHardLineBackward":{I.deleteBackward(m,{unit:"block"});break}case"deleteSoftLineBackward":{I.deleteBackward(m,{unit:"line"});break}case"deleteHardLineForward":{I.deleteForward(m,{unit:"block"});break}case"deleteSoftLineForward":{I.deleteForward(m,{unit:"line"});break}case"deleteWordBackward":{I.deleteBackward(m,{unit:"word"});break}case"deleteWordForward":{I.deleteForward(m,{unit:"word"});break}case"insertLineBreak":I.insertSoftBreak(m);break;case"insertParagraph":{I.insertBreak(m);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Ae==="insertFromComposition"&&Re.isComposing(m)&&(F(!1),Po.set(m,!1)),($e==null?void 0:$e.constructor.name)==="DataTransfer"?Re.insertData(m,$e):typeof $e=="string"&&(He?O.current.push(()=>I.insertText(m,$e)):I.insertText(m,$e));break}}var bt=(Se=Za.get(m))===null||Se===void 0?void 0:Se.unref();Za.delete(m),bt&&(!m.selection||!Fe.equals(m.selection,bt))&&We.select(m,bt)}},[m,V,_,a,l,z]),X=St(Z=>{Z==null?(V.cancel(),z.cancel(),ns.delete(m),Ho.delete(m),B.current&&bo&&B.current.removeEventListener("beforeinput",K)):bo&&Z.addEventListener("beforeinput",K),B.current=Z,typeof t=="function"?t(Z):t&&(t.current=Z)},[V,z,m,K,t]);di(()=>{var Z=Re.getWindow(m);Z.document.addEventListener("selectionchange",z);var he=()=>{L.isDraggingInternally=!1};return Z.document.addEventListener("dragend",he),Z.document.addEventListener("drop",he),()=>{Z.document.removeEventListener("selectionchange",z),Z.document.removeEventListener("dragend",he),Z.document.removeEventListener("drop",he)}},[z,L]);var W=o([m,[]]),J=u&&m.children.length===1&&Array.from(Qe.texts(m)).length===1&&Qe.string(m)===""&&!S,R=St(Z=>{if(Z&&J){var he;P((he=Z.getBoundingClientRect())===null||he===void 0?void 0:he.height)}else P(void 0)},[J]);if(J){var ie=I.start(m,[]);W.push({[va]:!0,placeholder:u,onPlaceholderResize:R,anchor:ie,focus:ie})}var{marks:me}=m;if(L.hasMarkPlaceholder=!1,m.selection&&Fe.isCollapsed(m.selection)&&me){var{anchor:xe}=m.selection,ge=Qe.leaf(m,xe.path),ae=ga(ge,Rw);if(!mt.equals(ge,me,{loose:!0})){L.hasMarkPlaceholder=!0;var ke=Object.fromEntries(Object.keys(ae).map(Z=>[Z,null]));W.push(Wn(Wn(Wn({[Um]:!0},ke),me),{},{anchor:xe,focus:xe}))}}return er(()=>{setTimeout(()=>{var{selection:Z}=m;if(Z){var{anchor:he}=Z,se=Qe.leaf(m,he.path);if(me&&!mt.equals(se,me,{loose:!0})){Tn.set(m,me);return}}Tn.delete(m)})}),_e.createElement(ag.Provider,{value:l},_e.createElement(Ow.Provider,{value:S},_e.createElement(ng.Provider,{value:o},_e.createElement(Mw,{node:B,receivedUserInput:M},_e.createElement(b,Wn(Wn({role:l?void 0:"textbox","aria-multiline":l?void 0:!0},D),{},{spellCheck:bo||!rs?D.spellCheck:!1,autoCorrect:bo||!rs?D.autoCorrect:"false",autoCapitalize:bo||!rs?D.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!l,zindex:-1,suppressContentEditableWarning:!0,ref:X,style:Wn(Wn({},x?{}:Wn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},A?{minHeight:A}:{})),g),onBeforeInput:St(Z=>{if(!bo&&!l&&!sn(Z,D.onBeforeInput)&&Re.hasSelectableTarget(m,Z.target)&&(Z.preventDefault(),!Re.isComposing(m))){var he=Z.data;I.insertText(m,he)}},[D.onBeforeInput,m,l]),onInput:St(Z=>{if(!sn(Z,D.onInput)){if(Y.current){Y.current.handleInput();return}for(var he of O.current)he();if(O.current=[],!Re.isFocused(m)){var se=Z.nativeEvent,te=m;if(se.inputType==="historyUndo"&&typeof te.undo=="function"){te.undo();return}if(se.inputType==="historyRedo"&&typeof te.redo=="function"){te.redo();return}}}},[D.onInput,m]),onBlur:St(Z=>{if(!(l||L.isUpdatingSelection||!Re.hasSelectableTarget(m,Z.target)||sn(Z,D.onBlur))){var he=Re.findDocumentOrShadowRoot(m);if(L.latestElement!==he.activeElement){var{relatedTarget:se}=Z,te=Re.toDOMNode(m,m);if(se!==te&&!(Sn(se)&&se.hasAttribute("data-slate-spacer"))){if(se!=null&&Fo(se)&&Re.hasDOMNode(m,se)){var ce=Re.toSlateNode(m,se);if(yt.isElement(ce)&&!m.isVoid(ce))return}if(Io){var Ce=Ja(he);Ce==null||Ce.removeAllRanges()}ko.delete(m)}}}},[l,L.isUpdatingSelection,L.latestElement,m,D.onBlur]),onClick:St(Z=>{if(Re.hasTarget(m,Z.target)&&!sn(Z,D.onClick)&&Fo(Z.target)){var he=Re.toSlateNode(m,Z.target),se=Re.findPath(m,he);if(!I.hasPath(m,se)||Qe.get(m,se)!==he)return;if(Z.detail===Sw&&se.length>=1){var te=se;if(!(yt.isElement(he)&&I.isBlock(m,he))){var ce,Ce=I.above(m,{match:He=>yt.isElement(He)&&I.isBlock(m,He),at:se});te=(ce=Ce==null?void 0:Ce[1])!==null&&ce!==void 0?ce:se.slice(0,1)}var we=I.range(m,te);We.select(m,we);return}if(l)return;var Se=I.start(m,se),Ee=I.end(m,se),Ae=I.void(m,{at:Se}),$e=I.void(m,{at:Ee});if(Ae&&$e&&ne.equals(Ae[1],$e[1])){var Te=I.range(m,Se);We.select(m,Te)}}},[m,D.onClick,l]),onCompositionEnd:St(Z=>{if(Re.hasSelectableTarget(m,Z.target)){var he;if(Re.isComposing(m)&&Promise.resolve().then(()=>{F(!1),Po.set(m,!1)}),(he=Y.current)===null||he===void 0||he.handleCompositionEnd(Z),sn(Z,D.onCompositionEnd)||ln)return;if(!Io&&!Ax&&!Km&&!Fx&&!Bx&&Z.data){var se=Tn.get(m);Tn.delete(m),se!==void 0&&(oo.set(m,m.marks),m.marks=se),I.insertText(m,Z.data);var te=oo.get(m);oo.delete(m),te!==void 0&&(m.marks=te)}}},[D.onCompositionEnd,m]),onCompositionUpdate:St(Z=>{Re.hasSelectableTarget(m,Z.target)&&!sn(Z,D.onCompositionUpdate)&&(Re.isComposing(m)||(F(!0),Po.set(m,!0)))},[D.onCompositionUpdate,m]),onCompositionStart:St(Z=>{if(Re.hasSelectableTarget(m,Z.target)){var he;if((he=Y.current)===null||he===void 0||he.handleCompositionStart(Z),sn(Z,D.onCompositionStart)||ln)return;F(!0);var{selection:se}=m;if(se&&Fe.isExpanded(se)){I.deleteFragment(m);return}}},[D.onCompositionStart,m]),onCopy:St(Z=>{Re.hasSelectableTarget(m,Z.target)&&!sn(Z,D.onCopy)&&!b1(Z)&&(Z.preventDefault(),Re.setFragmentData(m,Z.clipboardData,"copy"))},[D.onCopy,m]),onCut:St(Z=>{if(!l&&Re.hasSelectableTarget(m,Z.target)&&!sn(Z,D.onCut)&&!b1(Z)){Z.preventDefault(),Re.setFragmentData(m,Z.clipboardData,"cut");var{selection:he}=m;if(he)if(Fe.isExpanded(he))I.deleteFragment(m);else{var se=Qe.parent(m,he.anchor.path);I.isVoid(m,se)&&We.delete(m)}}},[l,m,D.onCut]),onDragOver:St(Z=>{if(Re.hasTarget(m,Z.target)&&!sn(Z,D.onDragOver)){var he=Re.toSlateNode(m,Z.target);yt.isElement(he)&&I.isVoid(m,he)&&Z.preventDefault()}},[D.onDragOver,m]),onDragStart:St(Z=>{if(!l&&Re.hasTarget(m,Z.target)&&!sn(Z,D.onDragStart)){var he=Re.toSlateNode(m,Z.target),se=Re.findPath(m,he),te=yt.isElement(he)&&I.isVoid(m,he)||I.void(m,{at:se,voids:!0});if(te){var ce=I.range(m,se);We.select(m,ce)}L.isDraggingInternally=!0,Re.setFragmentData(m,Z.dataTransfer,"drag")}},[l,m,D.onDragStart,L]),onDrop:St(Z=>{if(!l&&Re.hasTarget(m,Z.target)&&!sn(Z,D.onDrop)){Z.preventDefault();var he=m.selection,se=Re.findEventRange(m,Z),te=Z.dataTransfer;We.select(m,se),L.isDraggingInternally&&he&&!Fe.equals(he,se)&&!I.void(m,{at:se,voids:!0})&&We.delete(m,{at:he}),Re.insertData(m,te),Re.isFocused(m)||Re.focus(m)}},[l,m,D.onDrop,L]),onDragEnd:St(Z=>{!l&&L.isDraggingInternally&&D.onDragEnd&&Re.hasTarget(m,Z.target)&&D.onDragEnd(Z)},[l,L,D,m]),onFocus:St(Z=>{if(!l&&!L.isUpdatingSelection&&Re.hasEditableTarget(m,Z.target)&&!sn(Z,D.onFocus)){var he=Re.toDOMNode(m,m),se=Re.findDocumentOrShadowRoot(m);if(L.latestElement=se.activeElement,sa&&Z.target!==he){he.focus();return}ko.set(m,!0)}},[l,L,m,D.onFocus]),onKeyDown:St(Z=>{if(!l&&Re.hasEditableTarget(m,Z.target)){var he;(he=Y.current)===null||he===void 0||he.handleKeyDown(Z);var{nativeEvent:se}=Z;if(Re.isComposing(m)&&se.isComposing===!1&&(Po.set(m,!1),F(!1)),sn(Z,D.onKeyDown)||Re.isComposing(m))return;var{selection:te}=m,ce=m.children[te!==null?te.focus.path[0]:0],Ce=Mm(Qe.string(ce))==="rtl";if(Or.isRedo(se)){Z.preventDefault();var we=m;typeof we.redo=="function"&&we.redo();return}if(Or.isUndo(se)){Z.preventDefault();var Se=m;typeof Se.undo=="function"&&Se.undo();return}if(Or.isMoveLineBackward(se)){Z.preventDefault(),We.move(m,{unit:"line",reverse:!0});return}if(Or.isMoveLineForward(se)){Z.preventDefault(),We.move(m,{unit:"line"});return}if(Or.isExtendLineBackward(se)){Z.preventDefault(),We.move(m,{unit:"line",edge:"focus",reverse:!0});return}if(Or.isExtendLineForward(se)){Z.preventDefault(),We.move(m,{unit:"line",edge:"focus"});return}if(Or.isMoveBackward(se)){Z.preventDefault(),te&&Fe.isCollapsed(te)?We.move(m,{reverse:!Ce}):We.collapse(m,{edge:Ce?"end":"start"});return}if(Or.isMoveForward(se)){Z.preventDefault(),te&&Fe.isCollapsed(te)?We.move(m,{reverse:Ce}):We.collapse(m,{edge:Ce?"start":"end"});return}if(Or.isMoveWordBackward(se)){Z.preventDefault(),te&&Fe.isExpanded(te)&&We.collapse(m,{edge:"focus"}),We.move(m,{unit:"word",reverse:!Ce});return}if(Or.isMoveWordForward(se)){Z.preventDefault(),te&&Fe.isExpanded(te)&&We.collapse(m,{edge:"focus"}),We.move(m,{unit:"word",reverse:Ce});return}if(bo){if((qm||Io)&&te&&(Or.isDeleteBackward(se)||Or.isDeleteForward(se))&&Fe.isCollapsed(te)){var Ee=Qe.parent(m,te.anchor.path);if(yt.isElement(Ee)&&I.isVoid(m,Ee)&&(I.isInline(m,Ee)||I.isBlock(m,Ee))){Z.preventDefault(),I.deleteBackward(m,{unit:"block"});return}}}else{if(Or.isBold(se)||Or.isItalic(se)||Or.isTransposeCharacter(se)){Z.preventDefault();return}if(Or.isSoftBreak(se)){Z.preventDefault(),I.insertSoftBreak(m);return}if(Or.isSplitBlock(se)){Z.preventDefault(),I.insertBreak(m);return}if(Or.isDeleteBackward(se)){Z.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m);return}if(Or.isDeleteForward(se)){Z.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m);return}if(Or.isDeleteLineBackward(se)){Z.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m,{unit:"line"});return}if(Or.isDeleteLineForward(se)){Z.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m,{unit:"line"});return}if(Or.isDeleteWordBackward(se)){Z.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m,{unit:"word"});return}if(Or.isDeleteWordForward(se)){Z.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m,{unit:"word"});return}}}},[l,m,D.onKeyDown]),onPaste:St(Z=>{!l&&Re.hasEditableTarget(m,Z.target)&&!sn(Z,D.onPaste)&&(!bo||Mx(Z.nativeEvent)||Io)&&(Z.preventDefault(),Re.insertData(m,Z.clipboardData))},[l,m,D.onPaste])}),_e.createElement(Iw,{decorations:W,node:m,renderElement:f,renderPlaceholder:p,renderLeaf:d,selection:m.selection}))))))}),Pw=e=>{var{attributes:t,children:r}=e;return _e.createElement("span",Wn({},t),r,ln&&_e.createElement("br",null))},zw=()=>[],jw=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Fe.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),Jy(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},sn=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},b1=e=>Fo(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),_w=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},Lw=uo(!1),Hw=uo({});function Kw(e){var t=Lt([]).current,r=Lt({editor:e}).current,n=St(a=>{r.editor=a,t.forEach(u=>u(a))},[t,r]),o=Ct(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var qw=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],wu=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:u}=e,l=ga(e,qw),[f,d]=_e.useState(()=>{if(!Qe.isNodeList(u))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Yr.stringify(u)));if(!I.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Yr.stringify(t)));return t.children=u,Object.assign(t,l),{v:0,editor:t}}),{selectorContext:p,onChange:v}=Kw(t),g=St(D=>{var m;switch(n&&n(t.children),D==null||(m=D.operation)===null||m===void 0?void 0:m.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}d(S=>({v:S.v+1,editor:t})),v(t)},[t,v,n,o,a]);er(()=>(p0.set(t,g),()=>{p0.set(t,()=>{})}),[t,g]);var[b,x]=Ot(Re.isFocused(t));return er(()=>{x(Re.isFocused(t))},[t]),di(()=>{var D=()=>x(Re.isFocused(t));return Hm>=17?(document.addEventListener("focusin",D),document.addEventListener("focusout",D),()=>{document.removeEventListener("focusin",D),document.removeEventListener("focusout",D)}):(document.addEventListener("focus",D,!0),document.addEventListener("blur",D,!0),()=>{document.removeEventListener("focus",D,!0),document.removeEventListener("blur",D,!0)})},[]),_e.createElement(Hw.Provider,{value:p},_e.createElement(ig.Provider,{value:f},_e.createElement(gc.Provider,{value:f.editor},_e.createElement(Lw.Provider,{value:b},r))))},y1=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},x1=(e,t,r)=>{var n=Re.toDOMRange(e,t).getBoundingClientRect(),o=Re.toDOMRange(e,r).getBoundingClientRect();return y1(n,o)&&y1(o,n)},Ww=(e,t)=>{var r=I.range(e,Fe.end(t)),n=Array.from(I.positions(e,{at:t})),o=0,a=n.length,u=Math.floor(a/2);if(x1(e,I.range(e,n[o]),r))return I.range(e,n[o],r);if(n.length<2)return I.range(e,n[n.length-1],r);for(;u!==n.length&&u!==o;)x1(e,I.range(e,n[u]),r)?a=u:o=u,u=Math.floor((o+a)/2);return I.range(e,n[a],r)};function w1(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 C1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w1(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Vw=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:u,removeMark:l}=r;return el.set(r,new WeakMap),r.addMark=(f,d)=>{var p,v;(p=yc.get(r))===null||p===void 0||p(),!Tn.get(r)&&(v=pn.get(r))!==null&&v!==void 0&&v.length&&Tn.set(r,null),oo.delete(r),u(f,d)},r.removeMark=f=>{var d;!Tn.get(r)&&(d=pn.get(r))!==null&&d!==void 0&&d.length&&Tn.set(r,null),oo.delete(r),l(f)},r.deleteBackward=f=>{if(f!=="line")return a(f);if(r.selection&&Fe.isCollapsed(r.selection)){var d=I.above(r,{match:b=>yt.isElement(b)&&I.isBlock(r,b),at:r.selection});if(d){var[,p]=d,v=I.range(r,p,r.selection.anchor),g=Ww(r,v);Fe.isCollapsed(g)||We.delete(r,{at:g})}}},r.apply=f=>{var d=[],p=[],v=pn.get(r);if(v!=null&&v.length){var g=v.map(V=>Ux(V,f)).filter(Boolean);pn.set(r,g)}var b=Do.get(r);b&&Do.set(r,u1(r,b,f));var x=Co.get(r);if(x!=null&&x.at){var D=Xt.isPoint(x==null?void 0:x.at)?v0(r,x.at,f):u1(r,x.at,f);Co.set(r,D?C1(C1({},x),{},{at:D}):null)}switch(f.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{d.push(...ra(r,f.path));break}case"set_selection":{var m;(m=Za.get(r))===null||m===void 0||m.unref(),Za.delete(r);break}case"insert_node":case"remove_node":{d.push(...ra(r,ne.parent(f.path)));break}case"merge_node":{var S=ne.previous(f.path);d.push(...ra(r,S));break}case"move_node":{var F=ne.common(ne.parent(f.path),ne.parent(f.newPath));d.push(...ra(r,F));var B;ne.isBefore(f.path,f.newPath)?(d.push(...ra(r,ne.parent(f.path))),B=f.newPath):(d.push(...ra(r,ne.parent(f.newPath))),B=f.path);var O=Qe.get(e,ne.parent(B)),A=Re.findKey(r,O),P=I.pathRef(r,ne.parent(B));p.push([P,A]);break}}switch(n(f),f.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":fa.set(r,!0)}for(var[T,_]of d){var[M]=I.node(r,T);$s.set(M,_)}for(var[q,L]of p){if(q.current){var[Y]=I.node(r,q.current);$s.set(Y,L)}q.unref()}},r.setFragmentData=f=>{var{selection:d}=r;if(d){var[p,v]=Fe.edges(d),g=I.void(r,{at:p.path}),b=I.void(r,{at:v.path});if(!(Fe.isCollapsed(d)&&!g)){var x=Re.toDOMRange(r,d),D=x.cloneContents(),m=D.childNodes[0];if(D.childNodes.forEach(M=>{M.textContent&&M.textContent.trim()!==""&&(m=M)}),b){var[S]=b,F=x.cloneRange(),B=Re.toDOMNode(r,S);F.setEndAfter(B),D=F.cloneContents()}if(g&&(m=D.querySelector("[data-slate-spacer]")),Array.from(D.querySelectorAll("[data-slate-zero-width]")).forEach(M=>{var q=M.getAttribute("data-slate-zero-width")==="n";M.textContent=q?`
|
|
112
|
-
`:""}),Ym(m)){var O=m.ownerDocument.createElement("span");O.style.whiteSpace="pre",O.appendChild(m),D.appendChild(O),m=O}var A=r.getFragment(),P=JSON.stringify(A),T=window.btoa(encodeURIComponent(P));m.setAttribute("data-slate-fragment",T),f.setData("application/".concat(t),T);var _=D.ownerDocument.createElement("div");return _.appendChild(D),_.setAttribute("hidden","true"),D.ownerDocument.body.appendChild(_),f.setData("text/html",_.innerHTML),f.setData("text/plain",Zm(_)),D.ownerDocument.body.removeChild(_),f}}},r.insertData=f=>{r.insertFragmentData(f)||r.insertTextData(f)},r.insertFragmentData=f=>{var d=f.getData("application/".concat(t))||Px(f);if(d){var p=decodeURIComponent(window.atob(d)),v=JSON.parse(p);return r.insertFragment(v),!0}return!1},r.insertTextData=f=>{var d=f.getData("text/plain");if(d){var p=d.split(/\r\n|\r|\n/),v=!1;for(var g of p)v&&We.splitNodes(r,{always:!0}),r.insertText(g),v=!0;return!0}return!1},r.onChange=f=>{var d=Hm<18?Pu.unstable_batchedUpdates:p=>p();d(()=>{var p=p0.get(r);p&&p(f),o(f)})},r},ra=(e,t)=>{var r=[];for(var[n,o]of I.levels(e,{at:t})){var a=Re.findKey(e,n);r.push([o,a])}return r};function Cc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Zo=Cc();function ug(e){Zo=e}var Qa={exec:()=>null};function hr(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let u=typeof a=="string"?a:a.source;return u=u.replace(un.caret,"$1"),r=r.replace(o,u),n},getRegex:()=>new RegExp(r,t)};return n}var un={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")},Uw=/^(?:[ \t]*(?:\n|$))+/,Xw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Di=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Gw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Dc=/(?:[*+-]|\d{1,9}[.)])/,cg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dg=hr(cg).replace(/bull/g,Dc).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(),Zw=hr(cg).replace(/bull/g,Dc).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(),Ec=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Jw=/^[^\n]+/,kc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Qw=hr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),eC=hr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Dc).getRegex(),tl="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",Sc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tC=hr("^ {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",Sc).replace("tag",tl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fg=hr(Ec).replace("hr",Di).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",tl).getRegex(),rC=hr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fg).getRegex(),Ac={blockquote:rC,code:Xw,def:Qw,fences:Yw,heading:Gw,hr:Di,html:tC,lheading:dg,list:eC,newline:Uw,paragraph:fg,table:Qa,text:Jw},D1=hr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Di).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",tl).getRegex(),nC={...Ac,lheading:Zw,table:D1,paragraph:hr(Ec).replace("hr",Di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",D1).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",tl).getRegex()},oC={...Ac,html:hr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Sc).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:Qa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:hr(Ec).replace("hr",Di).replace("heading",` *#{1,6} *[^
|
|
113
|
-
]`).replace("lheading",dg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},aC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hg=/^( {2,}|\\)\n(?!\s*$)/,sC=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,rl=/[\p{P}\p{S}]/u,Bc=/[\s\p{P}\p{S}]/u,pg=/[^\s\p{P}\p{S}]/u,lC=hr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bc).getRegex(),mg=/(?!~)[\p{P}\p{S}]/u,uC=/(?!~)[\s\p{P}\p{S}]/u,cC=/(?:[^\s\p{P}\p{S}]|~)/u,dC=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,gg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fC=hr(gg,"u").replace(/punct/g,rl).getRegex(),hC=hr(gg,"u").replace(/punct/g,mg).getRegex(),vg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pC=hr(vg,"gu").replace(/notPunctSpace/g,pg).replace(/punctSpace/g,Bc).replace(/punct/g,rl).getRegex(),mC=hr(vg,"gu").replace(/notPunctSpace/g,cC).replace(/punctSpace/g,uC).replace(/punct/g,mg).getRegex(),gC=hr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,pg).replace(/punctSpace/g,Bc).replace(/punct/g,rl).getRegex(),vC=hr(/\\(punct)/,"gu").replace(/punct/g,rl).getRegex(),bC=hr(/^<(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(),yC=hr(Sc).replace("(?:-->|$)","-->").getRegex(),xC=hr("^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",yC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ms=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,wC=hr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ms).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bg=hr(/^!?\[(label)\]\[(ref)\]/).replace("label",Ms).replace("ref",kc).getRegex(),yg=hr(/^!?\[(ref)\](?:\[\])?/).replace("ref",kc).getRegex(),CC=hr("reflink|nolink(?!\\()","g").replace("reflink",bg).replace("nolink",yg).getRegex(),Fc={_backpedal:Qa,anyPunctuation:vC,autolink:bC,blockSkip:dC,br:hg,code:iC,del:Qa,emStrongLDelim:fC,emStrongRDelimAst:pC,emStrongRDelimUnd:gC,escape:aC,link:wC,nolink:yg,punctuation:lC,reflink:bg,reflinkSearch:CC,tag:xC,text:sC,url:Qa},DC={...Fc,link:hr(/^!?\[(label)\]\((.*?)\)/).replace("label",Ms).getRegex(),reflink:hr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ms).getRegex()},y0={...Fc,emStrongRDelimAst:mC,emStrongLDelim:hC,url:hr(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},EC={...y0,br:hr(hg).replace("{2,}","*").getRegex(),text:hr(y0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Vi={normal:Ac,gfm:nC,pedantic:oC},ja={normal:Fc,gfm:y0,breaks:EC,pedantic:DC},kC={"&":"&","<":"<",">":">",'"':""","'":"'"},E1=e=>kC[e];function Vn(e,t){if(t){if(un.escapeTest.test(e))return e.replace(un.escapeReplace,E1)}else if(un.escapeTestNoEncode.test(e))return e.replace(un.escapeReplaceNoEncode,E1);return e}function k1(e){try{e=encodeURI(e).replace(un.percentDecode,"%")}catch{return null}return e}function S1(e,t){var a;const r=e.replace(un.findPipe,(u,l,f)=>{let d=!1,p=l;for(;--p>=0&&f[p]==="\\";)d=!d;return d?"|":" |"}),n=r.split(un.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(un.slashPipe,"|");return n}function _a(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 SC(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 A1(e,t,r,n,o){const a=t.href,u=t.title||null,l=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:u,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,f}function AC(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 u=a.match(r.other.beginningSpace);if(u===null)return a;const[l]=u;return l.length>=o.length?a.slice(o.length):a}).join(`
|
|
115
|
-
`)}var Os=class{constructor(e){wr(this,"options"),wr(this,"rules"),wr(this,"lexer"),this.options=e||Zo}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:_a(r,`
|
|
116
|
-
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=AC(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=_a(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:_a(t[0],`
|
|
117
|
-
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=_a(t[0],`
|
|
118
|
-
`).split(`
|
|
119
|
-
`),n="",o="";const a=[];for(;r.length>0;){let u=!1;const l=[];let f;for(f=0;f<r.length;f++)if(this.rules.other.blockquoteStart.test(r[f]))l.push(r[f]),u=!0;else if(!u)l.push(r[f]);else break;r=r.slice(f);const d=l.join(`
|
|
120
|
-
`),p=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
121
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
122
|
-
${d}`:d,o=o?`${o}
|
|
123
|
-
${p}`:p;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,a,!0),this.lexer.state.top=v,r.length===0)break;const g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const b=g,x=b.raw+`
|
|
124
|
-
`+r.join(`
|
|
125
|
-
`),D=this.blockquote(x);a[a.length-1]=D,n=n.substring(0,n.length-b.raw.length)+D.raw,o=o.substring(0,o.length-b.text.length)+D.text;break}else if((g==null?void 0:g.type)==="list"){const b=g,x=b.raw+`
|
|
126
|
-
`+r.join(`
|
|
127
|
-
`),D=this.list(x);a[a.length-1]=D,n=n.substring(0,n.length-g.raw.length)+D.raw,o=o.substring(0,o.length-b.raw.length)+D.raw,r=x.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 u=!1;for(;e;){let f=!1,d="",p="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let v=t[2].split(`
|
|
129
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,S=>" ".repeat(3*S.length)),g=e.split(`
|
|
130
|
-
`,1)[0],b=!v.trim(),x=0;if(this.options.pedantic?(x=2,p=v.trimStart()):b?x=t[1].length+1:(x=t[2].search(this.rules.other.nonSpaceChar),x=x>4?1:x,p=v.slice(x),x+=t[1].length),b&&this.rules.other.blankLine.test(g)&&(d+=g+`
|
|
131
|
-
`,e=e.substring(g.length+1),f=!0),!f){const S=this.rules.other.nextBulletRegex(x),F=this.rules.other.hrRegex(x),B=this.rules.other.fencesBeginRegex(x),O=this.rules.other.headingBeginRegex(x),A=this.rules.other.htmlBeginRegex(x);for(;e;){const P=e.split(`
|
|
132
|
-
`,1)[0];let T;if(g=P,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),T=g):T=g.replace(this.rules.other.tabCharGlobal," "),B.test(g)||O.test(g)||A.test(g)||S.test(g)||F.test(g))break;if(T.search(this.rules.other.nonSpaceChar)>=x||!g.trim())p+=`
|
|
133
|
-
`+T.slice(x);else{if(b||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||B.test(v)||O.test(v)||F.test(v))break;p+=`
|
|
134
|
-
`+g}!b&&!g.trim()&&(b=!0),d+=P+`
|
|
135
|
-
`,e=e.substring(P.length+1),v=T.slice(x)}}o.loose||(u?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(u=!0));let D=null,m;this.options.gfm&&(D=this.rules.other.listIsTask.exec(p),D&&(m=D[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!D,checked:m,loose:!1,text:p,tokens:[]}),o.raw+=d}const l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let f=0;f<o.items.length;f++)if(this.lexer.state.top=!1,o.items[f].tokens=this.lexer.blockTokens(o.items[f].text,[]),!o.loose){const d=o.items[f].tokens.filter(v=>v.type==="space"),p=d.length>0&&d.some(v=>this.rules.other.anyLine.test(v.raw));o.loose=p}if(o.loose)for(let f=0;f<o.items.length;f++)o.items[f].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 u;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=S1(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(u=t[3])!=null&&u.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 l of n)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<r.length;l++)a.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:a.align[l]});for(const l of o)a.rows.push(S1(l,a.header.length).map((f,d)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:a.align[d]})));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=_a(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=SC(t[2],"()");if(a===-2)return;if(a>-1){const u=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,u).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)),A1(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 A1(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,u,l=o,f=0;const d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+o);(n=d.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(u=[...a].length,n[3]||n[4]){l+=u;continue}else if((n[5]||n[6])&&o%3&&!((o+u)%3)){f+=u;continue}if(l-=u,l>0)continue;u=Math.min(u,u+l+f);const p=[...n[0]][0].length,v=e.slice(0,o+n.index+p+u);if(Math.min(o,u)%2){const b=v.slice(1,-1);return{type:"em",raw:v,text:b,tokens:this.lexer.inlineTokens(b)}}const g=v.slice(2,-2);return{type:"strong",raw:v,text:g,tokens:this.lexer.inlineTokens(g)}}}}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}}}},ao=class x0{constructor(t){wr(this,"tokens"),wr(this,"options"),wr(this,"state"),wr(this,"tokenizer"),wr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Zo,this.options.tokenizer=this.options.tokenizer||new Os,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:un,block:Vi.normal,inline:ja.normal};this.options.pedantic?(r.block=Vi.pedantic,r.inline=ja.pedantic):this.options.gfm&&(r.block=Vi.gfm,this.options.breaks?r.inline=ja.breaks:r.inline=ja.gfm),this.tokenizer.rules=r}static get rules(){return{block:Vi,inline:ja}}static lex(t,r){return new x0(r).lex(t)}static lexInline(t,r){return new x0(r).inlineTokens(t)}lex(t){t=t.replace(un.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,u;for(this.options.pedantic&&(t=t.replace(un.tabCharGlobal," ").replace(un.spaceLine,""));t;){let l;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(d=>(l=d.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const d=r.at(-1);l.raw.length===1&&d!==void 0?d.raw+=`
|
|
139
|
-
`:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
140
|
-
`+l.raw,d.text+=`
|
|
141
|
-
`+l.text,this.inlineQueue.at(-1).src=d.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
142
|
-
`+l.raw,d.text+=`
|
|
143
|
-
`+l.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let f=t;if((u=this.options.extensions)!=null&&u.startBlock){let d=1/0;const p=t.slice(1);let v;this.options.extensions.startBlock.forEach(g=>{v=g.call({lexer:this},p),typeof v=="number"&&v>=0&&(d=Math.min(d,v))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(this.state.top&&(l=this.tokenizer.paragraph(f))){const d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
|
|
144
|
-
`+l.raw,d.text+=`
|
|
145
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(l),n=f.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
146
|
-
`+l.raw,d.text+=`
|
|
147
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(l);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 this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,f,d;let n=t,o=null;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)p.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,u="";for(;t;){a||(u=""),a=!1;let p;if((f=(l=this.options.extensions)==null?void 0:l.inline)!=null&&f.some(g=>(p=g.call({lexer:this},t,r))?(t=t.substring(p.raw.length),r.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);const g=r.at(-1);p.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=p.raw,g.text+=p.text):r.push(p);continue}if(p=this.tokenizer.emStrong(t,n,u)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.del(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),r.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),r.push(p);continue}let v=t;if((d=this.options.extensions)!=null&&d.startInline){let g=1/0;const b=t.slice(1);let x;this.options.extensions.startInline.forEach(D=>{x=D.call({lexer:this},b),typeof x=="number"&&x>=0&&(g=Math.min(g,x))}),g<1/0&&g>=0&&(v=t.substring(0,g+1))}if(p=this.tokenizer.inlineText(v)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(u=p.raw.slice(-1)),a=!0;const g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=p.raw,g.text+=p.text):r.push(p);continue}if(t){const g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ts=class{constructor(e){wr(this,"options"),wr(this,"parser"),this.options=e||Zo}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(un.notSpaceStart))==null?void 0:a[0],o=e.replace(un.endingNewline,"")+`
|
|
148
|
-
`;return n?'<pre><code class="language-'+Vn(n)+'">'+(r?o:Vn(o,!0))+`</code></pre>
|
|
149
|
-
`:"<pre><code>"+(r?o:Vn(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 u=0;u<e.items.length;u++){const l=e.items[u];n+=this.listitem(l)}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+" "+Vn(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 u=0;u<a.length;u++)r+=this.tablecell(a[u]);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>${Vn(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=k1(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Vn(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=k1(e);if(o===null)return Vn(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Vn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Vn(e.text)}},Nc=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""}},io=class w0{constructor(t){wr(this,"options"),wr(this,"renderer"),wr(this,"textRenderer"),this.options=t||Zo,this.options.renderer=this.options.renderer||new Ts,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Nc}static parse(t,r){return new w0(r).parse(t)}static parseInline(t,r){return new w0(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let u=0;u<t.length;u++){const l=t[u];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const d=l,p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=p||"";continue}}const f=l;switch(f.type){case"space":{n+=this.renderer.space(f);continue}case"hr":{n+=this.renderer.hr(f);continue}case"heading":{n+=this.renderer.heading(f);continue}case"code":{n+=this.renderer.code(f);continue}case"table":{n+=this.renderer.table(f);continue}case"blockquote":{n+=this.renderer.blockquote(f);continue}case"list":{n+=this.renderer.list(f);continue}case"html":{n+=this.renderer.html(f);continue}case"paragraph":{n+=this.renderer.paragraph(f);continue}case"text":{let d=f,p=this.renderer.text(d);for(;u+1<t.length&&t[u+1].type==="text";)d=t[++u],p+=`
|
|
166
|
-
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{const d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(t,r=this.renderer){var o,a;let n="";for(let u=0;u<t.length;u++){const l=t[u];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const d=this.options.extensions.renderers[l.type].call({parser:this},l);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=d||"";continue}}const f=l;switch(f.type){case"escape":{n+=r.text(f);break}case"html":{n+=r.html(f);break}case"link":{n+=r.link(f);break}case"image":{n+=r.image(f);break}case"strong":{n+=r.strong(f);break}case"em":{n+=r.em(f);break}case"codespan":{n+=r.codespan(f);break}case"br":{n+=r.br(f);break}case"del":{n+=r.del(f);break}case"text":{n+=r.text(f);break}default:{const d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},Cu,os=(Cu=class{constructor(e){wr(this,"options"),wr(this,"block"),this.options=e||Zo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ao.lex:ao.lexInline}provideParser(){return this.block?io.parse:io.parseInline}},wr(Cu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Cu),BC=class{constructor(...e){wr(this,"defaults",Cc()),wr(this,"options",this.setOptions),wr(this,"parse",this.parseMarkdown(!0)),wr(this,"parseInline",this.parseMarkdown(!1)),wr(this,"Parser",io),wr(this,"Renderer",Ts),wr(this,"TextRenderer",Nc),wr(this,"Lexer",ao),wr(this,"Tokenizer",Os),wr(this,"Hooks",os),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 u=a;for(const l of u.header)r=r.concat(this.walkTokens(l.tokens,t));for(const l of u.rows)for(const f of l)r=r.concat(this.walkTokens(f.tokens,t));break}case"list":{const u=a;r=r.concat(this.walkTokens(u.items,t));break}default:{const u=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[u.type]?this.defaults.extensions.childTokens[u.type].forEach(l=>{const f=u[l].flat(1/0);r=r.concat(this.walkTokens(f,t))}):u.tokens&&(r=r.concat(this.walkTokens(u.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(...u){let l=o.renderer.apply(this,u);return l===!1&&(l=a.apply(this,u)),l}: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 Ts(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 u=a,l=r.renderer[u],f=o[u];o[u]=(...d)=>{let p=l.apply(o,d);return p===!1&&(p=f.apply(o,d)),p||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Os(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 u=a,l=r.tokenizer[u],f=o[u];o[u]=(...d)=>{let p=l.apply(o,d);return p===!1&&(p=f.apply(o,d)),p}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new os;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 u=a,l=r.hooks[u],f=o[u];os.passThroughHooks.has(a)?o[u]=d=>{if(this.defaults.async)return Promise.resolve(l.call(o,d)).then(v=>f.call(o,v));const p=l.call(o,d);return f.call(o,p)}:o[u]=(...d)=>{let p=l.apply(o,d);return p===!1&&(p=f.apply(o,d)),p}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(u){let l=[];return l.push(a.call(this,u)),o&&(l=l.concat(o.call(this,u))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ao.lex(e,t??this.defaults)}parser(e,t){return io.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 u=o.hooks?o.hooks.provideLexer():e?ao.lex:ao.lexInline,l=o.hooks?o.hooks.provideParser():e?io.parse:io.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(f=>u(f,o)).then(f=>o.hooks?o.hooks.processAllTokens(f):f).then(f=>o.walkTokens?Promise.all(this.walkTokens(f,o.walkTokens)).then(()=>f):f).then(f=>l(f,o)).then(f=>o.hooks?o.hooks.postprocess(f):f).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let f=u(t,o);o.hooks&&(f=o.hooks.processAllTokens(f)),o.walkTokens&&this.walkTokens(f,o.walkTokens);let d=l(f,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(f){return a(f)}}}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>"+Vn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Go=new BC;function lr(e,t){return Go.parse(e,t)}lr.options=lr.setOptions=function(e){return Go.setOptions(e),lr.defaults=Go.defaults,ug(lr.defaults),lr};lr.getDefaults=Cc;lr.defaults=Zo;lr.use=function(...e){return Go.use(...e),lr.defaults=Go.defaults,ug(lr.defaults),lr};lr.walkTokens=function(e,t){return Go.walkTokens(e,t)};lr.parseInline=Go.parseInline;lr.Parser=io;lr.parser=io.parse;lr.Renderer=Ts;lr.TextRenderer=Nc;lr.Lexer=ao;lr.lexer=ao.lex;lr.Tokenizer=Os;lr.Hooks=os;lr.parse=lr;lr.options;lr.setOptions;lr.use;lr.walkTokens;lr.parseInline;io.parse;ao.lex;var vn=function(){return vn=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},vn.apply(this,arguments)};function fi(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 Sr="-ms-",ei="-moz-",fr="-webkit-",xg="comm",nl="rule",$c="decl",FC="@import",wg="@keyframes",NC="@layer",Cg=Math.abs,Mc=String.fromCharCode,C0=Object.assign;function $C(e,t){return Xr(e,0)^45?(((t<<2^Xr(e,0))<<2^Xr(e,1))<<2^Xr(e,2))<<2^Xr(e,3):0}function Dg(e){return e.trim()}function no(e,t){return(e=t.exec(e))?e[0]:e}function Wt(e,t,r){return e.replace(t,r)}function as(e,t,r){return e.indexOf(t,r)}function Xr(e,t){return e.charCodeAt(t)|0}function ba(e,t,r){return e.slice(t,r)}function Un(e){return e.length}function Eg(e){return e.length}function Ka(e,t){return t.push(e),e}function MC(e,t){return e.map(t).join("")}function B1(e,t){return e.filter(function(r){return!no(r,t)})}var ol=1,ya=1,kg=0,Fn=0,Hr=0,Na="";function al(e,t,r,n,o,a,u,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:ol,column:ya,length:u,return:"",siblings:l}}function xo(e,t){return C0(al("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function na(e){for(;e.root;)e=xo(e.root,{children:[e]});Ka(e,e.siblings)}function OC(){return Hr}function TC(){return Hr=Fn>0?Xr(Na,--Fn):0,ya--,Hr===10&&(ya=1,ol--),Hr}function Rn(){return Hr=Fn<kg?Xr(Na,Fn++):0,ya++,Hr===10&&(ya=1,ol++),Hr}function Ko(){return Xr(Na,Fn)}function is(){return Fn}function il(e,t){return ba(Na,e,t)}function D0(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 RC(e){return ol=ya=1,kg=Un(Na=e),Fn=0,[]}function IC(e){return Na="",e}function Du(e){return Dg(il(Fn-1,E0(e===91?e+2:e===40?e+1:e)))}function PC(e){for(;(Hr=Ko())&&Hr<33;)Rn();return D0(e)>2||D0(Hr)>3?"":" "}function zC(e,t){for(;--t&&Rn()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return il(e,is()+(t<6&&Ko()==32&&Rn()==32))}function E0(e){for(;Rn();)switch(Hr){case e:return Fn;case 34:case 39:e!==34&&e!==39&&E0(Hr);break;case 40:e===41&&E0(e);break;case 92:Rn();break}return Fn}function jC(e,t){for(;Rn()&&e+Hr!==57&&!(e+Hr===84&&Ko()===47););return"/*"+il(t,Fn-1)+"*"+Mc(e===47?e:Rn())}function _C(e){for(;!D0(Ko());)Rn();return il(e,Fn)}function LC(e){return IC(ss("",null,null,null,[""],e=RC(e),0,[0],e))}function ss(e,t,r,n,o,a,u,l,f){for(var d=0,p=0,v=u,g=0,b=0,x=0,D=1,m=1,S=1,F=0,B="",O=o,A=a,P=n,T=B;m;)switch(x=F,F=Rn()){case 40:if(x!=108&&Xr(T,v-1)==58){as(T+=Wt(Du(F),"&","&\f"),"&\f",Cg(d?l[d-1]:0))!=-1&&(S=-1);break}case 34:case 39:case 91:T+=Du(F);break;case 9:case 10:case 13:case 32:T+=PC(x);break;case 92:T+=zC(is()-1,7);continue;case 47:switch(Ko()){case 42:case 47:Ka(HC(jC(Rn(),is()),t,r,f),f);break;default:T+="/"}break;case 123*D:l[d++]=Un(T)*S;case 125*D:case 59:case 0:switch(F){case 0:case 125:m=0;case 59+p:S==-1&&(T=Wt(T,/\f/g,"")),b>0&&Un(T)-v&&Ka(b>32?N1(T+";",n,r,v-1,f):N1(Wt(T," ","")+";",n,r,v-2,f),f);break;case 59:T+=";";default:if(Ka(P=F1(T,t,r,d,p,o,l,B,O=[],A=[],v,a),a),F===123)if(p===0)ss(T,t,P,P,O,a,v,l,A);else switch(g===99&&Xr(T,3)===110?100:g){case 100:case 108:case 109:case 115:ss(e,P,P,n&&Ka(F1(e,P,P,0,0,o,l,B,o,O=[],v,A),A),o,A,v,l,n?O:A);break;default:ss(T,P,P,P,[""],A,0,l,A)}}d=p=b=0,D=S=1,B=T="",v=u;break;case 58:v=1+Un(T),b=x;default:if(D<1){if(F==123)--D;else if(F==125&&D++==0&&TC()==125)continue}switch(T+=Mc(F),F*D){case 38:S=p>0?1:(T+="\f",-1);break;case 44:l[d++]=(Un(T)-1)*S,S=1;break;case 64:Ko()===45&&(T+=Du(Rn())),g=Ko(),p=v=Un(B=T+=_C(is())),F++;break;case 45:x===45&&Un(T)==2&&(D=0)}}return a}function F1(e,t,r,n,o,a,u,l,f,d,p,v){for(var g=o-1,b=o===0?a:[""],x=Eg(b),D=0,m=0,S=0;D<n;++D)for(var F=0,B=ba(e,g+1,g=Cg(m=u[D])),O=e;F<x;++F)(O=Dg(m>0?b[F]+" "+B:Wt(B,/&\f/g,b[F])))&&(f[S++]=O);return al(e,t,r,o===0?nl:l,f,d,p,v)}function HC(e,t,r,n){return al(e,t,r,xg,Mc(OC()),ba(e,2,-2),0,n)}function N1(e,t,r,n,o){return al(e,t,r,$c,ba(e,0,n),ba(e,n+1,-1),n,o)}function Sg(e,t,r){switch($C(e,t)){case 5103:return fr+"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 fr+e+e;case 4789:return ei+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return fr+e+ei+e+Sr+e+e;case 5936:switch(Xr(e,t+11)){case 114:return fr+e+Sr+Wt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fr+e+Sr+Wt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fr+e+Sr+Wt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return fr+e+Sr+e+e;case 6165:return fr+e+Sr+"flex-"+e+e;case 5187:return fr+e+Wt(e,/(\w+).+(:[^]+)/,fr+"box-$1$2"+Sr+"flex-$1$2")+e;case 5443:return fr+e+Sr+"flex-item-"+Wt(e,/flex-|-self/g,"")+(no(e,/flex-|baseline/)?"":Sr+"grid-row-"+Wt(e,/flex-|-self/g,""))+e;case 4675:return fr+e+Sr+"flex-line-pack"+Wt(e,/align-content|flex-|-self/g,"")+e;case 5548:return fr+e+Sr+Wt(e,"shrink","negative")+e;case 5292:return fr+e+Sr+Wt(e,"basis","preferred-size")+e;case 6060:return fr+"box-"+Wt(e,"-grow","")+fr+e+Sr+Wt(e,"grow","positive")+e;case 4554:return fr+Wt(e,/([^-])(transform)/g,"$1"+fr+"$2")+e;case 6187:return Wt(Wt(Wt(e,/(zoom-|grab)/,fr+"$1"),/(image-set)/,fr+"$1"),e,"")+e;case 5495:case 3959:return Wt(e,/(image-set\([^]*)/,fr+"$1$`$1");case 4968:return Wt(Wt(e,/(.+:)(flex-)?(.*)/,fr+"box-pack:$3"+Sr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+fr+e+e;case 4200:if(!no(e,/flex-|baseline/))return Sr+"grid-column-align"+ba(e,t)+e;break;case 2592:case 3360:return Sr+Wt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,no(n.props,/grid-\w+-end/)})?~as(e+(r=r[t].value),"span",0)?e:Sr+Wt(e,"-start","")+e+Sr+"grid-row-span:"+(~as(r,"span",0)?no(r,/\d+/):+no(r,/\d+/)-+no(e,/\d+/))+";":Sr+Wt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return no(n.props,/grid-\w+-start/)})?e:Sr+Wt(Wt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Wt(e,/(.+)-inline(.+)/,fr+"$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(Un(e)-1-t>6)switch(Xr(e,t+1)){case 109:if(Xr(e,t+4)!==45)break;case 102:return Wt(e,/(.+:)(.+)-([^]+)/,"$1"+fr+"$2-$3$1"+ei+(Xr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~as(e,"stretch",0)?Sg(Wt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Wt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,u,l,f,d){return Sr+o+":"+a+d+(u?Sr+o+"-span:"+(l?f:+f-+a)+d:"")+e});case 4949:if(Xr(e,t+6)===121)return Wt(e,":",":"+fr)+e;break;case 6444:switch(Xr(e,Xr(e,14)===45?18:11)){case 120:return Wt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+fr+(Xr(e,14)===45?"inline-":"")+"box$3$1"+fr+"$2$3$1"+Sr+"$2box$3")+e;case 100:return Wt(e,":",":"+Sr)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Wt(e,"scroll-","scroll-snap-")+e}return e}function Rs(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function KC(e,t,r,n){switch(e.type){case NC:if(e.children.length)break;case FC:case $c:return e.return=e.return||e.value;case xg:return"";case wg:return e.return=e.value+"{"+Rs(e.children,n)+"}";case nl:if(!Un(e.value=e.props.join(",")))return""}return Un(r=Rs(e.children,n))?e.return=e.value+"{"+r+"}":""}function qC(e){var t=Eg(e);return function(r,n,o,a){for(var u="",l=0;l<t;l++)u+=e[l](r,n,o,a)||"";return u}}function WC(e){return function(t){t.root||(t=t.return)&&e(t)}}function VC(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case $c:e.return=Sg(e.value,e.length,r);return;case wg:return Rs([xo(e,{value:Wt(e.value,"@","@"+fr)})],n);case nl:if(e.length)return MC(r=e.props,function(o){switch(no(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":na(xo(e,{props:[Wt(o,/:(read-\w+)/,":"+ei+"$1")]})),na(xo(e,{props:[o]})),C0(e,{props:B1(r,n)});break;case"::placeholder":na(xo(e,{props:[Wt(o,/:(plac\w+)/,":"+fr+"input-$1")]})),na(xo(e,{props:[Wt(o,/:(plac\w+)/,":"+ei+"$1")]})),na(xo(e,{props:[Wt(o,/:(plac\w+)/,Sr+"input-$1")]})),na(xo(e,{props:[o]})),C0(e,{props:B1(r,n)});break}return""})}}var UC={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},xa=typeof process<"u"&&xn!==void 0&&(xn.REACT_APP_SC_ATTR||xn.SC_ATTR)||"data-styled",Ag="active",Bg="data-styled-version",sl="6.1.19",Oc=`/*!sc*/
|
|
168
|
-
`,Is=typeof window<"u"&&typeof document<"u",XC=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&xn!==void 0&&xn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&xn.REACT_APP_SC_DISABLE_SPEEDY!==""?xn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&xn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&xn!==void 0&&xn.SC_DISABLE_SPEEDY!==void 0&&xn.SC_DISABLE_SPEEDY!==""&&xn.SC_DISABLE_SPEEDY!=="false"&&xn.SC_DISABLE_SPEEDY),ll=Object.freeze([]),wa=Object.freeze({});function YC(e,t,r){return r===void 0&&(r=wa),e.theme!==r.theme&&e.theme||t||r.theme}var Fg=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"]),GC=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ZC=/(^-|-$)/g;function $1(e){return e.replace(GC,"-").replace(ZC,"")}var JC=/(a)(d)/gi,Ui=52,M1=function(e){return String.fromCharCode(e+(e>25?39:97))};function k0(e){var t,r="";for(t=Math.abs(e);t>Ui;t=t/Ui|0)r=M1(t%Ui)+r;return(M1(t%Ui)+r).replace(JC,"$1-$2")}var Eu,Ng=5381,la=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},$g=function(e){return la(Ng,e)};function Mg(e){return k0($g(e)>>>0)}function QC(e){return e.displayName||e.name||"Component"}function ku(e){return typeof e=="string"&&!0}var Og=typeof Symbol=="function"&&Symbol.for,Tg=Og?Symbol.for("react.memo"):60115,e9=Og?Symbol.for("react.forward_ref"):60112,t9={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r9={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Rg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},n9=((Eu={})[e9]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Eu[Tg]=Rg,Eu);function O1(e){return("type"in(t=e)&&t.type.$$typeof)===Tg?Rg:"$$typeof"in e?n9[e.$$typeof]:t9;var t}var o9=Object.defineProperty,a9=Object.getOwnPropertyNames,T1=Object.getOwnPropertySymbols,i9=Object.getOwnPropertyDescriptor,s9=Object.getPrototypeOf,R1=Object.prototype;function Ig(e,t,r){if(typeof t!="string"){if(R1){var n=s9(t);n&&n!==R1&&Ig(e,n,r)}var o=a9(t);T1&&(o=o.concat(T1(t)));for(var a=O1(e),u=O1(t),l=0;l<o.length;++l){var f=o[l];if(!(f in r9||r&&r[f]||u&&f in u||a&&f in a)){var d=i9(t,f);try{o9(e,f,d)}catch{}}}}return e}function Ca(e){return typeof e=="function"}function Tc(e){return typeof e=="object"&&"styledComponentId"in e}function zo(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function S0(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function hi(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function A0(e,t,r){if(r===void 0&&(r=!1),!r&&!hi(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=A0(e[n],t[n]);else if(hi(t))for(var n in t)e[n]=A0(e[n],t[n]);return e}function Rc(e,t){Object.defineProperty(e,"toString",{value:t})}function Ei(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 l9=(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 Ei(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var u=o;u<a;u++)this.groupSizes[u]=0}for(var l=this.indexOfGroup(t+1),f=(u=0,r.length);u<f;u++)this.tag.insertRule(l,r[u])&&(this.groupSizes[t]++,l++)},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,u=o;u<a;u++)r+="".concat(this.tag.getRule(u)).concat(Oc);return r},e})(),ls=new Map,Ps=new Map,us=1,Xi=function(e){if(ls.has(e))return ls.get(e);for(;Ps.has(us);)us++;var t=us++;return ls.set(e,t),Ps.set(t,e),t},u9=function(e,t){us=t+1,ls.set(e,t),Ps.set(t,e)},c9="style[".concat(xa,"][").concat(Bg,'="').concat(sl,'"]'),d9=new RegExp("^".concat(xa,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),f9=function(e,t,r){for(var n,o=r.split(","),a=0,u=o.length;a<u;a++)(n=o[a])&&e.registerName(t,n)},h9=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(Oc),o=[],a=0,u=n.length;a<u;a++){var l=n[a].trim();if(l){var f=l.match(d9);if(f){var d=0|parseInt(f[1],10),p=f[2];d!==0&&(u9(p,d),f9(e,p,f[3]),e.getTag().insertRules(d,o)),o.length=0}else o.push(l)}}},I1=function(e){for(var t=document.querySelectorAll(c9),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(xa)!==Ag&&(h9(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function p9(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Pg=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(l){var f=Array.from(l.querySelectorAll("style[".concat(xa,"]")));return f[f.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(xa,Ag),n.setAttribute(Bg,sl);var u=p9();return u&&n.setAttribute("nonce",u),r.insertBefore(n,a),n},m9=(function(){function e(t){this.element=Pg(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 u=n[o];if(u.ownerNode===r)return u}throw Ei(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})(),g9=(function(){function e(t){this.element=Pg(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})(),v9=(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})(),P1=Is,b9={isServer:!Is,useCSSOMInjection:!XC},zg=(function(){function e(t,r,n){t===void 0&&(t=wa),r===void 0&&(r={});var o=this;this.options=vn(vn({},b9),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&Is&&P1&&(P1=!1,I1(this)),Rc(this,function(){return(function(a){for(var u=a.getTag(),l=u.length,f="",d=function(v){var g=(function(S){return Ps.get(S)})(v);if(g===void 0)return"continue";var b=a.names.get(g),x=u.getGroup(v);if(b===void 0||!b.size||x.length===0)return"continue";var D="".concat(xa,".g").concat(v,'[id="').concat(g,'"]'),m="";b!==void 0&&b.forEach(function(S){S.length>0&&(m+="".concat(S,","))}),f+="".concat(x).concat(D,'{content:"').concat(m,'"}').concat(Oc)},p=0;p<l;p++)d(p);return f})(o)})}return e.registerId=function(t){return Xi(t)},e.prototype.rehydrate=function(){!this.server&&Is&&I1(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(vn(vn({},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 v9(o):n?new m9(o):new g9(o)})(this.options),new l9(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(Xi(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(Xi(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Xi(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),y9=/&/g,x9=/^\s*\/\/.*$/gm;function jg(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=jg(r.children,t)),r})}function w9(e){var t,r,n,o=wa,a=o.options,u=a===void 0?wa:a,l=o.plugins,f=l===void 0?ll:l,d=function(g,b,x){return x.startsWith(r)&&x.endsWith(r)&&x.replaceAll(r,"").length>0?".".concat(t):g},p=f.slice();p.push(function(g){g.type===nl&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(y9,r).replace(n,d))}),u.prefix&&p.push(VC),p.push(KC);var v=function(g,b,x,D){b===void 0&&(b=""),x===void 0&&(x=""),D===void 0&&(D="&"),t=D,r=b,n=new RegExp("\\".concat(r,"\\b"),"g");var m=g.replace(x9,""),S=LC(x||b?"".concat(x," ").concat(b," { ").concat(m," }"):m);u.namespace&&(S=jg(S,u.namespace));var F=[];return Rs(S,qC(p.concat(WC(function(B){return F.push(B)})))),F};return v.hash=f.length?f.reduce(function(g,b){return b.name||Ei(15),la(g,b.name)},Ng).toString():"",v}var C9=new zg,B0=w9(),_g=_e.createContext({shouldForwardProp:void 0,styleSheet:C9,stylis:B0});_g.Consumer;_e.createContext(void 0);function z1(){return $o(_g)}var Lg=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=B0);var u=n.name+a.hash;o.hasNameForId(n.id,u)||o.insertRules(n.id,u,a(n.rules,u,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,Rc(this,function(){throw Ei(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=B0),this.name+t.hash},e})(),D9=function(e){return e>="A"&&e<="Z"};function j1(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;D9(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Hg=function(e){return e==null||e===!1||e===""},Kg=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!Hg(a)&&(Array.isArray(a)&&a.isCss||Ca(a)?n.push("".concat(j1(o),":"),a,";"):hi(a)?n.push.apply(n,fi(fi(["".concat(o," {")],Kg(a),!1),["}"],!1)):n.push("".concat(j1(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in UC||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function qo(e,t,r,n){if(Hg(e))return[];if(Tc(e))return[".".concat(e.styledComponentId)];if(Ca(e)){if(!Ca(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return qo(o,t,r,n)}var a;return e instanceof Lg?r?(e.inject(r,n),[e.getName(n)]):[e]:hi(e)?Kg(e):Array.isArray(e)?Array.prototype.concat.apply(ll,e.map(function(u){return qo(u,t,r,n)})):[e.toString()]}function E9(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ca(r)&&!Tc(r))return!1}return!0}var k9=$g(sl),S9=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&E9(t),this.componentId=r,this.baseHash=la(k9,r),this.baseStyle=n,zg.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=zo(o,this.staticRulesId);else{var a=S0(qo(this.rules,t,r,n)),u=k0(la(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,u)){var l=n(a,".".concat(u),void 0,this.componentId);r.insertRules(this.componentId,u,l)}o=zo(o,u),this.staticRulesId=u}else{for(var f=la(this.baseHash,n.hash),d="",p=0;p<this.rules.length;p++){var v=this.rules[p];if(typeof v=="string")d+=v;else if(v){var g=S0(qo(v,t,r,n));f=la(f,g+p),d+=g}}if(d){var b=k0(f>>>0);r.hasNameForId(this.componentId,b)||r.insertRules(this.componentId,b,n(d,".".concat(b),void 0,this.componentId)),o=zo(o,b)}}return o},e})(),qg=_e.createContext(void 0);qg.Consumer;var Su={};function A9(e,t,r){var n=Tc(e),o=e,a=!ku(e),u=t.attrs,l=u===void 0?ll:u,f=t.componentId,d=f===void 0?(function(O,A){var P=typeof O!="string"?"sc":$1(O);Su[P]=(Su[P]||0)+1;var T="".concat(P,"-").concat(Mg(sl+P+Su[P]));return A?"".concat(A,"-").concat(T):T})(t.displayName,t.parentComponentId):f,p=t.displayName,v=p===void 0?(function(O){return ku(O)?"styled.".concat(O):"Styled(".concat(QC(O),")")})(e):p,g=t.displayName&&t.componentId?"".concat($1(t.displayName),"-").concat(t.componentId):t.componentId||d,b=n&&o.attrs?o.attrs.concat(l).filter(Boolean):l,x=t.shouldForwardProp;if(n&&o.shouldForwardProp){var D=o.shouldForwardProp;if(t.shouldForwardProp){var m=t.shouldForwardProp;x=function(O,A){return D(O,A)&&m(O,A)}}else x=D}var S=new S9(r,g,n?o.componentStyle:void 0);function F(O,A){return(function(P,T,_){var M=P.attrs,q=P.componentStyle,L=P.defaultProps,Y=P.foldedComponentIds,V=P.styledComponentId,z=P.target,K=_e.useContext(qg),X=z1(),W=P.shouldForwardProp||X.shouldForwardProp,J=YC(T,K,L)||wa,R=(function(ke,Z,he){for(var se,te=vn(vn({},Z),{className:void 0,theme:he}),ce=0;ce<ke.length;ce+=1){var Ce=Ca(se=ke[ce])?se(te):se;for(var we in Ce)te[we]=we==="className"?zo(te[we],Ce[we]):we==="style"?vn(vn({},te[we]),Ce[we]):Ce[we]}return Z.className&&(te.className=zo(te.className,Z.className)),te})(M,T,J),ie=R.as||z,me={};for(var xe in R)R[xe]===void 0||xe[0]==="$"||xe==="as"||xe==="theme"&&R.theme===J||(xe==="forwardedAs"?me.as=R.forwardedAs:W&&!W(xe,ie)||(me[xe]=R[xe]));var ge=(function(ke,Z){var he=z1(),se=ke.generateAndInjectStyles(Z,he.styleSheet,he.stylis);return se})(q,R),ae=zo(Y,V);return ge&&(ae+=" "+ge),R.className&&(ae+=" "+R.className),me[ku(ie)&&!Fg.has(ie)?"class":"className"]=ae,_&&(me.ref=_),ds(ie,me)})(B,O,A)}F.displayName=v;var B=_e.forwardRef(F);return B.attrs=b,B.componentStyle=S,B.displayName=v,B.shouldForwardProp=x,B.foldedComponentIds=n?zo(o.foldedComponentIds,o.styledComponentId):"",B.styledComponentId=g,B.target=n?o.target:e,Object.defineProperty(B,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(O){this._foldedDefaultProps=n?(function(A){for(var P=[],T=1;T<arguments.length;T++)P[T-1]=arguments[T];for(var _=0,M=P;_<M.length;_++)A0(A,M[_],!0);return A})({},o.defaultProps,O):O}}),Rc(B,function(){return".".concat(B.styledComponentId)}),a&&Ig(B,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),B}function _1(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 L1=function(e){return Object.assign(e,{isCss:!0})};function ul(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Ca(e)||hi(e))return L1(qo(_1(ll,fi([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?qo(n):L1(qo(_1(n,t)))}function F0(e,t,r){if(r===void 0&&(r=wa),!t)throw Ei(1,t);var n=function(o){for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];return e(t,r,ul.apply(void 0,fi([o],a,!1)))};return n.attrs=function(o){return F0(e,t,vn(vn({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return F0(e,t,vn(vn({},r),o))},n}var Wg=function(e){return F0(A9,e)},Ve=Wg;Fg.forEach(function(e){Ve[e]=Wg(e)});function Vg(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=S0(ul.apply(void 0,fi([e],t,!1))),o=Mg(n);return new Lg(o,n)}const B9=Ve.span.attrs({className:"unified-rich-text-template-container"})`
|
|
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 u,l,f,d;const t=((l=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:l.padding)||"2px 6px",r=((d=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:d.fontSize)||"14px",n=t.split(" ").map(p=>parseInt(p)),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
|
-
`,F9=Ve.input.attrs({className:"unified-rich-text-template-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 d,p,v,g;const t=e.$value.length;if(t===0)return((p=(d=e.$styles)==null?void 0:d.templateField)==null?void 0:p.minWidth)||"120px";const r=((g=(v=e.$styles)==null?void 0:v.templateField)==null?void 0:g.padding)||"2px 6.2px",n=r.split(" ").map(b=>parseInt(b)),o=n.length===2?n[1]:n[0],a=12.5,u=20,l=t*a+o*2+u,f=Math.min(Math.max(l,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:a,bufferSpace:u,calculatedWidth:l,maxWidth:e.$maxWidth,finalWidth:f,inputValue:e.$value}),f+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
217
|
-
height: ${e=>{var u,l,f,d;const t=((l=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:l.padding)||"2px 6px",r=((d=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:d.fontSize)||"14px",n=t.split(" ").map(p=>parseInt(p)),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
|
-
`,Ug=No(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var P,T,_,M,q,L,Y,V,z,K,X,W;const u=sg(),[l,f]=Ot(!1),[d,p]=Ot(e.value||""),[v,g]=Ot(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[b,x]=Ot(600),D=Lt(null),m=St(()=>{try{const J=document.querySelector('[data-slate-editor="true"]');if(J){const R=J.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||J.parentElement;if(R){const ie=R.clientWidth,me=ie-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",ie,"\u53EF\u7528\u5BBD\u5EA6:",me),Math.max(me,200)}}return 600}catch(J){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",J),600}},[]);er(()=>{g(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const J=m();x(J)},[e.value,e.placeholder,m]);const S=St(()=>{f(!0),p(e.value||""),setTimeout(()=>{D.current&&(D.current.focus(),D.current.select())},0)},[e.value]),F=St(J=>{const R=J.target.value;p(R)},[]),B=St(()=>{const J=Re.findPath(u,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",J),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",d),We.setNodes(u,{value:d},{at:J});const R=d.trim()!==""?d:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";g(R);const ie=u.children[J[0]];if(ie&&"children"in ie){const me=ie.children[J[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",me)}f(!1)},[u,e,d]),O=St(()=>{B()},[B]),A=St(J=>{J.key==="Enter"?(J.preventDefault(),B()):J.key==="Escape"&&(J.preventDefault(),p(e.value||""),f(!1))},[B,e.value]);return l?U.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[U.jsx(F9,{ref:D,value:d,onChange:F,onBlur:O,onKeyDown:A,placeholder:"",$styles:n,$value:d,$maxWidth:b,style:{backgroundColor:"white",color:((P=n==null?void 0:n.templateField)==null?void 0:P.textColor)||"#055AFF",border:`2px solid ${((T=n==null?void 0:n.templateField)==null?void 0:T.borderColor)||"#84ADFF"}`,minWidth:((_=n==null?void 0:n.templateField)==null?void 0:_.minWidth)||"120px"}}),r]}):U.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[U.jsxs(B9,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:v.length,onClick:S,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(M=n==null?void 0:n.templateField)==null?void 0:M.backgroundColor,borderColor:(q=n==null?void 0:n.templateField)==null?void 0:q.borderColor,borderRadius:(L=n==null?void 0:n.templateField)==null?void 0:L.borderRadius,padding:(Y=n==null?void 0:n.templateField)==null?void 0:Y.padding,margin:(V=n==null?void 0:n.templateField)==null?void 0:V.margin,fontSize:(z=n==null?void 0:n.templateField)==null?void 0:z.fontSize,fontWeight:(K=n==null?void 0:n.templateField)==null?void 0:K.fontWeight,minWidth:(X=n==null?void 0:n.templateField)==null?void 0:X.minWidth,color:(W=n==null?void 0:n.templateField)==null?void 0:W.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:v,displayValueLength:v.length,contentLength:v.length}),null),v]}),U.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});Ug.displayName="TemplateField";const N9=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return U.jsxs("div",{...t,className:"think-container",children:[U.jsx("div",{className:"think-indicator"}),U.jsx("div",{className:"think-content py-2",children:U.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})})]})},Xg=_e.forwardRef(({attributes:e,element:t,eventsEmit:r,dataSource:n,tagIndex:o},a)=>{var O;const[u,l]=Ot(null),[f,d]=Ot(!0),[p,v]=Ot(1),[g,b]=Ot(10);er(()=>{if(!u){if(!n){d(!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=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",A);let P=null,T=null,_;for(const L of A){const Y=L==null?void 0:L.reply;if(!(Y!=null&&Y.databaseReference))continue;const V=Y.databaseReference;console.log(V,"123123123jk123lk12j3l12jl3"),V!=null&&V.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",V.retrieveSqlData.filePath),_=V.retrieveSqlData.filePath);let z=V;if(typeof V=="string")try{z=JSON.parse(V)}catch{}if(!z)continue;const K=Array.isArray(z)?z:[z],X=K.findIndex(R=>(R==null?void 0:R.id)===t.id),W=X>=0?K[X]:null;if(console.log("~~~~~~~~~~~~~~~",W),W){P=W,T=W.retrieveSqlData||W.retrieve_table_data||W.retrieveTableData;break}const J=K.find(R=>{var ie,me;return(((me=(ie=R==null?void 0:R.retrieveSqlData)==null?void 0:ie.preData)==null?void 0:me.length)||0)>0});!P&&J&&(P=J,T=J.retrieveSqlData||J.retrieve_table_data||J.retrieveTableData)}if(!P||!T){console.warn("No databaseReference with preData found for id:",t.id),d(!1);return}const M=Array.isArray(T==null?void 0:T.preData)?T.preData[0]:null;if(!M){console.warn("Matched item has no preData"),d(!1);return}const q={columns:(M.columns||[]).map(L=>({key:L.key,title:L.title})),rows:M.data||M.rows||[],total:(T==null?void 0:T.total)||0,fetchUrl:(T==null?void 0:T.fetchUrl)||"/index/knowledgeBase/file/stream",source:_||(T==null?void 0:T.source)||(P==null?void 0:P.source)};l(q),d(!1)}catch(A){console.error("Init preData parsing failed:",A),d(!1)}}},[t.id,u,n]),er(()=>{const A=P=>{try{const T=(P==null?void 0:P.detail)||{},_=T==null?void 0:T.id;if(!_||String(_)!==String(t.id))return;const M=T.databaseReference;if(!M)return;let q=M;if(typeof M=="string")try{q=JSON.parse(M)}catch{}if(!q)return;const L=Array.isArray(q)?q:[q],Y=L.findIndex(W=>String(W==null?void 0:W.id)===String(t.id)),V=Y>=0?L[Y]:null;if(!V)return;const z=(V==null?void 0:V.retrieveSqlData)||(V==null?void 0:V.retrieve_table_data)||(V==null?void 0:V.retrieveTableData),K=Array.isArray(z==null?void 0:z.preData)?z.preData[0]:null;if(!K)return;const X={columns:(K.columns||[]).map(W=>({key:W.key,title:W.title})),rows:K.data||K.rows||[],total:(z==null?void 0:z.total)||0,fetchUrl:(z==null?void 0:z.fetchUrl)||"/index/knowledgeBase/file/stream",source:(V==null?void 0:V.source)||(z==null?void 0:z.source)};l(X),d(!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]);const x=A=>{if(!A||A.length===0)return[];const P=A.find(T=>T&&typeof T=="object")||{};return Object.keys(P).map(T=>({key:T,title:T}))},D=(A,P)=>{v(A),P&&b(P);const T=_=>{let M=null;if(_&&Array.isArray(_.columns)&&Array.isArray(_.rows))M={columns:_.columns,rows:_.rows,total:Number(_.total)||0,fetchUrl:_.fetchUrl||(u==null?void 0:u.fetchUrl)||"",source:_.source||(u==null?void 0:u.source)};else if(_&&Array.isArray(_.data)){const q=_.data;M={columns:u!=null&&u.columns&&u.columns.length>0?u.columns:x(q),rows:q,total:Number(_.totalCount??_.total??(u==null?void 0:u.total)??q.length)||0,fetchUrl:(u==null?void 0:u.fetchUrl)||"",source:u==null?void 0:u.source},typeof _.currentPage=="number"&&v(_.currentPage),typeof _.pageSize=="number"&&b(_.pageSize)}else if(Array.isArray(_)){const q=_;M={columns:u!=null&&u.columns&&u.columns.length>0?u.columns:x(q),rows:q,total:Number((u==null?void 0:u.total)??q.length)||0,fetchUrl:(u==null?void 0:u.fetchUrl)||"",source:u==null?void 0:u.source}}if(!M){console.warn("replacePredataFunction received unsupported data format:",_);return}console.log("Replacing table data with:",M),l(M)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:A,pageSize:P||g,fetchUrl:u==null?void 0:u.fetchUrl,total:u==null?void 0:u.total,source:u==null?void 0:u.source,replacePredataFunction:T})},m=A=>u!=null&&u.rows?Math.max(...u.rows.map(P=>{const T=P[A];return T?String(T).length:0})):0,S=(((O=u==null?void 0:u.columns)==null?void 0:O.length)||0)===1,F=(u==null?void 0:u.columns.map((A,P)=>({title:A.title||A.key,dataIndex:A.key,key:A.key,render:T=>{const _=T==null||T===""?"-":T;return S?U.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(_)}):_},...S?{width:void 0}:{}})))||[],B=(u==null?void 0:u.rows.map((A,P)=>({key:P,...A})))||[];return U.jsx("div",{...e,ref:a,className:"retrieve-sql-data-container my-4",children:f?U.jsxs("div",{className:"flex items-center justify-center py-8",children:[U.jsx(vp,{size:"large"}),U.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):u?U.jsxs("div",{className:"retrieve-sql-data-content",children:[o!==null&&(()=>{const A=String(o).length;let P="12px",T="24px",_="24px";return A===2?(P="9px",T="22px",_="24px"):A===3?(P="8px",T="24px",_="24px"):A>=4&&(P="8px",T="24px",_="30px"),U.jsxs("div",{className:"mb-2 flex items-center",children:[U.jsx("span",{className:"bg-orange-100 text-orange-600 rounded font-medium flex items-center justify-center",style:{width:T,height:T,minWidth:_,fontSize:P,lineHeight:1},children:o}),U.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]})})(),U.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:U.jsx(ho,{columns:F.map((A,P)=>({...A,...S?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:P===0?160:void 0,minWidth:120,maxWidth:P===0?180:300,fixed:P===0?"left":void 0,ellipsis:{showTitle:!0}},render:T=>{if(T==null)return"-";const _=String(T);if(S)return U.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:_,children:_});const M=m(A.key);let q="200px";return P===0?q="80px":M<=8?q="100px":M<=15?q="150px":M<=25?q="200px":M<=40?q="250px":q="300px",U.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:q,display:"inline-block",cursor:"default"},title:_,children:_})}})),dataSource:B,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:S?"100%":"1000px"},scroll:{x:S?void 0:"max-content",y:400}})}),u.total>g&&U.jsx("div",{className:"flex justify-center mt-3",children:U.jsx(bp,{current:p,pageSize:g,total:u.total,onChange:D,onShowSizeChange:D,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):U.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});Xg.displayName="RetrieveSqlDataElement";var cs={exports:{}},Au={exports:{}},Bu,H1;function $9(){if(H1)return Bu;H1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bu=e,Bu}var Fu,K1;function M9(){if(K1)return Fu;K1=1;var e=$9();function t(){}function r(){}return r.resetWarningCache=t,Fu=function(){function n(u,l,f,d,p,v){if(v!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}n.isRequired=n;function o(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Fu}var q1;function O9(){return q1||(q1=1,Au.exports=M9()()),Au.exports}var N0={exports:{}},T9=N0.exports,W1;function R9(){return W1||(W1=1,(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:T9,function(){return(function(){var r={};(function(){r.d=function(s,i){for(var c in i)r.o(i,c)&&!r.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:i[c]})}})(),(function(){r.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)}})();var n={};r.d(n,{default:function(){return W4}});class o{constructor(i,c){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let h="KaTeX parse error: "+i,y,k;const N=c&&c.loc;if(N&&N.start<=N.end){const G=N.lexer.input;y=N.start,k=N.end,y===G.length?h+=" at end of input: ":h+=" at position "+(y+1)+": ";const re=G.slice(y,k).replace(/[^]/g,"$&\u0332");let pe;y>15?pe="\u2026"+G.slice(y-15,y):pe=G.slice(0,y);let ye;k+15<G.length?ye=G.slice(k,k+15)+"\u2026":ye=G.slice(k),h+=pe+re+ye}const j=new Error(h);return j.name="ParseError",j.__proto__=o.prototype,j.position=y,y!=null&&k!=null&&(j.length=k-y),j.rawMessage=i,j}}o.prototype.__proto__=Error.prototype;var a=o;const u=function(s,i){return s===void 0?i:s},l=/([A-Z])/g,f=function(s){return s.replace(l,"-$1").toLowerCase()},d={"&":"&",">":">","<":"<",'"':""","'":"'"},p=/[&><"']/g;function v(s){return String(s).replace(p,i=>d[i])}const g=function(s){return s.type==="ordgroup"||s.type==="color"?s.body.length===1?g(s.body[0]):s:s.type==="font"?g(s.body):s},b=function(s){const i=g(s);return i.type==="mathord"||i.type==="textord"||i.type==="atom"},x=function(s){if(!s)throw new Error("Expected non-null, but got "+String(s));return s};var D={deflt:u,escape:v,hyphenate:f,getBaseElem:g,isCharacterBox:b,protocolFromUrl:function(s){const i=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(s);return i?i[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(i[1])?null:i[1].toLowerCase():"_relative"}};const m={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:s=>"#"+s},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(s,i)=>(i.push(s),i)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:s=>Math.max(0,s),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:s=>Math.max(0,s),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:s=>Math.max(0,s),cli:"-e, --max-expand <n>",cliProcessor:s=>s==="Infinity"?1/0:parseInt(s)},globalGroup:{type:"boolean",cli:!1}};function S(s){if(s.default)return s.default;const i=s.type,c=Array.isArray(i)?i[0]:i;if(typeof c!="string")return c.enum[0];switch(c){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class F{constructor(i){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,i=i||{};for(const c in m)if(m.hasOwnProperty(c)){const h=m[c];this[c]=i[c]!==void 0?h.processor?h.processor(i[c]):i[c]:S(h)}}reportNonstrict(i,c,h){let y=this.strict;if(typeof y=="function"&&(y=y(i,c,h)),!(!y||y==="ignore")){if(y===!0||y==="error")throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+(c+" ["+i+"]"),h);y==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(c+" ["+i+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+y+"': "+c+" ["+i+"]"))}}useStrictBehavior(i,c,h){let y=this.strict;if(typeof y=="function")try{y=y(i,c,h)}catch{y="error"}return!y||y==="ignore"?!1:y===!0||y==="error"?!0:y==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(c+" ["+i+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+y+"': "+c+" ["+i+"]")),!1)}isTrusted(i){if(i.url&&!i.protocol){const c=D.protocolFromUrl(i.url);if(c==null)return!1;i.protocol=c}return!!(typeof this.trust=="function"?this.trust(i):this.trust)}}class B{constructor(i,c,h){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=i,this.size=c,this.cramped=h}sup(){return Y[V[this.id]]}sub(){return Y[z[this.id]]}fracNum(){return Y[K[this.id]]}fracDen(){return Y[X[this.id]]}cramp(){return Y[W[this.id]]}text(){return Y[J[this.id]]}isTight(){return this.size>=2}}const O=0,A=1,P=2,T=3,_=4,M=5,q=6,L=7,Y=[new B(O,0,!1),new B(A,0,!0),new B(P,1,!1),new B(T,1,!0),new B(_,2,!1),new B(M,2,!0),new B(q,3,!1),new B(L,3,!0)],V=[_,M,_,M,q,L,q,L],z=[M,M,M,M,L,L,L,L],K=[P,T,_,M,q,L,q,L],X=[T,T,M,M,L,L,L,L],W=[A,A,T,T,M,M,L,L],J=[O,A,P,T,P,T,P,T];var R={DISPLAY:Y[O],TEXT:Y[P],SCRIPT:Y[_],SCRIPTSCRIPT:Y[q]};const ie=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function me(s){for(let i=0;i<ie.length;i++){const c=ie[i];for(let h=0;h<c.blocks.length;h++){const y=c.blocks[h];if(s>=y[0]&&s<=y[1])return c.name}}return null}const xe=[];ie.forEach(s=>s.blocks.forEach(i=>xe.push(...i)));function ge(s){for(let i=0;i<xe.length;i+=2)if(s>=xe[i]&&s<=xe[i+1])return!0;return!1}const ae=80,ke=function(s,i){return"M95,"+(622+s+i)+`
|
|
233
|
-
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
234
|
-
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
235
|
-
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
236
|
-
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
237
|
-
c69,-144,104.5,-217.7,106.5,-221
|
|
238
|
-
l`+s/2.075+" -"+s+`
|
|
239
|
-
c5.3,-9.3,12,-14,20,-14
|
|
240
|
-
H400000v`+(40+s)+`H845.2724
|
|
241
|
-
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
242
|
-
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
243
|
-
M`+(834+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},Z=function(s,i){return"M263,"+(601+s+i)+`c0.7,0,18,39.7,52,119
|
|
244
|
-
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
245
|
-
c340,-704.7,510.7,-1060.3,512,-1067
|
|
246
|
-
l`+s/2.084+" -"+s+`
|
|
247
|
-
c4.7,-7.3,11,-11,19,-11
|
|
248
|
-
H40000v`+(40+s)+`H1012.3
|
|
249
|
-
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
250
|
-
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
251
|
-
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
252
|
-
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
253
|
-
M`+(1001+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},he=function(s,i){return"M983 "+(10+s+i)+`
|
|
254
|
-
l`+s/3.13+" -"+s+`
|
|
255
|
-
c4,-6.7,10,-10,18,-10 H400000v`+(40+s)+`
|
|
256
|
-
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
257
|
-
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
258
|
-
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
259
|
-
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
260
|
-
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
261
|
-
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
262
|
-
M`+(1001+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},se=function(s,i){return"M424,"+(2398+s+i)+`
|
|
263
|
-
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
264
|
-
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
265
|
-
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
266
|
-
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
267
|
-
l`+s/4.223+" -"+s+`c4,-6.7,10,-10,18,-10 H400000
|
|
268
|
-
v`+(40+s)+`H1014.6
|
|
269
|
-
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
270
|
-
c-2,6,-10,9,-24,9
|
|
271
|
-
c-8,0,-12,-0.7,-12,-2z M`+(1001+s)+" "+i+`
|
|
272
|
-
h400000v`+(40+s)+"h-400000z"},te=function(s,i){return"M473,"+(2713+s+i)+`
|
|
273
|
-
c339.3,-1799.3,509.3,-2700,510,-2702 l`+s/5.298+" -"+s+`
|
|
274
|
-
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+s)+`H1017.7
|
|
275
|
-
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
276
|
-
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
277
|
-
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
278
|
-
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
279
|
-
606zM`+(1001+s)+" "+i+"h400000v"+(40+s)+"H1017.7z"},ce=function(s){const i=s/2;return"M400000 "+s+" H0 L"+i+" 0 l65 45 L145 "+(s-80)+" H400000z"},Ce=function(s,i,c){const h=c-54-i-s;return"M702 "+(s+i)+"H400000"+(40+s)+`
|
|
280
|
-
H742v`+h+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
281
|
-
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
282
|
-
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
283
|
-
219 661 l218 661zM702 `+i+"H400000v"+(40+s)+"H742z"},we=function(s,i,c){i=1e3*i;let h="";switch(s){case"sqrtMain":h=ke(i,ae);break;case"sqrtSize1":h=Z(i,ae);break;case"sqrtSize2":h=he(i,ae);break;case"sqrtSize3":h=se(i,ae);break;case"sqrtSize4":h=te(i,ae);break;case"sqrtTall":h=Ce(i,ae,c)}return h},Se=function(s,i){switch(s){case"\u239C":return"M291 0 H417 V"+i+" H291z M291 0 H417 V"+i+" H291z";case"\u2223":return"M145 0 H188 V"+i+" H145z M145 0 H188 V"+i+" H145z";case"\u2225":return"M145 0 H188 V"+i+" H145z M145 0 H188 V"+i+" H145z"+("M367 0 H410 V"+i+" H367z M367 0 H410 V"+i+" H367z");case"\u239F":return"M457 0 H583 V"+i+" H457z M457 0 H583 V"+i+" H457z";case"\u23A2":return"M319 0 H403 V"+i+" H319z M319 0 H403 V"+i+" H319z";case"\u23A5":return"M263 0 H347 V"+i+" H263z M263 0 H347 V"+i+" H263z";case"\u23AA":return"M384 0 H504 V"+i+" H384z M384 0 H504 V"+i+" H384z";case"\u23D0":return"M312 0 H355 V"+i+" H312z M312 0 H355 V"+i+" H312z";case"\u2016":return"M257 0 H300 V"+i+" H257z M257 0 H300 V"+i+" H257z"+("M478 0 H521 V"+i+" H478z M478 0 H521 V"+i+" H478z");default:return""}},Ee={doubleleftarrow:`M262 157
|
|
284
|
-
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
285
|
-
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
286
|
-
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
287
|
-
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
288
|
-
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
289
|
-
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
290
|
-
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
291
|
-
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
292
|
-
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
293
|
-
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
294
|
-
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
295
|
-
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
296
|
-
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
297
|
-
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
298
|
-
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
299
|
-
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
300
|
-
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
301
|
-
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
302
|
-
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
303
|
-
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
304
|
-
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
305
|
-
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
306
|
-
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
307
|
-
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
308
|
-
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
309
|
-
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
310
|
-
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
311
|
-
435 0h399565z`,leftgroupunder:`M400000 262
|
|
312
|
-
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
313
|
-
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
314
|
-
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
315
|
-
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
316
|
-
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
317
|
-
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
318
|
-
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
319
|
-
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
320
|
-
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
321
|
-
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
322
|
-
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
323
|
-
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
324
|
-
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
325
|
-
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
326
|
-
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
327
|
-
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
328
|
-
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
329
|
-
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
330
|
-
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
331
|
-
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
332
|
-
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
333
|
-
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
334
|
-
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
335
|
-
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
336
|
-
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
337
|
-
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
338
|
-
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
339
|
-
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
340
|
-
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
341
|
-
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
342
|
-
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
343
|
-
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
344
|
-
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
345
|
-
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
346
|
-
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
347
|
-
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
348
|
-
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
349
|
-
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
350
|
-
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
351
|
-
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
352
|
-
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
353
|
-
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
354
|
-
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
355
|
-
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
356
|
-
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
357
|
-
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
358
|
-
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
359
|
-
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
360
|
-
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
361
|
-
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
362
|
-
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
363
|
-
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
364
|
-
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
365
|
-
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
366
|
-
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
367
|
-
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
368
|
-
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
369
|
-
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
370
|
-
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
371
|
-
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
372
|
-
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
373
|
-
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
374
|
-
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
375
|
-
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
376
|
-
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
377
|
-
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
378
|
-
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
379
|
-
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
380
|
-
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
381
|
-
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
382
|
-
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
383
|
-
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
384
|
-
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
385
|
-
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
386
|
-
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
387
|
-
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
388
|
-
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
389
|
-
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
390
|
-
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
391
|
-
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
392
|
-
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
393
|
-
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
394
|
-
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
395
|
-
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
396
|
-
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
397
|
-
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
398
|
-
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
399
|
-
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
400
|
-
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
401
|
-
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
402
|
-
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
403
|
-
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
404
|
-
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
405
|
-
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
406
|
-
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
407
|
-
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
408
|
-
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
409
|
-
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
410
|
-
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
411
|
-
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
412
|
-
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
413
|
-
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
414
|
-
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
415
|
-
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
416
|
-
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
417
|
-
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
418
|
-
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
419
|
-
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
420
|
-
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
421
|
-
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
422
|
-
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
423
|
-
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
424
|
-
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
425
|
-
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
426
|
-
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
427
|
-
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
428
|
-
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
429
|
-
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
430
|
-
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
431
|
-
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
432
|
-
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
433
|
-
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
434
|
-
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
435
|
-
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
436
|
-
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
437
|
-
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
438
|
-
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
439
|
-
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
440
|
-
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
441
|
-
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
442
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
443
|
-
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
444
|
-
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
445
|
-
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
446
|
-
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
447
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
448
|
-
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
449
|
-
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
450
|
-
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
451
|
-
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
452
|
-
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
453
|
-
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
454
|
-
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
455
|
-
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
456
|
-
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
457
|
-
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
458
|
-
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ae=function(s,i){switch(s){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+i+` v1759 h347 v-84
|
|
459
|
-
H403z M403 1759 V0 H319 V1759 v`+i+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+i+` v1759 H0 v84 H347z
|
|
460
|
-
M347 1759 V0 H263 V1759 v`+i+" v1759 h84z";case"vert":return"M145 15 v585 v"+i+` v585 c2.667,10,9.667,15,21,15
|
|
461
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
462
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+i+" v585 h43z";case"doublevert":return"M145 15 v585 v"+i+` v585 c2.667,10,9.667,15,21,15
|
|
463
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
464
|
-
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+i+` v585 h43z
|
|
465
|
-
M367 15 v585 v`+i+` v585 c2.667,10,9.667,15,21,15
|
|
466
|
-
c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
467
|
-
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+i+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+i+` v1715 h263 v84 H319z
|
|
468
|
-
MM319 602 V0 H403 V602 v`+i+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+i+` v1799 H0 v-84 H319z
|
|
469
|
-
MM319 602 V0 H403 V602 v`+i+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+i+` v602 h84z
|
|
470
|
-
M403 1759 V0 H319 V1759 v`+i+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+i+` v602 h84z
|
|
471
|
-
M347 1759 V0 h-84 V1759 v`+i+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
472
|
-
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
473
|
-
-36,557 l0,`+(i+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
474
|
-
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
475
|
-
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
476
|
-
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
477
|
-
l0,-`+(i+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
478
|
-
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
479
|
-
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
480
|
-
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(i+9)+`
|
|
481
|
-
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
482
|
-
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
483
|
-
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
484
|
-
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
485
|
-
l0,-`+(i+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
486
|
-
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};var $e={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const Te={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},He={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function pt(s,i){$e[s]=i}function at(s,i,c){if(!$e[i])throw new Error("Font metrics not found for font: "+i+".");let h=s.charCodeAt(0),y=$e[i][h];if(!y&&s[0]in He&&(h=He[s[0]].charCodeAt(0),y=$e[i][h]),!y&&c==="text"&&ge(h)&&(y=$e[i][77]),y)return{depth:y[0],height:y[1],italic:y[2],skew:y[3],width:y[4]}}const Me={};function Le(s){let i;if(s>=5?i=0:s>=3?i=1:i=2,!Me[i]){const c=Me[i]={cssEmPerMu:Te.quad[i]/18};for(const h in Te)Te.hasOwnProperty(h)&&(c[h]=Te[h][i])}return Me[i]}const Xe=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],ft=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],it=function(s,i){return i.size<2?s:Xe[s-1][i.size-1]};class et{constructor(i){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=i.style,this.color=i.color,this.size=i.size||et.BASESIZE,this.textSize=i.textSize||this.size,this.phantom=!!i.phantom,this.font=i.font||"",this.fontFamily=i.fontFamily||"",this.fontWeight=i.fontWeight||"",this.fontShape=i.fontShape||"",this.sizeMultiplier=ft[this.size-1],this.maxSize=i.maxSize,this.minRuleThickness=i.minRuleThickness,this._fontMetrics=void 0}extend(i){const c={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const h in i)i.hasOwnProperty(h)&&(c[h]=i[h]);return new et(c)}havingStyle(i){return this.style===i?this:this.extend({style:i,size:it(this.textSize,i)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(i){return this.size===i&&this.textSize===i?this:this.extend({style:this.style.text(),size:i,textSize:i,sizeMultiplier:ft[i-1]})}havingBaseStyle(i){i=i||this.style.text();const c=it(et.BASESIZE,i);return this.size===c&&this.textSize===et.BASESIZE&&this.style===i?this:this.extend({style:i,size:c})}havingBaseSizing(){let i;switch(this.style.id){case 4:case 5:i=3;break;case 6:case 7:i=1;break;default:i=6}return this.extend({style:this.style.text(),size:i})}withColor(i){return this.extend({color:i})}withPhantom(){return this.extend({phantom:!0})}withFont(i){return this.extend({font:i})}withTextFontFamily(i){return this.extend({fontFamily:i,font:""})}withTextFontWeight(i){return this.extend({fontWeight:i,font:""})}withTextFontShape(i){return this.extend({fontShape:i,font:""})}sizingClasses(i){return i.size!==this.size?["sizing","reset-size"+i.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==et.BASESIZE?["sizing","reset-size"+this.size,"size"+et.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Le(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}et.BASESIZE=6;var $t=et;const Dt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},vt={ex:!0,em:!0,mu:!0},ht=function(s){return typeof s!="string"&&(s=s.unit),s in Dt||s in vt||s==="ex"},Pe=function(s,i){let c;if(s.unit in Dt)c=Dt[s.unit]/i.fontMetrics().ptPerEm/i.sizeMultiplier;else if(s.unit==="mu")c=i.fontMetrics().cssEmPerMu;else{let h;if(i.style.isTight()?h=i.havingStyle(i.style.text()):h=i,s.unit==="ex")c=h.fontMetrics().xHeight;else if(s.unit==="em")c=h.fontMetrics().quad;else throw new a("Invalid unit: '"+s.unit+"'");h!==i&&(c*=h.sizeMultiplier/i.sizeMultiplier)}return Math.min(s.number*c,i.maxSize)},de=function(s){return+s.toFixed(4)+"em"},bt=function(s){return s.filter(i=>i).join(" ")},kt=function(s,i,c){if(this.classes=s||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=c||{},i){i.style.isTight()&&this.classes.push("mtight");const h=i.getColor();h&&(this.style.color=h)}},Ft=function(s){const i=document.createElement(s);i.className=bt(this.classes);for(const c in this.style)this.style.hasOwnProperty(c)&&(i.style[c]=this.style[c]);for(const c in this.attributes)this.attributes.hasOwnProperty(c)&&i.setAttribute(c,this.attributes[c]);for(let c=0;c<this.children.length;c++)i.appendChild(this.children[c].toNode());return i},Et=/[\s"'>/=\x00-\x1f]/,or=function(s){let i="<"+s;this.classes.length&&(i+=' class="'+D.escape(bt(this.classes))+'"');let c="";for(const h in this.style)this.style.hasOwnProperty(h)&&(c+=D.hyphenate(h)+":"+this.style[h]+";");c&&(i+=' style="'+D.escape(c)+'"');for(const h in this.attributes)if(this.attributes.hasOwnProperty(h)){if(Et.test(h))throw new a("Invalid attribute name '"+h+"'");i+=" "+h+'="'+D.escape(this.attributes[h])+'"'}i+=">";for(let h=0;h<this.children.length;h++)i+=this.children[h].toMarkup();return i+="</"+s+">",i};class At{constructor(i,c,h,y){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,kt.call(this,i,h,y),this.children=c||[]}setAttribute(i,c){this.attributes[i]=c}hasClass(i){return this.classes.includes(i)}toNode(){return Ft.call(this,"span")}toMarkup(){return or.call(this,"span")}}class Rt{constructor(i,c,h,y){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,kt.call(this,c,y),this.children=h||[],this.setAttribute("href",i)}setAttribute(i,c){this.attributes[i]=c}hasClass(i){return this.classes.includes(i)}toNode(){return Ft.call(this,"a")}toMarkup(){return or.call(this,"a")}}class tr{constructor(i,c,h){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=c,this.src=i,this.classes=["mord"],this.style=h}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createElement("img");i.src=this.src,i.alt=this.alt,i.className="mord";for(const c in this.style)this.style.hasOwnProperty(c)&&(i.style[c]=this.style[c]);return i}toMarkup(){let i='<img src="'+D.escape(this.src)+'"'+(' alt="'+D.escape(this.alt)+'"'),c="";for(const h in this.style)this.style.hasOwnProperty(h)&&(c+=D.hyphenate(h)+":"+this.style[h]+";");return c&&(i+=' style="'+D.escape(c)+'"'),i+="'/>",i}}const ur={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"};class Bt{constructor(i,c,h,y,k,N,j,G){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=i,this.height=c||0,this.depth=h||0,this.italic=y||0,this.skew=k||0,this.width=N||0,this.classes=j||[],this.style=G||{},this.maxFontSize=0;const re=me(this.text.charCodeAt(0));re&&this.classes.push(re+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ur[this.text])}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createTextNode(this.text);let c=null;this.italic>0&&(c=document.createElement("span"),c.style.marginRight=de(this.italic)),this.classes.length>0&&(c=c||document.createElement("span"),c.className=bt(this.classes));for(const h in this.style)this.style.hasOwnProperty(h)&&(c=c||document.createElement("span"),c.style[h]=this.style[h]);return c?(c.appendChild(i),c):i}toMarkup(){let i=!1,c="<span";this.classes.length&&(i=!0,c+=' class="',c+=D.escape(bt(this.classes)),c+='"');let h="";this.italic>0&&(h+="margin-right:"+this.italic+"em;");for(const k in this.style)this.style.hasOwnProperty(k)&&(h+=D.hyphenate(k)+":"+this.style[k]+";");h&&(i=!0,c+=' style="'+D.escape(h)+'"');const y=D.escape(this.text);return i?(c+=">",c+=y,c+="</span>",c):y}}class Ht{constructor(i,c){this.children=void 0,this.attributes=void 0,this.children=i||[],this.attributes=c||{}}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&i.setAttribute(c,this.attributes[c]);for(let c=0;c<this.children.length;c++)i.appendChild(this.children[c].toNode());return i}toMarkup(){let i='<svg xmlns="http://www.w3.org/2000/svg"';for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&(i+=" "+c+'="'+D.escape(this.attributes[c])+'"');i+=">";for(let c=0;c<this.children.length;c++)i+=this.children[c].toMarkup();return i+="</svg>",i}}class jt{constructor(i,c){this.pathName=void 0,this.alternate=void 0,this.pathName=i,this.alternate=c}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?i.setAttribute("d",this.alternate):i.setAttribute("d",Ee[this.pathName]),i}toMarkup(){return this.alternate?'<path d="'+D.escape(this.alternate)+'"/>':'<path d="'+D.escape(Ee[this.pathName])+'"/>'}}class Cr{constructor(i){this.attributes=void 0,this.attributes=i||{}}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","line");for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&i.setAttribute(c,this.attributes[c]);return i}toMarkup(){let i="<line";for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&(i+=" "+c+'="'+D.escape(this.attributes[c])+'"');return i+="/>",i}}function zr(s){if(s instanceof Bt)return s;throw new Error("Expected symbolNode but got "+String(s)+".")}function jr(s){if(s instanceof At)return s;throw new Error("Expected span<HtmlDomNode> but got "+String(s)+".")}const Tr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},vr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},pr={math:{},text:{}};var _t=pr;function w(s,i,c,h,y,k){pr[s][y]={font:i,group:c,replace:h},k&&h&&(pr[s][h]=pr[s][y])}const E="math",Ie="text",$="main",Q="ams",Zt="accent-token",nt="bin",Ke="close",wt="inner",tt="mathord",Mt="op-token",ar="open",$r="punct",ee="rel",br="spacing",oe="textord";w(E,$,ee,"\u2261","\\equiv",!0),w(E,$,ee,"\u227A","\\prec",!0),w(E,$,ee,"\u227B","\\succ",!0),w(E,$,ee,"\u223C","\\sim",!0),w(E,$,ee,"\u22A5","\\perp"),w(E,$,ee,"\u2AAF","\\preceq",!0),w(E,$,ee,"\u2AB0","\\succeq",!0),w(E,$,ee,"\u2243","\\simeq",!0),w(E,$,ee,"\u2223","\\mid",!0),w(E,$,ee,"\u226A","\\ll",!0),w(E,$,ee,"\u226B","\\gg",!0),w(E,$,ee,"\u224D","\\asymp",!0),w(E,$,ee,"\u2225","\\parallel"),w(E,$,ee,"\u22C8","\\bowtie",!0),w(E,$,ee,"\u2323","\\smile",!0),w(E,$,ee,"\u2291","\\sqsubseteq",!0),w(E,$,ee,"\u2292","\\sqsupseteq",!0),w(E,$,ee,"\u2250","\\doteq",!0),w(E,$,ee,"\u2322","\\frown",!0),w(E,$,ee,"\u220B","\\ni",!0),w(E,$,ee,"\u221D","\\propto",!0),w(E,$,ee,"\u22A2","\\vdash",!0),w(E,$,ee,"\u22A3","\\dashv",!0),w(E,$,ee,"\u220B","\\owns"),w(E,$,$r,".","\\ldotp"),w(E,$,$r,"\u22C5","\\cdotp"),w(E,$,oe,"#","\\#"),w(Ie,$,oe,"#","\\#"),w(E,$,oe,"&","\\&"),w(Ie,$,oe,"&","\\&"),w(E,$,oe,"\u2135","\\aleph",!0),w(E,$,oe,"\u2200","\\forall",!0),w(E,$,oe,"\u210F","\\hbar",!0),w(E,$,oe,"\u2203","\\exists",!0),w(E,$,oe,"\u2207","\\nabla",!0),w(E,$,oe,"\u266D","\\flat",!0),w(E,$,oe,"\u2113","\\ell",!0),w(E,$,oe,"\u266E","\\natural",!0),w(E,$,oe,"\u2663","\\clubsuit",!0),w(E,$,oe,"\u2118","\\wp",!0),w(E,$,oe,"\u266F","\\sharp",!0),w(E,$,oe,"\u2662","\\diamondsuit",!0),w(E,$,oe,"\u211C","\\Re",!0),w(E,$,oe,"\u2661","\\heartsuit",!0),w(E,$,oe,"\u2111","\\Im",!0),w(E,$,oe,"\u2660","\\spadesuit",!0),w(E,$,oe,"\xA7","\\S",!0),w(Ie,$,oe,"\xA7","\\S"),w(E,$,oe,"\xB6","\\P",!0),w(Ie,$,oe,"\xB6","\\P"),w(E,$,oe,"\u2020","\\dag"),w(Ie,$,oe,"\u2020","\\dag"),w(Ie,$,oe,"\u2020","\\textdagger"),w(E,$,oe,"\u2021","\\ddag"),w(Ie,$,oe,"\u2021","\\ddag"),w(Ie,$,oe,"\u2021","\\textdaggerdbl"),w(E,$,Ke,"\u23B1","\\rmoustache",!0),w(E,$,ar,"\u23B0","\\lmoustache",!0),w(E,$,Ke,"\u27EF","\\rgroup",!0),w(E,$,ar,"\u27EE","\\lgroup",!0),w(E,$,nt,"\u2213","\\mp",!0),w(E,$,nt,"\u2296","\\ominus",!0),w(E,$,nt,"\u228E","\\uplus",!0),w(E,$,nt,"\u2293","\\sqcap",!0),w(E,$,nt,"\u2217","\\ast"),w(E,$,nt,"\u2294","\\sqcup",!0),w(E,$,nt,"\u25EF","\\bigcirc",!0),w(E,$,nt,"\u2219","\\bullet",!0),w(E,$,nt,"\u2021","\\ddagger"),w(E,$,nt,"\u2240","\\wr",!0),w(E,$,nt,"\u2A3F","\\amalg"),w(E,$,nt,"&","\\And"),w(E,$,ee,"\u27F5","\\longleftarrow",!0),w(E,$,ee,"\u21D0","\\Leftarrow",!0),w(E,$,ee,"\u27F8","\\Longleftarrow",!0),w(E,$,ee,"\u27F6","\\longrightarrow",!0),w(E,$,ee,"\u21D2","\\Rightarrow",!0),w(E,$,ee,"\u27F9","\\Longrightarrow",!0),w(E,$,ee,"\u2194","\\leftrightarrow",!0),w(E,$,ee,"\u27F7","\\longleftrightarrow",!0),w(E,$,ee,"\u21D4","\\Leftrightarrow",!0),w(E,$,ee,"\u27FA","\\Longleftrightarrow",!0),w(E,$,ee,"\u21A6","\\mapsto",!0),w(E,$,ee,"\u27FC","\\longmapsto",!0),w(E,$,ee,"\u2197","\\nearrow",!0),w(E,$,ee,"\u21A9","\\hookleftarrow",!0),w(E,$,ee,"\u21AA","\\hookrightarrow",!0),w(E,$,ee,"\u2198","\\searrow",!0),w(E,$,ee,"\u21BC","\\leftharpoonup",!0),w(E,$,ee,"\u21C0","\\rightharpoonup",!0),w(E,$,ee,"\u2199","\\swarrow",!0),w(E,$,ee,"\u21BD","\\leftharpoondown",!0),w(E,$,ee,"\u21C1","\\rightharpoondown",!0),w(E,$,ee,"\u2196","\\nwarrow",!0),w(E,$,ee,"\u21CC","\\rightleftharpoons",!0),w(E,Q,ee,"\u226E","\\nless",!0),w(E,Q,ee,"\uE010","\\@nleqslant"),w(E,Q,ee,"\uE011","\\@nleqq"),w(E,Q,ee,"\u2A87","\\lneq",!0),w(E,Q,ee,"\u2268","\\lneqq",!0),w(E,Q,ee,"\uE00C","\\@lvertneqq"),w(E,Q,ee,"\u22E6","\\lnsim",!0),w(E,Q,ee,"\u2A89","\\lnapprox",!0),w(E,Q,ee,"\u2280","\\nprec",!0),w(E,Q,ee,"\u22E0","\\npreceq",!0),w(E,Q,ee,"\u22E8","\\precnsim",!0),w(E,Q,ee,"\u2AB9","\\precnapprox",!0),w(E,Q,ee,"\u2241","\\nsim",!0),w(E,Q,ee,"\uE006","\\@nshortmid"),w(E,Q,ee,"\u2224","\\nmid",!0),w(E,Q,ee,"\u22AC","\\nvdash",!0),w(E,Q,ee,"\u22AD","\\nvDash",!0),w(E,Q,ee,"\u22EA","\\ntriangleleft"),w(E,Q,ee,"\u22EC","\\ntrianglelefteq",!0),w(E,Q,ee,"\u228A","\\subsetneq",!0),w(E,Q,ee,"\uE01A","\\@varsubsetneq"),w(E,Q,ee,"\u2ACB","\\subsetneqq",!0),w(E,Q,ee,"\uE017","\\@varsubsetneqq"),w(E,Q,ee,"\u226F","\\ngtr",!0),w(E,Q,ee,"\uE00F","\\@ngeqslant"),w(E,Q,ee,"\uE00E","\\@ngeqq"),w(E,Q,ee,"\u2A88","\\gneq",!0),w(E,Q,ee,"\u2269","\\gneqq",!0),w(E,Q,ee,"\uE00D","\\@gvertneqq"),w(E,Q,ee,"\u22E7","\\gnsim",!0),w(E,Q,ee,"\u2A8A","\\gnapprox",!0),w(E,Q,ee,"\u2281","\\nsucc",!0),w(E,Q,ee,"\u22E1","\\nsucceq",!0),w(E,Q,ee,"\u22E9","\\succnsim",!0),w(E,Q,ee,"\u2ABA","\\succnapprox",!0),w(E,Q,ee,"\u2246","\\ncong",!0),w(E,Q,ee,"\uE007","\\@nshortparallel"),w(E,Q,ee,"\u2226","\\nparallel",!0),w(E,Q,ee,"\u22AF","\\nVDash",!0),w(E,Q,ee,"\u22EB","\\ntriangleright"),w(E,Q,ee,"\u22ED","\\ntrianglerighteq",!0),w(E,Q,ee,"\uE018","\\@nsupseteqq"),w(E,Q,ee,"\u228B","\\supsetneq",!0),w(E,Q,ee,"\uE01B","\\@varsupsetneq"),w(E,Q,ee,"\u2ACC","\\supsetneqq",!0),w(E,Q,ee,"\uE019","\\@varsupsetneqq"),w(E,Q,ee,"\u22AE","\\nVdash",!0),w(E,Q,ee,"\u2AB5","\\precneqq",!0),w(E,Q,ee,"\u2AB6","\\succneqq",!0),w(E,Q,ee,"\uE016","\\@nsubseteqq"),w(E,Q,nt,"\u22B4","\\unlhd"),w(E,Q,nt,"\u22B5","\\unrhd"),w(E,Q,ee,"\u219A","\\nleftarrow",!0),w(E,Q,ee,"\u219B","\\nrightarrow",!0),w(E,Q,ee,"\u21CD","\\nLeftarrow",!0),w(E,Q,ee,"\u21CF","\\nRightarrow",!0),w(E,Q,ee,"\u21AE","\\nleftrightarrow",!0),w(E,Q,ee,"\u21CE","\\nLeftrightarrow",!0),w(E,Q,ee,"\u25B3","\\vartriangle"),w(E,Q,oe,"\u210F","\\hslash"),w(E,Q,oe,"\u25BD","\\triangledown"),w(E,Q,oe,"\u25CA","\\lozenge"),w(E,Q,oe,"\u24C8","\\circledS"),w(E,Q,oe,"\xAE","\\circledR"),w(Ie,Q,oe,"\xAE","\\circledR"),w(E,Q,oe,"\u2221","\\measuredangle",!0),w(E,Q,oe,"\u2204","\\nexists"),w(E,Q,oe,"\u2127","\\mho"),w(E,Q,oe,"\u2132","\\Finv",!0),w(E,Q,oe,"\u2141","\\Game",!0),w(E,Q,oe,"\u2035","\\backprime"),w(E,Q,oe,"\u25B2","\\blacktriangle"),w(E,Q,oe,"\u25BC","\\blacktriangledown"),w(E,Q,oe,"\u25A0","\\blacksquare"),w(E,Q,oe,"\u29EB","\\blacklozenge"),w(E,Q,oe,"\u2605","\\bigstar"),w(E,Q,oe,"\u2222","\\sphericalangle",!0),w(E,Q,oe,"\u2201","\\complement",!0),w(E,Q,oe,"\xF0","\\eth",!0),w(Ie,$,oe,"\xF0","\xF0"),w(E,Q,oe,"\u2571","\\diagup"),w(E,Q,oe,"\u2572","\\diagdown"),w(E,Q,oe,"\u25A1","\\square"),w(E,Q,oe,"\u25A1","\\Box"),w(E,Q,oe,"\u25CA","\\Diamond"),w(E,Q,oe,"\xA5","\\yen",!0),w(Ie,Q,oe,"\xA5","\\yen",!0),w(E,Q,oe,"\u2713","\\checkmark",!0),w(Ie,Q,oe,"\u2713","\\checkmark"),w(E,Q,oe,"\u2136","\\beth",!0),w(E,Q,oe,"\u2138","\\daleth",!0),w(E,Q,oe,"\u2137","\\gimel",!0),w(E,Q,oe,"\u03DD","\\digamma",!0),w(E,Q,oe,"\u03F0","\\varkappa"),w(E,Q,ar,"\u250C","\\@ulcorner",!0),w(E,Q,Ke,"\u2510","\\@urcorner",!0),w(E,Q,ar,"\u2514","\\@llcorner",!0),w(E,Q,Ke,"\u2518","\\@lrcorner",!0),w(E,Q,ee,"\u2266","\\leqq",!0),w(E,Q,ee,"\u2A7D","\\leqslant",!0),w(E,Q,ee,"\u2A95","\\eqslantless",!0),w(E,Q,ee,"\u2272","\\lesssim",!0),w(E,Q,ee,"\u2A85","\\lessapprox",!0),w(E,Q,ee,"\u224A","\\approxeq",!0),w(E,Q,nt,"\u22D6","\\lessdot"),w(E,Q,ee,"\u22D8","\\lll",!0),w(E,Q,ee,"\u2276","\\lessgtr",!0),w(E,Q,ee,"\u22DA","\\lesseqgtr",!0),w(E,Q,ee,"\u2A8B","\\lesseqqgtr",!0),w(E,Q,ee,"\u2251","\\doteqdot"),w(E,Q,ee,"\u2253","\\risingdotseq",!0),w(E,Q,ee,"\u2252","\\fallingdotseq",!0),w(E,Q,ee,"\u223D","\\backsim",!0),w(E,Q,ee,"\u22CD","\\backsimeq",!0),w(E,Q,ee,"\u2AC5","\\subseteqq",!0),w(E,Q,ee,"\u22D0","\\Subset",!0),w(E,Q,ee,"\u228F","\\sqsubset",!0),w(E,Q,ee,"\u227C","\\preccurlyeq",!0),w(E,Q,ee,"\u22DE","\\curlyeqprec",!0),w(E,Q,ee,"\u227E","\\precsim",!0),w(E,Q,ee,"\u2AB7","\\precapprox",!0),w(E,Q,ee,"\u22B2","\\vartriangleleft"),w(E,Q,ee,"\u22B4","\\trianglelefteq"),w(E,Q,ee,"\u22A8","\\vDash",!0),w(E,Q,ee,"\u22AA","\\Vvdash",!0),w(E,Q,ee,"\u2323","\\smallsmile"),w(E,Q,ee,"\u2322","\\smallfrown"),w(E,Q,ee,"\u224F","\\bumpeq",!0),w(E,Q,ee,"\u224E","\\Bumpeq",!0),w(E,Q,ee,"\u2267","\\geqq",!0),w(E,Q,ee,"\u2A7E","\\geqslant",!0),w(E,Q,ee,"\u2A96","\\eqslantgtr",!0),w(E,Q,ee,"\u2273","\\gtrsim",!0),w(E,Q,ee,"\u2A86","\\gtrapprox",!0),w(E,Q,nt,"\u22D7","\\gtrdot"),w(E,Q,ee,"\u22D9","\\ggg",!0),w(E,Q,ee,"\u2277","\\gtrless",!0),w(E,Q,ee,"\u22DB","\\gtreqless",!0),w(E,Q,ee,"\u2A8C","\\gtreqqless",!0),w(E,Q,ee,"\u2256","\\eqcirc",!0),w(E,Q,ee,"\u2257","\\circeq",!0),w(E,Q,ee,"\u225C","\\triangleq",!0),w(E,Q,ee,"\u223C","\\thicksim"),w(E,Q,ee,"\u2248","\\thickapprox"),w(E,Q,ee,"\u2AC6","\\supseteqq",!0),w(E,Q,ee,"\u22D1","\\Supset",!0),w(E,Q,ee,"\u2290","\\sqsupset",!0),w(E,Q,ee,"\u227D","\\succcurlyeq",!0),w(E,Q,ee,"\u22DF","\\curlyeqsucc",!0),w(E,Q,ee,"\u227F","\\succsim",!0),w(E,Q,ee,"\u2AB8","\\succapprox",!0),w(E,Q,ee,"\u22B3","\\vartriangleright"),w(E,Q,ee,"\u22B5","\\trianglerighteq"),w(E,Q,ee,"\u22A9","\\Vdash",!0),w(E,Q,ee,"\u2223","\\shortmid"),w(E,Q,ee,"\u2225","\\shortparallel"),w(E,Q,ee,"\u226C","\\between",!0),w(E,Q,ee,"\u22D4","\\pitchfork",!0),w(E,Q,ee,"\u221D","\\varpropto"),w(E,Q,ee,"\u25C0","\\blacktriangleleft"),w(E,Q,ee,"\u2234","\\therefore",!0),w(E,Q,ee,"\u220D","\\backepsilon"),w(E,Q,ee,"\u25B6","\\blacktriangleright"),w(E,Q,ee,"\u2235","\\because",!0),w(E,Q,ee,"\u22D8","\\llless"),w(E,Q,ee,"\u22D9","\\gggtr"),w(E,Q,nt,"\u22B2","\\lhd"),w(E,Q,nt,"\u22B3","\\rhd"),w(E,Q,ee,"\u2242","\\eqsim",!0),w(E,$,ee,"\u22C8","\\Join"),w(E,Q,ee,"\u2251","\\Doteq",!0),w(E,Q,nt,"\u2214","\\dotplus",!0),w(E,Q,nt,"\u2216","\\smallsetminus"),w(E,Q,nt,"\u22D2","\\Cap",!0),w(E,Q,nt,"\u22D3","\\Cup",!0),w(E,Q,nt,"\u2A5E","\\doublebarwedge",!0),w(E,Q,nt,"\u229F","\\boxminus",!0),w(E,Q,nt,"\u229E","\\boxplus",!0),w(E,Q,nt,"\u22C7","\\divideontimes",!0),w(E,Q,nt,"\u22C9","\\ltimes",!0),w(E,Q,nt,"\u22CA","\\rtimes",!0),w(E,Q,nt,"\u22CB","\\leftthreetimes",!0),w(E,Q,nt,"\u22CC","\\rightthreetimes",!0),w(E,Q,nt,"\u22CF","\\curlywedge",!0),w(E,Q,nt,"\u22CE","\\curlyvee",!0),w(E,Q,nt,"\u229D","\\circleddash",!0),w(E,Q,nt,"\u229B","\\circledast",!0),w(E,Q,nt,"\u22C5","\\centerdot"),w(E,Q,nt,"\u22BA","\\intercal",!0),w(E,Q,nt,"\u22D2","\\doublecap"),w(E,Q,nt,"\u22D3","\\doublecup"),w(E,Q,nt,"\u22A0","\\boxtimes",!0),w(E,Q,ee,"\u21E2","\\dashrightarrow",!0),w(E,Q,ee,"\u21E0","\\dashleftarrow",!0),w(E,Q,ee,"\u21C7","\\leftleftarrows",!0),w(E,Q,ee,"\u21C6","\\leftrightarrows",!0),w(E,Q,ee,"\u21DA","\\Lleftarrow",!0),w(E,Q,ee,"\u219E","\\twoheadleftarrow",!0),w(E,Q,ee,"\u21A2","\\leftarrowtail",!0),w(E,Q,ee,"\u21AB","\\looparrowleft",!0),w(E,Q,ee,"\u21CB","\\leftrightharpoons",!0),w(E,Q,ee,"\u21B6","\\curvearrowleft",!0),w(E,Q,ee,"\u21BA","\\circlearrowleft",!0),w(E,Q,ee,"\u21B0","\\Lsh",!0),w(E,Q,ee,"\u21C8","\\upuparrows",!0),w(E,Q,ee,"\u21BF","\\upharpoonleft",!0),w(E,Q,ee,"\u21C3","\\downharpoonleft",!0),w(E,$,ee,"\u22B6","\\origof",!0),w(E,$,ee,"\u22B7","\\imageof",!0),w(E,Q,ee,"\u22B8","\\multimap",!0),w(E,Q,ee,"\u21AD","\\leftrightsquigarrow",!0),w(E,Q,ee,"\u21C9","\\rightrightarrows",!0),w(E,Q,ee,"\u21C4","\\rightleftarrows",!0),w(E,Q,ee,"\u21A0","\\twoheadrightarrow",!0),w(E,Q,ee,"\u21A3","\\rightarrowtail",!0),w(E,Q,ee,"\u21AC","\\looparrowright",!0),w(E,Q,ee,"\u21B7","\\curvearrowright",!0),w(E,Q,ee,"\u21BB","\\circlearrowright",!0),w(E,Q,ee,"\u21B1","\\Rsh",!0),w(E,Q,ee,"\u21CA","\\downdownarrows",!0),w(E,Q,ee,"\u21BE","\\upharpoonright",!0),w(E,Q,ee,"\u21C2","\\downharpoonright",!0),w(E,Q,ee,"\u21DD","\\rightsquigarrow",!0),w(E,Q,ee,"\u21DD","\\leadsto"),w(E,Q,ee,"\u21DB","\\Rrightarrow",!0),w(E,Q,ee,"\u21BE","\\restriction"),w(E,$,oe,"\u2018","`"),w(E,$,oe,"$","\\$"),w(Ie,$,oe,"$","\\$"),w(Ie,$,oe,"$","\\textdollar"),w(E,$,oe,"%","\\%"),w(Ie,$,oe,"%","\\%"),w(E,$,oe,"_","\\_"),w(Ie,$,oe,"_","\\_"),w(Ie,$,oe,"_","\\textunderscore"),w(E,$,oe,"\u2220","\\angle",!0),w(E,$,oe,"\u221E","\\infty",!0),w(E,$,oe,"\u2032","\\prime"),w(E,$,oe,"\u25B3","\\triangle"),w(E,$,oe,"\u0393","\\Gamma",!0),w(E,$,oe,"\u0394","\\Delta",!0),w(E,$,oe,"\u0398","\\Theta",!0),w(E,$,oe,"\u039B","\\Lambda",!0),w(E,$,oe,"\u039E","\\Xi",!0),w(E,$,oe,"\u03A0","\\Pi",!0),w(E,$,oe,"\u03A3","\\Sigma",!0),w(E,$,oe,"\u03A5","\\Upsilon",!0),w(E,$,oe,"\u03A6","\\Phi",!0),w(E,$,oe,"\u03A8","\\Psi",!0),w(E,$,oe,"\u03A9","\\Omega",!0),w(E,$,oe,"A","\u0391"),w(E,$,oe,"B","\u0392"),w(E,$,oe,"E","\u0395"),w(E,$,oe,"Z","\u0396"),w(E,$,oe,"H","\u0397"),w(E,$,oe,"I","\u0399"),w(E,$,oe,"K","\u039A"),w(E,$,oe,"M","\u039C"),w(E,$,oe,"N","\u039D"),w(E,$,oe,"O","\u039F"),w(E,$,oe,"P","\u03A1"),w(E,$,oe,"T","\u03A4"),w(E,$,oe,"X","\u03A7"),w(E,$,oe,"\xAC","\\neg",!0),w(E,$,oe,"\xAC","\\lnot"),w(E,$,oe,"\u22A4","\\top"),w(E,$,oe,"\u22A5","\\bot"),w(E,$,oe,"\u2205","\\emptyset"),w(E,Q,oe,"\u2205","\\varnothing"),w(E,$,tt,"\u03B1","\\alpha",!0),w(E,$,tt,"\u03B2","\\beta",!0),w(E,$,tt,"\u03B3","\\gamma",!0),w(E,$,tt,"\u03B4","\\delta",!0),w(E,$,tt,"\u03F5","\\epsilon",!0),w(E,$,tt,"\u03B6","\\zeta",!0),w(E,$,tt,"\u03B7","\\eta",!0),w(E,$,tt,"\u03B8","\\theta",!0),w(E,$,tt,"\u03B9","\\iota",!0),w(E,$,tt,"\u03BA","\\kappa",!0),w(E,$,tt,"\u03BB","\\lambda",!0),w(E,$,tt,"\u03BC","\\mu",!0),w(E,$,tt,"\u03BD","\\nu",!0),w(E,$,tt,"\u03BE","\\xi",!0),w(E,$,tt,"\u03BF","\\omicron",!0),w(E,$,tt,"\u03C0","\\pi",!0),w(E,$,tt,"\u03C1","\\rho",!0),w(E,$,tt,"\u03C3","\\sigma",!0),w(E,$,tt,"\u03C4","\\tau",!0),w(E,$,tt,"\u03C5","\\upsilon",!0),w(E,$,tt,"\u03D5","\\phi",!0),w(E,$,tt,"\u03C7","\\chi",!0),w(E,$,tt,"\u03C8","\\psi",!0),w(E,$,tt,"\u03C9","\\omega",!0),w(E,$,tt,"\u03B5","\\varepsilon",!0),w(E,$,tt,"\u03D1","\\vartheta",!0),w(E,$,tt,"\u03D6","\\varpi",!0),w(E,$,tt,"\u03F1","\\varrho",!0),w(E,$,tt,"\u03C2","\\varsigma",!0),w(E,$,tt,"\u03C6","\\varphi",!0),w(E,$,nt,"\u2217","*",!0),w(E,$,nt,"+","+"),w(E,$,nt,"\u2212","-",!0),w(E,$,nt,"\u22C5","\\cdot",!0),w(E,$,nt,"\u2218","\\circ",!0),w(E,$,nt,"\xF7","\\div",!0),w(E,$,nt,"\xB1","\\pm",!0),w(E,$,nt,"\xD7","\\times",!0),w(E,$,nt,"\u2229","\\cap",!0),w(E,$,nt,"\u222A","\\cup",!0),w(E,$,nt,"\u2216","\\setminus",!0),w(E,$,nt,"\u2227","\\land"),w(E,$,nt,"\u2228","\\lor"),w(E,$,nt,"\u2227","\\wedge",!0),w(E,$,nt,"\u2228","\\vee",!0),w(E,$,oe,"\u221A","\\surd"),w(E,$,ar,"\u27E8","\\langle",!0),w(E,$,ar,"\u2223","\\lvert"),w(E,$,ar,"\u2225","\\lVert"),w(E,$,Ke,"?","?"),w(E,$,Ke,"!","!"),w(E,$,Ke,"\u27E9","\\rangle",!0),w(E,$,Ke,"\u2223","\\rvert"),w(E,$,Ke,"\u2225","\\rVert"),w(E,$,ee,"=","="),w(E,$,ee,":",":"),w(E,$,ee,"\u2248","\\approx",!0),w(E,$,ee,"\u2245","\\cong",!0),w(E,$,ee,"\u2265","\\ge"),w(E,$,ee,"\u2265","\\geq",!0),w(E,$,ee,"\u2190","\\gets"),w(E,$,ee,">","\\gt",!0),w(E,$,ee,"\u2208","\\in",!0),w(E,$,ee,"\uE020","\\@not"),w(E,$,ee,"\u2282","\\subset",!0),w(E,$,ee,"\u2283","\\supset",!0),w(E,$,ee,"\u2286","\\subseteq",!0),w(E,$,ee,"\u2287","\\supseteq",!0),w(E,Q,ee,"\u2288","\\nsubseteq",!0),w(E,Q,ee,"\u2289","\\nsupseteq",!0),w(E,$,ee,"\u22A8","\\models"),w(E,$,ee,"\u2190","\\leftarrow",!0),w(E,$,ee,"\u2264","\\le"),w(E,$,ee,"\u2264","\\leq",!0),w(E,$,ee,"<","\\lt",!0),w(E,$,ee,"\u2192","\\rightarrow",!0),w(E,$,ee,"\u2192","\\to"),w(E,Q,ee,"\u2271","\\ngeq",!0),w(E,Q,ee,"\u2270","\\nleq",!0),w(E,$,br,"\xA0","\\ "),w(E,$,br,"\xA0","\\space"),w(E,$,br,"\xA0","\\nobreakspace"),w(Ie,$,br,"\xA0","\\ "),w(Ie,$,br,"\xA0"," "),w(Ie,$,br,"\xA0","\\space"),w(Ie,$,br,"\xA0","\\nobreakspace"),w(E,$,br,null,"\\nobreak"),w(E,$,br,null,"\\allowbreak"),w(E,$,$r,",",","),w(E,$,$r,";",";"),w(E,Q,nt,"\u22BC","\\barwedge",!0),w(E,Q,nt,"\u22BB","\\veebar",!0),w(E,$,nt,"\u2299","\\odot",!0),w(E,$,nt,"\u2295","\\oplus",!0),w(E,$,nt,"\u2297","\\otimes",!0),w(E,$,oe,"\u2202","\\partial",!0),w(E,$,nt,"\u2298","\\oslash",!0),w(E,Q,nt,"\u229A","\\circledcirc",!0),w(E,Q,nt,"\u22A1","\\boxdot",!0),w(E,$,nt,"\u25B3","\\bigtriangleup"),w(E,$,nt,"\u25BD","\\bigtriangledown"),w(E,$,nt,"\u2020","\\dagger"),w(E,$,nt,"\u22C4","\\diamond"),w(E,$,nt,"\u22C6","\\star"),w(E,$,nt,"\u25C3","\\triangleleft"),w(E,$,nt,"\u25B9","\\triangleright"),w(E,$,ar,"{","\\{"),w(Ie,$,oe,"{","\\{"),w(Ie,$,oe,"{","\\textbraceleft"),w(E,$,Ke,"}","\\}"),w(Ie,$,oe,"}","\\}"),w(Ie,$,oe,"}","\\textbraceright"),w(E,$,ar,"{","\\lbrace"),w(E,$,Ke,"}","\\rbrace"),w(E,$,ar,"[","\\lbrack",!0),w(Ie,$,oe,"[","\\lbrack",!0),w(E,$,Ke,"]","\\rbrack",!0),w(Ie,$,oe,"]","\\rbrack",!0),w(E,$,ar,"(","\\lparen",!0),w(E,$,Ke,")","\\rparen",!0),w(Ie,$,oe,"<","\\textless",!0),w(Ie,$,oe,">","\\textgreater",!0),w(E,$,ar,"\u230A","\\lfloor",!0),w(E,$,Ke,"\u230B","\\rfloor",!0),w(E,$,ar,"\u2308","\\lceil",!0),w(E,$,Ke,"\u2309","\\rceil",!0),w(E,$,oe,"\\","\\backslash"),w(E,$,oe,"\u2223","|"),w(E,$,oe,"\u2223","\\vert"),w(Ie,$,oe,"|","\\textbar",!0),w(E,$,oe,"\u2225","\\|"),w(E,$,oe,"\u2225","\\Vert"),w(Ie,$,oe,"\u2225","\\textbardbl"),w(Ie,$,oe,"~","\\textasciitilde"),w(Ie,$,oe,"\\","\\textbackslash"),w(Ie,$,oe,"^","\\textasciicircum"),w(E,$,ee,"\u2191","\\uparrow",!0),w(E,$,ee,"\u21D1","\\Uparrow",!0),w(E,$,ee,"\u2193","\\downarrow",!0),w(E,$,ee,"\u21D3","\\Downarrow",!0),w(E,$,ee,"\u2195","\\updownarrow",!0),w(E,$,ee,"\u21D5","\\Updownarrow",!0),w(E,$,Mt,"\u2210","\\coprod"),w(E,$,Mt,"\u22C1","\\bigvee"),w(E,$,Mt,"\u22C0","\\bigwedge"),w(E,$,Mt,"\u2A04","\\biguplus"),w(E,$,Mt,"\u22C2","\\bigcap"),w(E,$,Mt,"\u22C3","\\bigcup"),w(E,$,Mt,"\u222B","\\int"),w(E,$,Mt,"\u222B","\\intop"),w(E,$,Mt,"\u222C","\\iint"),w(E,$,Mt,"\u222D","\\iiint"),w(E,$,Mt,"\u220F","\\prod"),w(E,$,Mt,"\u2211","\\sum"),w(E,$,Mt,"\u2A02","\\bigotimes"),w(E,$,Mt,"\u2A01","\\bigoplus"),w(E,$,Mt,"\u2A00","\\bigodot"),w(E,$,Mt,"\u222E","\\oint"),w(E,$,Mt,"\u222F","\\oiint"),w(E,$,Mt,"\u2230","\\oiiint"),w(E,$,Mt,"\u2A06","\\bigsqcup"),w(E,$,Mt,"\u222B","\\smallint"),w(Ie,$,wt,"\u2026","\\textellipsis"),w(E,$,wt,"\u2026","\\mathellipsis"),w(Ie,$,wt,"\u2026","\\ldots",!0),w(E,$,wt,"\u2026","\\ldots",!0),w(E,$,wt,"\u22EF","\\@cdots",!0),w(E,$,wt,"\u22F1","\\ddots",!0),w(E,$,oe,"\u22EE","\\varvdots"),w(Ie,$,oe,"\u22EE","\\varvdots"),w(E,$,Zt,"\u02CA","\\acute"),w(E,$,Zt,"\u02CB","\\grave"),w(E,$,Zt,"\xA8","\\ddot"),w(E,$,Zt,"~","\\tilde"),w(E,$,Zt,"\u02C9","\\bar"),w(E,$,Zt,"\u02D8","\\breve"),w(E,$,Zt,"\u02C7","\\check"),w(E,$,Zt,"^","\\hat"),w(E,$,Zt,"\u20D7","\\vec"),w(E,$,Zt,"\u02D9","\\dot"),w(E,$,Zt,"\u02DA","\\mathring"),w(E,$,tt,"\uE131","\\@imath"),w(E,$,tt,"\uE237","\\@jmath"),w(E,$,oe,"\u0131","\u0131"),w(E,$,oe,"\u0237","\u0237"),w(Ie,$,oe,"\u0131","\\i",!0),w(Ie,$,oe,"\u0237","\\j",!0),w(Ie,$,oe,"\xDF","\\ss",!0),w(Ie,$,oe,"\xE6","\\ae",!0),w(Ie,$,oe,"\u0153","\\oe",!0),w(Ie,$,oe,"\xF8","\\o",!0),w(Ie,$,oe,"\xC6","\\AE",!0),w(Ie,$,oe,"\u0152","\\OE",!0),w(Ie,$,oe,"\xD8","\\O",!0),w(Ie,$,Zt,"\u02CA","\\'"),w(Ie,$,Zt,"\u02CB","\\`"),w(Ie,$,Zt,"\u02C6","\\^"),w(Ie,$,Zt,"\u02DC","\\~"),w(Ie,$,Zt,"\u02C9","\\="),w(Ie,$,Zt,"\u02D8","\\u"),w(Ie,$,Zt,"\u02D9","\\."),w(Ie,$,Zt,"\xB8","\\c"),w(Ie,$,Zt,"\u02DA","\\r"),w(Ie,$,Zt,"\u02C7","\\v"),w(Ie,$,Zt,"\xA8",'\\"'),w(Ie,$,Zt,"\u02DD","\\H"),w(Ie,$,Zt,"\u25EF","\\textcircled");const ue={"--":!0,"---":!0,"``":!0,"''":!0};w(Ie,$,oe,"\u2013","--",!0),w(Ie,$,oe,"\u2013","\\textendash"),w(Ie,$,oe,"\u2014","---",!0),w(Ie,$,oe,"\u2014","\\textemdash"),w(Ie,$,oe,"\u2018","`",!0),w(Ie,$,oe,"\u2018","\\textquoteleft"),w(Ie,$,oe,"\u2019","'",!0),w(Ie,$,oe,"\u2019","\\textquoteright"),w(Ie,$,oe,"\u201C","``",!0),w(Ie,$,oe,"\u201C","\\textquotedblleft"),w(Ie,$,oe,"\u201D","''",!0),w(Ie,$,oe,"\u201D","\\textquotedblright"),w(E,$,oe,"\xB0","\\degree",!0),w(Ie,$,oe,"\xB0","\\degree"),w(Ie,$,oe,"\xB0","\\textdegree",!0),w(E,$,oe,"\xA3","\\pounds"),w(E,$,oe,"\xA3","\\mathsterling",!0),w(Ie,$,oe,"\xA3","\\pounds"),w(Ie,$,oe,"\xA3","\\textsterling",!0),w(E,Q,oe,"\u2720","\\maltese"),w(Ie,Q,oe,"\u2720","\\maltese");const Oe='0123456789/@."';for(let s=0;s<Oe.length;s++){const i=Oe.charAt(s);w(E,$,oe,i,i)}const st='0123456789!@*()-=+";:?/.,';for(let s=0;s<st.length;s++){const i=st.charAt(s);w(Ie,$,oe,i,i)}const ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let s=0;s<ze.length;s++){const i=ze.charAt(s);w(E,$,tt,i,i),w(Ie,$,oe,i,i)}w(E,Q,oe,"C","\u2102"),w(Ie,Q,oe,"C","\u2102"),w(E,Q,oe,"H","\u210D"),w(Ie,Q,oe,"H","\u210D"),w(E,Q,oe,"N","\u2115"),w(Ie,Q,oe,"N","\u2115"),w(E,Q,oe,"P","\u2119"),w(Ie,Q,oe,"P","\u2119"),w(E,Q,oe,"Q","\u211A"),w(Ie,Q,oe,"Q","\u211A"),w(E,Q,oe,"R","\u211D"),w(Ie,Q,oe,"R","\u211D"),w(E,Q,oe,"Z","\u2124"),w(Ie,Q,oe,"Z","\u2124"),w(E,$,tt,"h","\u210E"),w(Ie,$,tt,"h","\u210E");let le="";for(let s=0;s<ze.length;s++){const i=ze.charAt(s);le=String.fromCharCode(55349,56320+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56372+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56424+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56580+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56684+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56736+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56788+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56840+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56944+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),s<26&&(le=String.fromCharCode(55349,56632+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,56476+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le))}le="\u{1D55C}",w(E,$,tt,"k",le),w(Ie,$,oe,"k",le);for(let s=0;s<10;s++){const i=s.toString();le=String.fromCharCode(55349,57294+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,57314+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,57324+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le),le=String.fromCharCode(55349,57334+s),w(E,$,tt,i,le),w(Ie,$,oe,i,le)}const Ye="\xD0\xDE\xFE";for(let s=0;s<Ye.length;s++){const i=Ye.charAt(s);w(E,$,tt,i,i),w(Ie,$,oe,i,i)}const Ue=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],ut=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],fe=function(s,i){const c=s.charCodeAt(0),h=s.charCodeAt(1),y=(c-55296)*1024+(h-56320)+65536,k=i==="math"?0:1;if(119808<=y&&y<120484){const N=Math.floor((y-119808)/26);return[Ue[N][2],Ue[N][k]]}else if(120782<=y&&y<=120831){const N=Math.floor((y-120782)/10);return[ut[N][2],ut[N][k]]}else{if(y===120485||y===120486)return[Ue[0][2],Ue[0][k]];if(120486<y&&y<120782)return["",""];throw new a("Unsupported character: "+s)}};class De{constructor(i){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=i,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createDocumentFragment();for(let c=0;c<this.children.length;c++)i.appendChild(this.children[c].toNode());return i}toMarkup(){let i="";for(let c=0;c<this.children.length;c++)i+=this.children[c].toMarkup();return i}toText(){const i=c=>c.toText();return this.children.map(i).join("")}}const ve=function(s,i,c){return _t[c][s]&&_t[c][s].replace&&(s=_t[c][s].replace),{value:s,metrics:at(s,i,c)}},qe=function(s,i,c,h,y){const k=ve(s,i,c),N=k.metrics;s=k.value;let j;if(N){let G=N.italic;(c==="text"||h&&h.font==="mathit")&&(G=0),j=new Bt(s,N.height,N.depth,G,N.skew,N.width,y)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+s+"' in style '"+i+"' and mode '"+c+"'")),j=new Bt(s,0,0,0,0,0,y);if(h){j.maxFontSize=h.sizeMultiplier,h.style.isTight()&&j.classes.push("mtight");const G=h.getColor();G&&(j.style.color=G)}return j},ct=function(s,i,c,h){return h===void 0&&(h=[]),c.font==="boldsymbol"&&ve(s,"Main-Bold",i).metrics?qe(s,"Main-Bold",i,c,h.concat(["mathbf"])):s==="\\"||_t[i][s].font==="main"?qe(s,"Main-Regular",i,c,h):qe(s,"AMS-Regular",i,c,h.concat(["amsrm"]))},Vt=function(s,i,c,h,y){return y!=="textord"&&ve(s,"Math-BoldItalic",i).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Tt=function(s,i,c){const h=s.mode,y=s.text,k=["mord"],N=h==="math"||h==="text"&&i.font,j=N?i.font:i.fontFamily;let G="",re="";if(y.charCodeAt(0)===55349&&([G,re]=fe(y,h)),G.length>0)return qe(y,G,h,i,k.concat(re));if(j){let pe,ye;if(j==="boldsymbol"){const Be=Vt(y,h,i,k,c);pe=Be.fontName,ye=[Be.fontClass]}else N?(pe=Zn[j].fontName,ye=[j]):(pe=Gn(j,i.fontWeight,i.fontShape),ye=[j,i.fontWeight,i.fontShape]);if(ve(y,pe,h).metrics)return qe(y,pe,h,i,k.concat(ye));if(ue.hasOwnProperty(y)&&pe.slice(0,10)==="Typewriter"){const Be=[];for(let Ze=0;Ze<y.length;Ze++)Be.push(qe(y[Ze],pe,h,i,k.concat(ye)));return cr(Be)}}if(c==="mathord")return qe(y,"Math-Italic",h,i,k.concat(["mathnormal"]));if(c==="textord"){const pe=_t[h][y]&&_t[h][y].font;if(pe==="ams"){const ye=Gn("amsrm",i.fontWeight,i.fontShape);return qe(y,ye,h,i,k.concat("amsrm",i.fontWeight,i.fontShape))}else if(pe==="main"||!pe){const ye=Gn("textrm",i.fontWeight,i.fontShape);return qe(y,ye,h,i,k.concat(i.fontWeight,i.fontShape))}else{const ye=Gn(pe,i.fontWeight,i.fontShape);return qe(y,ye,h,i,k.concat(ye,i.fontWeight,i.fontShape))}}else throw new Error("unexpected type: "+c+" in makeOrd")},dt=(s,i)=>{if(bt(s.classes)!==bt(i.classes)||s.skew!==i.skew||s.maxFontSize!==i.maxFontSize)return!1;if(s.classes.length===1){const c=s.classes[0];if(c==="mbin"||c==="mord")return!1}for(const c in s.style)if(s.style.hasOwnProperty(c)&&s.style[c]!==i.style[c])return!1;for(const c in i.style)if(i.style.hasOwnProperty(c)&&s.style[c]!==i.style[c])return!1;return!0},qt=s=>{for(let i=0;i<s.length-1;i++){const c=s[i],h=s[i+1];c instanceof Bt&&h instanceof Bt&&dt(c,h)&&(c.text+=h.text,c.height=Math.max(c.height,h.height),c.depth=Math.max(c.depth,h.depth),c.italic=h.italic,s.splice(i+1,1),i--)}return s},Jr=function(s){let i=0,c=0,h=0;for(let y=0;y<s.children.length;y++){const k=s.children[y];k.height>i&&(i=k.height),k.depth>c&&(c=k.depth),k.maxFontSize>h&&(h=k.maxFontSize)}s.height=i,s.depth=c,s.maxFontSize=h},Ar=function(s,i,c,h){const y=new At(s,i,c,h);return Jr(y),y},dn=(s,i,c,h)=>new At(s,i,c,h),yr=function(s,i,c){const h=Ar([s],[],i);return h.height=Math.max(c||i.fontMetrics().defaultRuleThickness,i.minRuleThickness),h.style.borderBottomWidth=de(h.height),h.maxFontSize=1,h},Qt=function(s,i,c,h){const y=new Rt(s,i,c,h);return Jr(y),y},cr=function(s){const i=new De(s);return Jr(i),i},Vr=function(s,i){return s instanceof De?Ar([],[s],i):s},_r=function(s){if(s.positionType==="individualShift"){const c=s.children,h=[c[0]],y=-c[0].shift-c[0].elem.depth;let k=y;for(let N=1;N<c.length;N++){const j=-c[N].shift-k-c[N].elem.depth,G=j-(c[N-1].elem.height+c[N-1].elem.depth);k=k+j,h.push({type:"kern",size:G}),h.push(c[N])}return{children:h,depth:y}}let i;if(s.positionType==="top"){let c=s.positionData;for(let h=0;h<s.children.length;h++){const y=s.children[h];c-=y.type==="kern"?y.size:y.elem.height+y.elem.depth}i=c}else if(s.positionType==="bottom")i=-s.positionData;else{const c=s.children[0];if(c.type!=="elem")throw new Error('First child must have type "elem".');if(s.positionType==="shift")i=-c.elem.depth-s.positionData;else if(s.positionType==="firstBaseline")i=-c.elem.depth;else throw new Error("Invalid positionType "+s.positionType+".")}return{children:s.children,depth:i}},Yn=function(s,i){const{children:c,depth:h}=_r(s);let y=0;for(let Ze=0;Ze<c.length;Ze++){const lt=c[Ze];if(lt.type==="elem"){const Pt=lt.elem;y=Math.max(y,Pt.maxFontSize,Pt.height)}}y+=2;const k=Ar(["pstrut"],[]);k.style.height=de(y);const N=[];let j=h,G=h,re=h;for(let Ze=0;Ze<c.length;Ze++){const lt=c[Ze];if(lt.type==="kern")re+=lt.size;else{const Pt=lt.elem,Jt=lt.wrapperClasses||[],Yt=lt.wrapperStyle||{},ir=Ar(Jt,[k,Pt],void 0,Yt);ir.style.top=de(-y-re-Pt.depth),lt.marginLeft&&(ir.style.marginLeft=lt.marginLeft),lt.marginRight&&(ir.style.marginRight=lt.marginRight),N.push(ir),re+=Pt.height+Pt.depth}j=Math.min(j,re),G=Math.max(G,re)}const pe=Ar(["vlist"],N);pe.style.height=de(G);let ye;if(j<0){const Ze=Ar([],[]),lt=Ar(["vlist"],[Ze]);lt.style.height=de(-j);const Pt=Ar(["vlist-s"],[new Bt("\u200B")]);ye=[Ar(["vlist-r"],[pe,Pt]),Ar(["vlist-r"],[lt])]}else ye=[Ar(["vlist-r"],[pe])];const Be=Ar(["vlist-t"],ye);return ye.length===2&&Be.classes.push("vlist-t2"),Be.height=G,Be.depth=-j,Be},Oo=(s,i)=>{const c=Ar(["mspace"],[],i),h=Pe(s,i);return c.style.marginRight=de(h),c},Gn=function(s,i,c){let h="";switch(s){case"amsrm":h="AMS";break;case"textrm":h="Main";break;case"textsf":h="SansSerif";break;case"texttt":h="Typewriter";break;default:h=s}let y;return i==="textbf"&&c==="textit"?y="BoldItalic":i==="textbf"?y="Bold":i==="textit"?y="Italic":y="Regular",h+"-"+y},Zn={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},po={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var be={fontMap:Zn,makeSymbol:qe,mathsym:ct,makeSpan:Ar,makeSvgSpan:dn,makeLineSpan:yr,makeAnchor:Qt,makeFragment:cr,wrapFragment:Vr,makeVList:Yn,makeOrd:Tt,makeGlue:Oo,staticSvg:function(s,i){const[c,h,y]=po[s],k=new jt(c),N=new Ht([k],{width:de(h),height:de(y),style:"width:"+de(h),viewBox:"0 0 "+1e3*h+" "+1e3*y,preserveAspectRatio:"xMinYMin"}),j=dn(["overlay"],[N],i);return j.height=y,j.style.height=de(y),j.style.width=de(h),j},svgData:po,tryCombineChars:qt};const dr={number:3,unit:"mu"},Nn={number:4,unit:"mu"},Nt={number:5,unit:"mu"},Ut={mord:{mop:dr,mbin:Nn,mrel:Nt,minner:dr},mop:{mord:dr,mop:dr,mrel:Nt,minner:dr},mbin:{mord:Nn,mop:Nn,mopen:Nn,minner:Nn},mrel:{mord:Nt,mop:Nt,mopen:Nt,minner:Nt},mopen:{},mclose:{mop:dr,mbin:Nn,mrel:Nt,minner:dr},mpunct:{mord:dr,mop:dr,mrel:Nt,mopen:dr,mclose:dr,mpunct:dr,minner:dr},minner:{mord:dr,mop:dr,mbin:Nn,mrel:Nt,mopen:dr,mpunct:dr,minner:dr}},Kr={mord:{mop:dr},mop:{mord:dr,mop:dr},mbin:{},mrel:{},mopen:{},mclose:{mop:dr},mpunct:{},minner:{mop:dr}},nn={},Rr={},$n={};function ot(s){let{type:i,names:c,props:h,handler:y,htmlBuilder:k,mathmlBuilder:N}=s;const j={type:i,numArgs:h.numArgs,argTypes:h.argTypes,allowedInArgument:!!h.allowedInArgument,allowedInText:!!h.allowedInText,allowedInMath:h.allowedInMath===void 0?!0:h.allowedInMath,numOptionalArgs:h.numOptionalArgs||0,infix:!!h.infix,primitive:!!h.primitive,handler:y};for(let G=0;G<c.length;++G)nn[c[G]]=j;i&&(k&&(Rr[i]=k),N&&($n[i]=N))}function on(s){let{type:i,htmlBuilder:c,mathmlBuilder:h}=s;ot({type:i,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:c,mathmlBuilder:h})}const zn=function(s){return s.type==="ordgroup"&&s.body.length===1?s.body[0]:s},Dr=function(s){return s.type==="ordgroup"?s.body:[s]},Jn=be.makeSpan,Qg=["leftmost","mbin","mopen","mrel","mop","mpunct"],e4=["rightmost","mrel","mclose","mpunct"],t4={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT},r4={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},qr=function(s,i,c,h){h===void 0&&(h=[null,null]);const y=[];for(let re=0;re<s.length;re++){const pe=rr(s[re],i);if(pe instanceof De){const ye=pe.children;y.push(...ye)}else y.push(pe)}if(be.tryCombineChars(y),!c)return y;let k=i;if(s.length===1){const re=s[0];re.type==="sizing"?k=i.havingSize(re.size):re.type==="styling"&&(k=i.havingStyle(t4[re.style]))}const N=Jn([h[0]||"leftmost"],[],i),j=Jn([h[1]||"rightmost"],[],i),G=c==="root";return dl(y,(re,pe)=>{const ye=pe.classes[0],Be=re.classes[0];ye==="mbin"&&e4.includes(Be)?pe.classes[0]="mord":Be==="mbin"&&Qg.includes(ye)&&(re.classes[0]="mord")},{node:N},j,G),dl(y,(re,pe)=>{const ye=hl(pe),Be=hl(re),Ze=ye&&Be?re.hasClass("mtight")?Kr[ye][Be]:Ut[ye][Be]:null;if(Ze)return be.makeGlue(Ze,k)},{node:N},j,G),y},dl=function(s,i,c,h,y){h&&s.push(h);let k=0;for(;k<s.length;k++){const N=s[k],j=Ic(N);if(j){dl(j.children,i,c,null,y);continue}const G=!N.hasClass("mspace");if(G){const re=i(N,c.node);re&&(c.insertAfter?c.insertAfter(re):(s.unshift(re),k++))}G?c.node=N:y&&N.hasClass("newline")&&(c.node=Jn(["leftmost"])),c.insertAfter=(re=>pe=>{s.splice(re+1,0,pe),k++})(k)}h&&s.pop()},Ic=function(s){return s instanceof De||s instanceof Rt||s instanceof At&&s.hasClass("enclosing")?s:null},fl=function(s,i){const c=Ic(s);if(c){const h=c.children;if(h.length){if(i==="right")return fl(h[h.length-1],"right");if(i==="left")return fl(h[0],"left")}}return s},hl=function(s,i){return s?(i&&(s=fl(s,i)),r4[s.classes[0]]||null):null},$a=function(s,i){const c=["nulldelimiter"].concat(s.baseSizingClasses());return Jn(i.concat(c))},rr=function(s,i,c){if(!s)return Jn();if(Rr[s.type]){let h=Rr[s.type](s,i);if(c&&i.size!==c.size){h=Jn(i.sizingClasses(c),[h],i);const y=i.sizeMultiplier/c.sizeMultiplier;h.height*=y,h.depth*=y}return h}else throw new a("Got group of unknown type: '"+s.type+"'")};function ki(s,i){const c=Jn(["base"],s,i),h=Jn(["strut"]);return h.style.height=de(c.height+c.depth),c.depth&&(h.style.verticalAlign=de(-c.depth)),c.children.unshift(h),c}function pl(s,i){let c=null;s.length===1&&s[0].type==="tag"&&(c=s[0].tag,s=s[0].body);const h=qr(s,i,"root");let y;h.length===2&&h[1].hasClass("tag")&&(y=h.pop());const k=[];let N=[];for(let re=0;re<h.length;re++)if(N.push(h[re]),h[re].hasClass("mbin")||h[re].hasClass("mrel")||h[re].hasClass("allowbreak")){let pe=!1;for(;re<h.length-1&&h[re+1].hasClass("mspace")&&!h[re+1].hasClass("newline");)re++,N.push(h[re]),h[re].hasClass("nobreak")&&(pe=!0);pe||(k.push(ki(N,i)),N=[])}else h[re].hasClass("newline")&&(N.pop(),N.length>0&&(k.push(ki(N,i)),N=[]),k.push(h[re]));N.length>0&&k.push(ki(N,i));let j;c?(j=ki(qr(c,i,!0)),j.classes=["tag"],k.push(j)):y&&k.push(y);const G=Jn(["katex-html"],k);if(G.setAttribute("aria-hidden","true"),j){const re=j.children[0];re.style.height=de(G.height+G.depth),G.depth&&(re.style.verticalAlign=de(-G.depth))}return G}function Pc(s){return new De(s)}class bn{constructor(i,c,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=i,this.attributes={},this.children=c||[],this.classes=h||[]}setAttribute(i,c){this.attributes[i]=c}getAttribute(i){return this.attributes[i]}toNode(){const i=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&i.setAttribute(c,this.attributes[c]);this.classes.length>0&&(i.className=bt(this.classes));for(let c=0;c<this.children.length;c++)if(this.children[c]instanceof jn&&this.children[c+1]instanceof jn){let h=this.children[c].toText()+this.children[++c].toText();for(;this.children[c+1]instanceof jn;)h+=this.children[++c].toText();i.appendChild(new jn(h).toNode())}else i.appendChild(this.children[c].toNode());return i}toMarkup(){let i="<"+this.type;for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&(i+=" "+c+'="',i+=D.escape(this.attributes[c]),i+='"');this.classes.length>0&&(i+=' class ="'+D.escape(bt(this.classes))+'"'),i+=">";for(let c=0;c<this.children.length;c++)i+=this.children[c].toMarkup();return i+="</"+this.type+">",i}toText(){return this.children.map(i=>i.toText()).join("")}}class jn{constructor(i){this.text=void 0,this.text=i}toNode(){return document.createTextNode(this.text)}toMarkup(){return D.escape(this.toText())}toText(){return this.text}}class n4{constructor(i){this.width=void 0,this.character=void 0,this.width=i,i>=.05555&&i<=.05556?this.character="\u200A":i>=.1666&&i<=.1667?this.character="\u2009":i>=.2222&&i<=.2223?this.character="\u2005":i>=.2777&&i<=.2778?this.character="\u2005\u200A":i>=-.05556&&i<=-.05555?this.character="\u200A\u2063":i>=-.1667&&i<=-.1666?this.character="\u2009\u2063":i>=-.2223&&i<=-.2222?this.character="\u205F\u2063":i>=-.2778&&i<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);{const i=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return i.setAttribute("width",de(this.width)),i}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+de(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ge={MathNode:bn,TextNode:jn,SpaceNode:n4,newDocumentFragment:Pc};const Dn=function(s,i,c){return _t[i][s]&&_t[i][s].replace&&s.charCodeAt(0)!==55349&&!(ue.hasOwnProperty(s)&&c&&(c.fontFamily&&c.fontFamily.slice(4,6)==="tt"||c.font&&c.font.slice(4,6)==="tt"))&&(s=_t[i][s].replace),new Ge.TextNode(s)},ml=function(s){return s.length===1?s[0]:new Ge.MathNode("mrow",s)},gl=function(s,i){if(i.fontFamily==="texttt")return"monospace";if(i.fontFamily==="textsf")return i.fontShape==="textit"&&i.fontWeight==="textbf"?"sans-serif-bold-italic":i.fontShape==="textit"?"sans-serif-italic":i.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(i.fontShape==="textit"&&i.fontWeight==="textbf")return"bold-italic";if(i.fontShape==="textit")return"italic";if(i.fontWeight==="textbf")return"bold";const c=i.font;if(!c||c==="mathnormal")return null;const h=s.mode;if(c==="mathit")return"italic";if(c==="boldsymbol")return s.type==="textord"?"bold":"bold-italic";if(c==="mathbf")return"bold";if(c==="mathbb")return"double-struck";if(c==="mathsfit")return"sans-serif-italic";if(c==="mathfrak")return"fraktur";if(c==="mathscr"||c==="mathcal")return"script";if(c==="mathsf")return"sans-serif";if(c==="mathtt")return"monospace";let y=s.text;if(["\\imath","\\jmath"].includes(y))return null;_t[h][y]&&_t[h][y].replace&&(y=_t[h][y].replace);const k=be.fontMap[c].fontName;return at(y,k,h)?be.fontMap[c].variant:null};function vl(s){if(!s)return!1;if(s.type==="mi"&&s.children.length===1){const i=s.children[0];return i instanceof jn&&i.text==="."}else if(s.type==="mo"&&s.children.length===1&&s.getAttribute("separator")==="true"&&s.getAttribute("lspace")==="0em"&&s.getAttribute("rspace")==="0em"){const i=s.children[0];return i instanceof jn&&i.text===","}else return!1}const fn=function(s,i,c){if(s.length===1){const k=xr(s[0],i);return c&&k instanceof bn&&k.type==="mo"&&(k.setAttribute("lspace","0em"),k.setAttribute("rspace","0em")),[k]}const h=[];let y;for(let k=0;k<s.length;k++){const N=xr(s[k],i);if(N instanceof bn&&y instanceof bn){if(N.type==="mtext"&&y.type==="mtext"&&N.getAttribute("mathvariant")===y.getAttribute("mathvariant")){y.children.push(...N.children);continue}else if(N.type==="mn"&&y.type==="mn"){y.children.push(...N.children);continue}else if(vl(N)&&y.type==="mn"){y.children.push(...N.children);continue}else if(N.type==="mn"&&vl(y))N.children=[...y.children,...N.children],h.pop();else if((N.type==="msup"||N.type==="msub")&&N.children.length>=1&&(y.type==="mn"||vl(y))){const j=N.children[0];j instanceof bn&&j.type==="mn"&&(j.children=[...y.children,...j.children],h.pop())}else if(y.type==="mi"&&y.children.length===1){const j=y.children[0];if(j instanceof jn&&j.text==="\u0338"&&(N.type==="mo"||N.type==="mi"||N.type==="mn")){const G=N.children[0];G instanceof jn&&G.text.length>0&&(G.text=G.text.slice(0,1)+"\u0338"+G.text.slice(1),h.pop())}}}h.push(N),y=N}return h},mo=function(s,i,c){return ml(fn(s,i,c))},xr=function(s,i){if(!s)return new Ge.MathNode("mrow");if($n[s.type])return $n[s.type](s,i);throw new a("Got group of unknown type: '"+s.type+"'")};function zc(s,i,c,h,y){const k=fn(s,c);let N;k.length===1&&k[0]instanceof bn&&["mrow","mtable"].includes(k[0].type)?N=k[0]:N=new Ge.MathNode("mrow",k);const j=new Ge.MathNode("annotation",[new Ge.TextNode(i)]);j.setAttribute("encoding","application/x-tex");const G=new Ge.MathNode("semantics",[N,j]),re=new Ge.MathNode("math",[G]);re.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),h&&re.setAttribute("display","block");const pe=y?"katex":"katex-mathml";return be.makeSpan([pe],[re])}const jc=function(s){return new $t({style:s.displayMode?R.DISPLAY:R.TEXT,maxSize:s.maxSize,minRuleThickness:s.minRuleThickness})},_c=function(s,i){if(i.displayMode){const c=["katex-display"];i.leqno&&c.push("leqno"),i.fleqn&&c.push("fleqn"),s=be.makeSpan(c,[s])}return s},o4=function(s,i,c){const h=jc(c);let y;if(c.output==="mathml")return zc(s,i,h,c.displayMode,!0);if(c.output==="html"){const k=pl(s,h);y=be.makeSpan(["katex"],[k])}else{const k=zc(s,i,h,c.displayMode,!1),N=pl(s,h);y=be.makeSpan(["katex"],[k,N])}return _c(y,c)},a4=function(s,i,c){const h=jc(c),y=pl(s,h),k=be.makeSpan(["katex"],[y]);return _c(k,c)},i4={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},s4=function(s){const i=new Ge.MathNode("mo",[new Ge.TextNode(i4[s.replace(/^\\/,"")])]);return i.setAttribute("stretchy","true"),i},l4={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},u4=function(s){return s.type==="ordgroup"?s.body.length:1};var Qn={encloseSpan:function(s,i,c,h,y){let k;const N=s.height+s.depth+c+h;if(/fbox|color|angl/.test(i)){if(k=be.makeSpan(["stretchy",i],[],y),i==="fbox"){const j=y.color&&y.getColor();j&&(k.style.borderColor=j)}}else{const j=[];/^[bx]cancel$/.test(i)&&j.push(new Cr({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(i)&&j.push(new Cr({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const G=new Ht(j,{width:"100%",height:de(N)});k=be.makeSvgSpan([],[G],y)}return k.height=N,k.style.height=de(N),k},mathMLnode:s4,svgSpan:function(s,i){function c(){let N=4e5;const j=s.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(j)){const G=u4(s.base);let re,pe,ye;if(G>5)j==="widehat"||j==="widecheck"?(re=420,N=2364,ye=.42,pe=j+"4"):(re=312,N=2340,ye=.34,pe="tilde4");else{const lt=[1,1,2,2,3,3][G];j==="widehat"||j==="widecheck"?(N=[0,1062,2364,2364,2364][lt],re=[0,239,300,360,420][lt],ye=[0,.24,.3,.3,.36,.42][lt],pe=j+lt):(N=[0,600,1033,2339,2340][lt],re=[0,260,286,306,312][lt],ye=[0,.26,.286,.3,.306,.34][lt],pe="tilde"+lt)}const Be=new jt(pe),Ze=new Ht([Be],{width:"100%",height:de(ye),viewBox:"0 0 "+N+" "+re,preserveAspectRatio:"none"});return{span:be.makeSvgSpan([],[Ze],i),minWidth:0,height:ye}}else{const G=[],re=l4[j],[pe,ye,Be]=re,Ze=Be/1e3,lt=pe.length;let Pt,Jt;if(lt===1){const Yt=re[3];Pt=["hide-tail"],Jt=[Yt]}else if(lt===2)Pt=["halfarrow-left","halfarrow-right"],Jt=["xMinYMin","xMaxYMin"];else if(lt===3)Pt=["brace-left","brace-center","brace-right"],Jt=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
487
|
-
`+lt+" children.");for(let Yt=0;Yt<lt;Yt++){const ir=new jt(pe[Yt]),nr=new Ht([ir],{width:"400em",height:de(Ze),viewBox:"0 0 "+N+" "+Be,preserveAspectRatio:Jt[Yt]+" slice"}),Er=be.makeSvgSpan([Pt[Yt]],[nr],i);if(lt===1)return{span:Er,minWidth:ye,height:Ze};Er.style.height=de(Ze),G.push(Er)}return{span:be.makeSpan(["stretchy"],G,i),minWidth:ye,height:Ze}}}const{span:h,minWidth:y,height:k}=c();return h.height=k,h.style.height=de(k),y>0&&(h.style.minWidth=de(y)),h}};function Kt(s,i){if(!s||s.type!==i)throw new Error("Expected node of type "+i+", but got "+(s?"node of type "+s.type:String(s)));return s}function bl(s){const i=Si(s);if(!i)throw new Error("Expected node of symbol group type, but got "+(s?"node of type "+s.type:String(s)));return i}function Si(s){return s&&(s.type==="atom"||vr.hasOwnProperty(s.type))?s:null}const yl=(s,i)=>{let c,h,y;s&&s.type==="supsub"?(h=Kt(s.base,"accent"),c=h.base,s.base=c,y=jr(rr(s,i)),s.base=h):(h=Kt(s,"accent"),c=h.base);const k=rr(c,i.havingCrampedStyle()),N=h.isShifty&&D.isCharacterBox(c);let j=0;if(N){const Be=D.getBaseElem(c),Ze=rr(Be,i.havingCrampedStyle());j=zr(Ze).skew}const G=h.label==="\\c";let re=G?k.height+k.depth:Math.min(k.height,i.fontMetrics().xHeight),pe;if(h.isStretchy)pe=Qn.svgSpan(h,i),pe=be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"elem",elem:pe,wrapperClasses:["svg-align"],wrapperStyle:j>0?{width:"calc(100% - "+de(2*j)+")",marginLeft:de(2*j)}:void 0}]},i);else{let Be,Ze;h.label==="\\vec"?(Be=be.staticSvg("vec",i),Ze=be.svgData.vec[1]):(Be=be.makeOrd({mode:h.mode,text:h.label},i,"textord"),Be=zr(Be),Be.italic=0,Ze=Be.width,G&&(re+=Be.depth)),pe=be.makeSpan(["accent-body"],[Be]);const lt=h.label==="\\textcircled";lt&&(pe.classes.push("accent-full"),re=k.height);let Pt=j;lt||(Pt-=Ze/2),pe.style.left=de(Pt),h.label==="\\textcircled"&&(pe.style.top=".2em"),pe=be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"kern",size:-re},{type:"elem",elem:pe}]},i)}const ye=be.makeSpan(["mord","accent"],[pe],i);return y?(y.children[0]=ye,y.height=Math.max(ye.height,y.height),y.classes[0]="mord",y):ye},Lc=(s,i)=>{const c=s.isStretchy?Qn.mathMLnode(s.label):new Ge.MathNode("mo",[Dn(s.label,s.mode)]),h=new Ge.MathNode("mover",[xr(s.base,i),c]);return h.setAttribute("accent","true"),h},c4=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(s=>"\\"+s).join("|"));ot({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(s,i)=>{const c=zn(i[0]),h=!c4.test(s.funcName),y=!h||s.funcName==="\\widehat"||s.funcName==="\\widetilde"||s.funcName==="\\widecheck";return{type:"accent",mode:s.parser.mode,label:s.funcName,isStretchy:h,isShifty:y,base:c}},htmlBuilder:yl,mathmlBuilder:Lc}),ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(s,i)=>{const c=i[0];let h=s.parser.mode;return h==="math"&&(s.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+s.funcName+" works only in text mode"),h="text"),{type:"accent",mode:h,label:s.funcName,isStretchy:!1,isShifty:!0,base:c}},htmlBuilder:yl,mathmlBuilder:Lc}),ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=i[0];return{type:"accentUnder",mode:c.mode,label:h,base:y}},htmlBuilder:(s,i)=>{const c=rr(s.base,i),h=Qn.svgSpan(s,i),y=s.label==="\\utilde"?.12:0,k=be.makeVList({positionType:"top",positionData:c.height,children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:y},{type:"elem",elem:c}]},i);return be.makeSpan(["mord","accentunder"],[k],i)},mathmlBuilder:(s,i)=>{const c=Qn.mathMLnode(s.label),h=new Ge.MathNode("munder",[xr(s.base,i),c]);return h.setAttribute("accentunder","true"),h}});const Ai=s=>{const i=new Ge.MathNode("mpadded",s?[s]:[]);return i.setAttribute("width","+0.6em"),i.setAttribute("lspace","0.3em"),i};ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(s,i,c){let{parser:h,funcName:y}=s;return{type:"xArrow",mode:h.mode,label:y,body:i[0],below:c[0]}},htmlBuilder(s,i){const c=i.style;let h=i.havingStyle(c.sup());const y=be.wrapFragment(rr(s.body,h,i),i),k=s.label.slice(0,2)==="\\x"?"x":"cd";y.classes.push(k+"-arrow-pad");let N;s.below&&(h=i.havingStyle(c.sub()),N=be.wrapFragment(rr(s.below,h,i),i),N.classes.push(k+"-arrow-pad"));const j=Qn.svgSpan(s,i),G=-i.fontMetrics().axisHeight+.5*j.height;let re=-i.fontMetrics().axisHeight-.5*j.height-.111;(y.depth>.25||s.label==="\\xleftequilibrium")&&(re-=y.depth);let pe;if(N){const ye=-i.fontMetrics().axisHeight+N.height+.5*j.height+.111;pe=be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:re},{type:"elem",elem:j,shift:G},{type:"elem",elem:N,shift:ye}]},i)}else pe=be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:re},{type:"elem",elem:j,shift:G}]},i);return pe.children[0].children[0].children[1].classes.push("svg-align"),be.makeSpan(["mrel","x-arrow"],[pe],i)},mathmlBuilder(s,i){const c=Qn.mathMLnode(s.label);c.setAttribute("minsize",s.label.charAt(0)==="x"?"1.75em":"3.0em");let h;if(s.body){const y=Ai(xr(s.body,i));if(s.below){const k=Ai(xr(s.below,i));h=new Ge.MathNode("munderover",[c,k,y])}else h=new Ge.MathNode("mover",[c,y])}else if(s.below){const y=Ai(xr(s.below,i));h=new Ge.MathNode("munder",[c,y])}else h=Ai(),h=new Ge.MathNode("mover",[c,h]);return h}});const d4=be.makeSpan;function Hc(s,i){const c=qr(s.body,i,!0);return d4([s.mclass],c,i)}function Kc(s,i){let c;const h=fn(s.body,i);return s.mclass==="minner"?c=new Ge.MathNode("mpadded",h):s.mclass==="mord"?s.isCharacterBox?(c=h[0],c.type="mi"):c=new Ge.MathNode("mi",h):(s.isCharacterBox?(c=h[0],c.type="mo"):c=new Ge.MathNode("mo",h),s.mclass==="mbin"?(c.attributes.lspace="0.22em",c.attributes.rspace="0.22em"):s.mclass==="mpunct"?(c.attributes.lspace="0em",c.attributes.rspace="0.17em"):s.mclass==="mopen"||s.mclass==="mclose"?(c.attributes.lspace="0em",c.attributes.rspace="0em"):s.mclass==="minner"&&(c.attributes.lspace="0.0556em",c.attributes.width="+0.1111em")),c}ot({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(s,i){let{parser:c,funcName:h}=s;const y=i[0];return{type:"mclass",mode:c.mode,mclass:"m"+h.slice(5),body:Dr(y),isCharacterBox:D.isCharacterBox(y)}},htmlBuilder:Hc,mathmlBuilder:Kc});const Bi=s=>{const i=s.type==="ordgroup"&&s.body.length?s.body[0]:s;return i.type==="atom"&&(i.family==="bin"||i.family==="rel")?"m"+i.family:"mord"};ot({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(s,i){let{parser:c}=s;return{type:"mclass",mode:c.mode,mclass:Bi(i[0]),body:Dr(i[1]),isCharacterBox:D.isCharacterBox(i[1])}}}),ot({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(s,i){let{parser:c,funcName:h}=s;const y=i[1],k=i[0];let N;h!=="\\stackrel"?N=Bi(y):N="mrel";const j={type:"op",mode:y.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:h!=="\\stackrel",body:Dr(y)},G={type:"supsub",mode:k.mode,base:j,sup:h==="\\underset"?null:k,sub:h==="\\underset"?k:null};return{type:"mclass",mode:c.mode,mclass:N,body:[G],isCharacterBox:D.isCharacterBox(G)}},htmlBuilder:Hc,mathmlBuilder:Kc}),ot({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:c}=s;return{type:"pmb",mode:c.mode,mclass:Bi(i[0]),body:Dr(i[0])}},htmlBuilder(s,i){const c=qr(s.body,i,!0),h=be.makeSpan([s.mclass],c,i);return h.style.textShadow="0.02em 0.01em 0.04px",h},mathmlBuilder(s,i){const c=fn(s.body,i),h=new Ge.MathNode("mstyle",c);return h.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),h}});const f4={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},qc=()=>({type:"styling",body:[],mode:"math",style:"display"}),Wc=s=>s.type==="textord"&&s.text==="@",h4=(s,i)=>(s.type==="mathord"||s.type==="atom")&&s.text===i;function p4(s,i,c){const h=f4[s];switch(h){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return c.callFunction(h,[i[0]],[i[1]]);case"\\uparrow":case"\\downarrow":{const y=c.callFunction("\\\\cdleft",[i[0]],[]),k={type:"atom",text:h,mode:"math",family:"rel"},N=c.callFunction("\\Big",[k],[]),j=c.callFunction("\\\\cdright",[i[1]],[]),G={type:"ordgroup",mode:"math",body:[y,N,j]};return c.callFunction("\\\\cdparent",[G],[])}case"\\\\cdlongequal":return c.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const y={type:"textord",text:"\\Vert",mode:"math"};return c.callFunction("\\Big",[y],[])}default:return{type:"textord",text:" ",mode:"math"}}}function m4(s){const i=[];for(s.gullet.beginGroup(),s.gullet.macros.set("\\cr","\\\\\\relax"),s.gullet.beginGroup();;){i.push(s.parseExpression(!1,"\\\\")),s.gullet.endGroup(),s.gullet.beginGroup();const k=s.fetch().text;if(k==="&"||k==="\\\\")s.consume();else if(k==="\\end"){i[i.length-1].length===0&&i.pop();break}else throw new a("Expected \\\\ or \\cr or \\end",s.nextToken)}let c=[];const h=[c];for(let k=0;k<i.length;k++){const N=i[k];let j=qc();for(let G=0;G<N.length;G++)if(!Wc(N[G]))j.body.push(N[G]);else{c.push(j),G+=1;const re=bl(N[G]).text,pe=new Array(2);if(pe[0]={type:"ordgroup",mode:"math",body:[]},pe[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(re)>-1))if("<>AV".indexOf(re)>-1)for(let Be=0;Be<2;Be++){let Ze=!0;for(let lt=G+1;lt<N.length;lt++){if(h4(N[lt],re)){Ze=!1,G=lt;break}if(Wc(N[lt]))throw new a("Missing a "+re+" character to complete a CD arrow.",N[lt]);pe[Be].body.push(N[lt])}if(Ze)throw new a("Missing a "+re+" character to complete a CD arrow.",N[G])}else throw new a('Expected one of "<>AV=|." after @',N[G]);const ye={type:"styling",body:[p4(re,pe,s)],mode:"math",style:"display"};c.push(ye),j=qc()}k%2===0?c.push(j):c.shift(),c=[],h.push(c)}s.gullet.endGroup(),s.gullet.endGroup();const y=new Array(h[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:h,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(h.length+1).fill([])}}ot({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(s,i){let{parser:c,funcName:h}=s;return{type:"cdlabel",mode:c.mode,side:h.slice(4),label:i[0]}},htmlBuilder(s,i){const c=i.havingStyle(i.style.sup()),h=be.wrapFragment(rr(s.label,c,i),i);return h.classes.push("cd-label-"+s.side),h.style.bottom=de(.8-h.depth),h.height=0,h.depth=0,h},mathmlBuilder(s,i){let c=new Ge.MathNode("mrow",[xr(s.label,i)]);return c=new Ge.MathNode("mpadded",[c]),c.setAttribute("width","0"),s.side==="left"&&c.setAttribute("lspace","-1width"),c.setAttribute("voffset","0.7em"),c=new Ge.MathNode("mstyle",[c]),c.setAttribute("displaystyle","false"),c.setAttribute("scriptlevel","1"),c}}),ot({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(s,i){let{parser:c}=s;return{type:"cdlabelparent",mode:c.mode,fragment:i[0]}},htmlBuilder(s,i){const c=be.wrapFragment(rr(s.fragment,i),i);return c.classes.push("cd-vert-arrow"),c},mathmlBuilder(s,i){return new Ge.MathNode("mrow",[xr(s.fragment,i)])}}),ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:c}=s;const h=Kt(i[0],"ordgroup").body;let y="";for(let j=0;j<h.length;j++){const G=Kt(h[j],"textord");y+=G.text}let k=parseInt(y),N;if(isNaN(k))throw new a("\\@char has non-numeric argument "+y);if(k<0||k>=1114111)throw new a("\\@char with invalid code point "+y);return k<=65535?N=String.fromCharCode(k):(k-=65536,N=String.fromCharCode((k>>10)+55296,(k&1023)+56320)),{type:"textord",mode:c.mode,text:N}}});const Vc=(s,i)=>{const c=qr(s.body,i.withColor(s.color),!1);return be.makeFragment(c)},Uc=(s,i)=>{const c=fn(s.body,i.withColor(s.color)),h=new Ge.MathNode("mstyle",c);return h.setAttribute("mathcolor",s.color),h};ot({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(s,i){let{parser:c}=s;const h=Kt(i[0],"color-token").color,y=i[1];return{type:"color",mode:c.mode,color:h,body:Dr(y)}},htmlBuilder:Vc,mathmlBuilder:Uc}),ot({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(s,i){let{parser:c,breakOnTokenText:h}=s;const y=Kt(i[0],"color-token").color;c.gullet.macros.set("\\current@color",y);const k=c.parseExpression(!0,h);return{type:"color",mode:c.mode,color:y,body:k}},htmlBuilder:Vc,mathmlBuilder:Uc}),ot({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(s,i,c){let{parser:h}=s;const y=h.gullet.future().text==="["?h.parseSizeGroup(!0):null,k=!h.settings.displayMode||!h.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:h.mode,newLine:k,size:y&&Kt(y,"size").value}},htmlBuilder(s,i){const c=be.makeSpan(["mspace"],[],i);return s.newLine&&(c.classes.push("newline"),s.size&&(c.style.marginTop=de(Pe(s.size,i)))),c},mathmlBuilder(s,i){const c=new Ge.MathNode("mspace");return s.newLine&&(c.setAttribute("linebreak","newline"),s.size&&c.setAttribute("height",de(Pe(s.size,i)))),c}});const xl={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Xc=s=>{const i=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",s);return i},g4=s=>{let i=s.gullet.popToken();return i.text==="="&&(i=s.gullet.popToken(),i.text===" "&&(i=s.gullet.popToken())),i},Yc=(s,i,c,h)=>{let y=s.gullet.macros.get(c.text);y==null&&(c.noexpand=!0,y={tokens:[c],numArgs:0,unexpandable:!s.gullet.isExpandable(c.text)}),s.gullet.macros.set(i,y,h)};ot({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(s){let{parser:i,funcName:c}=s;i.consumeSpaces();const h=i.fetch();if(xl[h.text])return(c==="\\global"||c==="\\\\globallong")&&(h.text=xl[h.text]),Kt(i.parseFunction(),"internal");throw new a("Invalid token after macro prefix",h)}}),ot({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:c}=s,h=i.gullet.popToken();const y=h.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(y))throw new a("Expected a control sequence",h);let k=0,N;const j=[[]];for(;i.gullet.future().text!=="{";)if(h=i.gullet.popToken(),h.text==="#"){if(i.gullet.future().text==="{"){N=i.gullet.future(),j[k].push("{");break}if(h=i.gullet.popToken(),!/^[1-9]$/.test(h.text))throw new a('Invalid argument number "'+h.text+'"');if(parseInt(h.text)!==k+1)throw new a('Argument number "'+h.text+'" out of order');k++,j.push([])}else{if(h.text==="EOF")throw new a("Expected a macro definition");j[k].push(h.text)}let{tokens:G}=i.gullet.consumeArg();return N&&G.unshift(N),(c==="\\edef"||c==="\\xdef")&&(G=i.gullet.expandTokens(G),G.reverse()),i.gullet.macros.set(y,{tokens:G,numArgs:k,delimiters:j},c===xl[c]),{type:"internal",mode:i.mode}}}),ot({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:c}=s;const h=Xc(i.gullet.popToken());i.gullet.consumeSpaces();const y=g4(i);return Yc(i,h,y,c==="\\\\globallet"),{type:"internal",mode:i.mode}}}),ot({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:c}=s;const h=Xc(i.gullet.popToken()),y=i.gullet.popToken(),k=i.gullet.popToken();return Yc(i,h,k,c==="\\\\globalfuture"),i.gullet.pushToken(k),i.gullet.pushToken(y),{type:"internal",mode:i.mode}}});const Ma=function(s,i,c){const h=_t.math[s]&&_t.math[s].replace,y=at(h||s,i,c);if(!y)throw new Error("Unsupported symbol "+s+" and font size "+i+".");return y},wl=function(s,i,c,h){const y=c.havingBaseStyle(i),k=be.makeSpan(h.concat(y.sizingClasses(c)),[s],c),N=y.sizeMultiplier/c.sizeMultiplier;return k.height*=N,k.depth*=N,k.maxFontSize=y.sizeMultiplier,k},Gc=function(s,i,c){const h=i.havingBaseStyle(c),y=(1-i.sizeMultiplier/h.sizeMultiplier)*i.fontMetrics().axisHeight;s.classes.push("delimcenter"),s.style.top=de(y),s.height-=y,s.depth+=y},v4=function(s,i,c,h,y,k){const N=be.makeSymbol(s,"Main-Regular",y,h),j=wl(N,i,h,k);return c&&Gc(j,h,i),j},b4=function(s,i,c,h){return be.makeSymbol(s,"Size"+i+"-Regular",c,h)},Zc=function(s,i,c,h,y,k){const N=b4(s,i,y,h),j=wl(be.makeSpan(["delimsizing","size"+i],[N],h),R.TEXT,h,k);return c&&Gc(j,h,R.TEXT),j},Cl=function(s,i,c){let h;return i==="Size1-Regular"?h="delim-size1":h="delim-size4",{type:"elem",elem:be.makeSpan(["delimsizinginner",h],[be.makeSpan([],[be.makeSymbol(s,i,c)])])}},Dl=function(s,i,c){const h=$e["Size4-Regular"][s.charCodeAt(0)]?$e["Size4-Regular"][s.charCodeAt(0)][4]:$e["Size1-Regular"][s.charCodeAt(0)][4],y=new jt("inner",Se(s,Math.round(1e3*i))),k=new Ht([y],{width:de(h),height:de(i),style:"width:"+de(h),viewBox:"0 0 "+1e3*h+" "+Math.round(1e3*i),preserveAspectRatio:"xMinYMin"}),N=be.makeSvgSpan([],[k],c);return N.height=i,N.style.height=de(i),N.style.width=de(h),{type:"elem",elem:N}},El=.008,Fi={type:"kern",size:-1*El},y4=["|","\\lvert","\\rvert","\\vert"],x4=["\\|","\\lVert","\\rVert","\\Vert"],Jc=function(s,i,c,h,y,k){let N,j,G,re,pe="",ye=0;N=G=re=s,j=null;let Be="Size1-Regular";s==="\\uparrow"?G=re="\u23D0":s==="\\Uparrow"?G=re="\u2016":s==="\\downarrow"?N=G="\u23D0":s==="\\Downarrow"?N=G="\u2016":s==="\\updownarrow"?(N="\\uparrow",G="\u23D0",re="\\downarrow"):s==="\\Updownarrow"?(N="\\Uparrow",G="\u2016",re="\\Downarrow"):y4.includes(s)?(G="\u2223",pe="vert",ye=333):x4.includes(s)?(G="\u2225",pe="doublevert",ye=556):s==="["||s==="\\lbrack"?(N="\u23A1",G="\u23A2",re="\u23A3",Be="Size4-Regular",pe="lbrack",ye=667):s==="]"||s==="\\rbrack"?(N="\u23A4",G="\u23A5",re="\u23A6",Be="Size4-Regular",pe="rbrack",ye=667):s==="\\lfloor"||s==="\u230A"?(G=N="\u23A2",re="\u23A3",Be="Size4-Regular",pe="lfloor",ye=667):s==="\\lceil"||s==="\u2308"?(N="\u23A1",G=re="\u23A2",Be="Size4-Regular",pe="lceil",ye=667):s==="\\rfloor"||s==="\u230B"?(G=N="\u23A5",re="\u23A6",Be="Size4-Regular",pe="rfloor",ye=667):s==="\\rceil"||s==="\u2309"?(N="\u23A4",G=re="\u23A5",Be="Size4-Regular",pe="rceil",ye=667):s==="("||s==="\\lparen"?(N="\u239B",G="\u239C",re="\u239D",Be="Size4-Regular",pe="lparen",ye=875):s===")"||s==="\\rparen"?(N="\u239E",G="\u239F",re="\u23A0",Be="Size4-Regular",pe="rparen",ye=875):s==="\\{"||s==="\\lbrace"?(N="\u23A7",j="\u23A8",re="\u23A9",G="\u23AA",Be="Size4-Regular"):s==="\\}"||s==="\\rbrace"?(N="\u23AB",j="\u23AC",re="\u23AD",G="\u23AA",Be="Size4-Regular"):s==="\\lgroup"||s==="\u27EE"?(N="\u23A7",re="\u23A9",G="\u23AA",Be="Size4-Regular"):s==="\\rgroup"||s==="\u27EF"?(N="\u23AB",re="\u23AD",G="\u23AA",Be="Size4-Regular"):s==="\\lmoustache"||s==="\u23B0"?(N="\u23A7",re="\u23AD",G="\u23AA",Be="Size4-Regular"):(s==="\\rmoustache"||s==="\u23B1")&&(N="\u23AB",re="\u23A9",G="\u23AA",Be="Size4-Regular");const Ze=Ma(N,Be,y),lt=Ze.height+Ze.depth,Pt=Ma(G,Be,y),Jt=Pt.height+Pt.depth,Yt=Ma(re,Be,y),ir=Yt.height+Yt.depth;let nr=0,Er=1;if(j!==null){const Ir=Ma(j,Be,y);nr=Ir.height+Ir.depth,Er=2}const Zr=lt+ir+nr,an=Math.max(0,Math.ceil((i-Zr)/(Er*Jt))),En=Zr+an*Er*Jt;let Qo=h.fontMetrics().axisHeight;c&&(Qo*=h.sizeMultiplier);const sr=En/2-Qo,mr=[];if(pe.length>0){const Ir=En-lt-ir,Mr=Math.round(En*1e3),kn=Ae(pe,Math.round(Ir*1e3)),V4=new jt(pe,kn),Hd=(ye/1e3).toFixed(3)+"em",Kd=(Mr/1e3).toFixed(3)+"em",U4=new Ht([V4],{width:Hd,height:Kd,viewBox:"0 0 "+ye+" "+Mr}),Ti=be.makeSvgSpan([],[U4],h);Ti.height=Mr/1e3,Ti.style.width=Hd,Ti.style.height=Kd,mr.push({type:"elem",elem:Ti})}else{if(mr.push(Cl(re,Be,y)),mr.push(Fi),j===null){const Ir=En-lt-ir+2*El;mr.push(Dl(G,Ir,h))}else{const Ir=(En-lt-ir-nr)/2+2*El;mr.push(Dl(G,Ir,h)),mr.push(Fi),mr.push(Cl(j,Be,y)),mr.push(Fi),mr.push(Dl(G,Ir,h))}mr.push(Fi),mr.push(Cl(N,Be,y))}const kr=h.havingBaseStyle(R.TEXT),Br=be.makeVList({positionType:"bottom",positionData:sr,children:mr},kr);return wl(be.makeSpan(["delimsizing","mult"],[Br],kr),R.TEXT,h,k)},kl=80,Sl=.08,Al=function(s,i,c,h,y){const k=we(s,h,c),N=new jt(s,k),j=new Ht([N],{width:"400em",height:de(i),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"});return be.makeSvgSpan(["hide-tail"],[j],y)},w4=function(s,i){const c=i.havingBaseSizing(),h=rd("\\surd",s*c.sizeMultiplier,td,c);let y=c.sizeMultiplier;const k=Math.max(0,i.minRuleThickness-i.fontMetrics().sqrtRuleThickness);let N,j=0,G=0,re=0,pe;return h.type==="small"?(re=1e3+1e3*k+kl,s<1?y=1:s<1.4&&(y=.7),j=(1+k+Sl)/y,G=(1+k)/y,N=Al("sqrtMain",j,re,k,i),N.style.minWidth="0.853em",pe=.833/y):h.type==="large"?(re=(1e3+kl)*Oa[h.size],G=(Oa[h.size]+k)/y,j=(Oa[h.size]+k+Sl)/y,N=Al("sqrtSize"+h.size,j,re,k,i),N.style.minWidth="1.02em",pe=1/y):(j=s+k+Sl,G=s+k,re=Math.floor(1e3*s+k)+kl,N=Al("sqrtTall",j,re,k,i),N.style.minWidth="0.742em",pe=1.056),N.height=G,N.style.height=de(j),{span:N,advanceWidth:pe,ruleWidth:(i.fontMetrics().sqrtRuleThickness+k)*y}},Qc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],C4=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],ed=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Oa=[0,1.2,1.8,2.4,3],D4=function(s,i,c,h,y){if(s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle"),Qc.includes(s)||ed.includes(s))return Zc(s,i,!1,c,h,y);if(C4.includes(s))return Jc(s,Oa[i],!1,c,h,y);throw new a("Illegal delimiter: '"+s+"'")},E4=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],k4=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"stack"}],td=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],S4=function(s){if(s.type==="small")return"Main-Regular";if(s.type==="large")return"Size"+s.size+"-Regular";if(s.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+s.type+"' here.")},rd=function(s,i,c,h){const y=Math.min(2,3-h.style.size);for(let k=y;k<c.length&&c[k].type!=="stack";k++){const N=Ma(s,S4(c[k]),"math");let j=N.height+N.depth;if(c[k].type==="small"){const G=h.havingBaseStyle(c[k].style);j*=G.sizeMultiplier}if(j>i)return c[k]}return c[c.length-1]},nd=function(s,i,c,h,y,k){s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle");let N;ed.includes(s)?N=E4:Qc.includes(s)?N=td:N=k4;const j=rd(s,i,N,h);return j.type==="small"?v4(s,j.style,c,h,y,k):j.type==="large"?Zc(s,j.size,c,h,y,k):Jc(s,i,c,h,y,k)};var eo={sqrtImage:w4,sizedDelim:D4,sizeToMaxHeight:Oa,customSizedDelim:nd,leftRightDelim:function(s,i,c,h,y,k){const N=h.fontMetrics().axisHeight*h.sizeMultiplier,j=901,G=5/h.fontMetrics().ptPerEm,re=Math.max(i-N,c+N),pe=Math.max(re/500*j,2*re-G);return nd(s,pe,!0,h,y,k)}};const od={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},A4=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Ni(s,i){const c=Si(s);if(c&&A4.includes(c.text))return c;throw c?new a("Invalid delimiter '"+c.text+"' after '"+i.funcName+"'",s):new a("Invalid delimiter type '"+s.type+"'",s)}ot({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(s,i)=>{const c=Ni(i[0],s);return{type:"delimsizing",mode:s.parser.mode,size:od[s.funcName].size,mclass:od[s.funcName].mclass,delim:c.text}},htmlBuilder:(s,i)=>s.delim==="."?be.makeSpan([s.mclass]):eo.sizedDelim(s.delim,s.size,i,s.mode,[s.mclass]),mathmlBuilder:s=>{const i=[];s.delim!=="."&&i.push(Dn(s.delim,s.mode));const c=new Ge.MathNode("mo",i);s.mclass==="mopen"||s.mclass==="mclose"?c.setAttribute("fence","true"):c.setAttribute("fence","false"),c.setAttribute("stretchy","true");const h=de(eo.sizeToMaxHeight[s.size]);return c.setAttribute("minsize",h),c.setAttribute("maxsize",h),c}});function ad(s){if(!s.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ot({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const c=s.parser.gullet.macros.get("\\current@color");if(c&&typeof c!="string")throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:s.parser.mode,delim:Ni(i[0],s).text,color:c}}}),ot({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const c=Ni(i[0],s),h=s.parser;++h.leftrightDepth;const y=h.parseExpression(!1);--h.leftrightDepth,h.expect("\\right",!1);const k=Kt(h.parseFunction(),"leftright-right");return{type:"leftright",mode:h.mode,body:y,left:c.text,right:k.delim,rightColor:k.color}},htmlBuilder:(s,i)=>{ad(s);const c=qr(s.body,i,!0,["mopen","mclose"]);let h=0,y=0,k=!1;for(let G=0;G<c.length;G++)c[G].isMiddle?k=!0:(h=Math.max(c[G].height,h),y=Math.max(c[G].depth,y));h*=i.sizeMultiplier,y*=i.sizeMultiplier;let N;if(s.left==="."?N=$a(i,["mopen"]):N=eo.leftRightDelim(s.left,h,y,i,s.mode,["mopen"]),c.unshift(N),k)for(let G=1;G<c.length;G++){const re=c[G].isMiddle;re&&(c[G]=eo.leftRightDelim(re.delim,h,y,re.options,s.mode,[]))}let j;if(s.right===".")j=$a(i,["mclose"]);else{const G=s.rightColor?i.withColor(s.rightColor):i;j=eo.leftRightDelim(s.right,h,y,G,s.mode,["mclose"])}return c.push(j),be.makeSpan(["minner"],c,i)},mathmlBuilder:(s,i)=>{ad(s);const c=fn(s.body,i);if(s.left!=="."){const h=new Ge.MathNode("mo",[Dn(s.left,s.mode)]);h.setAttribute("fence","true"),c.unshift(h)}if(s.right!=="."){const h=new Ge.MathNode("mo",[Dn(s.right,s.mode)]);h.setAttribute("fence","true"),s.rightColor&&h.setAttribute("mathcolor",s.rightColor),c.push(h)}return ml(c)}}),ot({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const c=Ni(i[0],s);if(!s.parser.leftrightDepth)throw new a("\\middle without preceding \\left",c);return{type:"middle",mode:s.parser.mode,delim:c.text}},htmlBuilder:(s,i)=>{let c;if(s.delim===".")c=$a(i,[]);else{c=eo.sizedDelim(s.delim,1,i,s.mode,[]);const h={delim:s.delim,options:i};c.isMiddle=h}return c},mathmlBuilder:(s,i)=>{const c=s.delim==="\\vert"||s.delim==="|"?Dn("|","text"):Dn(s.delim,s.mode),h=new Ge.MathNode("mo",[c]);return h.setAttribute("fence","true"),h.setAttribute("lspace","0.05em"),h.setAttribute("rspace","0.05em"),h}});const Bl=(s,i)=>{const c=be.wrapFragment(rr(s.body,i),i),h=s.label.slice(1);let y=i.sizeMultiplier,k,N=0;const j=D.isCharacterBox(s.body);if(h==="sout")k=be.makeSpan(["stretchy","sout"]),k.height=i.fontMetrics().defaultRuleThickness/y,N=-.5*i.fontMetrics().xHeight;else if(h==="phase"){const re=Pe({number:.6,unit:"pt"},i),pe=Pe({number:.35,unit:"ex"},i),ye=i.havingBaseSizing();y=y/ye.sizeMultiplier;const Be=c.height+c.depth+re+pe;c.style.paddingLeft=de(Be/2+re);const Ze=Math.floor(1e3*Be*y),lt=ce(Ze),Pt=new Ht([new jt("phase",lt)],{width:"400em",height:de(Ze/1e3),viewBox:"0 0 400000 "+Ze,preserveAspectRatio:"xMinYMin slice"});k=be.makeSvgSpan(["hide-tail"],[Pt],i),k.style.height=de(Be),N=c.depth+re+pe}else{/cancel/.test(h)?j||c.classes.push("cancel-pad"):h==="angl"?c.classes.push("anglpad"):c.classes.push("boxpad");let re=0,pe=0,ye=0;/box/.test(h)?(ye=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness),re=i.fontMetrics().fboxsep+(h==="colorbox"?0:ye),pe=re):h==="angl"?(ye=Math.max(i.fontMetrics().defaultRuleThickness,i.minRuleThickness),re=4*ye,pe=Math.max(0,.25-c.depth)):(re=j?.2:0,pe=re),k=Qn.encloseSpan(c,h,re,pe,i),/fbox|boxed|fcolorbox/.test(h)?(k.style.borderStyle="solid",k.style.borderWidth=de(ye)):h==="angl"&&ye!==.049&&(k.style.borderTopWidth=de(ye),k.style.borderRightWidth=de(ye)),N=c.depth+pe,s.backgroundColor&&(k.style.backgroundColor=s.backgroundColor,s.borderColor&&(k.style.borderColor=s.borderColor))}let G;if(s.backgroundColor)G=be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:k,shift:N},{type:"elem",elem:c,shift:0}]},i);else{const re=/cancel|phase/.test(h)?["svg-align"]:[];G=be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:k,shift:N,wrapperClasses:re}]},i)}return/cancel/.test(h)&&(G.height=c.height,G.depth=c.depth),/cancel/.test(h)&&!j?be.makeSpan(["mord","cancel-lap"],[G],i):be.makeSpan(["mord"],[G],i)},Fl=(s,i)=>{let c=0;const h=new Ge.MathNode(s.label.indexOf("colorbox")>-1?"mpadded":"menclose",[xr(s.body,i)]);switch(s.label){case"\\cancel":h.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":h.setAttribute("notation","downdiagonalstrike");break;case"\\phase":h.setAttribute("notation","phasorangle");break;case"\\sout":h.setAttribute("notation","horizontalstrike");break;case"\\fbox":h.setAttribute("notation","box");break;case"\\angl":h.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(c=i.fontMetrics().fboxsep*i.fontMetrics().ptPerEm,h.setAttribute("width","+"+2*c+"pt"),h.setAttribute("height","+"+2*c+"pt"),h.setAttribute("lspace",c+"pt"),h.setAttribute("voffset",c+"pt"),s.label==="\\fcolorbox"){const y=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness);h.setAttribute("style","border: "+y+"em solid "+String(s.borderColor))}break;case"\\xcancel":h.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return s.backgroundColor&&h.setAttribute("mathbackground",s.backgroundColor),h};ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(s,i,c){let{parser:h,funcName:y}=s;const k=Kt(i[0],"color-token").color,N=i[1];return{type:"enclose",mode:h.mode,label:y,backgroundColor:k,body:N}},htmlBuilder:Bl,mathmlBuilder:Fl}),ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(s,i,c){let{parser:h,funcName:y}=s;const k=Kt(i[0],"color-token").color,N=Kt(i[1],"color-token").color,j=i[2];return{type:"enclose",mode:h.mode,label:y,backgroundColor:N,borderColor:k,body:j}},htmlBuilder:Bl,mathmlBuilder:Fl}),ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(s,i){let{parser:c}=s;return{type:"enclose",mode:c.mode,label:"\\fbox",body:i[0]}}}),ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(s,i){let{parser:c,funcName:h}=s;const y=i[0];return{type:"enclose",mode:c.mode,label:h,body:y}},htmlBuilder:Bl,mathmlBuilder:Fl}),ot({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(s,i){let{parser:c}=s;return{type:"enclose",mode:c.mode,label:"\\angl",body:i[0]}}});const id={};function _n(s){let{type:i,names:c,props:h,handler:y,htmlBuilder:k,mathmlBuilder:N}=s;const j={type:i,numArgs:h.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:y};for(let G=0;G<c.length;++G)id[c[G]]=j;k&&(Rr[i]=k),N&&($n[i]=N)}const sd={};function H(s,i){sd[s]=i}class hn{constructor(i,c,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=i,this.start=c,this.end=h}static range(i,c){return c?!i||!i.loc||!c.loc||i.loc.lexer!==c.loc.lexer?null:new hn(i.loc.lexer,i.loc.start,c.loc.end):i&&i.loc}}class yn{constructor(i,c){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=i,this.loc=c}range(i,c){return new yn(c,hn.range(this,i))}}function ld(s){const i=[];s.consumeSpaces();let c=s.fetch().text;for(c==="\\relax"&&(s.consume(),s.consumeSpaces(),c=s.fetch().text);c==="\\hline"||c==="\\hdashline";)s.consume(),i.push(c==="\\hdashline"),s.consumeSpaces(),c=s.fetch().text;return i}const $i=s=>{if(!s.parser.settings.displayMode)throw new a("{"+s.envName+"} can be used only in display mode.")};function Nl(s){if(s.indexOf("ed")===-1)return s.indexOf("*")===-1}function go(s,i,c){let{hskipBeforeAndAfter:h,addJot:y,cols:k,arraystretch:N,colSeparationType:j,autoTag:G,singleRow:re,emptySingleRow:pe,maxNumCols:ye,leqno:Be}=i;if(s.gullet.beginGroup(),re||s.gullet.macros.set("\\cr","\\\\\\relax"),!N){const Er=s.gullet.expandMacroAsText("\\arraystretch");if(Er==null)N=1;else if(N=parseFloat(Er),!N||N<0)throw new a("Invalid \\arraystretch: "+Er)}s.gullet.beginGroup();let Ze=[];const lt=[Ze],Pt=[],Jt=[],Yt=G!=null?[]:void 0;function ir(){G&&s.gullet.macros.set("\\@eqnsw","1",!0)}function nr(){Yt&&(s.gullet.macros.get("\\df@tag")?(Yt.push(s.subparse([new yn("\\df@tag")])),s.gullet.macros.set("\\df@tag",void 0,!0)):Yt.push(!!G&&s.gullet.macros.get("\\@eqnsw")==="1"))}for(ir(),Jt.push(ld(s));;){let Er=s.parseExpression(!1,re?"\\end":"\\\\");s.gullet.endGroup(),s.gullet.beginGroup(),Er={type:"ordgroup",mode:s.mode,body:Er},c&&(Er={type:"styling",mode:s.mode,style:c,body:[Er]}),Ze.push(Er);const Zr=s.fetch().text;if(Zr==="&"){if(ye&&Ze.length===ye){if(re||j)throw new a("Too many tab characters: &",s.nextToken);s.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}s.consume()}else if(Zr==="\\end"){nr(),Ze.length===1&&Er.type==="styling"&&Er.body[0].body.length===0&&(lt.length>1||!pe)&<.pop(),Jt.length<lt.length+1&&Jt.push([]);break}else if(Zr==="\\\\"){s.consume();let an;s.gullet.future().text!==" "&&(an=s.parseSizeGroup(!0)),Pt.push(an?an.value:null),nr(),Jt.push(ld(s)),Ze=[],lt.push(Ze),ir()}else throw new a("Expected & or \\\\ or \\cr or \\end",s.nextToken)}return s.gullet.endGroup(),s.gullet.endGroup(),{type:"array",mode:s.mode,addJot:y,arraystretch:N,body:lt,cols:k,rowGaps:Pt,hskipBeforeAndAfter:h,hLinesBeforeRow:Jt,colSeparationType:j,tags:Yt,leqno:Be}}function $l(s){return s.slice(0,1)==="d"?"display":"text"}const Ln=function(s,i){let c,h;const y=s.body.length,k=s.hLinesBeforeRow;let N=0,j=new Array(y);const G=[],re=Math.max(i.fontMetrics().arrayRuleWidth,i.minRuleThickness),pe=1/i.fontMetrics().ptPerEm;let ye=5*pe;s.colSeparationType&&s.colSeparationType==="small"&&(ye=.2778*(i.havingStyle(R.SCRIPT).sizeMultiplier/i.sizeMultiplier));const Be=s.colSeparationType==="CD"?Pe({number:3,unit:"ex"},i):12*pe,Ze=3*pe,lt=s.arraystretch*Be,Pt=.7*lt,Jt=.3*lt;let Yt=0;function ir(sr){for(let mr=0;mr<sr.length;++mr)mr>0&&(Yt+=.25),G.push({pos:Yt,isDashed:sr[mr]})}for(ir(k[0]),c=0;c<s.body.length;++c){const sr=s.body[c];let mr=Pt,kr=Jt;N<sr.length&&(N=sr.length);const Br=new Array(sr.length);for(h=0;h<sr.length;++h){const kn=rr(sr[h],i);kr<kn.depth&&(kr=kn.depth),mr<kn.height&&(mr=kn.height),Br[h]=kn}const Ir=s.rowGaps[c];let Mr=0;Ir&&(Mr=Pe(Ir,i),Mr>0&&(Mr+=Jt,kr<Mr&&(kr=Mr),Mr=0)),s.addJot&&(kr+=Ze),Br.height=mr,Br.depth=kr,Yt+=mr,Br.pos=Yt,Yt+=kr+Mr,j[c]=Br,ir(k[c+1])}const nr=Yt/2+i.fontMetrics().axisHeight,Er=s.cols||[],Zr=[];let an,En;const Qo=[];if(s.tags&&s.tags.some(sr=>sr))for(c=0;c<y;++c){const sr=j[c],mr=sr.pos-nr,kr=s.tags[c];let Br;kr===!0?Br=be.makeSpan(["eqn-num"],[],i):kr===!1?Br=be.makeSpan([],[],i):Br=be.makeSpan([],qr(kr,i,!0),i),Br.depth=sr.depth,Br.height=sr.height,Qo.push({type:"elem",elem:Br,shift:mr})}for(h=0,En=0;h<N||En<Er.length;++h,++En){let sr=Er[En]||{},mr=!0;for(;sr.type==="separator";){if(mr||(an=be.makeSpan(["arraycolsep"],[]),an.style.width=de(i.fontMetrics().doubleRuleSep),Zr.push(an)),sr.separator==="|"||sr.separator===":"){const Ir=sr.separator==="|"?"solid":"dashed",Mr=be.makeSpan(["vertical-separator"],[],i);Mr.style.height=de(Yt),Mr.style.borderRightWidth=de(re),Mr.style.borderRightStyle=Ir,Mr.style.margin="0 "+de(-re/2);const kn=Yt-nr;kn&&(Mr.style.verticalAlign=de(-kn)),Zr.push(Mr)}else throw new a("Invalid separator type: "+sr.separator);En++,sr=Er[En]||{},mr=!1}if(h>=N)continue;let kr;(h>0||s.hskipBeforeAndAfter)&&(kr=D.deflt(sr.pregap,ye),kr!==0&&(an=be.makeSpan(["arraycolsep"],[]),an.style.width=de(kr),Zr.push(an)));let Br=[];for(c=0;c<y;++c){const Ir=j[c],Mr=Ir[h];if(!Mr)continue;const kn=Ir.pos-nr;Mr.depth=Ir.depth,Mr.height=Ir.height,Br.push({type:"elem",elem:Mr,shift:kn})}Br=be.makeVList({positionType:"individualShift",children:Br},i),Br=be.makeSpan(["col-align-"+(sr.align||"c")],[Br]),Zr.push(Br),(h<N-1||s.hskipBeforeAndAfter)&&(kr=D.deflt(sr.postgap,ye),kr!==0&&(an=be.makeSpan(["arraycolsep"],[]),an.style.width=de(kr),Zr.push(an)))}if(j=be.makeSpan(["mtable"],Zr),G.length>0){const sr=be.makeLineSpan("hline",i,re),mr=be.makeLineSpan("hdashline",i,re),kr=[{type:"elem",elem:j,shift:0}];for(;G.length>0;){const Br=G.pop(),Ir=Br.pos-nr;Br.isDashed?kr.push({type:"elem",elem:mr,shift:Ir}):kr.push({type:"elem",elem:sr,shift:Ir})}j=be.makeVList({positionType:"individualShift",children:kr},i)}if(Qo.length===0)return be.makeSpan(["mord"],[j],i);{let sr=be.makeVList({positionType:"individualShift",children:Qo},i);return sr=be.makeSpan(["tag"],[sr],i),be.makeFragment([j,sr])}},B4={c:"center ",l:"left ",r:"right "},Hn=function(s,i){const c=[],h=new Ge.MathNode("mtd",[],["mtr-glue"]),y=new Ge.MathNode("mtd",[],["mml-eqn-num"]);for(let ye=0;ye<s.body.length;ye++){const Be=s.body[ye],Ze=[];for(let lt=0;lt<Be.length;lt++)Ze.push(new Ge.MathNode("mtd",[xr(Be[lt],i)]));s.tags&&s.tags[ye]&&(Ze.unshift(h),Ze.push(h),s.leqno?Ze.unshift(y):Ze.push(y)),c.push(new Ge.MathNode("mtr",Ze))}let k=new Ge.MathNode("mtable",c);const N=s.arraystretch===.5?.1:.16+s.arraystretch-1+(s.addJot?.09:0);k.setAttribute("rowspacing",de(N));let j="",G="";if(s.cols&&s.cols.length>0){const ye=s.cols;let Be="",Ze=!1,lt=0,Pt=ye.length;ye[0].type==="separator"&&(j+="top ",lt=1),ye[ye.length-1].type==="separator"&&(j+="bottom ",Pt-=1);for(let Jt=lt;Jt<Pt;Jt++)ye[Jt].type==="align"?(G+=B4[ye[Jt].align],Ze&&(Be+="none "),Ze=!0):ye[Jt].type==="separator"&&Ze&&(Be+=ye[Jt].separator==="|"?"solid ":"dashed ",Ze=!1);k.setAttribute("columnalign",G.trim()),/[sd]/.test(Be)&&k.setAttribute("columnlines",Be.trim())}if(s.colSeparationType==="align"){const ye=s.cols||[];let Be="";for(let Ze=1;Ze<ye.length;Ze++)Be+=Ze%2?"0em ":"1em ";k.setAttribute("columnspacing",Be.trim())}else s.colSeparationType==="alignat"||s.colSeparationType==="gather"?k.setAttribute("columnspacing","0em"):s.colSeparationType==="small"?k.setAttribute("columnspacing","0.2778em"):s.colSeparationType==="CD"?k.setAttribute("columnspacing","0.5em"):k.setAttribute("columnspacing","1em");let re="";const pe=s.hLinesBeforeRow;j+=pe[0].length>0?"left ":"",j+=pe[pe.length-1].length>0?"right ":"";for(let ye=1;ye<pe.length-1;ye++)re+=pe[ye].length===0?"none ":pe[ye][0]?"dashed ":"solid ";return/[sd]/.test(re)&&k.setAttribute("rowlines",re.trim()),j!==""&&(k=new Ge.MathNode("menclose",[k]),k.setAttribute("notation",j.trim())),s.arraystretch&&s.arraystretch<1&&(k=new Ge.MathNode("mstyle",[k]),k.setAttribute("scriptlevel","1")),k},ud=function(s,i){s.envName.indexOf("ed")===-1&&$i(s);const c=[],h=s.envName.indexOf("at")>-1?"alignat":"align",y=s.envName==="split",k=go(s.parser,{cols:c,addJot:!0,autoTag:y?void 0:Nl(s.envName),emptySingleRow:!0,colSeparationType:h,maxNumCols:y?2:void 0,leqno:s.parser.settings.leqno},"display");let N,j=0;const G={type:"ordgroup",mode:s.mode,body:[]};if(i[0]&&i[0].type==="ordgroup"){let pe="";for(let ye=0;ye<i[0].body.length;ye++){const Be=Kt(i[0].body[ye],"textord");pe+=Be.text}N=Number(pe),j=N*2}const re=!j;k.body.forEach(function(pe){for(let ye=1;ye<pe.length;ye+=2){const Be=Kt(pe[ye],"styling");Kt(Be.body[0],"ordgroup").body.unshift(G)}if(re)j<pe.length&&(j=pe.length);else{const ye=pe.length/2;if(N<ye)throw new a("Too many math in a row: "+("expected "+N+", but got "+ye),pe[0])}});for(let pe=0;pe<j;++pe){let ye="r",Be=0;pe%2===1?ye="l":pe>0&&re&&(Be=1),c[pe]={type:"align",align:ye,pregap:Be,postgap:0}}return k.colSeparationType=re?"align":"alignat",k};_n({type:"array",names:["array","darray"],props:{numArgs:1},handler(s,i){const c=(Si(i[0])?[i[0]]:Kt(i[0],"ordgroup").body).map(function(y){const k=bl(y).text;if("lcr".indexOf(k)!==-1)return{type:"align",align:k};if(k==="|")return{type:"separator",separator:"|"};if(k===":")return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+k,y)}),h={cols:c,hskipBeforeAndAfter:!0,maxNumCols:c.length};return go(s.parser,h,$l(s.envName))},htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(s){const i={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[s.envName.replace("*","")];let c="c";const h={hskipBeforeAndAfter:!1,cols:[{type:"align",align:c}]};if(s.envName.charAt(s.envName.length-1)==="*"){const N=s.parser;if(N.consumeSpaces(),N.fetch().text==="["){if(N.consume(),N.consumeSpaces(),c=N.fetch().text,"lcr".indexOf(c)===-1)throw new a("Expected l or c or r",N.nextToken);N.consume(),N.consumeSpaces(),N.expect("]"),N.consume(),h.cols=[{type:"align",align:c}]}}const y=go(s.parser,h,$l(s.envName)),k=Math.max(0,...y.body.map(N=>N.length));return y.cols=new Array(k).fill({type:"align",align:c}),i?{type:"leftright",mode:s.mode,body:[y],left:i[0],right:i[1],rightColor:void 0}:y},htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(s){const i={arraystretch:.5},c=go(s.parser,i,"script");return c.colSeparationType="small",c},htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["subarray"],props:{numArgs:1},handler(s,i){const c=(Si(i[0])?[i[0]]:Kt(i[0],"ordgroup").body).map(function(y){const k=bl(y).text;if("lc".indexOf(k)!==-1)return{type:"align",align:k};throw new a("Unknown column alignment: "+k,y)});if(c.length>1)throw new a("{subarray} can contain only one column");let h={cols:c,hskipBeforeAndAfter:!1,arraystretch:.5};if(h=go(s.parser,h,"script"),h.body.length>0&&h.body[0].length>1)throw new a("{subarray} can contain only one column");return h},htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(s){const i={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},c=go(s.parser,i,$l(s.envName));return{type:"leftright",mode:s.mode,body:[c],left:s.envName.indexOf("r")>-1?".":"\\{",right:s.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ud,htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(s){["gather","gather*"].includes(s.envName)&&$i(s);const i={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Nl(s.envName),emptySingleRow:!0,leqno:s.parser.settings.leqno};return go(s.parser,i,"display")},htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ud,htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(s){$i(s);const i={autoTag:Nl(s.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:s.parser.settings.leqno};return go(s.parser,i,"display")},htmlBuilder:Ln,mathmlBuilder:Hn}),_n({type:"array",names:["CD"],props:{numArgs:0},handler(s){return $i(s),m4(s.parser)},htmlBuilder:Ln,mathmlBuilder:Hn}),H("\\nonumber","\\gdef\\@eqnsw{0}"),H("\\notag","\\nonumber"),ot({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(s,i){throw new a(s.funcName+" valid only within array environment")}});var cd=id;ot({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(s,i){let{parser:c,funcName:h}=s;const y=i[0];if(y.type!=="ordgroup")throw new a("Invalid environment name",y);let k="";for(let N=0;N<y.body.length;++N)k+=Kt(y.body[N],"textord").text;if(h==="\\begin"){if(!cd.hasOwnProperty(k))throw new a("No such environment: "+k,y);const N=cd[k],{args:j,optArgs:G}=c.parseArguments("\\begin{"+k+"}",N),re={mode:c.mode,envName:k,parser:c},pe=N.handler(re,j,G);c.expect("\\end",!1);const ye=c.nextToken,Be=Kt(c.parseFunction(),"environment");if(Be.name!==k)throw new a("Mismatch: \\begin{"+k+"} matched by \\end{"+Be.name+"}",ye);return pe}return{type:"environment",mode:c.mode,name:k,nameGroup:y}}});const dd=(s,i)=>{const c=s.font,h=i.withFont(c);return rr(s.body,h)},fd=(s,i)=>{const c=s.font,h=i.withFont(c);return xr(s.body,h)},hd={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ot({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=zn(i[0]);let k=h;return k in hd&&(k=hd[k]),{type:"font",mode:c.mode,font:k.slice(1),body:y}},htmlBuilder:dd,mathmlBuilder:fd}),ot({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(s,i)=>{let{parser:c}=s;const h=i[0],y=D.isCharacterBox(h);return{type:"mclass",mode:c.mode,mclass:Bi(h),body:[{type:"font",mode:c.mode,font:"boldsymbol",body:h}],isCharacterBox:y}}}),ot({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{parser:c,funcName:h,breakOnTokenText:y}=s;const{mode:k}=c,N=c.parseExpression(!0,y),j="math"+h.slice(1);return{type:"font",mode:k,font:j,body:{type:"ordgroup",mode:c.mode,body:N}}},htmlBuilder:dd,mathmlBuilder:fd});const pd=(s,i)=>{let c=i;return s==="display"?c=c.id>=R.SCRIPT.id?c.text():R.DISPLAY:s==="text"&&c.size===R.DISPLAY.size?c=R.TEXT:s==="script"?c=R.SCRIPT:s==="scriptscript"&&(c=R.SCRIPTSCRIPT),c},Ml=(s,i)=>{const c=pd(s.size,i.style),h=c.fracNum(),y=c.fracDen();let k;k=i.havingStyle(h);const N=rr(s.numer,k,i);if(s.continued){const ir=8.5/i.fontMetrics().ptPerEm,nr=3.5/i.fontMetrics().ptPerEm;N.height=N.height<ir?ir:N.height,N.depth=N.depth<nr?nr:N.depth}k=i.havingStyle(y);const j=rr(s.denom,k,i);let G,re,pe;s.hasBarLine?(s.barSize?(re=Pe(s.barSize,i),G=be.makeLineSpan("frac-line",i,re)):G=be.makeLineSpan("frac-line",i),re=G.height,pe=G.height):(G=null,re=0,pe=i.fontMetrics().defaultRuleThickness);let ye,Be,Ze;c.size===R.DISPLAY.size||s.size==="display"?(ye=i.fontMetrics().num1,re>0?Be=3*pe:Be=7*pe,Ze=i.fontMetrics().denom1):(re>0?(ye=i.fontMetrics().num2,Be=pe):(ye=i.fontMetrics().num3,Be=3*pe),Ze=i.fontMetrics().denom2);let lt;if(G){const ir=i.fontMetrics().axisHeight;ye-N.depth-(ir+.5*re)<Be&&(ye+=Be-(ye-N.depth-(ir+.5*re))),ir-.5*re-(j.height-Ze)<Be&&(Ze+=Be-(ir-.5*re-(j.height-Ze)));const nr=-(ir-.5*re);lt=be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:j,shift:Ze},{type:"elem",elem:G,shift:nr},{type:"elem",elem:N,shift:-ye}]},i)}else{const ir=ye-N.depth-(j.height-Ze);ir<Be&&(ye+=.5*(Be-ir),Ze+=.5*(Be-ir)),lt=be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:j,shift:Ze},{type:"elem",elem:N,shift:-ye}]},i)}k=i.havingStyle(c),lt.height*=k.sizeMultiplier/i.sizeMultiplier,lt.depth*=k.sizeMultiplier/i.sizeMultiplier;let Pt;c.size===R.DISPLAY.size?Pt=i.fontMetrics().delim1:c.size===R.SCRIPTSCRIPT.size?Pt=i.havingStyle(R.SCRIPT).fontMetrics().delim2:Pt=i.fontMetrics().delim2;let Jt,Yt;return s.leftDelim==null?Jt=$a(i,["mopen"]):Jt=eo.customSizedDelim(s.leftDelim,Pt,!0,i.havingStyle(c),s.mode,["mopen"]),s.continued?Yt=be.makeSpan([]):s.rightDelim==null?Yt=$a(i,["mclose"]):Yt=eo.customSizedDelim(s.rightDelim,Pt,!0,i.havingStyle(c),s.mode,["mclose"]),be.makeSpan(["mord"].concat(k.sizingClasses(i)),[Jt,be.makeSpan(["mfrac"],[lt]),Yt],i)},Ol=(s,i)=>{let c=new Ge.MathNode("mfrac",[xr(s.numer,i),xr(s.denom,i)]);if(!s.hasBarLine)c.setAttribute("linethickness","0px");else if(s.barSize){const y=Pe(s.barSize,i);c.setAttribute("linethickness",de(y))}const h=pd(s.size,i.style);if(h.size!==i.style.size){c=new Ge.MathNode("mstyle",[c]);const y=h.size===R.DISPLAY.size?"true":"false";c.setAttribute("displaystyle",y),c.setAttribute("scriptlevel","0")}if(s.leftDelim!=null||s.rightDelim!=null){const y=[];if(s.leftDelim!=null){const k=new Ge.MathNode("mo",[new Ge.TextNode(s.leftDelim.replace("\\",""))]);k.setAttribute("fence","true"),y.push(k)}if(y.push(c),s.rightDelim!=null){const k=new Ge.MathNode("mo",[new Ge.TextNode(s.rightDelim.replace("\\",""))]);k.setAttribute("fence","true"),y.push(k)}return ml(y)}return c};ot({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=i[0],k=i[1];let N,j=null,G=null,re="auto";switch(h){case"\\dfrac":case"\\frac":case"\\tfrac":N=!0;break;case"\\\\atopfrac":N=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":N=!1,j="(",G=")";break;case"\\\\bracefrac":N=!1,j="\\{",G="\\}";break;case"\\\\brackfrac":N=!1,j="[",G="]";break;default:throw new Error("Unrecognized genfrac command")}switch(h){case"\\dfrac":case"\\dbinom":re="display";break;case"\\tfrac":case"\\tbinom":re="text";break}return{type:"genfrac",mode:c.mode,continued:!1,numer:y,denom:k,hasBarLine:N,leftDelim:j,rightDelim:G,size:re,barSize:null}},htmlBuilder:Ml,mathmlBuilder:Ol}),ot({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=i[0],k=i[1];return{type:"genfrac",mode:c.mode,continued:!0,numer:y,denom:k,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),ot({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(s){let{parser:i,funcName:c,token:h}=s,y;switch(c){case"\\over":y="\\frac";break;case"\\choose":y="\\binom";break;case"\\atop":y="\\\\atopfrac";break;case"\\brace":y="\\\\bracefrac";break;case"\\brack":y="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:y,token:h}}});const md=["display","text","script","scriptscript"],gd=function(s){let i=null;return s.length>0&&(i=s,i=i==="."?null:i),i};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(s,i){let{parser:c}=s;const h=i[4],y=i[5],k=zn(i[0]),N=k.type==="atom"&&k.family==="open"?gd(k.text):null,j=zn(i[1]),G=j.type==="atom"&&j.family==="close"?gd(j.text):null,re=Kt(i[2],"size");let pe,ye=null;re.isBlank?pe=!0:(ye=re.value,pe=ye.number>0);let Be="auto",Ze=i[3];if(Ze.type==="ordgroup"){if(Ze.body.length>0){const lt=Kt(Ze.body[0],"textord");Be=md[Number(lt.text)]}}else Ze=Kt(Ze,"textord"),Be=md[Number(Ze.text)];return{type:"genfrac",mode:c.mode,numer:h,denom:y,continued:!1,hasBarLine:pe,barSize:ye,leftDelim:N,rightDelim:G,size:Be}},htmlBuilder:Ml,mathmlBuilder:Ol}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(s,i){let{parser:c,funcName:h,token:y}=s;return{type:"infix",mode:c.mode,replaceWith:"\\\\abovefrac",size:Kt(i[0],"size").value,token:y}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=i[0],k=x(Kt(i[1],"infix").size),N=i[2],j=k.number>0;return{type:"genfrac",mode:c.mode,numer:y,denom:N,continued:!1,hasBarLine:j,barSize:k,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Ml,mathmlBuilder:Ol});const vd=(s,i)=>{const c=i.style;let h,y;s.type==="supsub"?(h=s.sup?rr(s.sup,i.havingStyle(c.sup()),i):rr(s.sub,i.havingStyle(c.sub()),i),y=Kt(s.base,"horizBrace")):y=Kt(s,"horizBrace");const k=rr(y.base,i.havingBaseStyle(R.DISPLAY)),N=Qn.svgSpan(y,i);let j;if(y.isOver?(j=be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"kern",size:.1},{type:"elem",elem:N}]},i),j.children[0].children[0].children[1].classes.push("svg-align")):(j=be.makeVList({positionType:"bottom",positionData:k.depth+.1+N.height,children:[{type:"elem",elem:N},{type:"kern",size:.1},{type:"elem",elem:k}]},i),j.children[0].children[0].children[0].classes.push("svg-align")),h){const G=be.makeSpan(["mord",y.isOver?"mover":"munder"],[j],i);y.isOver?j=be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:G},{type:"kern",size:.2},{type:"elem",elem:h}]},i):j=be.makeVList({positionType:"bottom",positionData:G.depth+.2+h.height+h.depth,children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:G}]},i)}return be.makeSpan(["mord",y.isOver?"mover":"munder"],[j],i)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(s,i){let{parser:c,funcName:h}=s;return{type:"horizBrace",mode:c.mode,label:h,isOver:/^\\over/.test(h),base:i[0]}},htmlBuilder:vd,mathmlBuilder:(s,i)=>{const c=Qn.mathMLnode(s.label);return new Ge.MathNode(s.isOver?"mover":"munder",[xr(s.base,i),c])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[1],y=Kt(i[0],"url").url;return c.settings.isTrusted({command:"\\href",url:y})?{type:"href",mode:c.mode,href:y,body:Dr(h)}:c.formatUnsupportedCmd("\\href")},htmlBuilder:(s,i)=>{const c=qr(s.body,i,!1);return be.makeAnchor(s.href,[],c,i)},mathmlBuilder:(s,i)=>{let c=mo(s.body,i);return c instanceof bn||(c=new bn("mrow",[c])),c.setAttribute("href",s.href),c}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=Kt(i[0],"url").url;if(!c.settings.isTrusted({command:"\\url",url:h}))return c.formatUnsupportedCmd("\\url");const y=[];for(let N=0;N<h.length;N++){let j=h[N];j==="~"&&(j="\\textasciitilde"),y.push({type:"textord",mode:"text",text:j})}const k={type:"text",mode:c.mode,font:"\\texttt",body:y};return{type:"href",mode:c.mode,href:h,body:Dr(k)}}}),ot({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(s,i){let{parser:c}=s;return{type:"hbox",mode:c.mode,body:Dr(i[0])}},htmlBuilder(s,i){const c=qr(s.body,i,!1);return be.makeFragment(c)},mathmlBuilder(s,i){return new Ge.MathNode("mrow",fn(s.body,i))}}),ot({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(s,i)=>{let{parser:c,funcName:h,token:y}=s;const k=Kt(i[0],"raw").string,N=i[1];c.settings.strict&&c.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let j;const G={};switch(h){case"\\htmlClass":G.class=k,j={command:"\\htmlClass",class:k};break;case"\\htmlId":G.id=k,j={command:"\\htmlId",id:k};break;case"\\htmlStyle":G.style=k,j={command:"\\htmlStyle",style:k};break;case"\\htmlData":{const re=k.split(",");for(let pe=0;pe<re.length;pe++){const ye=re[pe].split("=");if(ye.length!==2)throw new a("Error parsing key-value for \\htmlData");G["data-"+ye[0].trim()]=ye[1].trim()}j={command:"\\htmlData",attributes:G};break}default:throw new Error("Unrecognized html command")}return c.settings.isTrusted(j)?{type:"html",mode:c.mode,attributes:G,body:Dr(N)}:c.formatUnsupportedCmd(h)},htmlBuilder:(s,i)=>{const c=qr(s.body,i,!1),h=["enclosing"];s.attributes.class&&h.push(...s.attributes.class.trim().split(/\s+/));const y=be.makeSpan(h,c,i);for(const k in s.attributes)k!=="class"&&s.attributes.hasOwnProperty(k)&&y.setAttribute(k,s.attributes[k]);return y},mathmlBuilder:(s,i)=>mo(s.body,i)}),ot({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;return{type:"htmlmathml",mode:c.mode,html:Dr(i[0]),mathml:Dr(i[1])}},htmlBuilder:(s,i)=>{const c=qr(s.html,i,!1);return be.makeFragment(c)},mathmlBuilder:(s,i)=>mo(s.mathml,i)});const Tl=function(s){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(s))return{number:+s,unit:"bp"};{const i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(s);if(!i)throw new a("Invalid size: '"+s+"' in \\includegraphics");const c={number:+(i[1]+i[2]),unit:i[3]};if(!ht(c))throw new a("Invalid unit: '"+c.unit+"' in \\includegraphics.");return c}};ot({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(s,i,c)=>{let{parser:h}=s,y={number:0,unit:"em"},k={number:.9,unit:"em"},N={number:0,unit:"em"},j="";if(c[0]){const re=Kt(c[0],"raw").string.split(",");for(let pe=0;pe<re.length;pe++){const ye=re[pe].split("=");if(ye.length===2){const Be=ye[1].trim();switch(ye[0].trim()){case"alt":j=Be;break;case"width":y=Tl(Be);break;case"height":k=Tl(Be);break;case"totalheight":N=Tl(Be);break;default:throw new a("Invalid key: '"+ye[0]+"' in \\includegraphics.")}}}}const G=Kt(i[0],"url").url;return j===""&&(j=G,j=j.replace(/^.*[\\/]/,""),j=j.substring(0,j.lastIndexOf("."))),h.settings.isTrusted({command:"\\includegraphics",url:G})?{type:"includegraphics",mode:h.mode,alt:j,width:y,height:k,totalheight:N,src:G}:h.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(s,i)=>{const c=Pe(s.height,i);let h=0;s.totalheight.number>0&&(h=Pe(s.totalheight,i)-c);let y=0;s.width.number>0&&(y=Pe(s.width,i));const k={height:de(c+h)};y>0&&(k.width=de(y)),h>0&&(k.verticalAlign=de(-h));const N=new tr(s.src,s.alt,k);return N.height=c,N.depth=h,N},mathmlBuilder:(s,i)=>{const c=new Ge.MathNode("mglyph",[]);c.setAttribute("alt",s.alt);const h=Pe(s.height,i);let y=0;if(s.totalheight.number>0&&(y=Pe(s.totalheight,i)-h,c.setAttribute("valign",de(-y))),c.setAttribute("height",de(h+y)),s.width.number>0){const k=Pe(s.width,i);c.setAttribute("width",de(k))}return c.setAttribute("src",s.src),c}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(s,i){let{parser:c,funcName:h}=s;const y=Kt(i[0],"size");if(c.settings.strict){const k=h[1]==="m",N=y.value.unit==="mu";k?(N||c.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" supports only mu units, "+("not "+y.value.unit+" units")),c.mode!=="math"&&c.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" works only in math mode")):N&&c.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" doesn't support mu units")}return{type:"kern",mode:c.mode,dimension:y.value}},htmlBuilder(s,i){return be.makeGlue(s.dimension,i)},mathmlBuilder(s,i){const c=Pe(s.dimension,i);return new Ge.SpaceNode(c)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=i[0];return{type:"lap",mode:c.mode,alignment:h.slice(5),body:y}},htmlBuilder:(s,i)=>{let c;s.alignment==="clap"?(c=be.makeSpan([],[rr(s.body,i)]),c=be.makeSpan(["inner"],[c],i)):c=be.makeSpan(["inner"],[rr(s.body,i)]);const h=be.makeSpan(["fix"],[]);let y=be.makeSpan([s.alignment],[c,h],i);const k=be.makeSpan(["strut"]);return k.style.height=de(y.height+y.depth),y.depth&&(k.style.verticalAlign=de(-y.depth)),y.children.unshift(k),y=be.makeSpan(["thinbox"],[y],i),be.makeSpan(["mord","vbox"],[y],i)},mathmlBuilder:(s,i)=>{const c=new Ge.MathNode("mpadded",[xr(s.body,i)]);if(s.alignment!=="rlap"){const h=s.alignment==="llap"?"-1":"-0.5";c.setAttribute("lspace",h+"width")}return c.setAttribute("width","0px"),c}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,i){let{funcName:c,parser:h}=s;const y=h.mode;h.switchMode("math");const k=c==="\\("?"\\)":"$",N=h.parseExpression(!1,k);return h.expect(k),h.switchMode(y),{type:"styling",mode:h.mode,style:"text",body:N}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,i){throw new a("Mismatched "+s.funcName)}});const bd=(s,i)=>{switch(i.style.size){case R.DISPLAY.size:return s.display;case R.TEXT.size:return s.text;case R.SCRIPT.size:return s.script;case R.SCRIPTSCRIPT.size:return s.scriptscript;default:return s.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(s,i)=>{let{parser:c}=s;return{type:"mathchoice",mode:c.mode,display:Dr(i[0]),text:Dr(i[1]),script:Dr(i[2]),scriptscript:Dr(i[3])}},htmlBuilder:(s,i)=>{const c=bd(s,i),h=qr(c,i,!1);return be.makeFragment(h)},mathmlBuilder:(s,i)=>{const c=bd(s,i);return mo(c,i)}});const yd=(s,i,c,h,y,k,N)=>{s=be.makeSpan([],[s]);const j=c&&D.isCharacterBox(c);let G,re;if(i){const Be=rr(i,h.havingStyle(y.sup()),h);re={elem:Be,kern:Math.max(h.fontMetrics().bigOpSpacing1,h.fontMetrics().bigOpSpacing3-Be.depth)}}if(c){const Be=rr(c,h.havingStyle(y.sub()),h);G={elem:Be,kern:Math.max(h.fontMetrics().bigOpSpacing2,h.fontMetrics().bigOpSpacing4-Be.height)}}let pe;if(re&&G){const Be=h.fontMetrics().bigOpSpacing5+G.elem.height+G.elem.depth+G.kern+s.depth+N;pe=be.makeVList({positionType:"bottom",positionData:Be,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:G.elem,marginLeft:de(-k)},{type:"kern",size:G.kern},{type:"elem",elem:s},{type:"kern",size:re.kern},{type:"elem",elem:re.elem,marginLeft:de(k)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else if(G){const Be=s.height-N;pe=be.makeVList({positionType:"top",positionData:Be,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:G.elem,marginLeft:de(-k)},{type:"kern",size:G.kern},{type:"elem",elem:s}]},h)}else if(re){const Be=s.depth+N;pe=be.makeVList({positionType:"bottom",positionData:Be,children:[{type:"elem",elem:s},{type:"kern",size:re.kern},{type:"elem",elem:re.elem,marginLeft:de(k)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else return s;const ye=[pe];if(G&&k!==0&&!j){const Be=be.makeSpan(["mspace"],[],h);Be.style.marginRight=de(k),ye.unshift(Be)}return be.makeSpan(["mop","op-limits"],ye,h)},xd=["\\smallint"],Jo=(s,i)=>{let c,h,y=!1,k;s.type==="supsub"?(c=s.sup,h=s.sub,k=Kt(s.base,"op"),y=!0):k=Kt(s,"op");const N=i.style;let j=!1;N.size===R.DISPLAY.size&&k.symbol&&!xd.includes(k.name)&&(j=!0);let G;if(k.symbol){const ye=j?"Size2-Regular":"Size1-Regular";let Be="";if((k.name==="\\oiint"||k.name==="\\oiiint")&&(Be=k.name.slice(1),k.name=Be==="oiint"?"\\iint":"\\iiint"),G=be.makeSymbol(k.name,ye,"math",i,["mop","op-symbol",j?"large-op":"small-op"]),Be.length>0){const Ze=G.italic,lt=be.staticSvg(Be+"Size"+(j?"2":"1"),i);G=be.makeVList({positionType:"individualShift",children:[{type:"elem",elem:G,shift:0},{type:"elem",elem:lt,shift:j?.08:0}]},i),k.name="\\"+Be,G.classes.unshift("mop"),G.italic=Ze}}else if(k.body){const ye=qr(k.body,i,!0);ye.length===1&&ye[0]instanceof Bt?(G=ye[0],G.classes[0]="mop"):G=be.makeSpan(["mop"],ye,i)}else{const ye=[];for(let Be=1;Be<k.name.length;Be++)ye.push(be.mathsym(k.name[Be],k.mode,i));G=be.makeSpan(["mop"],ye,i)}let re=0,pe=0;return(G instanceof Bt||k.name==="\\oiint"||k.name==="\\oiiint")&&!k.suppressBaseShift&&(re=(G.height-G.depth)/2-i.fontMetrics().axisHeight,pe=G.italic),y?yd(G,c,h,i,N,pe,re):(re&&(G.style.position="relative",G.style.top=de(re)),G)},Ta=(s,i)=>{let c;if(s.symbol)c=new bn("mo",[Dn(s.name,s.mode)]),xd.includes(s.name)&&c.setAttribute("largeop","false");else if(s.body)c=new bn("mo",fn(s.body,i));else{c=new bn("mi",[new jn(s.name.slice(1))]);const h=new bn("mo",[Dn("\u2061","text")]);s.parentIsSupSub?c=new bn("mrow",[c,h]):c=Pc([c,h])}return c},F4={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};ot({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(s,i)=>{let{parser:c,funcName:h}=s,y=h;return y.length===1&&(y=F4[y]),{type:"op",mode:c.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:y}},htmlBuilder:Jo,mathmlBuilder:Ta}),ot({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[0];return{type:"op",mode:c.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Dr(h)}},htmlBuilder:Jo,mathmlBuilder:Ta});const N4={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};ot({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(s){let{parser:i,funcName:c}=s;return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:c}},htmlBuilder:Jo,mathmlBuilder:Ta}),ot({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(s){let{parser:i,funcName:c}=s;return{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:c}},htmlBuilder:Jo,mathmlBuilder:Ta}),ot({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(s){let{parser:i,funcName:c}=s,h=c;return h.length===1&&(h=N4[h]),{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:h}},htmlBuilder:Jo,mathmlBuilder:Ta});const wd=(s,i)=>{let c,h,y=!1,k;s.type==="supsub"?(c=s.sup,h=s.sub,k=Kt(s.base,"operatorname"),y=!0):k=Kt(s,"operatorname");let N;if(k.body.length>0){const j=k.body.map(re=>{const pe=re.text;return typeof pe=="string"?{type:"textord",mode:re.mode,text:pe}:re}),G=qr(j,i.withFont("mathrm"),!0);for(let re=0;re<G.length;re++){const pe=G[re];pe instanceof Bt&&(pe.text=pe.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}N=be.makeSpan(["mop"],G,i)}else N=be.makeSpan(["mop"],[],i);return y?yd(N,c,h,i,i.style,0,0):N};ot({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=i[0];return{type:"operatorname",mode:c.mode,body:Dr(y),alwaysHandleSupSub:h==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:wd,mathmlBuilder:(s,i)=>{let c=fn(s.body,i.withFont("mathrm")),h=!0;for(let N=0;N<c.length;N++){const j=c[N];if(!(j instanceof Ge.SpaceNode))if(j instanceof Ge.MathNode)switch(j.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const G=j.children[0];j.children.length===1&&G instanceof Ge.TextNode?G.text=G.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):h=!1;break}default:h=!1}else h=!1}if(h){const N=c.map(j=>j.toText()).join("");c=[new Ge.TextNode(N)]}const y=new Ge.MathNode("mi",c);y.setAttribute("mathvariant","normal");const k=new Ge.MathNode("mo",[Dn("\u2061","text")]);return s.parentIsSupSub?new Ge.MathNode("mrow",[y,k]):Ge.newDocumentFragment([y,k])}}),H("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),on({type:"ordgroup",htmlBuilder(s,i){return s.semisimple?be.makeFragment(qr(s.body,i,!1)):be.makeSpan(["mord"],qr(s.body,i,!0),i)},mathmlBuilder(s,i){return mo(s.body,i,!0)}}),ot({type:"overline",names:["\\overline"],props:{numArgs:1},handler(s,i){let{parser:c}=s;const h=i[0];return{type:"overline",mode:c.mode,body:h}},htmlBuilder(s,i){const c=rr(s.body,i.havingCrampedStyle()),h=be.makeLineSpan("overline-line",i),y=i.fontMetrics().defaultRuleThickness,k=be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:3*y},{type:"elem",elem:h},{type:"kern",size:y}]},i);return be.makeSpan(["mord","overline"],[k],i)},mathmlBuilder(s,i){const c=new Ge.MathNode("mo",[new Ge.TextNode("\u203E")]);c.setAttribute("stretchy","true");const h=new Ge.MathNode("mover",[xr(s.body,i),c]);return h.setAttribute("accent","true"),h}}),ot({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[0];return{type:"phantom",mode:c.mode,body:Dr(h)}},htmlBuilder:(s,i)=>{const c=qr(s.body,i.withPhantom(),!1);return be.makeFragment(c)},mathmlBuilder:(s,i)=>{const c=fn(s.body,i);return new Ge.MathNode("mphantom",c)}}),ot({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[0];return{type:"hphantom",mode:c.mode,body:h}},htmlBuilder:(s,i)=>{let c=be.makeSpan([],[rr(s.body,i.withPhantom())]);if(c.height=0,c.depth=0,c.children)for(let h=0;h<c.children.length;h++)c.children[h].height=0,c.children[h].depth=0;return c=be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c}]},i),be.makeSpan(["mord"],[c],i)},mathmlBuilder:(s,i)=>{const c=fn(Dr(s.body),i),h=new Ge.MathNode("mphantom",c),y=new Ge.MathNode("mpadded",[h]);return y.setAttribute("height","0px"),y.setAttribute("depth","0px"),y}}),ot({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[0];return{type:"vphantom",mode:c.mode,body:h}},htmlBuilder:(s,i)=>{const c=be.makeSpan(["inner"],[rr(s.body,i.withPhantom())]),h=be.makeSpan(["fix"],[]);return be.makeSpan(["mord","rlap"],[c,h],i)},mathmlBuilder:(s,i)=>{const c=fn(Dr(s.body),i),h=new Ge.MathNode("mphantom",c),y=new Ge.MathNode("mpadded",[h]);return y.setAttribute("width","0px"),y}}),ot({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(s,i){let{parser:c}=s;const h=Kt(i[0],"size").value,y=i[1];return{type:"raisebox",mode:c.mode,dy:h,body:y}},htmlBuilder(s,i){const c=rr(s.body,i),h=Pe(s.dy,i);return be.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:c}]},i)},mathmlBuilder(s,i){const c=new Ge.MathNode("mpadded",[xr(s.body,i)]),h=s.dy.number+s.dy.unit;return c.setAttribute("voffset",h),c}}),ot({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(s){let{parser:i}=s;return{type:"internal",mode:i.mode}}}),ot({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(s,i,c){let{parser:h}=s;const y=c[0],k=Kt(i[0],"size"),N=Kt(i[1],"size");return{type:"rule",mode:h.mode,shift:y&&Kt(y,"size").value,width:k.value,height:N.value}},htmlBuilder(s,i){const c=be.makeSpan(["mord","rule"],[],i),h=Pe(s.width,i),y=Pe(s.height,i),k=s.shift?Pe(s.shift,i):0;return c.style.borderRightWidth=de(h),c.style.borderTopWidth=de(y),c.style.bottom=de(k),c.width=h,c.height=y+k,c.depth=-k,c.maxFontSize=y*1.125*i.sizeMultiplier,c},mathmlBuilder(s,i){const c=Pe(s.width,i),h=Pe(s.height,i),y=s.shift?Pe(s.shift,i):0,k=i.color&&i.getColor()||"black",N=new Ge.MathNode("mspace");N.setAttribute("mathbackground",k),N.setAttribute("width",de(c)),N.setAttribute("height",de(h));const j=new Ge.MathNode("mpadded",[N]);return y>=0?j.setAttribute("height",de(y)):(j.setAttribute("height",de(y)),j.setAttribute("depth",de(-y))),j.setAttribute("voffset",de(y)),j}});function Cd(s,i,c){const h=qr(s,i,!1),y=i.sizeMultiplier/c.sizeMultiplier;for(let k=0;k<h.length;k++){const N=h[k].classes.indexOf("sizing");N<0?Array.prototype.push.apply(h[k].classes,i.sizingClasses(c)):h[k].classes[N+1]==="reset-size"+i.size&&(h[k].classes[N+1]="reset-size"+c.size),h[k].height*=y,h[k].depth*=y}return be.makeFragment(h)}const Dd=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:Dd,props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{breakOnTokenText:c,funcName:h,parser:y}=s;const k=y.parseExpression(!1,c);return{type:"sizing",mode:y.mode,size:Dd.indexOf(h)+1,body:k}},htmlBuilder:(s,i)=>{const c=i.havingSize(s.size);return Cd(s.body,c,i)},mathmlBuilder:(s,i)=>{const c=i.havingSize(s.size),h=fn(s.body,c),y=new Ge.MathNode("mstyle",h);return y.setAttribute("mathsize",de(c.sizeMultiplier)),y}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(s,i,c)=>{let{parser:h}=s,y=!1,k=!1;const N=c[0]&&Kt(c[0],"ordgroup");if(N){let G="";for(let re=0;re<N.body.length;++re)if(G=N.body[re].text,G==="t")y=!0;else if(G==="b")k=!0;else{y=!1,k=!1;break}}else y=!0,k=!0;const j=i[0];return{type:"smash",mode:h.mode,body:j,smashHeight:y,smashDepth:k}},htmlBuilder:(s,i)=>{const c=be.makeSpan([],[rr(s.body,i)]);if(!s.smashHeight&&!s.smashDepth)return c;if(s.smashHeight&&(c.height=0,c.children))for(let y=0;y<c.children.length;y++)c.children[y].height=0;if(s.smashDepth&&(c.depth=0,c.children))for(let y=0;y<c.children.length;y++)c.children[y].depth=0;const h=be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c}]},i);return be.makeSpan(["mord"],[h],i)},mathmlBuilder:(s,i)=>{const c=new Ge.MathNode("mpadded",[xr(s.body,i)]);return s.smashHeight&&c.setAttribute("height","0px"),s.smashDepth&&c.setAttribute("depth","0px"),c}}),ot({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(s,i,c){let{parser:h}=s;const y=c[0],k=i[0];return{type:"sqrt",mode:h.mode,body:k,index:y}},htmlBuilder(s,i){let c=rr(s.body,i.havingCrampedStyle());c.height===0&&(c.height=i.fontMetrics().xHeight),c=be.wrapFragment(c,i);const h=i.fontMetrics().defaultRuleThickness;let y=h;i.style.id<R.TEXT.id&&(y=i.fontMetrics().xHeight);let k=h+y/4;const N=c.height+c.depth+k+h,{span:j,ruleWidth:G,advanceWidth:re}=eo.sqrtImage(N,i),pe=j.height-G;pe>c.height+c.depth+k&&(k=(k+pe-c.height-c.depth)/2);const ye=j.height-c.height-k-G;c.style.paddingLeft=de(re);const Be=be.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:-(c.height+ye)},{type:"elem",elem:j},{type:"kern",size:G}]},i);if(s.index){const Ze=i.havingStyle(R.SCRIPTSCRIPT),lt=rr(s.index,Ze,i),Pt=.6*(Be.height-Be.depth),Jt=be.makeVList({positionType:"shift",positionData:-Pt,children:[{type:"elem",elem:lt}]},i),Yt=be.makeSpan(["root"],[Jt]);return be.makeSpan(["mord","sqrt"],[Yt,Be],i)}else return be.makeSpan(["mord","sqrt"],[Be],i)},mathmlBuilder(s,i){const{body:c,index:h}=s;return h?new Ge.MathNode("mroot",[xr(c,i),xr(h,i)]):new Ge.MathNode("msqrt",[xr(c,i)])}});const Ed={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s,i){let{breakOnTokenText:c,funcName:h,parser:y}=s;const k=y.parseExpression(!0,c),N=h.slice(1,h.length-5);return{type:"styling",mode:y.mode,style:N,body:k}},htmlBuilder(s,i){const c=Ed[s.style],h=i.havingStyle(c).withFont("");return Cd(s.body,h,i)},mathmlBuilder(s,i){const c=Ed[s.style],h=i.havingStyle(c),y=fn(s.body,h),k=new Ge.MathNode("mstyle",y),N={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[s.style];return k.setAttribute("scriptlevel",N[0]),k.setAttribute("displaystyle",N[1]),k}});const $4=function(s,i){const c=s.base;return c?c.type==="op"?c.limits&&(i.style.size===R.DISPLAY.size||c.alwaysHandleSupSub)?Jo:null:c.type==="operatorname"?c.alwaysHandleSupSub&&(i.style.size===R.DISPLAY.size||c.limits)?wd:null:c.type==="accent"?D.isCharacterBox(c.base)?yl:null:c.type==="horizBrace"&&!s.sub===c.isOver?vd:null:null};on({type:"supsub",htmlBuilder(s,i){const c=$4(s,i);if(c)return c(s,i);const{base:h,sup:y,sub:k}=s,N=rr(h,i);let j,G;const re=i.fontMetrics();let pe=0,ye=0;const Be=h&&D.isCharacterBox(h);if(y){const nr=i.havingStyle(i.style.sup());j=rr(y,nr,i),Be||(pe=N.height-nr.fontMetrics().supDrop*nr.sizeMultiplier/i.sizeMultiplier)}if(k){const nr=i.havingStyle(i.style.sub());G=rr(k,nr,i),Be||(ye=N.depth+nr.fontMetrics().subDrop*nr.sizeMultiplier/i.sizeMultiplier)}let Ze;i.style===R.DISPLAY?Ze=re.sup1:i.style.cramped?Ze=re.sup3:Ze=re.sup2;const lt=i.sizeMultiplier,Pt=de(.5/re.ptPerEm/lt);let Jt=null;if(G){const nr=s.base&&s.base.type==="op"&&s.base.name&&(s.base.name==="\\oiint"||s.base.name==="\\oiiint");(N instanceof Bt||nr)&&(Jt=de(-N.italic))}let Yt;if(j&&G){pe=Math.max(pe,Ze,j.depth+.25*re.xHeight),ye=Math.max(ye,re.sub2);const nr=4*re.defaultRuleThickness;if(pe-j.depth-(G.height-ye)<nr){ye=nr-(pe-j.depth)+G.height;const Zr=.8*re.xHeight-(pe-j.depth);Zr>0&&(pe+=Zr,ye-=Zr)}const Er=[{type:"elem",elem:G,shift:ye,marginRight:Pt,marginLeft:Jt},{type:"elem",elem:j,shift:-pe,marginRight:Pt}];Yt=be.makeVList({positionType:"individualShift",children:Er},i)}else if(G){ye=Math.max(ye,re.sub1,G.height-.8*re.xHeight);const nr=[{type:"elem",elem:G,marginLeft:Jt,marginRight:Pt}];Yt=be.makeVList({positionType:"shift",positionData:ye,children:nr},i)}else if(j)pe=Math.max(pe,Ze,j.depth+.25*re.xHeight),Yt=be.makeVList({positionType:"shift",positionData:-pe,children:[{type:"elem",elem:j,marginRight:Pt}]},i);else throw new Error("supsub must have either sup or sub.");const ir=hl(N,"right")||"mord";return be.makeSpan([ir],[N,be.makeSpan(["msupsub"],[Yt])],i)},mathmlBuilder(s,i){let c=!1,h,y;s.base&&s.base.type==="horizBrace"&&(y=!!s.sup,y===s.base.isOver&&(c=!0,h=s.base.isOver)),s.base&&(s.base.type==="op"||s.base.type==="operatorname")&&(s.base.parentIsSupSub=!0);const k=[xr(s.base,i)];s.sub&&k.push(xr(s.sub,i)),s.sup&&k.push(xr(s.sup,i));let N;if(c)N=h?"mover":"munder";else if(s.sub)if(s.sup){const j=s.base;j&&j.type==="op"&&j.limits&&i.style===R.DISPLAY||j&&j.type==="operatorname"&&j.alwaysHandleSupSub&&(i.style===R.DISPLAY||j.limits)?N="munderover":N="msubsup"}else{const j=s.base;j&&j.type==="op"&&j.limits&&(i.style===R.DISPLAY||j.alwaysHandleSupSub)||j&&j.type==="operatorname"&&j.alwaysHandleSupSub&&(j.limits||i.style===R.DISPLAY)?N="munder":N="msub"}else{const j=s.base;j&&j.type==="op"&&j.limits&&(i.style===R.DISPLAY||j.alwaysHandleSupSub)||j&&j.type==="operatorname"&&j.alwaysHandleSupSub&&(j.limits||i.style===R.DISPLAY)?N="mover":N="msup"}return new Ge.MathNode(N,k)}}),on({type:"atom",htmlBuilder(s,i){return be.mathsym(s.text,s.mode,i,["m"+s.family])},mathmlBuilder(s,i){const c=new Ge.MathNode("mo",[Dn(s.text,s.mode)]);if(s.family==="bin"){const h=gl(s,i);h==="bold-italic"&&c.setAttribute("mathvariant",h)}else s.family==="punct"?c.setAttribute("separator","true"):(s.family==="open"||s.family==="close")&&c.setAttribute("stretchy","false");return c}});const kd={mi:"italic",mn:"normal",mtext:"normal"};on({type:"mathord",htmlBuilder(s,i){return be.makeOrd(s,i,"mathord")},mathmlBuilder(s,i){const c=new Ge.MathNode("mi",[Dn(s.text,s.mode,i)]),h=gl(s,i)||"italic";return h!==kd[c.type]&&c.setAttribute("mathvariant",h),c}}),on({type:"textord",htmlBuilder(s,i){return be.makeOrd(s,i,"textord")},mathmlBuilder(s,i){const c=Dn(s.text,s.mode,i),h=gl(s,i)||"normal";let y;return s.mode==="text"?y=new Ge.MathNode("mtext",[c]):/[0-9]/.test(s.text)?y=new Ge.MathNode("mn",[c]):s.text==="\\prime"?y=new Ge.MathNode("mo",[c]):y=new Ge.MathNode("mi",[c]),h!==kd[y.type]&&y.setAttribute("mathvariant",h),y}});const Rl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Il={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};on({type:"spacing",htmlBuilder(s,i){if(Il.hasOwnProperty(s.text)){const c=Il[s.text].className||"";if(s.mode==="text"){const h=be.makeOrd(s,i,"textord");return h.classes.push(c),h}else return be.makeSpan(["mspace",c],[be.mathsym(s.text,s.mode,i)],i)}else{if(Rl.hasOwnProperty(s.text))return be.makeSpan(["mspace",Rl[s.text]],[],i);throw new a('Unknown type of space "'+s.text+'"')}},mathmlBuilder(s,i){let c;if(Il.hasOwnProperty(s.text))c=new Ge.MathNode("mtext",[new Ge.TextNode("\xA0")]);else{if(Rl.hasOwnProperty(s.text))return new Ge.MathNode("mspace");throw new a('Unknown type of space "'+s.text+'"')}return c}});const Sd=()=>{const s=new Ge.MathNode("mtd",[]);return s.setAttribute("width","50%"),s};on({type:"tag",mathmlBuilder(s,i){const c=new Ge.MathNode("mtable",[new Ge.MathNode("mtr",[Sd(),new Ge.MathNode("mtd",[mo(s.body,i)]),Sd(),new Ge.MathNode("mtd",[mo(s.tag,i)])])]);return c.setAttribute("width","100%"),c}});const Ad={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Bd={"\\textbf":"textbf","\\textmd":"textmd"},M4={"\\textit":"textit","\\textup":"textup"},Fd=(s,i)=>{const c=s.font;if(c){if(Ad[c])return i.withTextFontFamily(Ad[c]);if(Bd[c])return i.withTextFontWeight(Bd[c]);if(c==="\\emph")return i.fontShape==="textit"?i.withTextFontShape("textup"):i.withTextFontShape("textit")}else return i;return i.withTextFontShape(M4[c])};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(s,i){let{parser:c,funcName:h}=s;const y=i[0];return{type:"text",mode:c.mode,body:Dr(y),font:h}},htmlBuilder(s,i){const c=Fd(s,i),h=qr(s.body,c,!0);return be.makeSpan(["mord","text"],h,c)},mathmlBuilder(s,i){const c=Fd(s,i);return mo(s.body,c)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:c}=s;return{type:"underline",mode:c.mode,body:i[0]}},htmlBuilder(s,i){const c=rr(s.body,i),h=be.makeLineSpan("underline-line",i),y=i.fontMetrics().defaultRuleThickness,k=be.makeVList({positionType:"top",positionData:c.height,children:[{type:"kern",size:y},{type:"elem",elem:h},{type:"kern",size:3*y},{type:"elem",elem:c}]},i);return be.makeSpan(["mord","underline"],[k],i)},mathmlBuilder(s,i){const c=new Ge.MathNode("mo",[new Ge.TextNode("\u203E")]);c.setAttribute("stretchy","true");const h=new Ge.MathNode("munder",[xr(s.body,i),c]);return h.setAttribute("accentunder","true"),h}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(s,i){let{parser:c}=s;return{type:"vcenter",mode:c.mode,body:i[0]}},htmlBuilder(s,i){const c=rr(s.body,i),h=i.fontMetrics().axisHeight,y=.5*(c.height-h-(c.depth+h));return be.makeVList({positionType:"shift",positionData:y,children:[{type:"elem",elem:c}]},i)},mathmlBuilder(s,i){return new Ge.MathNode("mpadded",[xr(s.body,i)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(s,i,c){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(s,i){const c=Nd(s),h=[],y=i.havingStyle(i.style.text());for(let k=0;k<c.length;k++){let N=c[k];N==="~"&&(N="\\textasciitilde"),h.push(be.makeSymbol(N,"Typewriter-Regular",s.mode,y,["mord","texttt"]))}return be.makeSpan(["mord","text"].concat(y.sizingClasses(i)),be.tryCombineChars(h),y)},mathmlBuilder(s,i){const c=new Ge.TextNode(Nd(s)),h=new Ge.MathNode("mtext",[c]);return h.setAttribute("mathvariant","monospace"),h}});const Nd=s=>s.body.replace(/ /g,s.star?"\u2423":"\xA0");var vo=nn;const $d=`[ \r
|
|
488
|
-
]`,O4="\\\\[a-zA-Z@]+",T4="\\\\[^\uD800-\uDFFF]",R4="("+O4+")"+$d+"*",I4=`\\\\(
|
|
489
|
-
|[ \r ]+
|
|
490
|
-
?)[ \r ]*`,Pl="[\u0300-\u036F]",P4=new RegExp(Pl+"+$"),z4="("+$d+"+)|"+(I4+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Pl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Pl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+R4)+("|"+T4+")");class Md{constructor(i,c){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=i,this.settings=c,this.tokenRegex=new RegExp(z4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(i,c){this.catcodes[i]=c}lex(){const i=this.input,c=this.tokenRegex.lastIndex;if(c===i.length)return new yn("EOF",new hn(this,c,c));const h=this.tokenRegex.exec(i);if(h===null||h.index!==c)throw new a("Unexpected character: '"+i[c]+"'",new yn(i[c],new hn(this,c,c+1)));const y=h[6]||h[3]||(h[2]?"\\ ":" ");if(this.catcodes[y]===14){const k=i.indexOf(`
|
|
491
|
-
`,this.tokenRegex.lastIndex);return k===-1?(this.tokenRegex.lastIndex=i.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=k+1,this.lex()}return new yn(y,new hn(this,c,this.tokenRegex.lastIndex))}}class j4{constructor(i,c){i===void 0&&(i={}),c===void 0&&(c={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=c,this.builtins=i,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const i=this.undefStack.pop();for(const c in i)i.hasOwnProperty(c)&&(i[c]==null?delete this.current[c]:this.current[c]=i[c])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(i){return this.current.hasOwnProperty(i)||this.builtins.hasOwnProperty(i)}get(i){return this.current.hasOwnProperty(i)?this.current[i]:this.builtins[i]}set(i,c,h){if(h===void 0&&(h=!1),h){for(let y=0;y<this.undefStack.length;y++)delete this.undefStack[y][i];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][i]=c)}else{const y=this.undefStack[this.undefStack.length-1];y&&!y.hasOwnProperty(i)&&(y[i]=this.current[i])}c==null?delete this.current[i]:this.current[i]=c}}var _4=sd;H("\\noexpand",function(s){const i=s.popToken();return s.isExpandable(i.text)&&(i.noexpand=!0,i.treatAsRelax=!0),{tokens:[i],numArgs:0}}),H("\\expandafter",function(s){const i=s.popToken();return s.expandOnce(!0),{tokens:[i],numArgs:0}}),H("\\@firstoftwo",function(s){return{tokens:s.consumeArgs(2)[0],numArgs:0}}),H("\\@secondoftwo",function(s){return{tokens:s.consumeArgs(2)[1],numArgs:0}}),H("\\@ifnextchar",function(s){const i=s.consumeArgs(3);s.consumeSpaces();const c=s.future();return i[0].length===1&&i[0][0].text===c.text?{tokens:i[1],numArgs:0}:{tokens:i[2],numArgs:0}}),H("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),H("\\TextOrMath",function(s){const i=s.consumeArgs(2);return s.mode==="text"?{tokens:i[0],numArgs:0}:{tokens:i[1],numArgs:0}});const Od={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};H("\\char",function(s){let i=s.popToken(),c,h="";if(i.text==="'")c=8,i=s.popToken();else if(i.text==='"')c=16,i=s.popToken();else if(i.text==="`")if(i=s.popToken(),i.text[0]==="\\")h=i.text.charCodeAt(1);else{if(i.text==="EOF")throw new a("\\char` missing argument");h=i.text.charCodeAt(0)}else c=10;if(c){if(h=Od[i.text],h==null||h>=c)throw new a("Invalid base-"+c+" digit "+i.text);let y;for(;(y=Od[s.future().text])!=null&&y<c;)h*=c,h+=y,s.popToken()}return"\\@char{"+h+"}"});const zl=(s,i,c,h)=>{let y=s.consumeArg().tokens;if(y.length!==1)throw new a("\\newcommand's first argument must be a macro name");const k=y[0].text,N=s.isDefined(k);if(N&&!i)throw new a("\\newcommand{"+k+"} attempting to redefine "+(k+"; use \\renewcommand"));if(!N&&!c)throw new a("\\renewcommand{"+k+"} when command "+k+" does not yet exist; use \\newcommand");let j=0;if(y=s.consumeArg().tokens,y.length===1&&y[0].text==="["){let G="",re=s.expandNextToken();for(;re.text!=="]"&&re.text!=="EOF";)G+=re.text,re=s.expandNextToken();if(!G.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+G);j=parseInt(G),y=s.consumeArg().tokens}return N&&h||s.macros.set(k,{tokens:y,numArgs:j}),""};H("\\newcommand",s=>zl(s,!1,!0,!1)),H("\\renewcommand",s=>zl(s,!0,!1,!1)),H("\\providecommand",s=>zl(s,!0,!0,!0)),H("\\message",s=>{const i=s.consumeArgs(1)[0];return console.log(i.reverse().map(c=>c.text).join("")),""}),H("\\errmessage",s=>{const i=s.consumeArgs(1)[0];return console.error(i.reverse().map(c=>c.text).join("")),""}),H("\\show",s=>{const i=s.popToken(),c=i.text;return console.log(i,s.macros.get(c),vo[c],_t.math[c],_t.text[c]),""}),H("\\bgroup","{"),H("\\egroup","}"),H("~","\\nobreakspace"),H("\\lq","`"),H("\\rq","'"),H("\\aa","\\r a"),H("\\AA","\\r A"),H("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),H("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),H("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),H("\u212C","\\mathscr{B}"),H("\u2130","\\mathscr{E}"),H("\u2131","\\mathscr{F}"),H("\u210B","\\mathscr{H}"),H("\u2110","\\mathscr{I}"),H("\u2112","\\mathscr{L}"),H("\u2133","\\mathscr{M}"),H("\u211B","\\mathscr{R}"),H("\u212D","\\mathfrak{C}"),H("\u210C","\\mathfrak{H}"),H("\u2128","\\mathfrak{Z}"),H("\\Bbbk","\\Bbb{k}"),H("\xB7","\\cdotp"),H("\\llap","\\mathllap{\\textrm{#1}}"),H("\\rlap","\\mathrlap{\\textrm{#1}}"),H("\\clap","\\mathclap{\\textrm{#1}}"),H("\\mathstrut","\\vphantom{(}"),H("\\underbar","\\underline{\\text{#1}}"),H("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),H("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),H("\\ne","\\neq"),H("\u2260","\\neq"),H("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),H("\u2209","\\notin"),H("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),H("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),H("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),H("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),H("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),H("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),H("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),H("\u27C2","\\perp"),H("\u203C","\\mathclose{!\\mkern-0.8mu!}"),H("\u220C","\\notni"),H("\u231C","\\ulcorner"),H("\u231D","\\urcorner"),H("\u231E","\\llcorner"),H("\u231F","\\lrcorner"),H("\xA9","\\copyright"),H("\xAE","\\textregistered"),H("\uFE0F","\\textregistered"),H("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),H("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),H("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),H("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),H("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),H("\u22EE","\\vdots"),H("\\varGamma","\\mathit{\\Gamma}"),H("\\varDelta","\\mathit{\\Delta}"),H("\\varTheta","\\mathit{\\Theta}"),H("\\varLambda","\\mathit{\\Lambda}"),H("\\varXi","\\mathit{\\Xi}"),H("\\varPi","\\mathit{\\Pi}"),H("\\varSigma","\\mathit{\\Sigma}"),H("\\varUpsilon","\\mathit{\\Upsilon}"),H("\\varPhi","\\mathit{\\Phi}"),H("\\varPsi","\\mathit{\\Psi}"),H("\\varOmega","\\mathit{\\Omega}"),H("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),H("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),H("\\boxed","\\fbox{$\\displaystyle{#1}$}"),H("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),H("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),H("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),H("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),H("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const Td={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};H("\\dots",function(s){let i="\\dotso";const c=s.expandAfterFuture().text;return c in Td?i=Td[c]:(c.slice(0,4)==="\\not"||c in _t.math&&["bin","rel"].includes(_t.math[c].group))&&(i="\\dotsb"),i});const jl={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};H("\\dotso",function(s){return s.future().text in jl?"\\ldots\\,":"\\ldots"}),H("\\dotsc",function(s){const i=s.future().text;return i in jl&&i!==","?"\\ldots\\,":"\\ldots"}),H("\\cdots",function(s){return s.future().text in jl?"\\@cdots\\,":"\\@cdots"}),H("\\dotsb","\\cdots"),H("\\dotsm","\\cdots"),H("\\dotsi","\\!\\cdots"),H("\\dotsx","\\ldots\\,"),H("\\DOTSI","\\relax"),H("\\DOTSB","\\relax"),H("\\DOTSX","\\relax"),H("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),H("\\,","\\tmspace+{3mu}{.1667em}"),H("\\thinspace","\\,"),H("\\>","\\mskip{4mu}"),H("\\:","\\tmspace+{4mu}{.2222em}"),H("\\medspace","\\:"),H("\\;","\\tmspace+{5mu}{.2777em}"),H("\\thickspace","\\;"),H("\\!","\\tmspace-{3mu}{.1667em}"),H("\\negthinspace","\\!"),H("\\negmedspace","\\tmspace-{4mu}{.2222em}"),H("\\negthickspace","\\tmspace-{5mu}{.277em}"),H("\\enspace","\\kern.5em "),H("\\enskip","\\hskip.5em\\relax"),H("\\quad","\\hskip1em\\relax"),H("\\qquad","\\hskip2em\\relax"),H("\\tag","\\@ifstar\\tag@literal\\tag@paren"),H("\\tag@paren","\\tag@literal{({#1})}"),H("\\tag@literal",s=>{if(s.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),H("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),H("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),H("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),H("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),H("\\newline","\\\\\\relax"),H("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Rd=de($e["Main-Regular"][84][1]-.7*$e["Main-Regular"][65][1]);H("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Rd+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),H("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Rd+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),H("\\hspace","\\@ifstar\\@hspacer\\@hspace"),H("\\@hspace","\\hskip #1\\relax"),H("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),H("\\ordinarycolon",":"),H("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),H("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),H("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),H("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),H("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),H("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),H("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),H("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),H("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),H("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),H("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),H("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),H("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),H("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),H("\u2237","\\dblcolon"),H("\u2239","\\eqcolon"),H("\u2254","\\coloneqq"),H("\u2255","\\eqqcolon"),H("\u2A74","\\Coloneqq"),H("\\ratio","\\vcentcolon"),H("\\coloncolon","\\dblcolon"),H("\\colonequals","\\coloneqq"),H("\\coloncolonequals","\\Coloneqq"),H("\\equalscolon","\\eqqcolon"),H("\\equalscoloncolon","\\Eqqcolon"),H("\\colonminus","\\coloneq"),H("\\coloncolonminus","\\Coloneq"),H("\\minuscolon","\\eqcolon"),H("\\minuscoloncolon","\\Eqcolon"),H("\\coloncolonapprox","\\Colonapprox"),H("\\coloncolonsim","\\Colonsim"),H("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),H("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),H("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),H("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),H("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),H("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),H("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),H("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),H("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),H("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),H("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),H("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),H("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),H("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),H("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),H("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),H("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),H("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),H("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),H("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),H("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),H("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),H("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),H("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),H("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),H("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),H("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),H("\\imath","\\html@mathml{\\@imath}{\u0131}"),H("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),H("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),H("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),H("\u27E6","\\llbracket"),H("\u27E7","\\rrbracket"),H("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),H("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),H("\u2983","\\lBrace"),H("\u2984","\\rBrace"),H("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}"),H("\u29B5","\\minuso"),H("\\darr","\\downarrow"),H("\\dArr","\\Downarrow"),H("\\Darr","\\Downarrow"),H("\\lang","\\langle"),H("\\rang","\\rangle"),H("\\uarr","\\uparrow"),H("\\uArr","\\Uparrow"),H("\\Uarr","\\Uparrow"),H("\\N","\\mathbb{N}"),H("\\R","\\mathbb{R}"),H("\\Z","\\mathbb{Z}"),H("\\alef","\\aleph"),H("\\alefsym","\\aleph"),H("\\Alpha","\\mathrm{A}"),H("\\Beta","\\mathrm{B}"),H("\\bull","\\bullet"),H("\\Chi","\\mathrm{X}"),H("\\clubs","\\clubsuit"),H("\\cnums","\\mathbb{C}"),H("\\Complex","\\mathbb{C}"),H("\\Dagger","\\ddagger"),H("\\diamonds","\\diamondsuit"),H("\\empty","\\emptyset"),H("\\Epsilon","\\mathrm{E}"),H("\\Eta","\\mathrm{H}"),H("\\exist","\\exists"),H("\\harr","\\leftrightarrow"),H("\\hArr","\\Leftrightarrow"),H("\\Harr","\\Leftrightarrow"),H("\\hearts","\\heartsuit"),H("\\image","\\Im"),H("\\infin","\\infty"),H("\\Iota","\\mathrm{I}"),H("\\isin","\\in"),H("\\Kappa","\\mathrm{K}"),H("\\larr","\\leftarrow"),H("\\lArr","\\Leftarrow"),H("\\Larr","\\Leftarrow"),H("\\lrarr","\\leftrightarrow"),H("\\lrArr","\\Leftrightarrow"),H("\\Lrarr","\\Leftrightarrow"),H("\\Mu","\\mathrm{M}"),H("\\natnums","\\mathbb{N}"),H("\\Nu","\\mathrm{N}"),H("\\Omicron","\\mathrm{O}"),H("\\plusmn","\\pm"),H("\\rarr","\\rightarrow"),H("\\rArr","\\Rightarrow"),H("\\Rarr","\\Rightarrow"),H("\\real","\\Re"),H("\\reals","\\mathbb{R}"),H("\\Reals","\\mathbb{R}"),H("\\Rho","\\mathrm{P}"),H("\\sdot","\\cdot"),H("\\sect","\\S"),H("\\spades","\\spadesuit"),H("\\sub","\\subset"),H("\\sube","\\subseteq"),H("\\supe","\\supseteq"),H("\\Tau","\\mathrm{T}"),H("\\thetasym","\\vartheta"),H("\\weierp","\\wp"),H("\\Zeta","\\mathrm{Z}"),H("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),H("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),H("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),H("\\bra","\\mathinner{\\langle{#1}|}"),H("\\ket","\\mathinner{|{#1}\\rangle}"),H("\\braket","\\mathinner{\\langle{#1}\\rangle}"),H("\\Bra","\\left\\langle#1\\right|"),H("\\Ket","\\left|#1\\right\\rangle");const Id=s=>i=>{const c=i.consumeArg().tokens,h=i.consumeArg().tokens,y=i.consumeArg().tokens,k=i.consumeArg().tokens,N=i.macros.get("|"),j=i.macros.get("\\|");i.macros.beginGroup();const G=ye=>Be=>{s&&(Be.macros.set("|",N),y.length&&Be.macros.set("\\|",j));let Ze=ye;return!ye&&y.length&&Be.future().text==="|"&&(Be.popToken(),Ze=!0),{tokens:Ze?y:h,numArgs:0}};i.macros.set("|",G(!1)),y.length&&i.macros.set("\\|",G(!0));const re=i.consumeArg().tokens,pe=i.expandTokens([...k,...re,...c]);return i.macros.endGroup(),{tokens:pe.reverse(),numArgs:0}};H("\\bra@ket",Id(!1)),H("\\bra@set",Id(!0)),H("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),H("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),H("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),H("\\angln","{\\angl n}"),H("\\blue","\\textcolor{##6495ed}{#1}"),H("\\orange","\\textcolor{##ffa500}{#1}"),H("\\pink","\\textcolor{##ff00af}{#1}"),H("\\red","\\textcolor{##df0030}{#1}"),H("\\green","\\textcolor{##28ae7b}{#1}"),H("\\gray","\\textcolor{gray}{#1}"),H("\\purple","\\textcolor{##9d38bd}{#1}"),H("\\blueA","\\textcolor{##ccfaff}{#1}"),H("\\blueB","\\textcolor{##80f6ff}{#1}"),H("\\blueC","\\textcolor{##63d9ea}{#1}"),H("\\blueD","\\textcolor{##11accd}{#1}"),H("\\blueE","\\textcolor{##0c7f99}{#1}"),H("\\tealA","\\textcolor{##94fff5}{#1}"),H("\\tealB","\\textcolor{##26edd5}{#1}"),H("\\tealC","\\textcolor{##01d1c1}{#1}"),H("\\tealD","\\textcolor{##01a995}{#1}"),H("\\tealE","\\textcolor{##208170}{#1}"),H("\\greenA","\\textcolor{##b6ffb0}{#1}"),H("\\greenB","\\textcolor{##8af281}{#1}"),H("\\greenC","\\textcolor{##74cf70}{#1}"),H("\\greenD","\\textcolor{##1fab54}{#1}"),H("\\greenE","\\textcolor{##0d923f}{#1}"),H("\\goldA","\\textcolor{##ffd0a9}{#1}"),H("\\goldB","\\textcolor{##ffbb71}{#1}"),H("\\goldC","\\textcolor{##ff9c39}{#1}"),H("\\goldD","\\textcolor{##e07d10}{#1}"),H("\\goldE","\\textcolor{##a75a05}{#1}"),H("\\redA","\\textcolor{##fca9a9}{#1}"),H("\\redB","\\textcolor{##ff8482}{#1}"),H("\\redC","\\textcolor{##f9685d}{#1}"),H("\\redD","\\textcolor{##e84d39}{#1}"),H("\\redE","\\textcolor{##bc2612}{#1}"),H("\\maroonA","\\textcolor{##ffbde0}{#1}"),H("\\maroonB","\\textcolor{##ff92c6}{#1}"),H("\\maroonC","\\textcolor{##ed5fa6}{#1}"),H("\\maroonD","\\textcolor{##ca337c}{#1}"),H("\\maroonE","\\textcolor{##9e034e}{#1}"),H("\\purpleA","\\textcolor{##ddd7ff}{#1}"),H("\\purpleB","\\textcolor{##c6b9fc}{#1}"),H("\\purpleC","\\textcolor{##aa87ff}{#1}"),H("\\purpleD","\\textcolor{##7854ab}{#1}"),H("\\purpleE","\\textcolor{##543b78}{#1}"),H("\\mintA","\\textcolor{##f5f9e8}{#1}"),H("\\mintB","\\textcolor{##edf2df}{#1}"),H("\\mintC","\\textcolor{##e0e5cc}{#1}"),H("\\grayA","\\textcolor{##f6f7f7}{#1}"),H("\\grayB","\\textcolor{##f0f1f2}{#1}"),H("\\grayC","\\textcolor{##e3e5e6}{#1}"),H("\\grayD","\\textcolor{##d6d8da}{#1}"),H("\\grayE","\\textcolor{##babec2}{#1}"),H("\\grayF","\\textcolor{##888d93}{#1}"),H("\\grayG","\\textcolor{##626569}{#1}"),H("\\grayH","\\textcolor{##3b3e40}{#1}"),H("\\grayI","\\textcolor{##21242c}{#1}"),H("\\kaBlue","\\textcolor{##314453}{#1}"),H("\\kaGreen","\\textcolor{##71B307}{#1}");const Pd={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class L4{constructor(i,c,h){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=c,this.expansionCount=0,this.feed(i),this.macros=new j4(_4,c.macros),this.mode=h,this.stack=[]}feed(i){this.lexer=new Md(i,this.settings)}switchMode(i){this.mode=i}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(i){this.stack.push(i)}pushTokens(i){this.stack.push(...i)}scanArgument(i){let c,h,y;if(i){if(this.consumeSpaces(),this.future().text!=="[")return null;c=this.popToken(),{tokens:y,end:h}=this.consumeArg(["]"])}else({tokens:y,start:c,end:h}=this.consumeArg());return this.pushToken(new yn("EOF",h.loc)),this.pushTokens(y),new yn("",hn.range(c,h))}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(i){const c=[],h=i&&i.length>0;h||this.consumeSpaces();const y=this.future();let k,N=0,j=0;do{if(k=this.popToken(),c.push(k),k.text==="{")++N;else if(k.text==="}"){if(--N,N===-1)throw new a("Extra }",k)}else if(k.text==="EOF")throw new a("Unexpected end of input in a macro argument, expected '"+(i&&h?i[j]:"}")+"'",k);if(i&&h)if((N===0||N===1&&i[j]==="{")&&k.text===i[j]){if(++j,j===i.length){c.splice(-j,j);break}}else j=0}while(N!==0||h);return y.text==="{"&&c[c.length-1].text==="}"&&(c.pop(),c.shift()),c.reverse(),{tokens:c,start:y,end:k}}consumeArgs(i,c){if(c){if(c.length!==i+1)throw new a("The length of delimiters doesn't match the number of args!");const y=c[0];for(let k=0;k<y.length;k++){const N=this.popToken();if(y[k]!==N.text)throw new a("Use of the macro doesn't match its definition",N)}}const h=[];for(let y=0;y<i;y++)h.push(this.consumeArg(c&&c[y+1]).tokens);return h}countExpansion(i){if(this.expansionCount+=i,this.expansionCount>this.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(i){const c=this.popToken(),h=c.text,y=c.noexpand?null:this._getExpansion(h);if(y==null||i&&y.unexpandable){if(i&&y==null&&h[0]==="\\"&&!this.isDefined(h))throw new a("Undefined control sequence: "+h);return this.pushToken(c),!1}this.countExpansion(1);let k=y.tokens;const N=this.consumeArgs(y.numArgs,y.delimiters);if(y.numArgs){k=k.slice();for(let j=k.length-1;j>=0;--j){let G=k[j];if(G.text==="#"){if(j===0)throw new a("Incomplete placeholder at end of macro body",G);if(G=k[--j],G.text==="#")k.splice(j+1,1);else if(/^[1-9]$/.test(G.text))k.splice(j,2,...N[+G.text-1]);else throw new a("Not a valid argument number",G)}}}return this.pushTokens(k),k.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){const i=this.stack.pop();return i.treatAsRelax&&(i.text="\\relax"),i}throw new Error}expandMacro(i){return this.macros.has(i)?this.expandTokens([new yn(i)]):void 0}expandTokens(i){const c=[],h=this.stack.length;for(this.pushTokens(i);this.stack.length>h;)if(this.expandOnce(!0)===!1){const y=this.stack.pop();y.treatAsRelax&&(y.noexpand=!1,y.treatAsRelax=!1),c.push(y)}return this.countExpansion(c.length),c}expandMacroAsText(i){const c=this.expandMacro(i);return c&&c.map(h=>h.text).join("")}_getExpansion(i){const c=this.macros.get(i);if(c==null)return c;if(i.length===1){const y=this.lexer.catcodes[i];if(y!=null&&y!==13)return}const h=typeof c=="function"?c(this):c;if(typeof h=="string"){let y=0;if(h.indexOf("#")!==-1){const G=h.replace(/##/g,"");for(;G.indexOf("#"+(y+1))!==-1;)++y}const k=new Md(h,this.settings),N=[];let j=k.lex();for(;j.text!=="EOF";)N.push(j),j=k.lex();return N.reverse(),{tokens:N,numArgs:y}}return h}isDefined(i){return this.macros.has(i)||vo.hasOwnProperty(i)||_t.math.hasOwnProperty(i)||_t.text.hasOwnProperty(i)||Pd.hasOwnProperty(i)}isExpandable(i){const c=this.macros.get(i);return c!=null?typeof c=="string"||typeof c=="function"||!c.unexpandable:vo.hasOwnProperty(i)&&!vo[i].primitive}}const zd=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Mi=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),_l={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},jd={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"};class Oi{constructor(i,c){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new L4(i,c,this.mode),this.settings=c,this.leftrightDepth=0}expect(i,c){if(c===void 0&&(c=!0),this.fetch().text!==i)throw new a("Expected '"+i+"', got '"+this.fetch().text+"'",this.fetch());c&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(i){this.mode=i,this.gullet.switchMode(i)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const i=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),i}finally{this.gullet.endGroups()}}subparse(i){const c=this.nextToken;this.consume(),this.gullet.pushToken(new yn("}")),this.gullet.pushTokens(i);const h=this.parseExpression(!1);return this.expect("}"),this.nextToken=c,h}parseExpression(i,c){const h=[];for(;;){this.mode==="math"&&this.consumeSpaces();const y=this.fetch();if(Oi.endOfExpression.indexOf(y.text)!==-1||c&&y.text===c||i&&vo[y.text]&&vo[y.text].infix)break;const k=this.parseAtom(c);if(k){if(k.type==="internal")continue}else break;h.push(k)}return this.mode==="text"&&this.formLigatures(h),this.handleInfixNodes(h)}handleInfixNodes(i){let c=-1,h;for(let y=0;y<i.length;y++)if(i[y].type==="infix"){if(c!==-1)throw new a("only one infix operator per group",i[y].token);c=y,h=i[y].replaceWith}if(c!==-1&&h){let y,k;const N=i.slice(0,c),j=i.slice(c+1);N.length===1&&N[0].type==="ordgroup"?y=N[0]:y={type:"ordgroup",mode:this.mode,body:N},j.length===1&&j[0].type==="ordgroup"?k=j[0]:k={type:"ordgroup",mode:this.mode,body:j};let G;return h==="\\\\abovefrac"?G=this.callFunction(h,[y,i[c],k],[]):G=this.callFunction(h,[y,k],[]),[G]}else return i}handleSupSubscript(i){const c=this.fetch(),h=c.text;this.consume(),this.consumeSpaces();let y;do{var k;y=this.parseGroup(i)}while(((k=y)==null?void 0:k.type)==="internal");if(!y)throw new a("Expected group after '"+h+"'",c);return y}formatUnsupportedCmd(i){const c=[];for(let y=0;y<i.length;y++)c.push({type:"textord",mode:"text",text:i[y]});const h={type:"text",mode:this.mode,body:c};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[h]}}parseAtom(i){const c=this.parseGroup("atom",i);if((c==null?void 0:c.type)==="internal"||this.mode==="text")return c;let h,y;for(;;){this.consumeSpaces();const k=this.fetch();if(k.text==="\\limits"||k.text==="\\nolimits"){if(c&&c.type==="op"){const N=k.text==="\\limits";c.limits=N,c.alwaysHandleSupSub=!0}else if(c&&c.type==="operatorname")c.alwaysHandleSupSub&&(c.limits=k.text==="\\limits");else throw new a("Limit controls must follow a math operator",k);this.consume()}else if(k.text==="^"){if(h)throw new a("Double superscript",k);h=this.handleSupSubscript("superscript")}else if(k.text==="_"){if(y)throw new a("Double subscript",k);y=this.handleSupSubscript("subscript")}else if(k.text==="'"){if(h)throw new a("Double superscript",k);const N={type:"textord",mode:this.mode,text:"\\prime"},j=[N];for(this.consume();this.fetch().text==="'";)j.push(N),this.consume();this.fetch().text==="^"&&j.push(this.handleSupSubscript("superscript")),h={type:"ordgroup",mode:this.mode,body:j}}else if(Mi[k.text]){const N=zd.test(k.text),j=[];for(j.push(new yn(Mi[k.text])),this.consume();;){const re=this.fetch().text;if(!Mi[re]||zd.test(re)!==N)break;j.unshift(new yn(Mi[re])),this.consume()}const G=this.subparse(j);N?y={type:"ordgroup",mode:"math",body:G}:h={type:"ordgroup",mode:"math",body:G}}else break}return h||y?{type:"supsub",mode:this.mode,base:c,sup:h,sub:y}:c}parseFunction(i,c){const h=this.fetch(),y=h.text,k=vo[y];if(!k)return null;if(this.consume(),c&&c!=="atom"&&!k.allowedInArgument)throw new a("Got function '"+y+"' with no arguments"+(c?" as "+c:""),h);if(this.mode==="text"&&!k.allowedInText)throw new a("Can't use function '"+y+"' in text mode",h);if(this.mode==="math"&&k.allowedInMath===!1)throw new a("Can't use function '"+y+"' in math mode",h);const{args:N,optArgs:j}=this.parseArguments(y,k);return this.callFunction(y,N,j,h,i)}callFunction(i,c,h,y,k){const N={funcName:i,parser:this,token:y,breakOnTokenText:k},j=vo[i];if(j&&j.handler)return j.handler(N,c,h);throw new a("No function handler for "+i)}parseArguments(i,c){const h=c.numArgs+c.numOptionalArgs;if(h===0)return{args:[],optArgs:[]};const y=[],k=[];for(let N=0;N<h;N++){let j=c.argTypes&&c.argTypes[N];const G=N<c.numOptionalArgs;(c.primitive&&j==null||c.type==="sqrt"&&N===1&&k[0]==null)&&(j="primitive");const re=this.parseGroupOfType("argument to '"+i+"'",j,G);if(G)k.push(re);else if(re!=null)y.push(re);else throw new a("Null argument, please report this as a bug")}return{args:y,optArgs:k}}parseGroupOfType(i,c,h){switch(c){case"color":return this.parseColorGroup(h);case"size":return this.parseSizeGroup(h);case"url":return this.parseUrlGroup(h);case"math":case"text":return this.parseArgumentGroup(h,c);case"hbox":{const y=this.parseArgumentGroup(h,"text");return y!=null?{type:"styling",mode:y.mode,body:[y],style:"text"}:null}case"raw":{const y=this.parseStringGroup("raw",h);return y!=null?{type:"raw",mode:"text",string:y.text}:null}case"primitive":{if(h)throw new a("A primitive argument cannot be optional");const y=this.parseGroup(i);if(y==null)throw new a("Expected group as "+i,this.fetch());return y}case"original":case null:case void 0:return this.parseArgumentGroup(h);default:throw new a("Unknown group type as "+i,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(i,c){const h=this.gullet.scanArgument(c);if(h==null)return null;let y="",k;for(;(k=this.fetch()).text!=="EOF";)y+=k.text,this.consume();return this.consume(),h.text=y,h}parseRegexGroup(i,c){const h=this.fetch();let y=h,k="",N;for(;(N=this.fetch()).text!=="EOF"&&i.test(k+N.text);)y=N,k+=y.text,this.consume();if(k==="")throw new a("Invalid "+c+": '"+h.text+"'",h);return h.range(y,k)}parseColorGroup(i){const c=this.parseStringGroup("color",i);if(c==null)return null;const h=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(c.text);if(!h)throw new a("Invalid color: '"+c.text+"'",c);let y=h[0];return/^[0-9a-f]{6}$/i.test(y)&&(y="#"+y),{type:"color-token",mode:this.mode,color:y}}parseSizeGroup(i){let c,h=!1;if(this.gullet.consumeSpaces(),!i&&this.gullet.future().text!=="{"?c=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):c=this.parseStringGroup("size",i),!c)return null;!i&&c.text.length===0&&(c.text="0pt",h=!0);const y=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(c.text);if(!y)throw new a("Invalid size: '"+c.text+"'",c);const k={number:+(y[1]+y[2]),unit:y[3]};if(!ht(k))throw new a("Invalid unit: '"+k.unit+"'",c);return{type:"size",mode:this.mode,value:k,isBlank:h}}parseUrlGroup(i){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const c=this.parseStringGroup("url",i);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),c==null)return null;const h=c.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:h}}parseArgumentGroup(i,c){const h=this.gullet.scanArgument(i);if(h==null)return null;const y=this.mode;c&&this.switchMode(c),this.gullet.beginGroup();const k=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const N={type:"ordgroup",mode:this.mode,loc:h.loc,body:k};return c&&this.switchMode(y),N}parseGroup(i,c){const h=this.fetch(),y=h.text;let k;if(y==="{"||y==="\\begingroup"){this.consume();const N=y==="{"?"}":"\\endgroup";this.gullet.beginGroup();const j=this.parseExpression(!1,N),G=this.fetch();this.expect(N),this.gullet.endGroup(),k={type:"ordgroup",mode:this.mode,loc:hn.range(h,G),body:j,semisimple:y==="\\begingroup"||void 0}}else if(k=this.parseFunction(c,i)||this.parseSymbol(),k==null&&y[0]==="\\"&&!Pd.hasOwnProperty(y)){if(this.settings.throwOnError)throw new a("Undefined control sequence: "+y,h);k=this.formatUnsupportedCmd(y),this.consume()}return k}formLigatures(i){let c=i.length-1;for(let h=0;h<c;++h){const y=i[h],k=y.text;k==="-"&&i[h+1].text==="-"&&(h+1<c&&i[h+2].text==="-"?(i.splice(h,3,{type:"textord",mode:"text",loc:hn.range(y,i[h+2]),text:"---"}),c-=2):(i.splice(h,2,{type:"textord",mode:"text",loc:hn.range(y,i[h+1]),text:"--"}),c-=1)),(k==="'"||k==="`")&&i[h+1].text===k&&(i.splice(h,2,{type:"textord",mode:"text",loc:hn.range(y,i[h+1]),text:k+k}),c-=1)}}parseSymbol(){const i=this.fetch();let c=i.text;if(/^\\verb[^a-zA-Z]/.test(c)){this.consume();let k=c.slice(5);const N=k.charAt(0)==="*";if(N&&(k=k.slice(1)),k.length<2||k.charAt(0)!==k.slice(-1))throw new a(`\\verb assertion failed --
|
|
492
|
-
please report what input caused this bug`);return k=k.slice(1,-1),{type:"verb",mode:"text",body:k,star:N}}jd.hasOwnProperty(c[0])&&!_t[this.mode][c[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+c[0]+'" used in math mode',i),c=jd[c[0]]+c.slice(1));const h=P4.exec(c);h&&(c=c.substring(0,h.index),c==="i"?c="\u0131":c==="j"&&(c="\u0237"));let y;if(_t[this.mode][c]){this.settings.strict&&this.mode==="math"&&Ye.indexOf(c)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+c[0]+'" used in math mode',i);const k=_t[this.mode][c].group,N=hn.range(i);let j;if(Tr.hasOwnProperty(k)){const G=k;j={type:"atom",mode:this.mode,family:G,loc:N,text:c}}else j={type:k,mode:this.mode,loc:N,text:c};y=j}else if(c.charCodeAt(0)>=128)this.settings.strict&&(ge(c.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+c[0]+'" used in math mode',i):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+c[0]+'"'+(" ("+c.charCodeAt(0)+")"),i)),y={type:"textord",mode:"text",loc:hn.range(i),text:c};else return null;if(this.consume(),h)for(let k=0;k<h[0].length;k++){const N=h[0][k];if(!_l[N])throw new a("Unknown accent ' "+N+"'",i);const j=_l[N][this.mode]||_l[N].text;if(!j)throw new a("Accent "+N+" unsupported in "+this.mode+" mode",i);y={type:"accent",mode:this.mode,loc:hn.range(i),label:j,isStretchy:!1,isShifty:!0,base:y}}return y}}Oi.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Ll=function(s,i){if(!(typeof s=="string"||s instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const c=new Oi(s,i);delete c.gullet.macros.current["\\df@tag"];let h=c.parse();if(delete c.gullet.macros.current["\\current@color"],delete c.gullet.macros.current["\\color"],c.gullet.macros.get("\\df@tag")){if(!i.displayMode)throw new a("\\tag works only in display equations");h=[{type:"tag",mode:"text",body:h,tag:c.subparse([new yn("\\df@tag")])}]}return h};let _d=function(s,i,c){i.textContent="";const h=Hl(s,c).toNode();i.appendChild(h)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),_d=function(){throw new a("KaTeX doesn't work in quirks mode.")});const H4=function(s,i){return Hl(s,i).toMarkup()},K4=function(s,i){const c=new F(i);return Ll(s,c)},Ld=function(s,i,c){if(c.throwOnError||!(s instanceof a))throw s;const h=be.makeSpan(["katex-error"],[new Bt(i)]);return h.setAttribute("title",s.toString()),h.setAttribute("style","color:"+c.errorColor),h},Hl=function(s,i){const c=new F(i);try{const h=Ll(s,c);return o4(h,s,c)}catch(h){return Ld(h,s,c)}};var q4={version:"0.16.25",render:_d,renderToString:H4,ParseError:a,SETTINGS_SCHEMA:m,__parse:K4,__renderToDomTree:Hl,__renderToHTMLTree:function(s,i){const c=new F(i);try{const h=Ll(s,c);return a4(h,s,c)}catch(h){return Ld(h,s,c)}},__setFontMetrics:pt,__defineSymbol:w,__defineFunction:ot,__defineMacro:H,__domTree:{Span:At,Anchor:Rt,SymbolNode:Bt,SvgNode:Ht,PathNode:jt,LineNode:Cr}},W4=q4;return n=n.default,n})()})})(N0)),N0.exports}var I9=cs.exports,V1;function P9(){return V1||(V1=1,(function(e,t){(function(r,n){n(t,_e,O9(),R9())})(I9,function(r,n,o,a){Object.defineProperty(r,"__esModule",{value:!0});function u(m,S){for(var F in S)Object.defineProperty(m,F,{enumerable:!0,get:S[F]})}u(r,{BlockMath:()=>x,InlineMath:()=>D}),n=d(n),o=l(o),a=l(a);function l(m){return m&&m.__esModule?m:{default:m}}function f(m){if(typeof WeakMap!="function")return null;var S=new WeakMap,F=new WeakMap;return(f=function(B){return B?F:S})(m)}function d(m,S){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var F=f(S);if(F&&F.has(m))return F.get(m);var B={},O=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in m)if(A!=="default"&&Object.prototype.hasOwnProperty.call(m,A)){var P=O?Object.getOwnPropertyDescriptor(m,A):null;P&&(P.get||P.set)?Object.defineProperty(B,A,P):B[A]=m[A]}return B.default=m,F&&F.set(m,B),B}const p=(m,{displayMode:S})=>{const F=({children:B,errorColor:O,math:A,renderError:P})=>{const T=A??B,{html:_,error:M}=(0,n.useMemo)(()=>{try{return{html:a.default.renderToString(T,{displayMode:S,errorColor:O,throwOnError:!!P}),error:void 0}}catch(q){if(q instanceof a.default.ParseError||q instanceof TypeError)return{error:q};throw q}},[T,O,P]);return M?P?P(M):n.default.createElement(m,{html:`${M.message}`}):n.default.createElement(m,{html:_})};return F.propTypes={children:o.default.string,errorColor:o.default.string,math:o.default.string,renderError:o.default.func},F},v={html:o.default.string.isRequired},g=({html:m})=>n.default.createElement("div",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:m}});g.propTypes=v;const b=({html:m})=>n.default.createElement("span",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:m}});b.propTypes=v;const x=p(g,{displayMode:!0}),D=p(b,{displayMode:!1})})})(cs,cs.exports)),cs.exports}var Yg=P9();const z9=Ve.span.attrs({className:"latex-inline-wrapper"})`
|
|
493
|
-
display: inline-flex;
|
|
494
|
-
align-items: baseline;
|
|
495
|
-
column-gap: 4px;
|
|
496
|
-
line-height: 1.2;
|
|
497
|
-
color: ${({$color:e})=>e||"inherit"};
|
|
498
|
-
`,j9=Ve.span.attrs({className:"latex-inline-error"})`
|
|
499
|
-
display: inline-flex;
|
|
500
|
-
align-items: center;
|
|
501
|
-
column-gap: 6px;
|
|
502
|
-
padding: 2px 4px;
|
|
503
|
-
border-radius: 4px;
|
|
504
|
-
background: rgba(215, 58, 73, 0.08);
|
|
505
|
-
color: #d73a49;
|
|
506
|
-
font-size: 0.85em;
|
|
507
|
-
`,_9=Ve.span.attrs({className:"latex-inline-error-message"})`
|
|
508
|
-
font-size: 0.75em;
|
|
509
|
-
color: #d73a49;
|
|
510
|
-
`,L9=({attributes:e,formula:t,styles:r})=>{var a;const n=Ct(()=>(t||"").trim(),[t]),o=(a=r==null?void 0:r.text)==null?void 0:a.color;return n?U.jsx(z9,{...e,$color:o,children:U.jsx(Yg.InlineMath,{math:n,errorColor:"#d73a49",renderError:u=>U.jsxs(j9,{children:[U.jsx("span",{children:n}),U.jsx(_9,{children:u==null?void 0:u.message})]})})}):null},H9=Ve.div.attrs({className:"latex-block-wrapper"})`
|
|
511
|
-
width: 100%;
|
|
512
|
-
display: flex;
|
|
513
|
-
justify-content: center;
|
|
514
|
-
align-items: center;
|
|
515
|
-
margin: 1.25rem 0;
|
|
516
|
-
padding: 0.75rem;
|
|
517
|
-
border-radius: 8px;
|
|
518
|
-
background: rgba(2, 132, 199, 0.05);
|
|
519
|
-
color: ${({$textColor:e})=>e||"inherit"};
|
|
520
|
-
`,K9=Ve.div.attrs({className:"latex-block-error"})`
|
|
521
|
-
display: flex;
|
|
522
|
-
flex-direction: column;
|
|
523
|
-
width: 100%;
|
|
524
|
-
gap: 6px;
|
|
525
|
-
padding: 0.75rem;
|
|
526
|
-
background: rgba(215, 58, 73, 0.08);
|
|
527
|
-
border: 1px dashed #d73a49;
|
|
528
|
-
border-radius: 8px;
|
|
529
|
-
font-size: 0.9rem;
|
|
530
|
-
color: #d73a49;
|
|
531
|
-
`,q9=Ve.span.attrs({className:"latex-block-error-title"})`
|
|
532
|
-
font-weight: 600;
|
|
533
|
-
`,W9=Ve.code.attrs({className:"latex-block-error-formula"})`
|
|
534
|
-
font-size: 0.85rem;
|
|
535
|
-
color: #d73a49;
|
|
536
|
-
overflow-x: auto;
|
|
537
|
-
`,V9=({attributes:e,formula:t,styles:r})=>{var a;const n=Ct(()=>(t||"").trim(),[t]),o=(a=r==null?void 0:r.text)==null?void 0:a.color;return n?U.jsx(H9,{...e,$textColor:o,children:U.jsx(Yg.BlockMath,{math:n,errorColor:"#d73a49",renderError:u=>U.jsxs(K9,{children:[U.jsx(q9,{children:"\u516C\u5F0F\u6E32\u67D3\u5931\u8D25"}),U.jsx(W9,{children:n}),U.jsx("span",{children:u==null?void 0:u.message})]})})}):null},U9=e=>{var a,u,l,f,d,p,v,g;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return U.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 U.jsx("h1",{...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"heading-two":return U.jsx("h2",{...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-three":return U.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(f=t==null?void 0:t.text)==null?void 0:f.color} !important`},children:n});case"bulleted-list":return U.jsx("ul",{...o,children:n});case"numbered-list":return U.jsx("ol",{...o,children:n});case"list-item":return U.jsx("li",{...o,children:n});case"table":return U.jsx("div",{className:"table-container",children:U.jsx("table",{...o,children:U.jsx("tbody",{children:n})})});case"table-row":return U.jsx("tr",{...o,children:n});case"table-cell":return r.header?U.jsx("th",{...o,children:n}):U.jsx("td",{...o,children:n});case"block-quote":return U.jsx("blockquote",{...o,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});case"code-block":return U.jsx("pre",{...o,children:U.jsx("code",{style:{color:`${(p=t==null?void 0:t.text)==null?void 0:p.color} !important`},children:n})});case"think":const b=e.extraProps||{},x=b.isCollapsed!==void 0?b.isCollapsed:Object.values(b)[1]===!0,D={...b,isCollapsed:x};return U.jsx(N9,{attributes:o,styles:t,extraProps:D,children:n});case"template":return U.jsx(Ug,{...o,element:r,children:n,styles:t});case"latex-inline":return U.jsx(L9,{attributes:o,formula:r.formula,styles:t});case"latex-block":return U.jsx(V9,{attributes:o,formula:r.formula,styles:t});case"retrieve-sql-data":const m=(S=>{if(!S)return null;try{const F=typeof S=="string"?JSON.parse(S):S;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(F)?F[0]:F}}]}}catch(F){return console.error("Failed to parse databaseReference:",F),null}})(((v=e.extraProps)==null?void 0:v.databaseReference)||e.databaseReference);return U.jsx(Xg,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:m||void 0,tagIndex:1});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),U.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:S=>{const F=S.target;F.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}),U.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:S=>{const F=S.target;F.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return U.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(g=t==null?void 0:t.text)==null?void 0:g.color} !important`},children:n})}},X9=e=>{var u,l,f,d,p,v;const{attributes:t,children:r,leaf:n,styles:o}=e;(u=o==null?void 0:o.text)!=null&&u.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let a=r;if(n.retrive){const g=n.fromtype==="0",b=n.fromtype==="1",x=n.fromtype==="2",D=n.text||"";let m=D,S="#e6f7ff",F="#1890ff",B="#bae7ff";return g?(m=`${D}`,S="#e6f7ff",F="#1890ff",B="#bae7ff"):b?(m=`${D}`,S="#f6ffed",F="#52c41a",B="#d9f7be"):x&&(m=`${D}`,S="#E7F8FB",F="#10BBD9",B="#E7F8FB"),a=U.jsx("span",{...t,style:{display:"inline-block",background:S,color:F,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:O=>O.currentTarget.style.background=B,onMouseLeave:O=>O.currentTarget.style.background=S,children:m}),a}if(n.code)a=U.jsx("code",{...t,style:{color:`${(l=o==null?void 0:o.text)==null?void 0:l.color} !important`},children:a});else{const g=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),b={color:`${(f=o==null?void 0:o.text)==null?void 0:f.color} !important`,fontSize:(d=o==null?void 0:o.text)==null?void 0:d.fontSize,lineHeight:(p=o==null?void 0:o.text)==null?void 0:p.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=U.jsx("span",{...t,className:g,style:b,children:a})}return n.link&&(a=U.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(v=o==null?void 0:o.text)==null?void 0:v.color} !important`},children:a})),a},Nu=Ve.div.attrs({className:"unified-rich-text-container"})`
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
& > * + * {
|
|
541
|
-
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/* 标题样式 */
|
|
545
|
-
& h1 {
|
|
546
|
-
font-size: ${e=>e.$size==="sm"?"20px":"32px"};
|
|
547
|
-
font-weight: 600;
|
|
548
|
-
margin: 24px 0 16px 0;
|
|
549
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
550
|
-
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
551
|
-
padding-bottom: 8px;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
& h2 {
|
|
555
|
-
font-size: ${e=>e.$size==="sm"?"18px":"24px"};
|
|
556
|
-
font-weight: 600;
|
|
557
|
-
margin: 24px 0 16px 0;
|
|
558
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
559
|
-
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
560
|
-
padding-bottom: 6px;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
& h3 {
|
|
564
|
-
font-size: ${e=>e.$size==="sm"?"16px":"20px"};
|
|
565
|
-
font-weight: 600;
|
|
566
|
-
margin: 24px 0 16px 0;
|
|
567
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
/* 段落样式 */
|
|
571
|
-
& p {
|
|
572
|
-
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
573
|
-
margin: 16px 0;
|
|
574
|
-
line-height: 1.6;
|
|
575
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/* 列表样式 - GitHub 风格简约设计 */
|
|
579
|
-
& ul, & ol {
|
|
580
|
-
margin: 16px 0;
|
|
581
|
-
padding-left: 24px;
|
|
582
|
-
line-height: 1.6;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
& ul {
|
|
586
|
-
list-style-type: disc;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
& ol {
|
|
590
|
-
list-style-type: decimal;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
& li {
|
|
594
|
-
margin: 4px 0;
|
|
595
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
/* 嵌套列表 */
|
|
599
|
-
& ul ul, & ol ol, & ul ol, & ol ul {
|
|
600
|
-
margin: 8px 0;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/* 引用块样式 */
|
|
604
|
-
& blockquote {
|
|
605
|
-
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
606
|
-
border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
607
|
-
padding: 0 16px;
|
|
608
|
-
margin: 16px 0;
|
|
609
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
|
|
610
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
/* 行内代码样式 */
|
|
614
|
-
& code {
|
|
615
|
-
font-size: 0.875em;
|
|
616
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
617
|
-
padding: 0.125em 0.25em;
|
|
618
|
-
border-radius: 6px;
|
|
619
|
-
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
620
|
-
color: #d73a49;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
/* 代码块样式 */
|
|
624
|
-
& pre {
|
|
625
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
626
|
-
padding: 16px;
|
|
627
|
-
border-radius: 6px;
|
|
628
|
-
overflow-x: auto;
|
|
629
|
-
margin: 16px 0;
|
|
630
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
& pre code {
|
|
634
|
-
background-color: transparent;
|
|
635
|
-
padding: 0;
|
|
636
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
/* 表格容器样式 */
|
|
640
|
-
& .table-container {
|
|
641
|
-
overflow: auto;
|
|
642
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
643
|
-
border-radius: 6px;
|
|
644
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
645
|
-
margin: 16px 0;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
/* 表格样式 */
|
|
649
|
-
& .table-container table,
|
|
650
|
-
& table {
|
|
651
|
-
width: 100%;
|
|
652
|
-
border-collapse: collapse;
|
|
653
|
-
border: none;
|
|
654
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
655
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
& .table-container th,
|
|
659
|
-
& .table-container td,
|
|
660
|
-
& th, & td {
|
|
661
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
662
|
-
padding: 8px 12px;
|
|
663
|
-
text-align: left;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
& .table-container th,
|
|
667
|
-
& th {
|
|
668
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
669
|
-
font-weight: 600;
|
|
670
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
& .table-container tr:nth-child(even) td,
|
|
674
|
-
& tr:nth-child(even) {
|
|
675
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
& .table-container td,
|
|
679
|
-
& td {
|
|
680
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
681
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
/* 图片样式 */
|
|
685
|
-
& img {
|
|
686
|
-
max-width: 100%;
|
|
687
|
-
height: auto;
|
|
688
|
-
border-radius: 6px;
|
|
689
|
-
margin: 16px 0;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
/* 链接样式 */
|
|
693
|
-
& a {
|
|
694
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
|
|
695
|
-
text-decoration: none;
|
|
696
|
-
|
|
697
|
-
&:hover {
|
|
698
|
-
text-decoration: underline;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/* 文本样式 */
|
|
703
|
-
& strong {
|
|
704
|
-
font-weight: 600;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
& em {
|
|
708
|
-
font-style: italic;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
& u {
|
|
712
|
-
text-decoration: underline;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
& s {
|
|
716
|
-
text-decoration: line-through;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
/* 分割线样式 */
|
|
720
|
-
& hr {
|
|
721
|
-
border: none;
|
|
722
|
-
border-top: 1px solid #d0d7de;
|
|
723
|
-
margin: 24px 0;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
/* 思考容器样式 */
|
|
727
|
-
& .think-container {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
& .think-header {
|
|
733
|
-
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
& .think-icon {
|
|
737
|
-
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
& .think-title {
|
|
741
|
-
font-weight: 600;
|
|
742
|
-
color: #24292f;
|
|
743
|
-
font-size: 14px;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
& .think-text {
|
|
747
|
-
color: #86909C;
|
|
748
|
-
font-size: 14px;
|
|
749
|
-
line-height: 1.6;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
/* 召回标签样式 */
|
|
753
|
-
& .retrive-tag {
|
|
754
|
-
display: inline-block;
|
|
755
|
-
background: #e6f7ff;
|
|
756
|
-
color: #1890ff;
|
|
757
|
-
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
758
|
-
border-radius: 6px;
|
|
759
|
-
padding: 2px 6px;
|
|
760
|
-
margin: 0 2px;
|
|
761
|
-
font-weight: 500;
|
|
762
|
-
font-size: 12px;
|
|
763
|
-
line-height: 1.4;
|
|
764
|
-
cursor: pointer;
|
|
765
|
-
vertical-align: middle;
|
|
766
|
-
transition: background-color 0.2s ease;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
& .retrive-tag:hover {
|
|
770
|
-
background: #bae7ff;
|
|
771
|
-
}
|
|
772
|
-
`;function Gg(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?Gg([r])[0]:r)})}const U1="__rtext_escaped_dollar__";function zs(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return console.warn("Failed to decode LaTeX formula:",e,t),e}}function Y9(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function G9(e){const t=new Map;let r=e||"";if(!r)return{content:r,placeholders:t};let n=0;r=r.replace(/\\\$/g,U1);const o=(l,f)=>{const d=`RTEXT_LATEX_PLACEHOLDER_${n++}_${l.toUpperCase()}`;return t.set(d,{type:l,formula:(f||"").trim()}),d},a=/\$\$([\s\S]+?)\$\$/g;r=r.replace(a,(l,f)=>o("block",f));const u=new RegExp("(?<!\\\\)\\$(?!\\$)([\\s\\S]+?)(?<!\\\\)\\$(?!\\$)","g");return r=r.replace(u,(l,f)=>o("inline",f)),r=r.replace(new RegExp(U1,"g"),"\\$"),{content:r,placeholders:t}}function Z9(e,t){if(!e||t.size===0)return e;let r=e;return t.forEach((n,o)=>{const a=n.type==="block"?"latex-block":"latex-inline",u=encodeURIComponent(n.formula),l=`<${a} data-formula="${u}"></${a}>`;r=r.replace(new RegExp(Y9(o),"g"),l)}),r}function Zg(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(d){var p;if(d.indexOf("<think>")>-1)if(d.indexOf("</think>")>-1){const v=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,g=d.match(v);return g?{thinkContent:g[1],content:g[2],finish:!0}:{thinkContent:"",content:d,finish:!0}}else{const v=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((p=d.match(v))==null?void 0:p[1])||"",content:""}}else return{thinkContent:"",content:d}}const{thinkContent:o,content:a,finish:u}=n(e||"");let l=[],f=0;if(!r.includes("think")&&o){const d=o.split(/\n+/).map(p=>p.trim()).filter(Boolean).flatMap(p=>{if(/<retrive-tag/i.test(p)){const v=document.createElement("div");return v.innerHTML=p,X1(v,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:p}]}]});l.push({type:"think",id:`think-${f++}`,thinkContent:o,finish:u,children:d})}if(a){const{content:d,placeholders:p}=G9(a);let v=d;r.includes("retrive")||(v=v.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(x,D,m)=>`<retrive-tag${D?" "+D.trim():""}>${m}</retrive-tag>`)),r.includes("retrieve-sql-data")||(v=v.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(x,D)=>`<retrieve-sql-data id="${D}"></retrieve-sql-data>`)),lr.setOptions({gfm:!0,breaks:!0,pedantic:!1});const g=lr(v);let b=typeof g=="string"?g:"";if(b=Z9(b,p),console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:b.length,hasImgTags:b.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:b}),typeof g=="string"){const x=document.createElement("div");x.innerHTML=b,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:x.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(x.querySelectorAll("*")).map(m=>m.tagName),imgElements:Array.from(x.querySelectorAll("img")).map(m=>({src:m.src,alt:m.alt}))});const D=X1(x,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:D.length,hasImageElements:D.some(m=>m.type==="image")}),D&&D.length>0&&(l=l.concat(D))}}return!l||l.length===0?[{type:"paragraph",children:[{text:""}]}]:Gg(l)}function X1(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 u;if(a.nodeType===Node.ELEMENT_NODE){const l=a;switch(console.log("\u{1F50D} \u5904\u7406\u5143\u7D20\u8282\u70B9:",{tagName:l.tagName,isImg:l.tagName==="IMG",src:l.getAttribute("src"),basePath:t}),l.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:Ur(l,t)});break;case"h1":n.push({type:"heading-one",children:Ur(l,t)});break;case"h2":n.push({type:"heading-two",children:Ur(l,t)});break;case"h3":n.push({type:"heading-three",children:Ur(l,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(l.children).map(d=>({type:"list-item",children:Ur(d)}))});break;case"ol":const f={type:"numbered-list",children:Array.from(l.children).map(d=>({type:"list-item",children:Ur(d)}))};n.push(f);break;case"li":n.push({type:"list-item",children:Ur(l,t)});break;case"pre":{const d=l.querySelector("code");d?n.push({type:"code-block",children:Ur(d)}):n.push({type:"code-block",children:Ur(l,t)});break}case"code":{l.closest("pre")||n.push({type:"paragraph",children:Ur(l,t)});break}case"retrive-tag":{const d=Ur(l,t);d.length>0&&n.push({type:"paragraph",children:d});break}case"retrieve-sql-data":{const d=l.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:d,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:Ur(l,t)});break;case"table":n.push(J9(l));break;case"img":{const d=l.getAttribute("src")||"",p=l.getAttribute("alt")||"";let v=d;if(t)if(d.startsWith("./"))v=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const g=t.substring(0,t.lastIndexOf("/"));v=d.replace(/^\.\.\//,g+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(v=`${t}/${d}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:v}),n.push({type:"image",url:v,alt:p,children:[{text:""}]});break}case"iframe":{const d=l.getAttribute("src")||"",p=l.getAttribute("width")||"100%",v=l.getAttribute("height")||"400",g=l.getAttribute("frameborder")||"0",b=l.getAttribute("title")||"";let x=d;if(t)if(d.startsWith("./"))x=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const D=t.substring(0,t.lastIndexOf("/"));x=d.replace(/^\.\.\//,D+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(x=`${t}/${d}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:x}),n.push({type:"iframe",src:x,width:p,height:v,frameborder:g,title:b,children:[{text:""}]});break}case"latex-inline":{const d=zs(l.getAttribute("data-formula"));n.push({type:"latex-inline",formula:d,children:[{text:""}]});break}case"latex-block":{const d=zs(l.getAttribute("data-formula"));n.push({type:"latex-block",formula:d,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:Ur(l)});break;default:n.push({type:"paragraph",children:Ur(l,t)});break}}else a.nodeType===Node.TEXT_NODE&&((u=a.textContent)!=null&&u.trim())&&n.push({type:"paragraph",children:[{text:a.textContent}]})}),n))(r,e.childNodes),r}function Ur(e,t){const r=[];function n(a){const u=[];let l="",f=!1,d=!1,p=0;for(;p<a.length;)a.startsWith("**",p)?(l&&(u.push({text:l,code:!0,bold:f,italic:d}),l=""),f=!f,p+=2):a.startsWith("*",p)?(l&&(u.push({text:l,code:!0,bold:f,italic:d}),l=""),d=!d,p+=1):(l+=a[p],p+=1);return l&&u.push({text:l,code:!0,bold:f,italic:d}),u}function o(a,u={}){var l,f;if(a.nodeType===Node.TEXT_NODE){const d=(l=a.textContent)==null?void 0:l.trim();return d?u.code?n(d):[{text:d,...u}]:[]}if(a.nodeType===Node.ELEMENT_NODE){const d=a,p={...u};switch(d.tagName.toLowerCase()){case"em":case"i":p.italic=!0;break;case"strong":case"b":p.bold=!0;break;case"code":d.closest("pre")||(p.code=!0);break;case"del":case"s":p.strikethrough=!0;break;case"u":p.underline=!0;break;case"a":p.link=d.getAttribute("href")||void 0;break;case"retrive-tag":{const g={};for(const{name:b,value:x}of Array.from(d.attributes))g[b]=x;return[{text:d.textContent||""||"[0]",retrive:!0,...g}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:d.getAttribute("id")||"",children:[{text:""}]}];case"img":{const g=d.getAttribute("src")||"",b=d.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:g,alt:b,basePath:t});let x=g;if(t)if(g.startsWith("./"))x=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const D=t.substring(0,t.lastIndexOf("/"));x=g.replace(/^\.\.\//,D+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(x=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:x}),[{type:"image",url:x,alt:b,children:[{text:""}]}]}case"iframe":{const g=d.getAttribute("src")||"",b=d.getAttribute("width")||"100%",x=d.getAttribute("height")||"400",D=d.getAttribute("frameborder")||"0",m=d.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:g,width:b,height:x,basePath:t});let S=g;if(t)if(g.startsWith("./"))S=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const F=t.substring(0,t.lastIndexOf("/"));S=g.replace(/^\.\.\//,F+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(S=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:S}),[{type:"iframe",src:S,width:b,height:x,frameborder:D,title:m,children:[{text:""}]}]}case"latex-inline":return[{type:"latex-inline",formula:zs(d.getAttribute("data-formula")),children:[{text:""}]}];case"latex-block":return[{type:"latex-block",formula:zs(d.getAttribute("data-formula")),children:[{text:""}]}]}if(d.childNodes.length===0&&((f=d.textContent)!=null&&f.trim()))return p.code?n(d.textContent):[{text:d.textContent,...p}];let v=[];for(const g of Array.from(d.childNodes))v=v.concat(o(g,p));return v}return[]}for(const a of Array.from(e.childNodes))r.push(...o(a));return r}function J9(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:Ur(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(u=>({type:"table-cell",header:!1,children:Ur(u)}))})}))}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:Ur(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:Ur(a)}))})})}return{type:"table",children:t}}const Q9=Ve.div.attrs({className:"unified-rich-text-container"})`
|
|
773
|
-
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
774
|
-
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
775
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
776
|
-
min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
777
|
-
overflow: hidden;
|
|
778
|
-
transition: all 0.2s ease-in-out;
|
|
779
|
-
padding-top: 14px;
|
|
780
|
-
${e=>{var t,r;return e.$isEditing&&`
|
|
781
|
-
&:focus-within {
|
|
782
|
-
border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
|
|
783
|
-
box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
|
|
784
|
-
}
|
|
785
|
-
`}}
|
|
786
|
-
`,$u=Ve.div.attrs({className:"unified-rich-text-editable-container"})`
|
|
787
|
-
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
|
|
788
|
-
min-height: inherit;
|
|
789
|
-
outline: none;
|
|
790
|
-
|
|
791
|
-
& > * + * {
|
|
792
|
-
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
793
|
-
}
|
|
794
|
-
`,Y1=(e,t)=>t<0?e:`${e.slice(0,t)}\\${e.slice(t)}`,G1=(e,t)=>{if(!e)return-1;const r=t.length;let n=-1;for(let o=0;o<e.length;o++){if(e[o]==="\\"){o+=1;continue}if(r===2){if(e.startsWith("$$",o)){n===-1?n=o:n=-1,o+=1;continue}}else if(r===1&&e[o]==="$"){if(e[o+1]==="$"){o+=1;continue}n===-1?n=o:n=-1}}return n},eD=e=>{const t=e||"";if(!t)return{content:"",hasPendingLatex:!1};let r=t,n=!1;const o=[],a=G1(t,"$$");a!==-1&&(r=Y1(r,a),o.push(a),n=!0);const u=G1(t,"$");if(u!==-1){const l=o.filter(f=>f<=u).length;r=Y1(r,u+l),n=!0}return{content:r,hasPendingLatex:n}};var pi=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(pi||{});const cl=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:a={},onChange:u,onFocus:l,onBlur:f,renderElement:d,renderLeaf:p,onRetriveTagClick:v,eventsEmit:g,onEditorReady:b,extraProps:x={},className:D,style:m,styles:S,enableTemplateInput:F=!1,disabledTags:B=[]})=>{const O=Hs(),A=Ct(()=>{var ae,ke,Z,he,se,te,ce,Ce,we;return{primaryColor:((ae=O==null?void 0:O.colors)==null?void 0:ae.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((ke=O==null?void 0:O.colors)==null?void 0:ke.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((Z=O==null?void 0:O.colors)==null?void 0:Z.background)||(a==null?void 0:a.backgroundColor)||"transparent",textColor:((he=O==null?void 0:O.colors)==null?void 0:he.text)||(a==null?void 0:a.textColor)||"#24292f",borderColor:((se=O==null?void 0:O.colors)==null?void 0:se.border)||(a==null?void 0:a.borderColor)||"#dee2e6",disabledBackground:((te=O==null?void 0:O.colors)==null?void 0:te.disabledBackground)||(a==null?void 0:a.disabledBackground)||"#f8f9fa",hoverBackground:(a==null?void 0:a.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((ce=O==null?void 0:O.space)==null?void 0:ce.radius)||(a==null?void 0:a.borderRadius)||"4px",padding:((Ce=O==null?void 0:O.space)==null?void 0:Ce.padding)||(a==null?void 0:a.padding)||"0rem 1rem",margin:((we=O==null?void 0:O.space)==null?void 0:we.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}},[O,a,o]),P=Lt();if(!P.current){const ae=My(),ke=Vw(ae),{isInline:Z}=ke;ke.isInline=te=>!B.includes("template")&&te.type==="template"?!0:Z(te);const{isVoid:he}=ke;ke.isVoid=te=>!B.includes("template")&&te.type==="template"?!0:he(te);const se=te=>{if(!(F&&!B.includes("template")))return te;const{insertText:ce,insertData:Ce}=te,we=()=>{const Se=/<template>([^<]*)<\/template>/g,Ee=Array.from(I.nodes(te,{match:Ae=>mt.isText(Ae)&&Se.test(Ae.text)}));if(Ee.length!==0)for(const Ae of Ee){const[$e,Te]=Ae,He=$e.text||"",pt=[];let at=0,Me;for(Se.lastIndex=0;(Me=Se.exec(He))!==null;){if(Me.index>at){const Le=He.slice(at,Me.index);Le&&pt.push({text:Le})}pt.push({type:"template",placeholder:(Me[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),at=Me.index+Me[0].length}if(at<He.length){const Le=He.slice(at);Le&&pt.push({text:Le})}We.removeNodes(te,{at:Te}),We.insertNodes(te,pt,{at:Te})}};return te.insertText=Se=>{ce(Se),we()},te.insertData=Se=>{const Ee=Se.getData("text/plain");if(Ee&&/<template>[\s\S]*?<\/template>/.test(Ee)){ce(Ee),we();return}return Ce(Se)},te};P.current=se(ke)}const T=P.current;er(()=>{T&&b&&t&&b(T)},[T,b,t]);const[_,M]=Ot(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[q,L]=Ot(0);er(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const ae=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",ae),M(ae),L(ke=>ke+1)}},[e.type,e.content]);const Y=Lt(void 0),V=Ct(()=>{if(e.type!=="markdown")return{content:"",hasPendingLatex:!1};const ae=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");return eD(ae)},[e.type,e.content]);er(()=>{if(e.type!=="markdown")return;const ae=V.content;Y.current!==ae&&(Y.current=ae,L(ke=>ke+1))},[e.type,V.content]);const z=Ct(()=>e.type!=="markdown"?x:{...x||{},hasPendingLatex:V.hasPendingLatex},[x,e.type,V.hasPendingLatex]),K=Lt("");er(()=>{if(e.type!=="markdown")return;const ae=JSON.stringify(z||{});ae!==K.current&&(K.current=ae,L(ke=>ke+1))},[z,e.type]);const X=St(ae=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",ae),ae&&Array.isArray(ae)?(M(ae),u==null||u(ae,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",ae)},[u]),W=Ct(()=>{const ae=A==null?void 0:A.baseFontSize;return typeof ae=="number"&&!Number.isNaN(ae)?ae:o==="md"?14:12},[A,o]),J=St(ae=>{const ke={...ae,size:o,styles:S,eventsEmit:g,extraProps:z};return d?d(ke):U9(ke)},[d,o,S,g,z]),R=St(ae=>{const ke={...ae,styles:S,onRetriveTagClick:v};return p?p(ke):X9(ke)},[p,S,v]);er(()=>(window.copyCodeFromData=ae=>{const ke=ae.getAttribute("data-code");if(!ke){console.error("No code content found");return}const Z=ke.replace(/\\n/g,`
|
|
795
|
-
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(Z).then(()=>{const he=ae.innerHTML;ae.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>',ae.classList.add("copied"),setTimeout(()=>{ae.innerHTML=he,ae.classList.remove("copied")},2e3)}).catch(he=>{console.error("\u590D\u5236\u5931\u8D25:",he);const se=ae.innerHTML;ae.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>',ae.style.background="#d73a49",ae.style.borderColor="#d73a49",ae.style.color="white",setTimeout(()=>{ae.innerHTML=se,ae.style.background="",ae.style.borderColor="",ae.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const ie=Ct(()=>{var ae,ke;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(ae=V.content)==null?void 0:ae.length,basePath:n,hasImages:(ke=V.content)==null?void 0:ke.includes("![")});const Z=Zg(V.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:Z.length,hasImageElements:Z.some(we=>we.type==="image"),imageElements:Z.filter(we=>we.type==="image")}),Z&&Z.length>0)return U.jsx(Nu,{theme:A,$size:o,children:U.jsx(wu,{editor:T,initialValue:Z,onChange:()=>{},children:U.jsx($u,{theme:A,children:U.jsx(xu,{renderElement:J,renderLeaf:R,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${W}px`}})})},q)});const he={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let se=lr(V.content||"",he);se=se.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),se=se.replace(/<\/table>/g,"</table></div>"),se=se.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(we,Se,Ee)=>{const Ae=Ee.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<pre><code${Se}>${Ee}</code><button class="code-copy-btn" data-code="${Ae}" 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 te=(A==null?void 0:A.disabledBackground)||(A==null?void 0:A.backgroundColor)||"#ffffff",ce=(we,Se)=>we.startsWith("#")?`${we}${Math.round(Se*255).toString(16).padStart(2,"0")}`:we,Ce=`
|
|
796
|
-
<style>
|
|
797
|
-
.table-container{ overflow:auto; border:1px solid ${(A==null?void 0:A.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(A==null?void 0:A.backgroundColor)||"transparent"} !important; }
|
|
798
|
-
.table-container table{ background:${(A==null?void 0:A.backgroundColor)||"transparent"} !important; color:${(A==null?void 0:A.textColor)||"#24292f"} !important; }
|
|
799
|
-
.table-container th{ background:${(A==null?void 0:A.disabledBackground)||"#f6f8fa"} !important; color:${(A==null?void 0:A.textColor)||"#24292f"} !important; }
|
|
800
|
-
.table-container td{ color:${(A==null?void 0:A.textColor)||"#24292f"} !important; background:${(A==null?void 0:A.backgroundColor)||"transparent"} !important; }
|
|
801
|
-
.table-container tr:nth-child(even) td{ background:${(A==null?void 0:A.disabledBackground)||"#f6f8fa"} !important; }
|
|
802
|
-
pre{ position:relative; background:${te}; border:1px solid ${(A==null?void 0:A.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(A==null?void 0:A.textColor)||"#e5e7eb"}; }
|
|
803
|
-
pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${ce("#22c55e",.25)}, ${ce("#f59e0b",.25)}, ${ce("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
|
|
804
|
-
pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(A==null?void 0:A.borderColor)||"#e5e7eb"}; color:${(A==null?void 0:A.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
|
|
805
|
-
pre .code-copy-btn:hover{ background:${(A==null?void 0:A.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
806
|
-
</style>
|
|
807
|
-
`;return U.jsx("div",{style:{padding:(A==null?void 0:A.padding)||"1rem",fontSize:`${W}px`,lineHeight:1.6,color:(A==null?void 0:A.textColor)||"#24292f"},"data-pending-latex":V.hasPendingLatex||void 0,dangerouslySetInnerHTML:{__html:Ce+se}})}catch(Z){return console.error("Markdown parsing error:",Z),U.jsx("div",{children:e.content})}},[e,A,T,q,J,R,W,V]),me=Ct(()=>e.type!=="html"?null:U.jsx("div",{style:{padding:(A==null?void 0:A.padding)||"1rem",fontSize:`${W}px`,lineHeight:1.6,color:(A==null?void 0:A.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,A,W]),xe=Ct(()=>e.type!=="text"?null:U.jsx("div",{style:{padding:(A==null?void 0:A.padding)||"1rem",fontSize:`${W}px`,lineHeight:1.6,color:(A==null?void 0:A.textColor)||"#24292f"},children:U.jsx("span",{children:e.content||""})}),[e,A,W]),ge=()=>{switch(e.type){case"markdown":return ie;case"html":return me;case"text":return xe;case"slate":default:return t?U.jsx(Nu,{theme:A,$size:o,children:U.jsx(wu,{editor:T,initialValue:_,onChange:X,children:U.jsx($u,{theme:A,children:U.jsx(xu,{renderElement:J,renderLeaf:R,placeholder:r,readOnly:!1,onFocus:l,onBlur:f,style:{minHeight:"inherit",outline:"none",fontSize:`${W}px`}})})},q)}):U.jsx(Nu,{theme:A,$size:o,children:U.jsx(wu,{editor:T,initialValue:_,onChange:()=>{},children:U.jsx($u,{theme:A,children:U.jsx(xu,{renderElement:J,renderLeaf:R,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${W}px`}})})},q)})}};return U.jsx(Q9,{theme:A,$isEditing:t,className:D,style:m,children:ge()})};var $0={exports:{}},tD=$0.exports,Z1;function rD(){return Z1||(Z1=1,(function(e,t){(function(r,n){e.exports=n()})(tD,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",u="second",l="minute",f="hour",d="day",p="week",v="month",g="quarter",b="year",x="date",D="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,F={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(z){var K=["th","st","nd","rd"],X=z%100;return"["+z+(K[(X-20)%10]||K[X]||K[0])+"]"}},B=function(z,K,X){var W=String(z);return!W||W.length>=K?z:""+Array(K+1-W.length).join(X)+z},O={s:B,z:function(z){var K=-z.utcOffset(),X=Math.abs(K),W=Math.floor(X/60),J=X%60;return(K<=0?"+":"-")+B(W,2,"0")+":"+B(J,2,"0")},m:function z(K,X){if(K.date()<X.date())return-z(X,K);var W=12*(X.year()-K.year())+(X.month()-K.month()),J=K.clone().add(W,v),R=X-J<0,ie=K.clone().add(W+(R?-1:1),v);return+(-(W+(X-J)/(R?J-ie:ie-J))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:v,y:b,w:p,d,D:x,h:f,m:l,s:u,ms:a,Q:g}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},A="en",P={};P[A]=F;var T="$isDayjsObject",_=function(z){return z instanceof Y||!(!z||!z[T])},M=function z(K,X,W){var J;if(!K)return A;if(typeof K=="string"){var R=K.toLowerCase();P[R]&&(J=R),X&&(P[R]=X,J=R);var ie=K.split("-");if(!J&&ie.length>1)return z(ie[0])}else{var me=K.name;P[me]=K,J=me}return!W&&J&&(A=J),J||!W&&A},q=function(z,K){if(_(z))return z.clone();var X=typeof K=="object"?K:{};return X.date=z,X.args=arguments,new Y(X)},L=O;L.l=M,L.i=_,L.w=function(z,K){return q(z,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var Y=(function(){function z(X){this.$L=M(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[T]=!0}var K=z.prototype;return K.parse=function(X){this.$d=(function(W){var J=W.date,R=W.utc;if(J===null)return new Date(NaN);if(L.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var ie=J.match(m);if(ie){var me=ie[2]-1||0,xe=(ie[7]||"0").substring(0,3);return R?new Date(Date.UTC(ie[1],me,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,xe)):new Date(ie[1],me,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,xe)}}return new Date(J)})(X),this.init()},K.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},K.$utils=function(){return L},K.isValid=function(){return this.$d.toString()!==D},K.isSame=function(X,W){var J=q(X);return this.startOf(W)<=J&&J<=this.endOf(W)},K.isAfter=function(X,W){return q(X)<this.startOf(W)},K.isBefore=function(X,W){return this.endOf(W)<q(X)},K.$g=function(X,W,J){return L.u(X)?this[W]:this.set(J,X)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(X,W){var J=this,R=!!L.u(W)||W,ie=L.p(X),me=function(te,ce){var Ce=L.w(J.$u?Date.UTC(J.$y,ce,te):new Date(J.$y,ce,te),J);return R?Ce:Ce.endOf(d)},xe=function(te,ce){return L.w(J.toDate()[te].apply(J.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(ce)),J)},ge=this.$W,ae=this.$M,ke=this.$D,Z="set"+(this.$u?"UTC":"");switch(ie){case b:return R?me(1,0):me(31,11);case v:return R?me(1,ae):me(0,ae+1);case p:var he=this.$locale().weekStart||0,se=(ge<he?ge+7:ge)-he;return me(R?ke-se:ke+(6-se),ae);case d:case x:return xe(Z+"Hours",0);case f:return xe(Z+"Minutes",1);case l:return xe(Z+"Seconds",2);case u:return xe(Z+"Milliseconds",3);default:return this.clone()}},K.endOf=function(X){return this.startOf(X,!1)},K.$set=function(X,W){var J,R=L.p(X),ie="set"+(this.$u?"UTC":""),me=(J={},J[d]=ie+"Date",J[x]=ie+"Date",J[v]=ie+"Month",J[b]=ie+"FullYear",J[f]=ie+"Hours",J[l]=ie+"Minutes",J[u]=ie+"Seconds",J[a]=ie+"Milliseconds",J)[R],xe=R===d?this.$D+(W-this.$W):W;if(R===v||R===b){var ge=this.clone().set(x,1);ge.$d[me](xe),ge.init(),this.$d=ge.set(x,Math.min(this.$D,ge.daysInMonth())).$d}else me&&this.$d[me](xe);return this.init(),this},K.set=function(X,W){return this.clone().$set(X,W)},K.get=function(X){return this[L.p(X)]()},K.add=function(X,W){var J,R=this;X=Number(X);var ie=L.p(W),me=function(ae){var ke=q(R);return L.w(ke.date(ke.date()+Math.round(ae*X)),R)};if(ie===v)return this.set(v,this.$M+X);if(ie===b)return this.set(b,this.$y+X);if(ie===d)return me(1);if(ie===p)return me(7);var xe=(J={},J[l]=n,J[f]=o,J[u]=r,J)[ie]||1,ge=this.$d.getTime()+X*xe;return L.w(ge,this)},K.subtract=function(X,W){return this.add(-1*X,W)},K.format=function(X){var W=this,J=this.$locale();if(!this.isValid())return J.invalidDate||D;var R=X||"YYYY-MM-DDTHH:mm:ssZ",ie=L.z(this),me=this.$H,xe=this.$m,ge=this.$M,ae=J.weekdays,ke=J.months,Z=J.meridiem,he=function(ce,Ce,we,Se){return ce&&(ce[Ce]||ce(W,R))||we[Ce].slice(0,Se)},se=function(ce){return L.s(me%12||12,ce,"0")},te=Z||function(ce,Ce,we){var Se=ce<12?"AM":"PM";return we?Se.toLowerCase():Se};return R.replace(S,(function(ce,Ce){return Ce||(function(we){switch(we){case"YY":return String(W.$y).slice(-2);case"YYYY":return L.s(W.$y,4,"0");case"M":return ge+1;case"MM":return L.s(ge+1,2,"0");case"MMM":return he(J.monthsShort,ge,ke,3);case"MMMM":return he(ke,ge);case"D":return W.$D;case"DD":return L.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return he(J.weekdaysMin,W.$W,ae,2);case"ddd":return he(J.weekdaysShort,W.$W,ae,3);case"dddd":return ae[W.$W];case"H":return String(me);case"HH":return L.s(me,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return te(me,xe,!0);case"A":return te(me,xe,!1);case"m":return String(xe);case"mm":return L.s(xe,2,"0");case"s":return String(W.$s);case"ss":return L.s(W.$s,2,"0");case"SSS":return L.s(W.$ms,3,"0");case"Z":return ie}return null})(ce)||ie.replace(":","")}))},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(X,W,J){var R,ie=this,me=L.p(W),xe=q(X),ge=(xe.utcOffset()-this.utcOffset())*n,ae=this-xe,ke=function(){return L.m(ie,xe)};switch(me){case b:R=ke()/12;break;case v:R=ke();break;case g:R=ke()/3;break;case p:R=(ae-ge)/6048e5;break;case d:R=(ae-ge)/864e5;break;case f:R=ae/o;break;case l:R=ae/n;break;case u:R=ae/r;break;default:R=ae}return J?R:L.a(R)},K.daysInMonth=function(){return this.endOf(v).$D},K.$locale=function(){return P[this.$L]},K.locale=function(X,W){if(!X)return this.$L;var J=this.clone(),R=M(X,W,!0);return R&&(J.$L=R),J},K.clone=function(){return L.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()},z})(),V=Y.prototype;return q.prototype=V,[["$ms",a],["$s",u],["$m",l],["$H",f],["$W",d],["$M",v],["$y",b],["$D",x]].forEach((function(z){V[z[1]]=function(K){return this.$g(K,z[0],z[1])}})),q.extend=function(z,K){return z.$i||(z(K,Y,q),z.$i=!0),q},q.locale=M,q.isDayjs=_,q.unix=function(z){return q(1e3*z)},q.en=P[A],q.Ls=P,q.p={},q}))})($0)),$0.exports}var nD=rD();const oD=Gs(nD);/**
|
|
808
|
-
* @license lucide-react v0.456.0 - ISC
|
|
809
|
-
*
|
|
810
|
-
* This source code is licensed under the ISC license.
|
|
811
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
812
|
-
*/const aD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jg=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
813
|
-
* @license lucide-react v0.456.0 - ISC
|
|
814
|
-
*
|
|
815
|
-
* This source code is licensed under the ISC license.
|
|
816
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
817
|
-
*/var iD={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"};/**
|
|
818
|
-
* @license lucide-react v0.456.0 - ISC
|
|
819
|
-
*
|
|
820
|
-
* This source code is licensed under the ISC license.
|
|
821
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
822
|
-
*/const sD=No(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:u,...l},f)=>ds("svg",{ref:f,...iD,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Jg("lucide",o),...l},[...u.map(([d,p])=>ds(d,p)),...Array.isArray(a)?a:[a]]));/**
|
|
823
|
-
* @license lucide-react v0.456.0 - ISC
|
|
824
|
-
*
|
|
825
|
-
* This source code is licensed under the ISC license.
|
|
826
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
827
|
-
*/const Wr=(e,t)=>{const r=No(({className:n,...o},a)=>ds(sD,{ref:a,iconNode:t,className:Jg(`lucide-${aD(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
828
|
-
* @license lucide-react v0.456.0 - ISC
|
|
829
|
-
*
|
|
830
|
-
* This source code is licensed under the ISC license.
|
|
831
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
832
|
-
*/const qa=Wr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
833
|
-
* @license lucide-react v0.456.0 - ISC
|
|
834
|
-
*
|
|
835
|
-
* This source code is licensed under the ISC license.
|
|
836
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
837
|
-
*/const lD=Wr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
838
|
-
* @license lucide-react v0.456.0 - ISC
|
|
839
|
-
*
|
|
840
|
-
* This source code is licensed under the ISC license.
|
|
841
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
842
|
-
*/const Wa=Wr("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
843
|
-
* @license lucide-react v0.456.0 - ISC
|
|
844
|
-
*
|
|
845
|
-
* This source code is licensed under the ISC license.
|
|
846
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
847
|
-
*/Wr("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
848
|
-
* @license lucide-react v0.456.0 - ISC
|
|
849
|
-
*
|
|
850
|
-
* This source code is licensed under the ISC license.
|
|
851
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
852
|
-
*/const uD=Wr("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"}]]);/**
|
|
853
|
-
* @license lucide-react v0.456.0 - ISC
|
|
854
|
-
*
|
|
855
|
-
* This source code is licensed under the ISC license.
|
|
856
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
857
|
-
*/const cD=Wr("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"}]]);/**
|
|
858
|
-
* @license lucide-react v0.456.0 - ISC
|
|
859
|
-
*
|
|
860
|
-
* This source code is licensed under the ISC license.
|
|
861
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
862
|
-
*/const dD=Wr("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"}]]);/**
|
|
863
|
-
* @license lucide-react v0.456.0 - ISC
|
|
864
|
-
*
|
|
865
|
-
* This source code is licensed under the ISC license.
|
|
866
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
867
|
-
*/const fD=Wr("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
|
|
868
|
-
* @license lucide-react v0.456.0 - ISC
|
|
869
|
-
*
|
|
870
|
-
* This source code is licensed under the ISC license.
|
|
871
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
872
|
-
*/const hD=Wr("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"}]]);/**
|
|
873
|
-
* @license lucide-react v0.456.0 - ISC
|
|
874
|
-
*
|
|
875
|
-
* This source code is licensed under the ISC license.
|
|
876
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
877
|
-
*/Wr("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
878
|
-
* @license lucide-react v0.456.0 - ISC
|
|
879
|
-
*
|
|
880
|
-
* This source code is licensed under the ISC license.
|
|
881
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
882
|
-
*/const pD=Wr("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"}]]);/**
|
|
883
|
-
* @license lucide-react v0.456.0 - ISC
|
|
884
|
-
*
|
|
885
|
-
* This source code is licensed under the ISC license.
|
|
886
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
887
|
-
*/const mD=Wr("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
888
|
-
* @license lucide-react v0.456.0 - ISC
|
|
889
|
-
*
|
|
890
|
-
* This source code is licensed under the ISC license.
|
|
891
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
892
|
-
*/const gD=Wr("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"}]]);/**
|
|
893
|
-
* @license lucide-react v0.456.0 - ISC
|
|
894
|
-
*
|
|
895
|
-
* This source code is licensed under the ISC license.
|
|
896
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
897
|
-
*/Wr("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
898
|
-
* @license lucide-react v0.456.0 - ISC
|
|
899
|
-
*
|
|
900
|
-
* This source code is licensed under the ISC license.
|
|
901
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
902
|
-
*/const vD=Wr("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"}]]);/**
|
|
903
|
-
* @license lucide-react v0.456.0 - ISC
|
|
904
|
-
*
|
|
905
|
-
* This source code is licensed under the ISC license.
|
|
906
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
907
|
-
*/const bD=Wr("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"}]]);/**
|
|
908
|
-
* @license lucide-react v0.456.0 - ISC
|
|
909
|
-
*
|
|
910
|
-
* This source code is licensed under the ISC license.
|
|
911
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
912
|
-
*/const yD=Wr("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"}]]);/**
|
|
913
|
-
* @license lucide-react v0.456.0 - ISC
|
|
914
|
-
*
|
|
915
|
-
* This source code is licensed under the ISC license.
|
|
916
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
917
|
-
*/const xD=Wr("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"}]]);/**
|
|
918
|
-
* @license lucide-react v0.456.0 - ISC
|
|
919
|
-
*
|
|
920
|
-
* This source code is licensed under the ISC license.
|
|
921
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
922
|
-
*/Wr("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);const Mu=({src:e,index:t,token:r,url:n,eventsEmit:o,...a})=>{const[u,l]=Ot(""),f=async v=>{try{const g=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({convertedFilePath:v})});if(!g.ok)throw new Error(`Fetch failed: ${g.status}`);return{data:await g.arrayBuffer()}}catch{return null}},d=async v=>{const g=await f(v);if(!g)return;const b=new Blob([g.data]);return window.URL.createObjectURL(b)},p=async v=>{const g=await d(v);l(g||"")};return er(()=>{try{if(!r||!n){l(e);return}p(e)}catch{l(e)}},[e]),U.jsx(U.Fragment,{children:u&&U.jsx(Up,{src:u,...a,preview:!1,onClick:()=>o&&o("imageClick",u)},t||1)})},wD=e=>C.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("g",{clipPath:"url(#clip0_5260_38039)"},C.createElement("path",{d:"M8.00004 14.6668C11.6819 14.6668 14.6667 11.6821 14.6667 8.00016C14.6667 4.31826 11.6819 1.3335 8.00004 1.3335C4.31814 1.3335 1.33337 4.31826 1.33337 8.00016C1.33337 11.6821 4.31814 14.6668 8.00004 14.6668Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M6 7.99984L7.33333 9.33317L10 6.6665",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),C.createElement("defs",null,C.createElement("clipPath",{id:"clip0_5260_38039"},C.createElement("rect",{width:16,height:16,fill:"white"})))),CD=e=>C.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M14.4867 12L9.15333 2.66665C9.03704 2.46146 8.8684 2.29078 8.66462 2.17203C8.46083 2.05329 8.22919 1.99072 7.99333 1.99072C7.75747 1.99072 7.52584 2.05329 7.32205 2.17203C7.11826 2.29078 6.94962 2.46146 6.83333 2.66665L1.5 12C1.38245 12.2036 1.32082 12.4346 1.32134 12.6697C1.32186 12.9047 1.38452 13.1355 1.50296 13.3385C1.62141 13.5416 1.79143 13.7097 1.9958 13.8259C2.20016 13.942 2.4316 14.0021 2.66667 14H13.3333C13.5673 13.9997 13.797 13.938 13.9995 13.8208C14.202 13.7037 14.3701 13.5354 14.487 13.3327C14.6039 13.1301 14.6654 12.9002 14.6653 12.6663C14.6652 12.4324 14.6036 12.2026 14.4867 12Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M8 6V8.66667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M8 11.3335H8.00667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),J1=e=>C.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("path",{d:"M14 7.99981C13.9999 9.26686 13.5988 10.5014 12.854 11.5264C12.1092 12.5515 11.059 13.3144 9.85392 13.7059C8.64886 14.0974 7.3508 14.0974 6.14576 13.7058C4.94073 13.3142 3.89059 12.5512 3.14584 11.5261C2.4011 10.5011 1.99999 9.26653 2 7.99947C2.00001 6.73241 2.40114 5.49788 3.14589 4.47281C3.89065 3.44773 4.9408 2.68474 6.14584 2.29319C7.35088 1.90164 8.64895 1.90162 9.854 2.29314",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),DD=e=>C.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},C.createElement("g",{clipPath:"url(#clip0_5260_38091)"},C.createElement("path",{d:"M7.99998 14.6668C11.6819 14.6668 14.6666 11.6821 14.6666 8.00016C14.6666 4.31826 11.6819 1.3335 7.99998 1.3335C4.31808 1.3335 1.33331 4.31826 1.33331 8.00016C1.33331 11.6821 4.31808 14.6668 7.99998 14.6668Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M10 6L6 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),C.createElement("path",{d:"M6 6L10 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),C.createElement("defs",null,C.createElement("clipPath",{id:"clip0_5260_38091"},C.createElement("rect",{width:16,height:16,fill:"white"})))),ED=Ve.div.attrs({className:"thought-chain-section-wrapper"})`
|
|
923
|
-
padding: 12px 0 8px 0;
|
|
924
|
-
`,kD=Ve.div.attrs({className:"thought-chain-section-title-row"})`
|
|
925
|
-
display: flex;
|
|
926
|
-
align-items: center;
|
|
927
|
-
gap: 8px;
|
|
928
|
-
margin-bottom: 8px;
|
|
929
|
-
padding-left: 20px;
|
|
930
|
-
`,SD=Vg`
|
|
931
|
-
from {
|
|
932
|
-
transform: rotate(0deg);
|
|
933
|
-
}
|
|
934
|
-
to {
|
|
935
|
-
transform: rotate(360deg);
|
|
936
|
-
}
|
|
937
|
-
`,AD=Ve.div.attrs({className:"thought-chain-section-icon"})`
|
|
938
|
-
width: 16px;
|
|
939
|
-
height: 16px;
|
|
940
|
-
flex-shrink: 0;
|
|
941
|
-
display: flex;
|
|
942
|
-
align-items: center;
|
|
943
|
-
justify-content: center;
|
|
944
|
-
|
|
945
|
-
svg {
|
|
946
|
-
width: 100%;
|
|
947
|
-
height: 100%;
|
|
948
|
-
${({$isRotating:e})=>e?ul`
|
|
949
|
-
animation: ${SD} 2s linear infinite;
|
|
950
|
-
`:""}
|
|
951
|
-
}
|
|
952
|
-
`,BD=Ve.div.attrs({className:"thought-chain-section-title"})`
|
|
953
|
-
font-size: 14px;
|
|
954
|
-
font-weight: 600;
|
|
955
|
-
color: #111827;
|
|
956
|
-
display: flex;
|
|
957
|
-
align-items: center;
|
|
958
|
-
gap: 6px;
|
|
959
|
-
`;Ve.span.attrs({className:"thought-chain-section-time"})`
|
|
960
|
-
font-size: 12px;
|
|
961
|
-
font-weight: 400;
|
|
962
|
-
color: #6b7280;
|
|
963
|
-
`;const FD=Ve.div.attrs({className:"thought-chain-vertical-line"})`
|
|
964
|
-
position: absolute;
|
|
965
|
-
left: 10px;
|
|
966
|
-
top: 0;
|
|
967
|
-
bottom: 0;
|
|
968
|
-
width: 2px;
|
|
969
|
-
background: #e5e7eb;
|
|
970
|
-
z-index: 0;
|
|
971
|
-
`,ND=Ve.div.attrs({className:"thought-chain-content-container"})`
|
|
972
|
-
position: relative;
|
|
973
|
-
padding-left: 0px;
|
|
974
|
-
margin-left:18px
|
|
975
|
-
`,$D=Ve.div.attrs({className:"thought-chain-node-item"})`
|
|
976
|
-
display: flex;
|
|
977
|
-
align-items: flex-start;
|
|
978
|
-
gap: 12px;
|
|
979
|
-
padding: 8px 0;
|
|
980
|
-
position: relative;
|
|
981
|
-
`,MD=Ve.div.attrs({className:"thought-chain-node-content-area"})`
|
|
982
|
-
flex: 1;
|
|
983
|
-
margin-left: 20px;
|
|
984
|
-
display: flex;
|
|
985
|
-
flex-direction: column;
|
|
986
|
-
gap: 4px;
|
|
987
|
-
`,Q1=Ve.div.attrs({className:"thought-chain-content-text-wrapper"})`
|
|
988
|
-
font-size: 13px;
|
|
989
|
-
line-height: 1.6;
|
|
990
|
-
color: #374151;
|
|
991
|
-
opacity: 0.7;
|
|
992
|
-
`,OD=Ve.div.attrs({className:"thought-chain-loading-text"})`
|
|
993
|
-
font-size: 13px;
|
|
994
|
-
line-height: 1.6;
|
|
995
|
-
color: #9ca3af;
|
|
996
|
-
font-style: italic;
|
|
997
|
-
padding-left: 15px;
|
|
998
|
-
`;function TD(e){switch(e){case 1:return{label:"\u8FD0\u884C\u4E2D",color:"#2563eb",icon:J1,isRotating:!0};case 2:return{label:"\u6267\u884C\u5B8C\u6210",color:"#16a34a",icon:wD,isRotating:!1};case 3:return{label:"\u6267\u884C\u5931\u8D25",color:"#dc2626",icon:DD,isRotating:!1};case 4:return{label:"\u5F02\u5E38",color:"#f97316",icon:CD,isRotating:!1};default:return{label:"\u672A\u77E5",color:"#9ca3af",icon:J1,isRotating:!1}}}const Ou=({title:e,content:t,nodes:r,mode:n="history"})=>{var f,d;if(!r||r.length===0)return null;const o=(f=r[0])==null?void 0:f.respTime;o&&o>0&&`${(o/1e3).toFixed(2)}`;const a=((d=r[0])==null?void 0:d.nodeStatus)??3,u=TD(a),l=u.icon;return U.jsxs(ED,{children:[U.jsxs(kD,{children:[U.jsx(AD,{$isRotating:u.isRotating,children:U.jsx(l,{})}),U.jsx(BD,{children:e})]}),U.jsxs(ND,{children:[U.jsx(FD,{}),r.map(p=>{var b,x,D,m;const v=((b=p==null?void 0:p.rawContent)==null?void 0:b.type)==="markdown"||(p==null?void 0:p.format)==="markdown"||((x=p.content)==null?void 0:x.includes("```"))||((D=p.content)==null?void 0:D.includes("**"))||((m=p.content)==null?void 0:m.includes("##")),g=p.nodeStatus===1&&!p.content;return U.jsx($D,{children:U.jsx(MD,{children:g?U.jsx(OD,{children:"\u601D\u8003\u4E2D..."}):p.content&&(v?U.jsx(Q1,{children:U.jsx(cl,{dataSource:{type:pi.MARKDOWN,content:p.content},styles:{text:{fontSize:"14px",lineHeight:"1.6",color:"#374151"}},theme:{baseFontSize:14,minHeight:"auto"}})}):U.jsx(Q1,{className:"px-[15px]",children:p.content}))})},p.id)})]})]})};function ha(e,t){const r={plan:{inProgress:"\u7406\u89E3\u89C4\u5212\u4E2D",completed:"\u7406\u89E3\u89C4\u5212\u5B8C\u6210"},retrieve:{inProgress:"\u53EC\u56DE\u4E2D",completed:"\u53EC\u56DE\u6210\u529F"},think:{inProgress:"\u6A21\u578B\u601D\u8003\u4E2D",completed:"\u6A21\u578B\u601D\u8003\u5B8C\u6210"},reason:{inProgress:"\u63A8\u7406\u4E2D",completed:"\u63A8\u7406\u5B8C\u6210"}}[e]||{inProgress:"",completed:""};switch(t){case 1:return r.inProgress;case 2:return r.completed;case 3:return`${r.completed}\uFF08\u5931\u8D25\uFF09`;case 4:return`${r.completed}\uFF08\u5F02\u5E38\uFF09`;default:return r.completed}}function RD(e){return!Array.isArray(e)||e.length===0?[]:e.map((t,r)=>{var u;const n=t.businessType||"plan",o=t.nodeStatus||1,a=t.content||((u=t==null?void 0:t.reply)==null?void 0:u.content)||"";return{id:`${n}-${r}`,businessType:n,nodeStatus:o,title:ha(n,o),content:a,rawContent:t,respTime:t.respTime??t.chainRespTime??void 0}})}function SE(e,t){var f,d,p;const r=t.businessType;if(!r)return e;const n=[...e],o=n.findIndex(v=>v.businessType===r),a=((f=t.reply)==null?void 0:f.content)??"",u=t.nodeStatus!==void 0&&t.nodeStatus!==null?t.nodeStatus:o!==-1?(d=n[o])==null?void 0:d.nodeStatus:1,l=t.respTime??t.chainRespTime??((p=n[o])==null?void 0:p.respTime);if(o===-1)n.push({id:`${r}-0`,businessType:r,nodeStatus:u,title:ha(r,u),content:a,rawContent:t,respTime:l});else{const v=n[o];n[o]={...v,nodeStatus:u,title:ha(r,u),content:v.content+a,respTime:l??v.respTime,rawContent:{...v.rawContent,lastChunk:t}}}return n}const ID=Ve.div.attrs({className:"thought-chain-card-wrapper"})`
|
|
999
|
-
width: 100%;
|
|
1000
|
-
border-radius: 8px;
|
|
1001
|
-
background-color: #f9fafb;
|
|
1002
|
-
padding: 12px 16px;
|
|
1003
|
-
box-sizing: border-box;
|
|
1004
|
-
`,PD=Ve.div.attrs({className:"thought-chain-card-header"})`
|
|
1005
|
-
display: flex;
|
|
1006
|
-
align-items: center;
|
|
1007
|
-
justify-content: space-between;
|
|
1008
|
-
cursor: pointer;
|
|
1009
|
-
padding: 4px 0;
|
|
1010
|
-
`,zD=Ve.div.attrs({className:"thought-chain-card-header-left"})`
|
|
1011
|
-
display: flex;
|
|
1012
|
-
align-items: center;
|
|
1013
|
-
gap: 8px;
|
|
1014
|
-
flex: 1;
|
|
1015
|
-
`,jD=Vg`
|
|
1016
|
-
from {
|
|
1017
|
-
transform: rotate(0deg);
|
|
1018
|
-
}
|
|
1019
|
-
to {
|
|
1020
|
-
transform: rotate(360deg);
|
|
1021
|
-
}
|
|
1022
|
-
`,_D=Ve.div.attrs({className:"thought-chain-card-avatar"})`
|
|
1023
|
-
width: 25px;
|
|
1024
|
-
height: 25px;
|
|
1025
|
-
border-radius: 9999px;
|
|
1026
|
-
display: flex;
|
|
1027
|
-
align-items: center;
|
|
1028
|
-
justify-content: center;
|
|
1029
|
-
flex-shrink: 0;
|
|
1030
|
-
overflow: hidden;
|
|
1031
|
-
|
|
1032
|
-
img {
|
|
1033
|
-
width: 80%;
|
|
1034
|
-
height: 80%;
|
|
1035
|
-
object-fit: contain;
|
|
1036
|
-
${({$isRotating:e})=>e?ul`
|
|
1037
|
-
animation: ${jD} 2s linear infinite;
|
|
1038
|
-
`:""}
|
|
1039
|
-
}
|
|
1040
|
-
`,LD=Ve.div.attrs({className:"thought-chain-card-header-title"})`
|
|
1041
|
-
display: flex;
|
|
1042
|
-
align-items: center;
|
|
1043
|
-
gap: 6px;
|
|
1044
|
-
`,HD=Ve.span.attrs({className:"thought-chain-card-header-main-text"})`
|
|
1045
|
-
font-size: 14px;
|
|
1046
|
-
font-weight: 600;
|
|
1047
|
-
color: #111827;
|
|
1048
|
-
`,KD=Ve.span.attrs({className:"thought-chain-card-header-sub-text"})`
|
|
1049
|
-
font-size: 14px;
|
|
1050
|
-
color: #6b7280;
|
|
1051
|
-
`,qD=Ve.div.attrs({className:"thought-chain-card-header-right"})`
|
|
1052
|
-
display: flex;
|
|
1053
|
-
align-items: center;
|
|
1054
|
-
flex-shrink: 0;
|
|
1055
|
-
`,WD=Ve.div.attrs({className:"thought-chain-card-body"})`
|
|
1056
|
-
margin-top: 12px;
|
|
1057
|
-
display: flex;
|
|
1058
|
-
flex-direction: column;
|
|
1059
|
-
gap: 0;
|
|
1060
|
-
`,VD=Ve.div.attrs({className:"thought-chain-card-empty-text"})`
|
|
1061
|
-
font-size: 12px;
|
|
1062
|
-
color: #9ca3af;
|
|
1063
|
-
`,UD=({nodes:e,mode:t="history",status:r,simpleThinkOnly:n=!1,chainRespTime:o})=>{const[a,u]=Ot(!1),l=Ct(()=>{const b={};return(e||[]).forEach(x=>{b[x.businessType]||(b[x.businessType]=[]),b[x.businessType].push(x)}),b},[e]),f=Ct(()=>typeof r=="number"?r===4:t==="live"?e.some(b=>b.nodeStatus===1):!1,[t,r,e]),d=Ct(()=>!e||e.length===0?!1:t==="history"?e.every(b=>b.nodeStatus===2):e.every(b=>b.nodeStatus===2),[e,t]),p=Ct(()=>f?"\u6B63\u5728\u601D\u8003\u4E2D":d?"\u601D\u8003\u5B8C\u6210":e&&e.length>0&&!d?"\u6B63\u5728\u601D\u8003\u4E2D":"",[f,d,e]);Ct(()=>f?"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406":d?"\u672C\u6B21\u5BF9\u8BDD\u7684\u63A8\u7406\u8FC7\u7A0B\u56DE\u653E":"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406",[f,d]);const v=e&&e.length>0,g=Ct(()=>!o||o<=0?"":`\xB7 ${(o/1e3).toFixed(2)} \u79D2`,[o]);return U.jsxs(ID,{"data-mode":t,children:[U.jsxs(PD,{onClick:()=>u(b=>!b),children:[U.jsxs(zD,{children:[U.jsx(_D,{$isRotating:f}),U.jsxs(LD,{children:[U.jsx(HD,{children:p}),g&&d&&U.jsxs(KD,{children:["\u603B\u8BA1\u7528\u65F6",g]})]})]}),U.jsx(qD,{children:a?U.jsx(qa,{size:18,color:"#6b7280"}):U.jsx(Wa,{size:18,color:"#6b7280"})})]}),!a&&U.jsxs(WD,{children:[!v&&U.jsx(VD,{children:"\u5F53\u524D\u4F1A\u8BDD\u672A\u8FD4\u56DE\u7ED3\u6784\u5316\u601D\u7EF4\u94FE\u6570\u636E\u3002"}),l.plan&&l.plan.length>0&&U.jsx(Ou,{title:ha("plan",l.plan[0].nodeStatus),nodes:l.plan,mode:t}),l.retrieve&&l.retrieve.length>0&&U.jsx(Ou,{title:ha("retrieve",l.retrieve[0].nodeStatus),nodes:l.retrieve,mode:t}),l.think&&l.think.length>0&&U.jsx(Ou,{title:ha("think",l.think[0].nodeStatus),nodes:l.think,mode:t})]})]})},XD=({data:e,styles:t,onCategoryClick:r,onViewAllClick:n,className:o,style:a,showCategoryIcon:u=!0,renderCategoryIcon:l})=>{const f=(t==null?void 0:t.theme)||{},d=x=>{r==null||r(x)},p=()=>{e.viewAllPath&&(typeof e.viewAllPath=="function"?e.viewAllPath():window.open(e.viewAllPath,"_blank")),n==null||n()},v=x=>{const D=(x||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(D)?"rag/pic":D==="pdf"?"rag/pdf":["doc","docx"].includes(D)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(D)?"rag/excel":["ppt","pptx"].includes(D)?"rag/ppt":D==="txt"||D==="md"?"rag/txt":D==="csv"?"rag/csv":["zip","rar","7z"].includes(D)?"rag/zip":["odt","ods","odp","odf"].includes(D)?"rag/odf":D==="json"?"rag/json":"rag/file"},g=x=>{if(l)return l(x);if(u){if(x.itemType==="dir")return U.jsx(jo,{type:"rag/folder",size:16});if(x.itemType==="file"&&x.fileType){const D=v(x.fileType);return U.jsx(jo,{type:D,size:16})}return U.jsx(jo,{type:"rag/folder",size:16})}return null},b=e.categories.filter(x=>x.visible!==!1);return!b||b.length===0?null:U.jsxs(YD,{className:`knowledge-base-document-list ${o||""}`,style:a,$theme:f,children:[U.jsx(GD,{children:e.title}),e.subtitle&&U.jsxs(ZD,{children:[e.subtitle," (\u5171",e.totalCount,"\u4E2A):"]}),U.jsx(JD,{children:b.map((x,D)=>U.jsxs(QD,{onClick:()=>d(x),$theme:f,children:[g(x),U.jsx(eE,{children:x.name}),x.itemType==="dir"&&U.jsxs(tE,{children:["(",x.documentCount,")"]})]},x.id||D))}),e.showViewAll!==!1&&U.jsx(rE,{onClick:p,$theme:f,children:e.viewAllText||"\u67E5\u770B\u5168\u90E8>>"})]})},YD=Ve.div.attrs({className:"knowledge-base-document-list-container"})`
|
|
1064
|
-
margin-bottom: 16px;
|
|
1065
|
-
padding: 16px;
|
|
1066
|
-
margin-left:25px;
|
|
1067
|
-
|
|
1068
|
-
background: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1069
|
-
border-radius: 8px;
|
|
1070
|
-
`,GD=Ve.h3.attrs({className:"knowledge-base-document-list-title"})`
|
|
1071
|
-
font-size: 18px;
|
|
1072
|
-
font-weight: 600;
|
|
1073
|
-
color: #1f2937;
|
|
1074
|
-
margin: 0 0 8px 0;
|
|
1075
|
-
`,ZD=Ve.div.attrs({className:"knowledge-base-document-list-subtitle"})`
|
|
1076
|
-
font-size: 14px;
|
|
1077
|
-
color: #6b7280;
|
|
1078
|
-
margin-bottom: 12px;
|
|
1079
|
-
`,JD=Ve.div.attrs({className:"knowledge-base-document-list-category-list"})`
|
|
1080
|
-
display: flex;
|
|
1081
|
-
flex-direction: column;
|
|
1082
|
-
gap: 8px;
|
|
1083
|
-
margin-bottom: 12px;
|
|
1084
|
-
`,QD=Ve.div.attrs({className:"knowledge-base-document-list-category-item"})`
|
|
1085
|
-
display: flex;
|
|
1086
|
-
align-items: center;
|
|
1087
|
-
gap: 8px;
|
|
1088
|
-
padding: 8px 0;
|
|
1089
|
-
cursor: pointer;
|
|
1090
|
-
transition: all 0.2s ease;
|
|
1091
|
-
|
|
1092
|
-
&:hover {
|
|
1093
|
-
opacity: 0.8;
|
|
1094
|
-
}
|
|
1095
|
-
`,eE=Ve.span.attrs({className:"knowledge-base-document-list-category-name"})`
|
|
1096
|
-
font-size: 14px;
|
|
1097
|
-
color: #1f2937;
|
|
1098
|
-
`,tE=Ve.span.attrs({className:"knowledge-base-document-list-category-count"})`
|
|
1099
|
-
font-size: 14px;
|
|
1100
|
-
color: #6b7280;
|
|
1101
|
-
`,rE=Ve.a.attrs({className:"knowledge-base-document-list-view-all"})`
|
|
1102
|
-
display: inline-block;
|
|
1103
|
-
font-size: 14px;
|
|
1104
|
-
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1105
|
-
text-decoration: none;
|
|
1106
|
-
cursor: pointer;
|
|
1107
|
-
transition: color 0.2s ease;
|
|
1108
|
-
|
|
1109
|
-
&:hover {
|
|
1110
|
-
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#2563eb"}};
|
|
1111
|
-
text-decoration: underline;
|
|
1112
|
-
}
|
|
1113
|
-
`;function Tu(e,t,r=18){var u;const n=(e||"").toLowerCase(),o=((u=t==null?void 0:t.theme)==null?void 0:u.icons)||{},a=(l,f,d)=>{const p=[l,...d||[]];for(const v of p){const g=o[v];if(g){if(_e.isValidElement(g))return g;if(typeof g=="string")return U.jsx("img",{src:g,alt:v,style:{width:r,height:r}})}}return U.jsx(jo,{type:f,size:r})};return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(n)?a("image","rag/pic",["png","jpg","jpeg"]):n==="pdf"?a("pdf","rag/pdf"):["doc","docx"].includes(n)?a("docx","rag/word",["doc"]):["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(n)?a("sheets","rag/excel",["excel","xls","xlsx"]):n==="csv"?a("csv","rag/csv",["sheets","excel"]):["ppt","pptx"].includes(n)?a("pptx","rag/ppt",["ppt"]):n==="txt"||n==="md"?a("txt","rag/txt",["md"]):["zip","rar","7z"].includes(n)?a("archive","rag/zip",["zip","rar"]):["odt","ods","odp","odf"].includes(n)?a("odt","rag/odf"):["html","htm","url"].includes(n)?a("html","rag/url",["htm","url"]):n==="json"?a("json","rag/json"):U.jsx(jo,{type:"rag/file",size:r})}function oa(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(oa(r.children)));return t}function nE(e){const t=[],r=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g;let n;for(;n=r.exec(e);){const a=n[1].split(";").map(u=>u.trim()).filter(Boolean);t.push(...a)}const o=/\[retrive-tag[^\]]*image_urls=['"]([^'"]+)['"][^\]]*\]\[[^\]]+\]\[\/retrive-tag\]/g;for(;n=o.exec(e);){const a=n[1].split(";").map(u=>u.trim()).filter(Boolean);t.push(...a)}return Array.from(new Set(t))}function Yi(e){if(e==null)return null;const t=Number(e);return Number.isNaN(t)?null:t}function oE(e){const t=[];let r=1;const n=o=>{o.forEach(a=>{(a==null?void 0:a.type)==="retrieve-sql-data"&&(a!=null&&a.id)&&t.push({id:String(a.id),index:r++}),Array.isArray(a==null?void 0:a.children)&&a.children.length&&n(a.children)})};return Array.isArray(e)&&e.length&&n(e),t}const aE=Ve.div.attrs({className:"chat-message-container"})`
|
|
1114
|
-
display: flex;
|
|
1115
|
-
flex-direction: column;
|
|
1116
|
-
margin-bottom: 0.5rem;
|
|
1117
|
-
animation: fadeIn 0.3s ease-in-out;
|
|
1118
|
-
width: 100%;
|
|
1119
|
-
text-wrap: wrap;
|
|
1120
|
-
|
|
1121
|
-
${e=>e.$align==="right"&&`
|
|
1122
|
-
align-items: flex-end;
|
|
1123
|
-
`}
|
|
1124
|
-
|
|
1125
|
-
${e=>e.$align==="center"&&`
|
|
1126
|
-
align-items: center;
|
|
1127
|
-
`}
|
|
1128
|
-
|
|
1129
|
-
@keyframes fadeIn {
|
|
1130
|
-
from {
|
|
1131
|
-
opacity: 0;
|
|
1132
|
-
transform: translateY(10px);
|
|
1133
|
-
}
|
|
1134
|
-
to {
|
|
1135
|
-
opacity: 1;
|
|
1136
|
-
transform: translateY(0);
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
`,iE=Ve.div.attrs({className:"chat-message-header"})`
|
|
1140
|
-
display: flex;
|
|
1141
|
-
align-items: center;
|
|
1142
|
-
gap: 0.25rem;
|
|
1143
|
-
margin-bottom: 0.5rem;
|
|
1144
|
-
width: 100%;
|
|
1145
|
-
|
|
1146
|
-
${e=>e.$isUser&&`
|
|
1147
|
-
flex-direction: row-reverse;
|
|
1148
|
-
justify-content: end;
|
|
1149
|
-
`}
|
|
1150
|
-
`,sE=Ve.div.attrs({className:"chat-message-avatar"})`
|
|
1151
|
-
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
1152
|
-
border-radius: 50%;
|
|
1153
|
-
width: 2rem;
|
|
1154
|
-
height: 2rem;
|
|
1155
|
-
flex-shrink: 0;
|
|
1156
|
-
display: flex;
|
|
1157
|
-
align-items: center;
|
|
1158
|
-
justify-content: center;
|
|
1159
|
-
font-size: 1rem;
|
|
1160
|
-
`,lE=Ve.div.attrs({className:"chat-message-content"})`
|
|
1161
|
-
width: 100%;
|
|
1162
|
-
.message-time {
|
|
1163
|
-
font-size: 0.75rem;
|
|
1164
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
.message-card {
|
|
1168
|
-
background: ${e=>e.$isUser?"linear-gradient(180deg, #E3ECFF 0%, #EEEBFF 100%)":"#ffffff"};
|
|
1169
|
-
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
1170
|
-
border-radius: 0.5rem;
|
|
1171
|
-
padding-top: 12px;
|
|
1172
|
-
padding-bottom: 12px;
|
|
1173
|
-
overflow: hidden;
|
|
1174
|
-
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
1175
|
-
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
1176
|
-
margin-right: ${e=>e.$isUser?"40px":"0"};
|
|
1177
|
-
padding: 0.25rem 1.8rem;
|
|
1178
|
-
.message-text {
|
|
1179
|
-
width: 100%;
|
|
1180
|
-
line-height: 1.6;
|
|
1181
|
-
white-space: pre-wrap !important; /* 保留换行和空格格式,使用 !important 确保优先级 */
|
|
1182
|
-
border-radius: 0.5rem;
|
|
1183
|
-
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
1184
|
-
font-size: 0.875rem;
|
|
1185
|
-
|
|
1186
|
-
/* 确保子元素也继承 white-space 属性 */
|
|
1187
|
-
& > * {
|
|
1188
|
-
white-space: pre-wrap !important;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
`,uE=Ve.div.attrs({className:"chat-message-actions-container"})`
|
|
1193
|
-
margin-top: 0.5rem;
|
|
1194
|
-
display: flex;
|
|
1195
|
-
padding: 0.5rem;
|
|
1196
|
-
align-items: center;
|
|
1197
|
-
|
|
1198
|
-
gap: 0.75rem;
|
|
1199
|
-
|
|
1200
|
-
button {
|
|
1201
|
-
display: flex;
|
|
1202
|
-
align-items: center;
|
|
1203
|
-
gap: 0.25rem;
|
|
1204
|
-
font-size: 0.875rem;
|
|
1205
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1206
|
-
background: none;
|
|
1207
|
-
border: none;
|
|
1208
|
-
cursor: pointer;
|
|
1209
|
-
transition: color 0.2s;
|
|
1210
|
-
|
|
1211
|
-
&:hover {
|
|
1212
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
&.active {
|
|
1216
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
`,cE=Ve.div.attrs({className:"chat-message-follow-up-container"})`
|
|
1220
|
-
margin-top: 1rem;
|
|
1221
|
-
padding: 0 2.9rem;
|
|
1222
|
-
|
|
1223
|
-
border-radius: 0.5rem;
|
|
1224
|
-
|
|
1225
|
-
@keyframes followUpIn {
|
|
1226
|
-
from {
|
|
1227
|
-
opacity: 0;
|
|
1228
|
-
transform: translateY(6px);
|
|
1229
|
-
}
|
|
1230
|
-
to {
|
|
1231
|
-
opacity: 1;
|
|
1232
|
-
transform: translateY(0);
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
.follow-up-title {
|
|
1237
|
-
font-size: 0.875rem;
|
|
1238
|
-
font-weight: 600;
|
|
1239
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1240
|
-
margin-bottom: 0.75rem;
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
.follow-up-list {
|
|
1244
|
-
display: flex;
|
|
1245
|
-
flex-direction: column;
|
|
1246
|
-
gap: 0.5rem;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
.follow-up-item {
|
|
1250
|
-
width: fit-content;
|
|
1251
|
-
background: #ffffff;
|
|
1252
|
-
border: 1px solid #e5e7eb;
|
|
1253
|
-
border-radius: 0.375rem;
|
|
1254
|
-
padding: 0.75rem 1rem;
|
|
1255
|
-
cursor: pointer;
|
|
1256
|
-
transition: all 0.2s ease;
|
|
1257
|
-
text-align: left;
|
|
1258
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1259
|
-
font-size: 0.875rem;
|
|
1260
|
-
line-height: 1.4;
|
|
1261
|
-
opacity: 0;
|
|
1262
|
-
transform: translateY(6px);
|
|
1263
|
-
animation: followUpIn 280ms ease forwards;
|
|
1264
|
-
animation-play-state: running;
|
|
1265
|
-
|
|
1266
|
-
&:hover {
|
|
1267
|
-
background: #e5e7eb;
|
|
1268
|
-
border-color: #d1d5db;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
&:active {
|
|
1272
|
-
transform: translateY(1px);
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
`,Gi=Ve.div.attrs({className:"chat-message-reference-container"})`
|
|
1276
|
-
padding: 1rem;
|
|
1277
|
-
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1278
|
-
|
|
1279
|
-
border-radius: 0.5rem;
|
|
1280
|
-
|
|
1281
|
-
.reference-title {
|
|
1282
|
-
font-size: 0.875rem;
|
|
1283
|
-
font-weight: 600;
|
|
1284
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1285
|
-
margin-bottom: 0.75rem;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
.reference-list {
|
|
1289
|
-
display: flex;
|
|
1290
|
-
flex-direction: column;
|
|
1291
|
-
gap: 0.5rem;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
.reference-item {
|
|
1295
|
-
background: #ffffff;
|
|
1296
|
-
|
|
1297
|
-
border-radius: 0.375rem;
|
|
1298
|
-
padding: 0.75rem 0;
|
|
1299
|
-
display: flex;
|
|
1300
|
-
align-items: center;
|
|
1301
|
-
gap: 0.5rem;
|
|
1302
|
-
|
|
1303
|
-
.file-icon {
|
|
1304
|
-
width: 2rem;
|
|
1305
|
-
height: 2rem;
|
|
1306
|
-
background: #e2e8f0;
|
|
1307
|
-
border-radius: 0.25rem;
|
|
1308
|
-
display: flex;
|
|
1309
|
-
align-items: center;
|
|
1310
|
-
justify-content: center;
|
|
1311
|
-
font-size: 0.75rem;
|
|
1312
|
-
color: #64748b;
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
.file-info {
|
|
1316
|
-
flex: 1;
|
|
1317
|
-
|
|
1318
|
-
.file-name {
|
|
1319
|
-
font-size: 0.875rem;
|
|
1320
|
-
font-weight: 500;
|
|
1321
|
-
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1322
|
-
margin-bottom: 0.25rem;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
.file-meta {
|
|
1326
|
-
font-size: 0.75rem;
|
|
1327
|
-
color: #64748b;
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
.file-score {
|
|
1332
|
-
font-size: 0.75rem;
|
|
1333
|
-
color: #059669;
|
|
1334
|
-
font-weight: 500;
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
`,dE=Ve.div.attrs({className:"chat-message-image-preview-modal"})`
|
|
1338
|
-
position: fixed;
|
|
1339
|
-
top: 0;
|
|
1340
|
-
left: 0;
|
|
1341
|
-
right: 0;
|
|
1342
|
-
bottom: 0;
|
|
1343
|
-
background: rgba(0, 0, 0, 0.8);
|
|
1344
|
-
display: ${e=>e.$show?"flex":"none"};
|
|
1345
|
-
align-items: center;
|
|
1346
|
-
justify-content: center;
|
|
1347
|
-
z-index: 1000;
|
|
1348
|
-
cursor: pointer;
|
|
1349
|
-
|
|
1350
|
-
.modal-content {
|
|
1351
|
-
max-width: 90vw;
|
|
1352
|
-
max-height: 90vh;
|
|
1353
|
-
position: relative;
|
|
1354
|
-
cursor: default;
|
|
1355
|
-
display: flex;
|
|
1356
|
-
flex-direction: column;
|
|
1357
|
-
align-items: center;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
.modal-image {
|
|
1361
|
-
max-width: 100%;
|
|
1362
|
-
max-height: calc(90vh - 60px);
|
|
1363
|
-
object-fit: contain;
|
|
1364
|
-
border-radius: 8px;
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
.modal-close {
|
|
1368
|
-
margin-top: 16px;
|
|
1369
|
-
background: rgba(255, 255, 255, 0.3);
|
|
1370
|
-
border: none;
|
|
1371
|
-
border-radius: 20px;
|
|
1372
|
-
padding: 8px 20px;
|
|
1373
|
-
display: flex;
|
|
1374
|
-
align-items: center;
|
|
1375
|
-
justify-content: center;
|
|
1376
|
-
cursor: pointer;
|
|
1377
|
-
font-size: 14px;
|
|
1378
|
-
color: #333;
|
|
1379
|
-
font-weight: 500;
|
|
1380
|
-
transition: all 0.2s ease;
|
|
1381
|
-
|
|
1382
|
-
&:hover {
|
|
1383
|
-
background: rgba(255, 255, 255, 1);
|
|
1384
|
-
transform: translateY(-1px);
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
`,Ru=Ve.div.attrs({className:"chat-message-image-gallery-container"})`
|
|
1388
|
-
padding: 0rem 0.5rem;
|
|
1389
|
-
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1390
|
-
|
|
1391
|
-
.gallery-grid {
|
|
1392
|
-
display: grid;
|
|
1393
|
-
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
1394
|
-
gap: 0.75rem;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
.gallery-item {
|
|
1398
|
-
position: relative;
|
|
1399
|
-
aspect-ratio: 1;
|
|
1400
|
-
border-radius: 0.375rem;
|
|
1401
|
-
overflow: hidden;
|
|
1402
|
-
cursor: pointer;
|
|
1403
|
-
transition:
|
|
1404
|
-
transform 0.2s ease,
|
|
1405
|
-
box-shadow 0.2s ease;
|
|
1406
|
-
border: 2px solid transparent;
|
|
1407
|
-
|
|
1408
|
-
&:hover {
|
|
1409
|
-
transform: translateY(-2px);
|
|
1410
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1411
|
-
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
.gallery-image {
|
|
1415
|
-
width: 100%;
|
|
1416
|
-
height: 100%;
|
|
1417
|
-
object-fit: cover;
|
|
1418
|
-
background: #f3f4f6;
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
.gallery-overlay {
|
|
1422
|
-
position: absolute;
|
|
1423
|
-
bottom: 0;
|
|
1424
|
-
left: 0;
|
|
1425
|
-
right: 0;
|
|
1426
|
-
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1427
|
-
color: white;
|
|
1428
|
-
padding: 0.5rem;
|
|
1429
|
-
font-size: 0.75rem;
|
|
1430
|
-
text-align: center;
|
|
1431
|
-
opacity: 0;
|
|
1432
|
-
transition: opacity 0.2s ease;
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
&:hover .gallery-overlay {
|
|
1436
|
-
opacity: 1;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
`,AE=({token:e,streamUrl:t,is_download:r,content:n,contentType:o="plainText",align:a="left",displayStatus:u="ready",avatar:l,isUser:f=!1,userAvatar:d,aiAvatar:p,date:v,time:g,timestamp:b,showTime:x=!0,errorMessage:D,styles:m,reference:S,webReference:F,databaseReference:B,graphReference:O,filePaths:A,currentFiles:P,fileManagerData:T,audioUrl:_,feedbackResult:M,queryId:q,defaultAnswer:L,isWelcome:Y=!1,isLast:V=!1,respTime:z,tokens:K,resultType:X,followUpQuestions:W=[],tools:J={},eventsEmit:R,referenceMode:ie="list",enableThoughtChain:me=!1,thoughtChainVersionMode:xe="auto",chain:ge,thoughtChainNodes:ae,knowledgeBases:ke,enableCot:Z,chainRespTime:he,thoughtChainStatus:se})=>{er(()=>{console.log("isUser",f),console.log("isLast",V)},[V,f]);const te=Hs(),ce=Ct(()=>{var ue,Oe,st,ze,le,Ye,Ue,ut,fe,De,ve;return{colors:{primary:((ue=te==null?void 0:te.colors)==null?void 0:ue.primary)||"#3b82f6",background:((Oe=te==null?void 0:te.colors)==null?void 0:Oe.background)||"#ffffff",userBackground:((st=te==null?void 0:te.colors)==null?void 0:st.primary)||"#3b82f6",border:((ze=te==null?void 0:te.colors)==null?void 0:ze.border)||"#e5e7eb",text:((le=te==null?void 0:te.colors)==null?void 0:le.text)||"#374151",disabled:((Ye=te==null?void 0:te.colors)==null?void 0:Ye.disabled)||"#6b7280",info:((Ue=te==null?void 0:te.colors)==null?void 0:Ue.info)||"#3b82f6",warning:((ut=te==null?void 0:te.colors)==null?void 0:ut.warning)||"#f59e0b",error:((fe=te==null?void 0:te.colors)==null?void 0:fe.error)||"#ef4444",...(De=m==null?void 0:m.theme)==null?void 0:De.colors},icons:{aiAvatar:p||"/vite.svg",userAvatar:d||"/default-user-avatar.png",...(ve=m==null?void 0:m.theme)==null?void 0:ve.icons}}},[te,m,p,d]),Ce=Ct(()=>{const ue=g||v||b;return!ue||!x?null:oD(ue).format("YY-MM-DD HH:mm:ss")},[g,v,b,x]),[we,Se]=Ot([]),[Ee,Ae]=Ot(null),[$e,Te]=Ot(!1),[He,pt]=Ot(!1),[at,Me]=Ot(!1),[Le,Xe]=Ot(!1),[ft,it]=Ot(!1),et=(ue,Oe)=>{switch(console.log("handleImageClick",ue,Oe),ue){case"imageClick":Ae(Oe);break}},$t=Ct(()=>{if(!me)return[];if(xe==="v1")return[];if(Array.isArray(ae)&&ae.length)return ae;const ue=ge||(n==null?void 0:n.chain),Oe=RD(ue);return Z===0?Oe.filter(st=>st.businessType==="think"):Oe},[me,xe,ae,ge,n,Z]),Dt=()=>{if(me&&xe!=="v1")return null;const ue={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:D||"\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:U.jsx(jo,{type:"rag/think",size:16})}}[u]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},Oe=z?`(\u7528\u65F6 ${Math.round(z/1e3)} \u79D2)`:"";return U.jsx("div",{className:"think-header",children:U.jsx("div",{className:"think-header-left ml-[16px]",children:U.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-full",children:[U.jsx("div",{className:"think-icon",children:ue.icon}),U.jsx("div",{className:"think-title",children:ue.text}),Oe&&U.jsx("div",{className:"think-time",children:Oe}),Tr&&U.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{it(!ft)},children:U.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:ft?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:U.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},vt=()=>{if(!me||xe==="v1"||f||!$t.length)return null;const ue=se!==void 0?se===4?4:2:u==="ready"?2:1,Oe=Z===0;return U.jsx("div",{className:"thought-chain-wrapper ml-[16px] mr-[16px] mt-2",children:U.jsx(UD,{mode:o==="stream"?"live":"history",nodes:$t,status:ue,simpleThinkOnly:Oe,chainRespTime:he})})},[ht,Pe]=Ot([]),[de,bt]=Ot(null),kt=Ct(()=>{try{if(!S)return[];let ue;if(typeof S=="string")ue=JSON.parse(S);else if(Array.isArray(S))ue=S;else if(typeof S=="object")ue=[S];else return[];return Array.isArray(ue)?ue:[]}catch(ue){return console.warn("\u89E3\u6790 rawReferenceList \u5931\u8D25:",ue,S),[]}},[S]),Ft=(ue,Oe)=>{var Ue,ut,fe;const st=((Ue=ue==null?void 0:ue.metadata)==null?void 0:Ue.source)||(ue==null?void 0:ue.file_path)||(ue==null?void 0:ue.path)||(ue==null?void 0:ue.convertedFilePath)||(ue==null?void 0:ue.parsedFilePath)||"",ze=((ut=ue==null?void 0:ue.metadata)==null?void 0:ut.title)||(ue==null?void 0:ue.file_name)||"",le=((fe=ue==null?void 0:ue.metadata)==null?void 0:fe.id)||(ue==null?void 0:ue.id)||(ue==null?void 0:ue.file_id)||"",Ye=kt.find(De=>{var Vt,Tt,dt;const ve=((Vt=De==null?void 0:De.metadata)==null?void 0:Vt.source)||(De==null?void 0:De.file_path)||(De==null?void 0:De.path)||(De==null?void 0:De.convertedFilePath)||(De==null?void 0:De.parsedFilePath)||"",qe=((Tt=De==null?void 0:De.metadata)==null?void 0:Tt.title)||(De==null?void 0:De.file_name)||"",ct=((dt=De==null?void 0:De.metadata)==null?void 0:dt.id)||(De==null?void 0:De.id)||"";return le&&ct&&String(le)===String(ct)||st&&ve&&ve===st||ze&&qe&&qe===ze});if(Ye){const De=(Ye!=null&&Ye.references&&Array.isArray(Ye.references)?Ye.references:[Ye]).find(ve=>String(ve.order_num)===String(Oe)||String(ve.id)===String(Oe));if(De)return De}for(const De of kt){if(De!=null&&De.references&&Array.isArray(De.references)){const ve=De.references.find(qe=>String(qe.order_num)===String(Oe)||String(qe.id)===String(Oe));if(ve)return ve}if(String(De.order_num)===String(Oe)||String(De.id)===String(Oe))return De}return null},Et=(ue,Oe)=>{function st(ut,fe){for(const De of ut){if(De.references&&Array.isArray(De.references)){const ve=De.references.find(qe=>String(qe.order_num)===String(fe)||String(qe.id)===String(fe));if(ve)return ve}if(String(De.order_num)===String(fe)||String(De.id)===String(fe))return De}return null}let ze=[];try{S&&(ze=JSON.parse(S))}catch(ut){console.error("Failed to parse reference:",ut)}const le=st(ze,ue.id),Ye=ut=>{if(typeof n!="string")return;const fe=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(fe&&fe[1]){const De=Number(fe[1]);return Number.isNaN(De)?void 0:De}},Ue={tagInfo:{id:ue==null?void 0:ue.id,index:Ye(String(ue==null?void 0:ue.id)),image_urls:(ue==null?void 0:ue.imageUrls)||(ue==null?void 0:ue.image_urls)||[]},fromtype:String((ue==null?void 0:ue.fromtype)??""),leaf:ue,attributes:Oe,referenceDoc:le||void 0};if(String(ue==null?void 0:ue.fromtype)==="2"&&O)try{const ut=JSON.parse(O||"[]"),fe=(Array.isArray(ut)?ut:[]).find(De=>{if(Array.isArray(De==null?void 0:De.traceNodes))return De.traceNodes.some(qe=>String(qe==null?void 0:qe.id)===String(ue.id));const ve=String(ue.id||"").split("_")[0];return String(De==null?void 0:De.id)===ve});fe&&(Ue.graph={id:fe.id,graphName:fe.graphName,fetchUrl:fe.fetchUrl,cyphers:fe.cyphers},Ue.traceNode=Array.isArray(fe.traceNodes)?fe.traceNodes.find(De=>String(De==null?void 0:De.id)===String(ue.id)):void 0)}catch{}R==null||R("action_retrive_tag",Ue),R==null||R("retrive_tag:click",Ue)},or=ue=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",ue),console.log("databaseReference available:",!!B),ue.id&&B){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",B);const Oe=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:ue.id,databaseReference:B}});console.log("Dispatching event:",Oe),window.dispatchEvent(Oe)}else console.log("Cannot send response - missing id or databaseReference")};_e.useEffect(()=>{const ue=Oe=>{or(Oe.detail)};return window.addEventListener("retrieve-sql-data:request-data",ue),()=>{window.removeEventListener("retrieve-sql-data:request-data",ue)}},[B]),_e.useEffect(()=>{const ue=Oe=>{At(Oe.detail)};return window.addEventListener("rtext_pagination_click",ue),()=>{window.removeEventListener("rtext_pagination_click",ue)}},[de]);const At=ue=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",ue),ue.replacePredataFunction&&de){const Oe={...de,rows:de.rows};ue.replacePredataFunction(Oe)}R==null||R("rtext_pagination_click",ue)},Rt=Lt(new Map),tr=Lt(1),ur=Lt(""),Bt=Lt({0:1,1:1,2:1,3:1}),Ht=Ct(()=>{if(typeof n=="string"){let ue=n;const Oe=[];return q&&q!==ur.current&&(Rt.current.clear(),tr.current=1,Bt.current={0:1,1:1,2:1,3:1},ur.current=q),o==="stream"&&(ue=ue.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(st,ze)=>{const le=ze.match(/id=['"]([^'"]+)['"]/),Ye=ze.match(/fromType=['"]([^'"]+)['"]/);if(le){const Ue=le[1],ut=Ye?Ye[1]:"0";if(!Rt.current.has(Ue)){const De=Bt.current,ve=ut==="1"?"1":ut==="2"?"2":ut==="3"?"3":"0",qe=De[ve]??1;Rt.current.set(Ue,qe),De[ve]=qe+1,Bt.current=De}const fe=Rt.current.get(Ue);return`[retrive-tag${ze}][${fe}][/retrive-tag]`}return st})),ue=ue.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,st=>{const ze=st.match(/image_urls=['"]([^'"]+)['"]/);if(ze){const le=ze[1].split(";").map(Ye=>Ye.trim()).filter(Boolean);Oe.push(...le)}return st}),Oe.length>0&&Se(Oe),ue}return n},[n,o,q]),jt=Ct(()=>{if(typeof Ht=="string")try{return Zg(Ht)}catch(ue){return console.error("Failed to deserialize markdown:",ue),[]}return[]},[Ht]),Cr=St(ue=>{if(!(!ue||typeof Ht!="string"))try{const Oe=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ue}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Ht);if(Oe&&Oe[1]){const st=Number(Oe[1]);return Number.isNaN(st)?Oe[1]:st}}catch{}},[Ht]),zr=Ct(()=>oE(jt||[]),[jt]),jr=Ct(()=>{const ue={};return zr.forEach(Oe=>{Oe!=null&&Oe.id&&!ue[Oe.id]&&(ue[Oe.id]=Oe.index)}),ue},[zr]);er(()=>{try{o==="stream"&&B&&(ue=>{try{const Oe=typeof ue=="string"?JSON.parse(ue):ue;return Oe?Array.isArray(Oe)?Oe:[Oe]:[]}catch{return[]}})(B).forEach(ue=>{const Oe=ue==null?void 0:ue.id;if(!Oe)return;const st=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Oe,databaseReference:ue}});window.dispatchEvent(st)})}catch{}},[o,B]);const Tr=Ct(()=>{if(!Array.isArray(jt))return!1;const ue=st=>{for(const ze of st)if(ze.type==="think"||Array.isArray(ze.children)&&ue(ze.children))return!0;return!1},Oe=ue(jt);return console.log("Think detection:",{slateContent:jt,hasThinkElement:Oe,displayStatus:u,isUser:f}),Oe},[jt,u,f]),vr=Ct(()=>({databaseReference:B,...Tr&&{isThinkCollapsed:ft}}),[B,Tr,ft]),pr=Ct(()=>l||(f?ce.icons.userAvatar:ce.icons.aiAvatar),[l,f,ce.icons]),_t=Ct(()=>typeof n=="string"?n:Array.isArray(n)?n.map(ue=>typeof ue=="string"?ue:ue.text||"").join(""):L||"",[n,L]),w=()=>{if(Y)return null;const ue=[{key:"copy",show:J.copy!==!1,icon:uD,label:"\u590D\u5236",onClick:()=>R==null?void 0:R("chatbox:copy",{content:_t})},{key:"like",show:J.like!==!1,icon:yD,label:"\u8D5E",onClick:()=>R==null?void 0:R("chatbox:like",{result:M,queryId:q}),active:M===1},{key:"dislike",show:J.dislike!==!1,icon:bD,label:"\u8E29",onClick:()=>R==null?void 0:R("chatbox:dislike",{result:M,queryId:q}),active:M===0},{key:"repeat",show:!f&&V,icon:gD,label:"\u91CD\u590D",onClick:()=>R==null?void 0:R("chatbox:repeat",{content:n,queryId:q,filePaths:A,audioUrl:_})},{key:"forward",show:J.forward,icon:vD,label:"\u8F6C\u53D1",onClick:()=>R==null?void 0:R("chatbox:forward",{content:_t,queryId:q})},{key:"delete",show:J.delete,icon:xD,label:"\u5220\u9664",onClick:()=>R==null?void 0:R("chatbox:delete",{queryId:q})},{key:"edit",show:J.edit,icon:pD,label:"\u7F16\u8F91",onClick:()=>R==null?void 0:R("chatbox:edit",{content:_t,queryId:q})}];return U.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[U.jsx(uE,{$theme:ce,children:ue.filter(Oe=>Oe.show).map(Oe=>{const st=Oe.icon;return U.jsx(hs,{title:Oe.label,placement:"top",children:U.jsx("button",{className:Oe.active?"active":"",onClick:Oe.onClick,children:U.jsx(st,{size:18})})},Oe.key)})}),!f&&u=="ready"&&!Y&&U.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017 ",U.jsx("span",{style:{color:ce.colors.primary},children:K||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",U.jsx("span",{style:{color:ce.colors.primary},children:Math.round((z||0)/1e3)}),"\u79D2"]})]})},E=Ct(()=>{if(!S)return[];let ue=[];try{let le;if(typeof S=="string")le=JSON.parse(S);else if(Array.isArray(S))le=S;else if(typeof S=="object")le=[S];else return[];ue=Array.isArray(le)?le:[]}catch(le){return console.warn("\u89E3\u6790 reference \u6570\u636E\u5931\u8D25:",le,S),[]}let Oe=ue.map(le=>{var Ye;try{const Ue=le.metadata||{};let ut="";Ue.type==="video"&&Ue.source_name&&typeof Ue.source_name=="string"?ut=Ue.source_name:le.name&&typeof le.name=="string"?ut=le.name:le.file_name&&typeof le.file_name=="string"?ut=le.file_name:Ue.title&&typeof Ue.title=="string"?ut=Ue.title:Ue.source&&typeof Ue.source=="string"?ut=Ue.source.split("/").pop()||"":le.order_num?ut=String(le.order_num):ut="\u672A\u77E5\u6587\u6863";let fe="pdf";if(Ue.type&&typeof Ue.type=="string")fe=Ue.type.toLowerCase();else if(le.name&&typeof le.name=="string"){const Tt=le.name.split(".").pop();Tt&&(fe=Tt.toLowerCase())}else if(Ue.source&&typeof Ue.source=="string"){const Tt=Ue.source.split(".").pop();Tt&&(fe=Tt.toLowerCase())}else if(le.file_path&&typeof le.file_path=="string"){const Tt=le.file_path.split(".").pop();Tt&&(fe=Tt.toLowerCase())}const De=le.parsedFilePath||Ue.file_path||le.file_path||le.convertedFilePath||Ue.link||Ue.source_link||"",{metadata:ve,...qe}=le,ct=Ue.source||"",Vt=Yi(le.score??Ue.score);return{file_id:Ue.id||le.uid||"",file_name:ut,file_type:fe,path:De,score:Vt,tags:[],parsedFilePath:le.parsedFilePath,source:ct,...qe}}catch(Ue){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Ue,le);const{metadata:ut,...fe}=le,De=((Ye=le.metadata)==null?void 0:Ye.source)||le.file_path||le.convertedFilePath||"",ve=Yi(le.score);return{file_id:le.uid||"",file_name:le.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:le.convertedFilePath||le.file_path||"",score:ve,tags:[],parsedFilePath:le.parsedFilePath,source:De,...fe}}});const st=oa(jt||[]);if(st&&st.length){const le=st.filter(Ue=>Ue.fromtype==="0"),Ye=st.filter(Ue=>Ue.fromtype==="3");Oe=Oe.map(Ue=>{const ut=le.map(De=>{var Vt;const ve=ue.find(Tt=>String(Tt.order_num)===String(De.id));if(!ve||!((Vt=ve==null?void 0:ve.metadata)!=null&&Vt.source))return null;const qe=Ue.source||"",ct=ve.metadata.source||"";return qe&&ct&&qe!==ct?null:{id:De.id||"",index:Cr(String(De.id))||De.indexId||"",image_urls:De.imageUrls?Array.isArray(De.imageUrls)?De.imageUrls:[De.imageUrls]:De.image_urls?De.image_urls.split(";").map(Tt=>Tt.trim()).filter(Boolean):[],metadata:ve.metadata||{},order_num:ve.order_num,parsedFilePath:ve.parsedFilePath}}).filter(De=>De!==null),fe=Ye.map(De=>{var Vt;const ve=ue.find(Tt=>String(Tt.order_num)===String(De.id));if(!ve||!((Vt=ve==null?void 0:ve.metadata)!=null&&Vt.source))return null;const qe=Ue.source||"",ct=ve.metadata.source||"";return qe&&ct&&qe!==ct?null:{id:De.id||"",index:Cr(String(De.id))||De.indexId||"",image_urls:De.imageUrls?Array.isArray(De.imageUrls)?De.imageUrls:[De.imageUrls]:De.image_urls?De.image_urls.split(";").map(Tt=>Tt.trim()).filter(Boolean):[],metadata:ve.metadata||{},order_num:ve.order_num,parsedFilePath:ve.parsedFilePath}}).filter(De=>De!==null);return{...Ue,tags:[...ut,...fe]}})}const ze=new Map;return Oe.filter(le=>{const Ye=(le==null?void 0:le.source)||le.file_name;return Ye?ze.has(Ye)?!1:(ze.set(Ye,!0),!0):!0}).sort((le,Ye)=>Number((Ye==null?void 0:Ye.score)??0)-Number((le==null?void 0:le.score)??0))},[S,jt,Ht,Cr]),Ie=Ct(()=>{if(!F)return[];let ue=[];try{let ze;if(typeof F=="string")ze=JSON.parse(F);else if(Array.isArray(F))ze=F;else if(typeof F=="object")ze=[F];else return[];ue=Array.isArray(ze)?ze:[]}catch(ze){return console.warn("\u89E3\u6790 webReference \u6570\u636E\u5931\u8D25:",ze,F),[]}if(!(ue!=null&&ue.length))return[];let Oe=ue.map(ze=>{var Ye,Ue,ut;const le=(ze==null?void 0:ze.score)??((Ye=ze==null?void 0:ze.metadata)==null?void 0:Ye.score);return{link:(Ue=ze==null?void 0:ze.metadata)==null?void 0:Ue.link,file_name:(ut=ze==null?void 0:ze.metadata)==null?void 0:ut.title,score:Yi(le),tags:[]}});const st=oa(jt||[]);if(st&&st.length){const ze=st.filter(le=>le.fromtype==="1");Oe=Oe.map(le=>{const Ye=ze.map(Ue=>{var fe;const ut=ue.find(De=>String(De.order_num)===String(Ue.id));return!ut||!((fe=ut==null?void 0:ut.metadata)!=null&&fe.title)||ut.metadata.title!==le.file_name?null:{id:Ue.id||"",index:Cr(String(Ue.id))||Ue.indexId||"",image_urls:Ue.imageUrls?Array.isArray(Ue.imageUrls)?Ue.imageUrls:[Ue.imageUrls]:Ue.image_urls?Ue.image_urls.split(";").map(De=>De.trim()).filter(Boolean):[],metadata:ut.metadata||{},order_num:ut.order_num}}).filter(Ue=>Ue!==null);return{...le,tags:Ye}})}return Oe.sort((ze,le)=>Number((le==null?void 0:le.score)??0)-Number((ze==null?void 0:ze.score)??0))},[F,jt,Ht,Cr]),$=Ct(()=>{if(console.log("[ChatMessageAdapter] parseGraphReferenceData - graphReference:",O,"type:",typeof O),!O)return console.log("[ChatMessageAdapter] graphReference \u4E3A\u7A7A\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];let ue=[];try{if(typeof O=="string"){if(O==="[]"||O==="null"||O.trim()==="")return console.log("[ChatMessageAdapter] graphReference \u662F\u7A7A\u5B57\u7B26\u4E32\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];const ze=JSON.parse(O);ue=Array.isArray(ze)?ze:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",ue.length)}else if(Array.isArray(O))ue=O,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",ue.length);else if(typeof O=="object"&&O!==null)ue=[O],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",ue.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof O,O),[]}catch(ze){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",ze,O),[]}let Oe=ue.map((ze,le)=>{const{metadata:Ye,...Ue}=ze;return{id:ze.id||`graph-${le}`,graphName:ze.graphName||`\u56FE\u8C31${le+1}`,tags:[],...Ue}});const st=oa(jt||[]);if(st&&st.length){const ze=st.filter(le=>le.fromtype==="2");Oe=Oe.map(le=>{let Ye=[];Array.isArray(le.traceNodes)&&le.traceNodes.length>0?Ye=le.traceNodes.map((fe,De)=>({id:fe.id,index:Cr(String(fe.id))??De+1,image_urls:[],metadata:fe.metadata||{},...fe})):Ye=ze.filter(fe=>String(fe.id)===String(le.id)).map(fe=>({id:fe.id||"",index:Cr(String(fe.id))||fe.indexId||"",image_urls:fe.imageUrls?Array.isArray(fe.imageUrls)?fe.imageUrls:[fe.imageUrls]:fe.image_urls?fe.image_urls.split(";").map(De=>De.trim()).filter(Boolean):[],metadata:{}}));const Ue=new Set,ut=Ye.filter(fe=>Ue.has(String(fe.id))?!1:(Ue.add(String(fe.id)),!0)).sort((fe,De)=>Number(fe.index)-Number(De.index));return{...le,tags:ut}})}return Oe},[O,jt,Ht,Cr]),Q=Ct(()=>{const ue=[...oa(jt||[]).filter(Oe=>Oe.imageUrls&&Array.isArray(Oe.imageUrls)).flatMap(Oe=>Oe.imageUrls),...we];return Array.from(new Set(ue))},[jt,we]),Zt=Ct(()=>typeof n!="string"?[]:nE(n),[n]),nt=Ct(()=>Array.from(new Set([...Q||[],...Zt||[]])),[Q,Zt]),Ke=Ct(()=>{var ue,Oe,st,ze,le,Ye,Ue,ut;if(!B)return null;try{const fe=typeof B=="string"?JSON.parse(B):B;if(Array.isArray(fe)&&fe.length>0){const De=fe[0];if(De.retrieveSqlData)return{dataFetchUrl:De.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:De.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:De.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:De.retrieveSqlData.total||0,type:De.retrieveSqlData.type||"COLLECTION",preData:{columns:((Oe=(ue=De.retrieveSqlData.preData)==null?void 0:ue[0])==null?void 0:Oe.columns)||[],rows:((ze=(st=De.retrieveSqlData.preData)==null?void 0:st[0])==null?void 0:ze.data)||[]}}}return fe.retrieveSqlData?{dataFetchUrl:fe.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:fe.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:fe.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:fe.retrieveSqlData.total||0,type:fe.retrieveSqlData.type||"COLLECTION",preData:{columns:((Ye=(le=fe.retrieveSqlData.preData)==null?void 0:le[0])==null?void 0:Ye.columns)||[],rows:((ut=(Ue=fe.retrieveSqlData.preData)==null?void 0:Ue[0])==null?void 0:ut.data)||[]}}:{dataFetchUrl:fe.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:fe.databaseName||"\u6570\u636E\u5E93",tableName:fe.tableName||"\u6570\u636E\u8868",total:fe.total||0,type:fe.type||"COLLECTION",preData:fe.preData||{columns:[],rows:[]}}}catch(fe){return console.error("Failed to parse databaseReference:",fe),null}},[B]),wt=ue=>{const{dataSourceType:Oe,databaseName:st,businessTableName:ze,tableName:le}=ue;return Oe==="DataTable"?`${st||"\u6570\u636E\u5E93"} - ${ze||"\u6570\u636E\u8868"}`:Oe==="DirectDB"?`${st||"\u6570\u636E\u5E93"} - ${le||"\u6570\u636E\u8868"}`:st||ze||le||"\u6570\u636E\u5E93"};_e.useEffect(()=>{bt(null),Se([])},[q]),_e.useEffect(()=>{var st;const ue=ze=>{try{const le=typeof ze=="string"?JSON.parse(ze):ze;return le?Array.isArray(le)?le:[le]:[]}catch(le){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",le),[]}},Oe=(ze,le)=>{if(!Array.isArray(ze))return[];const Ye=le!=null&&le.id?String(le.id):void 0,Ue=Ye?Cr(Ye):void 0,ut=Ye?jr[Ye]:void 0,fe=Ue??ut??(le==null?void 0:le.referenceIndex)??void 0,De=Ye&&fe!==void 0?[{id:Ye,index:fe}]:[];return ze.map(ve=>{var qe,ct,Vt,Tt;return{...ve,id:ve.id||Ye||ve.tableName,referenceId:Ye,referenceIndex:fe,tags:De,fetchUrl:ve.fetchUrl||((qe=le==null?void 0:le.retrieveSqlData)==null?void 0:qe.fetchUrl)||(Ke==null?void 0:Ke.dataFetchUrl)||"",databaseName:ve.databaseName||((ct=le==null?void 0:le.retrieveSqlData)==null?void 0:ct.databaseName)||(Ke==null?void 0:Ke.databaseName)||"",tableName:ve.tableName||((Vt=le==null?void 0:le.retrieveSqlData)==null?void 0:Vt.tableName)||(Ke==null?void 0:Ke.tableName)||"",dataSourceType:ve.dataSourceType||((Tt=le==null?void 0:le.retrieveSqlData)==null?void 0:Tt.type)||(Ke==null?void 0:Ke.type)||"DataTable"}})};if(B){const ze=ue(B),le=[];if(ze.forEach(Ye=>{var Ue,ut,fe;if(Array.isArray(Ye==null?void 0:Ye.retrieveTableDataList)&&Ye.retrieveTableDataList.length)le.push(...Oe(Ye.retrieveTableDataList,Ye));else if(Array.isArray((fe=(ut=(Ue=Ye==null?void 0:Ye.retrieveSqlData)==null?void 0:Ue.preData)==null?void 0:ut[0])==null?void 0:fe.data)&&Ye.retrieveSqlData.preData[0].data.length){const De={businessTableName:Ye.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:Ye.retrieveSqlData.databaseName||(Ke==null?void 0:Ke.databaseName)||"\u6570\u636E\u5E93",tableName:Ye.retrieveSqlData.tableName||(Ke==null?void 0:Ke.tableName)||"\u6570\u636E\u8868",fetchUrl:Ye.retrieveSqlData.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",dataSourceType:Ye.retrieveSqlData.type||"DirectDB",total:Ye.retrieveSqlData.total};le.push(...Oe([De],Ye))}}),le.length>0){Pe(le);return}if((st=Ke==null?void 0:Ke.preData)!=null&&st.rows){const Ye=Oe(Ke.preData.rows,{});Pe(Ye);return}console.warn("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] \u672A\u627E\u5230\u53EF\u7528\u7684\u6570\u636E\u5E93\u6570\u636E")}else console.log("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] databaseReference \u4E0D\u5B58\u5728\uFF0C\u6E05\u7A7A databaseData");Pe([])},[B,Ke,q,jr,Cr]);const tt=St(()=>{try{const ue=Array.isArray(E)?E:[],Oe=Array.isArray(Ie)?Ie:[],st=Array.isArray($)?$:[],ze=nt,le=oa(jt||[]),Ye=qe=>typeof Ht!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${qe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(Ht),Ue=qe=>{const ct=new Map;return qe.forEach(Vt=>{if(Vt.id){const Tt=String(Vt.id);if(!ct.has(Tt))ct.set(Tt,Vt);else{const dt=ct.get(Tt),qt=Number(Vt.index)||0,Jr=Number(dt.index)||0;(qt<Jr||qt===Jr&&!dt.index)&&ct.set(Tt,Vt)}}}),Array.from(ct.values())},ut=ue.map(qe=>({...qe,tags:Ue((qe.tags||[]).filter(ct=>ct.id&&Ye(String(ct.id))))})),fe=Oe.map(qe=>({...qe,tags:Ue((qe.tags||[]).filter(ct=>ct.id&&Ye(String(ct.id))))})),De=st.map(qe=>({...qe,tags:Ue((qe.tags||[]).filter(ct=>ct.id&&Ye(String(ct.id))))})),ve=ht&&ht.length>0?ht.map(qe=>({id:qe.id||qe.tableName||qe.referenceId||"",databaseName:qe.databaseName||(Ke==null?void 0:Ke.databaseName)||"",tableName:qe.tableName||(Ke==null?void 0:Ke.tableName)||"",fetchUrl:qe.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",score:Yi(qe.score),tags:qe.tags||[],referenceIndex:qe.referenceIndex,metadata:qe.metadata?{...qe.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})):[];return{queryId:q,knowledgeRefs:ut,webRefs:fe,graphRefs:De,databaseRefs:ve,images:ze,raw:{reference:S,webReference:F,graphReference:O,databaseReference:B,retriveNodes:le}}}catch{return{queryId:q,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:S,webReference:F,graphReference:O,databaseReference:B,retriveNodes:[]}}}},[E,Ie,$,Ke,ht,nt,jt,q,S,F,O,B,Ht]),Mt=Ct(()=>{if(!f)return[];if(Array.isArray(P))return P;if(typeof P=="string"&&P)try{return JSON.parse(P)}catch{return[]}return[]},[f,P]),ar=()=>{if(!f||Mt.length===0)return null;const ue=fe=>{if(!fe)return"";if(typeof fe=="string"&&(fe.includes("KB")||fe.includes("MB")||fe.includes("GB")||fe.includes("B")))return fe;const De=typeof fe=="string"?parseFloat(fe)||0:fe;return De<1024?`${De}B`:De<1024*1024?`${(De/1024).toFixed(1)}KB`:`${(De/1024/1024).toFixed(1)}MB`},Oe=fe=>fe!=null&&fe.status&&(String(fe.status).toLowerCase()==="uploading"||String(fe.status).toLowerCase()==="parsing")?!1:!!(fe!=null&&fe.url||fe!=null&&fe.filePath||fe!=null&&fe.convertedFilePath),st=Mt.filter(fe=>{const De=(fe.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(De.toLowerCase())}),ze=Mt.filter(fe=>{const De=(fe.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(De.toLowerCase())}),le=st.filter(Oe),Ye=st.filter(fe=>!Oe(fe)),Ue=ze.filter(Oe),ut=ze.filter(fe=>!Oe(fe));return Ue.length+ut.length,U.jsxs("div",{className:"mt-4 mb-4",style:{width:"100%",paddingLeft:f?"0":"1.8rem",paddingRight:f?"1.8rem":"0",display:"flex",flexDirection:"column",alignItems:f?"flex-end":"flex-start"},children:[(le.length>0||Ye.length>0)&&U.jsx(Ru,{$theme:ce,children:U.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[Ye.map((fe,De)=>{var ve;return U.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:U.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((ve=ce.colors)==null?void 0:ve.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${De}`)}),le.map(fe=>U.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{...fe,file:fe.name,file_type:fe.file_type||"image",url:fe.url||fe.filePath,parse_url:fe.parseUrl||fe.convertedFilePath,retrieve_tags:fe.retrieveTags||[],file_id:fe.uid||fe.file_id,parsed_file_type:fe.parsed_file_type||"image",references:fe,type:fe.type||"image",isUploadFile:!0,pdfPages:fe.pdfPages||0})},children:[U.jsx(Mu,{src:fe.url||fe.filePath,alt:fe.name,className:"gallery-image",token:e,url:t,eventsEmit:et}),U.jsx("div",{className:"gallery-overlay",children:fe.name})]},fe.uid||fe.name))]})}),(Ue.length>0||ut.length>0)&&U.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"6px",alignItems:f?"flex-end":"flex-start",width:"100%"},children:U.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"flex-end",direction:"ltr",paddingLeft:f?"0":"0.5rem",paddingRight:f?"0.5rem":"0",justifyContent:"flex-end",width:"100%",maxWidth:"100%"},children:[ut.map((fe,De)=>{const ve=(fe.name||"").split(".").pop()||"",qe=Tu(ve,m,18);return U.jsxs("div",{className:"group gap-x-3 items-center file-display-card relative flex w-[240px] bg-white border border-gray-200 rounded-lg shadow-sm px-3 py-2.5 transition-all",children:[U.jsx("div",{className:"pt-0.5 flex-shrink-0",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:U.jsx("div",{style:{transform:"scale(1.2)",transformOrigin:"center"},children:qe})}),U.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:U.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[U.jsx("div",{style:{height:"13px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"140px"}}),U.jsx("div",{style:{height:"12px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"40px"}})]})})]},`pending-doc-${fe.uid||De}`)}),Ue.map(fe=>{var Vt;const De=(fe.name||"").split(".").pop()||"",ve=fe.size??((Vt=fe.file)==null?void 0:Vt.size)??fe.fileSize,qe=ue(ve),ct=Tu(De,m,18);return U.jsxs("div",{className:"group gap-x-3 items-center file-display-card relative flex w-[240px] min-h-[56px] bg-white border border-gray-200 rounded-lg shadow-sm px-3 py-2.5 transition-all hover:shadow-md hover:border-blue-300",style:{cursor:"pointer"},title:fe.name,onClick:()=>{R==null||R("reference_file:click",{...fe,file:fe.name,file_type:fe.file_type||De,url:fe.url||fe.filePath,parse_url:fe.parseUrl||fe.convertedFilePath,retrieve_tags:fe.retrieveTags||[],file_id:fe.uid||fe.file_id,parsed_file_type:fe.parsed_file_type||De,references:fe,type:fe.type||"file",isUploadFile:!0,pdfPages:fe.pdfPages||0})},children:[U.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:U.jsx("div",{style:{transform:"scale(1.65)",marginBottom:"4px",transformOrigin:"center"},children:ct})}),U.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[U.jsx("div",{className:"flex",children:U.jsx("div",{className:"flex items-center justify-between gap-1.5",children:U.jsx("span",{className:"text-[13px] font-medium truncate max-w-[140px]",title:fe.name,children:fe.name})})}),U.jsx("div",{className:" text-[12px] text-gray-400 whitespace-nowrap",children:qe})]})]},fe.uid||fe.name)})]})})]})},$r=()=>{if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases:",ke),!ke||!Array.isArray(ke)||ke.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases \u4E3A\u7A7A\u6216\u4E0D\u662F\u6570\u7EC4"),null;const ue=[];let Oe=0;if(ke.forEach((ve,qe)=>{ve&&ve.treeData&&Array.isArray(ve.treeData)&&(ve.treeData.forEach(ct=>{ue.push({...ct,_kbIndex:qe,_kbName:ve.knowledgeBaseName||""})}),Oe+=ve.totalFileCount||0)}),ue.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u6709\u6548\u7684 treeData"),null;console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u5408\u5E76\u540E\u7684 allTreeData \u957F\u5EA6:",ue.length);const st=ue.filter(ve=>ve.type==="dir"),ze=ue.filter(ve=>ve.type==="file");console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - dirItems:",st.length,"fileItems:",ze.length);let le=[],Ye="\u6309\u76EE\u5F55\u5206\u7C7B";if(st.length>0){const ve=st.map((qe,ct)=>({id:`${qe._kbIndex}-${qe.name||ct}`||ct,name:qe.name||"",documentCount:qe.fileCount||0,visible:!0,itemType:"dir"}));le.push(...ve)}if(ze.length>0){const ve=ze.map((qe,ct)=>({id:`${qe._kbIndex}-${qe.name||ct}`||ct,name:qe.name||"\u672A\u77E5\u6587\u4EF6",documentCount:0,visible:!0,itemType:"file",fileType:qe.fileType||""}));le.push(...ve)}if(st.length===0&&ze.length>0&&(Ye="\u77E5\u8BC6\u5E93\u6587\u6863"),console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - categories:",le),le.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u53EF\u7528\u7684\u5206\u7C7B"),null;const Ue=Oe>0?Oe:ze.length,ut=le.slice(0,5),fe=le.length>5,De={title:"\u77E5\u8BC6\u5E93\u6587\u6863\u5217\u8868",subtitle:Ye,totalCount:Ue,categories:ut,showViewAll:fe,viewAllText:"\u67E5\u770B\u5168\u90E8>>"};return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - result:",De),De},ee=()=>{if(f)return null;const ue=$r();return ue?U.jsx(XD,{data:ue,styles:m,onCategoryClick:Oe=>{R==null||R("knowledge_base_category:click",{category:Oe,knowledgeBase:ke==null?void 0:ke[0]})},onViewAllClick:()=>{R==null||R("knowledge_base_view_all:click",{knowledgeBases:ke})}}):null},br=()=>{var De;if(f)return null;console.log("[ChatMessageAdapter] renderReferences \u5F00\u59CB - referenceMode:",ie),console.log("[ChatMessageAdapter] renderReferences - graphReference \u539F\u59CB\u503C:",O),console.log("[ChatMessageAdapter] renderReferences - parseGraphReferenceData:",$);const ue=Array.isArray(E)?E:[],Oe=Array.isArray(Ie)?Ie:[],st=Array.isArray($)?$:[];console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",ue.length,"webList:",Oe.length,"graphList:",st.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",st);const ze=ue.length>0&&X!==5,le=Oe.length>0,Ye=st.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",ze,"hasWebRefs:",le,"hasGraphRefs:",Ye);const Ue=nt.length>0,ut=ht&&ht.length>0,fe=ze||le||Ye||Ue||ut;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",fe),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",B),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",ht),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",ht==null?void 0:ht.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",ut),ie==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",fe),!fe)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const ve=ze&&(ue==null?void 0:ue.length)||0,qe=le&&(Oe==null?void 0:Oe.length)||0,ct=Ye&&(st==null?void 0:st.length)||0,Vt=ut&&(ht==null?void 0:ht.length)||0;let Tt=ve+qe+ct+Vt;return Tt===0&&Ue&&(Tt=1),U.jsxs(U.Fragment,{children:[Ue&&U.jsx(Ru,{$theme:ce,children:U.jsx("div",{className:"gallery-grid",children:nt.map((dt,qt)=>U.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{file:`\u56FE${qt+1}`,file_type:"image",url:dt,parse_url:dt,retrieve_tags:[],references:{url:dt},type:"image",isUploadFile:!1})},children:[U.jsx(Mu,{src:dt,alt:`\u56FE${qt+1}`,className:"gallery-image",token:e,url:t,eventsEmit:et}),U.jsxs("div",{className:"gallery-overlay",children:["\u56FE",qt+1]})]},dt+qt))})}),U.jsx("div",{style:{padding:"6px 2.9rem"},children:U.jsxs("button",{style:{cursor:"pointer",color:((De=ce.colors)==null?void 0:De.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 dt=tt();R==null||R("references:click",dt)},onMouseEnter:dt=>{var qt;dt.currentTarget.style.color=((qt=ce.colors)==null?void 0:qt.primary)||"#3b82f6"},onMouseLeave:dt=>{var qt;dt.currentTarget.style.color=((qt=ce.colors)==null?void 0:qt.textDisabled)||"#86909C"},children:[U.jsx(fD,{size:16}),U.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",Tt?` ${Tt}`:""]}),U.jsx(lD,{size:16})]})})]})}return fe?U.jsxs(U.Fragment,{children:[Ue&&U.jsx(Ru,{$theme:ce,children:U.jsx("div",{className:"gallery-grid",children:nt.map((ve,qe)=>U.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{file:`\u56FE${qe+1}`,file_type:"image",url:ve,parse_url:ve,retrieve_tags:[],references:{url:ve},type:"image",isUploadFile:!1})},children:[U.jsx(Mu,{src:ve,alt:`\u56FE${qe+1}`,className:"gallery-image",token:e,url:t,eventsEmit:et}),U.jsxs("div",{className:"gallery-overlay",children:["\u56FE",qe+1]})]},ve+qe))})}),ze&&U.jsxs(Gi,{$theme:ce,children:[U.jsx("div",{className:"reference-title justify-between items-center flex",children:U.jsxs("div",{className:"flex items-center gap-2",children:[U.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),U.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${ue.length})`}),ue.length>2&&U.jsx("div",{onClick:()=>Te(!$e),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:$e?U.jsx(Wa,{size:16,className:"text-[#b4b4b4]"}):U.jsx(qa,{size:16,className:"text-[#b4b4b4]"})})]})}),U.jsx("div",{className:"reference-list",children:($e?ue:ue.slice(0,2)).map((ve,qe)=>ve&&U.jsx("div",{className:"reference-item",children:U.jsxs("div",{className:"file-info flex items-end gap-2",children:[U.jsx("div",{className:"flex-shrink-0",children:(()=>{const ct=ve.file_type||(ve.file_name||"").split(".").pop()||"pdf",Vt=(ve.file_name||"").split(".").pop()||"file";return ct==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(ct)?U.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:U.jsx(mD,{size:16,className:"text-red-600"})}):U.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Tu(Vt,m,16)})})()}),U.jsx("div",{className:"flex-1 min-w-0",children:U.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:ct=>{ct.stopPropagation(),R==null||R("knowledge_referenceFile_title:click",{data:{...ve,file_type:ve.file_type,file_name:ve.file_name,metadata:ve.metadata,parsedFilePath:ve.parsedFilePath}})},children:ve.file_name})}),U.jsx("div",{className:"flex items-center gap-1",children:(()=>{const ct=new Set,Vt=(ve.tags||[]).filter(dt=>ct.has(dt.id)?!1:(ct.add(dt.id),!0)).sort((dt,qt)=>Number(dt.index)-Number(qt.index)),Tt=dt=>{if(typeof Ht!="string")return dt;const qt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${dt}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Ht);return qt?qt[1]:dt};return Vt.slice(0,10).map(dt=>U.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:qt=>{qt.stopPropagation();const Jr=Ft(ve,dt.id),Ar=ve.file_type==="video"?"3":"0";R==null||R("retrive_tag:click",{tagInfo:Jr||ve,fromtype:Ar,leaf:{id:dt.id,fromtype:Ar},attributes:{}})},children:Tt(dt.id)},dt.id))})()}),typeof ve.score=="number"&&U.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ve.score).toFixed(2)]}),ve.file_type!=="video"&&U.jsxs("div",{className:"flex items-center gap-2",children:[U.jsx(dD,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:r?"pointer":"not-allowed"},onClick:ct=>{r&&(ct.stopPropagation(),R==null||R("referenceFile_download",{data:{...ve,file_type:ve.file_type,file_name:ve.file_name,metadata:ve.metadata,parsedFilePath:ve.parsedFilePath}}))}}),U.jsx("div",{className:"w-px h-4 bg-gray-300"}),U.jsx(hD,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:ct=>{ct.stopPropagation(),R==null||R("referenceFile_filechat",{data:{...ve,file_type:ve.file_type,file_name:ve.file_name,metadata:ve.metadata,parsedFilePath:ve.parsedFilePath}})}})]})]})},ve.file_id||qe))})]}),ut&&U.jsxs(Gi,{$theme:ce,children:[U.jsx("div",{className:"reference-title justify-between items-center flex",children:U.jsxs("div",{className:"flex items-center gap-2",children:[U.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),U.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${ht.length||0})`}),ht.length>2&&U.jsx("div",{onClick:()=>Me(!at),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:at?U.jsx(Wa,{size:16,className:"text-[#b4b4b4]"}):U.jsx(qa,{size:16,className:"text-[#b4b4b4]"})})]})}),U.jsx("div",{className:"reference-list",children:(at?ht:ht.slice(0,2)).map((ve,qe)=>U.jsx("div",{className:"reference-item",children:U.jsxs("div",{className:"file-info flex items-end gap-2",children:[U.jsx("div",{className:"flex-shrink-0",children:U.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:U.jsx(cD,{size:20,className:"text-blue-600"})})}),U.jsx("div",{className:"flex-1 min-w-0",children:U.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:ct=>{ct.stopPropagation(),R==null||R("database_referenceFile_title:click",{data:{...ve,file_type:"database",file_name:wt(ve),metadata:ve,parsedFilePath:ve.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",file:ve.databaseName||"database",url:ve.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",parse_url:ve.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",retrieve_tags:ve.tags||[],references:ve,type:"database",isUploadFile:!1}})},children:wt(ve)})}),U.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(ve.tags)&&ve.tags.length?ve.tags:[{id:ve.referenceId||`database-${qe}`,index:ve.referenceIndex??qe+1}]).map(ct=>U.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:ct.index??qe+1},`${ct.id||"database"}-${ct.index}`))}),typeof ve.score=="number"&&U.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ve.score).toFixed(2)]})]})},ve.tableName||qe))})]}),le&&U.jsxs(Gi,{$theme:ce,children:[U.jsx("div",{className:"reference-title justify-between items-center flex",children:U.jsxs("div",{className:"flex items-center gap-2",children:[U.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),U.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Oe.length})`}),Oe.length>2&&U.jsx("div",{onClick:()=>pt(!He),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:He?U.jsx(Wa,{size:16,className:"text-[#b4b4b4]"}):U.jsx(qa,{size:16,className:"text-[#b4b4b4]"})})]})}),U.jsx("div",{className:"reference-list",children:(He?Oe:Oe.slice(0,2)).map((ve,qe)=>U.jsx("div",{className:"reference-item",children:U.jsxs("div",{className:"file-info flex items-end gap-2",children:[U.jsx("div",{className:"flex-shrink-0",children:U.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:U.jsx(jo,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),U.jsx("div",{className:"flex-1 min-w-0",children:U.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:ct=>{ct.stopPropagation(),R==null||R("web_referenceFile_title:click",{data:{...ve,file_type:ve.file_type,file_name:ve.file_name,metadata:ve.metadata,parsedFilePath:ve.parsedFilePath,file:ve.file_name,url:ve.link,parse_url:ve.link,retrieve_tags:ve.tags||[],references:ve,type:"file",isUploadFile:!1}})},children:ve.file_name})}),U.jsx("div",{className:"flex items-center gap-1",children:(()=>{const ct=new Set,Vt=(ve.tags||[]).filter(dt=>ct.has(dt.id)?!1:(ct.add(dt.id),!0)).sort((dt,qt)=>Number(dt.index)-Number(qt.index)),Tt=dt=>{if(typeof Ht!="string")return dt;const qt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${dt}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Ht);return qt?qt[1]:dt};return Vt.slice(0,1).map(dt=>U.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:qt=>{qt.stopPropagation();const Jr=Ft(ve,dt.id);R==null||R("retrive_tag:click",{tagInfo:Jr||ve,fromtype:"1",leaf:{id:dt.id,fromtype:"1"},attributes:{}})},children:Tt(dt.id)},dt.id))})()}),typeof ve.score=="number"&&U.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ve.score).toFixed(2)]})]})},(ve.link||"")+qe))})]}),Ye&&U.jsxs(Gi,{$theme:ce,children:[U.jsx("div",{className:"reference-title justify-between items-center flex",children:U.jsxs("div",{className:"flex items-center gap-2",children:[U.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),U.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${st.length})`}),st.length>2&&U.jsx("div",{onClick:()=>Xe(!Le),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Le?U.jsx(Wa,{size:16,className:"text-[#b4b4b4]"}):U.jsx(qa,{size:16,className:"text-[#b4b4b4]"})})]})}),U.jsx("div",{className:"reference-list",children:(Le?st:st.slice(0,2)).map((ve,qe)=>U.jsx("div",{className:"reference-item",children:U.jsxs("div",{className:"file-info flex items-end gap-2",children:[U.jsx("div",{className:"flex-shrink-0",children:U.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:U.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"})})}),U.jsx("div",{className:"flex-1 min-w-0",children:U.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:ve.graphName||`\u56FE\u8C31${qe+1}`})}),U.jsx("div",{className:"flex items-center gap-1",children:(()=>{const ct=new Set,Vt=(ve.tags||[]).filter(dt=>ct.has(dt.id)?!1:(ct.add(dt.id),!0)).sort((dt,qt)=>Number(dt.index)-Number(qt.index)),Tt=dt=>{if(typeof Ht!="string")return null;const qt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${dt}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Ht);return qt?qt[1]??null:null};return Vt.map(dt=>({tag:dt,num:Tt(dt.id)})).filter(dt=>dt.num!==null&&dt.num!==void 0&&dt.num!=="").slice(0,10).map(({tag:dt,num:qt})=>U.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:Jr=>{Jr.stopPropagation();const Ar=Array.isArray(ve.traceNodes)?ve.traceNodes.find(dn=>String(dn==null?void 0:dn.id)===String(dt.id)):void 0;R==null||R("retrive_tag:click",{tagInfo:{id:dt.id,index:dt.index,image_urls:dt.image_urls||[]},fromtype:"2",graph:{id:ve.id,graphName:ve.graphName,fetchUrl:ve.fetchUrl,cyphers:ve.cyphers},traceNode:Ar})},children:qt},dt.id))})()})]})},ve.id||qe))})]})]}):null},oe=()=>f||!V||!W||W.length===0?null:U.jsx(cE,{$theme:ce,children:U.jsx("div",{className:"follow-up-list",children:W.map((ue,Oe)=>U.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Oe*260}ms`},onClick:()=>{R==null||R("chatbox:follow_up_question_click",{question:ue,queryId:q})},children:ue},`${String(ue)}-${Oe}`))})});return U.jsxs(aE,{$align:a,$isUser:f,children:[U.jsxs(iE,{$isUser:f,children:[U.jsx(sE,{$src:pr,$isUser:f}),Ce&&U.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:Ce})]}),ar(),U.jsx(lE,{$isUser:f,$theme:ce,children:U.jsx("div",{className:"message-card",children:U.jsx("div",{className:"message-text",children:o==="stream"?U.jsxs(U.Fragment,{children:[!f&&Dt(),vt(),U.jsx(cl,{dataSource:{type:pi.MARKDOWN,content:Ht},styles:{letterSpacing:m==null?void 0:m.letterSpacing,lineHeight:m==null?void 0:m.lineHeight,templateField:m==null?void 0:m.templateField,text:m==null?void 0:m.text},theme:{...m==null?void 0:m.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:Et,eventsEmit:R,extraProps:vr},`md-${(Ht||"").length}-think-${ft}`)]}):U.jsx("div",{style:{whiteSpace:"pre-wrap"},children:_t})})})}),ee(),br(),!f&&w(),oe(),typeof document<"u"&&e2(U.jsx(dE,{$show:Ee!==null,onClick:()=>Ae(null),children:Ee&&U.jsxs("div",{className:"modal-content",onClick:ue=>ue.stopPropagation(),children:[U.jsx("img",{src:Ee,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),U.jsx("button",{className:"modal-close",onClick:()=>Ae(null),children:"\u5173\u95ED"})]})}),document.body)]})};Ve.div.attrs({className:"retrive-chat-message-container"})`
|
|
1440
|
-
display: flex;
|
|
1441
|
-
flex-direction: column;
|
|
1442
|
-
width: 100%;
|
|
1443
|
-
margin-bottom: 16px;
|
|
1444
|
-
`;Ve.div.attrs({className:"retrive-chat-message-header"})`
|
|
1445
|
-
display: flex;
|
|
1446
|
-
align-items: flex-start;
|
|
1447
|
-
gap: 12px;
|
|
1448
|
-
margin-bottom: 12px;
|
|
1449
|
-
`;Ve.div.attrs({className:"retrive-chat-avatar-wrapper"})`
|
|
1450
|
-
width: 40px;
|
|
1451
|
-
height: 40px;
|
|
1452
|
-
border-radius: 50%;
|
|
1453
|
-
overflow: hidden;
|
|
1454
|
-
flex-shrink: 0;
|
|
1455
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1456
|
-
|
|
1457
|
-
img {
|
|
1458
|
-
width: 100%;
|
|
1459
|
-
height: 100%;
|
|
1460
|
-
object-fit: cover;
|
|
1461
|
-
}
|
|
1462
|
-
`;Ve.div.attrs({className:"retrive-chat-content-wrapper"})`
|
|
1463
|
-
flex: 1;
|
|
1464
|
-
display: flex;
|
|
1465
|
-
flex-direction: column;
|
|
1466
|
-
align-items: ${({isUser:e})=>e?"flex-end":"flex-start"};
|
|
1467
|
-
`;Ve.div.attrs({className:"retrive-chat-timestamp"})`
|
|
1468
|
-
font-size: 12px;
|
|
1469
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1470
|
-
margin-bottom: 8px;
|
|
1471
|
-
`;Ve.div.attrs({className:"retrive-chat-user-bubble"})`
|
|
1472
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.userBackground)||"#3b82f6"}};
|
|
1473
|
-
color: white;
|
|
1474
|
-
padding: 12px 16px;
|
|
1475
|
-
border-radius: 12px;
|
|
1476
|
-
max-width: 80%;
|
|
1477
|
-
word-wrap: break-word;
|
|
1478
|
-
`;Ve.div.attrs({className:"retrive-chat-ai-message-card"})`
|
|
1479
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1480
|
-
border-radius: 12px;
|
|
1481
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
1482
|
-
padding: 0;
|
|
1483
|
-
width: 100%;
|
|
1484
|
-
max-width: 100%;
|
|
1485
|
-
overflow: hidden;
|
|
1486
|
-
`;Ve.div.attrs({className:"retrive-chat-tabs-container"})`
|
|
1487
|
-
display: flex;
|
|
1488
|
-
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1489
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1490
|
-
`;Ve.button.attrs({className:"retrive-chat-tab-button"})`
|
|
1491
|
-
display: flex;
|
|
1492
|
-
position: relative;
|
|
1493
|
-
align-items: center;
|
|
1494
|
-
gap: 6px;
|
|
1495
|
-
padding: 12px 20px;
|
|
1496
|
-
background: transparent;
|
|
1497
|
-
border: none;
|
|
1498
|
-
border-bottom: 2px solid ${({active:e,theme:t})=>{var r;return e?((r=t.colors)==null?void 0:r.primary)||"#3b82f6":"transparent"}};
|
|
1499
|
-
color: ${({active:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.text)||"#374151":((n=t.colors)==null?void 0:n.disabled)||"#9ca3af"}};
|
|
1500
|
-
font-size: 14px;
|
|
1501
|
-
font-weight: ${({active:e})=>e?500:400};
|
|
1502
|
-
cursor: pointer;
|
|
1503
|
-
transition: all 0.2s ease;
|
|
1504
|
-
|
|
1505
|
-
&:hover {
|
|
1506
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1507
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
svg {
|
|
1511
|
-
width: 16px;
|
|
1512
|
-
height: 16px;
|
|
1513
|
-
}
|
|
1514
|
-
`;Ve.span.attrs({className:"retrive-chat-tab-badge"})`
|
|
1515
|
-
position: absolute;
|
|
1516
|
-
top: 4px;
|
|
1517
|
-
right: 10px;
|
|
1518
|
-
display: inline-flex;
|
|
1519
|
-
align-items: center;
|
|
1520
|
-
justify-content: center;
|
|
1521
|
-
min-width: 16px;
|
|
1522
|
-
height: 16px;
|
|
1523
|
-
padding: 0 4px;
|
|
1524
|
-
border-radius: 999px;
|
|
1525
|
-
font-size: 11px;
|
|
1526
|
-
font-weight: 500;
|
|
1527
|
-
background: #ef4444;
|
|
1528
|
-
color: #ffffff;
|
|
1529
|
-
line-height: 1;
|
|
1530
|
-
`;Ve.div.attrs({className:"retrive-chat-tab-content"})`
|
|
1531
|
-
padding: 20px;
|
|
1532
|
-
`;Ve.div.attrs({className:"retrive-chat-llm-config-container"})`
|
|
1533
|
-
margin-bottom: 20px;
|
|
1534
|
-
`;Ve.div.attrs({className:"retrive-chat-llm-config-title"})`
|
|
1535
|
-
display: flex;
|
|
1536
|
-
align-items: center;
|
|
1537
|
-
gap: 8px;
|
|
1538
|
-
font-size: 14px;
|
|
1539
|
-
font-weight: 500;
|
|
1540
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1541
|
-
margin-bottom: 12px;
|
|
1542
|
-
|
|
1543
|
-
.dot {
|
|
1544
|
-
width: 8px;
|
|
1545
|
-
height: 8px;
|
|
1546
|
-
border-radius: 50%;
|
|
1547
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1548
|
-
}
|
|
1549
|
-
`;Ve.div.attrs({className:"retrive-chat-llm-config-grid"})`
|
|
1550
|
-
display: grid;
|
|
1551
|
-
grid-template-columns: repeat(2, 1fr);
|
|
1552
|
-
gap: 12px;
|
|
1553
|
-
`;Ve.div.attrs({className:"retrive-chat-llm-config-item"})`
|
|
1554
|
-
display: flex;
|
|
1555
|
-
align-items: center;
|
|
1556
|
-
gap: 8px;
|
|
1557
|
-
font-size: 13px;
|
|
1558
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1559
|
-
|
|
1560
|
-
.dot {
|
|
1561
|
-
width: 6px;
|
|
1562
|
-
height: 6px;
|
|
1563
|
-
border-radius: 50%;
|
|
1564
|
-
flex-shrink: 0;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
.dot-green {
|
|
1568
|
-
background: #10b981;
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
.dot-blue {
|
|
1572
|
-
background: #3b82f6;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
.dot-purple {
|
|
1576
|
-
background: #8b5cf6;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
.dot-yellow {
|
|
1580
|
-
background: #f59e0b;
|
|
1581
|
-
}
|
|
1582
|
-
`;Ve.div.attrs({className:"retrive-chat-semantic-content"})`
|
|
1583
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1584
|
-
line-height: 1.6;
|
|
1585
|
-
font-size: 14px;
|
|
1586
|
-
`;Ve.div.attrs({className:"retrive-chat-stats-container"})`
|
|
1587
|
-
display: flex;
|
|
1588
|
-
gap: 16px;
|
|
1589
|
-
padding: 12px 20px;
|
|
1590
|
-
border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1591
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1592
|
-
font-size: 12px;
|
|
1593
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1594
|
-
`;Ve.div.attrs({className:"retrive-chat-empty-state"})`
|
|
1595
|
-
padding: 24px 16px;
|
|
1596
|
-
text-align: center;
|
|
1597
|
-
font-size: 13px;
|
|
1598
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1599
|
-
`;Ve.div.attrs({className:"retrive-chat-tools-container"})`
|
|
1600
|
-
display: flex;
|
|
1601
|
-
gap: 8px;
|
|
1602
|
-
padding: 12px 20px;
|
|
1603
|
-
border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1604
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1605
|
-
`;Ve.button.attrs({className:"retrive-chat-tool-button"})`
|
|
1606
|
-
display: flex;
|
|
1607
|
-
align-items: center;
|
|
1608
|
-
justify-content: center;
|
|
1609
|
-
width: 32px;
|
|
1610
|
-
height: 32px;
|
|
1611
|
-
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1612
|
-
border-radius: 6px;
|
|
1613
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1614
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1615
|
-
cursor: pointer;
|
|
1616
|
-
transition: all 0.2s ease;
|
|
1617
|
-
|
|
1618
|
-
&:hover {
|
|
1619
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1620
|
-
border-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
svg {
|
|
1624
|
-
width: 16px;
|
|
1625
|
-
height: 16px;
|
|
1626
|
-
}
|
|
1627
|
-
`;Ve.div.attrs({className:"retrive-chat-prompt-content"})`
|
|
1628
|
-
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
1629
|
-
font-size: 13px;
|
|
1630
|
-
line-height: 1.6;
|
|
1631
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1632
|
-
white-space: pre-wrap;
|
|
1633
|
-
word-break: break-word;
|
|
1634
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1635
|
-
padding: 16px;
|
|
1636
|
-
border-radius: 8px;
|
|
1637
|
-
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1638
|
-
`;Ve.div.attrs({className:"retrive-chat-config-container"})`
|
|
1639
|
-
display: grid;
|
|
1640
|
-
grid-template-columns: 1fr 1fr;
|
|
1641
|
-
gap: 24px;
|
|
1642
|
-
`;Ve.div.attrs({className:"retrive-chat-config-section"})`
|
|
1643
|
-
display: flex;
|
|
1644
|
-
flex-direction: column;
|
|
1645
|
-
`;Ve.div.attrs({className:"retrive-chat-config-section-title"})`
|
|
1646
|
-
display: flex;
|
|
1647
|
-
align-items: center;
|
|
1648
|
-
gap: 8px;
|
|
1649
|
-
font-size: 14px;
|
|
1650
|
-
font-weight: 500;
|
|
1651
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1652
|
-
margin-bottom: 16px;
|
|
1653
|
-
|
|
1654
|
-
.dot {
|
|
1655
|
-
width: 8px;
|
|
1656
|
-
height: 8px;
|
|
1657
|
-
border-radius: 50%;
|
|
1658
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1659
|
-
}
|
|
1660
|
-
`;Ve.div.attrs({className:"retrive-chat-config-item-list"})`
|
|
1661
|
-
display: flex;
|
|
1662
|
-
flex-direction: column;
|
|
1663
|
-
gap: 12px;
|
|
1664
|
-
`;Ve.div.attrs({className:"retrive-chat-config-item"})`
|
|
1665
|
-
display: flex;
|
|
1666
|
-
justify-content: space-between;
|
|
1667
|
-
align-items: center;
|
|
1668
|
-
padding: 8px 0;
|
|
1669
|
-
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1670
|
-
|
|
1671
|
-
&:last-child {
|
|
1672
|
-
border-bottom: none;
|
|
1673
|
-
}
|
|
1674
|
-
`;Ve.span.attrs({className:"retrive-chat-config-item-label"})`
|
|
1675
|
-
font-size: 13px;
|
|
1676
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1677
|
-
`;Ve.span.attrs({className:"retrive-chat-config-item-value"})`
|
|
1678
|
-
font-size: 13px;
|
|
1679
|
-
font-weight: 500;
|
|
1680
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1681
|
-
`;Ve.span.attrs({className:"retrive-chat-switch-status"})`
|
|
1682
|
-
font-size: 13px;
|
|
1683
|
-
font-weight: 500;
|
|
1684
|
-
color: ${({enabled:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.success)||"#10b981":((n=t.colors)==null?void 0:n.disabled)||"#9ca3af"}};
|
|
1685
|
-
`;Ve.div.attrs({className:"retrive-chat-retrieve-container"})`
|
|
1686
|
-
display: flex;
|
|
1687
|
-
flex-direction: column;
|
|
1688
|
-
gap: 4px;
|
|
1689
|
-
`;Ve.div.attrs({className:"retrive-chat-retrieve-chunk"})`
|
|
1690
|
-
display: flex;
|
|
1691
|
-
flex-direction: column;
|
|
1692
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1693
|
-
border-radius: 12px;
|
|
1694
|
-
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1695
|
-
overflow: hidden;
|
|
1696
|
-
transition: all 0.3s ease;
|
|
1697
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
1698
|
-
|
|
1699
|
-
&:hover {
|
|
1700
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
1701
|
-
border-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1702
|
-
}
|
|
1703
|
-
`;Ve.div.attrs({className:"retrive-chat-retrieve-chunk-header"})`
|
|
1704
|
-
display: flex;
|
|
1705
|
-
align-items: center;
|
|
1706
|
-
justify-content: space-between;
|
|
1707
|
-
padding: 5px 10px;
|
|
1708
|
-
cursor: pointer;
|
|
1709
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#fafafa"}};
|
|
1710
|
-
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1711
|
-
transition: background-color 0.2s ease;
|
|
1712
|
-
|
|
1713
|
-
&:hover {
|
|
1714
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f5f5f5"}};
|
|
1715
|
-
}
|
|
1716
|
-
`;Ve.div.attrs({className:"retrive-chat-retrieve-chunk-title"})`
|
|
1717
|
-
display: flex;
|
|
1718
|
-
align-items: center;
|
|
1719
|
-
gap: 10px;
|
|
1720
|
-
font-size: 15px;
|
|
1721
|
-
font-weight: 600;
|
|
1722
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1723
|
-
|
|
1724
|
-
.dot {
|
|
1725
|
-
width: 10px;
|
|
1726
|
-
height: 10px;
|
|
1727
|
-
border-radius: 50%;
|
|
1728
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1729
|
-
flex-shrink: 0;
|
|
1730
|
-
}
|
|
1731
|
-
`;Ve.div.attrs({className:"retrive-chat-retrieve-chunk-expand-icon"})`
|
|
1732
|
-
display: flex;
|
|
1733
|
-
align-items: center;
|
|
1734
|
-
gap: 4px;
|
|
1735
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#6b7280"}};
|
|
1736
|
-
font-size: 13px;
|
|
1737
|
-
cursor: pointer;
|
|
1738
|
-
transition: all 0.3s ease;
|
|
1739
|
-
|
|
1740
|
-
svg {
|
|
1741
|
-
transition: transform 0.3s ease;
|
|
1742
|
-
transform: ${({$isExpanded:e})=>e?"rotate(180deg)":"rotate(0deg)"};
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
&:hover {
|
|
1746
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1747
|
-
}
|
|
1748
|
-
`;Ve.div.attrs({className:"retrive-chat-retrieve-chunk-content"})`
|
|
1749
|
-
display: ${({$isExpanded:e})=>e?"flex":"none"};
|
|
1750
|
-
flex-direction: column;
|
|
1751
|
-
gap: 20px;
|
|
1752
|
-
padding: 6px;
|
|
1753
|
-
animation: ${({$isExpanded:e})=>e?"fadeIn":"none"} 0.3s ease;
|
|
1754
|
-
`;Ve.div.attrs({className:"retrive-chat-chunk-info-container"})`
|
|
1755
|
-
padding: 12px 20px;
|
|
1756
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1757
|
-
display: flex;
|
|
1758
|
-
align-items: center;
|
|
1759
|
-
flex-wrap: nowrap;
|
|
1760
|
-
gap: 4px;
|
|
1761
|
-
font-size: 13px;
|
|
1762
|
-
overflow-x: auto;
|
|
1763
|
-
`;Ve.div.attrs({className:"retrive-chat-chunk-info-item"})`
|
|
1764
|
-
display: flex;
|
|
1765
|
-
align-items: center;
|
|
1766
|
-
gap: 6px;
|
|
1767
|
-
white-space: nowrap;
|
|
1768
|
-
flex-shrink: 0;
|
|
1769
|
-
`;Ve.span.attrs({className:"retrive-chat-chunk-info-label"})`
|
|
1770
|
-
font-size: 13px;
|
|
1771
|
-
font-weight: 400;
|
|
1772
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#6b7280"}};
|
|
1773
|
-
`;Ve.span.attrs({className:"retrive-chat-chunk-info-value"})`
|
|
1774
|
-
font-size: 13px;
|
|
1775
|
-
font-weight: 600;
|
|
1776
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1777
|
-
padding: 2px 8px;
|
|
1778
|
-
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1779
|
-
border-radius: 4px;
|
|
1780
|
-
`;Ve.div.attrs({className:"retrive-chat-chunk-content-section"})`
|
|
1781
|
-
display: flex;
|
|
1782
|
-
flex-direction: column;
|
|
1783
|
-
gap: 4px;
|
|
1784
|
-
`;Ve.div.attrs({className:"retrive-chat-chunk-section-title"})`
|
|
1785
|
-
font-size: 14px;
|
|
1786
|
-
font-weight: 600;
|
|
1787
|
-
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1788
|
-
margin-bottom: 4px;
|
|
1789
|
-
`;Ve.div.attrs({className:"retrive-chat-chunk-content-wrapper"})`
|
|
1790
|
-
padding: 12px;
|
|
1791
|
-
background: #f5f5f5;
|
|
1792
|
-
border-radius: 8px;
|
|
1793
|
-
|
|
1794
|
-
`;Ve.div.attrs({className:"retrive-chat-chunk-file-source-section"})`
|
|
1795
|
-
display: flex;
|
|
1796
|
-
flex-direction: column;
|
|
1797
|
-
gap: 5px;
|
|
1798
|
-
padding: 15px;
|
|
1799
|
-
`;Ve.div.attrs({className:"retrive-chat-file-source"})`
|
|
1800
|
-
display: flex;
|
|
1801
|
-
align-items: flex-end;
|
|
1802
|
-
gap: 8px;
|
|
1803
|
-
`;const fE=Ve.div`
|
|
1804
|
-
position: relative;
|
|
1805
|
-
width: 100%;
|
|
1806
|
-
height: 100%;
|
|
1807
|
-
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
1808
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1809
|
-
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
1810
|
-
|
|
1811
|
-
/* 自定义滚动条 */
|
|
1812
|
-
&::-webkit-scrollbar {
|
|
1813
|
-
width: 8px;
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
&::-webkit-scrollbar-track {
|
|
1817
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1818
|
-
border-radius: 4px;
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
&::-webkit-scrollbar-thumb {
|
|
1822
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1823
|
-
border-radius: 4px;
|
|
1824
|
-
|
|
1825
|
-
&:hover {
|
|
1826
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
`,hE=Ve.div`
|
|
1830
|
-
position: relative;
|
|
1831
|
-
width: 100%;
|
|
1832
|
-
height: 100%;
|
|
1833
|
-
overflow: auto;
|
|
1834
|
-
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1835
|
-
|
|
1836
|
-
/* 自定义滚动条 */
|
|
1837
|
-
&::-webkit-scrollbar {
|
|
1838
|
-
width: 8px;
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
&::-webkit-scrollbar-track {
|
|
1842
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1843
|
-
border-radius: 4px;
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
&::-webkit-scrollbar-thumb {
|
|
1847
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1848
|
-
border-radius: 4px;
|
|
1849
|
-
|
|
1850
|
-
&:hover {
|
|
1851
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
`,ep=Ve.div`
|
|
1855
|
-
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
1856
|
-
min-height: ${e=>e.height||"auto"};
|
|
1857
|
-
|
|
1858
|
-
/* 富文本内容样式增强 */
|
|
1859
|
-
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
1860
|
-
scroll-margin-top: 2rem;
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
& img {
|
|
1864
|
-
max-width: 100%;
|
|
1865
|
-
height: auto;
|
|
1866
|
-
border-radius: 0.5rem;
|
|
1867
|
-
margin: 1rem 0;
|
|
1868
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
1869
|
-
transition: transform 0.2s ease-in-out;
|
|
1870
|
-
|
|
1871
|
-
&:hover {
|
|
1872
|
-
transform: scale(1.02);
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
/* 表格样式 - 主题感知 */
|
|
1877
|
-
& .table-container {
|
|
1878
|
-
overflow: auto;
|
|
1879
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
1880
|
-
border-radius: 6px;
|
|
1881
|
-
margin: 1rem 0;
|
|
1882
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
& .table-container table {
|
|
1886
|
-
width: 100%;
|
|
1887
|
-
border-collapse: collapse;
|
|
1888
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1889
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
& .table-container th,
|
|
1893
|
-
& .table-container td {
|
|
1894
|
-
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
1895
|
-
padding: 8px 12px;
|
|
1896
|
-
text-align: left;
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
& .table-container th {
|
|
1900
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1901
|
-
font-weight: 600;
|
|
1902
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
& .table-container td {
|
|
1906
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
& .table-container tr:nth-child(even) {
|
|
1910
|
-
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
& pre {
|
|
1914
|
-
position: relative;
|
|
1915
|
-
|
|
1916
|
-
&::before {
|
|
1917
|
-
content: '';
|
|
1918
|
-
position: absolute;
|
|
1919
|
-
top: 0;
|
|
1920
|
-
left: 0;
|
|
1921
|
-
right: 0;
|
|
1922
|
-
height: 2px;
|
|
1923
|
-
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
1924
|
-
border-radius: 2px 2px 0 0;
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
& blockquote {
|
|
1929
|
-
position: relative;
|
|
1930
|
-
|
|
1931
|
-
&::before {
|
|
1932
|
-
content: '"';
|
|
1933
|
-
position: absolute;
|
|
1934
|
-
top: -0.5rem;
|
|
1935
|
-
left: -1rem;
|
|
1936
|
-
font-size: 3rem;
|
|
1937
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1938
|
-
opacity: 0.3;
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
`,pE=Ve.div`
|
|
1944
|
-
display: flex;
|
|
1945
|
-
align-items: center;
|
|
1946
|
-
justify-content: center;
|
|
1947
|
-
padding: 2rem;
|
|
1948
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1949
|
-
font-size: 0.875rem;
|
|
1950
|
-
|
|
1951
|
-
&::before {
|
|
1952
|
-
content: '';
|
|
1953
|
-
width: 20px;
|
|
1954
|
-
height: 20px;
|
|
1955
|
-
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
1956
|
-
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1957
|
-
border-radius: 50%;
|
|
1958
|
-
animation: spin 1s linear infinite;
|
|
1959
|
-
margin-right: 0.5rem;
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
@keyframes spin {
|
|
1963
|
-
0% { transform: rotate(0deg); }
|
|
1964
|
-
100% { transform: rotate(360deg); }
|
|
1965
|
-
}
|
|
1966
|
-
`,mE=Ve.div`
|
|
1967
|
-
display: flex;
|
|
1968
|
-
flex-direction: column;
|
|
1969
|
-
align-items: center;
|
|
1970
|
-
justify-content: center;
|
|
1971
|
-
padding: 3rem;
|
|
1972
|
-
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1973
|
-
text-align: center;
|
|
1974
|
-
|
|
1975
|
-
&::before {
|
|
1976
|
-
content: '📄';
|
|
1977
|
-
font-size: 3rem;
|
|
1978
|
-
margin-bottom: 1rem;
|
|
1979
|
-
}
|
|
1980
|
-
`,gE=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:u=!1,size:l="sm",basePath:f,theme:d={},onChange:p,onScroll:v,onScrollToTop:g,onScrollToBottom:b,onSegmentClick:x,className:D,style:m,height:S="100%"})=>{const F=Hs(),B=Ct(()=>{var ce,Ce,we,Se,Ee,Ae,$e,Te,He;return{primaryColor:(d==null?void 0:d.primaryColor)||((ce=F==null?void 0:F.colors)==null?void 0:ce.primary)||"#007bff",secondaryColor:(d==null?void 0:d.secondaryColor)||((Ce=F==null?void 0:F.colors)==null?void 0:Ce.secondary)||"#6c757d",backgroundColor:(d==null?void 0:d.backgroundColor)||((we=F==null?void 0:F.colors)==null?void 0:we.background)||"#ffffff",textColor:(d==null?void 0:d.textColor)||((Se=F==null?void 0:F.colors)==null?void 0:Se.text)||"#24292f",borderColor:(d==null?void 0:d.borderColor)||((Ee=F==null?void 0:F.colors)==null?void 0:Ee.border)||"#dee2e6",disabledBackground:(d==null?void 0:d.disabledBackground)||((Ae=F==null?void 0:F.colors)==null?void 0:Ae.disabledBackground)||"#f8f9fa",hoverBackground:(d==null?void 0:d.hoverBackground)||(($e=F==null?void 0:F.colors)==null?void 0:$e.hoverBackground)||"#e9ecef",borderRadius:(d==null?void 0:d.borderRadius)||((Te=F==null?void 0:F.space)==null?void 0:Te.radius)||"8px",padding:(d==null?void 0:d.padding)||((He=F==null?void 0:F.space)==null?void 0:He.padding)||"1rem",scrollbarTrack:(d==null?void 0:d.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(d==null?void 0:d.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(d==null?void 0:d.scrollbarThumbHover)||"#a8a8a8",...d}},[F,d]),O=Lt(0);O.current+=1,console.log("[Markdownit] render count:",O.current);const[A,P]=Ot([]),[T,_]=Ot({start:0,end:10}),[M,q]=Ot(0),[L,Y]=Ot(0),[V,z]=Ot(!1),[K,X]=Ot(!1),[W,J]=Ot(!1),R=Lt(null),ie=Lt(null),me=Lt(null),xe=Ct(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);er(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(xe)?xe.length:"n/a"),P(xe)},[xe]);const ge=Ct(()=>t?`${A.length*r}px`:"auto",[A.length,r,t]),ae=Ct(()=>{if(!t)return A;const ce=Math.max(0,T.start-n),Ce=Math.min(A.length,T.end+n);return A.slice(ce,Ce).map((we,Se)=>({...we,virtualIndex:ce+Se}))},[A,T,t,n]),ke=St(ce=>{const{scrollTop:Ce,scrollHeight:we,clientHeight:Se}=ce.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:Ce,scrollHeight:we,clientHeight:Se});const Ee=!t&&!v&&!g&&!b&&!o;if(console.log("[Markdownit] passiveOnly:",Ee),Ee||q(Ae=>Ae!==Ce?(console.log("[Markdownit] setScrollTop:",Ce),Ce):Ae),t&&!Ee){const Ae=Math.floor(Ce/r),$e=Math.min(A.length,Ae+Math.ceil(L/r)+1);_(Te=>Te.start!==Ae||Te.end!==$e?(console.log("[Markdownit] setVisibleRange:",{start:Ae,end:$e}),{start:Ae,end:$e}):Te)}if(!Ee){const Ae=Ce<=10;Ae!==K&&(console.log("[Markdownit] isAtTop ->",Ae),X(Ae),Ae&&g&&(console.log("[Markdownit] onScrollToTop callback"),g()))}if(!Ee){const Ae=Ce+Se>=we-10;Ae!==W&&(console.log("[Markdownit] isAtBottom ->",Ae),J(Ae),Ae&&b&&(console.log("[Markdownit] onScrollToBottom callback"),b()))}v&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:Ce,scrollHeight:we}),v(Ce,we)),o&&a&&!V&&!u&&we-Ce-L<100&&Z()},[t,r,A.length,L,o,a,V,u,K,W,g,b,v]),Z=St(async()=>{if(!(!a||V||u)){z(!0);try{const ce=A[A.length-1],Ce=await a(ce.id);P(we=>[...we,...Ce])}catch(ce){console.error("Failed to load more segments:",ce)}finally{z(!1)}}},[a,A,V,u]);er(()=>{const ce=()=>{R.current&&Y(R.current.clientHeight)};return ce(),window.addEventListener("resize",ce),()=>window.removeEventListener("resize",ce)},[]);const he=St((ce,Ce)=>{const we={type:ce.type,content:ce.content},Se=t?{position:"absolute",top:`${(ce.virtualIndex||Ce)*r}px`,left:0,right:0,height:`${r}px`}:{};return U.jsx("div",{style:Se,onClick:()=>x==null?void 0:x(ce.id,ce),className:x?"cursor-pointer hover:bg-gray-50":"",children:U.jsx(cl,{dataSource:we,isEditing:!1,size:l,basePath:f,theme:B,onChange:p,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},ce.id)},[t,r,B,p,x]),se=()=>(console.log("[Markdownit] renderContent segments.len:",A.length,"enableVirtualScroll:",t),A.length===0?U.jsxs(mE,{theme:B,children:[U.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),U.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?U.jsx("div",{ref:me,style:{height:ge,position:"relative"},children:ae.map(he)}):U.jsx("div",{ref:me,children:A.map(he)})),te=()=>!V&&!u?null:U.jsx(pE,{theme:B,children:u?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return U.jsx(fE,{ref:R,theme:B,$isVirtualized:t,className:D,style:{height:S,...m},children:t?U.jsx(hE,{ref:ie,theme:B,onScroll:ke,children:U.jsx(ep,{theme:B,height:ge,children:se()})}):U.jsxs(ep,{theme:B,onScroll:ke,children:[se(),te()]})})},BE=e=>{const{onRendered:t}=e;return er(()=>{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]),U.jsx("div",{"data-markdownit-root":"1",children:U.jsx(gE,{...e})})};Ve.div`
|
|
1981
|
-
background: #f6f8fa;
|
|
1982
|
-
border: 1px solid #d0d7de;
|
|
1983
|
-
border-radius: 6px;
|
|
1984
|
-
padding: 16px;
|
|
1985
|
-
margin-bottom: 20px;
|
|
1986
|
-
`;Ve.p`
|
|
1987
|
-
margin: 0 0 16px 0;
|
|
1988
|
-
color: #656d76;
|
|
1989
|
-
font-size: 14px;
|
|
1990
|
-
line-height: 1.5;
|
|
1991
|
-
`;const tp=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 u=o[0],l=o[1]||"",f=(o[2]||"").trim(),d=o.index,p=d+u.length;if(d>n){const S=e.slice(n,d);S.trim()!==""&&(r.push({text:S}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:S}))}const v=S=>{const F=new RegExp(`${S}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
1992
|
-
])*?)\\1`,"i"),B=l.match(F);return B?B[2]:void 0},g=/\S/.test(l),b=v("key"),x=v("placeholder"),D=b||`template-${Date.now()}-${a++}`,m={type:"template",key:D,placeholder:g?x||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":f||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:g?f:"",style:"blue",fieldId:D,children:[{text:""}],inline:!0};r.push(m),console.log("\u6DFB\u52A0template\u5143\u7D20:",m),n=p}if(n<e.length){const u=e.slice(n);u.trim()!==""&&(r.push({text:u}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:u}))}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)},Iu=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||"",u=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",l=o.value||"",f=` key="${String(a)}" placeholder="${String(u)}"`;r+=`<template${f}>${l}</template>`,n=l||u}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},vE=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},bE=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\`\`\`
|
|
1993
|
-
${n.value||n.placeholder}\`\`\`
|
|
1994
|
-
\`\`\`
|
|
1995
|
-
`)}),r},yE=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",u=n.value||"",l=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${l}>${u}</template>`}}),r},FE=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var b,x,D,m,S,F,B,O,A,P,T,_,M,q,L,Y,V,z,K,X,W,J,R,ie,me,xe,ge,ae,ke,Z,he,se,te,ce,Ce,we,Se,Ee,Ae,$e,Te,He,pt,at,Me,Le,Xe,ft,it,et,$t,Dt;const a=Hs(),u={theme:{colors:{primary:((b=a==null?void 0:a.colors)==null?void 0:b.primary)||"#055AFF",secondary:((x=a==null?void 0:a.colors)==null?void 0:x.secondary)||"#84ADFF",background:((D=a==null?void 0:a.colors)==null?void 0:D.background)||"#E5EEFF",text:((m=a==null?void 0:a.colors)==null?void 0:m.text)||"#055AFF",border:((S=a==null?void 0:a.colors)==null?void 0:S.border)||"#84ADFF",success:((F=a==null?void 0:a.colors)==null?void 0:F.success)||"#008000",warning:((B=a==null?void 0:a.colors)==null?void 0:B.warning)||"#FFA500",error:((O=a==null?void 0:a.colors)==null?void 0:O.error)||"#FF0000",info:((A=a==null?void 0:a.colors)==null?void 0:A.info)||"#0000FF",disabled:((P=a==null?void 0:a.colors)==null?void 0:P.disabled)||"#808080",disabledBackground:((T=a==null?void 0:a.colors)==null?void 0:T.disabledBackground)||"#F5F5F5",disabledText:((_=a==null?void 0:a.colors)==null?void 0:_.disabledText)||"#808080",shadow:((M=a==null?void 0:a.colors)==null?void 0:M.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((q=a==null?void 0:a.colors)==null?void 0:q.appBackground)||"transparent",listBackground:((L=a==null?void 0:a.colors)==null?void 0:L.listBackground)||"#f9f9f9",dashboardBackground:((Y=a==null?void 0:a.colors)==null?void 0:Y.dashboardBackground)||"#ffffff",textSecondary:((V=a==null?void 0:a.colors)==null?void 0:V.textSecondary)||"#6b7280"},space:{sidebar:((z=a==null?void 0:a.space)==null?void 0:z.sidebar)||"260px",size:((K=a==null?void 0:a.space)==null?void 0:K.size)||"12px",radius:((X=a==null?void 0:a.space)==null?void 0:X.radius)||"6px",padding:((W=a==null?void 0:a.space)==null?void 0:W.padding)||"16px",margin:((J=a==null?void 0:a.space)==null?void 0:J.margin)||"20px",shadow:((R=a==null?void 0:a.space)==null?void 0:R.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((ie=a==null?void 0:a.space)==null?void 0:ie.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((xe=(me=a==null?void 0:a.fonts)==null?void 0:me.body)==null?void 0:xe.size)||"14px",weight:((ae=(ge=a==null?void 0:a.fonts)==null?void 0:ge.body)==null?void 0:ae.weight)||"normal",family:((Z=(ke=a==null?void 0:a.fonts)==null?void 0:ke.body)==null?void 0:Z.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((se=(he=a==null?void 0:a.fonts)==null?void 0:he.heading)==null?void 0:se.size)||"16px",weight:((ce=(te=a==null?void 0:a.fonts)==null?void 0:te.heading)==null?void 0:ce.weight)||"600",family:((we=(Ce=a==null?void 0:a.fonts)==null?void 0:Ce.heading)==null?void 0:we.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"},l={backgroundColor:((Ee=a==null?void 0:a.colors)==null?void 0:Ee.background)||"#E5EEFF",borderColor:((Ae=a==null?void 0:a.colors)==null?void 0:Ae.border)||"#84ADFF",borderRadius:(($e=a==null?void 0:a.space)==null?void 0:$e.radius)||"6px",padding:((Te=a==null?void 0:a.space)==null?void 0:Te.padding)||"8px 12px",margin:"2px",fontSize:((pt=(He=a==null?void 0:a.fonts)==null?void 0:He.body)==null?void 0:pt.size)||"14px",fontWeight:((Me=(at=a==null?void 0:a.fonts)==null?void 0:at.body)==null?void 0:Me.weight)||"500",minWidth:"30px",textColor:((Le=a==null?void 0:a.colors)==null?void 0:Le.text)||"#84ADFF"},f={...u,...n,theme:{...u.theme,...n==null?void 0:n.theme,colors:{...(Xe=u.theme)==null?void 0:Xe.colors,...(ft=n==null?void 0:n.theme)==null?void 0:ft.colors},space:{...(it=u.theme)==null?void 0:it.space,...(et=n==null?void 0:n.theme)==null?void 0:et.space},fonts:{...($t=u.theme)==null?void 0:$t.fonts,...(Dt=n==null?void 0:n.theme)==null?void 0:Dt.fonts}},templateField:{...l,...n==null?void 0:n.templateField}},[d,p]=Ot(()=>tp(e));er(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const vt=tp(e);console.log("\u65B0\u7684Slate\u6570\u636E:",vt),p(vt)},[e]),er(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",d)},[d]);const v=St((vt,ht)=>{if(ht===pi.SLATE&&vt){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",vt),p(vt);const Pe=Iu(vt);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Pe),t==null||t(Pe)}},[t]),g=St(vt=>{if(!d||d.length===0)return"";switch(vt){case"pure_string":return vE(d);case"string":return Iu(d);case"markdown":return bE(d);case"html":return yE(d);default:return Iu(d)}},[d]);return er(()=>{o==null||o(g)},[g,o]),U.jsx(cl,{dataSource:{type:pi.SLATE,content:d},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:v,size:"md",styles:f,enableTemplateInput:!0})};export{G0 as D,ho as F,FE as N,BE as O,sc as T,SE as U,AE as a,pi as e};
|