@gientech/modual 2.1.6 → 2.1.8
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-BNmU0LBA.js → GientechStreamReader-CHyow0Od.js} +2 -2
- package/assets/index-D8S_Q_-4.js +1588 -0
- package/assets/{index-DpPJXfkL.js → index-DDz1HJaH.js} +1 -1
- package/assets/{index-CylvlTze.js → index-DFiwWPxk.js} +1 -1
- package/assets/index-DzFAvwdY.js +1290 -0
- package/assets/style.css +1 -1
- package/chat.d.ts +2 -1
- package/chat.js +116 -116
- package/database.js +1 -1
- package/databaseId.js +1 -1
- package/databaseTable.js +1 -1
- package/index.d.ts +2 -1
- package/index.js +1 -1
- package/modelManage.js +1 -1
- package/package.json +1 -1
- package/sensitive.js +1 -1
- package/streamFilesReader.js +1 -1
- package/assets/index-CSTEY8Na.js +0 -1712
- package/assets/index-KS1Q_mqd.js +0 -1290
|
@@ -0,0 +1,1588 @@
|
|
|
1
|
+
import*as C from"react";import je,{useState as Ot,useCallback as kt,useImperativeHandle as T0,forwardRef as $o,useMemo as wt,useRef as Lt,createContext as uo,useContext as No,useEffect as er,createElement as ds,useLayoutEffect as X4,useReducer as Y4,Component as G4,memo as J4}from"react";import Pu,{flushSync as Z4,unstable_batchedUpdates as Q4,createPortal as e2}from"react-dom";import{R as rp,N as jo}from"./index-DzFAvwdY.js";import{aS as Bn,bB as t2,aB as np,M as Pr,V as op,bC as O0,bD as fs,y as gr,H as pt,f as tt,aR as ap,A as yt,L as $e,bE as M0,bF as ko,J as ze,_ as zt,aU as ip,a5 as so,G as Xn,z as sp,aC as co,bG as lp,bH as up,aX as cp,aW as dp,aY as Wa,t as js,p as R0,ad as Cn,ac as en,l as fo,o as pa,T as hs,bI as r2,X as n2,k as Je,af as fp,bj as I0,g as mi,m as Vo,bJ as hp,bd as ps,$ as P0,aJ as zu,r as gi,b7 as gn,bK as o2,W as _s,aq as In,as as vi,bL as pp,bg as a2,bf as i2,bi as s2,bh as l2,a0 as u2,be as qd,U as Vd,a3 as c2,a2 as d2,ax as Ls,am as z0,bM as f2,Y as h2,bs as p2,bn as m2,B as ms,P as g2,aG as v2,bN as b2,bO as y2,ay as x2,Z as gs,u as w2,an as C2,bP as D2,N as Bo,bQ as j0,aV as _0,bR as Wd,bS as L0,bT as Ud,bU as Xd,E as vs,bV as mp,a9 as bs,bW as E2,bx as Gt,bX as S2,K as k2,at as B2,a_ as A2,bY as F2,bZ as $2,v as gp,bz as Yd,b_ as N2,w as T2,aN as O2,s as M2,D as R2,aK as I2,c as Hs}from"./index-BRq6VK9v.js";import{R as ys,a as xs,S as vp,P as bp}from"./index-B3zi0w0x.js";import{S as P2}from"./index-DNMf-zgr.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?Bn(f):typeof n=="function"&&n()};Bn(f)}const L2=e=>{const[t,r]=Ot(null);return[kt((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)=>T0(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},V2=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 W2(e,t){return!Array.isArray(e)&&t!==void 0?V2(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&&Bn(f,3),function(){window.removeEventListener("keydown",d),u.current=!1}):function(){u.current=!1}},[t])}var G2=$o(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=wt(function(){var l;return typeof r=="function"?l=r():l=r,l},[r]),u=op(t,O0(a));return je.createElement(je.Fragment,null,n&&je.createElement("div",{className:"".concat(o,"-arrow")}),je.cloneElement(a,{ref:fs(a)?u:void 0}))}),ea={adjustX:1,adjustY:1},ta=[0,0],J2={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}},Z2=["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?J2:g,x=e.getPopupContainer,D=e.showAction,m=e.hideAction,B=e.overlayClassName,F=e.overlayStyle,A=e.visible,O=e.trigger,k=O===void 0?["hover"]:O,P=e.autoFocus,M=e.overlay,_=e.children,T=e.onVisibleChange,q=gr(e,Z2),L=je.useState(),Y=pt(L,2),W=Y[0],z=Y[1],K="visible"in e?A:W,X=je.useRef(null),V=je.useRef(null),Z=je.useRef(null);je.useImperativeHandle(t,function(){return X.current});var R=function(se){z(se),T==null||T(se)};Y2({visible:K,triggerRef:Z,onVisibleChange:R,autoFocus:P,overlayRef:V});var ie=function(se){var te=e.onOverlayClick;z(!1),te&&te(se)},me=function(){return je.createElement(G2,{ref:V,overlay:M,prefixCls:u,arrow:o})},ye=function(){return typeof M=="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")},Se=je.cloneElement(_,{className:tt((r=_.props)===null||r===void 0?void 0:r.className,K&&ae()),ref:fs(_)?op(Z,O0(_)):void 0}),J=m;return!J&&k.indexOf("contextMenu")!==-1&&(J=["click"]),je.createElement(ap,yt({builtinPlacements:b},q,{prefixCls:u,ref:X,popupClassName:tt(B,$e({},"".concat(u,"-show-arrow"),o)),popupStyle:F,action:k,showAction:D,hideAction:J,popupPlacement:v,popupAlign:d,popupTransitionName:l,popupAnimation:f,popupVisible:K,stretch:ge()?"minWidth":"",popup:ye(),onPopupVisibleChange:R,onPopupClick:ie,getPopupContainer:x}),Se)}const e3=je.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=ze({},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=M0(function(){return n3(o,n)},[o,n],function(u,l){return!r&&(u[0]!==l[0]||!ko(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 Sp=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,Ji=Pr.DOWN,Zi=Pr.ENTER,kp=Pr.ESC,Ra=Pr.HOME,Ia=Pr.END,Jd=[Hu,Ji,_u,Lu];function i3(e,t,r,n){var o,a="prev",u="next",l="children",f="parent";if(e==="inline"&&n===Zi)return{inlineTrigger:!0};var d=$e($e({},Hu,a),Ji,u),p=$e($e($e($e({},_u,r?u:a),Lu,r?a:u),Ji,l),Zi,l),v=$e($e($e($e($e($e({},Hu,a),Ji,u),Zi,l),kp,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 Zd(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(){Bn.cancel(p.current)};return C.useEffect(function(){return function(){g()}},[]),function(b){var x=b.which;if([].concat(Jd,[Zi,kp,Ra,Ia]).includes(x)){var D=a(),m=Ku(D,n),B=m,F=B.elements,A=B.key2element,O=B.element2key,k=A.get(t),P=l3(k,F),M=O.get(P),_=i3(e,u(M,!0).length===1,r,x);if(!_&&x!==Ra&&x!==Ia)return;(Jd.includes(x)||[Ra,Ia].includes(x))&&b.preventDefault();var T=function(V){if(V){var Z=V,R=V.querySelector("a");R!=null&&R.getAttribute("href")&&(Z=R);var ie=O.get(V);l(ie),g(),p.current=Bn(function(){v.current===ie&&Z.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=Zd(q,F,P,_.offset),T(L)}else if(_.inlineTrigger)f(M);else if(_.offset>0)f(M,!0),g(),p.current=Bn(function(){m=Ku(D,n);var X=P.getAttribute("aria-controls"),V=document.getElementById(X),Z=Zd(V,m.elements);T(Z)},5);else if(_.offset<0){var W=u(M,!0),z=W[W.length-2],K=A.get(z);f(z,!1),T(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=pt(e,2),r=t[1],n=Lt(new Map),o=Lt(new Map),a=C.useState([]),u=pt(a,2),l=u[0],f=u[1],d=Lt(0),p=Lt(!1),v=function(){p.current||r({})},g=kt(function(A,O){var k=Qd(O);o.current.set(k,A),n.current.set(A,k),d.current+=1;var P=d.current;c3(function(){P===d.current&&v()})},[]),b=kt(function(A,O){var k=Qd(O);o.current.delete(k),n.current.delete(A)},[]),x=kt(function(A){f(A)},[]),D=kt(function(A,O){var k=n.current.get(A)||"",P=d3(k);return O&&l.includes(P[0])&&P.unshift(qu),P},[l]),m=kt(function(A,O){return A.filter(function(k){return k!==void 0}).some(function(k){var P=D(k,!0);return P.includes(O)})},[D]),B=function(){var O=zt(n.current.keys());return l.length&&O.push(qu),O},F=kt(function(A){var O="".concat(n.current.get(A)).concat(q0),k=new Set;return zt(o.current.keys()).forEach(function(P){P.startsWith(O)&&k.add(o.current.get(P))}),k},[]);return C.useEffect(function(){return function(){p.current=!0}},[]),{registerPath:g,unregisterPath:b,refreshOverflowKeys:x,isSubPathKey:m,getKeyPath:D,getKeys:B,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=pt(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 Bp(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 Ap(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,ze({},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(Wa.Item,yt({},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),B=m.prefixCls,F=m.onItemClick,A=m.disabled,O=m.overflowDisabled,k=m.itemIcon,P=m.selectedKeys,M=m.onActive,_=C.useContext(H0),T=_._internalRenderMenuItem,q="".concat(B,"-item"),L=C.useRef(),Y=C.useRef(),W=A||a,z=sp(t,Y),K=Da(o),X=function(te){return{key:o,keyPath:zt(K).reverse(),item:L.current,domEvent:te}},V=u||k,Z=Bp(o,W,d,p),R=Z.active,ie=gr(Z,b3),me=P.includes(o),ye=Ap(K.length),ge=function(te){if(!W){var ue=X(te);v==null||v(ws(ue)),F(ue)}},ae=function(te){if(g==null||g(te),te.which===Pr.ENTER){var ue=X(te);v==null||v(ws(ue)),F(ue)}},Se=function(te){M(o),b==null||b(te)},J={};e.role==="option"&&(J["aria-selected"]=me);var he=C.createElement(y3,yt({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,J,{component:"li","aria-disabled":a,style:ze(ze({},ye),r),className:tt(q,$e($e($e({},"".concat(q,"-active"),R),"".concat(q,"-selected"),me),"".concat(q,"-disabled"),W),n),onClick:ge,onKeyDown:ae,onFocus:Se}),l,C.createElement(Fp,{props:ze(ze({},e),{},{isSelected:me}),icon:V}));return T&&(he=T(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,yt({},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",yt({className:tt(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)},V0=C.forwardRef(D3);V0.displayName="SubMenuList";function W0(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 Zr={adjustX:1,adjustY:1},E3={topLeft:{points:["bl","tl"],overflow:Zr},topRight:{points:["br","tr"],overflow:Zr},bottomLeft:{points:["tl","bl"],overflow:Zr},bottomRight:{points:["tr","br"],overflow:Zr},leftTop:{points:["tr","tl"],overflow:Zr},leftBottom:{points:["br","bl"],overflow:Zr},rightTop:{points:["tl","tr"],overflow:Zr},rightBottom:{points:["bl","br"],overflow:Zr}},S3={topLeft:{points:["bl","tl"],overflow:Zr},topRight:{points:["br","tr"],overflow:Zr},bottomLeft:{points:["tl","bl"],overflow:Zr},bottomRight:{points:["tr","br"],overflow:Zr},rightTop:{points:["tr","tl"],overflow:Zr},rightBottom:{points:["br","bl"],overflow:Zr},leftTop:{points:["tl","tr"],overflow:Zr},leftBottom:{points:["bl","br"],overflow:Zr}};function $p(e,t,r){if(t)return t;if(r)return r[e]||r.other}var k3={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function B3(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,B=v.triggerSubMenuAction,F=v.forceSubMenuRender,A=v.rootClassName,O=v.motion,k=v.defaultMotions,P=C.useState(!1),M=pt(P,2),_=M[0],T=M[1],q=b?ze(ze({},S3),m):ze(ze({},E3),m),L=k3[d],Y=$p(d,O,k),W=C.useRef(Y);d!=="inline"&&(W.current=Y);var z=ze(ze({},W.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),K=C.useRef();return C.useEffect(function(){return K.current=Bn(function(){T(r)}),function(){Bn.cancel(K.current)}},[r]),C.createElement(ap,{prefixCls:t,popupClassName:tt("".concat(t,"-popup"),$e({},"".concat(t,"-rtl"),b),u,A),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:q,popupPlacement:L,popupVisible:_,popup:o,popupStyle:a,popupAlign:l&&{offset:l},action:f?[]:[B],mouseEnterDelay:x,mouseLeaveDelay:D,onPopupVisibleChange:p,forceRender:F,popupMotion:z,fresh:!0},n)}function A3(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=pt(b,2),D=x[0],m=x[1],B=g.current?r:!1;C.useEffect(function(){g.current&&m(!1)},[v]);var F=ze({},$p(a,d,p));n.length>1&&(F.motionAppear=!1);var A=F.onVisibleChanged;return F.onVisibleChanged=function(O){return!g.current&&!O&&m(!0),A==null?void 0:A(O)},D?null:C.createElement(ti,{mode:a,locked:!g.current},C.createElement(R0,yt({visible:B},F,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),function(O){var k=O.className,P=O.style;return C.createElement(V0,{id:t,className:k,style:P},o)}))}var F3=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],$3=["active"],N3=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,B=e.onTitleClick,F=e.onTitleMouseEnter,A=e.onTitleMouseLeave,O=gr(e,F3),k=Cp(a),P=C.useContext(Pn),M=P.prefixCls,_=P.mode,T=P.openKeys,q=P.disabled,L=P.overflowDisabled,Y=P.activeKey,W=P.selectedKeys,z=P.itemIcon,K=P.expandIcon,X=P.onItemClick,V=P.onOpenChange,Z=P.onActive,R=C.useContext(H0),ie=R._internalRenderSubMenuItem,me=C.useContext(Sp),ye=me.isSubPathKey,ge=Da(),ae="".concat(M,"-submenu"),Se=q||u,J=C.useRef(),he=C.useRef(),se=d??z,te=p??K,ue=T.includes(a),Ce=!L&&ue,xe=ye(W,a),ke=Bp(a,Se,F,A),De=ke.active,Be=gr(ke,$3),Ne=C.useState(!1),Me=pt(Ne,2),He=Me[0],ft=Me[1],ot=function(Et){Se||ft(Et)},Oe=function(Et){ot(!0),D==null||D({key:a,domEvent:Et})},_e=function(Et){ot(!1),m==null||m({key:a,domEvent:Et})},We=C.useMemo(function(){return De||(_!=="inline"?He||ye([Y],a):!1)},[_,De,Y,He,a,ye]),ct=Ap(ge.length),at=function(Et){Se||(B==null||B({key:a,domEvent:Et}),_==="inline"&&V(a,!ue))},Qe=La(function(Ft){x==null||x(ws(Ft)),X(Ft)}),Nt=function(Et){_!=="inline"&&V(a,Et)},Ct=function(){Z(a)},mt=k&&"".concat(k,"-popup"),dt=C.useMemo(function(){return C.createElement(Fp,{icon:_!=="horizontal"?te:void 0,props:ze(ze({},e),{},{isOpen:Ce,isSubMenu:!0})},C.createElement("i",{className:"".concat(ae,"-arrow")}))},[_,te,e,Ce,ae]),Pe=C.createElement("div",yt({role:"menuitem",style:ct,className:"".concat(ae,"-title"),tabIndex:Se?null:-1,ref:J,title:typeof o=="string"?o:null,"data-menu-id":L&&k?null:k,"aria-expanded":Ce,"aria-haspopup":!0,"aria-controls":mt,"aria-disabled":Se,onClick:at,onFocus:Ct},Be),o,dt),fe=C.useRef(_);if(_!=="inline"&&ge.length>1?fe.current="vertical":fe.current=_,!L){var gt=fe.current;Pe=C.createElement(B3,{mode:gt,prefixCls:ae,visible:!l&&Ce&&_!=="inline",popupClassName:v,popupOffset:g,popupStyle:b,popup:C.createElement(ti,{mode:gt==="horizontal"?"vertical":gt},C.createElement(V0,{id:mt,ref:he},f)),disabled:Se,onVisibleChange:Nt},Pe)}var St=C.createElement(Wa.Item,yt({ref:t,role:"none"},O,{component:"li",style:r,className:tt(ae,"".concat(ae,"-").concat(_),n,$e($e($e($e({},"".concat(ae,"-open"),Ce),"".concat(ae,"-active"),We),"".concat(ae,"-selected"),xe),"".concat(ae,"-disabled"),Se)),onMouseEnter:Oe,onMouseLeave:_e}),Pe,!L&&C.createElement(A3,{id:mt,open:Ce,keyPath:ge},f));return ie&&(St=ie(St,e,{selected:xe,active:We,open:Ce,disabled:Se})),C.createElement(ti,{onItemClick:Qe,mode:_==="horizontal"?"vertical":_,itemIcon:se,expandIcon:te},St)}),Vs=C.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=Da(r),a=W0(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(N3,yt({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:tt("".concat(o,"-item-divider"),t),style:r})}var T3=["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,T3),u=C.useContext(Pn),l=u.prefixCls,f="".concat(l,"-item-group");return C.createElement("li",yt({ref:t,role:"presentation"},a,{onClick:function(p){return p.stopPropagation()},className:tt(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=W0(n,o),u=Ks();return u?a:C.createElement(O3,yt({ref:t},co(e,["warnKey"])),a)}),M3=["label","children","key","type","extra"];function Vu(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,M3),m=g??"tmp-".concat(f);return v||b==="group"?b==="group"?C.createElement(o,yt({key:m},D,{title:p}),Vu(v,t,r)):C.createElement(a,yt({key:m},D,{title:p}),Vu(v,t,r)):b==="divider"?C.createElement(u,yt({key:m},D)):C.createElement(n,yt({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=ze({divider:U0,item:qs,group:X0,submenu:Vs},n);return t&&(a=Vu(t,u,o)),W0(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"],Mo=[],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,B=n.inlineCollapsed,F=n.disabled,A=n.disabledOverflow,O=n.subMenuOpenDelay,k=O===void 0?.1:O,P=n.subMenuCloseDelay,M=P===void 0?.1:P,_=n.forceSubMenuRender,T=n.defaultOpenKeys,q=n.openKeys,L=n.activeKey,Y=n.defaultActiveFirst,W=n.selectable,z=W===void 0?!0:W,K=n.multiple,X=K===void 0?!1:K,V=n.defaultSelectedKeys,Z=n.selectedKeys,R=n.onSelect,ie=n.onDeselect,me=n.inlineIndent,ye=me===void 0?24:me,ge=n.motion,ae=n.defaultMotions,Se=n.triggerSubMenuAction,J=Se===void 0?"hover":Se,he=n.builtinPlacements,se=n.itemIcon,te=n.expandIcon,ue=n.overflowedIndicator,Ce=ue===void 0?"...":ue,xe=n.overflowedIndicatorPopupClassName,ke=n.getPopupContainer,De=n.onClick,Be=n.onOpenChange,Ne=n.onKeyDown;n.openAnimation,n.openTransitionName;var Me=n._internalRenderMenuItem,He=n._internalRenderSubMenuItem,ft=n._internalComponents,ot=gr(n,R3),Oe=C.useMemo(function(){return[tf(g,v,Mo,ft,a),tf(g,v,Mo,{},a)]},[g,v,ft]),_e=pt(Oe,2),We=_e[0],ct=_e[1],at=C.useState(!1),Qe=pt(at,2),Nt=Qe[0],Ct=Qe[1],mt=C.useRef(),dt=p3(x),Pe=b==="rtl",fe=so(T,{value:q,postState:function(Qt){return Qt||Mo}}),gt=pt(fe,2),St=gt[0],Ft=gt[1],Et=function(Qt){var cr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Vr(){Ft(Qt),Be==null||Be(Qt)}cr?Z4(Vr):Vr()},or=C.useState(St),Bt=pt(or,2),Rt=Bt[0],tr=Bt[1],ur=C.useRef(!1),At=C.useMemo(function(){return(m==="inline"||m==="vertical")&&B?["vertical",B]:[m,!1]},[m,B]),Ht=pt(At,2),jt=Ht[0],Cr=Ht[1],zr=jt==="inline",jr=C.useState(jt),Mr=pt(jr,2),vr=Mr[0],pr=Mr[1],_t=C.useState(Cr),w=pt(_t,2),E=w[0],Ie=w[1];C.useEffect(function(){pr(jt),Ie(Cr),ur.current&&(zr?Ft(Rt):Et(Mo))},[jt,Cr]);var N=C.useState(0),Q=pt(N,2),Jt=Q[0],rt=Q[1],Ke=Jt>=We.length-1||vr!=="horizontal"||A;C.useEffect(function(){zr&&tr(St)},[St]),C.useEffect(function(){return ur.current=!0,function(){ur.current=!1}},[]);var xt=f3(),et=xt.registerPath,Tt=xt.unregisterPath,ar=xt.refreshOverflowKeys,Nr=xt.isSubPathKey,ee=xt.getKeyPath,br=xt.getKeys,oe=xt.getSubPathKeys,ce=C.useMemo(function(){return{registerPath:et,unregisterPath:Tt}},[et,Tt]),Te=C.useMemo(function(){return{isSubPathKey:Nr}},[Nr]);C.useEffect(function(){ar(Ke?Mo:We.slice(Jt+1).map(function(yr){return yr.key}))},[Jt,Ke]);var st=so(L||Y&&((r=We[0])===null||r===void 0?void 0:r.key),{value:L}),Le=pt(st,2),de=Le[0],Ue=Le[1],Ve=La(function(yr){Ue(yr)}),lt=La(function(){Ue(void 0)});T0(t,function(){return{list:mt.current,focus:function(Qt){var cr,Vr=br(),_r=Ku(Vr,dt),Yn=_r.elements,Oo=_r.key2element,Gn=_r.element2key,Jn=K0(mt.current,Yn),po=de??(Jn[0]?Gn.get(Jn[0]):(cr=We.find(function($n){return!$n.props.disabled}))===null||cr===void 0?void 0:cr.key),ve=Oo.get(po);if(po&&ve){var dr;ve==null||(dr=ve.focus)===null||dr===void 0||dr.call(ve,Qt)}}}});var le=so(V||[],{value:Z,postState:function(Qt){return Array.isArray(Qt)?Qt:Qt==null?Mo:[Qt]}}),we=pt(le,2),Ee=we[0],Ge=we[1],vt=function(Qt){if(z){var cr=Qt.key,Vr=Ee.includes(cr),_r;X?Vr?_r=Ee.filter(function(Oo){return Oo!==cr}):_r=[].concat(zt(Ee),[cr]):_r=[cr],Ge(_r);var Yn=ze(ze({},Qt),{},{selectedKeys:_r});Vr?ie==null||ie(Yn):R==null||R(Yn)}!X&&St.length&&vr!=="inline"&&Et(Mo)},Wt=La(function(yr){De==null||De(ws(yr)),vt(yr)}),Mt=La(function(yr,Qt){var cr=St.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)})}ko(St,cr,!0)||Et(cr,!0)}),ut=function(Qt,cr){var Vr=cr??!St.includes(Qt);Mt(Qt,Vr)},qt=u3(vr,de,Pe,dt,mt,br,ee,Ue,ut,Ne);C.useEffect(function(){Ct(!0)},[]);var Jr=C.useMemo(function(){return{_internalRenderMenuItem:Me,_internalRenderSubMenuItem:He}},[Me,He]),Br=vr!=="horizontal"||A?We:We.map(function(yr,Qt){return C.createElement(ti,{key:yr.key,overflowDisabled:Qt>Jt},yr)}),dn=C.createElement(Wa,yt({id:x,ref:mt,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:qs,className:tt(a,"".concat(a,"-root"),"".concat(a,"-").concat(vr),f,$e($e({},"".concat(a,"-inline-collapsed"),E),"".concat(a,"-rtl"),Pe),u),dir:b,style:l,role:"menu",tabIndex:p,data:Br,renderRawItem:function(Qt){return Qt},renderRawRest:function(Qt){var cr=Qt.length,Vr=cr?We.slice(-cr):null;return C.createElement(Vs,{eventKey:qu,title:Ce,disabled:Ke,internalPopupClose:cr===0,popupClassName:xe},Vr)},maxCount:vr!=="horizontal"||A?Wa.INVALIDATE:Wa.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Qt){rt(Qt)},onKeyDown:qt},ot));return C.createElement(H0.Provider,{value:Jr},C.createElement(xp.Provider,{value:dt},C.createElement(ti,{prefixCls:a,rootClassName:u,mode:vr,openKeys:St,rtl:Pe,disabled:F,motion:Nt?ge:null,defaultMotions:Nt?ae:null,activeKey:de,onActive:Ve,onInactive:lt,selectedKeys:Ee,inlineIndent:ye,subMenuOpenDelay:k,subMenuCloseDelay:M,forceSubMenuRender:_,builtinPlacements:he,triggerSubMenuAction:J,getPopupContainer:ke,itemIcon:se,expandIcon:te,onItemClick:Wt,onOpenChange:Mt},C.createElement(Sp.Provider,{value:Te},dn),C.createElement("div",{style:{display:"none"},"aria-hidden":!0},C.createElement(Dp.Provider,{value:ce},ct)))))}),bi=I3;bi.Item=qs;bi.SubMenu=Vs;bi.ItemGroup=X0;bi.Divider=U0;const Np=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(en,yt({},t,{ref:r,icon:P3}))},Tp=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=tt({[`${u}-item-divider-dashed`]:!!n},r);return C.createElement(U0,Object.assign({className:l},o))},Mp=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=A=>{const O=n==null?void 0:n[0],k=C.createElement("span",{className:tt(`${f}-title-content`,{[`${f}-title-content-with-extra`]:!!l||l===0})},n);return(!o||C.isValidElement(n)&&n.type==="span")&&n&&A&&d&&typeof O=="string"?C.createElement("div",{className:`${f}-inline-collapsed-noicon`},O.charAt(0)):k},{siderCollapsed:x}=C.useContext(Np);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 B=js(n).length;let F=C.createElement(qs,Object.assign({},co(e,["title","icon","danger"]),{className:tt({[`${f}-item-danger`]:u,[`${f}-item-only-child`]:(o?B+1:B)===1},r),title:typeof a=="string"?a:void 0}),pa(o,{className:tt(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:B,itemHoverColor:F,lineType:A,colorSplit:O,itemDisabledColor:k,dangerItemColor:P,dangerItemHoverColor:M,dangerItemSelectedColor:_,dangerItemActiveBg:T,dangerItemSelectedBg:q,popupBg:L,itemHoverBg:Y,itemActiveBg:W,menuSubMenuBg:z,horizontalItemSelectedColor:K,horizontalItemSelectedBg:X,horizontalItemBorderRadius:V,horizontalItemHoverBg:Z}=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:`${k} !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:W}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:Y},"&:active":{backgroundColor:W}}},[`${r}-item-danger`]:{color:P,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:M}},[`&${r}-item:active`]:{background:T}},[`${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:V,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${Je(p)} solid transparent`,transition:`border-color ${b} ${x}`,content:'""'},"&:hover, &-active, &-open":{background:Z,"&::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)} ${A} ${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 ${B} ${D}`,`opacity ${B} ${D}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:_}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${B} ${x}`,`opacity ${B} ${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,B={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`]:B,[`& ${t}-item-group-title`]:{paddingInlineStart:f}},[`${t}-item`]:B}},{[`${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:B,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:B,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"}}}]},V3=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:B,lineHeight:F,colorBgElevated:A,marginXXS:O,padding:k,fontSize:P,controlHeightSM:M,fontSizeLG:_,colorTextLightSolid:T,colorErrorHover:q}=e,L=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,Y=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:b,W=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,z=new gn(T).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:W,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:B,groupTitleLineHeight:F,collapsedWidth:B*2,popupBg:A,itemMarginBlock:O,itemPaddingInline:k,horizontalLineHeight:`${B*1.15}px`,iconSize:P,iconMarginInlineEnd:M-P,collapsedIconSize:_,groupTitleFontSize:P,darkItemDisabledColor:new gn(T).setA(.25).toRgbString(),darkItemColor:z,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:T,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:z,darkItemHoverColor:T,darkDangerItemHoverColor:q,darkDangerItemSelectedColor:T,darkDangerItemActiveBg:a,itemWidth:L?`calc(100% + ${Y}px)`:`calc(100% - ${W*2}px)`}},W3=(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:B,darkItemDisabledColor:F,darkDangerItemHoverColor:A,darkDangerItemSelectedColor:O,darkDangerItemActiveBg:k,popupBg:P,darkPopupBg:M}=o,_=o.calc(l).div(7).mul(5).equal(),T=Vo(o,{menuArrowSize:_,menuHorizontalHeight:o.calc(u).mul(1.15).equal(),menuArrowOffset:o.calc(_).mul(.25).equal(),menuSubMenuBg:a,calc:o.calc,popupBg:P}),q=Vo(T,{itemColor:f,itemHoverColor:B,groupTitleColor:m,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:p,popupBg:M,subMenuItemBg:v,itemActiveBg:"transparent",itemSelectedBg:b,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:D,itemDisabledColor:F,dangerItemColor:d,dangerItemHoverColor:A,dangerItemSelectedColor:O,dangerItemActiveBg:k,dangerItemSelectedBg:x,menuSubMenuBg:v,horizontalItemSelectedColor:g,horizontalItemSelectedBg:b});return[q3(T),L3(T),K3(T),nf(T,"light"),nf(q,"dark"),H3(T),hp(T),ps(T,"slide-up"),ps(T,"slide-down"),P0(T,"zoom-big")]},V3,{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:tt(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(Vs,Object.assign({},co(e,["icon"]),{title:v,popupClassName:tt(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:Mp,submenu:Ip,divider:Op},Y3=$o((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:B,rootClassName:F,mode:A,selectable:O,onClick:k,overflowedIndicatorPopupClassName:P}=e,M=U3(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),_=co(M,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:A});const T=In((...ye)=>{var ge;k==null||k.apply(void 0,ye),(ge=o.onClick)===null||ge===void 0||ge.call(o)}),q=o.mode||A,L=O??o.selectable,Y=m??B,W={horizontal:{motionName:`${d}-slide-up`},inline:pp(d),other:{motionName:`${d}-zoom-big`}},z=a("menu",p||o.prefixCls),K=vi(z),[X,V,Z]=W3(z,K,!n),R=tt(`${z}-${b}`,f==null?void 0:f.className,v),ie=C.useMemo(()=>{var ye,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=(ye=x??(o==null?void 0:o.expandIcon))!==null&&ye!==void 0?ye:f==null?void 0:f.expandIcon;return pa(ae,{className:tt(`${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(Tp,null),overflowedIndicatorPopupClassName:tt(z,`${z}-${b}`,P),mode:q,selectable:L,onClick:T},_,{inlineCollapsed:Y,style:Object.assign(Object.assign({},f==null?void 0:f.style),g),className:R,prefixCls:z,direction:l,defaultMotions:W,expandIcon:ie,ref:t,rootClassName:tt(F,V,o.rootClassName,Z,K),_internalComponents:X3})))))}),Ea=$o((e,t)=>{const r=Lt(null),n=C.useContext(Np);return T0(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=Mp;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}}}}}},J3=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},Vd(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}},Vd(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")]]},Z3=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=Vo(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[J3(a),G3(a)]},Z3,{resetStyle:!1}),Ws=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:B,mouseEnterDelay:F=.15,mouseLeaveDelay:A=.1,autoAdjustOverflow:O=!0,placement:k="",overlay:P,transitionName:M,destroyOnHidden:_,destroyPopupOnHide:T}=e,{getPopupContainer:q,getPrefixCls:L,direction:Y,dropdown:W}=C.useContext(fo),z=d||f;Ls();const K=C.useMemo(()=>{const Me=L();return M!==void 0?M:k.includes("top")?`${Me}-slide-down`:`${Me}-slide-up`},[L,k,M]),X=C.useMemo(()=>k?k.includes("Center")?k.slice(0,k.indexOf("Center")):k:Y==="rtl"?"bottomRight":"bottomLeft",[k,Y]),V=L("dropdown",o),Z=vi(V),[R,ie,me]=Q3(V,Z),[,ye]=z0(),ge=C.Children.only(t3(a)?C.createElement("span",null,a):a),ae=pa(ge,{className:tt(`${V}-trigger`,{[`${V}-rtl`]:Y==="rtl"},ge.props.className),disabled:(t=ge.props.disabled)!==null&&t!==void 0?t:l}),Se=l?[]:u,J=!!(Se!=null&&Se.includes("contextMenu")),[he,se]=so(!1,{value:x??m}),te=In(Me=>{D==null||D(Me,{source:"trigger"}),B==null||B(Me),se(Me)}),ue=tt(v,g,ie,me,Z,W==null?void 0:W.className,{[`${V}-rtl`]:Y==="rtl"}),Ce=f2({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:O,offset:ye.marginXXS,arrowWidth:n?ye.sizePopupArrow:0,borderRadius:ye.borderRadius}),xe=In(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(D==null||D(!1,{source:"menu"}),se(!1))}),ke=()=>{let Me;return r!=null&&r.items?Me=C.createElement(Ea,Object.assign({},r)):typeof P=="function"?Me=P():Me=P,z&&(Me=z(Me)),Me=C.Children.only(typeof Me=="string"?C.createElement("span",null,Me):Me),C.createElement(Rp,{prefixCls:`${V}-menu`,rootClassName:tt(me,Z),expandIcon:C.createElement("span",{className:`${V}-menu-submenu-arrow`},Y==="rtl"?C.createElement(ys,{className:`${V}-menu-submenu-arrow-icon`}):C.createElement(xs,{className:`${V}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:xe,validator:({mode:He})=>{}},Me)},[De,Be]=_s("Dropdown",b==null?void 0:b.zIndex);let Ne=C.createElement(e3,Object.assign({alignPoint:J},co(e,["rootClassName"]),{mouseEnterDelay:F,mouseLeaveDelay:A,visible:he,builtinPlacements:Ce,arrow:!!n,overlayClassName:ue,prefixCls:V,getPopupContainer:p||q,transitionName:K,trigger:Se,overlay:ke,placement:X,onVisibleChange:te,overlayStyle:Object.assign(Object.assign(Object.assign({},W==null?void 0:W.style),b),{zIndex:De}),autoDestroy:_??T}),ae);return De&&(Ne=C.createElement(h2.Provider,{value:Be},Ne)),R(Ne)},ev=p2(Ws,"align",void 0,"dropdown",e=>e),tv=e=>C.createElement(ev,Object.assign({},e),C.createElement("span",null));Ws._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=ze({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,B=0;B<o.length;B+=1){var F=o[B];if(g[F]!==void 0){m=g[F];break}}var A=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(A),t===!0||l.has(D)?A.children=d(g[u]||[],A):A.children=[],A})}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,B){var F=x?x[v]:e,A=x?Pp(m.pos,D):"0",O=x?[].concat(zt(B),[x]):[];if(x){var k=g(x,A),P={node:x,index:D,pos:A,key:k,parentPos:m.node?m.pos:null,level:m.level+1,nodes:O};t(P)}F&&F.forEach(function(M,_){b(M,_,{node:x,pos:A,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,B=b.key,F=b.parentPos,A=b.level,O=b.nodes,k={node:x,nodes:O,index:D,key:B,pos:m,level:A},P=yi(B,m);p[m]=k,v[P]=k,k.parent=p[F],k.parent&&(k.parent.children=k.parent.children||[],k.parent.children.push(k)),n&&n(k,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=ze(ze({},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 B=m.key,F=o.has(B);x&&!F&&(x=!1),!D&&(F||a.has(B))&&(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(B){return!o(B.node)}).forEach(function(B){a.delete(B.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(B){return!o(B.node)}).forEach(function(B){var F=B.key,A=a.has(F);D&&!A&&(D=!1),!m&&(A||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:B,align:F,open:A,onOpenChange:O,placement:k,getPopupContainer:P,href:M,icon:_=C.createElement(Tp,null),title:T,buttonsRender:q=Ce=>Ce,mouseEnterDelay:L,mouseLeaveDelay:Y,overlayClassName:W,overlayStyle:z,destroyOnHidden:K,destroyPopupOnHide:X,dropdownRender:V,popupRender:Z}=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?[]:B,onOpenChange:O,getPopupContainer:P||t,mouseEnterDelay:L,mouseLeaveDelay:Y,overlayClassName:W,overlayStyle:z,destroyOnHidden:K,popupRender:Z||V},{compactSize:ae,compactItemClassnames:Se}=m2(ie,n),J=tt(me,Se,g);"destroyPopupOnHide"in e&&(ge.destroyPopupOnHide=X),"overlay"in e&&(ge.overlay=m),"open"in e&&(ge.open=A),"placement"in e?ge.placement=k:ge.placement=n==="rtl"?"bottomLeft":"bottomRight";const he=C.createElement(ms,{type:a,danger:u,disabled:l,loading:f,onClick:d,htmlType:p,href:M,title:T},v),se=C.createElement(ms,{type:a,danger:u,icon:_}),[te,ue]=q([he,se]);return C.createElement(P2.Compact,Object.assign({className:J,size:ae,block:!0},R),te,C.createElement(Ws,Object.assign({},ge),ue))};_p.__ANT_BUTTON=!0;const G0=Ws;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,B=t.closeIcon,F=t.onActive,A=t.onClose,O=t.onZoomIn,k=t.onZoomOut,P=t.onRotateRight,M=t.onRotateLeft,_=t.onFlipX,T=t.onFlipY,q=t.onReset,L=t.toolbarRender,Y=t.zIndex,W=t.image,z=No(xi),K=l.rotateLeft,X=l.rotateRight,V=l.zoomIn,Z=l.zoomOut,R=l.close,ie=l.left,me=l.right,ye=l.flipX,ge=l.flipY,ae="".concat(a,"-operations-operation");C.useEffect(function(){var Ne=function(He){He.keyCode===Pr.ESC&&A()};return r&&window.addEventListener("keydown",Ne),function(){window.removeEventListener("keydown",Ne)}},[r]);var Se=function(Me,He){Me.preventDefault(),Me.stopPropagation(),F(He)},J=C.useCallback(function(Ne){var Me=Ne.type,He=Ne.disabled,ft=Ne.onClick,ot=Ne.icon;return C.createElement("div",{key:Me,className:tt(ae,"".concat(a,"-operations-operation-").concat(Me),$e({},"".concat(a,"-operations-operation-disabled"),!!He)),onClick:ft},ot)},[ae,a]),he=d?J({icon:ie,onClick:function(Me){return Se(Me,-1)},type:"prev",disabled:v===0}):void 0,se=d?J({icon:me,onClick:function(Me){return Se(Me,1)},type:"next",disabled:v===b-1}):void 0,te=J({icon:ge,onClick:T,type:"flipY"}),ue=J({icon:ye,onClick:_,type:"flipX"}),Ce=J({icon:K,onClick:M,type:"rotateLeft"}),xe=J({icon:X,onClick:P,type:"rotateRight"}),ke=J({icon:Z,onClick:k,type:"zoomOut",disabled:x<=D}),De=J({icon:V,onClick:O,type:"zoomIn",disabled:x===m}),Be=C.createElement("div",{className:"".concat(a,"-operations")},te,ue,Ce,xe,ke,De);return C.createElement(R0,{visible:r,motionName:n},function(Ne){var Me=Ne.className,He=Ne.style;return C.createElement(g2,{open:!0,getContainer:o??document.body},C.createElement("div",{className:tt("".concat(a,"-operations-wrapper"),Me,u),style:ze(ze({},He),{},{zIndex:Y})},B===null?null:C.createElement("button",{className:"".concat(a,"-close"),onClick:A},B||R),d&&C.createElement(C.Fragment,null,C.createElement("div",{className:tt("".concat(a,"-switch-left"),$e({},"".concat(a,"-switch-left-disabled"),v===0)),onClick:function(ot){return Se(ot,-1)}},ie),C.createElement("div",{className:tt("".concat(a,"-switch-right"),$e({},"".concat(a,"-switch-right-disabled"),v===b-1)),onClick:function(ot){return Se(ot,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(Be,ze(ze({icons:{prevIcon:he,nextIcon:se,flipYIcon:te,flipXIcon:ue,rotateLeftIcon:Ce,rotateRightIcon:xe,zoomOutIcon:ke,zoomInIcon:De},actions:{onActive:F,onFlipY:T,onFlipX:_,onRotateLeft:M,onRotateRight:P,onZoomOut:k,onZoomIn:O,onReset:q,onClose:A},transform:g},z?{current:v,total:b}:{}),{},{image:W})):Be)))})},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=pt(u,2),f=l[0],d=l[1],p=function(x){d(Ri),ko(Ri,f)||n==null||n({transform:Ri,action:x})},v=function(x,D){o.current===null&&(a.current=[],o.current=Bn(function(){d(function(m){var B=m;return a.current.forEach(function(F){B=ze(ze({},B),F)}),o.current=null,n==null||n({transform:B,action:D}),B})})),a.current.push(ze(ze({},f),x))},g=function(x,D,m,B,F){var A=e.current,O=A.width,k=A.height,P=A.offsetWidth,M=A.offsetHeight,_=A.offsetLeft,T=A.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,W=B??innerHeight/2,z=q-1,K=z*O*.5,X=z*k*.5,V=z*(Y-f.x-_),Z=z*(W-f.y-T),R=f.x-(V-K),ie=f.y-(Z-X);if(x<1&&L===1){var me=P*L,ye=M*L,ge=Lp(),ae=ge.width,Se=ge.height;me<=ae&&ye<=Se&&(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 $e({},e,a);if(t<0&&o<n)return $e({},e,-a)}else if(t<0||o>n)return $e({},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=ze(ze({},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=pt(v,2),b=g[0],x=g[1],D=Lt({diffX:0,diffY:0,transformX:0,transformY:0}),m=function(k){!t||k.button!==0||(k.preventDefault(),k.stopPropagation(),D.current={diffX:k.pageX-d,diffY:k.pageY-p,transformX:d,transformY:p},x(!0))},B=function(k){r&&b&&a({x:k.pageX-D.current.diffX,y:k.pageY-D.current.diffY},"move")},F=function(){if(r&&b){x(!1);var k=D.current,P=k.transformX,M=k.transformY,_=d!==P&&p!==M;if(!_)return;var T=e.current.offsetWidth*f,q=e.current.offsetHeight*f,L=e.current.getBoundingClientRect(),Y=L.left,W=L.top,z=l%180!==0,K=Hp(z?q:T,z?T:q,Y,W);K&&a(ze({},K),"dragRebound")}},A=function(k){if(!(!r||k.deltaY==0)){var P=Math.abs(k.deltaY/100),M=Math.min(P,fv),_=aa+M*n;k.deltaY>0&&(_=aa/_),u(_,"wheel",k.clientX,k.clientY)}};return er(function(){var O,k,P,M;if(t){P=Eo(window,"mouseup",F,!1),M=Eo(window,"mousemove",B,!1);try{window.top!==window.self&&(O=Eo(window.top,"mouseup",F,!1),k=Eo(window.top,"mousemove",B,!1))}catch{}}return function(){var _,T,q,L;(_=P)===null||_===void 0||_.remove(),(T=M)===null||T===void 0||T.remove(),(q=O)===null||q===void 0||q.remove(),(L=k)===null||L===void 0||L.remove()}},[r,b,d,p,l,t]),{isMoving:b,onMouseDown:m,onMouseMove:B,onMouseUp:F,onWheel:A}}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=pt(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=pt(v,2),b=g[0],x=g[1],D=Lt({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),m=function(k){D.current=ze(ze({},D.current),k)},B=function(k){if(t){k.stopPropagation(),x(!0);var P=k.touches,M=P===void 0?[]:P;M.length>1?m({point1:{x:M[0].clientX,y:M[0].clientY},point2:{x:M[1].clientX,y:M[1].clientY},eventType:"touchZoom"}):m({point1:{x:M[0].clientX-d,y:M[0].clientY-p},eventType:"move"})}},F=function(k){var P=k.touches,M=P===void 0?[]:P,_=D.current,T=_.point1,q=_.point2,L=_.eventType;if(M.length>1&&L==="touchZoom"){var Y={x:M[0].clientX,y:M[0].clientY},W={x:M[1].clientX,y:M[1].clientY},z=mv(T,q,Y,W),K=pt(z,2),X=K[0],V=K[1],Z=Es(Y,W)/Es(T,q);u(Z,"touchZoom",X,V,!0),m({point1:Y,point2:W,eventType:"touchZoom"})}else L==="move"&&(a({x:M[0].clientX-T.x,y:M[0].clientY-T.y},"move"),m({eventType:"move"}))},A=function(){if(r){if(b&&x(!1),m({eventType:"none"}),n>f)return a({x:0,y:0,scale:n},"touchZoom");var k=e.current.offsetWidth*f,P=e.current.offsetHeight*f,M=e.current.getBoundingClientRect(),_=M.left,T=M.top,q=l%180!==0,L=Hp(q?P:k,q?k:P,_,T);L&&a(ze({},L),"dragRebound")}};return er(function(){var O;return r&&t&&(O=Eo(window,"touchmove",function(k){return k.preventDefault()},{passive:!1})),function(){var k;(k=O)===null||k===void 0||k.remove()}},[r,t]),{isTouching:b,onTouchStart:B,onTouchMove:F,onTouchEnd:A}}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=pt(u,2),f=l[0],d=l[1];return je.createElement("img",yt({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,B=m===void 0?0:m,F=t.count,A=F===void 0?1:F,O=t.countRender,k=t.scaleStep,P=k===void 0?.5:k,M=t.minScale,_=M===void 0?1:M,T=t.maxScale,q=T===void 0?50:T,L=t.transitionName,Y=L===void 0?"zoom":L,W=t.maskTransitionName,z=W===void 0?"fade":W,K=t.imageRender,X=t.imgCommonProps,V=t.toolbarRender,Z=t.onTransform,R=t.onChange,ie=gr(t,bv),me=Lt(),ye=No(xi),ge=ye&&A>1,ae=ye&&A>=1,Se=Ot(!0),J=pt(Se,2),he=J[0],se=J[1],te=dv(me,_,q,Z),ue=te.transform,Ce=te.resetTransform,xe=te.updateTransform,ke=te.dispatchZoomChange,De=hv(me,f,p,P,ue,xe,ke),Be=De.isMoving,Ne=De.onMouseDown,Me=De.onWheel,He=gv(me,f,p,_,ue,xe,ke),ft=He.isTouching,ot=He.onTouchStart,Oe=He.onTouchMove,_e=He.onTouchEnd,We=ue.rotate,ct=ue.scale,at=tt($e({},"".concat(r,"-moving"),Be));er(function(){he||se(!0)},[he]);var Qe=function(){Ce("close")},Nt=function(){ke(aa+P,"zoomIn")},Ct=function(){ke(aa/(aa+P),"zoomOut")},mt=function(){xe({rotate:We+90},"rotateRight")},dt=function(){xe({rotate:We-90},"rotateLeft")},Pe=function(){xe({flipX:!ue.flipX},"flipX")},fe=function(){xe({flipY:!ue.flipY},"flipY")},gt=function(){Ce("reset")},St=function(tr){var ur=B+tr;!Number.isInteger(ur)||ur<0||ur>A-1||(se(!1),Ce(tr<0?"prev":"next"),R==null||R(ur,B))},Ft=function(tr){!p||!ge||(tr.keyCode===Pr.LEFT?St(-1):tr.keyCode===Pr.RIGHT&&St(1))},Et=function(tr){p&&(ct!==1?xe({x:0,y:0,scale:1},"doubleClick"):ke(aa+P,"doubleClick",tr.clientX,tr.clientY))};er(function(){var Rt=Eo(window,"keydown",Ft,!1);return function(){Rt.remove()}},[p,ge,B]);var or=je.createElement(yv,yt({},X,{width:t.width,height:t.height,imgRef:me,className:"".concat(r,"-img"),alt:o,style:{transform:"translate3d(".concat(ue.x,"px, ").concat(ue.y,"px, 0) scale3d(").concat(ue.flipX?"-":"").concat(ct,", ").concat(ue.flipY?"-":"").concat(ct,", 1) rotate(").concat(We,"deg)"),transitionDuration:(!he||ft)&&"0s"},fallback:u,src:n,onWheel:Me,onMouseDown:Ne,onDoubleClick:Et,onTouchStart:ot,onTouchMove:Oe,onTouchEnd:_e,onTouchCancel:_e})),Bt=ze({url:n,alt:o},a);return je.createElement(je.Fragment,null,je.createElement(v2,yt({transitionName:Y,maskTransitionName:z,closable:!1,keyboard:!0,prefixCls:r,onClose:d,visible:p,classNames:{wrapper:at},rootClassName:b,getContainer:D},ie,{afterClose:Qe}),je.createElement("div",{className:"".concat(r,"-img-wrapper")},K?K(or,ze({transform:ue,image:Bt},ye?{current:B}:{})):or)),je.createElement(cv,{visible:p,transform:ue,maskTransitionName:z,closeIcon:x,getContainer:D,prefixCls:r,rootClassName:b,icons:g,countRender:O,showSwitch:ge,showProgress:ae,current:B,count:A,scale:ct,minScale:_,maxScale:q,toolbarRender:V,onActive:St,onZoomIn:Nt,onZoomOut:Ct,onRotateRight:mt,onRotateLeft:dt,onFlipX:Pe,onFlipY:fe,onClose:d,onReset:gt,zIndex:ie.zIndex!==void 0?ie.zIndex+1:void 0,image:Bt}))},Wu=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function xv(e){var t=C.useState({}),r=pt(t,2),n=r[0],o=r[1],a=C.useCallback(function(l,f){return o(function(d){return ze(ze({},d),{},$e({},l,f))}),function(){o(function(d){var p=ze({},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(Wu)).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,B=v.minScale,F=v.maxScale,A=v.countRender,O=v.closeIcon,k=v.onChange,P=v.onTransform,M=v.toolbarRender,_=v.imageRender,T=gr(v,wv),q=xv(f),L=pt(q,3),Y=L[0],W=L[1],z=L[2],K=so(0,{value:D}),X=pt(K,2),V=X[0],Z=X[1],R=Ot(!1),ie=pt(R,2),me=ie[0],ye=ie[1],ge=((r=Y[V])===null||r===void 0?void 0:r.data)||{},ae=ge.src,Se=gr(ge,Cv),J=so(!!g,{value:g,onChange:function(ft,ot){b==null||b(ft,ot,V)}}),he=pt(J,2),se=he[0],te=he[1],ue=Ot(null),Ce=pt(ue,2),xe=Ce[0],ke=Ce[1],De=C.useCallback(function(He,ft,ot,Oe){var _e=z?Y.findIndex(function(We){return We.data.src===ft}):Y.findIndex(function(We){return We.id===He});Z(_e<0?0:_e),te(!0),ke({x:ot,y:Oe}),ye(!0)},[Y,z]);C.useEffect(function(){se?me||Z(0):ye(!1)},[se]);var Be=function(ft,ot){Z(ft),k==null||k(ft,ot)},Ne=function(){te(!1),ke(null)},Me=C.useMemo(function(){return{register:W,onPreview:De}},[W,De]);return C.createElement(xi.Provider,{value:Me},a,C.createElement(qp,yt({"aria-hidden":!se,movable:m,visible:se,prefixCls:o,closeIcon:O,onClose:Ne,mousePosition:xe,imgCommonProps:Se,src:ae,fallback:p,icons:l,minScale:B,maxScale:F,getContainer:x,current:V,count:Y.length,countRender:A,onTransform:P,toolbarRender:M,imageRender:_,onChange:Be},T)))},uf=0;function Ev(e,t){var r=C.useState(function(){return uf+=1,String(uf)}),n=pt(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 Sv=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],kv=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],J0=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,B=t.onClick,F=t.onError,A=t.wrapperClassName,O=t.wrapperStyle,k=t.rootClassName,P=gr(t,Sv),M=d&&d!==!0,_=Cn(D)==="object"?D:{},T=_.src,q=_.visible,L=q===void 0?void 0:q,Y=_.onVisibleChange,W=Y===void 0?o:Y,z=_.getContainer,K=z===void 0?void 0:z,X=_.mask,V=_.maskClassName,Z=_.movable,R=_.icons,ie=_.scaleStep,me=_.minScale,ye=_.maxScale,ge=_.imageRender,ae=_.toolbarRender,Se=gr(_,kv),J=T??r,he=so(!!L,{value:L,onChange:W}),se=pt(he,2),te=se[0],ue=se[1],Ce=Kp({src:r,isCustomPlaceholder:M,fallback:p}),xe=pt(Ce,3),ke=xe[0],De=xe[1],Be=xe[2],Ne=Ot(null),Me=pt(Ne,2),He=Me[0],ft=Me[1],ot=No(xi),Oe=!!D,_e=function(){ue(!1),ft(null)},We=tt(u,A,k,$e({},"".concat(u,"-error"),Be==="error")),ct=wt(function(){var Ct={};return Wu.forEach(function(mt){t[mt]!==void 0&&(Ct[mt]=t[mt])}),Ct},Wu.map(function(Ct){return t[Ct]})),at=wt(function(){return ze(ze({},ct),{},{src:J})},[J,ct]),Qe=Ev(Oe,at),Nt=function(mt){var dt=uv(mt.target),Pe=dt.left,fe=dt.top;ot?ot.onPreview(Qe,J,Pe,fe):(ft({x:Pe,y:fe}),ue(!0)),B==null||B(mt)};return C.createElement(C.Fragment,null,C.createElement("div",yt({},P,{className:We,onClick:Oe?Nt:B,style:ze({width:v,height:g},O)}),C.createElement("img",yt({},ct,{className:tt("".concat(u,"-img"),$e({},"".concat(u,"-img-placeholder"),d===!0),m),style:ze({height:g},b),ref:ke},De,{width:v,height:g,onError:F})),Be==="loading"&&C.createElement("div",{"aria-hidden":"true",className:"".concat(u,"-placeholder")},d),X&&Oe&&C.createElement("div",{className:tt("".concat(u,"-mask"),V),style:{display:(b==null?void 0:b.display)==="none"?"none":void 0}},X)),!ot&&Oe&&C.createElement(qp,yt({"aria-hidden":!te,visible:te,prefixCls:f,onClose:_e,mousePosition:He,src:J,alt:n,imageInfo:{width:v,height:g},fallback:p,getContainer:K,icons:R,movable:Z,scaleStep:ie,minScale:me,maxScale:ye,rootClassName:k,imageRender:ge,imgCommonProps:ct,toolbarRender:ae},Se)))};J0.PreviewGroup=Dv;var Bv={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"},Av=function(t,r){return C.createElement(en,yt({},t,{ref:r,icon:Bv}))},Fv=C.forwardRef(Av),$v={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"},Nv=function(t,r){return C.createElement(en,yt({},t,{ref:r,icon:$v}))},Tv=C.forwardRef(Nv),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"},Mv=function(t,r){return C.createElement(en,yt({},t,{ref:r,icon:Ov}))},cf=C.forwardRef(Mv),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(en,yt({},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(en,yt({},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)]}]},Vv=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())}}},Wv=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}),Vp=mi("Image",e=>{const t=`${e.componentCls}-preview`,r=Vo(e,{previewCls:t,modalMaskBg:new gn("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[Vv(r),qv(r),b2(Vo(r,{componentCls:t})),Wv(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 Wp={rotateLeft:C.createElement(Fv,null),rotateRight:C.createElement(Tv,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]=Vp(u,d),[b]=_s("ImagePreview",typeof r=="object"?r.zIndex:void 0),x=C.useMemo(()=>Object.assign(Object.assign({},Wp),{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 B=typeof r=="object"?r:{},F=tt(v,g,d,(m=B.rootClassName)!==null&&m!==void 0?m:"");return Object.assign(Object.assign({},B),{transitionName:gs(f,"zoom",B.transitionName),maskTransitionName:gs(f,"fade",B.maskTransitionName),rootClassName:F,zIndex:b})},[r,f,b,v,g,d]);return p(C.createElement(J0.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(),B=vi(D),[F,A,O]=Vp(D,B),k=tt(o,A,O,B),P=tt(n,A,p),[M]=_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:W,rootClassName:z,destroyOnClose:K,destroyOnHidden:X}=L,V=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:Wp},V),{destroyOnClose:X??K,rootClassName:tt(k,z),getContainer:Y??d,transitionName:gs(m,"zoom",L.transitionName),maskTransitionName:gs(m,"fade",L.maskTransitionName),zIndex:M,closeIcon:W??(g==null?void 0:g.closeIcon)})},[r,x,g==null?void 0:g.closeIcon]),T=Object.assign(Object.assign({},v),a),q=u??b;return F(C.createElement(J0,Object.assign({prefixCls:D,preview:_,rootClassName:k,className:P,style:T,fallback:q},l)))};Up.PreviewGroup=Yv;var wo={},wi="rc-table-internal-hook";function Z0(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=pt(f,1),p=d[0];return Bo(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 Yr(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=pt(f,2),p=d[1];return Bo(function(){if(!n)return;function v(g){var b=r(g);ko(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,yt({},d,v)):((!a||a(b.current,d))&&(g.current+=1),b.current=d,C.createElement(e.Provider,{value:g.current},C.createElement(o,yt({},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,yt({},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,Sa=Q0.responseImmutable,Jv=Q0.useImmutableMark,tn=Z0(),Yp=C.createContext({renderWithProps:!1}),Zv="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("-")||Zv;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=Jv(),f=M0(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=pt(d,2),g=v[1],b=pt(p,2),x=b[1];return a(x,g)}return u.renderWithProps?!0:!ko(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 Yr(tn,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,B=e.render,F=e.dataIndex,A=e.renderIndex,O=e.shouldCellUpdate,k=e.index,P=e.rowType,M=e.colSpan,_=e.rowSpan,T=e.fixLeft,q=e.fixRight,L=e.firstFixLeft,Y=e.lastFixLeft,W=e.firstFixRight,z=e.lastFixRight,K=e.appendNode,X=e.additionalProps,V=X===void 0?{}:X,Z=e.isSticky,R="".concat(b,"-cell"),ie=Yr(tn,["supportSticky","allColumnsFixedLeft","rowHoverable"]),me=ie.supportSticky,ye=ie.allColumnsFixedLeft,ge=ie.rowHoverable,ae=r5(m,F,A,p,B,O),Se=pt(ae,2),J=Se[0],he=Se[1],se={},te=typeof T=="number"&&me,ue=typeof q=="number"&&me;te&&(se.position="sticky",se.left=T),ue&&(se.position="sticky",se.right=q);var Ce=(t=(r=(n=he==null?void 0:he.colSpan)!==null&&n!==void 0?n:V.colSpan)!==null&&r!==void 0?r:M)!==null&&t!==void 0?t:1,xe=(o=(a=(u=he==null?void 0:he.rowSpan)!==null&&u!==void 0?u:V.rowSpan)!==null&&a!==void 0?a:_)!==null&&o!==void 0?o:1,ke=o5(k,xe),De=pt(ke,2),Be=De[0],Ne=De[1],Me=In(function(ct){var at;m&&Ne(k,k+xe-1),V==null||(at=V.onMouseEnter)===null||at===void 0||at.call(V,ct)}),He=In(function(ct){var at;m&&Ne(-1,-1),V==null||(at=V.onMouseLeave)===null||at===void 0||at.call(V,ct)});if(Ce===0||xe===0)return null;var ft=(l=V.title)!==null&&l!==void 0?l:a5({rowType:P,ellipsis:v,children:J}),ot=tt(R,x,(f={},$e($e($e($e($e($e($e($e($e($e(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&&ye&&me),"".concat(R,"-fix-right"),ue&&me),"".concat(R,"-fix-right-first"),W&&me),"".concat(R,"-fix-right-last"),z&&me),"".concat(R,"-ellipsis"),v),"".concat(R,"-with-append"),K),"".concat(R,"-fix-sticky"),(te||ue)&&Z&&me),$e(f,"".concat(R,"-row-hover"),!he&&Be)),V.className,he==null?void 0:he.className),Oe={};D&&(Oe.textAlign=D);var _e=ze(ze(ze(ze({},he==null?void 0:he.style),se),Oe),V.style),We=J;return Cn(We)==="object"&&!Array.isArray(We)&&!C.isValidElement(We)&&(We=null),v&&(Y||W)&&(We=C.createElement("span",{className:"".concat(R,"-content")},We)),C.createElement(d,yt({},he,V,{className:ot,style:_e,title:ft,scope:g,onMouseEnter:ge?Me:void 0,onMouseLeave:ge?He:void 0,colSpan:Ce!==1?Ce:null,rowSpan:xe!==1?xe:null}),K,We)}const ka=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 B=b&&b.fixed==="right";v=!B&&D}}else if(l!==void 0){var F=b&&b.fixed==="left";d=!F&&D}else if(f!==void 0){var A=x&&x.fixed==="right";p=!A&&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=Yr(tn,["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,B=ec(r,r+m-1,x,b,p);return C.createElement(ka,yt({className:t,index:r,component:"td",prefixCls:d,record:null,dataIndex:null,align:l,colSpan:m,rowSpan:u,render:function(){return n}},B))}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=Yr(tn,"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=Sa(c5);var Jp=Xs;function d5(e){return null}function f5(e){return null}function Zp(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)Zp(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];Zp(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=Yr(tn,["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,B=l&&l.has(t),F=f&&e&&e[f],A=In(d),O=v==null?void 0:v(e,r),k=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),W=1;W<L;W++)Y[W-1]=arguments[W];k==null||k.apply(void 0,[q].concat(Y))},M;typeof b=="string"?M=b:typeof b=="function"&&(M=b(e,r,n));var _=Us(a);return ze(ze({},o),{},{columnsKey:_,nestExpandable:x,expanded:B,hasNestChildren:F,record:e,onTriggerExpand:A,rowSupportExpand:D,expandable:m,rowProps:ze(ze({},O),{},{className:tt(M,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=Yr(tn,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),g=v.scrollbarSize,b=v.fixHeader,x=v.fixColumn,D=v.componentWidth,m=v.horizonScroll,B=r;return(f?m&&D:x)&&(B=C.createElement("div",{style:{width:D-p-(b&&!f?g:0),position:"sticky",left:p,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},B)),C.createElement(n,{className:a,style:{display:u?null:"none"}},C.createElement(ka,{component:o,prefixCls:t,colSpan:l},B))}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:tt(u,"".concat(t,"-row-spaced"))});var l=function(d){n(r,d),d.stopPropagation()};return C.createElement("span",{className:tt(u,$e($e({},"".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,B=e.hasNestChildren,F=e.onTriggerExpand,A=e.expandable,O=e.expandedKeys,k=p[r],P=v[r],M;r===(g||0)&&b&&(M=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:B,record:f,onExpand:F})));var _=((a=t.onCell)===null||a===void 0?void 0:a.call(t,f,o))||{};if(l){var T=_.rowSpan,q=T===void 0?1:T;if(A&&q&&r<l){for(var L=q,Y=o;Y<o+q;Y+=1){var W=u[Y];O.has(W)&&(L+=1)}_.rowSpan=L}}return{key:k,fixedInfo:P,appendCellNode:M,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,B=x.expandedRowClassName,F=x.expandedRowRender,A=x.rowProps,O=x.expanded,k=x.rowSupportExpand,P=C.useRef(!1);P.current||(P.current=O);var M=rm(B,n,o,d),_=C.createElement(p,yt({},A,{"data-row-key":u,className:tt(t,"".concat(D,"-row"),"".concat(D,"-row-level-").concat(d),A==null?void 0:A.className,$e({},M,d>=1)),style:ze(ze({},r),A==null?void 0:A.style)}),m.map(function(L,Y){var W=L.render,z=L.dataIndex,K=L.className,X=nm(x,L,Y,d,o,l,b==null?void 0:b.offset),V=X.key,Z=X.fixedInfo,R=X.appendCellNode,ie=X.additionalCellProps;return C.createElement(ka,yt({className:K,ellipsis:L.ellipsis,align:L.align,scope:L.rowScope,component:L.rowScope?g:v,prefixCls:D,key:V,record:n,index:o,renderIndex:a,dataIndex:z,render:W,shouldCellUpdate:L.shouldCellUpdate},Z,{appendNode:R,additionalProps:ie}))})),T;if(k&&(P.current||O)){var q=F(n,o,d+1,O);T=C.createElement(tm,{expanded:O,className:tt("".concat(D,"-expanded-row"),"".concat(D,"-expanded-row-level-").concat(d+1),M),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,_,T)}const g5=Sa(m5);function v5(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=C.useRef();return Bo(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=Yr(tn,["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=Yr(tn,["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(T){return T.rowKey})},[D]),B=C.useRef({renderWithProps:!1}),F=C.useMemo(function(){for(var T=l.length-b,q=0,L=0;L<b;L+=1)q+=x[L]||0;return{offset:b,colSpan:T,sticky:q}},[l.length,b,x]),A=a(["body","wrapper"],"tbody"),O=a(["body","row"],"tr"),k=a(["body","cell"],"td"),P=a(["body","cell"],"th"),M;t.length?M=D.map(function(T,q){var L=T.record,Y=T.indent,W=T.index,z=T.rowKey;return C.createElement(g5,{key:z,rowKey:z,rowKeys:m,record:L,index:q,renderIndex:W,rowComponent:O,cellComponent:k,scopeCellComponent:P,indent:Y,expandedRowInfo:F})}):M=C.createElement(tm,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:O,cellComponent:k,colSpan:l.length,isEmpty:!0},v);var _=Us(l);return C.createElement(Yp.Provider,{value:B.current},C.createElement(A,{className:"".concat(o,"-tbody")},r&&C.createElement(b5,{prefixCls:o,columnsKey:_,onColumnResize:u,columns:l}),M))}const x5=Sa(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=ze(ze({},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=Yr(tn,["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",yt({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 S5(e,t){return wt(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 k5=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,B=m===void 0?"fixed":m,F=e.onScroll,A=e.children,O=gr(e,E5),k=Yr(tn,["prefixCls","scrollbarSize","isSticky","getComponent"]),P=k.prefixCls,M=k.scrollbarSize,_=k.isSticky,T=k.getComponent,q=T(["header","table"],"table"),L=_&&!v?0:M,Y=C.useRef(null),W=C.useCallback(function(me){Wd(t,me),Wd(Y,me)},[]);C.useEffect(function(){function me(ge){var ae=ge,Se=ae.currentTarget,J=ae.deltaX;J&&(F({currentTarget:Se,scrollLeft:Se.scrollLeft+J}),ge.preventDefault())}var ye=Y.current;return ye==null||ye.addEventListener("wheel",me,{passive:!1}),function(){ye==null||ye.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=wt(function(){return L?[].concat(zt(o),[K]):o},[L,o]),V=wt(function(){return L?[].concat(zt(a),[K]):a},[L,a]),Z=wt(function(){var me=d.right,ye=d.left;return ze(ze({},d),{},{left:p==="rtl"?[].concat(zt(ye.map(function(ge){return ge+L})),[0]):ye,right:p==="rtl"?me:[].concat(zt(me.map(function(ge){return ge+L})),[0]),isSticky:_})},[L,d,_]),R=S5(u,f),ie=wt(function(){var me=!R||!R.length||R.every(function(ye){return!ye});return n||me},[n,R]);return C.createElement("div",{style:ze({overflow:"hidden"},_?{top:g,bottom:b}:{}),ref:W,className:tt(r,$e({},x,!!x))},C.createElement(q,{style:{tableLayout:B,minWidth:"100%",width:D}},ie?l:C.createElement(om,{colWidths:[].concat(zt(R),[L]),columCount:f+1,columns:V}),A(ze(ze({},O),{},{stickyOffsets:Z,columns:X,flattenColumns:V}))))});const ff=C.memo(k5);var B5=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=Yr(tn,["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,B=ec(x.colStart,x.colEnd,o,n,v),F;return m&&m.onHeaderCell&&(F=x.column.onHeaderCell(m)),C.createElement(ka,yt({},x,{scope:m.title?x.colSpan>1?"colgroup":"col":null,ellipsis:m.ellipsis,align:m.align,component:u,prefixCls:p,key:b[D]},B,{additionalProps:F,rowType:"header"}))}))};function A5(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=Yr(tn,["prefixCls","getComponent"]),l=u.prefixCls,f=u.getComponent,d=C.useMemo(function(){return A5(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(B5,{key:x,flattenColumns:o,cells:b,stickyOffsets:r,rowComponent:v,cellComponent:g,onHeaderRow:a,index:x});return D}))};const hf=Sa(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 $5(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=ze({},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 N5=["children"],T5=["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,N5),u=ze({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?ze(ze({},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 ze(ze({},d),{},{fixed:(p=d.fixed)!==null&&p!==void 0?p:u})}))):[].concat(zt(r),[ze(ze({key:l},n),{},{fixed:u})])},[])}function O5(e){return e.map(function(t){var r=t.fixed,n=gr(t,T5),o=r;return r==="left"?o="right":r==="right"&&(o="left"),ze({fixed:o},n)})}function M5(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,B=e.columnWidth,F=e.fixed,A=e.scrollWidth,O=e.clientWidth,k=C.useMemo(function(){var z=n||tc(o)||[];return am(z.slice())},[n,o]),P=C.useMemo(function(){if(a){var z=k.slice();if(!z.includes(wo)){var K=g||0,X=K===0&&F==="right"?k.length:K;X>=0&&z.splice(X,0,wo)}var V=z.indexOf(wo);z=z.filter(function(me,ye){return me!==wo||ye===V});var Z=k[V],R;F?R=F:R=Z?Z.fixed:null;var ie=$e($e($e($e($e($e({},Xa,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",l),"fixed",R),"className","".concat(r,"-row-expand-icon-cell")),"width",B),"render",function(ye,ge,ae){var Se=f(ge,ae),J=u.has(Se),he=v?v(ge):!0,se=p({prefixCls:r,expanded:J,expandable:he,record:ge,onExpand:d});return m?C.createElement("span",{onClick:function(ue){return ue.stopPropagation()}},se):se});return z.map(function(me,ye){var ge=me===wo?ie:me;return ye<x?ze(ze({},ge),{},{fixed:ge.fixed||"left"}):ge})}return k.filter(function(me){return me!==wo})},[a,k,f,u,p,D,x]),M=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(M)):Yu(M)},[M,D,A]),T=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 V=0;V<=z;V+=1){var Z=_[V].fixed;if(Z!=="left"&&Z!==!0)return!0}var R=_.findIndex(function(ye){var ge=ye.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=$5(_,A,O),L=pt(q,2),Y=L[0],W=L[1];return[M,Y,W,T]}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(k){return k&&Cn(k)==="object"&&k[b]})?"nest":!1},[!!f,t]),D=C.useState(function(){return u||(l?p5(t,r,b):[])}),m=pt(D,2),B=m[0],F=m[1],A=C.useMemo(function(){return new Set(a||B||[])},[a,B]),O=C.useCallback(function(k){var P=r(k,t.indexOf(k)),M,_=A.has(P);_?(A.delete(P),M=zt(A)):M=[].concat(zt(A),[P]),F(M),d&&d(!_,k),p&&p(M)},[r,A,t,d,p]);return[n,x,A,g,b,O]}function I5(e,t,r){var n=e.map(function(o,a){return ec(a,a,e,t,r)});return M0(function(){return n},[n],function(o,a){return!ko(o,a)})}function P5(e){var t=Lt(e),r=Ot({}),n=pt(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=pt(e,2),r=t[0],n=t[1],o=C.useState(-1),a=pt(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=wt(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=Yr(tn,"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=pt(D,2),B=m[0],F=m[1],A=C.useRef({delta:0,x:0}),O=C.useState(!1),k=pt(O,2),P=k[0],M=k[1],_=C.useRef(null);C.useEffect(function(){return function(){Bn.cancel(_.current)}},[]);var T=function(){M(!1)},q=function(K){K.persist(),A.current.delta=K.pageX-B.scrollLeft,A.current.x=0,M(!0),K.preventDefault()},L=function(K){var X,V=K||((X=window)===null||X===void 0?void 0:X.event),Z=V.buttons;if(!P||Z===0){P&&M(!1);return}var R=A.current.x+K.pageX-A.current.x-A.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)}),A.current.x=K.pageX)},Y=function(){Bn.cancel(_.current),_.current=Bn(function(){if(a.current){var K=vf(a.current).top,X=K+a.current.offsetHeight,V=f===window?document.documentElement.scrollTop+window.innerHeight:vf(f).top+f.clientHeight;F(function(Z){return ze(ze({},Z),{},{isHiddenScrollBar:X-Ud()<=V||K>=V-l})})}})},W=function(K){F(function(X){return ze(ze({},X),{},{scrollLeft:v?K/v*g:0})})};return C.useImperativeHandle(r,function(){return{setScrollLeft:W,checkScrollBarVisible:Y}}),C.useEffect(function(){var z=Eo(document.body,"mouseup",T,!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(){B.isHiddenScrollBar||F(function(z){var K=a.current;return K?ze(ze({},z),{},{scrollLeft:K.scrollLeft/K.scrollWidth*K.clientWidth}):z})},[B.isHiddenScrollBar]),v<=g||!b||B.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:tt("".concat(p,"-sticky-scroll-bar"),$e({},"".concat(p,"-sticky-scroll-bar-active"),P)),style:{width:"".concat(b,"px"),transform:"translate3d(".concat(B.scrollLeft,"px, 0, 0)")}}))};const K5=C.forwardRef(H5);var im="rc-table",q5=[],V5={};function W5(){return"No Data"}function U5(e,t){var r=ze({rowKey:"key",prefixCls:im,emptyText:W5},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,B=r.showHeader,F=r.components,A=r.emptyText,O=r.onRow,k=r.onHeaderRow,P=r.measureRowRender,M=r.onScroll,_=r.internalHooks,T=r.transformColumns,q=r.internalRefs,L=r.tailor,Y=r.getContainerWidth,W=r.sticky,z=r.rowHoverable,K=z===void 0?!0:z,X=l||q5,V=!!X.length,Z=_===wi,R=C.useCallback(function($t,Ut){return j0(F,$t)||Ut},[F]),ie=C.useMemo(function(){return typeof f=="function"?f:function($t){var Ut=$t&&$t[f];return Ut}},[f]),me=R(["body"]),ye=j5(),ge=pt(ye,3),ae=ge[0],Se=ge[1],J=ge[2],he=R5(r,X,ie),se=pt(he,6),te=se[0],ue=se[1],Ce=se[2],xe=se[3],ke=se[4],De=se[5],Be=d==null?void 0:d.x,Ne=C.useState(0),Me=pt(Ne,2),He=Me[0],ft=Me[1],ot=M5(ze(ze(ze({},r),te),{},{expandable:!!te.expandedRowRender,columnTitle:te.columnTitle,expandedKeys:Ce,getRowKey:ie,onTriggerExpand:De,expandIcon:xe,expandIconColumnIndex:te.expandIconColumnIndex,direction:v,scrollWidth:Z&&L&&typeof Be=="number"?Be:null,clientWidth:He}),Z?T:null),Oe=pt(ot,4),_e=Oe[0],We=Oe[1],ct=Oe[2],at=Oe[3],Qe=ct??Be,Nt=C.useMemo(function(){return{columns:_e,flattenColumns:We}},[_e,We]),Ct=C.useRef(),mt=C.useRef(),dt=C.useRef(),Pe=C.useRef();C.useImperativeHandle(t,function(){return{nativeElement:Ct.current,scrollTo:function(Ut){var Kr;if(dt.current instanceof HTMLElement){var rn=Ut.index,Rr=Ut.top,Nn=Ut.key;if(e5(Rr)){var nt;(nt=dt.current)===null||nt===void 0||nt.scrollTo({top:Rr})}else{var nn,zn=Nn??ie(X[rn]);(nn=dt.current.querySelector('[data-row-key="'.concat(zn,'"]')))===null||nn===void 0||nn.scrollIntoView()}}else(Kr=dt.current)!==null&&Kr!==void 0&&Kr.scrollTo&&dt.current.scrollTo(Ut)}}});var fe=C.useRef(),gt=C.useState(!1),St=pt(gt,2),Ft=St[0],Et=St[1],or=C.useState(!1),Bt=pt(or,2),Rt=Bt[0],tr=Bt[1],ur=C.useState(new Map),At=pt(ur,2),Ht=At[0],jt=At[1],Cr=Us(We),zr=Cr.map(function($t){return Ht.get($t)}),jr=C.useMemo(function(){return zr},[zr.join("_")]),Mr=L5(jr,We,v),vr=d&&Xu(d.y),pr=d&&Xu(Qe)||!!te.fixed,_t=pr&&We.some(function($t){var Ut=$t.fixed;return Ut}),w=C.useRef(),E=_5(W,n),Ie=E.isSticky,N=E.offsetHeader,Q=E.offsetSummary,Jt=E.offsetScroll,rt=E.stickyClassName,Ke=E.container,xt=C.useMemo(function(){return x==null?void 0:x(X)},[x,X]),et=(vr||Ie)&&C.isValidElement(xt)&&xt.type===Xs&&xt.props.fixed,Tt,ar,Nr;vr&&(ar={overflowY:V?"scroll":"auto",maxHeight:d.y}),pr&&(Tt={overflowX:"auto"},vr||(ar={overflowY:"hidden"}),Nr={width:Qe===!0?"auto":Qe,minWidth:"100%"});var ee=C.useCallback(function($t,Ut){jt(function(Kr){if(Kr.get($t)!==Ut){var rn=new Map(Kr);return rn.set($t,Ut),rn}return Kr})},[]),br=z5(),oe=pt(br,2),ce=oe[0],Te=oe[1];function st($t,Ut){Ut&&(typeof Ut=="function"?Ut($t):Ut.scrollLeft!==$t&&(Ut.scrollLeft=$t,Ut.scrollLeft!==$t&&setTimeout(function(){Ut.scrollLeft=$t},0)))}var Le=In(function($t){var Ut=$t.currentTarget,Kr=$t.scrollLeft,rn=v==="rtl",Rr=typeof Kr=="number"?Kr:Ut.scrollLeft,Nn=Ut||V5;if(!Te()||Te()===Nn){var nt;ce(Nn),st(Rr,mt.current),st(Rr,dt.current),st(Rr,fe.current),st(Rr,(nt=w.current)===null||nt===void 0?void 0:nt.setScrollLeft)}var nn=Ut||mt.current;if(nn){var zn=Z&&L&&typeof Qe=="number"?Qe:nn.scrollWidth,Dr=nn.clientWidth;if(zn===Dr){Et(!1),tr(!1);return}rn?(Et(-Rr<zn-Dr),tr(-Rr>0)):(Et(Rr>0),tr(Rr<zn-Dr))}}),de=In(function($t){Le($t),M==null||M($t)}),Ue=function(){if(pr&&dt.current){var Ut;Le({currentTarget:L0(dt.current),scrollLeft:(Ut=dt.current)===null||Ut===void 0?void 0:Ut.scrollLeft})}else Et(!1),tr(!1)},Ve=function(Ut){var Kr,rn=Ut.width;(Kr=w.current)===null||Kr===void 0||Kr.checkScrollBarVisible();var Rr=Ct.current?Ct.current.offsetWidth:rn;Z&&Y&&Ct.current&&(Rr=Y(Ct.current,Rr)||Rr),Rr!==He&&(Ue(),ft(Rr))},lt=C.useRef(!1);C.useEffect(function(){lt.current&&Ue()},[pr,l,_e.length]),C.useEffect(function(){lt.current=!0},[]);var le=C.useState(0),we=pt(le,2),Ee=we[0],Ge=we[1],vt=C.useState(!0),Wt=pt(vt,2),Mt=Wt[0],ut=Wt[1];Bo(function(){(!L||!Z)&&(dt.current instanceof Element?Ge(Xd(dt.current).width):Ge(Xd(Pe.current).width)),ut(W2("position","sticky"))},[]),C.useEffect(function(){Z&&q&&(q.body.current=dt.current)});var qt=C.useCallback(function($t){return C.createElement(C.Fragment,null,C.createElement(hf,$t),et==="top"&&C.createElement(Ii,$t,xt))},[et,xt]),Jr=C.useCallback(function($t){return C.createElement(Ii,$t,xt)},[xt]),Br=R(["table"],"table"),dn=C.useMemo(function(){return p||(_t?Qe==="max-content"?"auto":"fixed":vr||Ie||We.some(function($t){var Ut=$t.ellipsis;return Ut})?"fixed":"auto")},[vr,_t,We,p,Ie]),yr,Qt={colWidths:jr,columCount:We.length,stickyOffsets:Mr,onHeaderRow:k,fixHeader:vr,scroll:d},cr=C.useMemo(function(){return V?null:typeof A=="function"?A():A},[V,A]),Vr=C.createElement(x5,{data:X,measureColumnWidth:vr||pr||Ie}),_r=C.createElement(om,{colWidths:We.map(function($t){var Ut=$t.width;return Ut}),columns:We}),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 Jn;typeof me=="function"?(Jn=me(X,{scrollbarSize:Ee,ref:dt,onScroll:Le}),Qt.colWidths=We.map(function($t,Ut){var Kr=$t.width,rn=Ut===We.length-1?Kr-Ee:Kr;return typeof rn=="number"&&!Number.isNaN(rn)?rn:0})):Jn=C.createElement("div",{style:ze(ze({},Tt),ar),onScroll:de,ref:dt,className:tt("".concat(n,"-body"))},C.createElement(Br,yt({style:ze(ze({},Nr),{},{tableLayout:dn})},Gn),Yn,_r,Vr,!et&&xt&&C.createElement(Ii,{stickyOffsets:Mr,flattenColumns:We},xt)));var po=ze(ze(ze({noData:!X.length},Qt),Nt),{},{direction:v,stickyClassName:rt,scrollX:Qe,tableLayout:dn,onScroll:Le});yr=C.createElement(C.Fragment,null,B!==!1&&C.createElement(ff,yt({},po,{stickyTopOffset:N,className:"".concat(n,"-header"),ref:mt,colGroup:_r}),qt),Jn,et&&et!=="top"&&C.createElement(ff,yt({},po,{stickyBottomOffset:Q,className:"".concat(n,"-summary"),ref:fe,colGroup:_r}),Jr),Ie&&dt.current&&dt.current instanceof Element&&C.createElement(K5,{ref:w,offsetScroll:Jt,scrollBodyRef:dt,onScroll:Le,container:Ke,direction:v}))}else yr=C.createElement("div",{style:ze(ze({},Tt),ar),className:tt("".concat(n,"-content")),onScroll:Le,ref:dt},C.createElement(Br,yt({style:ze(ze({},Nr),{},{tableLayout:dn})},Gn),Yn,_r,B!==!1&&C.createElement(hf,yt({},Qt,Nt)),Vr,xt&&C.createElement(Ii,{stickyOffsets:Mr,flattenColumns:We},xt)));var ve=C.createElement("div",yt({className:tt(n,o,$e($e($e($e($e($e($e($e($e($e({},"".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&&at),"".concat(n,"-scroll-horizontal"),pr),"".concat(n,"-has-fix-left"),We[0]&&We[0].fixed),"".concat(n,"-has-fix-right"),We[We.length-1]&&We[We.length-1].fixed==="right")),style:u,id:m,ref:Ct},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&&(ve=C.createElement(_0,{onResize:Ve},ve));var dr=I5(We,Mr,v),$n=C.useMemo(function(){return{scrollX:Qe,prefixCls:n,getComponent:R,scrollbarSize:Ee,direction:v,fixedInfoList:dr,isSticky:Ie,supportSticky:Mt,componentWidth:He,fixHeader:vr,fixColumn:_t,horizonScroll:pr,tableLayout:dn,rowClassName:a,expandedRowClassName:te.expandedRowClassName,expandIcon:xe,expandableType:ue,expandRowByClick:te.expandRowByClick,expandedRowRender:te.expandedRowRender,expandedRowOffset:te.expandedRowOffset,onTriggerExpand:De,expandIconColumnIndex:te.expandIconColumnIndex,indentSize:te.indentSize,allColumnsFixedLeft:We.every(function($t){return $t.fixed==="left"}),emptyNode:cr,columns:_e,flattenColumns:We,onColumnResize:ee,colWidths:jr,hoverStartRow:ae,hoverEndRow:Se,onHover:J,rowExpandable:te.rowExpandable,onRow:O,getRowKey:ie,expandedKeys:Ce,childrenColumnName:ke,rowHoverable:K,measureRowRender:P}},[Qe,n,R,Ee,v,dr,Ie,Mt,He,vr,_t,pr,dn,a,te.expandedRowClassName,xe,ue,te.expandRowByClick,te.expandedRowRender,te.expandedRowOffset,De,te.expandIconColumnIndex,te.indentSize,cr,_e,We,ee,jr,ae,Se,J,te.rowExpandable,O,ie,Ce,ke,K,P]);return C.createElement(tn.Provider,{value:$n},ve)}var X5=C.forwardRef(U5);function sm(e){return Xp(X5,e)}var Ba=sm();Ba.EXPAND_COLUMN=wo;Ba.INTERNAL_HOOKS=wi;Ba.Column=d5;Ba.ColumnGroup=f5;Ba.Summary=Jp;var rc=Z0(null),lm=Z0(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,B=Yr(lm,["columnsOffset"]),F=B.columnsOffset,A=nm(t,r,n,o,a),O=A.key,k=A.fixedInfo,P=A.appendCellNode,M=A.additionalCellProps,_=M.style,T=M.colSpan,q=T===void 0?1:T,L=M.rowSpan,Y=L===void 0?1:L,W=n-1,z=Y5(W,q,F),K=q>1?m-z:0,X=ze(ze(ze({},_),d),{},{flex:"0 0 ".concat(z,"px"),width:"".concat(z,"px"),marginRight:K,pointerEvents:"auto"}),V=C.useMemo(function(){return v?Y<=1:q===0||Y===0||Y>1},[Y,q,v]);V?X.visibility="hidden":v&&(X.height=g==null?void 0:g(Y));var Z=V?function(){return null}:b,R={};return(Y===0||q===0)&&(R.rowSpan=1,R.colSpan=1),C.createElement(ka,yt({className:tt(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:Z,shouldCellUpdate:r.shouldCellUpdate},k,{appendNode:P,additionalProps:ze(ze({},M),{},{style:X},R)}))}var J5=["data","index","className","rowKey","style","extra","getHeight"],Z5=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,J5),p=r.record,v=r.indent,g=r.index,b=Yr(tn,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),x=b.scrollX,D=b.flattenColumns,m=b.prefixCls,B=b.fixColumn,F=b.componentWidth,A=Yr(rc,["getComponent"]),O=A.getComponent,k=em(p,a,n,v),P=O(["body","row"],"div"),M=O(["body","cell"],"div"),_=k.rowSupportExpand,T=k.expanded,q=k.rowProps,L=k.expandedRowRender,Y=k.expandedRowClassName,W;if(_&&T){var z=L(p,n,v+1,T),K=rm(Y,p,n,v),X={};B&&(X={style:$e({},"--virtual-width","".concat(F,"px"))});var V="".concat(m,"-expanded-row-cell");W=C.createElement(P,{className:tt("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(v+1),K)},C.createElement(ka,{component:M,prefixCls:m,className:tt(V,$e({},"".concat(V,"-fixed"),B)),additionalProps:X},z))}var Z=ze(ze({},u),{},{width:x});l&&(Z.position="absolute",Z.pointerEvents="none");var R=C.createElement(P,yt({},q,d,{"data-row-key":a,ref:_?null:t,className:tt(o,"".concat(m,"-row"),q==null?void 0:q.className,$e({},"".concat(m,"-row-extra"),l)),style:ze(ze({},Z),q==null?void 0:q.style)}),D.map(function(ie,me){return C.createElement(G5,{key:me,component:M,rowInfo:k,column:ie,colIndex:me,indent:v,index:n,renderIndex:g,record:p,inverse:l,getHeight:f})}));return _?C.createElement("div",{ref:t},R,W):R}),bf=Sa(Z5),Q5=C.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Yr(tn,["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=Yr(rc),x=b.sticky,D=b.scrollY,m=b.listItemHeight,B=b.getComponent,F=b.onScroll,A=C.useRef(),O=Qp(r,p,f,l),k=C.useMemo(function(){var W=0;return a.map(function(z){var K=z.width,X=z.minWidth,V=z.key,Z=Math.max(K||0,X||0);return W+=Z,[V,Z,W]})},[a]),P=C.useMemo(function(){return k.map(function(W){return W[2]})},[k]);C.useEffect(function(){k.forEach(function(W){var z=pt(W,2),K=z[0],X=z[1];u(K,X)})},[k]),C.useImperativeHandle(t,function(){var W,z={scrollTo:function(X){var V;(V=A.current)===null||V===void 0||V.scrollTo(X)},nativeElement:(W=A.current)===null||W===void 0?void 0:W.nativeElement};return Object.defineProperty(z,"scrollLeft",{get:function(){var X;return((X=A.current)===null||X===void 0?void 0:X.getScrollInfo().x)||0},set:function(X){var V;(V=A.current)===null||V===void 0||V.scrollTo({left:X})}}),Object.defineProperty(z,"scrollTop",{get:function(){var X;return((X=A.current)===null||X===void 0?void 0:X.getScrollInfo().y)||0},set:function(X){var V;(V=A.current)===null||V===void 0||V.scrollTo({top:X})}}),z});var M=function(z,K){var X,V=(X=O[K])===null||X===void 0?void 0:X.record,Z=z.onCell;if(Z){var R,ie=Z(V,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,V=z.getSize,Z=z.offsetY;if(X<0)return null;for(var R=a.filter(function(Ce){return M(Ce,K)===0}),ie=K,me=function(xe){if(R=R.filter(function(ke){return M(ke,xe)===0}),!R.length)return ie=xe,1},ye=K;ye>=0&&!me(ye);ye-=1);for(var ge=a.filter(function(Ce){return M(Ce,X)!==1}),ae=X,Se=function(xe){if(ge=ge.filter(function(ke){return M(ke,xe)!==1}),!ge.length)return ae=Math.max(xe-1,X),1},J=X;J<O.length&&!Se(J);J+=1);for(var he=[],se=function(xe){var ke=O[xe];if(!ke)return 1;a.some(function(De){return M(De,xe)>1})&&he.push(xe)},te=ie;te<=ae;te+=1)se(te);var ue=he.map(function(Ce){var xe=O[Ce],ke=l(xe.record,Ce),De=function(Me){var He=Ce+Me-1,ft=l(O[He].record,He),ot=V(ke,ft);return ot.bottom-ot.top},Be=V(ke);return C.createElement(bf,{key:Ce,data:xe,rowKey:ke,index:Ce,style:{top:-Z+Be.top},extra:!0,getHeight:De})});return ue},T=C.useMemo(function(){return{columnsOffset:P}},[P]),q="".concat(d,"-tbody"),L=B(["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:T},C.createElement(mp,{fullHeight:!1,ref:A,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=A.current)===null||K===void 0?void 0:K.nativeElement,scrollLeft:X})},onScroll:F,extraRender:_},function(W,z,K){var X=l(W.record,z);return C.createElement(bf,{data:W,rowKey:X,index:z,style:K.style})}))}),e6=Sa(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,A){return j0(p,F)||A}),m=In(v),B=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:B},C.createElement(Ba,yt({},e,{className:tt(f,"".concat(l,"-virtual")),scroll:ze(ze({},o),{},{x:b}),components:ze(ze({},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:tt(u,$e($e({},"".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,B=t.halfChecked,F=t.loading,A=t.domRef,O=t.active,k=t.data,P=t.onMouseMove,M=t.selectable,_=gr(t,u6),T=je.useContext(nc),q=je.useContext(i6),L=je.useRef(null),Y=je.useState(!1),W=pt(Y,2),z=W[0],K=W[1],X=!!(T.disabled||t.disabled||(r=q.nodeDisabled)!==null&&r!==void 0&&r.call(q,k)),V=je.useMemo(function(){return!T.checkable||t.checkable===!1?!1:T.checkable},[T.checkable,t.checkable]),Z=function(fe){X||T.onNodeSelect(fe,Lr(t))},R=function(fe){X||!V||t.disableCheckbox||T.onNodeCheck(fe,Lr(t),!m)},ie=je.useMemo(function(){return typeof M=="boolean"?M:T.selectable},[M,T.selectable]),me=function(fe){T.onNodeClick(fe,Lr(t)),ie?Z(fe):R(fe)},ye=function(fe){T.onNodeDoubleClick(fe,Lr(t))},ge=function(fe){T.onNodeMouseEnter(fe,Lr(t))},ae=function(fe){T.onNodeMouseLeave(fe,Lr(t))},Se=function(fe){T.onNodeContextMenu(fe,Lr(t))},J=je.useMemo(function(){return!!(T.draggable&&(!T.draggable.nodeDraggable||T.draggable.nodeDraggable(k)))},[T.draggable,k]),he=function(fe){fe.stopPropagation(),K(!0),T.onNodeDragStart(fe,t);try{fe.dataTransfer.setData("text/plain","")}catch{}},se=function(fe){fe.preventDefault(),fe.stopPropagation(),T.onNodeDragEnter(fe,t)},te=function(fe){fe.preventDefault(),fe.stopPropagation(),T.onNodeDragOver(fe,t)},ue=function(fe){fe.stopPropagation(),T.onNodeDragLeave(fe,t)},Ce=function(fe){fe.stopPropagation(),K(!1),T.onNodeDragEnd(fe,t)},xe=function(fe){fe.preventDefault(),fe.stopPropagation(),K(!1),T.onNodeDrop(fe,t)},ke=function(fe){F||T.onNodeExpand(fe,Lr(t))},De=je.useMemo(function(){var Pe=mn(T.keyEntities,a)||{},fe=Pe.children;return!!(fe||[]).length},[T.keyEntities,a]),Be=je.useMemo(function(){return v===!1?!1:v||!T.loadData&&!De||T.loadData&&t.loaded&&!De},[v,T.loadData,De,t.loaded]);je.useEffect(function(){F||typeof T.loadData=="function"&&x&&!Be&&!t.loaded&&T.onNodeLoad(Lr(t))},[F,T.loadData,T.onNodeLoad,x,Be,t]);var Ne=je.useMemo(function(){var Pe;return(Pe=T.draggable)!==null&&Pe!==void 0&&Pe.icon?je.createElement("span",{className:"".concat(T.prefixCls,"-draggable-icon")},T.draggable.icon):null},[T.draggable]),Me=function(fe){var gt=t.switcherIcon||T.switcherIcon;return typeof gt=="function"?gt(ze(ze({},t),{},{isLeaf:fe})):gt},He=function(){if(Be){var fe=Me(!0);return fe!==!1?je.createElement("span",{className:tt("".concat(T.prefixCls,"-switcher"),"".concat(T.prefixCls,"-switcher-noop"))},fe):null}var gt=Me(!1);return gt!==!1?je.createElement("span",{onClick:ke,className:tt("".concat(T.prefixCls,"-switcher"),"".concat(T.prefixCls,"-switcher_").concat(x?yf:xf))},gt):null},ft=je.useMemo(function(){if(!V)return null;var Pe=typeof V!="boolean"?V:null;return je.createElement("span",{className:tt("".concat(T.prefixCls,"-checkbox"),$e($e($e({},"".concat(T.prefixCls,"-checkbox-checked"),m),"".concat(T.prefixCls,"-checkbox-indeterminate"),!m&&B),"".concat(T.prefixCls,"-checkbox-disabled"),X||t.disableCheckbox)),onClick:R,role:"checkbox","aria-checked":B?"mixed":m,"aria-disabled":X||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},Pe)},[V,m,B,X,t.disableCheckbox,t.title]),ot=je.useMemo(function(){return Be?null:x?yf:xf},[Be,x]),Oe=je.useMemo(function(){return je.createElement("span",{className:tt("".concat(T.prefixCls,"-iconEle"),"".concat(T.prefixCls,"-icon__").concat(ot||"docu"),$e({},"".concat(T.prefixCls,"-icon_loading"),F))})},[T.prefixCls,ot,F]),_e=je.useMemo(function(){var Pe=!!T.draggable,fe=!t.disabled&&Pe&&T.dragOverNodeKey===a;return fe?T.dropIndicatorRender({dropPosition:T.dropPosition,dropLevelOffset:T.dropLevelOffset,indent:T.indent,prefixCls:T.prefixCls,direction:T.direction}):null},[T.dropPosition,T.dropLevelOffset,T.indent,T.prefixCls,T.direction,T.draggable,T.dragOverNodeKey,T.dropIndicatorRender]),We=je.useMemo(function(){var Pe=t.title,fe=Pe===void 0?c6:Pe,gt="".concat(T.prefixCls,"-node-content-wrapper"),St;if(T.showIcon){var Ft=t.icon||T.icon;St=Ft?je.createElement("span",{className:tt("".concat(T.prefixCls,"-iconEle"),"".concat(T.prefixCls,"-icon__customize"))},typeof Ft=="function"?Ft(t):Ft):Oe}else T.loadData&&F&&(St=Oe);var Et;return typeof fe=="function"?Et=fe(k):T.titleRender?Et=T.titleRender(k):Et=fe,je.createElement("span",{ref:L,title:typeof fe=="string"?fe:"",className:tt(gt,"".concat(gt,"-").concat(ot||"normal"),$e({},"".concat(T.prefixCls,"-node-selected"),!X&&(D||z))),onMouseEnter:ge,onMouseLeave:ae,onContextMenu:Se,onClick:me,onDoubleClick:ye},St,je.createElement("span",{className:"".concat(T.prefixCls,"-title")},Et),_e)},[T.prefixCls,T.showIcon,t,T.icon,Oe,T.titleRender,k,ot,ge,ae,Se,me,ye]),ct=vs(_,{aria:!0,data:!0}),at=mn(T.keyEntities,a)||{},Qe=at.level,Nt=b[b.length-1],Ct=!X&&J,mt=T.draggingNodeKey===a,dt=M!==void 0?{"aria-selected":!!M}:void 0;return je.createElement("div",yt({ref:A,role:"treeitem","aria-expanded":v?void 0:x,className:tt(u,"".concat(T.prefixCls,"-treenode"),(o={},$e($e($e($e($e($e($e($e($e($e(o,"".concat(T.prefixCls,"-treenode-disabled"),X),"".concat(T.prefixCls,"-treenode-switcher-").concat(x?"open":"close"),!v),"".concat(T.prefixCls,"-treenode-checkbox-checked"),m),"".concat(T.prefixCls,"-treenode-checkbox-indeterminate"),B),"".concat(T.prefixCls,"-treenode-selected"),D),"".concat(T.prefixCls,"-treenode-loading"),F),"".concat(T.prefixCls,"-treenode-active"),O),"".concat(T.prefixCls,"-treenode-leaf-last"),Nt),"".concat(T.prefixCls,"-treenode-draggable"),J),"dragging",mt),$e($e($e($e($e($e($e(o,"drop-target",T.dropTargetKey===a),"drop-container",T.dropContainerKey===a),"drag-over",!X&&f),"drag-over-gap-top",!X&&d),"drag-over-gap-bottom",!X&&p),"filter-node",(n=T.filterTreeNode)===null||n===void 0?void 0:n.call(T,Lr(t))),"".concat(T.prefixCls,"-treenode-leaf"),Be))),style:l,draggable:Ct,onDragStart:Ct?he:void 0,onDragEnter:J?se:void 0,onDragOver:J?te:void 0,onDragLeave:J?ue:void 0,onDrop:J?xe:void 0,onDragEnd:J?Ce:void 0,onMouseMove:P},dt,ct),je.createElement(l6,{prefixCls:T.prefixCls,level:Qe,isStart:g,isEnd:b}),Ne,He(),ft,We)};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),B=(m-12)/n,F=f.filter(function(X){var V;return(V=l[X])===null||V===void 0||(V=V.children)===null||V===void 0?void 0:V.length}),A=mn(l,r.eventKey);if(g<x+D/2){var O=u.findIndex(function(X){return X.key===A.key}),k=O<=0?0:O-1,P=u[k].key;A=mn(l,P)}var M=A.key,_=A,T=A.key,q=0,L=0;if(!F.includes(M))for(var Y=0;Y<B&&f6(A);Y+=1)A=A.parent,L+=1;var W=t.data,z=A.node,K=!0;return h6(A)&&A.level===0&&g<x+D/2&&a({dragNode:W,dropNode:z,dropPosition:-1})&&A.key===r.eventKey?q=-1:(_.children||[]).length&&F.includes(T)?a({dragNode:W,dropNode:z,dropPosition:0})?q=0:K=!1:L===0?B>-1.5?a({dragNode:W,dropNode:z,dropPosition:1})?q=1:K=!1:a({dragNode:W,dropNode:z,dropPosition:0})?q=0:a({dragNode:W,dropNode:z,dropPosition:1})?q=1:K=!1:a({dragNode:W,dropNode:z,dropPosition:1})?q=1:K=!1,{dropPosition:q,dropLevelOffset:L,dropTargetKey:A.key,dropTargetPos:A.pos,dragOverNodeKey:T,dropContainerKey:q===0?null:((p=A.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 Vl(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={},Ju="SELECT_ALL",Zu="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:B,hideSelectAll:F,checkStrictly:A=!0}=t||{},{prefixCls:O,data:k,pageData:P,getRecordByKey:M,getRowKey:_,expandType:T,childrenColumnName:q,locale:L,getPopupContainer:Y}=e,W=Ls(),[z,K]=L2(xe=>xe),[X,V]=so(n||o||Df,{value:n}),Z=C.useRef(new Map),R=kt(xe=>{if(r){const ke=new Map;xe.forEach(De=>{let Be=M(De);!Be&&Z.current.has(De)&&(Be=Z.current.get(De)),ke.set(De,Be)}),Z.current=ke}},[M,r]);C.useEffect(()=>{R(X)},[X]);const ie=wt(()=>cm(q,P),[q,P]),{keyEntities:me}=wt(()=>{if(A)return{keyEntities:null};let xe=k;if(r){const ke=new Set(ie.map((Be,Ne)=>_(Be,Ne))),De=Array.from(Z.current).reduce((Be,[Ne,Me])=>ke.has(Ne)?Be:Be.concat(Me),[]);xe=[].concat(zt(xe),zt(De))}return Y0(xe,{externalGetKey:_,childrenPropName:q})},[k,_,A,q,r,ie]),ye=wt(()=>{const xe=new Map;return ie.forEach((ke,De)=>{const Be=_(ke,De),Ne=(a?a(ke):null)||{};xe.set(Be,Ne)}),xe},[ie,_,a]),ge=kt(xe=>{const ke=_(xe);let De;return ye.has(ke)?De=ye.get(_(xe)):De=a?a(xe):void 0,!!(De!=null&&De.disabled)},[ye,_]),[ae,Se]=wt(()=>{if(A)return[X||[],[]];const{checkedKeys:xe,halfCheckedKeys:ke}=ua(X,!0,me,ge);return[xe||[],ke]},[X,A,me,ge]),J=wt(()=>{const xe=x==="radio"?ae.slice(0,1):ae;return new Set(xe)},[ae,x]),he=wt(()=>x==="radio"?new Set:new Set(Se),[Se,x]);C.useEffect(()=>{t||V(Df)},[!!t]);const se=kt((xe,ke)=>{let De,Be;R(xe),r?(De=xe,Be=xe.map(Ne=>Z.current.get(Ne))):(De=[],Be=[],xe.forEach(Ne=>{const Me=M(Ne);Me!==void 0&&(De.push(Ne),Be.push(Me))})),V(De),l==null||l(De,Be,{type:ke})},[V,M,l,r]),te=kt((xe,ke,De,Be)=>{if(f){const Ne=De.map(Me=>M(Me));f(M(xe),ke,Ne,Be)}se(De,"single")},[f,M,se]),ue=wt(()=>!D||F?null:(D===!0?[Ju,Zu,Qu]:D).map(ke=>ke===Ju?{key:"all",text:L.selectionAll,onSelect(){se(k.map((De,Be)=>_(De,Be)).filter(De=>{const Be=ye.get(De);return!(Be!=null&&Be.disabled)||J.has(De)}),"all")}}:ke===Zu?{key:"invert",text:L.selectInvert,onSelect(){const De=new Set(J);P.forEach((Ne,Me)=>{const He=_(Ne,Me),ft=ye.get(He);ft!=null&&ft.disabled||(De.has(He)?De.delete(He):De.add(He))});const Be=Array.from(De);p&&(W.deprecated(!1,"onSelectInvert","onChange"),p(Be)),se(Be,"invert")}}:ke===Qu?{key:"none",text:L.selectNone,onSelect(){v==null||v(),se(Array.from(J).filter(De=>{const Be=ye.get(De);return Be==null?void 0:Be.disabled}),"none")}}:ke).map(ke=>Object.assign(Object.assign({},ke),{onSelect:(...De)=>{var Be,Ne;(Ne=ke.onSelect)===null||Ne===void 0||(Be=Ne).call.apply(Be,[ke].concat(De)),K(null)}})),[D,J,P,_,p,se]);return[kt(xe=>{var ke;if(!t)return xe.filter(Pe=>Pe!==yo);let De=zt(xe);const Be=new Set(J),Ne=ie.map(_).filter(Pe=>!ye.get(Pe).disabled),Me=Ne.every(Pe=>Be.has(Pe)),He=Ne.some(Pe=>Be.has(Pe)),ft=()=>{const Pe=[];Me?Ne.forEach(gt=>{Be.delete(gt),Pe.push(gt)}):Ne.forEach(gt=>{Be.has(gt)||(Be.add(gt),Pe.push(gt))});const fe=Array.from(Be);d==null||d(!Me,fe.map(gt=>M(gt)),Pe.map(gt=>M(gt))),se(fe,"all"),K(null)};let ot,Oe;if(x!=="radio"){let Pe;if(ue){const Rt={getPopupContainer:Y,items:ue.map((tr,ur)=>{const{key:At,text:Ht,onSelect:jt}=tr;return{key:At??ur,onClick:()=>{jt==null||jt(Ne)},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 fe=ie.map((Rt,tr)=>{const ur=_(Rt,tr),At=ye.get(ur)||{};return Object.assign({checked:Be.has(ur)},At)}).filter(({disabled:Rt})=>Rt),gt=!!fe.length&&fe.length===ie.length,St=gt&&fe.every(({checked:Rt})=>Rt),Ft=gt&&fe.some(({checked:Rt})=>Rt),Et=(u==null?void 0:u())||{},{onChange:or,disabled:Bt}=Et;Oe=C.createElement(bs,Object.assign({"aria-label":Pe?"Custom selection":"Select all"},Et,{checked:gt?St:!!ie.length&&Me,indeterminate:gt?!St&&Ft:!Me&&He,onChange:Rt=>{ft(),or==null||or(Rt)},disabled:Bt??(ie.length===0||gt),skipGroup:!0})),ot=!F&&C.createElement("div",{className:`${O}-selection`},Oe,Pe)}let _e;x==="radio"?_e=(Pe,fe,gt)=>{const St=_(fe,gt),Ft=Be.has(St),Et=ye.get(St);return{node:C.createElement(rp,Object.assign({},Et,{checked:Ft,onClick:or=>{var Bt;or.stopPropagation(),(Bt=Et==null?void 0:Et.onClick)===null||Bt===void 0||Bt.call(Et,or)},onChange:or=>{var Bt;Be.has(St)||te(St,!0,[St],or.nativeEvent),(Bt=Et==null?void 0:Et.onChange)===null||Bt===void 0||Bt.call(Et,or)}})),checked:Ft}}:_e=(Pe,fe,gt)=>{var St;const Ft=_(fe,gt),Et=Be.has(Ft),or=he.has(Ft),Bt=ye.get(Ft);let Rt;return T==="nest"?Rt=or:Rt=(St=Bt==null?void 0:Bt.indeterminate)!==null&&St!==void 0?St:or,{node:C.createElement(bs,Object.assign({},Bt,{indeterminate:Rt,checked:Et,skipGroup:!0,onClick:tr=>{var ur;tr.stopPropagation(),(ur=Bt==null?void 0:Bt.onClick)===null||ur===void 0||ur.call(Bt,tr)},onChange:tr=>{var ur;const{nativeEvent:At}=tr,{shiftKey:Ht}=At,jt=Ne.indexOf(Ft),Cr=ae.some(zr=>Ne.includes(zr));if(Ht&&A&&Cr){const zr=z(jt,Ne,Be),jr=Array.from(Be);g==null||g(!Et,jr.map(Mr=>M(Mr)),zr.map(Mr=>M(Mr))),se(jr,"multiple")}else{const zr=ae;if(A){const jr=Et?qn(zr,Ft):ro(zr,Ft);te(Ft,!Et,jr,At)}else{const jr=ua([].concat(zt(zr),[Ft]),!0,me,ge),{checkedKeys:Mr,halfCheckedKeys:vr}=jr;let pr=Mr;if(Et){const _t=new Set(Mr);_t.delete(Ft),pr=ua(Array.from(_t),{halfCheckedKeys:vr},me,ge).checkedKeys}te(Ft,!Et,pr,At)}}K(Et?null:jt),(ur=Bt==null?void 0:Bt.onChange)===null||ur===void 0||ur.call(Bt,tr)}})),checked:Et}};const We=(Pe,fe,gt)=>{const{node:St,checked:Ft}=_e(Pe,fe,gt);return B?B(Ft,fe,gt,St):St};if(!De.includes(yo))if(De.findIndex(Pe=>{var fe;return((fe=Pe[Xa])===null||fe===void 0?void 0:fe.columnType)==="EXPAND_COLUMN"})===0){const[Pe,...fe]=De;De=[Pe,yo].concat(zt(fe))}else De=[yo].concat(zt(De));const ct=De.indexOf(yo);De=De.filter((Pe,fe)=>Pe!==yo||fe===ct);const at=De[ct-1],Qe=De[ct+1];let Nt=m;Nt===void 0&&((Qe==null?void 0:Qe.fixed)!==void 0?Nt=Qe.fixed:(at==null?void 0:at.fixed)!==void 0&&(Nt=at.fixed)),Nt&&at&&((ke=at[Xa])===null||ke===void 0?void 0:ke.columnType)==="EXPAND_COLUMN"&&at.fixed===void 0&&(at.fixed=Nt);const Ct=tt(`${O}-selection-col`,{[`${O}-selection-col-with-dropdown`]:D&&x==="checkbox"}),mt=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Oe):t.columnTitle:ot,dt={fixed:Nt,width:b,className:`${O}-selection-column`,title:mt(),render:We,onCell:t.onCell,align:t.align,[Xa]:{className:Ct}};return De.map(Pe=>Pe===yo?dt:Pe)},[_,ie,t,ae,J,he,b,ue,T,ye,g,te,ge]),J]};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:tt(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 Ao=(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 Aa(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(en,yt({},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 je.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=pt(r,2),o=n[0],a=n[1];Bo(function(){if(o)return e(),function(){t()}},[o]),Bo(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=pt(g,2),x=b[0],D=b[1],m=C.useContext(nc),B=m.prefixCls,F=a&&u!=="hide";Bo(function(){a&&F!==x&&D(F)},[a]);var A=function(){a&&l()},O=C.useRef(!1),k=function(){a&&!O.current&&(O.current=!0,f())};C6(A,k);var P=function(_){F===_&&k()};return a?C.createElement(R0,yt({ref:t,visible:x},o,{motionAppear:u==="show",onVisibleChanged:P}),function(M,_){var T=M.className,q=M.style;return C.createElement("div",{ref:_,className:tt("".concat(B,"-treenode-motion"),T),style:q},a.map(function(L){var Y=Object.assign({},(dm(L.data),L.data)),W=L.title,z=L.key,K=L.isStart,X=L.isEnd;delete Y.children;var V=Ua(z,p);return C.createElement(ri,yt({},Y,V,{title:W,active:d,data:L.data,key:z,isStart:K,isEnd:X}))}))}):C.createElement(ri,yt({domRef:t,className:r,style:n},v,{active:d}))});function S6(){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 k6=["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"],Sf={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},B6=function(){},Wo="RC_TREE_MOTION_".concat(Math.random()),e0={key:Wo},fm={key:Wo,level:0,index:0,pos:"0",node:e0,nodes:[e0]},kf={parent:null,children:[],pos:fm.pos,data:e0,title:null,key:Wo,isStart:[],isEnd:[]};function Bf(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function Af(e){var t=e.key,r=e.pos;return yi(t,r)}function A6(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,B=e.itemHeight,F=e.virtual,A=e.scrollWidth,O=e.focusable,k=e.activeItem,P=e.focused,M=e.tabIndex,_=e.onKeyDown,T=e.onFocus,q=e.onBlur,L=e.onActiveChange,Y=e.onListChangeStart,W=e.onListChangeEnd,z=gr(e,k6),K=C.useRef(null),X=C.useRef(null);C.useImperativeHandle(t,function(){return{scrollTo:function(_e){K.current.scrollTo(_e)},getIndentWidth:function(){return X.current.offsetWidth}}});var V=C.useState(o),Z=pt(V,2),R=Z[0],ie=Z[1],me=C.useState(n),ye=pt(me,2),ge=ye[0],ae=ye[1],Se=C.useState(n),J=pt(Se,2),he=J[0],se=J[1],te=C.useState([]),ue=pt(te,2),Ce=ue[0],xe=ue[1],ke=C.useState(null),De=pt(ke,2),Be=De[0],Ne=De[1],Me=C.useRef(n);Me.current=n;function He(){var Oe=Me.current;ae(Oe),se(Oe),xe([]),Ne(null),W()}Bo(function(){ie(o);var Oe=S6(R,o);if(Oe.key!==null)if(Oe.add){var _e=ge.findIndex(function(Ct){var mt=Ct.key;return mt===Oe.key}),We=Bf(Ef(ge,n,Oe.key),F,m,B),ct=ge.slice();ct.splice(_e+1,0,kf),se(ct),xe(We),Ne("show")}else{var at=n.findIndex(function(Ct){var mt=Ct.key;return mt===Oe.key}),Qe=Bf(Ef(n,ge,Oe.key),F,m,B),Nt=n.slice();Nt.splice(at+1,0,kf),se(Nt),xe(Qe),Ne("hide")}else ge!==n&&(ae(n),se(n))},[o,n]),C.useEffect(function(){g||He()},[g]);var ft=D?he:n,ot={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&&k&&C.createElement("span",{style:Sf,"aria-live":"assertive"},A6(k)),C.createElement("div",null,C.createElement("input",{style:Sf,disabled:O===!1||v,tabIndex:O!==!1?M:null,onKeyDown:_,onFocus:T,onBlur:q,value:"",onChange:B6,"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,yt({},z,{data:ft,itemKey:Af,height:m,fullHeight:!1,virtual:F,itemHeight:B,scrollWidth:A,prefixCls:"".concat(r,"-list"),ref:K,role:"tree",onVisibleChange:function(_e){_e.every(function(We){return Af(We)!==Wo})&&He()}}),function(Oe){var _e=Oe.pos,We=Object.assign({},(dm(Oe.data),Oe.data)),ct=Oe.title,at=Oe.key,Qe=Oe.isStart,Nt=Oe.isEnd,Ct=yi(at,_e);delete We.key,delete We.children;var mt=Ua(Ct,ot);return C.createElement(E6,yt({},We,mt,{title:ct,active:!!k&&at===k.key,pos:_e,data:Oe.data,isStart:Qe,isEnd:Nt,motion:D,motionNodes:at===Wo?Ce:null,motionType:Be,onMotionStart:Y,onMotionEnd:He,treeNodeRequiredProps:ot,onMouseMove:function(){L(null)}}))}))}),$6=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)),$e(Gt(n),"destroyed",!1),$e(Gt(n),"delayedDragEnterLogic",void 0),$e(Gt(n),"loadingRetryTimes",{}),$e(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()}),$e(Gt(n),"dragStartMousePosition",null),$e(Gt(n),"dragNodeProps",null),$e(Gt(n),"currentMouseOverDroppableNodeKey",null),$e(Gt(n),"listRef",C.createRef()),$e(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)})}),$e(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,B=D.onExpand,F=D.allowDrop,A=D.direction,O=f.pos,k=f.eventKey;if(n.currentMouseOverDroppableNodeKey!==k&&(n.currentMouseOverDroppableNodeKey=k),!n.dragNodeProps){n.resetDragState();return}var P=wf(l,n.dragNodeProps,f,x,n.dragStartMousePosition,F,b,v,p,A),M=P.dropPosition,_=P.dropLevelOffset,T=P.dropTargetKey,q=P.dropContainerKey,L=P.dropTargetPos,Y=P.dropAllowed,W=P.dragOverNodeKey;if(g.includes(T)||!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),B==null||B(z,{node:Lr(f),expanded:!0,nativeEvent:l.nativeEvent})}},800)),n.dragNodeProps.eventKey===T&&_===0){n.resetDragState();return}n.setState({dragOverNodeKey:W,dropPosition:M,dropLevelOffset:_,dropTargetKey:T,dropContainerKey:q,dropTargetPos:L,dropAllowed:Y}),m==null||m({event:l,node:Lr(f),expandedKeys:p})}),$e(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,B=D.allowDrop,F=D.direction;if(n.dragNodeProps){var A=wf(l,n.dragNodeProps,f,x,n.dragStartMousePosition,B,v,g,b,F),O=A.dropPosition,k=A.dropLevelOffset,P=A.dropTargetKey,M=A.dropContainerKey,_=A.dropTargetPos,T=A.dropAllowed,q=A.dragOverNodeKey;p.includes(P)||!T||(n.dragNodeProps.eventKey===P&&k===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&&k===n.state.dropLevelOffset&&P===n.state.dropTargetKey&&M===n.state.dropContainerKey&&_===n.state.dropTargetPos&&T===n.state.dropAllowed&&q===n.state.dragOverNodeKey||n.setState({dropPosition:O,dropLevelOffset:k,dropTargetKey:P,dropContainerKey:M,dropTargetPos:_,dropAllowed:T,dragOverNodeKey:q}),m==null||m({event:l,node:Lr(f)}))}}),$e(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)})}),$e(Gt(n),"onWindowDragEnd",function(l){n.onNodeDragEnd(l,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),$e(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)}),$e(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 B=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),x!==null){var F=ze(ze({},Ua(x,n.getTreeNodeRequiredProps())),{},{active:((d=n.getActiveItem())===null||d===void 0?void 0:d.key)===x,data:mn(n.state.keyEntities,x).node}),A=g.includes(x);Xn(!A,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var O=oc(D),k={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||B==null||B(k),n.dragNodeProps=null}}}),$e(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}),$e(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(B){return B.key===b})[0],m=Lr(ze(ze({},Ua(b,n.getTreeNodeRequiredProps())),{},{data:D.data}));n.setExpandedKeys(g?qn(p,b):ro(p,b)),n.onNodeExpand(l,m)}}),$e(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)}),$e(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)}),$e(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,B=f[g.key],F=!m;F?D?d=ro(d,B):d=[B]:d=qn(d,B);var A=d.map(function(O){var k=mn(v,O);return k?k.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:d}),x==null||x(d,{event:"select",selected:F,node:f,selectedNodes:A,nativeEvent:l.nativeEvent})}),$e(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,B=f.key,F,A={event:"check",node:f,checked:d,nativeEvent:l.nativeEvent};if(D){var O=d?ro(g,B):qn(g,B),k=qn(b,B);F={checked:O,halfChecked:k},A.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),[B]),!0,v),M=P.checkedKeys,_=P.halfCheckedKeys;if(!d){var T=new Set(M);T.delete(B);var q=ua(Array.from(T),{halfCheckedKeys:_},v);M=q.checkedKeys,_=q.halfCheckedKeys}F=M,A.checkedNodes=[],A.checkedNodesPositions=[],A.halfCheckedKeys=_,M.forEach(function(L){var Y=mn(v,L);if(Y){var W=Y.node,z=Y.pos;A.checkedNodes.push(W),A.checkedNodesPositions.push({node:W,pos:z})}}),n.setUncontrolledState({checkedKeys:M},!1,{halfCheckedKeys:_})}m==null||m(F,A)}),$e(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,B=m===void 0?[]:m,F=D.loadingKeys,A=F===void 0?[]:F,O=n.props,k=O.loadData,P=O.onLoad;if(!k||B.includes(d)||A.includes(d))return null;var M=k(l);return M.then(function(){var _=n.state.loadedKeys,T=ro(_,d);P==null||P(T,{event:"load",node:l}),n.setUncontrolledState({loadedKeys:T}),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]>=$6){var T=n.state.loadedKeys;Xn(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:ro(T,d)}),b()}x(_)}),{loadingKeys:ro(A,d)}})});return g.catch(function(){}),g}}),$e(Gt(n),"onNodeMouseEnter",function(l,f){var d=n.props.onMouseEnter;d==null||d({event:l,node:f})}),$e(Gt(n),"onNodeMouseLeave",function(l,f){var d=n.props.onMouseLeave;d==null||d({event:l,node:f})}),$e(Gt(n),"onNodeContextMenu",function(l,f){var d=n.props.onRightClick;d&&(l.preventDefault(),d({event:l,node:f}))}),$e(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)}),$e(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)}),$e(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}}),$e(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)}),$e(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,B=f[g.key];if(!v){var F=d.includes(B),A=!m;if(Xn(m&&F||!m&&!F,"Expand state not sync with index check"),d=A?ro(d,B):qn(d,B),n.setExpandedKeys(d),x==null||x(d,{node:f,expanded:A,nativeEvent:l.nativeEvent}),A&&D){var O=n.onNodeLoad(f);O&&O.then(function(){var k=ql(n.state.treeData,d,g);n.setUncontrolledState({flattenNodes:k})}).catch(function(){var k=n.state.expandedKeys,P=qn(k,B);n.setExpandedKeys(P)})}}}),$e(Gt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),$e(Gt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),$e(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))}),$e(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}),$e(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)}),$e(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 B=n.getActiveItem();if(B&&B.data){var F=n.getTreeNodeRequiredProps(),A=B.data.isLeaf===!1||!!(B.data[g.children]||[]).length,O=Lr(ze(ze({},Ua(d,F)),{},{data:B.data,active:!0}));switch(l.which){case Pr.LEFT:{A&&p.includes(d)?n.onNodeExpand({},O):B.parent&&n.onActiveChange(B.parent.key),l.preventDefault();break}case Pr.RIGHT:{A&&!p.includes(d)?n.onNodeExpand({},O):B.children&&B.children.length&&n.onActiveChange(B.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)}),$e(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(ze(ze({},g),d))}}),$e(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,B=m.prefixCls,F=m.className,A=m.style,O=m.showLine,k=m.focusable,P=m.tabIndex,M=P===void 0?0:P,_=m.selectable,T=m.showIcon,q=m.icon,L=m.switcherIcon,Y=m.draggable,W=m.checkable,z=m.checkStrictly,K=m.disabled,X=m.motion,V=m.loadData,Z=m.filterTreeNode,R=m.height,ie=m.itemHeight,me=m.scrollWidth,ye=m.virtual,ge=m.titleRender,ae=m.dropIndicatorRender,Se=m.onContextMenu,J=m.onScroll,he=m.direction,se=m.rootClassName,te=m.rootStyle,ue=vs(this.props,{aria:!0,data:!0}),Ce;Y&&(Cn(Y)==="object"?Ce=Y:typeof Y=="function"?Ce={nodeDraggable:Y}:Ce={});var xe={prefixCls:B,selectable:_,showIcon:T,icon:q,switcherIcon:L,draggable:Ce,draggingNodeKey:f,checkable:W,checkStrictly:z,disabled:K,keyEntities:l,dropLevelOffset:p,dropContainerKey:v,dropTargetKey:g,dropPosition:b,dragOverNodeKey:x,indent:D,direction:he,dropIndicatorRender:ae,loadData:V,filterTreeNode:Z,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:xe},C.createElement("div",{className:tt(B,F,se,$e($e($e({},"".concat(B,"-show-line"),O),"".concat(B,"-focused"),a),"".concat(B,"-active-focused"),d!==null)),style:te},C.createElement(F6,yt({ref:this.listRef,prefixCls:B,style:A,data:u,disabled:K,selectable:_,checkable:!!W,motion:X,dragging:f!==null,height:R,itemHeight:ie,virtual:ye,focusable:k,focused:a,tabIndex:M,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Se,onScroll:J,scrollWidth:me},this.getTreeNodeRequiredProps(),ue))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var u=a.prevProps,l={prevProps:o};function f(M){return!u&&o.hasOwnProperty(M)||u&&u[M]!==o[M]}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=ze($e({},Wo,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=ze({},g);delete b[Wo];var x=[];Object.keys(b).forEach(function(M){var _=b[M];_.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=Vl(o.checkedKeys)||{}:!u&&o.defaultCheckedKeys?m=Vl(o.defaultCheckedKeys)||{}:d&&(m=Vl(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),m){var B=m,F=B.checkedKeys,A=F===void 0?[]:F,O=B.halfCheckedKeys,k=O===void 0?[]:O;if(!o.checkStrictly){var P=ua(A,!0,g);A=P.checkedKeys,k=P.halfCheckedKeys}l.checkedKeys=A,l.halfCheckedKeys=k}}return f("loadedKeys")&&(l.loadedKeys=o.loadedKeys),l}}]),r})(C.Component);$e(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});$e(ac,"TreeNode",ri);var N6={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"},T6=function(t,r){return C.createElement(en,yt({},t,{ref:r,icon:N6}))},hm=C.forwardRef(T6),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"},M6=function(t,r){return C.createElement(en,yt({},t,{ref:r,icon:O6}))},R6=C.forwardRef(M6),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(en,yt({},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(en,yt({},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 k2("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}`}}}),V6=(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:'""'}}}),W6=(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`},V6(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=Vo(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[W6(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]:S2(`${t}-checkbox`,e)},U6(t,e),hp(e)],Y6),Ff=4;function J6(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 je.createElement("div",{style:f,className:`${n}-drop-indicator`})}var Z6={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(en,yt({},t,{ref:r,icon:Z6}))},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(en,yt({},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(en,yt({},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(B2,{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:tt((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:tt((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=je.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:u}=je.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:B,disabled:F,motion:A,style:O}=e,k=n("tree",l),P=n(),M=je.useContext(A2),_=F??M,T=A??Object.assign(Object.assign({},pp(P)),{motionAppear:!1}),q=Object.assign(Object.assign({},e),{checkable:D,selectable:m,showIcon:d,motion:T,blockNode:b,disabled:_,showLine:!!p,dropIndicatorRender:J6}),[L,Y,W]=G6(k),[,z]=z0(),K=z.paddingXS/2+(((r=z.Tree)===null||r===void 0?void 0:r.titleHeight)||z.controlHeightSM),X=je.useMemo(()=>{if(!B)return!1;let Z={};switch(typeof B){case"function":Z.nodeDraggable=B;break;case"object":Z=Object.assign({},B);break}return Z.icon!==!1&&(Z.icon=Z.icon||je.createElement(L6,null)),Z},[B]),V=Z=>je.createElement(s7,{prefixCls:k,switcherIcon:v,switcherLoadingIcon:g,treeNodeProps:Z,showLine:p});return L(je.createElement(ac,Object.assign({itemHeight:K,ref:t,virtual:a},q,{style:Object.assign(Object.assign({},u==null?void 0:u.style),O),prefixCls:k,className:tt({[`${k}-icon-hide`]:!d,[`${k}-block-node`]:b,[`${k}-unselectable`]:!m,[`${k}-rtl`]:o==="rtl",[`${k}-disabled`]:_},u==null?void 0:u.className,f,Y,W),direction:o,checkable:D&&je.createElement("span",{className:`${k}-checkbox-inner`}),selectable:m,switcherIcon:V,draggable:X}),x))}),$f=0,Wl=1,Nf=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=$f;if(r&&r===n)return[r];if(!r||!n)return[];function l(f){return f===r||f===n}return ic(e,f=>{if(u===Nf)return!1;if(l(f)){if(a.push(f),u===$f)u=Wl;else if(u===Wl)return u=Nf,!1}else u===Wl&&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 Tf=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=Tf(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const u=C.useRef(null),l=C.useRef(null),f=()=>{const{keyEntities:_}=Y0(Of(a),{fieldNames:a.fieldNames});let T;return r?T=Object.keys(_):n?T=Gu(a.expandedKeys||o||[],_):T=a.expandedKeys||o||[],T},[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=(_,T)=>{var q;return"expandedKeys"in a||g(_),(q=a.onExpand)===null||q===void 0?void 0:q.call(a,_,T)},x=(_,T)=>{var q;const{multiple:L,fieldNames:Y}=a,{node:W,nativeEvent:z}=T,{key:K=""}=W,X=Of(a),V=Object.assign(Object.assign({},T),{selected:!0}),Z=(z==null?void 0:z.ctrlKey)||(z==null?void 0:z.metaKey),R=z==null?void 0:z.shiftKey;let ie;L&&Z?(ie=_,u.current=K,l.current=ie,V.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}))))),V.selectedNodes=Ul(X,ie,Y)):(ie=[K],u.current=K,l.current=ie,V.selectedNodes=Ul(X,ie,Y)),(q=a.onSelect)===null||q===void 0||q.call(a,ie,V),"selectedKeys"in a||p(ie)},{getPrefixCls:D,direction:m}=C.useContext(fo),{prefixCls:B,className:F,showIcon:A=!0,expandAction:O="click"}=a,k=Tf(a,["prefixCls","className","showIcon","expandAction"]),P=D("tree",B),M=tt(`${P}-directory`,{[`${P}-directory-rtl`]:m==="rtl"},F);return C.createElement(pm,Object.assign({icon:u7,ref:t,blockNode:!0},k,{showIcon:A,expandAction:O,prefixCls:P,className:M,expandedKeys:v,selectedKeys:d,onSelect:x,onExpand:b}))},d7=C.forwardRef(c7),sc=pm;sc.DirectoryTree=d7;sc.TreeNode=ri;const Mf=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($2,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:B,getPopupContainer:F,rootClassName:A}=e,{filterResetToDefaultFilteredValue:O,defaultFilteredValue:k,filterDropdownProps:P={},filterDropdownOpen:M,filterDropdownVisible:_,onFilterDropdownVisibleChange:T,onFilterDropdownOpenChange:q}=l,[L,Y]=C.useState(!1),W=!!(x&&(!((t=x.filteredKeys)===null||t===void 0)&&t.length||x.forceFiltered)),z=Oe=>{var _e;Y(Oe),(_e=P.onOpenChange)===null||_e===void 0||_e.call(P,Oe),q==null||q(Oe),T==null||T(Oe)},K=(o=(n=(r=P.open)!==null&&r!==void 0?r:M)!==null&&n!==void 0?n:_)!==null&&o!==void 0?o:L,X=x==null?void 0:x.filteredKeys,[V,Z]=q2(Xl(X)),R=({selectedKeys:Oe})=>{Z(Oe)},ie=(Oe,{node:_e,checked:We})=>{R(v?{selectedKeys:Oe}:{selectedKeys:We&&_e.key?[_e.key]:[]})};C.useEffect(()=>{L&&R({selectedKeys:Xl(X)})},[X]);const[me,ye]=C.useState([]),ge=Oe=>{ye(Oe)},[ae,Se]=C.useState(""),J=Oe=>{const{value:_e}=Oe.target;Se(_e)};C.useEffect(()=>{L||Se("")},[L]);const he=Oe=>{const _e=Oe!=null&&Oe.length?Oe:null;if(_e===null&&(!x||!x.filteredKeys)||ko(_e,x==null?void 0:x.filteredKeys,!0))return null;D({column:l,key:d,filteredKeys:_e})},se=()=>{z(!1),he(V())},te=({confirm:Oe,closeDropdown:_e}={confirm:!1,closeDropdown:!1})=>{Oe&&he([]),_e&&z(!1),Se(""),Z(O?(k||[]).map(We=>String(We)):[])},ue=({closeDropdown:Oe}={closeDropdown:!0})=>{Oe&&z(!1),he(V())},Ce=(Oe,_e)=>{_e.source==="trigger"&&(Oe&&X!==void 0&&Z(Xl(X)),z(Oe),!Oe&&!l.filterDropdown&&p&&se())},xe=tt({[`${f}-menu-without-submenu`]:!p7(l.filters||[])}),ke=Oe=>{if(Oe.target.checked){const _e=ca(l==null?void 0:l.filters).map(We=>String(We));Z(_e)}else Z([])},De=({filters:Oe})=>(Oe||[]).map((_e,We)=>{const ct=String(_e.value),at={title:_e.text,key:_e.value!==void 0?ct:String(We)};return _e.children&&(at.children=De({filters:_e.children})),at}),Be=Oe=>{var _e;return Object.assign(Object.assign({},Oe),{text:Oe.title,value:Oe.key,children:((_e=Oe.children)===null||_e===void 0?void 0:_e.map(We=>Be(We)))||[]})};let Ne;const{direction:Me,renderEmpty:He}=C.useContext(fo);if(typeof l.filterDropdown=="function")Ne=l.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:Oe=>R({selectedKeys:Oe}),selectedKeys:V(),confirm:ue,clearFilters:te,filters:l.filters,visible:K,close:()=>{z(!1)}});else if(l.filterDropdown)Ne=l.filterDropdown;else{const Oe=V()||[],_e=()=>{var ct,at;const Qe=(ct=He==null?void 0:He("Table.filter"))!==null&&ct!==void 0?ct: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 Qe;if(g==="tree")return C.createElement(C.Fragment,null,C.createElement(Mf,{filterSearch:b,value:ae,onChange:J,tablePrefixCls:a,locale:m}),C.createElement("div",{className:`${a}-filter-dropdown-tree`},v?C.createElement(bs,{checked:Oe.length===ca(l.filters).length,indeterminate:Oe.length>0&&Oe.length<ca(l.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:ke},(at=m==null?void 0:m.filterCheckall)!==null&&at!==void 0?at: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:Oe,selectedKeys:Oe,showIcon:!1,treeData:De({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:ae.trim()?mt=>typeof b=="function"?b(ae,Be(mt)):mm(ae,mt.title):void 0})));const Nt=gm({filters:l.filters||[],filterSearch:b,prefixCls:u,filteredKeys:V(),filterMultiple:v,searchValue:ae}),Ct=Nt.every(mt=>mt===null);return C.createElement(C.Fragment,null,C.createElement(Mf,{filterSearch:b,value:ae,onChange:J,tablePrefixCls:a,locale:m}),Ct?Qe:C.createElement(Ea,{selectable:!0,multiple:v,prefixCls:`${f}-menu`,className:xe,onSelect:R,onDeselect:R,selectedKeys:Oe,getPopupContainer:F,openKeys:me,onOpenChange:ge,items:Nt}))},We=()=>O?ko((k||[]).map(ct=>String(ct)),Oe,!0):Oe.length===0;Ne=C.createElement(C.Fragment,null,_e(),C.createElement("div",{className:`${u}-dropdown-btns`},C.createElement(ms,{type:"link",size:"small",disabled:We(),onClick:()=>te()},m.filterReset),C.createElement(ms,{type:"primary",size:"small",onClick:se},m.filterConfirm)))}l.filterDropdown&&(Ne=C.createElement(Rp,{selectable:void 0},Ne)),Ne=C.createElement(h7,{className:`${u}-dropdown`},Ne);const ot=gp({trigger:["click"],placement:Me==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let Oe;return typeof l.filterIcon=="function"?Oe=l.filterIcon(W):l.filterIcon?Oe=l.filterIcon:Oe=C.createElement(x6,null),C.createElement("span",{role:"button",tabIndex:-1,className:tt(`${u}-trigger`,{active:W}),onClick:_e=>{_e.stopPropagation()}},Oe)})(),getPopupContainer:F},Object.assign(Object.assign({},P),{rootClassName:tt(A,P.rootClassName),open:K,onOpenChange:Ce,popupRender:()=>typeof(P==null?void 0:P.dropdownRender)=="function"?P.dropdownRender(Ne):Ne}));return C.createElement("div",{className:`${u}-column`},C.createElement("span",{className:`${a}-column-title`},B),C.createElement(G0,Object.assign({},ot)))},t0=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var u;const l=Aa(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:Ao(o,l),filteredKeys:d,forceFiltered:o.filtered})}else n.push({column:o,key:Ao(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=Aa(p,l),{filterOnClose:g=!0,filterMultiple:b=!0,filterMode:x,filterSearch:D}=d;let m=d;if(m.filters||m.filterDropdown){const B=Ao(m,v),F=n.find(({key:A})=>B===A);m=Object.assign(Object.assign({},m),{title:A=>C.createElement(m7,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:B,filterState:F,filterOnClose:g,filterMultiple:b,filterMode:x,filterSearch:D,triggerFilter:a,locale:o,getPopupContainer:u,rootClassName:f},Ys(d.title,A))})}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:B})=>{B!==void 0&&(m=!1)}),m){const B=(f||[]).map((F,A)=>Ao(F,Aa(A)));return d.filter(({key:F})=>B.includes(F)).map(F=>{const A=f[B.indexOf(F.key)];return Object.assign(Object.assign({},F),{column:Object.assign(Object.assign({},F.column),A),forceFiltered:A.filtered})})}return D},[f,d]),g=C.useMemo(()=>Rf(v),[v]),b=D=>{const m=v.filter(({key:B})=>B!==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(en,yt({},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"},S7=function(t,r){return C.createElement(en,yt({},t,{ref:r,icon:E7}))},k7=C.forwardRef(S7);const Qi="ascend",Yl="descend",Ss=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,B7=(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:Ao(a,u),multiplePriority:Ss(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,u)=>{const l=Aa(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:Ao(a,l),multiplePriority:Ss(a),sortOrder:a.defaultSortOrder}))}),n},xm=(e,t,r,n,o,a,u,l)=>(t||[]).map((d,p)=>{const v=Aa(p,l);let g=d;if(g.sorter){const b=g.sortDirections||o,x=g.showSorterTooltip===void 0?u:g.showSorterTooltip,D=Ao(g,v),m=r.find(({key:T})=>T===D),B=m?m.sortOrder:null,F=B7(b,B);let A;if(d.sortIcon)A=d.sortIcon({sortOrder:B});else{const T=b.includes(Qi)&&C.createElement(k7,{className:tt(`${e}-column-sorter-up`,{active:B===Qi})}),q=b.includes(Yl)&&C.createElement(D7,{className:tt(`${e}-column-sorter-down`,{active:B===Yl})});A=C.createElement("span",{className:tt(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(T&&q)})},C.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},T,q))}const{cancelSort:O,triggerAsc:k,triggerDesc:P}=a||{};let M=O;F===Yl?M=P:F===Qi&&(M=k);const _=typeof x=="object"?Object.assign({title:M},x):{title:M};g=Object.assign(Object.assign({},g),{className:tt(g.className,{[`${e}-column-sort`]:B}),title:T=>{const q=`${e}-column-sorters`,L=C.createElement("span",{className:`${e}-column-title`},Ys(d.title,T)),Y=C.createElement("div",{className:q},L,A);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({},_),A)):C.createElement(hs,Object.assign({},_),Y):Y},onHeaderCell:T=>{var q;const L=((q=d.onHeaderCell)===null||q===void 0?void 0:q.call(d,T))||{},Y=L.onClick,W=L.onKeyDown;L.onClick=X=>{n({column:d,key:D,sortOrder:F,multiplePriority:Ss(d)}),Y==null||Y(X)},L.onKeyDown=X=>{X.keyCode===Pr.ENTER&&(n({column:d,key:D,sortOrder:F,multiplePriority:Ss(d)}),W==null||W(X))};const z=v6(d.title,{}),K=z==null?void 0:z.toString();return B&&(L["aria-sort"]=B==="ascend"?"ascending":"descending"),L["aria-label"]=K||"",L.className=tt(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},A7=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 B=[];return D.forEach((F,A)=>{const O=Aa(A,m);if(B.push(Ao(F,O)),Array.isArray(F.children)){const k=d(F.children,O);B.push.apply(B,zt(k))}}),B},p=C.useMemo(()=>{let D=!0;const m=n0(r,!1);if(!m.length){const O=d(r);return l.filter(({key:k})=>O.includes(k))}const B=[];function F(O){D?B.push(O):B.push(Object.assign(Object.assign({},O),{sortOrder:null}))}let A=null;return m.forEach(O=>{A===null?(F(O),O.sortOrder&&(O.multiplePriority===!1?D=!1:A=!0)):(A&&O.multiplePriority!==!1||(D=!1),F(O))}),B},[r,l]),v=C.useMemo(()=>{var D,m;const B=p.map(({column:F,sortOrder:A})=>({column:F,order:A}));return{sortColumns:B,sortColumn:(D=B[0])===null||D===void 0?void 0:D.column,sortOrder:(m=B[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:B})=>B!==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])],$7=sm((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),N7=um((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),T7=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"}})}}},M7=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:B,expandIconScale:F,calc:A}=e,O=`${Je(o)} ${u} ${l}`,k=A(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({},N2(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:B,insetInlineEnd:k,insetInlineStart:k,height:o},"&::after":{top:k,bottom:k,insetInlineStart:B,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop: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(A(v).mul(-1).equal())} ${Je(A(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:B,colorPrimary:F,tableHeaderFilterActiveBg:A,colorTextDisabled:O,tableFilterDropdownBg:k,tableFilterDropdownHeight:P,controlItemBgHover:M,controlItemBgActive:_,boxShadowSecondary:T,filterDropdownMenuBg:q,calc:L}=e,Y=`${r}-dropdown`,W=`${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:B,background:A},"&.active":{color:F}}}},{[`${r}-dropdown`]:{[W]:Object.assign(Object.assign({},gi(e)),{minWidth:o,backgroundColor:k,borderRadius:D,boxShadow:T,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"'}},[`${W}-tree`]:{paddingBlock:`${Je(l)} 0`,paddingInline:l,[z]:{padding:0},[`${z}-treenode ${z}-node-content-wrapper:hover`]:{backgroundColor:M},[`${z}-treenode-checkbox-checked ${z}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:_}}},[`${W}-search`]:{padding:l,borderBottom:K,"&-input":{input:{minWidth:a},[n]:{color:O}}},[`${W}-checkall`]:{width:"100%",marginBottom:u,marginInlineStart:u},[`${W}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Je(L(l).sub(d).equal())} ${Je(l)}`,overflow:"hidden",borderTop:K}})}},{[`${r}-dropdown ${W}, ${W}-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}`}}}},V7=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}}}}}},W7=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:B,calc:F}=e,A=`${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:A,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:A,[`
|
|
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:A,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:B}})}},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:B,lineWidth:F,colorIcon:A,colorIconHover:O,opacityLoading:k,controlInteractiveSize:P}=e,M=new gn(o).onBackground(r).toHexString(),_=new gn(a).onBackground(r).toHexString(),T=new gn(t).onBackground(r).toHexString(),q=new gn(A),L=new gn(O),Y=P/2-F,W=Y*2+F*3;return{headerBg:T,headerColor:n,headerSortActiveBg:M,headerSortHoverBg:_,bodySortBg:T,rowHoverBg:T,rowSelectedBg:u,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:p,cellPaddingBlockSM:p,cellPaddingInlineSM:p,borderColor:v,headerBorderRadius:g,footerBg:T,footerColor:n,cellFontSize:D,cellFontSizeMD:D,cellFontSizeSM:D,headerSplitColor:v,fixedHeaderSortActiveBg:M,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:b,stickyScrollBarBg:x,stickyScrollBarBorderRadius:100,expandIconMarginTop:(D*B-F*3)/2-Math.ceil((m*1.4-F*3)/2),headerIconColor:q.clone().setA(q.a*k).toRgbString(),headerIconHoverColor:L.clone().setA(L.a*k).toRgbString(),expandIconHalfInner:Y,expandIconSize:W,expandIconScale:P/W}},_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:B,cellPaddingBlockSM:F,cellPaddingInlineSM:A,borderColor:O,footerBg:k,footerColor:P,headerBorderRadius:M,cellFontSize:_,cellFontSizeMD:T,cellFontSizeSM:q,headerSplitColor:L,fixedHeaderSortActiveBg:Y,headerFilterHoverBg:W,filterDropdownBg:z,expandIconBg:K,selectionColumnWidth:X,stickyScrollBarBg:V,calc:Z}=e,R=Vo(e,{tableFontSize:_,tableBg:n,tableRadius:M,tablePaddingVertical:x,tablePaddingHorizontal:D,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:B,tablePaddingVerticalSmall:F,tablePaddingHorizontalSmall:A,tableBorderColor:O,tableHeaderTextColor:u,tableHeaderBg:a,tableFooterTextColor:P,tableFooterBg:k,tableHeaderCellSplitColor:L,tableHeaderSortBg:l,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:Y,tableHeaderFilterActiveBg:W,tableFilterDropdownBg:z,tableRowHoverBg:p,tableSelectedRowBg:v,tableSelectedRowHoverBg:g,zIndexTableFixed:_f,zIndexTableSticky:Z(_f).add(1).equal({unit:!1}),tableFontSizeMiddle:T,tableFontSizeSmall:q,tableSelectionColumnWidth:X,tableExpandIconBg:K,tableExpandColumnWidth:Z(o).add(Z(e.padding).mul(2)).equal(),tableExpandedRowBg:b,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:V,tableScrollThumbBgHover:t,tableScrollBg:r});return[W7(R),z7(R),jf(R),K7(R),I7(R),T7(R),j7(R),R7(R),jf(R),M7(R),L7(R),P7(R),q7(R),O7(R),H7(R),_7(R),V7(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:B,childrenColumnName:F,onChange:A,getPopupContainer:O,loading:k,expandIcon:P,expandable:M,expandedRowRender:_,expandIconColumnIndex:T,indentSize:q,scroll:L,sortDirections:Y,locale:W,showSorterTooltip:z={target:"full-header"},virtual:K}=e;Ls();const X=C.useMemo(()=>m||tc(B),[m,B]),V=C.useMemo(()=>X.some(Ke=>Ke.responsive),[X]),Z=T2(V),R=C.useMemo(()=>{const Ke=new Set(Object.keys(Z).filter(xt=>Z[xt]));return X.filter(xt=>!xt.responsive||xt.responsive.some(et=>Ke.has(et)))},[X,Z]),ie=co(e,["className","style","columns"]),{locale:me=O2,direction:ye,table:ge,renderEmpty:ae,getPrefixCls:Se,getPopupContainer:J}=C.useContext(fo),he=M2(f),se=Object.assign(Object.assign({},me.Table),W),te=v||Lf,ue=Se("table",o),Ce=Se("dropdown",p),[,xe]=z0(),ke=vi(ue),[De,Be,Ne]=X7(ue,ke),Me=Object.assign(Object.assign({childrenColumnName:F,expandIconColumnIndex:T},M),{expandIcon:(r=M==null?void 0:M.expandIcon)!==null&&r!==void 0?r:(n=ge==null?void 0:ge.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:He="children"}=Me,ft=C.useMemo(()=>te.some(Ke=>Ke==null?void 0:Ke[He])?"nest":_||M!=null&&M.expandedRowRender?"row":null,[te]),ot={body:C.useRef(null)},Oe=g6(ue),_e=C.useRef(null),We=C.useRef(null);K2(t,()=>Object.assign(Object.assign({},We.current),{nativeElement:_e.current}));const ct=C.useMemo(()=>typeof x=="function"?x:Ke=>Ke==null?void 0:Ke[x],[x]),[at]=v7(te,He,ct),Qe={},Nt=(Ke,xt,et=!1)=>{var Tt,ar,Nr,ee;const br=Object.assign(Object.assign({},Qe),Ke);et&&((Tt=Qe.resetPagination)===null||Tt===void 0||Tt.call(Qe),!((ar=br.pagination)===null||ar===void 0)&&ar.current&&(br.pagination.current=1),g&&((Nr=g.onChange)===null||Nr===void 0||Nr.call(g,1,(ee=br.pagination)===null||ee===void 0?void 0:ee.pageSize))),L&&L.scrollToFirstRowOnChange!==!1&&ot.body.current&&_2(0,{getContainer:()=>ot.body.current}),A==null||A(br.pagination,br.filters,br.sorter,{currentDataSource:r0(o0(te,br.sorterStates,He),br.filterStates,He),action:xt})},Ct=(Ke,xt)=>{Nt({sorter:Ke,sorterStates:xt},"sort",!1)},[mt,dt,Pe,fe]=A7({prefixCls:ue,mergedColumns:R,onSorterChange:Ct,sortDirections:Y||["ascend","descend"],tableLocale:se,showSorterTooltip:z}),gt=C.useMemo(()=>o0(te,dt,He),[te,dt]);Qe.sorter=fe(),Qe.sorterStates=dt;const St=(Ke,xt)=>{Nt({filters:Ke,filterStates:xt},"filter",!0)},[Ft,Et,or]=g7({prefixCls:ue,locale:se,dropdownPrefixCls:Ce,mergedColumns:R,onFilterChange:St,getPopupContainer:O||J,rootClassName:tt(u,ke)}),Bt=r0(gt,Et,He);Qe.filters=or,Qe.filterStates=Et;const Rt=C.useMemo(()=>{const Ke={};return Object.keys(or).forEach(xt=>{or[xt]!==null&&(Ke[xt]=or[xt])}),Object.assign(Object.assign({},Pe),{filters:Ke})},[Pe,or]),[tr]=F7(Rt),ur=(Ke,xt)=>{Nt({pagination:Object.assign(Object.assign({},Qe.pagination),{current:Ke,pageSize:xt})},"paginate")},[At,Ht]=x7(Bt.length,ur,g);Qe.pagination=g===!1?{}:y7(At,g),Qe.resetPagination=Ht;const jt=C.useMemo(()=>{if(g===!1||!At.pageSize)return Bt;const{current:Ke=1,total:xt,pageSize:et=ym}=At;return Bt.length<xt?Bt.length>et?Bt.slice((Ke-1)*et,Ke*et):Bt:Bt.slice((Ke-1)*et,Ke*et)},[!!g,Bt,At==null?void 0:At.current,At==null?void 0:At.pageSize,At==null?void 0:At.total]),[Cr,zr]=p6({prefixCls:ue,data:Bt,pageData:jt,getRowKey:ct,getRecordByKey:at,expandType:ft,childrenColumnName:He,locale:se,getPopupContainer:O||J},b),jr=(Ke,xt,et)=>{let Tt;return typeof D=="function"?Tt=tt(D(Ke,xt,et)):Tt=tt(D),tt({[`${ue}-row-selected`]:zr.has(ct(Ke,xt))},Tt)};Me.__PARENT_RENDER_ICON__=Me.expandIcon,Me.expandIcon=Me.expandIcon||P||m6(se),ft==="nest"&&Me.expandIconColumnIndex===void 0?Me.expandIconColumnIndex=b?1:0:Me.expandIconColumnIndex>0&&b&&(Me.expandIconColumnIndex-=1),typeof Me.indentSize!="number"&&(Me.indentSize=typeof q=="number"?q:15);const Mr=C.useCallback(Ke=>tr(Cr(Ft(mt(Ke)))),[mt,Ft,Cr]),vr=()=>{if(g===!1||!(At!=null&&At.total))return{};const Ke=()=>At.size||(he==="small"||he==="middle"?"small":void 0),xt=Le=>{const de=Le==="left"?"start":Le==="right"?"end":Le;return C.createElement(bp,Object.assign({},At,{align:At.align||de,className:tt(`${ue}-pagination`,At.className),size:Ke()}))},et=ye==="rtl"?"left":"right",Tt=At.position;if(Tt===null||!Array.isArray(Tt))return{bottom:xt(et)};const ar=Tt.find(Le=>typeof Le=="string"&&Le.toLowerCase().includes("top")),Nr=Tt.find(Le=>typeof Le=="string"&&Le.toLowerCase().includes("bottom")),ee=Tt.every(Le=>`${Le}`=="none"),br=ar?ar.toLowerCase().replace("top",""):"",oe=Nr?Nr.toLowerCase().replace("bottom",""):"",ce=!ar&&!Nr&&!ee,Te=()=>br?xt(br):void 0,st=()=>{if(oe)return xt(oe);if(ce)return xt(et)};return{top:Te(),bottom:st()}},pr=C.useMemo(()=>typeof k=="boolean"?{spinning:k}:typeof k=="object"&&k!==null?Object.assign({spinning:!0},k):void 0,[k]),_t=tt(Ne,ke,`${ue}-wrapper`,ge==null?void 0:ge.className,{[`${ue}-wrapper-rtl`]:ye==="rtl"},a,u,Be),w=Object.assign(Object.assign({},ge==null?void 0:ge.style),l),E=C.useMemo(()=>pr!=null&&pr.spinning&&te===Lf?null:typeof(W==null?void 0:W.emptyText)<"u"?W.emptyText:(ae==null?void 0:ae("Table"))||C.createElement(R2,{componentName:"Table"}),[pr==null?void 0:pr.spinning,te,W==null?void 0:W.emptyText,ae]),Ie=K?N7:$7,N={},Q=C.useMemo(()=>{const{fontSize:Ke,lineHeight:xt,lineWidth:et,padding:Tt,paddingXS:ar,paddingSM:Nr}=xe,ee=Math.floor(Ke*xt);switch(he){case"middle":return Nr*2+ee+et;case"small":return ar*2+ee+et;default:return Tt*2+ee+et}},[xe,he]);K&&(N.listItemHeight=Q);const{top:Jt,bottom:rt}=vr();return De(C.createElement("div",{ref:_e,className:_t,style:w},C.createElement(vp,Object.assign({spinning:!1},pr),Jt,C.createElement(Ie,Object.assign({},N,ie,{ref:We,columns:R,direction:ye,expandable:Me,prefixCls:ue,className:tt({[`${ue}-middle`]:he==="middle",[`${ue}-small`]:he==="small",[`${ue}-bordered`]:d,[`${ue}-empty`]:te.length===0},Ne,ke,Be),data:jt,rowKey:ct,rowClassName:jr,emptyText:E,internalHooks:wi,internalRefs:ot,transformColumns:Mr,getContainerWidth:Oe,measureRowRender:Ke=>C.createElement(I2,{getPopupContainer:xt=>xt},Ke)})),rt)))},G7=C.forwardRef(Y7),J7=(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(J7);ho.SELECTION_COLUMN=yo;ho.EXPAND_COLUMN=wo;ho.SELECTION_ALL=Ju;ho.SELECTION_INVERT=Zu;ho.SELECTION_NONE=Qu;ho.Column=o6;ho.ColumnGroup=a6;ho.Summary=Jp;var xn={},Z7=Object.defineProperty,Q7=(e,t,r)=>t in e?Z7(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=je,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 Vf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Qr(e){var t,r;return Vf(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Vf(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Cm=Symbol.for("immer-nothing"),Wf=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[Wf]||!!((t=e.constructor)!=null&&t[Wf])||Ci(e)||Zs(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 ks(e,t,r=!0){Js(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 Js(e){const t=e[wn];return t?t.type_:Array.isArray(e)?1:Ci(e)?2:Zs(e)?3:0}function a0(e,t){return Js(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Em(e,t,r){const n=Js(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 Zs(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(Zs(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)||(Js(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 Sm(){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=Bs(t,e),t.parent_||As(t,e)),t.patches_&&Yo("Patches").generateReplacementPatches_(r[wn].base_,e,t.patches_,t.inversePatches_)):e=Bs(t,r,[]),s0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Cm?e:void 0}function Bs(e,t,r){if(Qs(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[wn];if(!o)return ks(t,(a,u)=>Jf(e,o,t,a,u,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return As(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),ks(u,(f,d)=>Jf(e,o,a,f,d,r,l),n),As(e,a,!1),r&&e.patches_&&Yo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Jf(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=Bs(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;Bs(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Ci(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&As(e,o)}}}function As(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_:Sm(),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)?(Jl(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=km(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;Jl(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,Jl(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={};ks(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=km(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function km(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 Jl(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):Zs(e)?Yo("MapSet").proxySet_(e,t):lb(e,t);return(t?t.scope_:Sm()).drafts_.push(r),r}function db(e){return Uo(e)||On(10,e),Bm(e)}function Bm(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 ks(r,(o,a)=>{Em(r,o,Bm(a))},n),t&&(t.finalized_=!1),r}var ii=new cb,cc=ii.produce,Zf=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,$s=new WeakMap,Ya=new WeakMap,Am=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 un(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){un(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=Ze.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=Ze.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:B}=r,F=Ze.get(e,B),A=ne.previous(B),O=Ze.get(e,A),k=Ze.parent(e,B),P=B[B.length-1];if(ht.isText(F)&&ht.isText(O))O.text+=F.text;else if(!ht.isText(F)&&!ht.isText(O))O.children.push(...F.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(B,"] to nodes of different interfaces: ").concat(Xr.stringify(F)," ").concat(Xr.stringify(O)));if(k.children.splice(P,1),t)for(var[M,_]of Fe.points(t))t[_]=Xt.transform(M,r);break}case"move_node":{var{path:T,newPath:q}=r;if(ne.isAncestor(T,q))throw new Error("Cannot move a path [".concat(T,"] to new path [").concat(q,"] because the destination is inside itself."));var L=Ze.get(e,T),Y=Ze.parent(e,T),W=T[T.length-1];Y.children.splice(W,1);var z=ne.transform(T,r),K=Ze.get(e,ne.parent(z)),X=z[z.length-1];if(K.children.splice(X,0,L),t)for(var[V,Z]of Fe.points(t))t[Z]=Xt.transform(V,r);break}case"remove_node":{var{path:R}=r,ie=R[R.length-1],me=Ze.parent(e,R);if(me.children.splice(ie,1),t)for(var[ye,ge]of Fe.points(t)){var ae=Xt.transform(ye,r);if(t!=null&&ae!=null)t[ge]=ae;else{var Se=void 0,J=void 0;for(var[he,se]of Ze.texts(e))if(ne.compare(se,R)===-1)Se=[he,se];else{J=[he,se];break}var te=!1;Se&&J&&(ne.equals(J[1],R)?te=!ne.hasPrevious(J[1]):te=ne.common(Se[1],R).length<ne.common(J[1],R).length),Se&&!te?(ye.path=Se[1],ye.offset=Se[0].text.length):J?(ye.path=J[1],ye.offset=0):t=null}}break}case"remove_text":{var{path:ue,offset:Ce,text:xe}=r;if(xe.length===0)break;var ke=Ze.leaf(e,ue),De=ke.text.slice(0,Ce),Be=ke.text.slice(Ce+xe.length);if(ke.text=De+Be,t)for(var[Ne,Me]of Fe.points(t))t[Me]=Xt.transform(Ne,r);break}case"set_node":{var{path:He,properties:ft,newProperties:ot}=r;if(He.length===0)throw new Error("Cannot set properties on the root node!");var Oe=Ze.get(e,He);for(var _e in ot){if(_e==="children"||_e==="text")throw new Error('Cannot set the "'.concat(_e,'" property of nodes!'));var We=ot[_e];We==null?delete Oe[_e]:Oe[_e]=We}for(var ct in ft)ot.hasOwnProperty(ct)||delete Oe[ct];break}case"set_selection":{var{newProperties:at}=r;if(at==null)t=at;else{if(t==null){if(!Fe.isRange(at))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Xr.stringify(at)," when there is no current selection."));t=za({},at)}for(var Qe in at){var Nt=at[Qe];if(Nt==null){if(Qe==="anchor"||Qe==="focus")throw new Error('Cannot remove the "'.concat(Qe,'" selection property'));delete t[Qe]}else t[Qe]=Nt}}break}case"split_node":{var{path:Ct,position:mt,properties:dt}=r;if(Ct.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Ct,"] because the root node cannot be split."));var Pe=Ze.get(e,Ct),fe=Ze.parent(e,Ct),gt=Ct[Ct.length-1],St;if(ht.isText(Pe)){var Ft=Pe.text.slice(0,mt),Et=Pe.text.slice(mt);Pe.text=Ft,St=za(za({},dt),{},{text:Et})}else{var or=Pe.children.slice(0,mt),Bt=Pe.children.slice(mt);Pe.children=or,St=za(za({},dt),{},{children:Bt})}if(fe.children.splice(gt+1,0,St),t)for(var[Rt,tr]of Fe.points(t))t[tr]=Xt.transform(Rt,r);break}}return t},bb={transform(e,t){e.children=Zf(e.children);var r=e.selection&&Zf(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(Qr(n)&&Qr(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){un(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 Qr(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=>Qr(e)&&Ze.isNodeList(e.children)&&!I.isEditor(e),bt={isAncestor(e){return Qr(e)&&Ze.isNodeList(e.children)},isElement:ah,isElementList(e){return Array.isArray(e)&&e.every(t=>bt.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"],Sb=["text"],ih=new WeakMap,Ze={ancestor(e,t){var r=Ze.get(e,t);if(ht.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Xr.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=Ze.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(ht.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Xr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Xr.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=Ze.ancestor(e,t),{children:a}=o,u=n?a.length-1:0;n?u>=0:u<a.length;){var l=Ze.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=Ze.get(e,n);return[o,n]},descendant(e,t){var r=Ze.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(Xr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ze.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 Ze.nodes(e,t))bt.isElement(r)&&(yield[r,n])})()},extractProps(e){if(bt.isAncestor(e)){var t=lo(e,Eb);return t}else{var t=lo(e,Sb);return t}},first(e,t){for(var r=t.slice(),n=Ze.get(e,r);n&&!(ht.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(ht.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Xr.stringify(e)));var r=cc({children:e.children},n=>{var[o,a]=Fe.edges(t),u=Ze.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=Ze.parent(n,l),d=l[l.length-1];f.children.splice(d,1)}if(ne.equals(l,a.path)){var p=Ze.leaf(n,l);p.text=p.text.slice(0,a.offset)}if(ne.equals(l,o.path)){var v=Ze.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(ht.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Xr.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(ht.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return ht.isText(e)||bt.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=>Ze.isNode(n));return ih.set(e,r),r},last(e,t){for(var r=t.slice(),n=Ze.get(e,r);n&&!(ht.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=Ze.get(e,t);if(!ht.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Xr.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=Ze.get(e,n);yield[o,n]}})()},matches(e,t){return bt.isElement(e)&&bt.isElementProps(t)&&bt.matches(e,t)||ht.isText(e)&&ht.isTextProps(t)&&ht.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)&&!ht.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=Ze.get(e,l);continue}if(l.length===0)break;if(!n){var p=ne.next(l);if(Ze.has(e,p)){l=p,f=Ze.get(e,l);continue}}if(n&&l[l.length-1]!==0){var v=ne.previous(l);l=v,f=Ze.get(e,l);continue}l=ne.parent(l),f=Ze.get(e,l),u.add(f)}})()},parent(e,t){var r=ne.parent(t),n=Ze.get(e,r);if(ht.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 ht.isText(e)?e.text:e.children.map(Ze.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ze.nodes(e,t))ht.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){un(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(!Qr(e))return!1;switch(e.type){case"insert_node":return ne.isPath(e.path)&&Ze.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)&&Qr(e.properties);case"move_node":return ne.isPath(e.path)&&ne.isPath(e.newPath);case"remove_node":return ne.isPath(e.path)&&Ze.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)&&Qr(e.properties)&&Qr(e.newProperties);case"set_selection":return e.properties===null&&Fe.isRange(e.newProperties)||e.newProperties===null&&Fe.isRange(e.properties)||Qr(e.properties)&&Qr(e.newProperties);case"split_node":return ne.isPath(e.path)&&typeof e.position=="number"&&Qr(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,kb=e=>{var t=lh.get(e);if(t!==void 0)return t;if(!Qr(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||Qr(e.marks))&&(e.selection===null||Fe.isRange(e.selection))&&Ze.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 kb(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)},Bb={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){un(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 Qr(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,Xr={setScrubber(e){dh=e},stringify(e){return JSON.stringify(e,dh)}},Ab=["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){un(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 ht={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,Ab);return u}return Fm(n?o(e):e,n?o(t):t)},isText(e){return Qr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>ht.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 B=p-b;m=to(to({},x),{},{text:x.text.slice(B)}),x=to(to({},x),{},{text:x.text.slice(0,B)})}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=Zb(e.substring(0,e.length-u)),!f)||o!==It.None&&a!==It.None&&Yb(o,a))break;u+=d.length}return u||1},$b=/\s/,Nb=/[\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]/,Tb=/['\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(Mb(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)]},Mb=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if($b.test(t))return!1;if(Tb.test(t)){var o=fc(r,n),[a,u]=hc(r,o,n);if(e(a,u,n))return!0}return!Nb.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]$/,Vb=/^[\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]$/,Wb=/^(?:[\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(Vb)!==-1&&(r|=It.LVT),e.search(Wb)!==-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,Jb=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Zb=e=>{var t=e.match(Jb);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);qe.delete(e,{at:o,voids:n});var d=l.unref(),p=f.unref();o=d||p,qe.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){un(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 qe=ji(ji(ji(ji({},bb),yb),xb),Qb),es=new WeakMap,ey=e=>es.get(e)||!1,ty=(e,t,r)=>{var n=es.get(e)||!1;es.set(e,!0);try{t(),r()}finally{es.set(e,n)}};function $m(e,t,r){var n=Fs.get(e)||[],o=$s.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),$s.set(e,u)}var ry=(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(!ey(e)){var a=ne.operationCanTransformPath(t)?u=>ne.transform(u,t):void 0;$m(e,e.getDirtyPaths(t),a)}qe.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=[]}))},ny=(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=ht.isText(n)?[]:Array.from(Ze.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 B=ne.transform(m,t);b.push(B)}var F=b[b.length-1],A=v[v.length-1],O=F.concat(A);return[...g,...b,O]}case"remove_node":{var{path:k}=t,P=ne.ancestors(k);return[...P]}case"split_node":{var{path:M}=t,_=ne.levels(M),T=ne.next(M);return[..._,T]}default:return[]}},oy=e=>{var{selection:t}=e;return t?Ze.fragment(e,t):[]},ay=(e,t)=>{var[r,n]=t;if(!ht.isText(r)){if(bt.isElement(r)&&r.children.length===0){var o={text:""};qe.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=I.isEditor(r)?!1:bt.isElement(r)&&(e.isInline(r)||r.children.length===0||ht.isText(r.children[0])||e.isInline(r.children[0])),u=0,l=0;l<r.children.length;l++,u++){var f=Ze.get(e,n);if(!ht.isText(f)){var d=f.children[u],p=f.children[u-1],v=l===r.children.length-1,g=ht.isText(d)||bt.isElement(d)&&e.isInline(d);if(g!==a)qe.removeNodes(e,{at:n.concat(u),voids:!0}),u--;else if(bt.isElement(d)){if(e.isInline(d)){if(p==null||!ht.isText(p)){var b={text:""};qe.insertNodes(e,b,{at:n.concat(u),voids:!0}),u++}else if(v){var x={text:""};qe.insertNodes(e,x,{at:n.concat(u+1),voids:!0}),u++}}}else{if(!ht.isText(d)&&!("children"in d)){var D=d;D.children=[]}p!=null&&ht.isText(p)&&(ht.equals(d,p,{loose:!0})?(qe.mergeNodes(e,{at:n.concat(u),voids:!0}),u--):p.text===""?(qe.removeNodes(e,{at:n.concat(u-1),voids:!0}),u--):d.text===""&&(qe.removeNodes(e,{at:n.concat(u),voids:!0}),u--))}}}}},iy=(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},sy=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(!ht.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){un(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 ly=(e,t,r)=>{var{selection:n}=e;if(n){var o=(v,g)=>{if(!ht.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)qe.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){un(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 uy=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){un(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 cy=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},dy=(e,t)=>{var{selection:r}=e;r&&Fe.isCollapsed(r)&&qe.delete(e,{unit:t,reverse:!0})},fy=(e,t)=>{var{selection:r}=e;r&&Fe.isCollapsed(r)&&qe.delete(e,{unit:t})},hy=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Fe.isExpanded(r)&&qe.delete(e,{reverse:t==="backward"})},py=(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){un(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 my=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I.above(e,Ch(Ch({},t),{},{match:r=>bt.isElement(r)&&I.isElementReadOnly(e,r)}))},gy=(e,t)=>I.point(e,t,{edge:"end"}),vy=(e,t)=>{var r=I.path(e,t,{edge:"start"});return I.node(e,r)},by=(e,t)=>{var r=I.range(e,t);return Ze.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){un(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 yy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I.above(e,Eh(Eh({},t),{},{match:r=>bt.isElement(r)&&I.isVoid(e,r)}))},xy=(e,t)=>t.children.some(r=>bt.isElement(r)&&I.isBlock(e,r)),wy=(e,t)=>t.children.some(r=>ht.isText(r)||I.isInline(e,r)),Cy=(e,t)=>Ze.has(e,t),Dy=(e,t)=>t.children.every(r=>ht.isText(r)),Ey=e=>{qe.splitNodes(e,{always:!0})},Sy=(e,t,r)=>{qe.insertNodes(e,t,r)},ky=e=>{qe.splitNodes(e,{always:!0})};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 By(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){un(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 Ay=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=By({text:t},o);qe.insertNodes(e,a,{at:r.at,voids:r.voids})}else qe.insertText(e,t,r);e.marks=null}},Fy=(e,t)=>!e.isInline(t),$y=(e,t,r)=>I.isStart(e,t,r)||I.isEnd(e,t,r),Ny=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&ht.isText(n)&&n.text===""&&!e.isVoid(t)},Ty=(e,t,r)=>{var n=I.end(e,r);return Xt.equals(t,n)},Oy=e=>{var t=Am.get(e);return t===void 0?!0:t},My=(e,t,r)=>{if(t.offset!==0)return!1;var n=I.start(e,r);return Xt.equals(t,n)},Ry=(e,t)=>{var r=I.path(e,t,{edge:"end"});return I.node(e,r)},Iy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.path(e,t,r),o=Ze.leaf(e,n);return[o,n]};function Py(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 Ze.levels(e,l))if(a(f,d)&&(u.push([f,d]),!o&&bt.isElement(f)&&I.isVoid(e,f)))break;n&&u.reverse(),yield*u}})()}var zy=["text"],jy=["text"],_y=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:ht.isText,at:{anchor:n,focus:o}});if(l){var[f]=l,d=lo(f,zy);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:ht.isText}),b=I.above(e,{match:A=>bt.isElement(A)&&I.isVoid(e,A)&&e.markableVoid(A)});if(!b){var x=I.above(e,{match:A=>bt.isElement(A)&&I.isBlock(e,A)});if(g&&x){var[D,m]=g,[,B]=x;ne.isAncestor(B,m)&&(v=D)}}}var F=lo(v,jy);return F},Ly=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}}},Hy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.path(e,t,r),o=Ze.get(e,n);return[o,n]};function Ky(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(Bb.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=Ze.nodes(e,{reverse:a,from:d,to:p,pass:O=>{var[k]=O;return bt.isElement(k)?!!(!u&&(I.isVoid(e,k)||I.isElementReadOnly(e,k))||l&&!I.isSelectable(e,k)):!1}}),x=[],D;for(var[m,B]of b)if(!(l&&bt.isElement(m)&&!I.isSelectable(e,m))){var F=D&&ne.compare(B,D[1])===0;if(!(n==="highest"&&F)){if(!f(m,B)){if(o&&!F&&ht.isText(m))return;continue}if(n==="lowest"&&F){D=[m,B];continue}var A=n==="lowest"?D:[m,B];A&&(o?x.push(A):yield A),D=[m,B]}}n==="lowest"&&D&&(o?x.push(D):yield D),o&&(yield*x)}})()}var qy=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=>$s.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(Ze.nodes(e),d=>{var[,p]=d;return p}),f=new Set(l.map(d=>d.join(",")));Fs.set(e,l),$s.set(e,f)}o(e).length!==0&&I.withoutNormalizing(e,()=>{for(var d of o(e))if(Ze.has(e,d)){var p=I.node(e,d),[v,g]=p;bt.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(Ze.has(e,m)){var B=I.node(e,m);e.normalizeNode(B,{operation:n})}D++,b=o(e)}})}},Vy=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},Wy=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},Uy=e=>{var t=eh.get(e);return t||(t=new Set,eh.set(e,t)),t},Xy=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]=Ze.first(e,t);t=a}else if(o==="end"){var[,u]=Ze.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},Yy=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},Gy=e=>{var t=th.get(e);return t||(t=new Set,th.set(e,t)),t},Jy=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]=Ze.last(e,t);o=a}else{var[,u]=Ze.first(e,t);o=u}var l=Ze.get(e,o);if(!ht.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 Zy(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,B]of I.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:u})){if(bt.isElement(m)){if(!a&&(e.isVoid(m)||e.isElementReadOnly(m))){yield I.start(e,B);continue}if(e.isInline(m))continue;if(I.hasInlines(e,m)){var F=ne.isAncestor(B,d.path)?d:I.end(e,B),A=ne.isAncestor(B,f.path)?f:I.start(e,B);g=I.string(e,{anchor:A,focus:F},{voids:a}),v=!0}}if(ht.isText(m)){var O=ne.equals(B,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:B,offset:D},v=!1);;){if(b===0){if(g==="")break;b=k(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:B,offset:D}}}}function k(P,M,_){return M==="character"?fc(P,_):M==="word"?Ob(P,_):M==="line"||M==="block"?P.length:1}})()}var Qy=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}}},ex=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},tx=e=>{var t=rh.get(e);return t||(t=new Set,rh.set(e,t)),t},rx=(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 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 nx(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){un(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 ox=(e,t)=>{var{selection:r}=e;if(r){var n=(p,v)=>{if(!ht.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)qe.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var d=nx({},I.marks(e)||{});delete d[t],e.marks=d,Ya.get(e)||e.onChange()}}},ax=(e,t)=>{Am.set(e,t)},ix=(e,t)=>I.point(e,t,{edge:"start"}),sx=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:ht.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},lx=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=>bt.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:ht.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}},ux=(e,t)=>{var r=I.isNormalizing(e);I.setNormalizing(e,!1);try{t()}finally{I.setNormalizing(e,r)}I.normalize(e)},cx=(e,t,r)=>{var[n,o]=t;return bt.isElement(n)&&I.isEmpty(e,n)||ht.isText(n)&&n.text===""&&o[o.length-1]!==0},dx=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)){qe.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[B,F]=Fe.edges(f),A=I.above(e,{match:ke=>bt.isElement(ke)&&I.isBlock(e,ke),at:B,voids:l}),O=I.above(e,{match:ke=>bt.isElement(ke)&&I.isBlock(e,ke),at:F,voids:l}),k=A&&O&&!ne.equals(A[1],O[1]),P=ne.equals(B.path,F.path),M=l?null:(r=I.void(e,{at:B,mode:"highest"}))!==null&&r!==void 0?r:I.elementReadOnly(e,{at:B,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(M){var T=I.before(e,B);T&&A&&ne.isAncestor(A[1],T.path)&&(B=T)}if(_){var q=I.after(e,F);q&&O&&ne.isAncestor(O[1],q.path)&&(F=q)}var L=[],Y;for(var W of I.nodes(e,{at:f,voids:l})){var[z,K]=W;Y&&ne.compare(K,Y)===0||(!l&&bt.isElement(z)&&(I.isVoid(e,z)||I.isElementReadOnly(e,z))||!ne.isCommon(K,B.path)&&!ne.isCommon(K,F.path))&&(L.push(W),Y=K)}var X=Array.from(L,ke=>{var[,De]=ke;return I.pathRef(e,De)}),V=I.pointRef(e,B),Z=I.pointRef(e,F),R="";if(!P&&!M){var ie=V.current,[me]=I.leaf(e,ie),{path:ye}=ie,{offset:ge}=B,ae=me.text.slice(ge);ae.length>0&&(e.apply({type:"remove_text",path:ye,offset:ge,text:ae}),R=ae)}if(X.reverse().map(ke=>ke.unref()).filter(ke=>ke!==null).forEach(ke=>qe.removeNodes(e,{at:ke,voids:l})),!_){var Se=Z.current,[J]=I.leaf(e,Se),{path:he}=Se,se=P?B.offset:0,te=J.text.slice(se,F.offset);te.length>0&&(e.apply({type:"remove_text",path:he,offset:se,text:te}),R=te)}!P&&k&&Z.current&&V.current&&qe.mergeNodes(e,{at:Z.current,hanging:!0,voids:l}),p&&o&&a==="character"&&R.length>1&&R.match(/[\u0E00-\u0E7F]+/)&&qe.insertText(e,R.slice(0,R.length-u));var ue=V.unref(),Ce=Z.unref(),xe=o?ue||Ce:Ce||ue;t.at==null&&xe&&qe.select(e,xe)}}})},fx=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);qe.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=>bt.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=>bt.isElement(ae)&&I.isBlock(e,ae),at:a,voids:o}),[,x]=b,D=I.isStart(e,a,x),m=I.isEnd(e,a,x),B=D&&m,F=!D||D&&m,A=!m,[,O]=Ze.first({children:t},[]),[,k]=Ze.last({children:t},[]),P=[],M=ae=>{var[Se,J]=ae,he=J.length===0;return he?!1:B?!0:!(F&&ne.isAncestor(J,O)&&bt.isElement(Se)&&!e.isVoid(Se)&&!e.isInline(Se)||A&&ne.isAncestor(J,k)&&bt.isElement(Se)&&!e.isVoid(Se)&&!e.isInline(Se))};for(var _ of Ze.nodes({children:t},{pass:M}))M(_)&&P.push(_);var T=[],q=[],L=[],Y=!0,W=!1;for(var[z]of P)bt.isElement(z)&&!e.isInline(z)?(Y=!1,W=!0,q.push(z)):Y?T.push(z):L.push(z);var[K]=I.nodes(e,{at:a,match:ae=>ht.isText(ae)||I.isInline(e,ae),mode:"highest",voids:o}),[,X]=K,V=I.isStart(e,a,X),Z=I.isEnd(e,a,X),R=I.pathRef(e,m&&!L.length?ne.next(x):x),ie=I.pathRef(e,Z?ne.next(X):X);qe.splitNodes(e,{at:a,match:ae=>W?bt.isElement(ae)&&I.isBlock(e,ae):ht.isText(ae)||I.isInline(e,ae),mode:W?"lowest":"highest",always:W&&(!D||T.length>0)&&(!m||L.length>0),voids:o});var me=I.pathRef(e,!V||V&&Z?ne.next(X):X);if(qe.insertNodes(e,T,{at:me.current,match:ae=>ht.isText(ae)||I.isInline(e,ae),mode:"highest",voids:o,batchDirty:u}),B&&!T.length&&q.length&&!L.length&&qe.delete(e,{at:x,voids:o}),qe.insertNodes(e,q,{at:R.current,match:ae=>bt.isElement(ae)&&I.isBlock(e,ae),mode:"lowest",voids:o,batchDirty:u}),qe.insertNodes(e,L,{at:ie.current,match:ae=>ht.isText(ae)||I.isInline(e,ae),mode:"highest",voids:o,batchDirty:u}),!r.at){var ye;if(L.length>0&&ie.current?ye=ne.previous(ie.current):q.length>0&&R.current?ye=ne.previous(R.current):me.current&&(ye=ne.previous(me.current)),ye){var ge=I.end(e,ye);qe.select(e,ge)}}me.unref(),R.unref(),ie.unref()}}})},hx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")qe.select(e,n.anchor);else if(r==="focus")qe.select(e,n.focus);else if(r==="start"){var[o]=Fe.edges(n);qe.select(e,o)}else if(r==="end"){var[,a]=Fe.edges(n);qe.select(e,a)}}else return},px=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},mx=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)}qe.setSelection(e,p)}},gx=(e,t)=>{var{selection:r}=e;if(t=I.range(e,t),r){qe.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(Xr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function Bh(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 Ah(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bh(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:o="both"}=r;if(n){o==="start"&&(o=Fe.isBackward(n)?"focus":"anchor"),o==="end"&&(o=Fe.isBackward(n)?"anchor":"focus");var{anchor:a,focus:u}=n,l=o==="anchor"?a:u;qe.setSelection(e,{[o==="anchor"?"anchor":"focus"]:Ah(Ah({},l),t)})}},bx=(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})}},yx=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(Ze.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);qe.delete(e,{at:l}),l=g.unref()}if(Xt.isPoint(l)){f==null&&(ht.isText(p)?f=T=>ht.isText(T):e.isInline(p)?f=T=>ht.isText(T)||I.isInline(e,T):f=T=>bt.isElement(T)&&I.isBlock(e,T));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);qe.splitNodes(e,{at:l,match:f,mode:a,voids:o});var B=D.unref();l=m?ne.next(B):B}else return}var F=ne.parent(l),A=l[l.length-1];if(!(!o&&I.void(e,{at:F}))){if(u){var O=[],k=ne.levels(F);ty(e,()=>{var T=function(){var L=F.concat(A);A++;var Y={type:"insert_node",path:L,node:q};e.apply(Y),l=ne.next(l),O.push(Y),ht.isText?k.push(...Array.from(Ze.nodes(q),W=>{var[,z]=W;return L.concat(z)})):k.push(L)};for(var q of t)T()},()=>{$m(e,k,T=>{var q=T;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 M=F.concat(A);A++,e.apply({type:"insert_node",path:M,node:P}),l=ne.next(l)}if(l=ne.previous(l),d){var _=I.end(e,l);_&&qe.select(e,_)}}}})},xx=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):A=>bt.isElement(A)&&I.isBlock(e,A)),!!r){var u=I.nodes(e,{at:r,match:a,mode:n,voids:o}),l=Array.from(u,A=>{var[,O]=A;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);qe.moveNodes(e,{at:d,to:D,voids:o}),qe.removeNodes(e,{at:g,voids:o})}else if(b===0)qe.moveNodes(e,{at:d,to:g,voids:o});else if(b===x-1){var m=ne.next(g);qe.moveNodes(e,{at:d,to:m,voids:o})}else{var B=ne.next(d),F=ne.next(g);qe.splitNodes(e,{at:B,voids:o}),qe.moveNodes(e,{at:d,to:F,voids:o})}}}})},wx=["text"],Cx=["children"],Nm=(e,t)=>{if(bt.isElement(t)){var r=t;return I.isVoid(e,t)?!0:r.children.length===1?Nm(e,r.children[0]):!1}else return!I.isEditor(t)},Dx=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=T=>l.children.includes(T)}else r=T=>bt.isElement(T)&&I.isBlock(e,T);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);qe.delete(e,{at:n}),n=d.unref(),t.at==null&&qe.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),B=ne.common(b,D),F=ne.isSibling(b,D),A=Array.from(I.levels(e,{at:b}),T=>{var[q]=T;return q}).slice(B.length).slice(0,-1),O=I.above(e,{at:b,mode:"highest",match:T=>A.includes(T)&&Nm(e,T)}),k=O&&I.pathRef(e,O[1]),P,M;if(ht.isText(g)&&ht.isText(x)){var _=lo(g,wx);M=x.text.length,P=_}else if(bt.isElement(g)&&bt.isElement(x)){var _=lo(g,Cx);M=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(Xr.stringify(g)," ").concat(Xr.stringify(x)));F||qe.moveNodes(e,{at:b,to:m,voids:a}),k&&qe.removeNodes(e,{at:k.current,voids:a}),I.shouldMergeNodesRemovePrevNode(e,v,p)?qe.removeNodes(e,{at:D,voids:a}):e.apply({type:"merge_node",path:m,position:M,properties:P}),k&&k.unref()}}}})},Ex=(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=>bt.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()}})},Sx=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=>bt.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})}}}})},kx=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):M=>bt.isElement(M)&&I.isBlock(e,M)),!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);qe.splitNodes(e,{at:b,match:n,mode:x,voids:p,always:!D});var m=I.isStart(e,g,g.path);qe.splitNodes(e,{at:g,match:n,mode:x,voids:p,always:!m}),o=v.unref(),r.at==null&&qe.select(e,o)}a||(a=(M,_)=>M!==_);for(var[B,F]of I.nodes(e,{at:o,match:n,mode:f,voids:p})){var A={},O={};if(F.length!==0){var k=!1;for(var P in t)P==="children"||P==="text"||a(t[P],B[P])&&(k=!0,B.hasOwnProperty(P)&&(A[P]=B[P]),u?t[P]!=null&&(O[P]=u(B[P],t[P])):t[P]!=null&&(O[P]=t[P]));k&&e.apply({type:"set_node",path:F,properties:A,newProperties:O})}}}})},Bx=(e,t)=>{if(Fe.isCollapsed(t))return t.anchor;var[,r]=Fe.edges(t),n=I.pointRef(e,r);return qe.delete(e,{at:t}),n.unref()},Ax=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=Z=>bt.isElement(Z)&&I.isBlock(e,Z)),Fe.isRange(a)&&(a=Bx(e,a)),ne.isPath(a)){var f=a,d=I.point(e,f),[p]=I.parent(e,f);o=Z=>Z===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,B]=x;if(bt.isElement(m)&&e.isInline(m)){var F=I.after(e,B);if(!F){var A={text:""},O=ne.next(B);qe.insertNodes(e,A,{at:O,voids:n}),F=I.point(e,O)}a=F,l=!0}var k=a.path.length-B.length;u=k+1,l=!0}g=I.pointRef(e,a);var P=a.path.length-u,[,M]=b,_=a.path.slice(0,P),T=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<M.length||L.length===0||!n&&bt.isElement(q)&&I.isVoid(e,q))break;var W=v.current,z=I.isEnd(e,W,L);if(l||!v||!I.isEdge(e,W,L)){Y=!0;var K=Ze.extractProps(q);e.apply({type:"split_node",path:L,position:T,properties:K})}T=L[L.length-1]+(Y||z?1:0)}if(t.at==null){var X=g.current||I.end(e,[]);qe.select(e,X)}}finally{var V;v.unref(),(V=g)===null||V===void 0||V.unref()}}})},Fx=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;qe.setNodes(e,n,r)},$x=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=>bt.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)),qe.liftNodes(e,{at:x,match:D=>bt.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 $h(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){un(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 Nx=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=>bt.isElement(x)&&I.isInline(e,x)||ht.isText(x):u=x=>bt.isElement(x)&&I.isBlock(e,x)),o&&Fe.isRange(l)){var[f,d]=Fe.edges(l),p=I.rangeRef(e,l,{affinity:"inward"});qe.splitNodes(e,{at:d,match:u,voids:a}),qe.splitNodes(e,{at:f,match:u,voids:a}),l=p.unref(),r.at==null&&qe.select(e,l)}var v=Array.from(I.nodes(e,{at:l,match:e.isInline(t)?x=>bt.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,B=D[D.length-1],[,F]=m,[,A]=B;if(F.length===0&&A.length===0)return 0;var O=ne.equals(F,A)?ne.parent(F):ne.common(F,A),k=I.range(e,F,A),P=I.node(e,O),[M]=P,_=O.length+1,T=ne.next(A.slice(0,_)),q=$h($h({},t),{},{children:[]});qe.insertNodes(e,q,{at:T,voids:a}),qe.moveNodes(e,{at:k,match:L=>bt.isAncestor(M)&&M.children.includes(L),to:T.concat(0),voids:a})}};for(var[,b]of v)g()}})},Tx=()=>{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 ry(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ly(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dy(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fy(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hy(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return oy(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ey(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ky(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fx(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sy(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ay(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ay(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ox(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ny(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return iy(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sy(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uy(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cy(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hx(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dx(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return px(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return py(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return my(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gy(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vy(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return by(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _y(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xy(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wy(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cy(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dy(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yx(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fy(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $y(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ny(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ty(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Oy(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return My(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ry(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Iy(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Py(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xx(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dx(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mx(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ex(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ly(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hy(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ky(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qy(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vy(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xy(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wy(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uy(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jy(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yy(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gy(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zy(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qy(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rx(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ex(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tx(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sx(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gx(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kx(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ax(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vx(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bx(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ax(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ix(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sx(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lx(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fx(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $x(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yy(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ux(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Nx(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cx(e,...r)}};return e},Zl,Nh;function Ox(){if(Nh)return Zl;Nh=1,Zl=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 Zl}var Mx=Ox();const Tm=Gs(Mx);var Ql,Th;function pc(){if(Th)return Ql;Th=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Ql=e,Ql}var eu,Oh;function Rx(){if(Oh)return eu;Oh=1;var e=typeof Pi=="object"&&Pi&&Pi.Object===Object&Πreturn eu=e,eu}var tu,Mh;function Om(){if(Mh)return tu;Mh=1;var e=Rx(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return tu=r,tu}var ru,Rh;function Ix(){if(Rh)return ru;Rh=1;var e=Om(),t=function(){return e.Date.now()};return ru=t,ru}var nu,Ih;function Px(){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 zx(){if(Ph)return ou;Ph=1;var e=Px(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return ou=r,ou}var au,zh;function Mm(){if(zh)return au;zh=1;var e=Om(),t=e.Symbol;return au=t,au}var iu,jh;function jx(){if(jh)return iu;jh=1;var e=Mm(),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 _x(){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 Lx(){if(Lh)return lu;Lh=1;var e=Mm(),t=jx(),r=_x(),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 Hx(){if(Hh)return uu;Hh=1;function e(t){return t!=null&&typeof t=="object"}return uu=e,uu}var cu,Kh;function Kx(){if(Kh)return cu;Kh=1;var e=Lx(),t=Hx(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return cu=n,cu}var du,qh;function qx(){if(qh)return du;qh=1;var e=zx(),t=pc(),r=Kx(),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,Vh;function Rm(){if(Vh)return fu;Vh=1;var e=pc(),t=Ix(),r=qx(),n="Expected a function",o=Math.max,a=Math.min;function u(l,f,d){var p,v,g,b,x,D,m=0,B=!1,F=!1,A=!0;if(typeof l!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(B=!!d.leading,F="maxWait"in d,g=F?o(r(d.maxWait)||0,f):g,A="trailing"in d?!!d.trailing:A);function O(W){var z=p,K=v;return p=v=void 0,m=W,b=l.apply(K,z),b}function k(W){return m=W,x=setTimeout(_,f),B?O(W):b}function P(W){var z=W-D,K=W-m,X=f-z;return F?a(X,g-K):X}function M(W){var z=W-D,K=W-m;return D===void 0||z>=f||z<0||F&&K>=g}function _(){var W=t();if(M(W))return T(W);x=setTimeout(_,P(W))}function T(W){return x=void 0,A&&p?O(W):(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:T(t())}function Y(){var W=t(),z=M(W);if(p=arguments,v=this,D=W,z){if(x===void 0)return k(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 Vx=Rm();const Wx=Gs(Vx);var hu,Wh;function Ux(){if(Wh)return hu;Wh=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 Xx=Ux();const Yx=Gs(Xx),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,Gx=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=Gx(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:B,scrollY:F}=window,{height:A,width:O,top:k,right:P,bottom:M,left:_}=e.getBoundingClientRect(),{top:T,right:q,bottom:L,left:Y}=(X=>{const V=window.getComputedStyle(X);return{top:parseFloat(V.scrollMarginTop)||0,right:parseFloat(V.scrollMarginRight)||0,bottom:parseFloat(V.scrollMarginBottom)||0,left:parseFloat(V.scrollMarginLeft)||0}})(e);let W=l==="start"||l==="nearest"?k-T:l==="end"?M+L:k+A/2-T+L,z=f==="center"?_+O/2-Y+q:f==="end"?P+q:_-Y;const K=[];for(let X=0;X<b.length;X++){const V=b[X],{height:Z,width:R,top:ie,right:me,bottom:ye,left:ge}=V.getBoundingClientRect();if(u==="if-needed"&&k>=0&&_>=0&&M<=m&&P<=D&&(V===g&&!_i(V)||k>=ie&&M<=ye&&_>=ge&&P<=me))return K;const ae=getComputedStyle(V),Se=parseInt(ae.borderLeftWidth,10),J=parseInt(ae.borderTopWidth,10),he=parseInt(ae.borderRightWidth,10),se=parseInt(ae.borderBottomWidth,10);let te=0,ue=0;const Ce="offsetWidth"in V?V.offsetWidth-V.clientWidth-Se-he:0,xe="offsetHeight"in V?V.offsetHeight-V.clientHeight-J-se:0,ke="offsetWidth"in V?V.offsetWidth===0?0:R/V.offsetWidth:0,De="offsetHeight"in V?V.offsetHeight===0?0:Z/V.offsetHeight:0;if(g===V)te=l==="start"?W:l==="end"?W-m:l==="nearest"?Li(F,F+m,m,J,se,F+W,F+W+A,A):W-m/2,ue=f==="start"?z:f==="center"?z-D/2:f==="end"?z-D:Li(B,B+D,D,Se,he,B+z,B+z+O,O),te=Math.max(0,te+F),ue=Math.max(0,ue+B);else{te=l==="start"?W-ie-J:l==="end"?W-ye+se+xe:l==="nearest"?Li(ie,ye,Z,J,se+xe,W,W+A,A):W-(ie+Z/2)+xe/2,ue=f==="start"?z-ge-Se:f==="center"?z-(ge+R/2)+Ce/2:f==="end"?z-me+he+Ce:Li(ge,me,R,Se,he+Ce,z,z+O,O);const{scrollLeft:Be,scrollTop:Ne}=V;te=De===0?0:Math.max(0,Math.min(Ne+te/De,V.scrollHeight-Z/De+xe)),ue=ke===0?0:Math.max(0,Math.min(Be+ue/ke,V.scrollWidth-R/ke+Ce)),W+=Ne-te,z+=Be-ue}K.push({el:V,top:te,left:ue})}return K},Jx=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function Zx(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,Jx(t))){const l=a-r.top+r.bottom,f=u-r.left+r.right;o.scroll({top:l,left:f,behavior:n})}}var _o=[],Qx=function(){return _o.some(function(e){return e.activeTargets.length>0})},e9=function(){return _o.some(function(e){return e.skippedTargets.length>0})},Gh="ResizeObserver loop completed with undelivered notifications.",t9=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)},r9=(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)},Jh=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)},n9=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,Zh=/auto|scroll/,o9=/^tb|vertical/,a9=/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 r9((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=!a9&&r.boxSizing==="border-box",a=o9.test(r.writingMode||""),u=!n&&Zh.test(r.overflowY||""),l=!n&&Zh.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,B=f+p,F=D+b,A=g+x,O=l?e.offsetHeight-A-e.clientHeight:0,k=u?e.offsetWidth-F-e.clientWidth:0,P=o?m+F:0,M=o?B+A:0,_=n?n.width:Kn(r.width)-P-k,T=n?n.height:Kn(r.height)-M-O,q=_+m+k+F,L=T+B+O+A,Y=Lo({devicePixelContentBoxSize:da(Math.round(_*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:da(q,L,a),contentBoxSize:da(_,T,a),contentRect:new Im(v,f,_,T)});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}},i9=(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},s9=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 i9(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))})})},l9=function(){var e=0;for(e1(e);Qx();)e=s9(),e1(e);return e9()&&t9(),e>0},pu,Lm=[],u9=function(){return Lm.splice(0).forEach(function(e){return e()})},c9=function(e){if(!pu){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return u9()}).observe(r,n),pu=function(){r.textContent="".concat(t?t--:t++)}}Lm.push(e),pu()},d9=function(e){c9(function(){requestAnimationFrame(e)})},ts=0,f9=function(){return!!ts},h9=250,p9={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,m9=(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=h9),!mu){mu=!0;var n=r1(t);d9(function(){var o=!1;try{o=l9()}finally{if(mu=!1,t=n-r1(),!f9())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,p9)};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 m9,n1=function(e){!ts&&e>0&&d0.start(),ts+=e,!ts&&d0.stop()},g9=function(e){return!mc(e)&&!n9(e)&&getComputedStyle(e).display==="inline"},v9=(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 g9(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),b9=(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 b9(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 v9(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})(),y9=(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(!Jh(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(!Jh(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})(),Tn={},a1;function x9(){if(a1)return Tn;a1=1,Object.defineProperty(Tn,"__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(A){return d(A,F)})},B=x==null?m:m(x);return B}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("+"),B=m.length;for(var F in t)D[t[F]]=!1;var A=!0,O=!1,k=void 0;try{for(var P=m[Symbol.iterator](),M;!(A=(M=P.next()).done);A=!0){var _=M.value,T=_.endsWith("?")&&_.length>1;T&&(_=_.slice(0,-1));var q=v(_),L=t[q];if(_.length>1&&!L&&!r[_]&&!n[q])throw new TypeError('Unknown modifier: "'+_+'"');(B===1||!L)&&(x?D.key=q:D.which=p(_)),L&&(D[L]=T?null:!0)}}catch(Y){O=!0,k=Y}finally{try{!A&&P.return&&P.return()}finally{if(O)throw k}}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 Tn.default=a,Tn.isHotkey=a,Tn.isCodeHotkey=u,Tn.isKeyHotkey=l,Tn.parseHotkey=f,Tn.compareHotkey=d,Tn.toKeyCode=p,Tn.toKeyName=v,Tn}var gu=x9();function w9(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=w9(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 C9(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 D9(e){var t=C9(e,"string");return ui(t)==="symbol"?t:String(t)}function An(e,t,r){return t=D9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var gc=uo(null),To=()=>{var e=No(gc);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},vu,bu,Hm=parseInt(je.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),sn=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),E9=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),S9=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),k9=sn&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),B9=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),A9=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),F9=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=(!S9||!k9)&&!E9&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",fa=new WeakMap,vc=new WeakMap,bc=new WeakMap,Vm=new WeakMap,ns=new WeakMap,f0=new WeakMap,ci=new WeakMap,Ho=new WeakMap,Ns=new WeakMap,el=new WeakMap,h0=new WeakMap,So=new WeakMap,Po=new WeakMap,Ja=new WeakMap,p0=new WeakMap,yc=new WeakMap,Mn=new WeakMap,oo=new WeakMap,pn=new WeakMap,Co=new WeakMap,Do=new WeakMap,Wm=new WeakMap,va=Symbol("placeholder"),Um=Symbol("mark-placeholder"),Xm=globalThis.Node,$9=globalThis.Text,xc=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,N9=e=>Fo(e)&&e.nodeType===8,kn=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,T9=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,O9=e=>{var[t,r]=e;if(kn(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;kn(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=R9(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},M9=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;(N9(o)||kn(o)&&o.childNodes.length===0||kn(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]},R9=(e,t,r)=>{var[n]=Gm(e,t,r);return n},Jm=e=>{var t="";if(Ym(e)&&e.nodeValue)return e.nodeValue;if(kn(e)){for(var r of Array.from(e.childNodes))t+=Jm(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
103
|
+
`)}return t},I9=/data-slate-fragment="(.+?)"/m,P9=e=>{var t=e.getData("text/html"),[,r]=t.match(I9)||[];return r},Za=e=>e.getSelection!=null?e.getSelection():document.getSelection(),wc=(e,t,r)=>{var{target:n}=t;if(kn(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)},z9=()=>{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),j9=(e,t)=>!!(e.compareDocumentPosition(t)&Xm.DOCUMENT_POSITION_FOLLOWING),_9=0;class L9{constructor(){An(this,"id",void 0),this.id="".concat(_9++)}}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);So.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=Re.findDocumentOrShadowRoot(e),n=Za(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&qe.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(bt.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=Ns.get(t);return r||(r=new L9,Ns.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(Xr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!So.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=Za(n),a=Re.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||qe.select(e,I.start(e,[])),So.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=Vm.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=kn(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=>!!So.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 bt.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(Xr.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,B=D.childNodes[0];o=[B instanceof $9?B: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(Xr.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=kn(d)?d:d.parentElement,x=!!b.getAttribute("data-slate-zero-width"),D=kn(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=kn(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:O9(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"]'),B=m&&b.contains(m)?m:null,F=f.closest("[data-slate-leaf]"),A=null;if(F){if(d=F.closest('[data-slate-node="text"]'),d){var O=Re.getWindow(e),k=O.document.createRange();k.setStart(d,0),k.setEnd(u,l);var P=k.cloneContents(),M=[...Array.prototype.slice.call(P.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(P.querySelectorAll("[contenteditable=false]"))];M.forEach(ge=>{if(sn&&!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,A=d}}else if(D){for(var _=D.querySelectorAll("[data-slate-leaf]"),T=0;T<_.length;T++){var q=_[T];if(Re.hasDOMNode(e,q)){F=q;break}}F?(d=F.closest('[data-slate-node="text"]'),A=F,p=A.textContent.length,A.querySelectorAll("[data-slate-zero-width]").forEach(ge=>{p-=ge.textContent.length})):p=1}else if(B){var L=ge=>ge?ge.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],Y=B.closest('[data-slate-node="element"]');if(a==="forward"){var W,z=[...L(Y),...L(Y==null?void 0:Y.nextElementSibling)];F=(W=z.find(ge=>j9(B,ge)))!==null&&W!==void 0?W:null}else{var K,X=[...L(Y==null?void 0:Y.previousElementSibling),...L(Y)];F=(K=X.findLast(ge=>s1(B,ge)))!==null&&K!==void 0?K:null}F&&(d=F.closest('[data-slate-node="text"]'),A=F,a==="forward"?p=0:(p=A.textContent.length,A.querySelectorAll("[data-slate-zero-width]").forEach(ge=>{p-=ge.textContent.length})))}A&&p===A.textContent.length&&sn&&A.getAttribute("data-slate-zero-width")==="z"&&(v=A.textContent)!==null&&v!==void 0&&v.startsWith("\uFEFF")&&(f.hasAttribute("data-slate-zero-width")||sa&&(g=A.textContent)!==null&&g!==void 0&&g.endsWith(`
|
|
104
|
+
|
|
105
|
+
`))&&p--}if(sn&&!d&&!n){var V=f.hasAttribute("data-slate-node")?f:f.closest("[data-slate-node]");if(V&&Re.hasDOMNode(e,V,{editable:!0})){var Z=Re.toSlateNode(e,V),{path:R,offset:ie}=I.start(e,Re.findPath(e,Z));return V.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),ye=Re.findPath(e,me);return{path:ye,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(M){return M.childElementCount>0?P(M.children[0]):M};var x=g.startContainer,D=b.startContainer,m=P(x.children[g.startOffset]),B=P(D.children[b.startOffset]);p=0,B.childNodes.length>0?l=B.childNodes[0]:l=B,m.childNodes.length>0?d=m.childNodes[0]:d=m,B instanceof HTMLElement?f=B.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&&M9(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 A=s1(l,d)||l===d&&p<f,O=v?F:Re.toSlatePoint(e,[d,p],{exactMatch:o,suppressThrow:a,searchDirection:A?"forward":"backward"});if(!O)return null;var k={anchor:F,focus:O};return Fe.isExpanded(k)&&Fe.isForward(k)&&kn(d)&&I.void(e,{at:k.focus,mode:"highest"})&&(k=I.unhangRange(e,k,{voids:!0})),k}};function H9(e,t){var{path:r,diff:n}=t;if(!I.hasPath(e,r))return!1;var o=Ze.get(e,r);if(!ht.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=Ze.get(e,a);return ht.isText(u)&&u.text.startsWith(n.text)}function Zm(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 K9(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 q9(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=K9(a,o),l=Math.min(a.length-u,o.length-u),f=q9(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 V9(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=Zm(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 W9(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=Ze.get(e,r);if(!ht.isText(o))return null;var a=I.above(e,{match:l=>bt.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:ht.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 U9(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 Vi(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){An(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 X9=25,Y9=200,G9=function(){},J9=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function Z9(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:W}=t,z=l1(t,Y);z&&(!W||!Fe.equals(z,W))&&qe.select(t,z)}},v=()=>{var Y=Co.get(t);if(Co.delete(t),!!Y){if(Y.at){var W=Xt.isPoint(Y.at)?g0(t,Y.at):l1(t,Y.at);if(!W)return;var z=I.range(t,W);(!t.selection||!Fe.equals(t.selection,z))&&qe.select(t,W)}Y.run()}},g=()=>{if(u&&(clearTimeout(u),u=null),l&&(clearTimeout(l),l=null),!O()&&!A()){p();return}o||(o=!0,setTimeout(()=>o=!1)),A()&&(o="action");var Y=t.selection&&I.rangeRef(t,t.selection,{affinity:"forward"});oo.set(t,t.marks),G9("flush",Co.get(t),pn.get(t));for(var W=O(),z;z=(K=pn.get(t))===null||K===void 0?void 0:K[0];){var K,X,V=Mn.get(t);V!==void 0&&(Mn.delete(t),t.marks=V),V&&d===!1&&(d=null);var Z=W9(z);(!t.selection||!Fe.equals(t.selection,Z))&&qe.select(t,Z),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:ye}=me;return ye!==z.id})),H9(t,z)||(W=!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))&&qe.select(t,R),A()){v();return}W&&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()},X9)},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,W=f0.get(t);if(W){if(O()||Y){W.style.display="none";return}W.style.removeProperty("display")}},m=(Y,W)=>{var z,K=(z=pn.get(t))!==null&&z!==void 0?z:[];pn.set(t,K);var X=Ze.leaf(t,Y),V=K.findIndex(ie=>ne.equals(ie.path,Y));if(V<0){var Z=Qm(X.text,W);Z&&K.push({path:Y,diff:W,id:f++}),D();return}var R=V9(X.text,K[V].diff,W);if(!R){K.splice(V,1),D();return}K[V]=Vi(Vi({},K[V]),{},{diff:R})},B=function(Y){var{at:W}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};d=!1,Do.delete(t),r.cancel(),n.cancel(),A()&&g(),Co.set(t,{at:W,run:Y}),l=setTimeout(g)},F=Y=>{var W;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[V]=Y.getTargetRanges();V&&(K=Re.toSlateRange(t,V,{exactMatch:!1,suppressThrow:!0}));var Z=Re.getWindow(t),R=Z.getSelection();if(!K&&R&&(V=R,K=Re.toSlateRange(t,R,{exactMatch:!1,suppressThrow:!0})),K=(W=K)!==null&&W!==void 0?W:t.selection,!!K){var ie=!0;if(z.startsWith("delete")){if(Fe.isExpanded(K)){var[me,ye]=Fe.edges(K),ge=Ze.leaf(t,me.path);if(ge.text.length===me.offset&&ye.offset===0){var ae=I.next(t,{at:me.path,match:ht.isText});ae&&ne.equals(ae[1],ye.path)&&(K={anchor:ye,focus:ye})}}var Se=z.endsWith("Backward")?"backward":"forward",[J,he]=Fe.edges(K),[se,te]=I.leaf(t,J.path),ue={text:"",start:J.offset,end:he.offset},Ce=pn.get(t),xe=Ce==null?void 0:Ce.find(Ct=>ne.equals(Ct.path,te)),ke=xe?[xe.diff,ue]:[ue],De=Zm(se.text,...ke);if(De.length===0&&(ie=!1),Fe.isExpanded(K)){if(ie&&ne.equals(K.anchor.path,K.focus.path)){var Be={path:K.anchor.path,offset:J.offset},Ne=I.range(t,Be,Be);return M(Ne),m(K.anchor.path,{text:"",end:he.offset,start:J.offset})}return B(()=>I.deleteFragment(t,{direction:Se}),{at:K})}}switch(z){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return B(()=>I.deleteFragment(t),{at:K});case"deleteContent":case"deleteContentForward":{var{anchor:Me}=K;if(ie&&Fe.isCollapsed(K)){var He=Ze.leaf(t,Me.path);if(Me.offset<He.text.length)return m(Me.path,{text:"",start:Me.offset,end:Me.offset+1})}return B(()=>I.deleteForward(t),{at:K})}case"deleteContentBackward":{var ft,{anchor:ot}=K,Oe=m0(V)?V.isCollapsed:!!((ft=V)!==null&&ft!==void 0&&ft.collapsed);return ie&&Oe&&Fe.isCollapsed(K)&&ot.offset>0?m(ot.path,{text:"",start:ot.offset-1,end:ot.offset}):B(()=>I.deleteBackward(t),{at:K})}case"deleteEntireSoftLine":return B(()=>{I.deleteBackward(t,{unit:"line"}),I.deleteForward(t,{unit:"line"})},{at:K});case"deleteHardLineBackward":return B(()=>I.deleteBackward(t,{unit:"block"}),{at:K});case"deleteSoftLineBackward":return B(()=>I.deleteBackward(t,{unit:"line"}),{at:K});case"deleteHardLineForward":return B(()=>I.deleteForward(t,{unit:"block"}),{at:K});case"deleteSoftLineForward":return B(()=>I.deleteForward(t,{unit:"line"}),{at:K});case"deleteWordBackward":return B(()=>I.deleteBackward(t,{unit:"word"}),{at:K});case"deleteWordForward":return B(()=>I.deleteForward(t,{unit:"word"}),{at:K});case"insertLineBreak":return B(()=>I.insertSoftBreak(t),{at:K});case"insertParagraph":return B(()=>I.insertBreak(t),{at:K});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(J9(X))return B(()=>Re.insertData(t,X),{at:K});var _e=X??"";if(Mn.get(t)&&(_e=_e.replace("\uFEFF","")),z==="insertText"&&/.*\n.*\n$/.test(_e)&&(_e=_e.slice(0,-1)),_e.includes(`
|
|
108
|
+
`))return B(()=>{var Ct=_e.split(`
|
|
109
|
+
`);Ct.forEach((mt,dt)=>{mt&&I.insertText(t,mt),dt!==Ct.length-1&&I.insertSoftBreak(t)})},{at:K});if(ne.equals(K.anchor.path,K.focus.path)){var[We,ct]=Fe.edges(K),at={start:We.offset,end:ct.offset,text:_e};if(_e&&d&&z==="insertCompositionText"){var Qe=d.start+d.text.search(/\S|$/),Nt=at.start+at.text.search(/\S|$/);Nt===Qe+1&&at.end===d.start+d.text.length?(at.start-=1,d=null,q()):d=!1}else z==="insertText"?d===null?d=at:d&&Fe.isCollapsed(K)&&d.end+d.text.length===We.offset?d=Vi(Vi({},d),{},{text:d.text+_e}):d=!1:d=!1;if(ie){m(We.path,at);return}}return B(()=>I.insertText(t,_e),{at:K})}}}}},A=()=>!!Co.get(t),O=()=>{var Y;return!!((Y=pn.get(t))!==null&&Y!==void 0&&Y.length)},k=()=>A()||O(),P=()=>o,M=Y=>{Do.set(t,Y),u&&(clearTimeout(u),u=null);var{selection:W}=t;if(Y){var z=!W||!ne.equals(W.anchor.path,Y.anchor.path),K=!W||!ne.equals(W.anchor.path.slice(0,-1),Y.anchor.path.slice(0,-1));(z&&d||K)&&(d=!1),(z||O())&&(u=setTimeout(g,Y9))}},_=()=>{(A()||!O())&&g()},T=Y=>{O()||(D(!0),setTimeout(D))},q=()=>{A()||(l=setTimeout(g))},L=Y=>{if(!(O()||A())&&Y.some(z=>wc(t,z,Y))){var W;(W=Wm.get(t))===null||W===void 0||W()}};return{flush:g,scheduleFlush:q,hasPendingDiffs:O,hasPendingAction:A,hasPendingChanges:k,isFlushing:P,handleUserSelect:M,handleCompositionEnd:b,handleCompositionStart:x,handleDOMBeforeInput:F,handleKeyDown:T,handleDomMutations:L,handleInput:_}}function Q9(){var e=Lt(!1);return er(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var di=rs?X4:er;function e8(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 t8=["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 r8(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){An(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 n8={subtree:!0,childList:!0,characterData:!0},o8=sn?e=>{var{node:t}=e,r=ga(e,t8);if(!sn)return null;var n=To(),o=Q9(),[a]=Ot(()=>Z9(r8({editor:n},r)));return e8(t,a.handleDomMutations,n8),yc.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,a8=["anchor","focus"],i8=["anchor","focus"],s8=(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,a8),n=ga(t,i8);return e[va]===t[va]&&s8(r,n)},l8=(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},u8=(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 c8(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){An(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 d8=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=To(),u=Re.findPath(a,o),l=ne.parent(u),f=!!r[Um];return a.isVoid(n)?je.createElement(yu,{length:Ze.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&I.string(a,l)===""?je.createElement(yu,{isLineBreak:!0,isMarkPlaceholder:f}):r.text===""?je.createElement(yu,{isMarkPlaceholder:f}):t&&r.text.slice(-1)===`
|
|
110
|
+
`?je.createElement(h1,{isTrailing:!0,text:r.text}):je.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)}),je.createElement(f8,{ref:n},a)},f8=J4($o((e,t)=>je.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),je.createElement("span",c8({},o),!(sn||Km)||!r?"\uFEFF":null,r?je.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){An(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 h8=sn?300:0;function p8(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function m1(e){e.current&&(clearTimeout(e.current),e.current=null)}var m8=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:u=F=>je.createElement(v8,tg({},F))}=e,l=To(),f=Lt(null),d=Lt(null),[p,v]=Ot(!1),g=Lt(null),b=kt(F=>{if(p8(f,F==null),F==null){var A;f0.delete(l),(A=t.onPlaceholderResize)===null||A===void 0||A.call(t,null)}else{if(f0.set(l,F),!f.current){var O=window.ResizeObserver||y9;f.current=new O(()=>{var k;(k=t.onPlaceholderResize)===null||k===void 0||k.call(t,F)})}f.current.observe(F),d.current=F}},[d,t,l]),x=je.createElement(d8,{isLast:r,leaf:t,parent:o,text:n}),D=!!t[va];if(er(()=>(D?g.current||(g.current=setTimeout(()=>{v(!0),g.current=null},h8)):(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=je.createElement(je.Fragment,null,a(m),x)}var B={"data-slate-leaf":!0};return u({attributes:B,children:x,leaf:t,text:n})},g8=je.memo(m8,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&ht.equals(t.leaf,e.leaf)&&t.leaf[va]===e.leaf[va]),v8=e=>{var{attributes:t,children:r}=e;return je.createElement("span",tg({},t),r)},b8=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:u}=e,l=To(),f=Lt(null),d=ht.decorations(u,t),p=Re.findKey(l,u),v=[],g=0;g<d.length;g++){var b=d[g];v.push(je.createElement(g8,{isLast:r&&g===d.length-1,key:"".concat(p.id,"-").concat(g),renderPlaceholder:o,leaf:b,text:u,parent:n,renderLeaf:a}))}var x=kt(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 je.createElement("span",{"data-slate-node":"text",ref:x},v)},rg=je.memo(b8,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&u8(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){An(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 y8=e=>{var{decorations:t,element:r,renderElement:n=F=>je.createElement(w8,b0({},F)),renderPlaceholder:o,renderLeaf:a,selection:u}=e,l=To(),f=E8(),d=l.isInline(r),p=Re.findKey(l,r),v=kt(F=>{var A=el.get(l);F?(A==null||A.set(p,F),Ho.set(r,F),ci.set(F,r)):(A==null||A.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=Ze.string(r),D=Tm(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",[[B]]=Ze.texts(r);g=je.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},je.createElement(rg,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:B})),vc.set(B,0),bc.set(B,r)}return n({attributes:b,children:g,element:r})},x8=je.memo(y8,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&l8(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Fe.equals(e.selection,t.selection))),w8=e=>{var{attributes:t,children:r,element:n}=e,o=To(),a=o.isInline(n)?"span":"div";return je.createElement(a,b0(b0({},t),{},{style:{position:"relative"}}),r)},ng=uo(()=>[]),C8=()=>No(ng),D8=uo(!1),og=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:u}=e,l=C8(),f=To();fa.set(f,!1);for(var d=Re.findPath(f,r),p=[],v=bt.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),B=u&&Fe.intersection(m,u),F=l([x,b]);for(var A of t){var O=Fe.intersection(A,m);O&&F.push(O)}bt.isElement(x)?p.push(je.createElement(D8.Provider,{key:"provider-".concat(D.id),value:!!B},je.createElement(x8,{decorations:F,element:x,key:D.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:B}))):p.push(je.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),E8=()=>No(ag),ig=uo(null),sg=()=>{var e=No(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 S8(){var e=To(),t=Lt(!1),r=Lt(0),n=kt(()=>{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 k8=3,B8={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"},A8={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"},F8={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},$r=e=>{var t=B8[e],r=A8[e],n=F8[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:$r("bold"),isCompose:$r("compose"),isMoveBackward:$r("moveBackward"),isMoveForward:$r("moveForward"),isDeleteBackward:$r("deleteBackward"),isDeleteForward:$r("deleteForward"),isDeleteLineBackward:$r("deleteLineBackward"),isDeleteLineForward:$r("deleteLineForward"),isDeleteWordBackward:$r("deleteWordBackward"),isDeleteWordForward:$r("deleteWordForward"),isExtendBackward:$r("extendBackward"),isExtendForward:$r("extendForward"),isExtendLineBackward:$r("extendLineBackward"),isExtendLineForward:$r("extendLineForward"),isItalic:$r("italic"),isMoveLineBackward:$r("moveLineBackward"),isMoveLineForward:$r("moveLineForward"),isMoveWordBackward:$r("moveWordBackward"),isMoveWordForward:$r("moveWordForward"),isRedo:$r("redo"),isSoftBreak:$r("insertSoftBreak"),isSplitBlock:$r("splitBlock"),isTransposeCharacter:$r("transposeCharacter"),isUndo:$r("undo")},$8=(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}},N8={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class lg extends G4{constructor(){super(...arguments),An(this,"context",null),An(this,"manager",null),An(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,N8)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=$8(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}}An(lg,"contextType",gc);var T8=sn?lg:e=>{var{children:t}=e;return je.createElement(je.Fragment,null,t)},O8=uo(!1),M8=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],R8=["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 Vn(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){An(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 I8=e=>je.createElement(je.Fragment,null,og(e)),xu=$o((e,t)=>{var r=kt(J=>je.createElement(P8,Vn({},J)),[]),{autoFocus:n,decorate:o=z8,onDOMBeforeInput:a,placeholder:u,readOnly:l=!1,renderElement:f,renderLeaf:d,renderPlaceholder:p=r,scrollSelectionIntoView:v=j8,style:g={},as:b="div",disableDefaultStyles:x=!1}=e,D=ga(e,M8),m=sg(),[B,F]=Ot(!1),A=Lt(null),O=Lt([]),[k,P]=Ot(),M=Lt(!1),{onUserInput:_,receivedUserInput:T}=S8(),[,q]=Y4(J=>J+1,0);Wm.set(m,q),h0.set(m,l);var L=wt(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);er(()=>{A.current&&n&&A.current.focus()},[n]);var Y=Lt(),W=wt(()=>Yx(()=>{if(fa.get(m)){W();return}var J=Re.toDOMNode(m,m),he=J.getRootNode();if(!M.current&&Io&&he instanceof ShadowRoot){M.current=!0;var se=z9();se?document.execCommand("indent"):qe.deselect(m),M.current=!1;return}var te=Y.current;if((sn||!Re.isComposing(m))&&(!L.isUpdatingSelection||te!=null&&te.isFlushing())&&!L.isDraggingInternally){var ue=Re.findDocumentOrShadowRoot(m),{activeElement:Ce}=ue,xe=Re.toDOMNode(m,m),ke=Za(ue);if(Ce===xe?(L.latestElement=Ce,So.set(m,!0)):So.delete(m),!ke)return qe.deselect(m);var{anchorNode:De,focusNode:Be}=ke,Ne=Re.hasEditableTarget(m,De)||Re.isTargetInsideNonReadonlyVoid(m,De),Me=Re.hasTarget(m,Be);if(Ne&&Me){var He=Re.toSlateRange(m,ke,{exactMatch:!1,suppressThrow:!0});He&&(!Re.isComposing(m)&&!(te!=null&&te.hasPendingChanges())&&!(te!=null&&te.isFlushing())?qe.select(m,He):te==null||te.handleUserSelect(He))}l&&(!Ne||!Me)&&qe.deselect(m)}},100),[m,l,L]),z=wt(()=>Wx(W,0),[W]);Y.current=o8({node:A,onDOMSelectionChange:W,scheduleOnDOMSelectionChange:z}),di(()=>{var J,he,se;A.current&&(se=xc(A.current))?(Vm.set(m,se),ns.set(m,A.current),Ho.set(m,A.current),ci.set(A.current,m)):Ho.delete(m);var{selection:te}=m,ue=Re.findDocumentOrShadowRoot(m),Ce=Za(ue);if(!(!Ce||!Re.isFocused(m)||(J=Y.current)!==null&&J!==void 0&&J.hasPendingAction())){var xe=Ne=>{var Me=Ce.type!=="None";if(!(!te&&!Me)){var He=Ce.focusNode,ft;if(sa&&Ce.rangeCount>1){var ot=Ce.getRangeAt(0),Oe=Ce.getRangeAt(Ce.rangeCount-1);ot.startContainer===He?ft=Oe.endContainer:ft=ot.startContainer}else ft=Ce.anchorNode;var _e=ns.get(m),We=!1;if(_e.contains(ft)&&_e.contains(He)&&(We=!0),Me&&We&&te&&!Ne){var ct=Re.toSlateRange(m,Ce,{exactMatch:!0,suppressThrow:!0});if(ct&&Fe.equals(ct,te)){var at;if(!L.hasMarkPlaceholder||(at=ft)!==null&&at!==void 0&&(at=at.parentElement)!==null&&at!==void 0&&at.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 Qe=te&&Re.toDOMRange(m,te);return Qe?(Re.isComposing(m)&&!sn?Ce.collapseToEnd():Fe.isBackward(te)?Ce.setBaseAndExtent(Qe.endContainer,Qe.endOffset,Qe.startContainer,Qe.startOffset):Ce.setBaseAndExtent(Qe.startContainer,Qe.startOffset,Qe.endContainer,Qe.endOffset),v(m,Qe)):Ce.removeAllRanges(),Qe}};Ce.rangeCount<=1&&xe();var ke=((he=Y.current)===null||he===void 0?void 0:he.isFlushing())==="action";if(!sn||!ke){setTimeout(()=>{L.isUpdatingSelection=!1});return}var De=null,Be=requestAnimationFrame(()=>{if(ke){var Ne=Me=>{try{var He=Re.toDOMNode(m,m);He.focus(),xe(Me)}catch{}};Ne(),De=setTimeout(()=>{Ne(!0),L.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Be),De&&clearTimeout(De)}}});var K=kt(J=>{var he=Re.toDOMNode(m,m),se=he.getRootNode();if(M!=null&&M.current&&Io&&se instanceof ShadowRoot){var te=J.getTargetRanges(),ue=te[0],Ce=new window.Range;Ce.setStart(ue.startContainer,ue.startOffset),Ce.setEnd(ue.endContainer,ue.endOffset);var xe=Re.toSlateRange(m,Ce,{exactMatch:!1,suppressThrow:!1});qe.select(m,xe),J.preventDefault(),J.stopImmediatePropagation();return}if(_(),!l&&Re.hasEditableTarget(m,J.target)&&!_8(J,a)){var ke;if(Y.current)return Y.current.handleDOMBeforeInput(J);z.flush(),W.flush();var{selection:De}=m,{inputType:Be}=J,Ne=J.dataTransfer||J.data||void 0,Me=Be==="insertCompositionText"||Be==="deleteCompositionText";if(Me&&Re.isComposing(m))return;var He=!1;if(Be==="insertText"&&De&&Fe.isCollapsed(De)&&J.data&&J.data.length===1&&/[a-z ]/i.test(J.data)&&De.anchor.offset!==0&&(He=!0,m.marks&&(He=!1),!fa.get(m))){var ft,ot,{anchor:Oe}=De,[_e,We]=Re.toDOMPoint(m,Oe),ct=(ft=_e.parentElement)===null||ft===void 0?void 0:ft.closest("a"),at=Re.getWindow(m);if(He&&ct&&Re.hasDOMNode(m,ct)){var Qe,Nt=at==null?void 0:at.document.createTreeWalker(ct,NodeFilter.SHOW_TEXT).lastChild();Nt===_e&&((Qe=Nt.textContent)===null||Qe===void 0?void 0:Qe.length)===We&&(He=!1)}if(He&&_e.parentElement&&(at==null||(ot=at.getComputedStyle(_e.parentElement))===null||ot===void 0?void 0:ot.whiteSpace)==="pre"){var Ct=I.above(m,{at:Oe.path,match:St=>bt.isElement(St)&&I.isBlock(m,St)});Ct&&Ze.string(Ct[0]).includes(" ")&&(He=!1)}}if((!Be.startsWith("delete")||Be.startsWith("deleteBy"))&&!fa.get(m)){var[mt]=J.getTargetRanges();if(mt){var dt=Re.toSlateRange(m,mt,{exactMatch:!1,suppressThrow:!1});if(!De||!Fe.equals(De,dt)){He=!1;var Pe=!Me&&m.selection&&I.rangeRef(m,m.selection);qe.select(m,dt),Pe&&Ja.set(m,Pe)}}}if(Me)return;if(He||J.preventDefault(),De&&Fe.isExpanded(De)&&Be.startsWith("delete")){var fe=Be.endsWith("Backward")?"backward":"forward";I.deleteFragment(m,{direction:fe});return}switch(Be){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":{Be==="insertFromComposition"&&Re.isComposing(m)&&(F(!1),Po.set(m,!1)),(Ne==null?void 0:Ne.constructor.name)==="DataTransfer"?Re.insertData(m,Ne):typeof Ne=="string"&&(He?O.current.push(()=>I.insertText(m,Ne)):I.insertText(m,Ne));break}}var gt=(ke=Ja.get(m))===null||ke===void 0?void 0:ke.unref();Ja.delete(m),gt&&(!m.selection||!Fe.equals(m.selection,gt))&&qe.select(m,gt)}},[m,W,_,a,l,z]),X=kt(J=>{J==null?(W.cancel(),z.cancel(),ns.delete(m),Ho.delete(m),A.current&&bo&&A.current.removeEventListener("beforeinput",K)):bo&&J.addEventListener("beforeinput",K),A.current=J,typeof t=="function"?t(J):t&&(t.current=J)},[W,z,m,K,t]);di(()=>{var J=Re.getWindow(m);J.document.addEventListener("selectionchange",z);var he=()=>{L.isDraggingInternally=!1};return J.document.addEventListener("dragend",he),J.document.addEventListener("drop",he),()=>{J.document.removeEventListener("selectionchange",z),J.document.removeEventListener("dragend",he),J.document.removeEventListener("drop",he)}},[z,L]);var V=o([m,[]]),Z=u&&m.children.length===1&&Array.from(Ze.texts(m)).length===1&&Ze.string(m)===""&&!B,R=kt(J=>{if(J&&Z){var he;P((he=J.getBoundingClientRect())===null||he===void 0?void 0:he.height)}else P(void 0)},[Z]);if(Z){var ie=I.start(m,[]);V.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:ye}=m.selection,ge=Ze.leaf(m,ye.path),ae=ga(ge,R8);if(!ht.equals(ge,me,{loose:!0})){L.hasMarkPlaceholder=!0;var Se=Object.fromEntries(Object.keys(ae).map(J=>[J,null]));V.push(Vn(Vn(Vn({[Um]:!0},Se),me),{},{anchor:ye,focus:ye}))}}return er(()=>{setTimeout(()=>{var{selection:J}=m;if(J){var{anchor:he}=J,se=Ze.leaf(m,he.path);if(me&&!ht.equals(se,me,{loose:!0})){Mn.set(m,me);return}}Mn.delete(m)})}),je.createElement(ag.Provider,{value:l},je.createElement(O8.Provider,{value:B},je.createElement(ng.Provider,{value:o},je.createElement(T8,{node:A,receivedUserInput:T},je.createElement(b,Vn(Vn({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:Vn(Vn({},x?{}:Vn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},k?{minHeight:k}:{})),g),onBeforeInput:kt(J=>{if(!bo&&!l&&!an(J,D.onBeforeInput)&&Re.hasSelectableTarget(m,J.target)&&(J.preventDefault(),!Re.isComposing(m))){var he=J.data;I.insertText(m,he)}},[D.onBeforeInput,m,l]),onInput:kt(J=>{if(!an(J,D.onInput)){if(Y.current){Y.current.handleInput();return}for(var he of O.current)he();if(O.current=[],!Re.isFocused(m)){var se=J.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:kt(J=>{if(!(l||L.isUpdatingSelection||!Re.hasSelectableTarget(m,J.target)||an(J,D.onBlur))){var he=Re.findDocumentOrShadowRoot(m);if(L.latestElement!==he.activeElement){var{relatedTarget:se}=J,te=Re.toDOMNode(m,m);if(se!==te&&!(kn(se)&&se.hasAttribute("data-slate-spacer"))){if(se!=null&&Fo(se)&&Re.hasDOMNode(m,se)){var ue=Re.toSlateNode(m,se);if(bt.isElement(ue)&&!m.isVoid(ue))return}if(Io){var Ce=Za(he);Ce==null||Ce.removeAllRanges()}So.delete(m)}}}},[l,L.isUpdatingSelection,L.latestElement,m,D.onBlur]),onClick:kt(J=>{if(Re.hasTarget(m,J.target)&&!an(J,D.onClick)&&Fo(J.target)){var he=Re.toSlateNode(m,J.target),se=Re.findPath(m,he);if(!I.hasPath(m,se)||Ze.get(m,se)!==he)return;if(J.detail===k8&&se.length>=1){var te=se;if(!(bt.isElement(he)&&I.isBlock(m,he))){var ue,Ce=I.above(m,{match:He=>bt.isElement(He)&&I.isBlock(m,He),at:se});te=(ue=Ce==null?void 0:Ce[1])!==null&&ue!==void 0?ue:se.slice(0,1)}var xe=I.range(m,te);qe.select(m,xe);return}if(l)return;var ke=I.start(m,se),De=I.end(m,se),Be=I.void(m,{at:ke}),Ne=I.void(m,{at:De});if(Be&&Ne&&ne.equals(Be[1],Ne[1])){var Me=I.range(m,ke);qe.select(m,Me)}}},[m,D.onClick,l]),onCompositionEnd:kt(J=>{if(Re.hasSelectableTarget(m,J.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(J),an(J,D.onCompositionEnd)||sn)return;if(!Io&&!B9&&!Km&&!F9&&!A9&&J.data){var se=Mn.get(m);Mn.delete(m),se!==void 0&&(oo.set(m,m.marks),m.marks=se),I.insertText(m,J.data);var te=oo.get(m);oo.delete(m),te!==void 0&&(m.marks=te)}}},[D.onCompositionEnd,m]),onCompositionUpdate:kt(J=>{Re.hasSelectableTarget(m,J.target)&&!an(J,D.onCompositionUpdate)&&(Re.isComposing(m)||(F(!0),Po.set(m,!0)))},[D.onCompositionUpdate,m]),onCompositionStart:kt(J=>{if(Re.hasSelectableTarget(m,J.target)){var he;if((he=Y.current)===null||he===void 0||he.handleCompositionStart(J),an(J,D.onCompositionStart)||sn)return;F(!0);var{selection:se}=m;if(se&&Fe.isExpanded(se)){I.deleteFragment(m);return}}},[D.onCompositionStart,m]),onCopy:kt(J=>{Re.hasSelectableTarget(m,J.target)&&!an(J,D.onCopy)&&!b1(J)&&(J.preventDefault(),Re.setFragmentData(m,J.clipboardData,"copy"))},[D.onCopy,m]),onCut:kt(J=>{if(!l&&Re.hasSelectableTarget(m,J.target)&&!an(J,D.onCut)&&!b1(J)){J.preventDefault(),Re.setFragmentData(m,J.clipboardData,"cut");var{selection:he}=m;if(he)if(Fe.isExpanded(he))I.deleteFragment(m);else{var se=Ze.parent(m,he.anchor.path);I.isVoid(m,se)&&qe.delete(m)}}},[l,m,D.onCut]),onDragOver:kt(J=>{if(Re.hasTarget(m,J.target)&&!an(J,D.onDragOver)){var he=Re.toSlateNode(m,J.target);bt.isElement(he)&&I.isVoid(m,he)&&J.preventDefault()}},[D.onDragOver,m]),onDragStart:kt(J=>{if(!l&&Re.hasTarget(m,J.target)&&!an(J,D.onDragStart)){var he=Re.toSlateNode(m,J.target),se=Re.findPath(m,he),te=bt.isElement(he)&&I.isVoid(m,he)||I.void(m,{at:se,voids:!0});if(te){var ue=I.range(m,se);qe.select(m,ue)}L.isDraggingInternally=!0,Re.setFragmentData(m,J.dataTransfer,"drag")}},[l,m,D.onDragStart,L]),onDrop:kt(J=>{if(!l&&Re.hasTarget(m,J.target)&&!an(J,D.onDrop)){J.preventDefault();var he=m.selection,se=Re.findEventRange(m,J),te=J.dataTransfer;qe.select(m,se),L.isDraggingInternally&&he&&!Fe.equals(he,se)&&!I.void(m,{at:se,voids:!0})&&qe.delete(m,{at:he}),Re.insertData(m,te),Re.isFocused(m)||Re.focus(m)}},[l,m,D.onDrop,L]),onDragEnd:kt(J=>{!l&&L.isDraggingInternally&&D.onDragEnd&&Re.hasTarget(m,J.target)&&D.onDragEnd(J)},[l,L,D,m]),onFocus:kt(J=>{if(!l&&!L.isUpdatingSelection&&Re.hasEditableTarget(m,J.target)&&!an(J,D.onFocus)){var he=Re.toDOMNode(m,m),se=Re.findDocumentOrShadowRoot(m);if(L.latestElement=se.activeElement,sa&&J.target!==he){he.focus();return}So.set(m,!0)}},[l,L,m,D.onFocus]),onKeyDown:kt(J=>{if(!l&&Re.hasEditableTarget(m,J.target)){var he;(he=Y.current)===null||he===void 0||he.handleKeyDown(J);var{nativeEvent:se}=J;if(Re.isComposing(m)&&se.isComposing===!1&&(Po.set(m,!1),F(!1)),an(J,D.onKeyDown)||Re.isComposing(m))return;var{selection:te}=m,ue=m.children[te!==null?te.focus.path[0]:0],Ce=Tm(Ze.string(ue))==="rtl";if(Or.isRedo(se)){J.preventDefault();var xe=m;typeof xe.redo=="function"&&xe.redo();return}if(Or.isUndo(se)){J.preventDefault();var ke=m;typeof ke.undo=="function"&&ke.undo();return}if(Or.isMoveLineBackward(se)){J.preventDefault(),qe.move(m,{unit:"line",reverse:!0});return}if(Or.isMoveLineForward(se)){J.preventDefault(),qe.move(m,{unit:"line"});return}if(Or.isExtendLineBackward(se)){J.preventDefault(),qe.move(m,{unit:"line",edge:"focus",reverse:!0});return}if(Or.isExtendLineForward(se)){J.preventDefault(),qe.move(m,{unit:"line",edge:"focus"});return}if(Or.isMoveBackward(se)){J.preventDefault(),te&&Fe.isCollapsed(te)?qe.move(m,{reverse:!Ce}):qe.collapse(m,{edge:Ce?"end":"start"});return}if(Or.isMoveForward(se)){J.preventDefault(),te&&Fe.isCollapsed(te)?qe.move(m,{reverse:Ce}):qe.collapse(m,{edge:Ce?"start":"end"});return}if(Or.isMoveWordBackward(se)){J.preventDefault(),te&&Fe.isExpanded(te)&&qe.collapse(m,{edge:"focus"}),qe.move(m,{unit:"word",reverse:!Ce});return}if(Or.isMoveWordForward(se)){J.preventDefault(),te&&Fe.isExpanded(te)&&qe.collapse(m,{edge:"focus"}),qe.move(m,{unit:"word",reverse:Ce});return}if(bo){if((qm||Io)&&te&&(Or.isDeleteBackward(se)||Or.isDeleteForward(se))&&Fe.isCollapsed(te)){var De=Ze.parent(m,te.anchor.path);if(bt.isElement(De)&&I.isVoid(m,De)&&(I.isInline(m,De)||I.isBlock(m,De))){J.preventDefault(),I.deleteBackward(m,{unit:"block"});return}}}else{if(Or.isBold(se)||Or.isItalic(se)||Or.isTransposeCharacter(se)){J.preventDefault();return}if(Or.isSoftBreak(se)){J.preventDefault(),I.insertSoftBreak(m);return}if(Or.isSplitBlock(se)){J.preventDefault(),I.insertBreak(m);return}if(Or.isDeleteBackward(se)){J.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m);return}if(Or.isDeleteForward(se)){J.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m);return}if(Or.isDeleteLineBackward(se)){J.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m,{unit:"line"});return}if(Or.isDeleteLineForward(se)){J.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m,{unit:"line"});return}if(Or.isDeleteWordBackward(se)){J.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m,{unit:"word"});return}if(Or.isDeleteWordForward(se)){J.preventDefault(),te&&Fe.isExpanded(te)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m,{unit:"word"});return}}}},[l,m,D.onKeyDown]),onPaste:kt(J=>{!l&&Re.hasEditableTarget(m,J.target)&&!an(J,D.onPaste)&&(!bo||T9(J.nativeEvent)||Io)&&(J.preventDefault(),Re.insertData(m,J.clipboardData))},[l,m,D.onPaste])}),je.createElement(I8,{decorations:V,node:m,renderElement:f,renderPlaceholder:p,renderLeaf:d,selection:m.selection}))))))}),P8=e=>{var{attributes:t,children:r}=e;return je.createElement("span",Vn({},t),r,sn&&je.createElement("br",null))},z8=()=>[],j8=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Fe.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),Zx(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},an=(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),_8=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},L8=uo(!1),H8=uo({});function K8(e){var t=Lt([]).current,r=Lt({editor:e}).current,n=kt(a=>{r.editor=a,t.forEach(u=>u(a))},[t,r]),o=wt(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var q8=["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,q8),[f,d]=je.useState(()=>{if(!Ze.isNodeList(u))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Xr.stringify(u)));if(!I.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Xr.stringify(t)));return t.children=u,Object.assign(t,l),{v:0,editor:t}}),{selectorContext:p,onChange:v}=K8(t),g=kt(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(B=>({v:B.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)})},[]),je.createElement(H8.Provider,{value:p},je.createElement(ig.Provider,{value:f},je.createElement(gc.Provider,{value:f.editor},je.createElement(L8.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)},V8=(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){An(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 W8=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(),!Mn.get(r)&&(v=pn.get(r))!==null&&v!==void 0&&v.length&&Mn.set(r,null),oo.delete(r),u(f,d)},r.removeMark=f=>{var d;!Mn.get(r)&&(d=pn.get(r))!==null&&d!==void 0&&d.length&&Mn.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=>bt.isElement(b)&&I.isBlock(r,b),at:r.selection});if(d){var[,p]=d,v=I.range(r,p,r.selection.anchor),g=V8(r,v);Fe.isCollapsed(g)||qe.delete(r,{at:g})}}},r.apply=f=>{var d=[],p=[],v=pn.get(r);if(v!=null&&v.length){var g=v.map(W=>U9(W,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=Ja.get(r))===null||m===void 0||m.unref(),Ja.delete(r);break}case"insert_node":case"remove_node":{d.push(...ra(r,ne.parent(f.path)));break}case"merge_node":{var B=ne.previous(f.path);d.push(...ra(r,B));break}case"move_node":{var F=ne.common(ne.parent(f.path),ne.parent(f.newPath));d.push(...ra(r,F));var A;ne.isBefore(f.path,f.newPath)?(d.push(...ra(r,ne.parent(f.path))),A=f.newPath):(d.push(...ra(r,ne.parent(f.newPath))),A=f.path);var O=Ze.get(e,ne.parent(A)),k=Re.findKey(r,O),P=I.pathRef(r,ne.parent(A));p.push([P,k]);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[M,_]of d){var[T]=I.node(r,M);Ns.set(T,_)}for(var[q,L]of p){if(q.current){var[Y]=I.node(r,q.current);Ns.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(T=>{T.textContent&&T.textContent.trim()!==""&&(m=T)}),b){var[B]=b,F=x.cloneRange(),A=Re.toDOMNode(r,B);F.setEndAfter(A),D=F.cloneContents()}if(g&&(m=D.querySelector("[data-slate-spacer]")),Array.from(D.querySelectorAll("[data-slate-zero-width]")).forEach(T=>{var q=T.getAttribute("data-slate-zero-width")==="n";T.textContent=q?`
|
|
112
|
+
`:""}),Ym(m)){var O=m.ownerDocument.createElement("span");O.style.whiteSpace="pre",O.appendChild(m),D.appendChild(O),m=O}var k=r.getFragment(),P=JSON.stringify(k),M=window.btoa(encodeURIComponent(P));m.setAttribute("data-slate-fragment",M),f.setData("application/".concat(t),M);var _=D.ownerDocument.createElement("div");return _.appendChild(D),_.setAttribute("hidden","true"),D.ownerDocument.body.appendChild(_),f.setData("text/html",_.innerHTML),f.setData("text/plain",Jm(_)),D.ownerDocument.body.removeChild(_),f}}},r.insertData=f=>{r.insertFragmentData(f)||r.insertTextData(f)},r.insertFragmentData=f=>{var d=f.getData("application/".concat(t))||P9(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&&qe.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 Jo=Cc();function ug(e){Jo=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(ln.caret,"$1"),r=r.replace(o,u),n},getRegex:()=>new RegExp(r,t)};return n}var ln={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")},U8=/^(?:[ \t]*(?:\n|$))+/,X8=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Y8=/^ {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+|$)/,G8=/^ {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(),J8=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]+)*)/,Z8=/^[^\n]+/,Sc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Q8=hr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ew=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",kc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tw=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",kc).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(),rw=hr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",fg).getRegex(),Bc={blockquote:rw,code:X8,def:Q8,fences:Y8,heading:G8,hr:Di,html:tw,lheading:dg,list:ew,newline:U8,paragraph:fg,table:Qa,text:Z8},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(),nw={...Bc,lheading:J8,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()},ow={...Bc,html:hr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",kc).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()},aw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,hg=/^( {2,}|\\)\n(?!\s*$)/,sw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,rl=/[\p{P}\p{S}]/u,Ac=/[\s\p{P}\p{S}]/u,pg=/[^\s\p{P}\p{S}]/u,lw=hr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ac).getRegex(),mg=/(?!~)[\p{P}\p{S}]/u,uw=/(?!~)[\s\p{P}\p{S}]/u,cw=/(?:[^\s\p{P}\p{S}]|~)/u,dw=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,gg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fw=hr(gg,"u").replace(/punct/g,rl).getRegex(),hw=hr(gg,"u").replace(/punct/g,mg).getRegex(),vg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pw=hr(vg,"gu").replace(/notPunctSpace/g,pg).replace(/punctSpace/g,Ac).replace(/punct/g,rl).getRegex(),mw=hr(vg,"gu").replace(/notPunctSpace/g,cw).replace(/punctSpace/g,uw).replace(/punct/g,mg).getRegex(),gw=hr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,pg).replace(/punctSpace/g,Ac).replace(/punct/g,rl).getRegex(),vw=hr(/\\(punct)/,"gu").replace(/punct/g,rl).getRegex(),bw=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(),yw=hr(kc).replace("(?:-->|$)","-->").getRegex(),xw=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",yw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ts=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ww=hr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ts).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bg=hr(/^!?\[(label)\]\[(ref)\]/).replace("label",Ts).replace("ref",Sc).getRegex(),yg=hr(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sc).getRegex(),Cw=hr("reflink|nolink(?!\\()","g").replace("reflink",bg).replace("nolink",yg).getRegex(),Fc={_backpedal:Qa,anyPunctuation:vw,autolink:bw,blockSkip:dw,br:hg,code:iw,del:Qa,emStrongLDelim:fw,emStrongRDelimAst:pw,emStrongRDelimUnd:gw,escape:aw,link:ww,nolink:yg,punctuation:lw,reflink:bg,reflinkSearch:Cw,tag:xw,text:sw,url:Qa},Dw={...Fc,link:hr(/^!?\[(label)\]\((.*?)\)/).replace("label",Ts).getRegex(),reflink:hr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ts).getRegex()},y0={...Fc,emStrongRDelimAst:mw,emStrongLDelim:hw,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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ew={...y0,br:hr(hg).replace("{2,}","*").getRegex(),text:hr(y0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Wi={normal:Bc,gfm:nw,pedantic:ow},ja={normal:Fc,gfm:y0,breaks:Ew,pedantic:Dw},Sw={"&":"&","<":"<",">":">",'"':""","'":"'"},E1=e=>Sw[e];function Wn(e,t){if(t){if(ln.escapeTest.test(e))return e.replace(ln.escapeReplace,E1)}else if(ln.escapeTestNoEncode.test(e))return e.replace(ln.escapeReplaceNoEncode,E1);return e}function S1(e){try{e=encodeURI(e).replace(ln.percentDecode,"%")}catch{return null}return e}function k1(e,t){var a;const r=e.replace(ln.findPipe,(u,l,f)=>{let d=!1,p=l;for(;--p>=0&&f[p]==="\\";)d=!d;return d?"|":" |"}),n=r.split(ln.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(ln.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 kw(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 B1(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 Bw(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||Jo}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=Bw(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,B=>" ".repeat(3*B.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 B=this.rules.other.nextBulletRegex(x),F=this.rules.other.hrRegex(x),A=this.rules.other.fencesBeginRegex(x),O=this.rules.other.headingBeginRegex(x),k=this.rules.other.htmlBeginRegex(x);for(;e;){const P=e.split(`
|
|
132
|
+
`,1)[0];let M;if(g=P,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),M=g):M=g.replace(this.rules.other.tabCharGlobal," "),A.test(g)||O.test(g)||k.test(g)||B.test(g)||F.test(g))break;if(M.search(this.rules.other.nonSpaceChar)>=x||!g.trim())p+=`
|
|
133
|
+
`+M.slice(x);else{if(b||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.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=M.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=k1(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(k1(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=kw(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)),B1(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 B1(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||Jo,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:ln,block:Wi.normal,inline:ja.normal};this.options.pedantic?(r.block=Wi.pedantic,r.inline=ja.pedantic):this.options.gfm&&(r.block=Wi.gfm,this.options.breaks?r.inline=ja.breaks:r.inline=ja.gfm),this.tokenizer.rules=r}static get rules(){return{block:Wi,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(ln.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(ln.tabCharGlobal," ").replace(ln.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}},Ms=class{constructor(e){wr(this,"options"),wr(this,"parser"),this.options=e||Jo}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(ln.notSpaceStart))==null?void 0:a[0],o=e.replace(ln.endingNewline,"")+`
|
|
148
|
+
`;return n?'<pre><code class="language-'+Wn(n)+'">'+(r?o:Wn(o,!0))+`</code></pre>
|
|
149
|
+
`:"<pre><code>"+(r?o:Wn(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+" "+Wn(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>${Wn(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=S1(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Wn(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=S1(e);if(o===null)return Wn(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Wn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Wn(e.text)}},$c=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||Jo,this.options.renderer=this.options.renderer||new Ms,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $c}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||Jo}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),Aw=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",Ms),wr(this,"TextRenderer",$c),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 Ms(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>"+Wn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Go=new Aw;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=Jo;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=Ms;lr.TextRenderer=$c;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 kr="-ms-",ei="-moz-",fr="-webkit-",xg="comm",nl="rule",Nc="decl",Fw="@import",wg="@keyframes",$w="@layer",Cg=Math.abs,Tc=String.fromCharCode,C0=Object.assign;function Nw(e,t){return Ur(e,0)^45?(((t<<2^Ur(e,0))<<2^Ur(e,1))<<2^Ur(e,2))<<2^Ur(e,3):0}function Dg(e){return e.trim()}function no(e,t){return(e=t.exec(e))?e[0]:e}function Vt(e,t,r){return e.replace(t,r)}function as(e,t,r){return e.indexOf(t,r)}function Ur(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 Tw(e,t){return e.map(t).join("")}function A1(e,t){return e.filter(function(r){return!no(r,t)})}var ol=1,ya=1,Sg=0,Fn=0,Hr=0,$a="";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 Ow(){return Hr}function Mw(){return Hr=Fn>0?Ur($a,--Fn):0,ya--,Hr===10&&(ya=1,ol--),Hr}function Rn(){return Hr=Fn<Sg?Ur($a,Fn++):0,ya++,Hr===10&&(ya=1,ol++),Hr}function Ko(){return Ur($a,Fn)}function is(){return Fn}function il(e,t){return ba($a,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 Rw(e){return ol=ya=1,Sg=Un($a=e),Fn=0,[]}function Iw(e){return $a="",e}function Du(e){return Dg(il(Fn-1,E0(e===91?e+2:e===40?e+1:e)))}function Pw(e){for(;(Hr=Ko())&&Hr<33;)Rn();return D0(e)>2||D0(Hr)>3?"":" "}function zw(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 jw(e,t){for(;Rn()&&e+Hr!==57&&!(e+Hr===84&&Ko()===47););return"/*"+il(t,Fn-1)+"*"+Tc(e===47?e:Rn())}function _w(e){for(;!D0(Ko());)Rn();return il(e,Fn)}function Lw(e){return Iw(ss("",null,null,null,[""],e=Rw(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,B=1,F=0,A="",O=o,k=a,P=n,M=A;m;)switch(x=F,F=Rn()){case 40:if(x!=108&&Ur(M,v-1)==58){as(M+=Vt(Du(F),"&","&\f"),"&\f",Cg(d?l[d-1]:0))!=-1&&(B=-1);break}case 34:case 39:case 91:M+=Du(F);break;case 9:case 10:case 13:case 32:M+=Pw(x);break;case 92:M+=zw(is()-1,7);continue;case 47:switch(Ko()){case 42:case 47:Ka(Hw(jw(Rn(),is()),t,r,f),f);break;default:M+="/"}break;case 123*D:l[d++]=Un(M)*B;case 125*D:case 59:case 0:switch(F){case 0:case 125:m=0;case 59+p:B==-1&&(M=Vt(M,/\f/g,"")),b>0&&Un(M)-v&&Ka(b>32?$1(M+";",n,r,v-1,f):$1(Vt(M," ","")+";",n,r,v-2,f),f);break;case 59:M+=";";default:if(Ka(P=F1(M,t,r,d,p,o,l,A,O=[],k=[],v,a),a),F===123)if(p===0)ss(M,t,P,P,O,a,v,l,k);else switch(g===99&&Ur(M,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,A,o,O=[],v,k),k),o,k,v,l,n?O:k);break;default:ss(M,P,P,P,[""],k,0,l,k)}}d=p=b=0,D=B=1,A=M="",v=u;break;case 58:v=1+Un(M),b=x;default:if(D<1){if(F==123)--D;else if(F==125&&D++==0&&Mw()==125)continue}switch(M+=Tc(F),F*D){case 38:B=p>0?1:(M+="\f",-1);break;case 44:l[d++]=(Un(M)-1)*B,B=1;break;case 64:Ko()===45&&(M+=Du(Rn())),g=Ko(),p=v=Un(A=M+=_w(is())),F++;break;case 45:x===45&&Un(M)==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,B=0;D<n;++D)for(var F=0,A=ba(e,g+1,g=Cg(m=u[D])),O=e;F<x;++F)(O=Dg(m>0?b[F]+" "+A:Vt(A,/&\f/g,b[F])))&&(f[B++]=O);return al(e,t,r,o===0?nl:l,f,d,p,v)}function Hw(e,t,r,n){return al(e,t,r,xg,Tc(Ow()),ba(e,2,-2),0,n)}function $1(e,t,r,n,o){return al(e,t,r,Nc,ba(e,0,n),ba(e,n+1,-1),n,o)}function kg(e,t,r){switch(Nw(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+kr+e+e;case 5936:switch(Ur(e,t+11)){case 114:return fr+e+kr+Vt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fr+e+kr+Vt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fr+e+kr+Vt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return fr+e+kr+e+e;case 6165:return fr+e+kr+"flex-"+e+e;case 5187:return fr+e+Vt(e,/(\w+).+(:[^]+)/,fr+"box-$1$2"+kr+"flex-$1$2")+e;case 5443:return fr+e+kr+"flex-item-"+Vt(e,/flex-|-self/g,"")+(no(e,/flex-|baseline/)?"":kr+"grid-row-"+Vt(e,/flex-|-self/g,""))+e;case 4675:return fr+e+kr+"flex-line-pack"+Vt(e,/align-content|flex-|-self/g,"")+e;case 5548:return fr+e+kr+Vt(e,"shrink","negative")+e;case 5292:return fr+e+kr+Vt(e,"basis","preferred-size")+e;case 6060:return fr+"box-"+Vt(e,"-grow","")+fr+e+kr+Vt(e,"grow","positive")+e;case 4554:return fr+Vt(e,/([^-])(transform)/g,"$1"+fr+"$2")+e;case 6187:return Vt(Vt(Vt(e,/(zoom-|grab)/,fr+"$1"),/(image-set)/,fr+"$1"),e,"")+e;case 5495:case 3959:return Vt(e,/(image-set\([^]*)/,fr+"$1$`$1");case 4968:return Vt(Vt(e,/(.+:)(flex-)?(.*)/,fr+"box-pack:$3"+kr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+fr+e+e;case 4200:if(!no(e,/flex-|baseline/))return kr+"grid-column-align"+ba(e,t)+e;break;case 2592:case 3360:return kr+Vt(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:kr+Vt(e,"-start","")+e+kr+"grid-row-span:"+(~as(r,"span",0)?no(r,/\d+/):+no(r,/\d+/)-+no(e,/\d+/))+";":kr+Vt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return no(n.props,/grid-\w+-start/)})?e:kr+Vt(Vt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Vt(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(Ur(e,t+1)){case 109:if(Ur(e,t+4)!==45)break;case 102:return Vt(e,/(.+:)(.+)-([^]+)/,"$1"+fr+"$2-$3$1"+ei+(Ur(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~as(e,"stretch",0)?kg(Vt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Vt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,u,l,f,d){return kr+o+":"+a+d+(u?kr+o+"-span:"+(l?f:+f-+a)+d:"")+e});case 4949:if(Ur(e,t+6)===121)return Vt(e,":",":"+fr)+e;break;case 6444:switch(Ur(e,Ur(e,14)===45?18:11)){case 120:return Vt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+fr+(Ur(e,14)===45?"inline-":"")+"box$3$1"+fr+"$2$3$1"+kr+"$2box$3")+e;case 100:return Vt(e,":",":"+kr)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Vt(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 Kw(e,t,r,n){switch(e.type){case $w:if(e.children.length)break;case Fw:case Nc: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 qw(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 Vw(e){return function(t){t.root||(t=t.return)&&e(t)}}function Ww(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Nc:e.return=kg(e.value,e.length,r);return;case wg:return Rs([xo(e,{value:Vt(e.value,"@","@"+fr)})],n);case nl:if(e.length)return Tw(r=e.props,function(o){switch(no(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":na(xo(e,{props:[Vt(o,/:(read-\w+)/,":"+ei+"$1")]})),na(xo(e,{props:[o]})),C0(e,{props:A1(r,n)});break;case"::placeholder":na(xo(e,{props:[Vt(o,/:(plac\w+)/,":"+fr+"input-$1")]})),na(xo(e,{props:[Vt(o,/:(plac\w+)/,":"+ei+"$1")]})),na(xo(e,{props:[Vt(o,/:(plac\w+)/,kr+"input-$1")]})),na(xo(e,{props:[o]})),C0(e,{props:A1(r,n)});break}return""})}}var Uw={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",Bg="active",Ag="data-styled-version",sl="6.1.19",Oc=`/*!sc*/
|
|
168
|
+
`,Is=typeof window<"u"&&typeof document<"u",Xw=!!(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 Yw(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"]),Gw=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Jw=/(^-|-$)/g;function N1(e){return e.replace(Gw,"-").replace(Jw,"")}var Zw=/(a)(d)/gi,Ui=52,T1=function(e){return String.fromCharCode(e+(e>25?39:97))};function S0(e){var t,r="";for(t=Math.abs(e);t>Ui;t=t/Ui|0)r=T1(t%Ui)+r;return(T1(t%Ui)+r).replace(Zw,"$1-$2")}var Eu,$g=5381,la=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ng=function(e){return la($g,e)};function Tg(e){return S0(Ng(e)>>>0)}function Qw(e){return e.displayName||e.name||"Component"}function Su(e){return typeof e=="string"&&!0}var Og=typeof Symbol=="function"&&Symbol.for,Mg=Og?Symbol.for("react.memo"):60115,eC=Og?Symbol.for("react.forward_ref"):60112,tC={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},rC={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},nC=((Eu={})[eC]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Eu[Mg]=Rg,Eu);function O1(e){return("type"in(t=e)&&t.type.$$typeof)===Mg?Rg:"$$typeof"in e?nC[e.$$typeof]:tC;var t}var oC=Object.defineProperty,aC=Object.getOwnPropertyNames,M1=Object.getOwnPropertySymbols,iC=Object.getOwnPropertyDescriptor,sC=Object.getPrototypeOf,R1=Object.prototype;function Ig(e,t,r){if(typeof t!="string"){if(R1){var n=sC(t);n&&n!==R1&&Ig(e,n,r)}var o=aC(t);M1&&(o=o.concat(M1(t)));for(var a=O1(e),u=O1(t),l=0;l<o.length;++l){var f=o[l];if(!(f in rC||r&&r[f]||u&&f in u||a&&f in a)){var d=iC(t,f);try{oC(e,f,d)}catch{}}}}return e}function Ca(e){return typeof e=="function"}function Mc(e){return typeof e=="object"&&"styledComponentId"in e}function zo(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function k0(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 B0(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]=B0(e[n],t[n]);else if(hi(t))for(var n in t)e[n]=B0(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 lC=(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},uC=function(e,t){us=t+1,ls.set(e,t),Ps.set(t,e)},cC="style[".concat(xa,"][").concat(Ag,'="').concat(sl,'"]'),dC=new RegExp("^".concat(xa,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),fC=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)},hC=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(dC);if(f){var d=0|parseInt(f[1],10),p=f[2];d!==0&&(uC(p,d),fC(e,p,f[3]),e.getTag().insertRules(d,o)),o.length=0}else o.push(l)}}},I1=function(e){for(var t=document.querySelectorAll(cC),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(xa)!==Bg&&(hC(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function pC(){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,Bg),n.setAttribute(Ag,sl);var u=pC();return u&&n.setAttribute("nonce",u),r.insertBefore(n,a),n},mC=(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})(),gC=(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})(),vC=(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,bC={isServer:!Is,useCSSOMInjection:!Xw},zg=(function(){function e(t,r,n){t===void 0&&(t=wa),r===void 0&&(r={});var o=this;this.options=vn(vn({},bC),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(B){return Ps.get(B)})(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(B){B.length>0&&(m+="".concat(B,","))}),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 vC(o):n?new mC(o):new gC(o)})(this.options),new lC(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})(),yC=/&/g,xC=/^\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 wC(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(yC,r).replace(n,d))}),u.prefix&&p.push(Ww),p.push(Kw);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(xC,""),B=Lw(x||b?"".concat(x," ").concat(b," { ").concat(m," }"):m);u.namespace&&(B=jg(B,u.namespace));var F=[];return Rs(B,qw(p.concat(Vw(function(A){return F.push(A)})))),F};return v.hash=f.length?f.reduce(function(g,b){return b.name||Ei(15),la(g,b.name)},$g).toString():"",v}var CC=new zg,A0=wC(),_g=je.createContext({shouldForwardProp:void 0,styleSheet:CC,stylis:A0});_g.Consumer;je.createContext(void 0);function z1(){return No(_g)}var Lg=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=A0);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=A0),this.name+t.hash},e})(),DC=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;DC(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 Uw||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function qo(e,t,r,n){if(Hg(e))return[];if(Mc(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 EC(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ca(r)&&!Mc(r))return!1}return!0}var SC=Ng(sl),kC=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&EC(t),this.componentId=r,this.baseHash=la(SC,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=k0(qo(this.rules,t,r,n)),u=S0(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=k0(qo(v,t,r,n));f=la(f,g+p),d+=g}}if(d){var b=S0(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=je.createContext(void 0);qg.Consumer;var ku={};function BC(e,t,r){var n=Mc(e),o=e,a=!Su(e),u=t.attrs,l=u===void 0?ll:u,f=t.componentId,d=f===void 0?(function(O,k){var P=typeof O!="string"?"sc":N1(O);ku[P]=(ku[P]||0)+1;var M="".concat(P,"-").concat(Tg(sl+P+ku[P]));return k?"".concat(k,"-").concat(M):M})(t.displayName,t.parentComponentId):f,p=t.displayName,v=p===void 0?(function(O){return Su(O)?"styled.".concat(O):"Styled(".concat(Qw(O),")")})(e):p,g=t.displayName&&t.componentId?"".concat(N1(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,k){return D(O,k)&&m(O,k)}}else x=D}var B=new kC(r,g,n?o.componentStyle:void 0);function F(O,k){return(function(P,M,_){var T=P.attrs,q=P.componentStyle,L=P.defaultProps,Y=P.foldedComponentIds,W=P.styledComponentId,z=P.target,K=je.useContext(qg),X=z1(),V=P.shouldForwardProp||X.shouldForwardProp,Z=Yw(M,K,L)||wa,R=(function(Se,J,he){for(var se,te=vn(vn({},J),{className:void 0,theme:he}),ue=0;ue<Se.length;ue+=1){var Ce=Ca(se=Se[ue])?se(te):se;for(var xe in Ce)te[xe]=xe==="className"?zo(te[xe],Ce[xe]):xe==="style"?vn(vn({},te[xe]),Ce[xe]):Ce[xe]}return J.className&&(te.className=zo(te.className,J.className)),te})(T,M,Z),ie=R.as||z,me={};for(var ye in R)R[ye]===void 0||ye[0]==="$"||ye==="as"||ye==="theme"&&R.theme===Z||(ye==="forwardedAs"?me.as=R.forwardedAs:V&&!V(ye,ie)||(me[ye]=R[ye]));var ge=(function(Se,J){var he=z1(),se=Se.generateAndInjectStyles(J,he.styleSheet,he.stylis);return se})(q,R),ae=zo(Y,W);return ge&&(ae+=" "+ge),R.className&&(ae+=" "+R.className),me[Su(ie)&&!Fg.has(ie)?"class":"className"]=ae,_&&(me.ref=_),ds(ie,me)})(A,O,k)}F.displayName=v;var A=je.forwardRef(F);return A.attrs=b,A.componentStyle=B,A.displayName=v,A.shouldForwardProp=x,A.foldedComponentIds=n?zo(o.foldedComponentIds,o.styledComponentId):"",A.styledComponentId=g,A.target=n?o.target:e,Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(O){this._foldedDefaultProps=n?(function(k){for(var P=[],M=1;M<arguments.length;M++)P[M-1]=arguments[M];for(var _=0,T=P;_<T.length;_++)B0(k,T[_],!0);return k})({},o.defaultProps,O):O}}),Rc(A,function(){return".".concat(A.styledComponentId)}),a&&Ig(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),A}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 Vg=function(e){return F0(BC,e)},Dt=Vg;Fg.forEach(function(e){Dt[e]=Vg(e)});function Wg(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=k0(ul.apply(void 0,fi([e],t,!1))),o=Tg(n);return new Lg(o,n)}const AC=Dt.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
|
+
`,FC=Dt.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=$o(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var P,M,_,T,q,L,Y,W,z,K,X,V;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=kt(()=>{try{const Z=document.querySelector('[data-slate-editor="true"]');if(Z){const R=Z.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||Z.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(Z){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",Z),600}},[]);er(()=>{g(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const Z=m();x(Z)},[e.value,e.placeholder,m]);const B=kt(()=>{f(!0),p(e.value||""),setTimeout(()=>{D.current&&(D.current.focus(),D.current.select())},0)},[e.value]),F=kt(Z=>{const R=Z.target.value;p(R)},[]),A=kt(()=>{const Z=Re.findPath(u,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",Z),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",d),qe.setNodes(u,{value:d},{at:Z});const R=d.trim()!==""?d:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";g(R);const ie=u.children[Z[0]];if(ie&&"children"in ie){const me=ie.children[Z[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",me)}f(!1)},[u,e,d]),O=kt(()=>{A()},[A]),k=kt(Z=>{Z.key==="Enter"?(Z.preventDefault(),A()):Z.key==="Escape"&&(Z.preventDefault(),p(e.value||""),f(!1))},[A,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(FC,{ref:D,value:d,onChange:F,onBlur:O,onKeyDown:k,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 ${((M=n==null?void 0:n.templateField)==null?void 0:M.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(AC,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:v.length,onClick:B,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(T=n==null?void 0:n.templateField)==null?void 0:T.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:(W=n==null?void 0:n.templateField)==null?void 0:W.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:(V=n==null?void 0:n.templateField)==null?void 0:V.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 $C=({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=je.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 k=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(k)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const k=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",k);let P=null,M=null,_;for(const L of k){const Y=L==null?void 0:L.reply;if(!(Y!=null&&Y.databaseReference))continue;const W=Y.databaseReference;console.log(W,"123123123jk123lk12j3l12jl3"),W!=null&&W.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",W.retrieveSqlData.filePath),_=W.retrieveSqlData.filePath);let z=W;if(typeof W=="string")try{z=JSON.parse(W)}catch{}if(!z)continue;const K=Array.isArray(z)?z:[z],X=K.findIndex(R=>(R==null?void 0:R.id)===t.id),V=X>=0?K[X]:null;if(console.log("~~~~~~~~~~~~~~~",V),V){P=V,M=V.retrieveSqlData||V.retrieve_table_data||V.retrieveTableData;break}const Z=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&&Z&&(P=Z,M=Z.retrieveSqlData||Z.retrieve_table_data||Z.retrieveTableData)}if(!P||!M){console.warn("No databaseReference with preData found for id:",t.id),d(!1);return}const T=Array.isArray(M==null?void 0:M.preData)?M.preData[0]:null;if(!T){console.warn("Matched item has no preData"),d(!1);return}const q={columns:(T.columns||[]).map(L=>({key:L.key,title:L.title})),rows:T.data||T.rows||[],total:(M==null?void 0:M.total)||0,fetchUrl:(M==null?void 0:M.fetchUrl)||"/index/knowledgeBase/file/stream",source:_||(M==null?void 0:M.source)||(P==null?void 0:P.source)};l(q),d(!1)}catch(k){console.error("Init preData parsing failed:",k),d(!1)}}},[t.id,u,n]),er(()=>{const k=P=>{try{const M=(P==null?void 0:P.detail)||{},_=M==null?void 0:M.id;if(!_||String(_)!==String(t.id))return;const T=M.databaseReference;if(!T)return;let q=T;if(typeof T=="string")try{q=JSON.parse(T)}catch{}if(!q)return;const L=Array.isArray(q)?q:[q],Y=L.findIndex(V=>String(V==null?void 0:V.id)===String(t.id)),W=Y>=0?L[Y]:null;if(!W)return;const z=(W==null?void 0:W.retrieveSqlData)||(W==null?void 0:W.retrieve_table_data)||(W==null?void 0:W.retrieveTableData),K=Array.isArray(z==null?void 0:z.preData)?z.preData[0]:null;if(!K)return;const X={columns:(K.columns||[]).map(V=>({key:V.key,title:V.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:(W==null?void 0:W.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",k),()=>{window.removeEventListener("retrieve-sql-data:data-response",k)}},[t.id]);const x=k=>{if(!k||k.length===0)return[];const P=k.find(M=>M&&typeof M=="object")||{};return Object.keys(P).map(M=>({key:M,title:M}))},D=(k,P)=>{v(k),P&&b(P);const M=_=>{let T=null;if(_&&Array.isArray(_.columns)&&Array.isArray(_.rows))T={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;T={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=_;T={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(!T){console.warn("replacePredataFunction received unsupported data format:",_);return}console.log("Replacing table data with:",T),l(T)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:k,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:M})},m=k=>u!=null&&u.rows?Math.max(...u.rows.map(P=>{const M=P[k];return M?String(M).length:0})):0,B=(((O=u==null?void 0:u.columns)==null?void 0:O.length)||0)===1,F=(u==null?void 0:u.columns.map((k,P)=>({title:k.title||k.key,dataIndex:k.key,key:k.key,render:M=>{const _=M==null||M===""?"-":M;return B?U.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(_)}):_},...B?{width:void 0}:{}})))||[],A=(u==null?void 0:u.rows.map((k,P)=>({key:P,...k})))||[];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 k=String(o).length;let P="12px",M="24px",_="24px";return k===2?(P="9px",M="22px",_="24px"):k===3?(P="8px",M="24px",_="24px"):k>=4&&(P="8px",M="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:M,height:M,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((k,P)=>({...k,...B?{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:M=>{if(M==null)return"-";const _=String(M);if(B)return U.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:_,children:_});const T=m(k.key);let q="200px";return P===0?q="80px":T<=8?q="100px":T<=15?q="150px":T<=25?q="200px":T<=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:A,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:B?"100%":"1000px"},scroll:{x:B?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:{}},Bu={exports:{}},Au,H1;function NC(){if(H1)return Au;H1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Au=e,Au}var Fu,K1;function TC(){if(K1)return Fu;K1=1;var e=NC();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 OC(){return q1||(q1=1,Bu.exports=TC()()),Bu.exports}var $0={exports:{}},MC=$0.exports,V1;function RC(){return V1||(V1=1,(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:MC,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 V4}});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,S;const $=c&&c.loc;if($&&$.start<=$.end){const G=$.lexer.input;y=$.start,S=$.end,y===G.length?h+=" at end of input: ":h+=" at position "+(y+1)+": ";const re=G.slice(y,S).replace(/[^]/g,"$&\u0332");let pe;y>15?pe="\u2026"+G.slice(y-15,y):pe=G.slice(0,y);let be;S+15<G.length?be=G.slice(S,S+15)+"\u2026":be=G.slice(S),h+=pe+re+be}const j=new Error(h);return j.name="ParseError",j.__proto__=o.prototype,j.position=y,y!=null&&S!=null&&(j.length=S-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 B(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]:B(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 A{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[W[this.id]]}sub(){return Y[z[this.id]]}fracNum(){return Y[K[this.id]]}fracDen(){return Y[X[this.id]]}cramp(){return Y[V[this.id]]}text(){return Y[Z[this.id]]}isTight(){return this.size>=2}}const O=0,k=1,P=2,M=3,_=4,T=5,q=6,L=7,Y=[new A(O,0,!1),new A(k,0,!0),new A(P,1,!1),new A(M,1,!0),new A(_,2,!1),new A(T,2,!0),new A(q,3,!1),new A(L,3,!0)],W=[_,T,_,T,q,L,q,L],z=[T,T,T,T,L,L,L,L],K=[P,M,_,T,q,L,q,L],X=[M,M,T,T,L,L,L,L],V=[k,k,M,M,T,T,L,L],Z=[O,k,P,M,P,M,P,M];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 ye=[];ie.forEach(s=>s.blocks.forEach(i=>ye.push(...i)));function ge(s){for(let i=0;i<ye.length;i+=2)if(s>=ye[i]&&s<=ye[i+1])return!0;return!1}const ae=80,Se=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"},J=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"},ue=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"},xe=function(s,i,c){i=1e3*i;let h="";switch(s){case"sqrtMain":h=Se(i,ae);break;case"sqrtSize1":h=J(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},ke=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""}},De={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`},Be=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 Ne={"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 Me={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 ft(s,i){Ne[s]=i}function ot(s,i,c){if(!Ne[i])throw new Error("Font metrics not found for font: "+i+".");let h=s.charCodeAt(0),y=Ne[i][h];if(!y&&s[0]in He&&(h=He[s[0]].charCodeAt(0),y=Ne[i][h]),!y&&c==="text"&&ge(h)&&(y=Ne[i][77]),y)return{depth:y[0],height:y[1],italic:y[2],skew:y[3],width:y[4]}}const Oe={};function _e(s){let i;if(s>=5?i=0:s>=3?i=1:i=2,!Oe[i]){const c=Oe[i]={cssEmPerMu:Me.quad[i]/18};for(const h in Me)Me.hasOwnProperty(h)&&(c[h]=Me[h][i])}return Oe[i]}const We=[[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]],ct=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],at=function(s,i){return i.size<2?s:We[s-1][i.size-1]};class Qe{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||Qe.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=ct[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 Qe(c)}havingStyle(i){return this.style===i?this:this.extend({style:i,size:at(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:ct[i-1]})}havingBaseStyle(i){i=i||this.style.text();const c=at(Qe.BASESIZE,i);return this.size===c&&this.textSize===Qe.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!==Qe.BASESIZE?["sizing","reset-size"+this.size,"size"+Qe.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=_e(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Qe.BASESIZE=6;var Nt=Qe;const Ct={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},mt={ex:!0,em:!0,mu:!0},dt=function(s){return typeof s!="string"&&(s=s.unit),s in Ct||s in mt||s==="ex"},Pe=function(s,i){let c;if(s.unit in Ct)c=Ct[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)},fe=function(s){return+s.toFixed(4)+"em"},gt=function(s){return s.filter(i=>i).join(" ")},St=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=gt(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(gt(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 Bt{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,St.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,St.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 At{constructor(i,c,h,y,S,$,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=S||0,this.width=$||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=fe(this.italic)),this.classes.length>0&&(c=c||document.createElement("span"),c.className=gt(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(gt(this.classes)),c+='"');let h="";this.italic>0&&(h+="margin-right:"+this.italic+"em;");for(const S in this.style)this.style.hasOwnProperty(S)&&(h+=D.hyphenate(S)+":"+this.style[S]+";");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",De[this.pathName]),i}toMarkup(){return this.alternate?'<path d="'+D.escape(this.alternate)+'"/>':'<path d="'+D.escape(De[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 At)return s;throw new Error("Expected symbolNode but got "+String(s)+".")}function jr(s){if(s instanceof Bt)return s;throw new Error("Expected span<HtmlDomNode> but got "+String(s)+".")}const Mr={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,S){pr[s][y]={font:i,group:c,replace:h},S&&h&&(pr[s][h]=pr[s][y])}const E="math",Ie="text",N="main",Q="ams",Jt="accent-token",rt="bin",Ke="close",xt="inner",et="mathord",Tt="op-token",ar="open",Nr="punct",ee="rel",br="spacing",oe="textord";w(E,N,ee,"\u2261","\\equiv",!0),w(E,N,ee,"\u227A","\\prec",!0),w(E,N,ee,"\u227B","\\succ",!0),w(E,N,ee,"\u223C","\\sim",!0),w(E,N,ee,"\u22A5","\\perp"),w(E,N,ee,"\u2AAF","\\preceq",!0),w(E,N,ee,"\u2AB0","\\succeq",!0),w(E,N,ee,"\u2243","\\simeq",!0),w(E,N,ee,"\u2223","\\mid",!0),w(E,N,ee,"\u226A","\\ll",!0),w(E,N,ee,"\u226B","\\gg",!0),w(E,N,ee,"\u224D","\\asymp",!0),w(E,N,ee,"\u2225","\\parallel"),w(E,N,ee,"\u22C8","\\bowtie",!0),w(E,N,ee,"\u2323","\\smile",!0),w(E,N,ee,"\u2291","\\sqsubseteq",!0),w(E,N,ee,"\u2292","\\sqsupseteq",!0),w(E,N,ee,"\u2250","\\doteq",!0),w(E,N,ee,"\u2322","\\frown",!0),w(E,N,ee,"\u220B","\\ni",!0),w(E,N,ee,"\u221D","\\propto",!0),w(E,N,ee,"\u22A2","\\vdash",!0),w(E,N,ee,"\u22A3","\\dashv",!0),w(E,N,ee,"\u220B","\\owns"),w(E,N,Nr,".","\\ldotp"),w(E,N,Nr,"\u22C5","\\cdotp"),w(E,N,oe,"#","\\#"),w(Ie,N,oe,"#","\\#"),w(E,N,oe,"&","\\&"),w(Ie,N,oe,"&","\\&"),w(E,N,oe,"\u2135","\\aleph",!0),w(E,N,oe,"\u2200","\\forall",!0),w(E,N,oe,"\u210F","\\hbar",!0),w(E,N,oe,"\u2203","\\exists",!0),w(E,N,oe,"\u2207","\\nabla",!0),w(E,N,oe,"\u266D","\\flat",!0),w(E,N,oe,"\u2113","\\ell",!0),w(E,N,oe,"\u266E","\\natural",!0),w(E,N,oe,"\u2663","\\clubsuit",!0),w(E,N,oe,"\u2118","\\wp",!0),w(E,N,oe,"\u266F","\\sharp",!0),w(E,N,oe,"\u2662","\\diamondsuit",!0),w(E,N,oe,"\u211C","\\Re",!0),w(E,N,oe,"\u2661","\\heartsuit",!0),w(E,N,oe,"\u2111","\\Im",!0),w(E,N,oe,"\u2660","\\spadesuit",!0),w(E,N,oe,"\xA7","\\S",!0),w(Ie,N,oe,"\xA7","\\S"),w(E,N,oe,"\xB6","\\P",!0),w(Ie,N,oe,"\xB6","\\P"),w(E,N,oe,"\u2020","\\dag"),w(Ie,N,oe,"\u2020","\\dag"),w(Ie,N,oe,"\u2020","\\textdagger"),w(E,N,oe,"\u2021","\\ddag"),w(Ie,N,oe,"\u2021","\\ddag"),w(Ie,N,oe,"\u2021","\\textdaggerdbl"),w(E,N,Ke,"\u23B1","\\rmoustache",!0),w(E,N,ar,"\u23B0","\\lmoustache",!0),w(E,N,Ke,"\u27EF","\\rgroup",!0),w(E,N,ar,"\u27EE","\\lgroup",!0),w(E,N,rt,"\u2213","\\mp",!0),w(E,N,rt,"\u2296","\\ominus",!0),w(E,N,rt,"\u228E","\\uplus",!0),w(E,N,rt,"\u2293","\\sqcap",!0),w(E,N,rt,"\u2217","\\ast"),w(E,N,rt,"\u2294","\\sqcup",!0),w(E,N,rt,"\u25EF","\\bigcirc",!0),w(E,N,rt,"\u2219","\\bullet",!0),w(E,N,rt,"\u2021","\\ddagger"),w(E,N,rt,"\u2240","\\wr",!0),w(E,N,rt,"\u2A3F","\\amalg"),w(E,N,rt,"&","\\And"),w(E,N,ee,"\u27F5","\\longleftarrow",!0),w(E,N,ee,"\u21D0","\\Leftarrow",!0),w(E,N,ee,"\u27F8","\\Longleftarrow",!0),w(E,N,ee,"\u27F6","\\longrightarrow",!0),w(E,N,ee,"\u21D2","\\Rightarrow",!0),w(E,N,ee,"\u27F9","\\Longrightarrow",!0),w(E,N,ee,"\u2194","\\leftrightarrow",!0),w(E,N,ee,"\u27F7","\\longleftrightarrow",!0),w(E,N,ee,"\u21D4","\\Leftrightarrow",!0),w(E,N,ee,"\u27FA","\\Longleftrightarrow",!0),w(E,N,ee,"\u21A6","\\mapsto",!0),w(E,N,ee,"\u27FC","\\longmapsto",!0),w(E,N,ee,"\u2197","\\nearrow",!0),w(E,N,ee,"\u21A9","\\hookleftarrow",!0),w(E,N,ee,"\u21AA","\\hookrightarrow",!0),w(E,N,ee,"\u2198","\\searrow",!0),w(E,N,ee,"\u21BC","\\leftharpoonup",!0),w(E,N,ee,"\u21C0","\\rightharpoonup",!0),w(E,N,ee,"\u2199","\\swarrow",!0),w(E,N,ee,"\u21BD","\\leftharpoondown",!0),w(E,N,ee,"\u21C1","\\rightharpoondown",!0),w(E,N,ee,"\u2196","\\nwarrow",!0),w(E,N,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,rt,"\u22B4","\\unlhd"),w(E,Q,rt,"\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,N,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,rt,"\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,rt,"\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,rt,"\u22B2","\\lhd"),w(E,Q,rt,"\u22B3","\\rhd"),w(E,Q,ee,"\u2242","\\eqsim",!0),w(E,N,ee,"\u22C8","\\Join"),w(E,Q,ee,"\u2251","\\Doteq",!0),w(E,Q,rt,"\u2214","\\dotplus",!0),w(E,Q,rt,"\u2216","\\smallsetminus"),w(E,Q,rt,"\u22D2","\\Cap",!0),w(E,Q,rt,"\u22D3","\\Cup",!0),w(E,Q,rt,"\u2A5E","\\doublebarwedge",!0),w(E,Q,rt,"\u229F","\\boxminus",!0),w(E,Q,rt,"\u229E","\\boxplus",!0),w(E,Q,rt,"\u22C7","\\divideontimes",!0),w(E,Q,rt,"\u22C9","\\ltimes",!0),w(E,Q,rt,"\u22CA","\\rtimes",!0),w(E,Q,rt,"\u22CB","\\leftthreetimes",!0),w(E,Q,rt,"\u22CC","\\rightthreetimes",!0),w(E,Q,rt,"\u22CF","\\curlywedge",!0),w(E,Q,rt,"\u22CE","\\curlyvee",!0),w(E,Q,rt,"\u229D","\\circleddash",!0),w(E,Q,rt,"\u229B","\\circledast",!0),w(E,Q,rt,"\u22C5","\\centerdot"),w(E,Q,rt,"\u22BA","\\intercal",!0),w(E,Q,rt,"\u22D2","\\doublecap"),w(E,Q,rt,"\u22D3","\\doublecup"),w(E,Q,rt,"\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,N,ee,"\u22B6","\\origof",!0),w(E,N,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,N,oe,"\u2018","`"),w(E,N,oe,"$","\\$"),w(Ie,N,oe,"$","\\$"),w(Ie,N,oe,"$","\\textdollar"),w(E,N,oe,"%","\\%"),w(Ie,N,oe,"%","\\%"),w(E,N,oe,"_","\\_"),w(Ie,N,oe,"_","\\_"),w(Ie,N,oe,"_","\\textunderscore"),w(E,N,oe,"\u2220","\\angle",!0),w(E,N,oe,"\u221E","\\infty",!0),w(E,N,oe,"\u2032","\\prime"),w(E,N,oe,"\u25B3","\\triangle"),w(E,N,oe,"\u0393","\\Gamma",!0),w(E,N,oe,"\u0394","\\Delta",!0),w(E,N,oe,"\u0398","\\Theta",!0),w(E,N,oe,"\u039B","\\Lambda",!0),w(E,N,oe,"\u039E","\\Xi",!0),w(E,N,oe,"\u03A0","\\Pi",!0),w(E,N,oe,"\u03A3","\\Sigma",!0),w(E,N,oe,"\u03A5","\\Upsilon",!0),w(E,N,oe,"\u03A6","\\Phi",!0),w(E,N,oe,"\u03A8","\\Psi",!0),w(E,N,oe,"\u03A9","\\Omega",!0),w(E,N,oe,"A","\u0391"),w(E,N,oe,"B","\u0392"),w(E,N,oe,"E","\u0395"),w(E,N,oe,"Z","\u0396"),w(E,N,oe,"H","\u0397"),w(E,N,oe,"I","\u0399"),w(E,N,oe,"K","\u039A"),w(E,N,oe,"M","\u039C"),w(E,N,oe,"N","\u039D"),w(E,N,oe,"O","\u039F"),w(E,N,oe,"P","\u03A1"),w(E,N,oe,"T","\u03A4"),w(E,N,oe,"X","\u03A7"),w(E,N,oe,"\xAC","\\neg",!0),w(E,N,oe,"\xAC","\\lnot"),w(E,N,oe,"\u22A4","\\top"),w(E,N,oe,"\u22A5","\\bot"),w(E,N,oe,"\u2205","\\emptyset"),w(E,Q,oe,"\u2205","\\varnothing"),w(E,N,et,"\u03B1","\\alpha",!0),w(E,N,et,"\u03B2","\\beta",!0),w(E,N,et,"\u03B3","\\gamma",!0),w(E,N,et,"\u03B4","\\delta",!0),w(E,N,et,"\u03F5","\\epsilon",!0),w(E,N,et,"\u03B6","\\zeta",!0),w(E,N,et,"\u03B7","\\eta",!0),w(E,N,et,"\u03B8","\\theta",!0),w(E,N,et,"\u03B9","\\iota",!0),w(E,N,et,"\u03BA","\\kappa",!0),w(E,N,et,"\u03BB","\\lambda",!0),w(E,N,et,"\u03BC","\\mu",!0),w(E,N,et,"\u03BD","\\nu",!0),w(E,N,et,"\u03BE","\\xi",!0),w(E,N,et,"\u03BF","\\omicron",!0),w(E,N,et,"\u03C0","\\pi",!0),w(E,N,et,"\u03C1","\\rho",!0),w(E,N,et,"\u03C3","\\sigma",!0),w(E,N,et,"\u03C4","\\tau",!0),w(E,N,et,"\u03C5","\\upsilon",!0),w(E,N,et,"\u03D5","\\phi",!0),w(E,N,et,"\u03C7","\\chi",!0),w(E,N,et,"\u03C8","\\psi",!0),w(E,N,et,"\u03C9","\\omega",!0),w(E,N,et,"\u03B5","\\varepsilon",!0),w(E,N,et,"\u03D1","\\vartheta",!0),w(E,N,et,"\u03D6","\\varpi",!0),w(E,N,et,"\u03F1","\\varrho",!0),w(E,N,et,"\u03C2","\\varsigma",!0),w(E,N,et,"\u03C6","\\varphi",!0),w(E,N,rt,"\u2217","*",!0),w(E,N,rt,"+","+"),w(E,N,rt,"\u2212","-",!0),w(E,N,rt,"\u22C5","\\cdot",!0),w(E,N,rt,"\u2218","\\circ",!0),w(E,N,rt,"\xF7","\\div",!0),w(E,N,rt,"\xB1","\\pm",!0),w(E,N,rt,"\xD7","\\times",!0),w(E,N,rt,"\u2229","\\cap",!0),w(E,N,rt,"\u222A","\\cup",!0),w(E,N,rt,"\u2216","\\setminus",!0),w(E,N,rt,"\u2227","\\land"),w(E,N,rt,"\u2228","\\lor"),w(E,N,rt,"\u2227","\\wedge",!0),w(E,N,rt,"\u2228","\\vee",!0),w(E,N,oe,"\u221A","\\surd"),w(E,N,ar,"\u27E8","\\langle",!0),w(E,N,ar,"\u2223","\\lvert"),w(E,N,ar,"\u2225","\\lVert"),w(E,N,Ke,"?","?"),w(E,N,Ke,"!","!"),w(E,N,Ke,"\u27E9","\\rangle",!0),w(E,N,Ke,"\u2223","\\rvert"),w(E,N,Ke,"\u2225","\\rVert"),w(E,N,ee,"=","="),w(E,N,ee,":",":"),w(E,N,ee,"\u2248","\\approx",!0),w(E,N,ee,"\u2245","\\cong",!0),w(E,N,ee,"\u2265","\\ge"),w(E,N,ee,"\u2265","\\geq",!0),w(E,N,ee,"\u2190","\\gets"),w(E,N,ee,">","\\gt",!0),w(E,N,ee,"\u2208","\\in",!0),w(E,N,ee,"\uE020","\\@not"),w(E,N,ee,"\u2282","\\subset",!0),w(E,N,ee,"\u2283","\\supset",!0),w(E,N,ee,"\u2286","\\subseteq",!0),w(E,N,ee,"\u2287","\\supseteq",!0),w(E,Q,ee,"\u2288","\\nsubseteq",!0),w(E,Q,ee,"\u2289","\\nsupseteq",!0),w(E,N,ee,"\u22A8","\\models"),w(E,N,ee,"\u2190","\\leftarrow",!0),w(E,N,ee,"\u2264","\\le"),w(E,N,ee,"\u2264","\\leq",!0),w(E,N,ee,"<","\\lt",!0),w(E,N,ee,"\u2192","\\rightarrow",!0),w(E,N,ee,"\u2192","\\to"),w(E,Q,ee,"\u2271","\\ngeq",!0),w(E,Q,ee,"\u2270","\\nleq",!0),w(E,N,br,"\xA0","\\ "),w(E,N,br,"\xA0","\\space"),w(E,N,br,"\xA0","\\nobreakspace"),w(Ie,N,br,"\xA0","\\ "),w(Ie,N,br,"\xA0"," "),w(Ie,N,br,"\xA0","\\space"),w(Ie,N,br,"\xA0","\\nobreakspace"),w(E,N,br,null,"\\nobreak"),w(E,N,br,null,"\\allowbreak"),w(E,N,Nr,",",","),w(E,N,Nr,";",";"),w(E,Q,rt,"\u22BC","\\barwedge",!0),w(E,Q,rt,"\u22BB","\\veebar",!0),w(E,N,rt,"\u2299","\\odot",!0),w(E,N,rt,"\u2295","\\oplus",!0),w(E,N,rt,"\u2297","\\otimes",!0),w(E,N,oe,"\u2202","\\partial",!0),w(E,N,rt,"\u2298","\\oslash",!0),w(E,Q,rt,"\u229A","\\circledcirc",!0),w(E,Q,rt,"\u22A1","\\boxdot",!0),w(E,N,rt,"\u25B3","\\bigtriangleup"),w(E,N,rt,"\u25BD","\\bigtriangledown"),w(E,N,rt,"\u2020","\\dagger"),w(E,N,rt,"\u22C4","\\diamond"),w(E,N,rt,"\u22C6","\\star"),w(E,N,rt,"\u25C3","\\triangleleft"),w(E,N,rt,"\u25B9","\\triangleright"),w(E,N,ar,"{","\\{"),w(Ie,N,oe,"{","\\{"),w(Ie,N,oe,"{","\\textbraceleft"),w(E,N,Ke,"}","\\}"),w(Ie,N,oe,"}","\\}"),w(Ie,N,oe,"}","\\textbraceright"),w(E,N,ar,"{","\\lbrace"),w(E,N,Ke,"}","\\rbrace"),w(E,N,ar,"[","\\lbrack",!0),w(Ie,N,oe,"[","\\lbrack",!0),w(E,N,Ke,"]","\\rbrack",!0),w(Ie,N,oe,"]","\\rbrack",!0),w(E,N,ar,"(","\\lparen",!0),w(E,N,Ke,")","\\rparen",!0),w(Ie,N,oe,"<","\\textless",!0),w(Ie,N,oe,">","\\textgreater",!0),w(E,N,ar,"\u230A","\\lfloor",!0),w(E,N,Ke,"\u230B","\\rfloor",!0),w(E,N,ar,"\u2308","\\lceil",!0),w(E,N,Ke,"\u2309","\\rceil",!0),w(E,N,oe,"\\","\\backslash"),w(E,N,oe,"\u2223","|"),w(E,N,oe,"\u2223","\\vert"),w(Ie,N,oe,"|","\\textbar",!0),w(E,N,oe,"\u2225","\\|"),w(E,N,oe,"\u2225","\\Vert"),w(Ie,N,oe,"\u2225","\\textbardbl"),w(Ie,N,oe,"~","\\textasciitilde"),w(Ie,N,oe,"\\","\\textbackslash"),w(Ie,N,oe,"^","\\textasciicircum"),w(E,N,ee,"\u2191","\\uparrow",!0),w(E,N,ee,"\u21D1","\\Uparrow",!0),w(E,N,ee,"\u2193","\\downarrow",!0),w(E,N,ee,"\u21D3","\\Downarrow",!0),w(E,N,ee,"\u2195","\\updownarrow",!0),w(E,N,ee,"\u21D5","\\Updownarrow",!0),w(E,N,Tt,"\u2210","\\coprod"),w(E,N,Tt,"\u22C1","\\bigvee"),w(E,N,Tt,"\u22C0","\\bigwedge"),w(E,N,Tt,"\u2A04","\\biguplus"),w(E,N,Tt,"\u22C2","\\bigcap"),w(E,N,Tt,"\u22C3","\\bigcup"),w(E,N,Tt,"\u222B","\\int"),w(E,N,Tt,"\u222B","\\intop"),w(E,N,Tt,"\u222C","\\iint"),w(E,N,Tt,"\u222D","\\iiint"),w(E,N,Tt,"\u220F","\\prod"),w(E,N,Tt,"\u2211","\\sum"),w(E,N,Tt,"\u2A02","\\bigotimes"),w(E,N,Tt,"\u2A01","\\bigoplus"),w(E,N,Tt,"\u2A00","\\bigodot"),w(E,N,Tt,"\u222E","\\oint"),w(E,N,Tt,"\u222F","\\oiint"),w(E,N,Tt,"\u2230","\\oiiint"),w(E,N,Tt,"\u2A06","\\bigsqcup"),w(E,N,Tt,"\u222B","\\smallint"),w(Ie,N,xt,"\u2026","\\textellipsis"),w(E,N,xt,"\u2026","\\mathellipsis"),w(Ie,N,xt,"\u2026","\\ldots",!0),w(E,N,xt,"\u2026","\\ldots",!0),w(E,N,xt,"\u22EF","\\@cdots",!0),w(E,N,xt,"\u22F1","\\ddots",!0),w(E,N,oe,"\u22EE","\\varvdots"),w(Ie,N,oe,"\u22EE","\\varvdots"),w(E,N,Jt,"\u02CA","\\acute"),w(E,N,Jt,"\u02CB","\\grave"),w(E,N,Jt,"\xA8","\\ddot"),w(E,N,Jt,"~","\\tilde"),w(E,N,Jt,"\u02C9","\\bar"),w(E,N,Jt,"\u02D8","\\breve"),w(E,N,Jt,"\u02C7","\\check"),w(E,N,Jt,"^","\\hat"),w(E,N,Jt,"\u20D7","\\vec"),w(E,N,Jt,"\u02D9","\\dot"),w(E,N,Jt,"\u02DA","\\mathring"),w(E,N,et,"\uE131","\\@imath"),w(E,N,et,"\uE237","\\@jmath"),w(E,N,oe,"\u0131","\u0131"),w(E,N,oe,"\u0237","\u0237"),w(Ie,N,oe,"\u0131","\\i",!0),w(Ie,N,oe,"\u0237","\\j",!0),w(Ie,N,oe,"\xDF","\\ss",!0),w(Ie,N,oe,"\xE6","\\ae",!0),w(Ie,N,oe,"\u0153","\\oe",!0),w(Ie,N,oe,"\xF8","\\o",!0),w(Ie,N,oe,"\xC6","\\AE",!0),w(Ie,N,oe,"\u0152","\\OE",!0),w(Ie,N,oe,"\xD8","\\O",!0),w(Ie,N,Jt,"\u02CA","\\'"),w(Ie,N,Jt,"\u02CB","\\`"),w(Ie,N,Jt,"\u02C6","\\^"),w(Ie,N,Jt,"\u02DC","\\~"),w(Ie,N,Jt,"\u02C9","\\="),w(Ie,N,Jt,"\u02D8","\\u"),w(Ie,N,Jt,"\u02D9","\\."),w(Ie,N,Jt,"\xB8","\\c"),w(Ie,N,Jt,"\u02DA","\\r"),w(Ie,N,Jt,"\u02C7","\\v"),w(Ie,N,Jt,"\xA8",'\\"'),w(Ie,N,Jt,"\u02DD","\\H"),w(Ie,N,Jt,"\u25EF","\\textcircled");const ce={"--":!0,"---":!0,"``":!0,"''":!0};w(Ie,N,oe,"\u2013","--",!0),w(Ie,N,oe,"\u2013","\\textendash"),w(Ie,N,oe,"\u2014","---",!0),w(Ie,N,oe,"\u2014","\\textemdash"),w(Ie,N,oe,"\u2018","`",!0),w(Ie,N,oe,"\u2018","\\textquoteleft"),w(Ie,N,oe,"\u2019","'",!0),w(Ie,N,oe,"\u2019","\\textquoteright"),w(Ie,N,oe,"\u201C","``",!0),w(Ie,N,oe,"\u201C","\\textquotedblleft"),w(Ie,N,oe,"\u201D","''",!0),w(Ie,N,oe,"\u201D","\\textquotedblright"),w(E,N,oe,"\xB0","\\degree",!0),w(Ie,N,oe,"\xB0","\\degree"),w(Ie,N,oe,"\xB0","\\textdegree",!0),w(E,N,oe,"\xA3","\\pounds"),w(E,N,oe,"\xA3","\\mathsterling",!0),w(Ie,N,oe,"\xA3","\\pounds"),w(Ie,N,oe,"\xA3","\\textsterling",!0),w(E,Q,oe,"\u2720","\\maltese"),w(Ie,Q,oe,"\u2720","\\maltese");const Te='0123456789/@."';for(let s=0;s<Te.length;s++){const i=Te.charAt(s);w(E,N,oe,i,i)}const st='0123456789!@*()-=+";:?/.,';for(let s=0;s<st.length;s++){const i=st.charAt(s);w(Ie,N,oe,i,i)}const Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let s=0;s<Le.length;s++){const i=Le.charAt(s);w(E,N,et,i,i),w(Ie,N,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,N,et,"h","\u210E"),w(Ie,N,et,"h","\u210E");let de="";for(let s=0;s<Le.length;s++){const i=Le.charAt(s);de=String.fromCharCode(55349,56320+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56372+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56424+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56580+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56684+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56736+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56788+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56840+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56944+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),s<26&&(de=String.fromCharCode(55349,56632+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,56476+s),w(E,N,et,i,de),w(Ie,N,oe,i,de))}de="\u{1D55C}",w(E,N,et,"k",de),w(Ie,N,oe,"k",de);for(let s=0;s<10;s++){const i=s.toString();de=String.fromCharCode(55349,57294+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,57314+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,57324+s),w(E,N,et,i,de),w(Ie,N,oe,i,de),de=String.fromCharCode(55349,57334+s),w(E,N,et,i,de),w(Ie,N,oe,i,de)}const Ue="\xD0\xDE\xFE";for(let s=0;s<Ue.length;s++){const i=Ue.charAt(s);w(E,N,et,i,i),w(Ie,N,oe,i,i)}const Ve=[["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"]],lt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],le=function(s,i){const c=s.charCodeAt(0),h=s.charCodeAt(1),y=(c-55296)*1024+(h-56320)+65536,S=i==="math"?0:1;if(119808<=y&&y<120484){const $=Math.floor((y-119808)/26);return[Ve[$][2],Ve[$][S]]}else if(120782<=y&&y<=120831){const $=Math.floor((y-120782)/10);return[lt[$][2],lt[$][S]]}else{if(y===120485||y===120486)return[Ve[0][2],Ve[0][S]];if(120486<y&&y<120782)return["",""];throw new a("Unsupported character: "+s)}};class we{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 Ee=function(s,i,c){return _t[c][s]&&_t[c][s].replace&&(s=_t[c][s].replace),{value:s,metrics:ot(s,i,c)}},Ge=function(s,i,c,h,y){const S=Ee(s,i,c),$=S.metrics;s=S.value;let j;if($){let G=$.italic;(c==="text"||h&&h.font==="mathit")&&(G=0),j=new At(s,$.height,$.depth,G,$.skew,$.width,y)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+s+"' in style '"+i+"' and mode '"+c+"'")),j=new At(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},vt=function(s,i,c,h){return h===void 0&&(h=[]),c.font==="boldsymbol"&&Ee(s,"Main-Bold",i).metrics?Ge(s,"Main-Bold",i,c,h.concat(["mathbf"])):s==="\\"||_t[i][s].font==="main"?Ge(s,"Main-Regular",i,c,h):Ge(s,"AMS-Regular",i,c,h.concat(["amsrm"]))},Wt=function(s,i,c,h,y){return y!=="textord"&&Ee(s,"Math-BoldItalic",i).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Mt=function(s,i,c){const h=s.mode,y=s.text,S=["mord"],$=h==="math"||h==="text"&&i.font,j=$?i.font:i.fontFamily;let G="",re="";if(y.charCodeAt(0)===55349&&([G,re]=le(y,h)),G.length>0)return Ge(y,G,h,i,S.concat(re));if(j){let pe,be;if(j==="boldsymbol"){const Ae=Wt(y,h,i,S,c);pe=Ae.fontName,be=[Ae.fontClass]}else $?(pe=Jn[j].fontName,be=[j]):(pe=Gn(j,i.fontWeight,i.fontShape),be=[j,i.fontWeight,i.fontShape]);if(Ee(y,pe,h).metrics)return Ge(y,pe,h,i,S.concat(be));if(ce.hasOwnProperty(y)&&pe.slice(0,10)==="Typewriter"){const Ae=[];for(let Ye=0;Ye<y.length;Ye++)Ae.push(Ge(y[Ye],pe,h,i,S.concat(be)));return cr(Ae)}}if(c==="mathord")return Ge(y,"Math-Italic",h,i,S.concat(["mathnormal"]));if(c==="textord"){const pe=_t[h][y]&&_t[h][y].font;if(pe==="ams"){const be=Gn("amsrm",i.fontWeight,i.fontShape);return Ge(y,be,h,i,S.concat("amsrm",i.fontWeight,i.fontShape))}else if(pe==="main"||!pe){const be=Gn("textrm",i.fontWeight,i.fontShape);return Ge(y,be,h,i,S.concat(i.fontWeight,i.fontShape))}else{const be=Gn(pe,i.fontWeight,i.fontShape);return Ge(y,be,h,i,S.concat(be,i.fontWeight,i.fontShape))}}else throw new Error("unexpected type: "+c+" in makeOrd")},ut=(s,i)=>{if(gt(s.classes)!==gt(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 At&&h instanceof At&&ut(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 S=s.children[y];S.height>i&&(i=S.height),S.depth>c&&(c=S.depth),S.maxFontSize>h&&(h=S.maxFontSize)}s.height=i,s.depth=c,s.maxFontSize=h},Br=function(s,i,c,h){const y=new Bt(s,i,c,h);return Jr(y),y},dn=(s,i,c,h)=>new Bt(s,i,c,h),yr=function(s,i,c){const h=Br([s],[],i);return h.height=Math.max(c||i.fontMetrics().defaultRuleThickness,i.minRuleThickness),h.style.borderBottomWidth=fe(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 we(s);return Jr(i),i},Vr=function(s,i){return s instanceof we?Br([],[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 S=y;for(let $=1;$<c.length;$++){const j=-c[$].shift-S-c[$].elem.depth,G=j-(c[$-1].elem.height+c[$-1].elem.depth);S=S+j,h.push({type:"kern",size:G}),h.push(c[$])}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 Ye=0;Ye<c.length;Ye++){const it=c[Ye];if(it.type==="elem"){const Pt=it.elem;y=Math.max(y,Pt.maxFontSize,Pt.height)}}y+=2;const S=Br(["pstrut"],[]);S.style.height=fe(y);const $=[];let j=h,G=h,re=h;for(let Ye=0;Ye<c.length;Ye++){const it=c[Ye];if(it.type==="kern")re+=it.size;else{const Pt=it.elem,Zt=it.wrapperClasses||[],Yt=it.wrapperStyle||{},ir=Br(Zt,[S,Pt],void 0,Yt);ir.style.top=fe(-y-re-Pt.depth),it.marginLeft&&(ir.style.marginLeft=it.marginLeft),it.marginRight&&(ir.style.marginRight=it.marginRight),$.push(ir),re+=Pt.height+Pt.depth}j=Math.min(j,re),G=Math.max(G,re)}const pe=Br(["vlist"],$);pe.style.height=fe(G);let be;if(j<0){const Ye=Br([],[]),it=Br(["vlist"],[Ye]);it.style.height=fe(-j);const Pt=Br(["vlist-s"],[new At("\u200B")]);be=[Br(["vlist-r"],[pe,Pt]),Br(["vlist-r"],[it])]}else be=[Br(["vlist-r"],[pe])];const Ae=Br(["vlist-t"],be);return be.length===2&&Ae.classes.push("vlist-t2"),Ae.height=G,Ae.depth=-j,Ae},Oo=(s,i)=>{const c=Br(["mspace"],[],i),h=Pe(s,i);return c.style.marginRight=fe(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},Jn={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 ve={fontMap:Jn,makeSymbol:Ge,mathsym:vt,makeSpan:Br,makeSvgSpan:dn,makeLineSpan:yr,makeAnchor:Qt,makeFragment:cr,wrapFragment:Vr,makeVList:Yn,makeOrd:Mt,makeGlue:Oo,staticSvg:function(s,i){const[c,h,y]=po[s],S=new jt(c),$=new Ht([S],{width:fe(h),height:fe(y),style:"width:"+fe(h),viewBox:"0 0 "+1e3*h+" "+1e3*y,preserveAspectRatio:"xMinYMin"}),j=dn(["overlay"],[$],i);return j.height=y,j.style.height=fe(y),j.style.width=fe(h),j},svgData:po,tryCombineChars:qt};const dr={number:3,unit:"mu"},$n={number:4,unit:"mu"},$t={number:5,unit:"mu"},Ut={mord:{mop:dr,mbin:$n,mrel:$t,minner:dr},mop:{mord:dr,mop:dr,mrel:$t,minner:dr},mbin:{mord:$n,mop:$n,mopen:$n,minner:$n},mrel:{mord:$t,mop:$t,mopen:$t,minner:$t},mopen:{},mclose:{mop:dr,mbin:$n,mrel:$t,minner:dr},mpunct:{mord:dr,mop:dr,mrel:$t,mopen:dr,mclose:dr,mpunct:dr,minner:dr},minner:{mord:dr,mop:dr,mbin:$n,mrel:$t,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}},rn={},Rr={},Nn={};function nt(s){let{type:i,names:c,props:h,handler:y,htmlBuilder:S,mathmlBuilder:$}=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)rn[c[G]]=j;i&&(S&&(Rr[i]=S),$&&(Nn[i]=$))}function nn(s){let{type:i,htmlBuilder:c,mathmlBuilder:h}=s;nt({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]},Zn=ve.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 we){const be=pe.children;y.push(...be)}else y.push(pe)}if(ve.tryCombineChars(y),!c)return y;let S=i;if(s.length===1){const re=s[0];re.type==="sizing"?S=i.havingSize(re.size):re.type==="styling"&&(S=i.havingStyle(t4[re.style]))}const $=Zn([h[0]||"leftmost"],[],i),j=Zn([h[1]||"rightmost"],[],i),G=c==="root";return dl(y,(re,pe)=>{const be=pe.classes[0],Ae=re.classes[0];be==="mbin"&&e4.includes(Ae)?pe.classes[0]="mord":Ae==="mbin"&&Qg.includes(be)&&(re.classes[0]="mord")},{node:$},j,G),dl(y,(re,pe)=>{const be=hl(pe),Ae=hl(re),Ye=be&&Ae?re.hasClass("mtight")?Kr[be][Ae]:Ut[be][Ae]:null;if(Ye)return ve.makeGlue(Ye,S)},{node:$},j,G),y},dl=function(s,i,c,h,y){h&&s.push(h);let S=0;for(;S<s.length;S++){const $=s[S],j=Ic($);if(j){dl(j.children,i,c,null,y);continue}const G=!$.hasClass("mspace");if(G){const re=i($,c.node);re&&(c.insertAfter?c.insertAfter(re):(s.unshift(re),S++))}G?c.node=$:y&&$.hasClass("newline")&&(c.node=Zn(["leftmost"])),c.insertAfter=(re=>pe=>{s.splice(re+1,0,pe),S++})(S)}h&&s.pop()},Ic=function(s){return s instanceof we||s instanceof Rt||s instanceof Bt&&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},Na=function(s,i){const c=["nulldelimiter"].concat(s.baseSizingClasses());return Zn(i.concat(c))},rr=function(s,i,c){if(!s)return Zn();if(Rr[s.type]){let h=Rr[s.type](s,i);if(c&&i.size!==c.size){h=Zn(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 Si(s,i){const c=Zn(["base"],s,i),h=Zn(["strut"]);return h.style.height=fe(c.height+c.depth),c.depth&&(h.style.verticalAlign=fe(-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 S=[];let $=[];for(let re=0;re<h.length;re++)if($.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++,$.push(h[re]),h[re].hasClass("nobreak")&&(pe=!0);pe||(S.push(Si($,i)),$=[])}else h[re].hasClass("newline")&&($.pop(),$.length>0&&(S.push(Si($,i)),$=[]),S.push(h[re]));$.length>0&&S.push(Si($,i));let j;c?(j=Si(qr(c,i,!0)),j.classes=["tag"],S.push(j)):y&&S.push(y);const G=Zn(["katex-html"],S);if(G.setAttribute("aria-hidden","true"),j){const re=j.children[0];re.style.height=fe(G.height+G.depth),G.depth&&(re.style.verticalAlign=fe(-G.depth))}return G}function Pc(s){return new we(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=gt(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(gt(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",fe(this.width)),i}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+fe(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Xe={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&&!(ce.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 Xe.TextNode(s)},ml=function(s){return s.length===1?s[0]:new Xe.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 S=ve.fontMap[c].fontName;return ot(y,S,h)?ve.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 S=xr(s[0],i);return c&&S instanceof bn&&S.type==="mo"&&(S.setAttribute("lspace","0em"),S.setAttribute("rspace","0em")),[S]}const h=[];let y;for(let S=0;S<s.length;S++){const $=xr(s[S],i);if($ instanceof bn&&y instanceof bn){if($.type==="mtext"&&y.type==="mtext"&&$.getAttribute("mathvariant")===y.getAttribute("mathvariant")){y.children.push(...$.children);continue}else if($.type==="mn"&&y.type==="mn"){y.children.push(...$.children);continue}else if(vl($)&&y.type==="mn"){y.children.push(...$.children);continue}else if($.type==="mn"&&vl(y))$.children=[...y.children,...$.children],h.pop();else if(($.type==="msup"||$.type==="msub")&&$.children.length>=1&&(y.type==="mn"||vl(y))){const j=$.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"&&($.type==="mo"||$.type==="mi"||$.type==="mn")){const G=$.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($),y=$}return h},mo=function(s,i,c){return ml(fn(s,i,c))},xr=function(s,i){if(!s)return new Xe.MathNode("mrow");if(Nn[s.type])return Nn[s.type](s,i);throw new a("Got group of unknown type: '"+s.type+"'")};function zc(s,i,c,h,y){const S=fn(s,c);let $;S.length===1&&S[0]instanceof bn&&["mrow","mtable"].includes(S[0].type)?$=S[0]:$=new Xe.MathNode("mrow",S);const j=new Xe.MathNode("annotation",[new Xe.TextNode(i)]);j.setAttribute("encoding","application/x-tex");const G=new Xe.MathNode("semantics",[$,j]),re=new Xe.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 ve.makeSpan([pe],[re])}const jc=function(s){return new Nt({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=ve.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 S=pl(s,h);y=ve.makeSpan(["katex"],[S])}else{const S=zc(s,i,h,c.displayMode,!1),$=pl(s,h);y=ve.makeSpan(["katex"],[S,$])}return _c(y,c)},a4=function(s,i,c){const h=jc(c),y=pl(s,h),S=ve.makeSpan(["katex"],[y]);return _c(S,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 Xe.MathNode("mo",[new Xe.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 S;const $=s.height+s.depth+c+h;if(/fbox|color|angl/.test(i)){if(S=ve.makeSpan(["stretchy",i],[],y),i==="fbox"){const j=y.color&&y.getColor();j&&(S.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:fe($)});S=ve.makeSvgSpan([],[G],y)}return S.height=$,S.style.height=fe($),S},mathMLnode:s4,svgSpan:function(s,i){function c(){let $=4e5;const j=s.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(j)){const G=u4(s.base);let re,pe,be;if(G>5)j==="widehat"||j==="widecheck"?(re=420,$=2364,be=.42,pe=j+"4"):(re=312,$=2340,be=.34,pe="tilde4");else{const it=[1,1,2,2,3,3][G];j==="widehat"||j==="widecheck"?($=[0,1062,2364,2364,2364][it],re=[0,239,300,360,420][it],be=[0,.24,.3,.3,.36,.42][it],pe=j+it):($=[0,600,1033,2339,2340][it],re=[0,260,286,306,312][it],be=[0,.26,.286,.3,.306,.34][it],pe="tilde"+it)}const Ae=new jt(pe),Ye=new Ht([Ae],{width:"100%",height:fe(be),viewBox:"0 0 "+$+" "+re,preserveAspectRatio:"none"});return{span:ve.makeSvgSpan([],[Ye],i),minWidth:0,height:be}}else{const G=[],re=l4[j],[pe,be,Ae]=re,Ye=Ae/1e3,it=pe.length;let Pt,Zt;if(it===1){const Yt=re[3];Pt=["hide-tail"],Zt=[Yt]}else if(it===2)Pt=["halfarrow-left","halfarrow-right"],Zt=["xMinYMin","xMaxYMin"];else if(it===3)Pt=["brace-left","brace-center","brace-right"],Zt=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
487
|
+
`+it+" children.");for(let Yt=0;Yt<it;Yt++){const ir=new jt(pe[Yt]),nr=new Ht([ir],{width:"400em",height:fe(Ye),viewBox:"0 0 "+$+" "+Ae,preserveAspectRatio:Zt[Yt]+" slice"}),Er=ve.makeSvgSpan([Pt[Yt]],[nr],i);if(it===1)return{span:Er,minWidth:be,height:Ye};Er.style.height=fe(Ye),G.push(Er)}return{span:ve.makeSpan(["stretchy"],G,i),minWidth:be,height:Ye}}}const{span:h,minWidth:y,height:S}=c();return h.height=S,h.style.height=fe(S),y>0&&(h.style.minWidth=fe(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=ki(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 ki(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 S=rr(c,i.havingCrampedStyle()),$=h.isShifty&&D.isCharacterBox(c);let j=0;if($){const Ae=D.getBaseElem(c),Ye=rr(Ae,i.havingCrampedStyle());j=zr(Ye).skew}const G=h.label==="\\c";let re=G?S.height+S.depth:Math.min(S.height,i.fontMetrics().xHeight),pe;if(h.isStretchy)pe=Qn.svgSpan(h,i),pe=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:S},{type:"elem",elem:pe,wrapperClasses:["svg-align"],wrapperStyle:j>0?{width:"calc(100% - "+fe(2*j)+")",marginLeft:fe(2*j)}:void 0}]},i);else{let Ae,Ye;h.label==="\\vec"?(Ae=ve.staticSvg("vec",i),Ye=ve.svgData.vec[1]):(Ae=ve.makeOrd({mode:h.mode,text:h.label},i,"textord"),Ae=zr(Ae),Ae.italic=0,Ye=Ae.width,G&&(re+=Ae.depth)),pe=ve.makeSpan(["accent-body"],[Ae]);const it=h.label==="\\textcircled";it&&(pe.classes.push("accent-full"),re=S.height);let Pt=j;it||(Pt-=Ye/2),pe.style.left=fe(Pt),h.label==="\\textcircled"&&(pe.style.top=".2em"),pe=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:S},{type:"kern",size:-re},{type:"elem",elem:pe}]},i)}const be=ve.makeSpan(["mord","accent"],[pe],i);return y?(y.children[0]=be,y.height=Math.max(be.height,y.height),y.classes[0]="mord",y):be},Lc=(s,i)=>{const c=s.isStretchy?Qn.mathMLnode(s.label):new Xe.MathNode("mo",[Dn(s.label,s.mode)]),h=new Xe.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("|"));nt({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}),nt({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}),nt({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,S=ve.makeVList({positionType:"top",positionData:c.height,children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:y},{type:"elem",elem:c}]},i);return ve.makeSpan(["mord","accentunder"],[S],i)},mathmlBuilder:(s,i)=>{const c=Qn.mathMLnode(s.label),h=new Xe.MathNode("munder",[xr(s.base,i),c]);return h.setAttribute("accentunder","true"),h}});const Bi=s=>{const i=new Xe.MathNode("mpadded",s?[s]:[]);return i.setAttribute("width","+0.6em"),i.setAttribute("lspace","0.3em"),i};nt({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=ve.wrapFragment(rr(s.body,h,i),i),S=s.label.slice(0,2)==="\\x"?"x":"cd";y.classes.push(S+"-arrow-pad");let $;s.below&&(h=i.havingStyle(c.sub()),$=ve.wrapFragment(rr(s.below,h,i),i),$.classes.push(S+"-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($){const be=-i.fontMetrics().axisHeight+$.height+.5*j.height+.111;pe=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:re},{type:"elem",elem:j,shift:G},{type:"elem",elem:$,shift:be}]},i)}else pe=ve.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"),ve.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=Bi(xr(s.body,i));if(s.below){const S=Bi(xr(s.below,i));h=new Xe.MathNode("munderover",[c,S,y])}else h=new Xe.MathNode("mover",[c,y])}else if(s.below){const y=Bi(xr(s.below,i));h=new Xe.MathNode("munder",[c,y])}else h=Bi(),h=new Xe.MathNode("mover",[c,h]);return h}});const d4=ve.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 Xe.MathNode("mpadded",h):s.mclass==="mord"?s.isCharacterBox?(c=h[0],c.type="mi"):c=new Xe.MathNode("mi",h):(s.isCharacterBox?(c=h[0],c.type="mo"):c=new Xe.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}nt({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 Ai=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"};nt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(s,i){let{parser:c}=s;return{type:"mclass",mode:c.mode,mclass:Ai(i[0]),body:Dr(i[1]),isCharacterBox:D.isCharacterBox(i[1])}}}),nt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(s,i){let{parser:c,funcName:h}=s;const y=i[1],S=i[0];let $;h!=="\\stackrel"?$=Ai(y):$="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:S.mode,base:j,sup:h==="\\underset"?null:S,sub:h==="\\underset"?S:null};return{type:"mclass",mode:c.mode,mclass:$,body:[G],isCharacterBox:D.isCharacterBox(G)}},htmlBuilder:Hc,mathmlBuilder:Kc}),nt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:c}=s;return{type:"pmb",mode:c.mode,mclass:Ai(i[0]),body:Dr(i[0])}},htmlBuilder(s,i){const c=qr(s.body,i,!0),h=ve.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 Xe.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"}),Vc=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]],[]),S={type:"atom",text:h,mode:"math",family:"rel"},$=c.callFunction("\\Big",[S],[]),j=c.callFunction("\\\\cdright",[i[1]],[]),G={type:"ordgroup",mode:"math",body:[y,$,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 S=s.fetch().text;if(S==="&"||S==="\\\\")s.consume();else if(S==="\\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 S=0;S<i.length;S++){const $=i[S];let j=qc();for(let G=0;G<$.length;G++)if(!Vc($[G]))j.body.push($[G]);else{c.push(j),G+=1;const re=bl($[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 Ae=0;Ae<2;Ae++){let Ye=!0;for(let it=G+1;it<$.length;it++){if(h4($[it],re)){Ye=!1,G=it;break}if(Vc($[it]))throw new a("Missing a "+re+" character to complete a CD arrow.",$[it]);pe[Ae].body.push($[it])}if(Ye)throw new a("Missing a "+re+" character to complete a CD arrow.",$[G])}else throw new a('Expected one of "<>AV=|." after @',$[G]);const be={type:"styling",body:[p4(re,pe,s)],mode:"math",style:"display"};c.push(be),j=qc()}S%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([])}}nt({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=ve.wrapFragment(rr(s.label,c,i),i);return h.classes.push("cd-label-"+s.side),h.style.bottom=fe(.8-h.depth),h.height=0,h.depth=0,h},mathmlBuilder(s,i){let c=new Xe.MathNode("mrow",[xr(s.label,i)]);return c=new Xe.MathNode("mpadded",[c]),c.setAttribute("width","0"),s.side==="left"&&c.setAttribute("lspace","-1width"),c.setAttribute("voffset","0.7em"),c=new Xe.MathNode("mstyle",[c]),c.setAttribute("displaystyle","false"),c.setAttribute("scriptlevel","1"),c}}),nt({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=ve.wrapFragment(rr(s.fragment,i),i);return c.classes.push("cd-vert-arrow"),c},mathmlBuilder(s,i){return new Xe.MathNode("mrow",[xr(s.fragment,i)])}}),nt({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 S=parseInt(y),$;if(isNaN(S))throw new a("\\@char has non-numeric argument "+y);if(S<0||S>=1114111)throw new a("\\@char with invalid code point "+y);return S<=65535?$=String.fromCharCode(S):(S-=65536,$=String.fromCharCode((S>>10)+55296,(S&1023)+56320)),{type:"textord",mode:c.mode,text:$}}});const Wc=(s,i)=>{const c=qr(s.body,i.withColor(s.color),!1);return ve.makeFragment(c)},Uc=(s,i)=>{const c=fn(s.body,i.withColor(s.color)),h=new Xe.MathNode("mstyle",c);return h.setAttribute("mathcolor",s.color),h};nt({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:Wc,mathmlBuilder:Uc}),nt({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 S=c.parseExpression(!0,h);return{type:"color",mode:c.mode,color:y,body:S}},htmlBuilder:Wc,mathmlBuilder:Uc}),nt({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,S=!h.settings.displayMode||!h.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:h.mode,newLine:S,size:y&&Kt(y,"size").value}},htmlBuilder(s,i){const c=ve.makeSpan(["mspace"],[],i);return s.newLine&&(c.classes.push("newline"),s.size&&(c.style.marginTop=fe(Pe(s.size,i)))),c},mathmlBuilder(s,i){const c=new Xe.MathNode("mspace");return s.newLine&&(c.setAttribute("linebreak","newline"),s.size&&c.setAttribute("height",fe(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)};nt({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)}}),nt({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 S=0,$;const j=[[]];for(;i.gullet.future().text!=="{";)if(h=i.gullet.popToken(),h.text==="#"){if(i.gullet.future().text==="{"){$=i.gullet.future(),j[S].push("{");break}if(h=i.gullet.popToken(),!/^[1-9]$/.test(h.text))throw new a('Invalid argument number "'+h.text+'"');if(parseInt(h.text)!==S+1)throw new a('Argument number "'+h.text+'" out of order');S++,j.push([])}else{if(h.text==="EOF")throw new a("Expected a macro definition");j[S].push(h.text)}let{tokens:G}=i.gullet.consumeArg();return $&&G.unshift($),(c==="\\edef"||c==="\\xdef")&&(G=i.gullet.expandTokens(G),G.reverse()),i.gullet.macros.set(y,{tokens:G,numArgs:S,delimiters:j},c===xl[c]),{type:"internal",mode:i.mode}}}),nt({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}}}),nt({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(),S=i.gullet.popToken();return Yc(i,h,S,c==="\\\\globalfuture"),i.gullet.pushToken(S),i.gullet.pushToken(y),{type:"internal",mode:i.mode}}});const Ta=function(s,i,c){const h=_t.math[s]&&_t.math[s].replace,y=ot(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),S=ve.makeSpan(h.concat(y.sizingClasses(c)),[s],c),$=y.sizeMultiplier/c.sizeMultiplier;return S.height*=$,S.depth*=$,S.maxFontSize=y.sizeMultiplier,S},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=fe(y),s.height-=y,s.depth+=y},v4=function(s,i,c,h,y,S){const $=ve.makeSymbol(s,"Main-Regular",y,h),j=wl($,i,h,S);return c&&Gc(j,h,i),j},b4=function(s,i,c,h){return ve.makeSymbol(s,"Size"+i+"-Regular",c,h)},Jc=function(s,i,c,h,y,S){const $=b4(s,i,y,h),j=wl(ve.makeSpan(["delimsizing","size"+i],[$],h),R.TEXT,h,S);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:ve.makeSpan(["delimsizinginner",h],[ve.makeSpan([],[ve.makeSymbol(s,i,c)])])}},Dl=function(s,i,c){const h=Ne["Size4-Regular"][s.charCodeAt(0)]?Ne["Size4-Regular"][s.charCodeAt(0)][4]:Ne["Size1-Regular"][s.charCodeAt(0)][4],y=new jt("inner",ke(s,Math.round(1e3*i))),S=new Ht([y],{width:fe(h),height:fe(i),style:"width:"+fe(h),viewBox:"0 0 "+1e3*h+" "+Math.round(1e3*i),preserveAspectRatio:"xMinYMin"}),$=ve.makeSvgSpan([],[S],c);return $.height=i,$.style.height=fe(i),$.style.width=fe(h),{type:"elem",elem:$}},El=.008,Fi={type:"kern",size:-1*El},y4=["|","\\lvert","\\rvert","\\vert"],x4=["\\|","\\lVert","\\rVert","\\Vert"],Zc=function(s,i,c,h,y,S){let $,j,G,re,pe="",be=0;$=G=re=s,j=null;let Ae="Size1-Regular";s==="\\uparrow"?G=re="\u23D0":s==="\\Uparrow"?G=re="\u2016":s==="\\downarrow"?$=G="\u23D0":s==="\\Downarrow"?$=G="\u2016":s==="\\updownarrow"?($="\\uparrow",G="\u23D0",re="\\downarrow"):s==="\\Updownarrow"?($="\\Uparrow",G="\u2016",re="\\Downarrow"):y4.includes(s)?(G="\u2223",pe="vert",be=333):x4.includes(s)?(G="\u2225",pe="doublevert",be=556):s==="["||s==="\\lbrack"?($="\u23A1",G="\u23A2",re="\u23A3",Ae="Size4-Regular",pe="lbrack",be=667):s==="]"||s==="\\rbrack"?($="\u23A4",G="\u23A5",re="\u23A6",Ae="Size4-Regular",pe="rbrack",be=667):s==="\\lfloor"||s==="\u230A"?(G=$="\u23A2",re="\u23A3",Ae="Size4-Regular",pe="lfloor",be=667):s==="\\lceil"||s==="\u2308"?($="\u23A1",G=re="\u23A2",Ae="Size4-Regular",pe="lceil",be=667):s==="\\rfloor"||s==="\u230B"?(G=$="\u23A5",re="\u23A6",Ae="Size4-Regular",pe="rfloor",be=667):s==="\\rceil"||s==="\u2309"?($="\u23A4",G=re="\u23A5",Ae="Size4-Regular",pe="rceil",be=667):s==="("||s==="\\lparen"?($="\u239B",G="\u239C",re="\u239D",Ae="Size4-Regular",pe="lparen",be=875):s===")"||s==="\\rparen"?($="\u239E",G="\u239F",re="\u23A0",Ae="Size4-Regular",pe="rparen",be=875):s==="\\{"||s==="\\lbrace"?($="\u23A7",j="\u23A8",re="\u23A9",G="\u23AA",Ae="Size4-Regular"):s==="\\}"||s==="\\rbrace"?($="\u23AB",j="\u23AC",re="\u23AD",G="\u23AA",Ae="Size4-Regular"):s==="\\lgroup"||s==="\u27EE"?($="\u23A7",re="\u23A9",G="\u23AA",Ae="Size4-Regular"):s==="\\rgroup"||s==="\u27EF"?($="\u23AB",re="\u23AD",G="\u23AA",Ae="Size4-Regular"):s==="\\lmoustache"||s==="\u23B0"?($="\u23A7",re="\u23AD",G="\u23AA",Ae="Size4-Regular"):(s==="\\rmoustache"||s==="\u23B1")&&($="\u23AB",re="\u23A9",G="\u23AA",Ae="Size4-Regular");const Ye=Ta($,Ae,y),it=Ye.height+Ye.depth,Pt=Ta(G,Ae,y),Zt=Pt.height+Pt.depth,Yt=Ta(re,Ae,y),ir=Yt.height+Yt.depth;let nr=0,Er=1;if(j!==null){const Ir=Ta(j,Ae,y);nr=Ir.height+Ir.depth,Er=2}const Gr=it+ir+nr,on=Math.max(0,Math.ceil((i-Gr)/(Er*Zt))),En=Gr+on*Er*Zt;let Qo=h.fontMetrics().axisHeight;c&&(Qo*=h.sizeMultiplier);const sr=En/2-Qo,mr=[];if(pe.length>0){const Ir=En-it-ir,Tr=Math.round(En*1e3),Sn=Be(pe,Math.round(Ir*1e3)),W4=new jt(pe,Sn),Hd=(be/1e3).toFixed(3)+"em",Kd=(Tr/1e3).toFixed(3)+"em",U4=new Ht([W4],{width:Hd,height:Kd,viewBox:"0 0 "+be+" "+Tr}),Mi=ve.makeSvgSpan([],[U4],h);Mi.height=Tr/1e3,Mi.style.width=Hd,Mi.style.height=Kd,mr.push({type:"elem",elem:Mi})}else{if(mr.push(Cl(re,Ae,y)),mr.push(Fi),j===null){const Ir=En-it-ir+2*El;mr.push(Dl(G,Ir,h))}else{const Ir=(En-it-ir-nr)/2+2*El;mr.push(Dl(G,Ir,h)),mr.push(Fi),mr.push(Cl(j,Ae,y)),mr.push(Fi),mr.push(Dl(G,Ir,h))}mr.push(Fi),mr.push(Cl($,Ae,y))}const Sr=h.havingBaseStyle(R.TEXT),Ar=ve.makeVList({positionType:"bottom",positionData:sr,children:mr},Sr);return wl(ve.makeSpan(["delimsizing","mult"],[Ar],Sr),R.TEXT,h,S)},Sl=80,kl=.08,Bl=function(s,i,c,h,y){const S=xe(s,h,c),$=new jt(s,S),j=new Ht([$],{width:"400em",height:fe(i),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"});return ve.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 S=Math.max(0,i.minRuleThickness-i.fontMetrics().sqrtRuleThickness);let $,j=0,G=0,re=0,pe;return h.type==="small"?(re=1e3+1e3*S+Sl,s<1?y=1:s<1.4&&(y=.7),j=(1+S+kl)/y,G=(1+S)/y,$=Bl("sqrtMain",j,re,S,i),$.style.minWidth="0.853em",pe=.833/y):h.type==="large"?(re=(1e3+Sl)*Oa[h.size],G=(Oa[h.size]+S)/y,j=(Oa[h.size]+S+kl)/y,$=Bl("sqrtSize"+h.size,j,re,S,i),$.style.minWidth="1.02em",pe=1/y):(j=s+S+kl,G=s+S,re=Math.floor(1e3*s+S)+Sl,$=Bl("sqrtTall",j,re,S,i),$.style.minWidth="0.742em",pe=1.056),$.height=G,$.style.height=fe(j),{span:$,advanceWidth:pe,ruleWidth:(i.fontMetrics().sqrtRuleThickness+S)*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 Jc(s,i,!1,c,h,y);if(C4.includes(s))return Zc(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}],S4=[{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"}],k4=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 S=y;S<c.length&&c[S].type!=="stack";S++){const $=Ta(s,k4(c[S]),"math");let j=$.height+$.depth;if(c[S].type==="small"){const G=h.havingBaseStyle(c[S].style);j*=G.sizeMultiplier}if(j>i)return c[S]}return c[c.length-1]},nd=function(s,i,c,h,y,S){s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle");let $;ed.includes(s)?$=E4:Qc.includes(s)?$=td:$=S4;const j=rd(s,i,$,h);return j.type==="small"?v4(s,j.style,c,h,y,S):j.type==="large"?Jc(s,j.size,c,h,y,S):Zc(s,i,c,h,y,S)};var eo={sqrtImage:w4,sizedDelim:D4,sizeToMaxHeight:Oa,customSizedDelim:nd,leftRightDelim:function(s,i,c,h,y,S){const $=h.fontMetrics().axisHeight*h.sizeMultiplier,j=901,G=5/h.fontMetrics().ptPerEm,re=Math.max(i-$,c+$),pe=Math.max(re/500*j,2*re-G);return nd(s,pe,!0,h,y,S)}};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}},B4=["(","\\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 $i(s,i){const c=ki(s);if(c&&B4.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)}nt({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=$i(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==="."?ve.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 Xe.MathNode("mo",i);s.mclass==="mopen"||s.mclass==="mclose"?c.setAttribute("fence","true"):c.setAttribute("fence","false"),c.setAttribute("stretchy","true");const h=fe(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.")}nt({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:$i(i[0],s).text,color:c}}}),nt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const c=$i(i[0],s),h=s.parser;++h.leftrightDepth;const y=h.parseExpression(!1);--h.leftrightDepth,h.expect("\\right",!1);const S=Kt(h.parseFunction(),"leftright-right");return{type:"leftright",mode:h.mode,body:y,left:c.text,right:S.delim,rightColor:S.color}},htmlBuilder:(s,i)=>{ad(s);const c=qr(s.body,i,!0,["mopen","mclose"]);let h=0,y=0,S=!1;for(let G=0;G<c.length;G++)c[G].isMiddle?S=!0:(h=Math.max(c[G].height,h),y=Math.max(c[G].depth,y));h*=i.sizeMultiplier,y*=i.sizeMultiplier;let $;if(s.left==="."?$=Na(i,["mopen"]):$=eo.leftRightDelim(s.left,h,y,i,s.mode,["mopen"]),c.unshift($),S)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=Na(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),ve.makeSpan(["minner"],c,i)},mathmlBuilder:(s,i)=>{ad(s);const c=fn(s.body,i);if(s.left!=="."){const h=new Xe.MathNode("mo",[Dn(s.left,s.mode)]);h.setAttribute("fence","true"),c.unshift(h)}if(s.right!=="."){const h=new Xe.MathNode("mo",[Dn(s.right,s.mode)]);h.setAttribute("fence","true"),s.rightColor&&h.setAttribute("mathcolor",s.rightColor),c.push(h)}return ml(c)}}),nt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const c=$i(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=Na(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 Xe.MathNode("mo",[c]);return h.setAttribute("fence","true"),h.setAttribute("lspace","0.05em"),h.setAttribute("rspace","0.05em"),h}});const Al=(s,i)=>{const c=ve.wrapFragment(rr(s.body,i),i),h=s.label.slice(1);let y=i.sizeMultiplier,S,$=0;const j=D.isCharacterBox(s.body);if(h==="sout")S=ve.makeSpan(["stretchy","sout"]),S.height=i.fontMetrics().defaultRuleThickness/y,$=-.5*i.fontMetrics().xHeight;else if(h==="phase"){const re=Pe({number:.6,unit:"pt"},i),pe=Pe({number:.35,unit:"ex"},i),be=i.havingBaseSizing();y=y/be.sizeMultiplier;const Ae=c.height+c.depth+re+pe;c.style.paddingLeft=fe(Ae/2+re);const Ye=Math.floor(1e3*Ae*y),it=ue(Ye),Pt=new Ht([new jt("phase",it)],{width:"400em",height:fe(Ye/1e3),viewBox:"0 0 400000 "+Ye,preserveAspectRatio:"xMinYMin slice"});S=ve.makeSvgSpan(["hide-tail"],[Pt],i),S.style.height=fe(Ae),$=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,be=0;/box/.test(h)?(be=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness),re=i.fontMetrics().fboxsep+(h==="colorbox"?0:be),pe=re):h==="angl"?(be=Math.max(i.fontMetrics().defaultRuleThickness,i.minRuleThickness),re=4*be,pe=Math.max(0,.25-c.depth)):(re=j?.2:0,pe=re),S=Qn.encloseSpan(c,h,re,pe,i),/fbox|boxed|fcolorbox/.test(h)?(S.style.borderStyle="solid",S.style.borderWidth=fe(be)):h==="angl"&&be!==.049&&(S.style.borderTopWidth=fe(be),S.style.borderRightWidth=fe(be)),$=c.depth+pe,s.backgroundColor&&(S.style.backgroundColor=s.backgroundColor,s.borderColor&&(S.style.borderColor=s.borderColor))}let G;if(s.backgroundColor)G=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:S,shift:$},{type:"elem",elem:c,shift:0}]},i);else{const re=/cancel|phase/.test(h)?["svg-align"]:[];G=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:S,shift:$,wrapperClasses:re}]},i)}return/cancel/.test(h)&&(G.height=c.height,G.depth=c.depth),/cancel/.test(h)&&!j?ve.makeSpan(["mord","cancel-lap"],[G],i):ve.makeSpan(["mord"],[G],i)},Fl=(s,i)=>{let c=0;const h=new Xe.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};nt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(s,i,c){let{parser:h,funcName:y}=s;const S=Kt(i[0],"color-token").color,$=i[1];return{type:"enclose",mode:h.mode,label:y,backgroundColor:S,body:$}},htmlBuilder:Al,mathmlBuilder:Fl}),nt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(s,i,c){let{parser:h,funcName:y}=s;const S=Kt(i[0],"color-token").color,$=Kt(i[1],"color-token").color,j=i[2];return{type:"enclose",mode:h.mode,label:y,backgroundColor:$,borderColor:S,body:j}},htmlBuilder:Al,mathmlBuilder:Fl}),nt({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]}}}),nt({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:Al,mathmlBuilder:Fl}),nt({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:S,mathmlBuilder:$}=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;S&&(Rr[i]=S),$&&(Nn[i]=$)}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 Ni=s=>{if(!s.parser.settings.displayMode)throw new a("{"+s.envName+"} can be used only in display mode.")};function $l(s){if(s.indexOf("ed")===-1)return s.indexOf("*")===-1}function go(s,i,c){let{hskipBeforeAndAfter:h,addJot:y,cols:S,arraystretch:$,colSeparationType:j,autoTag:G,singleRow:re,emptySingleRow:pe,maxNumCols:be,leqno:Ae}=i;if(s.gullet.beginGroup(),re||s.gullet.macros.set("\\cr","\\\\\\relax"),!$){const Er=s.gullet.expandMacroAsText("\\arraystretch");if(Er==null)$=1;else if($=parseFloat(Er),!$||$<0)throw new a("Invalid \\arraystretch: "+Er)}s.gullet.beginGroup();let Ye=[];const it=[Ye],Pt=[],Zt=[],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(),Zt.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]}),Ye.push(Er);const Gr=s.fetch().text;if(Gr==="&"){if(be&&Ye.length===be){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(Gr==="\\end"){nr(),Ye.length===1&&Er.type==="styling"&&Er.body[0].body.length===0&&(it.length>1||!pe)&&it.pop(),Zt.length<it.length+1&&Zt.push([]);break}else if(Gr==="\\\\"){s.consume();let on;s.gullet.future().text!==" "&&(on=s.parseSizeGroup(!0)),Pt.push(on?on.value:null),nr(),Zt.push(ld(s)),Ye=[],it.push(Ye),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:$,body:it,cols:S,rowGaps:Pt,hskipBeforeAndAfter:h,hLinesBeforeRow:Zt,colSeparationType:j,tags:Yt,leqno:Ae}}function Nl(s){return s.slice(0,1)==="d"?"display":"text"}const Ln=function(s,i){let c,h;const y=s.body.length,S=s.hLinesBeforeRow;let $=0,j=new Array(y);const G=[],re=Math.max(i.fontMetrics().arrayRuleWidth,i.minRuleThickness),pe=1/i.fontMetrics().ptPerEm;let be=5*pe;s.colSeparationType&&s.colSeparationType==="small"&&(be=.2778*(i.havingStyle(R.SCRIPT).sizeMultiplier/i.sizeMultiplier));const Ae=s.colSeparationType==="CD"?Pe({number:3,unit:"ex"},i):12*pe,Ye=3*pe,it=s.arraystretch*Ae,Pt=.7*it,Zt=.3*it;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(S[0]),c=0;c<s.body.length;++c){const sr=s.body[c];let mr=Pt,Sr=Zt;$<sr.length&&($=sr.length);const Ar=new Array(sr.length);for(h=0;h<sr.length;++h){const Sn=rr(sr[h],i);Sr<Sn.depth&&(Sr=Sn.depth),mr<Sn.height&&(mr=Sn.height),Ar[h]=Sn}const Ir=s.rowGaps[c];let Tr=0;Ir&&(Tr=Pe(Ir,i),Tr>0&&(Tr+=Zt,Sr<Tr&&(Sr=Tr),Tr=0)),s.addJot&&(Sr+=Ye),Ar.height=mr,Ar.depth=Sr,Yt+=mr,Ar.pos=Yt,Yt+=Sr+Tr,j[c]=Ar,ir(S[c+1])}const nr=Yt/2+i.fontMetrics().axisHeight,Er=s.cols||[],Gr=[];let on,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,Sr=s.tags[c];let Ar;Sr===!0?Ar=ve.makeSpan(["eqn-num"],[],i):Sr===!1?Ar=ve.makeSpan([],[],i):Ar=ve.makeSpan([],qr(Sr,i,!0),i),Ar.depth=sr.depth,Ar.height=sr.height,Qo.push({type:"elem",elem:Ar,shift:mr})}for(h=0,En=0;h<$||En<Er.length;++h,++En){let sr=Er[En]||{},mr=!0;for(;sr.type==="separator";){if(mr||(on=ve.makeSpan(["arraycolsep"],[]),on.style.width=fe(i.fontMetrics().doubleRuleSep),Gr.push(on)),sr.separator==="|"||sr.separator===":"){const Ir=sr.separator==="|"?"solid":"dashed",Tr=ve.makeSpan(["vertical-separator"],[],i);Tr.style.height=fe(Yt),Tr.style.borderRightWidth=fe(re),Tr.style.borderRightStyle=Ir,Tr.style.margin="0 "+fe(-re/2);const Sn=Yt-nr;Sn&&(Tr.style.verticalAlign=fe(-Sn)),Gr.push(Tr)}else throw new a("Invalid separator type: "+sr.separator);En++,sr=Er[En]||{},mr=!1}if(h>=$)continue;let Sr;(h>0||s.hskipBeforeAndAfter)&&(Sr=D.deflt(sr.pregap,be),Sr!==0&&(on=ve.makeSpan(["arraycolsep"],[]),on.style.width=fe(Sr),Gr.push(on)));let Ar=[];for(c=0;c<y;++c){const Ir=j[c],Tr=Ir[h];if(!Tr)continue;const Sn=Ir.pos-nr;Tr.depth=Ir.depth,Tr.height=Ir.height,Ar.push({type:"elem",elem:Tr,shift:Sn})}Ar=ve.makeVList({positionType:"individualShift",children:Ar},i),Ar=ve.makeSpan(["col-align-"+(sr.align||"c")],[Ar]),Gr.push(Ar),(h<$-1||s.hskipBeforeAndAfter)&&(Sr=D.deflt(sr.postgap,be),Sr!==0&&(on=ve.makeSpan(["arraycolsep"],[]),on.style.width=fe(Sr),Gr.push(on)))}if(j=ve.makeSpan(["mtable"],Gr),G.length>0){const sr=ve.makeLineSpan("hline",i,re),mr=ve.makeLineSpan("hdashline",i,re),Sr=[{type:"elem",elem:j,shift:0}];for(;G.length>0;){const Ar=G.pop(),Ir=Ar.pos-nr;Ar.isDashed?Sr.push({type:"elem",elem:mr,shift:Ir}):Sr.push({type:"elem",elem:sr,shift:Ir})}j=ve.makeVList({positionType:"individualShift",children:Sr},i)}if(Qo.length===0)return ve.makeSpan(["mord"],[j],i);{let sr=ve.makeVList({positionType:"individualShift",children:Qo},i);return sr=ve.makeSpan(["tag"],[sr],i),ve.makeFragment([j,sr])}},A4={c:"center ",l:"left ",r:"right "},Hn=function(s,i){const c=[],h=new Xe.MathNode("mtd",[],["mtr-glue"]),y=new Xe.MathNode("mtd",[],["mml-eqn-num"]);for(let be=0;be<s.body.length;be++){const Ae=s.body[be],Ye=[];for(let it=0;it<Ae.length;it++)Ye.push(new Xe.MathNode("mtd",[xr(Ae[it],i)]));s.tags&&s.tags[be]&&(Ye.unshift(h),Ye.push(h),s.leqno?Ye.unshift(y):Ye.push(y)),c.push(new Xe.MathNode("mtr",Ye))}let S=new Xe.MathNode("mtable",c);const $=s.arraystretch===.5?.1:.16+s.arraystretch-1+(s.addJot?.09:0);S.setAttribute("rowspacing",fe($));let j="",G="";if(s.cols&&s.cols.length>0){const be=s.cols;let Ae="",Ye=!1,it=0,Pt=be.length;be[0].type==="separator"&&(j+="top ",it=1),be[be.length-1].type==="separator"&&(j+="bottom ",Pt-=1);for(let Zt=it;Zt<Pt;Zt++)be[Zt].type==="align"?(G+=A4[be[Zt].align],Ye&&(Ae+="none "),Ye=!0):be[Zt].type==="separator"&&Ye&&(Ae+=be[Zt].separator==="|"?"solid ":"dashed ",Ye=!1);S.setAttribute("columnalign",G.trim()),/[sd]/.test(Ae)&&S.setAttribute("columnlines",Ae.trim())}if(s.colSeparationType==="align"){const be=s.cols||[];let Ae="";for(let Ye=1;Ye<be.length;Ye++)Ae+=Ye%2?"0em ":"1em ";S.setAttribute("columnspacing",Ae.trim())}else s.colSeparationType==="alignat"||s.colSeparationType==="gather"?S.setAttribute("columnspacing","0em"):s.colSeparationType==="small"?S.setAttribute("columnspacing","0.2778em"):s.colSeparationType==="CD"?S.setAttribute("columnspacing","0.5em"):S.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 be=1;be<pe.length-1;be++)re+=pe[be].length===0?"none ":pe[be][0]?"dashed ":"solid ";return/[sd]/.test(re)&&S.setAttribute("rowlines",re.trim()),j!==""&&(S=new Xe.MathNode("menclose",[S]),S.setAttribute("notation",j.trim())),s.arraystretch&&s.arraystretch<1&&(S=new Xe.MathNode("mstyle",[S]),S.setAttribute("scriptlevel","1")),S},ud=function(s,i){s.envName.indexOf("ed")===-1&&Ni(s);const c=[],h=s.envName.indexOf("at")>-1?"alignat":"align",y=s.envName==="split",S=go(s.parser,{cols:c,addJot:!0,autoTag:y?void 0:$l(s.envName),emptySingleRow:!0,colSeparationType:h,maxNumCols:y?2:void 0,leqno:s.parser.settings.leqno},"display");let $,j=0;const G={type:"ordgroup",mode:s.mode,body:[]};if(i[0]&&i[0].type==="ordgroup"){let pe="";for(let be=0;be<i[0].body.length;be++){const Ae=Kt(i[0].body[be],"textord");pe+=Ae.text}$=Number(pe),j=$*2}const re=!j;S.body.forEach(function(pe){for(let be=1;be<pe.length;be+=2){const Ae=Kt(pe[be],"styling");Kt(Ae.body[0],"ordgroup").body.unshift(G)}if(re)j<pe.length&&(j=pe.length);else{const be=pe.length/2;if($<be)throw new a("Too many math in a row: "+("expected "+$+", but got "+be),pe[0])}});for(let pe=0;pe<j;++pe){let be="r",Ae=0;pe%2===1?be="l":pe>0&&re&&(Ae=1),c[pe]={type:"align",align:be,pregap:Ae,postgap:0}}return S.colSeparationType=re?"align":"alignat",S};_n({type:"array",names:["array","darray"],props:{numArgs:1},handler(s,i){const c=(ki(i[0])?[i[0]]:Kt(i[0],"ordgroup").body).map(function(y){const S=bl(y).text;if("lcr".indexOf(S)!==-1)return{type:"align",align:S};if(S==="|")return{type:"separator",separator:"|"};if(S===":")return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+S,y)}),h={cols:c,hskipBeforeAndAfter:!0,maxNumCols:c.length};return go(s.parser,h,Nl(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 $=s.parser;if($.consumeSpaces(),$.fetch().text==="["){if($.consume(),$.consumeSpaces(),c=$.fetch().text,"lcr".indexOf(c)===-1)throw new a("Expected l or c or r",$.nextToken);$.consume(),$.consumeSpaces(),$.expect("]"),$.consume(),h.cols=[{type:"align",align:c}]}}const y=go(s.parser,h,Nl(s.envName)),S=Math.max(0,...y.body.map($=>$.length));return y.cols=new Array(S).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=(ki(i[0])?[i[0]]:Kt(i[0],"ordgroup").body).map(function(y){const S=bl(y).text;if("lc".indexOf(S)!==-1)return{type:"align",align:S};throw new a("Unknown column alignment: "+S,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,Nl(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)&&Ni(s);const i={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:$l(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){Ni(s);const i={autoTag:$l(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 Ni(s),m4(s.parser)},htmlBuilder:Ln,mathmlBuilder:Hn}),H("\\nonumber","\\gdef\\@eqnsw{0}"),H("\\notag","\\nonumber"),nt({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;nt({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 S="";for(let $=0;$<y.body.length;++$)S+=Kt(y.body[$],"textord").text;if(h==="\\begin"){if(!cd.hasOwnProperty(S))throw new a("No such environment: "+S,y);const $=cd[S],{args:j,optArgs:G}=c.parseArguments("\\begin{"+S+"}",$),re={mode:c.mode,envName:S,parser:c},pe=$.handler(re,j,G);c.expect("\\end",!1);const be=c.nextToken,Ae=Kt(c.parseFunction(),"environment");if(Ae.name!==S)throw new a("Mismatch: \\begin{"+S+"} matched by \\end{"+Ae.name+"}",be);return pe}return{type:"environment",mode:c.mode,name:S,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"};nt({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 S=h;return S in hd&&(S=hd[S]),{type:"font",mode:c.mode,font:S.slice(1),body:y}},htmlBuilder:dd,mathmlBuilder:fd}),nt({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:Ai(h),body:[{type:"font",mode:c.mode,font:"boldsymbol",body:h}],isCharacterBox:y}}}),nt({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:S}=c,$=c.parseExpression(!0,y),j="math"+h.slice(1);return{type:"font",mode:S,font:j,body:{type:"ordgroup",mode:c.mode,body:$}}},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},Tl=(s,i)=>{const c=pd(s.size,i.style),h=c.fracNum(),y=c.fracDen();let S;S=i.havingStyle(h);const $=rr(s.numer,S,i);if(s.continued){const ir=8.5/i.fontMetrics().ptPerEm,nr=3.5/i.fontMetrics().ptPerEm;$.height=$.height<ir?ir:$.height,$.depth=$.depth<nr?nr:$.depth}S=i.havingStyle(y);const j=rr(s.denom,S,i);let G,re,pe;s.hasBarLine?(s.barSize?(re=Pe(s.barSize,i),G=ve.makeLineSpan("frac-line",i,re)):G=ve.makeLineSpan("frac-line",i),re=G.height,pe=G.height):(G=null,re=0,pe=i.fontMetrics().defaultRuleThickness);let be,Ae,Ye;c.size===R.DISPLAY.size||s.size==="display"?(be=i.fontMetrics().num1,re>0?Ae=3*pe:Ae=7*pe,Ye=i.fontMetrics().denom1):(re>0?(be=i.fontMetrics().num2,Ae=pe):(be=i.fontMetrics().num3,Ae=3*pe),Ye=i.fontMetrics().denom2);let it;if(G){const ir=i.fontMetrics().axisHeight;be-$.depth-(ir+.5*re)<Ae&&(be+=Ae-(be-$.depth-(ir+.5*re))),ir-.5*re-(j.height-Ye)<Ae&&(Ye+=Ae-(ir-.5*re-(j.height-Ye)));const nr=-(ir-.5*re);it=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:j,shift:Ye},{type:"elem",elem:G,shift:nr},{type:"elem",elem:$,shift:-be}]},i)}else{const ir=be-$.depth-(j.height-Ye);ir<Ae&&(be+=.5*(Ae-ir),Ye+=.5*(Ae-ir)),it=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:j,shift:Ye},{type:"elem",elem:$,shift:-be}]},i)}S=i.havingStyle(c),it.height*=S.sizeMultiplier/i.sizeMultiplier,it.depth*=S.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 Zt,Yt;return s.leftDelim==null?Zt=Na(i,["mopen"]):Zt=eo.customSizedDelim(s.leftDelim,Pt,!0,i.havingStyle(c),s.mode,["mopen"]),s.continued?Yt=ve.makeSpan([]):s.rightDelim==null?Yt=Na(i,["mclose"]):Yt=eo.customSizedDelim(s.rightDelim,Pt,!0,i.havingStyle(c),s.mode,["mclose"]),ve.makeSpan(["mord"].concat(S.sizingClasses(i)),[Zt,ve.makeSpan(["mfrac"],[it]),Yt],i)},Ol=(s,i)=>{let c=new Xe.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",fe(y))}const h=pd(s.size,i.style);if(h.size!==i.style.size){c=new Xe.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 S=new Xe.MathNode("mo",[new Xe.TextNode(s.leftDelim.replace("\\",""))]);S.setAttribute("fence","true"),y.push(S)}if(y.push(c),s.rightDelim!=null){const S=new Xe.MathNode("mo",[new Xe.TextNode(s.rightDelim.replace("\\",""))]);S.setAttribute("fence","true"),y.push(S)}return ml(y)}return c};nt({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],S=i[1];let $,j=null,G=null,re="auto";switch(h){case"\\dfrac":case"\\frac":case"\\tfrac":$=!0;break;case"\\\\atopfrac":$=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":$=!1,j="(",G=")";break;case"\\\\bracefrac":$=!1,j="\\{",G="\\}";break;case"\\\\brackfrac":$=!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:S,hasBarLine:$,leftDelim:j,rightDelim:G,size:re,barSize:null}},htmlBuilder:Tl,mathmlBuilder:Ol}),nt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=i[0],S=i[1];return{type:"genfrac",mode:c.mode,continued:!0,numer:y,denom:S,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),nt({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};nt({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],S=zn(i[0]),$=S.type==="atom"&&S.family==="open"?gd(S.text):null,j=zn(i[1]),G=j.type==="atom"&&j.family==="close"?gd(j.text):null,re=Kt(i[2],"size");let pe,be=null;re.isBlank?pe=!0:(be=re.value,pe=be.number>0);let Ae="auto",Ye=i[3];if(Ye.type==="ordgroup"){if(Ye.body.length>0){const it=Kt(Ye.body[0],"textord");Ae=md[Number(it.text)]}}else Ye=Kt(Ye,"textord"),Ae=md[Number(Ye.text)];return{type:"genfrac",mode:c.mode,numer:h,denom:y,continued:!1,hasBarLine:pe,barSize:be,leftDelim:$,rightDelim:G,size:Ae}},htmlBuilder:Tl,mathmlBuilder:Ol}),nt({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}}}),nt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(s,i)=>{let{parser:c,funcName:h}=s;const y=i[0],S=x(Kt(i[1],"infix").size),$=i[2],j=S.number>0;return{type:"genfrac",mode:c.mode,numer:y,denom:$,continued:!1,hasBarLine:j,barSize:S,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Tl,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 S=rr(y.base,i.havingBaseStyle(R.DISPLAY)),$=Qn.svgSpan(y,i);let j;if(y.isOver?(j=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:S},{type:"kern",size:.1},{type:"elem",elem:$}]},i),j.children[0].children[0].children[1].classes.push("svg-align")):(j=ve.makeVList({positionType:"bottom",positionData:S.depth+.1+$.height,children:[{type:"elem",elem:$},{type:"kern",size:.1},{type:"elem",elem:S}]},i),j.children[0].children[0].children[0].classes.push("svg-align")),h){const G=ve.makeSpan(["mord",y.isOver?"mover":"munder"],[j],i);y.isOver?j=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:G},{type:"kern",size:.2},{type:"elem",elem:h}]},i):j=ve.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 ve.makeSpan(["mord",y.isOver?"mover":"munder"],[j],i)};nt({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 Xe.MathNode(s.isOver?"mover":"munder",[xr(s.base,i),c])}}),nt({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 ve.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}}),nt({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 $=0;$<h.length;$++){let j=h[$];j==="~"&&(j="\\textasciitilde"),y.push({type:"textord",mode:"text",text:j})}const S={type:"text",mode:c.mode,font:"\\texttt",body:y};return{type:"href",mode:c.mode,href:h,body:Dr(S)}}}),nt({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 ve.makeFragment(c)},mathmlBuilder(s,i){return new Xe.MathNode("mrow",fn(s.body,i))}}),nt({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 S=Kt(i[0],"raw").string,$=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=S,j={command:"\\htmlClass",class:S};break;case"\\htmlId":G.id=S,j={command:"\\htmlId",id:S};break;case"\\htmlStyle":G.style=S,j={command:"\\htmlStyle",style:S};break;case"\\htmlData":{const re=S.split(",");for(let pe=0;pe<re.length;pe++){const be=re[pe].split("=");if(be.length!==2)throw new a("Error parsing key-value for \\htmlData");G["data-"+be[0].trim()]=be[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($)}: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=ve.makeSpan(h,c,i);for(const S in s.attributes)S!=="class"&&s.attributes.hasOwnProperty(S)&&y.setAttribute(S,s.attributes[S]);return y},mathmlBuilder:(s,i)=>mo(s.body,i)}),nt({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 ve.makeFragment(c)},mathmlBuilder:(s,i)=>mo(s.mathml,i)});const Ml=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(!dt(c))throw new a("Invalid unit: '"+c.unit+"' in \\includegraphics.");return c}};nt({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"},S={number:.9,unit:"em"},$={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 be=re[pe].split("=");if(be.length===2){const Ae=be[1].trim();switch(be[0].trim()){case"alt":j=Ae;break;case"width":y=Ml(Ae);break;case"height":S=Ml(Ae);break;case"totalheight":$=Ml(Ae);break;default:throw new a("Invalid key: '"+be[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:S,totalheight:$,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 S={height:fe(c+h)};y>0&&(S.width=fe(y)),h>0&&(S.verticalAlign=fe(-h));const $=new tr(s.src,s.alt,S);return $.height=c,$.depth=h,$},mathmlBuilder:(s,i)=>{const c=new Xe.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",fe(-y))),c.setAttribute("height",fe(h+y)),s.width.number>0){const S=Pe(s.width,i);c.setAttribute("width",fe(S))}return c.setAttribute("src",s.src),c}}),nt({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 S=h[1]==="m",$=y.value.unit==="mu";S?($||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")):$&&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 ve.makeGlue(s.dimension,i)},mathmlBuilder(s,i){const c=Pe(s.dimension,i);return new Xe.SpaceNode(c)}}),nt({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=ve.makeSpan([],[rr(s.body,i)]),c=ve.makeSpan(["inner"],[c],i)):c=ve.makeSpan(["inner"],[rr(s.body,i)]);const h=ve.makeSpan(["fix"],[]);let y=ve.makeSpan([s.alignment],[c,h],i);const S=ve.makeSpan(["strut"]);return S.style.height=fe(y.height+y.depth),y.depth&&(S.style.verticalAlign=fe(-y.depth)),y.children.unshift(S),y=ve.makeSpan(["thinbox"],[y],i),ve.makeSpan(["mord","vbox"],[y],i)},mathmlBuilder:(s,i)=>{const c=new Xe.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}}),nt({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 S=c==="\\("?"\\)":"$",$=h.parseExpression(!1,S);return h.expect(S),h.switchMode(y),{type:"styling",mode:h.mode,style:"text",body:$}}}),nt({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}};nt({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 ve.makeFragment(h)},mathmlBuilder:(s,i)=>{const c=bd(s,i);return mo(c,i)}});const yd=(s,i,c,h,y,S,$)=>{s=ve.makeSpan([],[s]);const j=c&&D.isCharacterBox(c);let G,re;if(i){const Ae=rr(i,h.havingStyle(y.sup()),h);re={elem:Ae,kern:Math.max(h.fontMetrics().bigOpSpacing1,h.fontMetrics().bigOpSpacing3-Ae.depth)}}if(c){const Ae=rr(c,h.havingStyle(y.sub()),h);G={elem:Ae,kern:Math.max(h.fontMetrics().bigOpSpacing2,h.fontMetrics().bigOpSpacing4-Ae.height)}}let pe;if(re&&G){const Ae=h.fontMetrics().bigOpSpacing5+G.elem.height+G.elem.depth+G.kern+s.depth+$;pe=ve.makeVList({positionType:"bottom",positionData:Ae,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:G.elem,marginLeft:fe(-S)},{type:"kern",size:G.kern},{type:"elem",elem:s},{type:"kern",size:re.kern},{type:"elem",elem:re.elem,marginLeft:fe(S)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else if(G){const Ae=s.height-$;pe=ve.makeVList({positionType:"top",positionData:Ae,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:G.elem,marginLeft:fe(-S)},{type:"kern",size:G.kern},{type:"elem",elem:s}]},h)}else if(re){const Ae=s.depth+$;pe=ve.makeVList({positionType:"bottom",positionData:Ae,children:[{type:"elem",elem:s},{type:"kern",size:re.kern},{type:"elem",elem:re.elem,marginLeft:fe(S)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else return s;const be=[pe];if(G&&S!==0&&!j){const Ae=ve.makeSpan(["mspace"],[],h);Ae.style.marginRight=fe(S),be.unshift(Ae)}return ve.makeSpan(["mop","op-limits"],be,h)},xd=["\\smallint"],Zo=(s,i)=>{let c,h,y=!1,S;s.type==="supsub"?(c=s.sup,h=s.sub,S=Kt(s.base,"op"),y=!0):S=Kt(s,"op");const $=i.style;let j=!1;$.size===R.DISPLAY.size&&S.symbol&&!xd.includes(S.name)&&(j=!0);let G;if(S.symbol){const be=j?"Size2-Regular":"Size1-Regular";let Ae="";if((S.name==="\\oiint"||S.name==="\\oiiint")&&(Ae=S.name.slice(1),S.name=Ae==="oiint"?"\\iint":"\\iiint"),G=ve.makeSymbol(S.name,be,"math",i,["mop","op-symbol",j?"large-op":"small-op"]),Ae.length>0){const Ye=G.italic,it=ve.staticSvg(Ae+"Size"+(j?"2":"1"),i);G=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:G,shift:0},{type:"elem",elem:it,shift:j?.08:0}]},i),S.name="\\"+Ae,G.classes.unshift("mop"),G.italic=Ye}}else if(S.body){const be=qr(S.body,i,!0);be.length===1&&be[0]instanceof At?(G=be[0],G.classes[0]="mop"):G=ve.makeSpan(["mop"],be,i)}else{const be=[];for(let Ae=1;Ae<S.name.length;Ae++)be.push(ve.mathsym(S.name[Ae],S.mode,i));G=ve.makeSpan(["mop"],be,i)}let re=0,pe=0;return(G instanceof At||S.name==="\\oiint"||S.name==="\\oiiint")&&!S.suppressBaseShift&&(re=(G.height-G.depth)/2-i.fontMetrics().axisHeight,pe=G.italic),y?yd(G,c,h,i,$,pe,re):(re&&(G.style.position="relative",G.style.top=fe(re)),G)},Ma=(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"};nt({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:Zo,mathmlBuilder:Ma}),nt({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:Zo,mathmlBuilder:Ma});const $4={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};nt({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:Zo,mathmlBuilder:Ma}),nt({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:Zo,mathmlBuilder:Ma}),nt({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=$4[h]),{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:h}},htmlBuilder:Zo,mathmlBuilder:Ma});const wd=(s,i)=>{let c,h,y=!1,S;s.type==="supsub"?(c=s.sup,h=s.sub,S=Kt(s.base,"operatorname"),y=!0):S=Kt(s,"operatorname");let $;if(S.body.length>0){const j=S.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 At&&(pe.text=pe.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}$=ve.makeSpan(["mop"],G,i)}else $=ve.makeSpan(["mop"],[],i);return y?yd($,c,h,i,i.style,0,0):$};nt({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 $=0;$<c.length;$++){const j=c[$];if(!(j instanceof Xe.SpaceNode))if(j instanceof Xe.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 Xe.TextNode?G.text=G.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):h=!1;break}default:h=!1}else h=!1}if(h){const $=c.map(j=>j.toText()).join("");c=[new Xe.TextNode($)]}const y=new Xe.MathNode("mi",c);y.setAttribute("mathvariant","normal");const S=new Xe.MathNode("mo",[Dn("\u2061","text")]);return s.parentIsSupSub?new Xe.MathNode("mrow",[y,S]):Xe.newDocumentFragment([y,S])}}),H("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),nn({type:"ordgroup",htmlBuilder(s,i){return s.semisimple?ve.makeFragment(qr(s.body,i,!1)):ve.makeSpan(["mord"],qr(s.body,i,!0),i)},mathmlBuilder(s,i){return mo(s.body,i,!0)}}),nt({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=ve.makeLineSpan("overline-line",i),y=i.fontMetrics().defaultRuleThickness,S=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:3*y},{type:"elem",elem:h},{type:"kern",size:y}]},i);return ve.makeSpan(["mord","overline"],[S],i)},mathmlBuilder(s,i){const c=new Xe.MathNode("mo",[new Xe.TextNode("\u203E")]);c.setAttribute("stretchy","true");const h=new Xe.MathNode("mover",[xr(s.body,i),c]);return h.setAttribute("accent","true"),h}}),nt({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 ve.makeFragment(c)},mathmlBuilder:(s,i)=>{const c=fn(s.body,i);return new Xe.MathNode("mphantom",c)}}),nt({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=ve.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=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c}]},i),ve.makeSpan(["mord"],[c],i)},mathmlBuilder:(s,i)=>{const c=fn(Dr(s.body),i),h=new Xe.MathNode("mphantom",c),y=new Xe.MathNode("mpadded",[h]);return y.setAttribute("height","0px"),y.setAttribute("depth","0px"),y}}),nt({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=ve.makeSpan(["inner"],[rr(s.body,i.withPhantom())]),h=ve.makeSpan(["fix"],[]);return ve.makeSpan(["mord","rlap"],[c,h],i)},mathmlBuilder:(s,i)=>{const c=fn(Dr(s.body),i),h=new Xe.MathNode("mphantom",c),y=new Xe.MathNode("mpadded",[h]);return y.setAttribute("width","0px"),y}}),nt({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 ve.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:c}]},i)},mathmlBuilder(s,i){const c=new Xe.MathNode("mpadded",[xr(s.body,i)]),h=s.dy.number+s.dy.unit;return c.setAttribute("voffset",h),c}}),nt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(s){let{parser:i}=s;return{type:"internal",mode:i.mode}}}),nt({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],S=Kt(i[0],"size"),$=Kt(i[1],"size");return{type:"rule",mode:h.mode,shift:y&&Kt(y,"size").value,width:S.value,height:$.value}},htmlBuilder(s,i){const c=ve.makeSpan(["mord","rule"],[],i),h=Pe(s.width,i),y=Pe(s.height,i),S=s.shift?Pe(s.shift,i):0;return c.style.borderRightWidth=fe(h),c.style.borderTopWidth=fe(y),c.style.bottom=fe(S),c.width=h,c.height=y+S,c.depth=-S,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,S=i.color&&i.getColor()||"black",$=new Xe.MathNode("mspace");$.setAttribute("mathbackground",S),$.setAttribute("width",fe(c)),$.setAttribute("height",fe(h));const j=new Xe.MathNode("mpadded",[$]);return y>=0?j.setAttribute("height",fe(y)):(j.setAttribute("height",fe(y)),j.setAttribute("depth",fe(-y))),j.setAttribute("voffset",fe(y)),j}});function Cd(s,i,c){const h=qr(s,i,!1),y=i.sizeMultiplier/c.sizeMultiplier;for(let S=0;S<h.length;S++){const $=h[S].classes.indexOf("sizing");$<0?Array.prototype.push.apply(h[S].classes,i.sizingClasses(c)):h[S].classes[$+1]==="reset-size"+i.size&&(h[S].classes[$+1]="reset-size"+c.size),h[S].height*=y,h[S].depth*=y}return ve.makeFragment(h)}const Dd=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];nt({type:"sizing",names:Dd,props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{breakOnTokenText:c,funcName:h,parser:y}=s;const S=y.parseExpression(!1,c);return{type:"sizing",mode:y.mode,size:Dd.indexOf(h)+1,body:S}},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 Xe.MathNode("mstyle",h);return y.setAttribute("mathsize",fe(c.sizeMultiplier)),y}}),nt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(s,i,c)=>{let{parser:h}=s,y=!1,S=!1;const $=c[0]&&Kt(c[0],"ordgroup");if($){let G="";for(let re=0;re<$.body.length;++re)if(G=$.body[re].text,G==="t")y=!0;else if(G==="b")S=!0;else{y=!1,S=!1;break}}else y=!0,S=!0;const j=i[0];return{type:"smash",mode:h.mode,body:j,smashHeight:y,smashDepth:S}},htmlBuilder:(s,i)=>{const c=ve.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=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c}]},i);return ve.makeSpan(["mord"],[h],i)},mathmlBuilder:(s,i)=>{const c=new Xe.MathNode("mpadded",[xr(s.body,i)]);return s.smashHeight&&c.setAttribute("height","0px"),s.smashDepth&&c.setAttribute("depth","0px"),c}}),nt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(s,i,c){let{parser:h}=s;const y=c[0],S=i[0];return{type:"sqrt",mode:h.mode,body:S,index:y}},htmlBuilder(s,i){let c=rr(s.body,i.havingCrampedStyle());c.height===0&&(c.height=i.fontMetrics().xHeight),c=ve.wrapFragment(c,i);const h=i.fontMetrics().defaultRuleThickness;let y=h;i.style.id<R.TEXT.id&&(y=i.fontMetrics().xHeight);let S=h+y/4;const $=c.height+c.depth+S+h,{span:j,ruleWidth:G,advanceWidth:re}=eo.sqrtImage($,i),pe=j.height-G;pe>c.height+c.depth+S&&(S=(S+pe-c.height-c.depth)/2);const be=j.height-c.height-S-G;c.style.paddingLeft=fe(re);const Ae=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:-(c.height+be)},{type:"elem",elem:j},{type:"kern",size:G}]},i);if(s.index){const Ye=i.havingStyle(R.SCRIPTSCRIPT),it=rr(s.index,Ye,i),Pt=.6*(Ae.height-Ae.depth),Zt=ve.makeVList({positionType:"shift",positionData:-Pt,children:[{type:"elem",elem:it}]},i),Yt=ve.makeSpan(["root"],[Zt]);return ve.makeSpan(["mord","sqrt"],[Yt,Ae],i)}else return ve.makeSpan(["mord","sqrt"],[Ae],i)},mathmlBuilder(s,i){const{body:c,index:h}=s;return h?new Xe.MathNode("mroot",[xr(c,i),xr(h,i)]):new Xe.MathNode("msqrt",[xr(c,i)])}});const Ed={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT};nt({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 S=y.parseExpression(!0,c),$=h.slice(1,h.length-5);return{type:"styling",mode:y.mode,style:$,body:S}},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),S=new Xe.MathNode("mstyle",y),$={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[s.style];return S.setAttribute("scriptlevel",$[0]),S.setAttribute("displaystyle",$[1]),S}});const N4=function(s,i){const c=s.base;return c?c.type==="op"?c.limits&&(i.style.size===R.DISPLAY.size||c.alwaysHandleSupSub)?Zo: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};nn({type:"supsub",htmlBuilder(s,i){const c=N4(s,i);if(c)return c(s,i);const{base:h,sup:y,sub:S}=s,$=rr(h,i);let j,G;const re=i.fontMetrics();let pe=0,be=0;const Ae=h&&D.isCharacterBox(h);if(y){const nr=i.havingStyle(i.style.sup());j=rr(y,nr,i),Ae||(pe=$.height-nr.fontMetrics().supDrop*nr.sizeMultiplier/i.sizeMultiplier)}if(S){const nr=i.havingStyle(i.style.sub());G=rr(S,nr,i),Ae||(be=$.depth+nr.fontMetrics().subDrop*nr.sizeMultiplier/i.sizeMultiplier)}let Ye;i.style===R.DISPLAY?Ye=re.sup1:i.style.cramped?Ye=re.sup3:Ye=re.sup2;const it=i.sizeMultiplier,Pt=fe(.5/re.ptPerEm/it);let Zt=null;if(G){const nr=s.base&&s.base.type==="op"&&s.base.name&&(s.base.name==="\\oiint"||s.base.name==="\\oiiint");($ instanceof At||nr)&&(Zt=fe(-$.italic))}let Yt;if(j&&G){pe=Math.max(pe,Ye,j.depth+.25*re.xHeight),be=Math.max(be,re.sub2);const nr=4*re.defaultRuleThickness;if(pe-j.depth-(G.height-be)<nr){be=nr-(pe-j.depth)+G.height;const Gr=.8*re.xHeight-(pe-j.depth);Gr>0&&(pe+=Gr,be-=Gr)}const Er=[{type:"elem",elem:G,shift:be,marginRight:Pt,marginLeft:Zt},{type:"elem",elem:j,shift:-pe,marginRight:Pt}];Yt=ve.makeVList({positionType:"individualShift",children:Er},i)}else if(G){be=Math.max(be,re.sub1,G.height-.8*re.xHeight);const nr=[{type:"elem",elem:G,marginLeft:Zt,marginRight:Pt}];Yt=ve.makeVList({positionType:"shift",positionData:be,children:nr},i)}else if(j)pe=Math.max(pe,Ye,j.depth+.25*re.xHeight),Yt=ve.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($,"right")||"mord";return ve.makeSpan([ir],[$,ve.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 S=[xr(s.base,i)];s.sub&&S.push(xr(s.sub,i)),s.sup&&S.push(xr(s.sup,i));let $;if(c)$=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)?$="munderover":$="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)?$="munder":$="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)?$="mover":$="msup"}return new Xe.MathNode($,S)}}),nn({type:"atom",htmlBuilder(s,i){return ve.mathsym(s.text,s.mode,i,["m"+s.family])},mathmlBuilder(s,i){const c=new Xe.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 Sd={mi:"italic",mn:"normal",mtext:"normal"};nn({type:"mathord",htmlBuilder(s,i){return ve.makeOrd(s,i,"mathord")},mathmlBuilder(s,i){const c=new Xe.MathNode("mi",[Dn(s.text,s.mode,i)]),h=gl(s,i)||"italic";return h!==Sd[c.type]&&c.setAttribute("mathvariant",h),c}}),nn({type:"textord",htmlBuilder(s,i){return ve.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 Xe.MathNode("mtext",[c]):/[0-9]/.test(s.text)?y=new Xe.MathNode("mn",[c]):s.text==="\\prime"?y=new Xe.MathNode("mo",[c]):y=new Xe.MathNode("mi",[c]),h!==Sd[y.type]&&y.setAttribute("mathvariant",h),y}});const Rl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Il={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};nn({type:"spacing",htmlBuilder(s,i){if(Il.hasOwnProperty(s.text)){const c=Il[s.text].className||"";if(s.mode==="text"){const h=ve.makeOrd(s,i,"textord");return h.classes.push(c),h}else return ve.makeSpan(["mspace",c],[ve.mathsym(s.text,s.mode,i)],i)}else{if(Rl.hasOwnProperty(s.text))return ve.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 Xe.MathNode("mtext",[new Xe.TextNode("\xA0")]);else{if(Rl.hasOwnProperty(s.text))return new Xe.MathNode("mspace");throw new a('Unknown type of space "'+s.text+'"')}return c}});const kd=()=>{const s=new Xe.MathNode("mtd",[]);return s.setAttribute("width","50%"),s};nn({type:"tag",mathmlBuilder(s,i){const c=new Xe.MathNode("mtable",[new Xe.MathNode("mtr",[kd(),new Xe.MathNode("mtd",[mo(s.body,i)]),kd(),new Xe.MathNode("mtd",[mo(s.tag,i)])])]);return c.setAttribute("width","100%"),c}});const Bd={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ad={"\\textbf":"textbf","\\textmd":"textmd"},T4={"\\textit":"textit","\\textup":"textup"},Fd=(s,i)=>{const c=s.font;if(c){if(Bd[c])return i.withTextFontFamily(Bd[c]);if(Ad[c])return i.withTextFontWeight(Ad[c]);if(c==="\\emph")return i.fontShape==="textit"?i.withTextFontShape("textup"):i.withTextFontShape("textit")}else return i;return i.withTextFontShape(T4[c])};nt({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 ve.makeSpan(["mord","text"],h,c)},mathmlBuilder(s,i){const c=Fd(s,i);return mo(s.body,c)}}),nt({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=ve.makeLineSpan("underline-line",i),y=i.fontMetrics().defaultRuleThickness,S=ve.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 ve.makeSpan(["mord","underline"],[S],i)},mathmlBuilder(s,i){const c=new Xe.MathNode("mo",[new Xe.TextNode("\u203E")]);c.setAttribute("stretchy","true");const h=new Xe.MathNode("munder",[xr(s.body,i),c]);return h.setAttribute("accentunder","true"),h}}),nt({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 ve.makeVList({positionType:"shift",positionData:y,children:[{type:"elem",elem:c}]},i)},mathmlBuilder(s,i){return new Xe.MathNode("mpadded",[xr(s.body,i)],["vcenter"])}}),nt({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=$d(s),h=[],y=i.havingStyle(i.style.text());for(let S=0;S<c.length;S++){let $=c[S];$==="~"&&($="\\textasciitilde"),h.push(ve.makeSymbol($,"Typewriter-Regular",s.mode,y,["mord","texttt"]))}return ve.makeSpan(["mord","text"].concat(y.sizingClasses(i)),ve.tryCombineChars(h),y)},mathmlBuilder(s,i){const c=new Xe.TextNode($d(s)),h=new Xe.MathNode("mtext",[c]);return h.setAttribute("mathvariant","monospace"),h}});const $d=s=>s.body.replace(/ /g,s.star?"\u2423":"\xA0");var vo=rn;const Nd=`[ \r
|
|
488
|
+
]`,O4="\\\\[a-zA-Z@]+",M4="\\\\[^\uD800-\uDFFF]",R4="("+O4+")"+Nd+"*",I4=`\\\\(
|
|
489
|
+
|[ \r ]+
|
|
490
|
+
?)[ \r ]*`,Pl="[\u0300-\u036F]",P4=new RegExp(Pl+"+$"),z4="("+Nd+"+)|"+(I4+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Pl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Pl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+R4)+("|"+M4+")");class Td{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 S=i.indexOf(`
|
|
491
|
+
`,this.tokenRegex.lastIndex);return S===-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=S+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 S=y[0].text,$=s.isDefined(S);if($&&!i)throw new a("\\newcommand{"+S+"} attempting to redefine "+(S+"; use \\renewcommand"));if(!$&&!c)throw new a("\\renewcommand{"+S+"} when command "+S+" 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 $&&h||s.macros.set(S,{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 Md={",":"\\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 Md?i=Md[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=fe(Ne["Main-Regular"][84][1]-.7*Ne["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,S=i.consumeArg().tokens,$=i.macros.get("|"),j=i.macros.get("\\|");i.macros.beginGroup();const G=be=>Ae=>{s&&(Ae.macros.set("|",$),y.length&&Ae.macros.set("\\|",j));let Ye=be;return!be&&y.length&&Ae.future().text==="|"&&(Ae.popToken(),Ye=!0),{tokens:Ye?y:h,numArgs:0}};i.macros.set("|",G(!1)),y.length&&i.macros.set("\\|",G(!0));const re=i.consumeArg().tokens,pe=i.expandTokens([...S,...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 Td(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 S,$=0,j=0;do{if(S=this.popToken(),c.push(S),S.text==="{")++$;else if(S.text==="}"){if(--$,$===-1)throw new a("Extra }",S)}else if(S.text==="EOF")throw new a("Unexpected end of input in a macro argument, expected '"+(i&&h?i[j]:"}")+"'",S);if(i&&h)if(($===0||$===1&&i[j]==="{")&&S.text===i[j]){if(++j,j===i.length){c.splice(-j,j);break}}else j=0}while($!==0||h);return y.text==="{"&&c[c.length-1].text==="}"&&(c.pop(),c.shift()),c.reverse(),{tokens:c,start:y,end:S}}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 S=0;S<y.length;S++){const $=this.popToken();if(y[S]!==$.text)throw new a("Use of the macro doesn't match its definition",$)}}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 S=y.tokens;const $=this.consumeArgs(y.numArgs,y.delimiters);if(y.numArgs){S=S.slice();for(let j=S.length-1;j>=0;--j){let G=S[j];if(G.text==="#"){if(j===0)throw new a("Incomplete placeholder at end of macro body",G);if(G=S[--j],G.text==="#")S.splice(j+1,1);else if(/^[1-9]$/.test(G.text))S.splice(j,2,...$[+G.text-1]);else throw new a("Not a valid argument number",G)}}}return this.pushTokens(S),S.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 S=new Td(h,this.settings),$=[];let j=S.lex();for(;j.text!=="EOF";)$.push(j),j=S.lex();return $.reverse(),{tokens:$,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=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Ti=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 S=this.parseAtom(c);if(S){if(S.type==="internal")continue}else break;h.push(S)}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,S;const $=i.slice(0,c),j=i.slice(c+1);$.length===1&&$[0].type==="ordgroup"?y=$[0]:y={type:"ordgroup",mode:this.mode,body:$},j.length===1&&j[0].type==="ordgroup"?S=j[0]:S={type:"ordgroup",mode:this.mode,body:j};let G;return h==="\\\\abovefrac"?G=this.callFunction(h,[y,i[c],S],[]):G=this.callFunction(h,[y,S],[]),[G]}else return i}handleSupSubscript(i){const c=this.fetch(),h=c.text;this.consume(),this.consumeSpaces();let y;do{var S;y=this.parseGroup(i)}while(((S=y)==null?void 0:S.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 S=this.fetch();if(S.text==="\\limits"||S.text==="\\nolimits"){if(c&&c.type==="op"){const $=S.text==="\\limits";c.limits=$,c.alwaysHandleSupSub=!0}else if(c&&c.type==="operatorname")c.alwaysHandleSupSub&&(c.limits=S.text==="\\limits");else throw new a("Limit controls must follow a math operator",S);this.consume()}else if(S.text==="^"){if(h)throw new a("Double superscript",S);h=this.handleSupSubscript("superscript")}else if(S.text==="_"){if(y)throw new a("Double subscript",S);y=this.handleSupSubscript("subscript")}else if(S.text==="'"){if(h)throw new a("Double superscript",S);const $={type:"textord",mode:this.mode,text:"\\prime"},j=[$];for(this.consume();this.fetch().text==="'";)j.push($),this.consume();this.fetch().text==="^"&&j.push(this.handleSupSubscript("superscript")),h={type:"ordgroup",mode:this.mode,body:j}}else if(Ti[S.text]){const $=zd.test(S.text),j=[];for(j.push(new yn(Ti[S.text])),this.consume();;){const re=this.fetch().text;if(!Ti[re]||zd.test(re)!==$)break;j.unshift(new yn(Ti[re])),this.consume()}const G=this.subparse(j);$?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,S=vo[y];if(!S)return null;if(this.consume(),c&&c!=="atom"&&!S.allowedInArgument)throw new a("Got function '"+y+"' with no arguments"+(c?" as "+c:""),h);if(this.mode==="text"&&!S.allowedInText)throw new a("Can't use function '"+y+"' in text mode",h);if(this.mode==="math"&&S.allowedInMath===!1)throw new a("Can't use function '"+y+"' in math mode",h);const{args:$,optArgs:j}=this.parseArguments(y,S);return this.callFunction(y,$,j,h,i)}callFunction(i,c,h,y,S){const $={funcName:i,parser:this,token:y,breakOnTokenText:S},j=vo[i];if(j&&j.handler)return j.handler($,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=[],S=[];for(let $=0;$<h;$++){let j=c.argTypes&&c.argTypes[$];const G=$<c.numOptionalArgs;(c.primitive&&j==null||c.type==="sqrt"&&$===1&&S[0]==null)&&(j="primitive");const re=this.parseGroupOfType("argument to '"+i+"'",j,G);if(G)S.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:S}}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="",S;for(;(S=this.fetch()).text!=="EOF";)y+=S.text,this.consume();return this.consume(),h.text=y,h}parseRegexGroup(i,c){const h=this.fetch();let y=h,S="",$;for(;($=this.fetch()).text!=="EOF"&&i.test(S+$.text);)y=$,S+=y.text,this.consume();if(S==="")throw new a("Invalid "+c+": '"+h.text+"'",h);return h.range(y,S)}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 S={number:+(y[1]+y[2]),unit:y[3]};if(!dt(S))throw new a("Invalid unit: '"+S.unit+"'",c);return{type:"size",mode:this.mode,value:S,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 S=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const $={type:"ordgroup",mode:this.mode,loc:h.loc,body:S};return c&&this.switchMode(y),$}parseGroup(i,c){const h=this.fetch(),y=h.text;let S;if(y==="{"||y==="\\begingroup"){this.consume();const $=y==="{"?"}":"\\endgroup";this.gullet.beginGroup();const j=this.parseExpression(!1,$),G=this.fetch();this.expect($),this.gullet.endGroup(),S={type:"ordgroup",mode:this.mode,loc:hn.range(h,G),body:j,semisimple:y==="\\begingroup"||void 0}}else if(S=this.parseFunction(c,i)||this.parseSymbol(),S==null&&y[0]==="\\"&&!Pd.hasOwnProperty(y)){if(this.settings.throwOnError)throw new a("Undefined control sequence: "+y,h);S=this.formatUnsupportedCmd(y),this.consume()}return S}formLigatures(i){let c=i.length-1;for(let h=0;h<c;++h){const y=i[h],S=y.text;S==="-"&&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)),(S==="'"||S==="`")&&i[h+1].text===S&&(i.splice(h,2,{type:"textord",mode:"text",loc:hn.range(y,i[h+1]),text:S+S}),c-=1)}}parseSymbol(){const i=this.fetch();let c=i.text;if(/^\\verb[^a-zA-Z]/.test(c)){this.consume();let S=c.slice(5);const $=S.charAt(0)==="*";if($&&(S=S.slice(1)),S.length<2||S.charAt(0)!==S.slice(-1))throw new a(`\\verb assertion failed --
|
|
492
|
+
please report what input caused this bug`);return S=S.slice(1,-1),{type:"verb",mode:"text",body:S,star:$}}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"&&Ue.indexOf(c)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+c[0]+'" used in math mode',i);const S=_t[this.mode][c].group,$=hn.range(i);let j;if(Mr.hasOwnProperty(S)){const G=S;j={type:"atom",mode:this.mode,family:G,loc:$,text:c}}else j={type:S,mode:this.mode,loc:$,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 S=0;S<h[0].length;S++){const $=h[0][S];if(!_l[$])throw new a("Unknown accent ' "+$+"'",i);const j=_l[$][this.mode]||_l[$].text;if(!j)throw new a("Accent "+$+" 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=ve.makeSpan(["katex-error"],[new At(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:ft,__defineSymbol:w,__defineFunction:nt,__defineMacro:H,__domTree:{Span:Bt,Anchor:Rt,SymbolNode:At,SvgNode:Ht,PathNode:jt,LineNode:Cr}},V4=q4;return n=n.default,n})()})})($0)),$0.exports}var IC=cs.exports,W1;function PC(){return W1||(W1=1,(function(e,t){(function(r,n){n(t,je,OC(),RC())})(IC,function(r,n,o,a){Object.defineProperty(r,"__esModule",{value:!0});function u(m,B){for(var F in B)Object.defineProperty(m,F,{enumerable:!0,get:B[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 B=new WeakMap,F=new WeakMap;return(f=function(A){return A?F:B})(m)}function d(m,B){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var F=f(B);if(F&&F.has(m))return F.get(m);var A={},O=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var k in m)if(k!=="default"&&Object.prototype.hasOwnProperty.call(m,k)){var P=O?Object.getOwnPropertyDescriptor(m,k):null;P&&(P.get||P.set)?Object.defineProperty(A,k,P):A[k]=m[k]}return A.default=m,F&&F.set(m,A),A}const p=(m,{displayMode:B})=>{const F=({children:A,errorColor:O,math:k,renderError:P})=>{const M=k??A,{html:_,error:T}=(0,n.useMemo)(()=>{try{return{html:a.default.renderToString(M,{displayMode:B,errorColor:O,throwOnError:!!P}),error:void 0}}catch(q){if(q instanceof a.default.ParseError||q instanceof TypeError)return{error:q};throw q}},[M,O,P]);return T?P?P(T):n.default.createElement(m,{html:`${T.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=PC();const zC=Dt.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
|
+
`,jC=Dt.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
|
+
`,_C=Dt.span.attrs({className:"latex-inline-error-message"})`
|
|
508
|
+
font-size: 0.75em;
|
|
509
|
+
color: #d73a49;
|
|
510
|
+
`,LC=({attributes:e,formula:t,styles:r})=>{var a;const n=wt(()=>(t||"").trim(),[t]),o=(a=r==null?void 0:r.text)==null?void 0:a.color;return n?U.jsx(zC,{...e,$color:o,children:U.jsx(Yg.InlineMath,{math:n,errorColor:"#d73a49",renderError:u=>U.jsxs(jC,{children:[U.jsx("span",{children:n}),U.jsx(_C,{children:u==null?void 0:u.message})]})})}):null},HC=Dt.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
|
+
`,KC=Dt.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
|
+
`,qC=Dt.span.attrs({className:"latex-block-error-title"})`
|
|
532
|
+
font-weight: 600;
|
|
533
|
+
`,VC=Dt.code.attrs({className:"latex-block-error-formula"})`
|
|
534
|
+
font-size: 0.85rem;
|
|
535
|
+
color: #d73a49;
|
|
536
|
+
overflow-x: auto;
|
|
537
|
+
`,WC=({attributes:e,formula:t,styles:r})=>{var a;const n=wt(()=>(t||"").trim(),[t]),o=(a=r==null?void 0:r.text)==null?void 0:a.color;return n?U.jsx(HC,{...e,$textColor:o,children:U.jsx(Yg.BlockMath,{math:n,errorColor:"#d73a49",renderError:u=>U.jsxs(KC,{children:[U.jsx(qC,{children:"\u516C\u5F0F\u6E32\u67D3\u5931\u8D25"}),U.jsx(VC,{children:n}),U.jsx("span",{children:u==null?void 0:u.message})]})})}):null},UC=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($C,{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(LC,{attributes:o,formula:r.formula,styles:t});case"latex-block":return U.jsx(WC,{attributes:o,formula:r.formula,styles:t});case"retrieve-sql-data":const m=(B=>{if(!B)return null;try{const F=typeof B=="string"?JSON.parse(B):B;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:B=>{const F=B.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:B=>{const F=B.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})}},XC=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,B="#e6f7ff",F="#1890ff",A="#bae7ff";return g?(m=`${D}`,B="#e6f7ff",F="#1890ff",A="#bae7ff"):b?(m=`${D}`,B="#f6ffed",F="#52c41a",A="#d9f7be"):x&&(m=`${D}`,B="#E7F8FB",F="#10BBD9",A="#E7F8FB"),a=U.jsx("span",{...t,style:{display:"inline-block",background:B,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=A,onMouseLeave:O=>O.currentTarget.style.background=B,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},$u=Dt.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 {
|
|
641
|
+
width: 100%;
|
|
642
|
+
border-collapse: collapse;
|
|
643
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
644
|
+
margin: 16px 0;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
& th, & td {
|
|
648
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
649
|
+
padding: 8px 12px;
|
|
650
|
+
text-align: left;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
& th {
|
|
654
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
655
|
+
font-weight: 600;
|
|
656
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
& tr:nth-child(even) {
|
|
660
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
& td {
|
|
664
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/* 图片样式 */
|
|
668
|
+
& img {
|
|
669
|
+
max-width: 100%;
|
|
670
|
+
height: auto;
|
|
671
|
+
border-radius: 6px;
|
|
672
|
+
margin: 16px 0;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
/* 链接样式 */
|
|
676
|
+
& a {
|
|
677
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
|
|
678
|
+
text-decoration: none;
|
|
679
|
+
|
|
680
|
+
&:hover {
|
|
681
|
+
text-decoration: underline;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/* 文本样式 */
|
|
686
|
+
& strong {
|
|
687
|
+
font-weight: 600;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
& em {
|
|
691
|
+
font-style: italic;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
& u {
|
|
695
|
+
text-decoration: underline;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
& s {
|
|
699
|
+
text-decoration: line-through;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/* 分割线样式 */
|
|
703
|
+
& hr {
|
|
704
|
+
border: none;
|
|
705
|
+
border-top: 1px solid #d0d7de;
|
|
706
|
+
margin: 24px 0;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/* 思考容器样式 */
|
|
710
|
+
& .think-container {
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
& .think-header {
|
|
716
|
+
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
& .think-icon {
|
|
720
|
+
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
& .think-title {
|
|
724
|
+
font-weight: 600;
|
|
725
|
+
color: #24292f;
|
|
726
|
+
font-size: 14px;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
& .think-text {
|
|
730
|
+
color: #86909C;
|
|
731
|
+
font-size: 14px;
|
|
732
|
+
line-height: 1.6;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/* 召回标签样式 */
|
|
736
|
+
& .retrive-tag {
|
|
737
|
+
display: inline-block;
|
|
738
|
+
background: #e6f7ff;
|
|
739
|
+
color: #1890ff;
|
|
740
|
+
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
741
|
+
border-radius: 6px;
|
|
742
|
+
padding: 2px 6px;
|
|
743
|
+
margin: 0 2px;
|
|
744
|
+
font-weight: 500;
|
|
745
|
+
font-size: 12px;
|
|
746
|
+
line-height: 1.4;
|
|
747
|
+
cursor: pointer;
|
|
748
|
+
vertical-align: middle;
|
|
749
|
+
transition: background-color 0.2s ease;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
& .retrive-tag:hover {
|
|
753
|
+
background: #bae7ff;
|
|
754
|
+
}
|
|
755
|
+
`;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 YC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function GC(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 JC(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(YC(o),"g"),l)}),r}function Jg(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}=GC(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=JC(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:Wr(l,t)});break;case"h1":n.push({type:"heading-one",children:Wr(l,t)});break;case"h2":n.push({type:"heading-two",children:Wr(l,t)});break;case"h3":n.push({type:"heading-three",children:Wr(l,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(l.children).map(d=>({type:"list-item",children:Wr(d)}))});break;case"ol":const f={type:"numbered-list",children:Array.from(l.children).map(d=>({type:"list-item",children:Wr(d)}))};n.push(f);break;case"li":n.push({type:"list-item",children:Wr(l,t)});break;case"pre":{const d=l.querySelector("code");d?n.push({type:"code-block",children:Wr(d)}):n.push({type:"code-block",children:Wr(l,t)});break}case"code":{l.closest("pre")||n.push({type:"paragraph",children:Wr(l,t)});break}case"retrive-tag":{const d=Wr(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:Wr(l,t)});break;case"table":n.push(ZC(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:Wr(l)});break;default:n.push({type:"paragraph",children:Wr(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 Wr(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 B=g;if(t)if(g.startsWith("./"))B=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const F=t.substring(0,t.lastIndexOf("/"));B=g.replace(/^\.\.\//,F+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(B=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:B}),[{type:"iframe",src:B,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 ZC(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:Wr(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(u=>({type:"table-cell",header:!1,children:Wr(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:Wr(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:Wr(a)}))})})}return{type:"table",children:t}}const QC=Dt.div.attrs({className:"unified-rich-text-container"})`
|
|
756
|
+
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
757
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
758
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
759
|
+
min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
760
|
+
overflow: hidden;
|
|
761
|
+
transition: all 0.2s ease-in-out;
|
|
762
|
+
padding-top: 14px;
|
|
763
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
764
|
+
&:focus-within {
|
|
765
|
+
border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
|
|
766
|
+
box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
|
|
767
|
+
}
|
|
768
|
+
`}}
|
|
769
|
+
`,Nu=Dt.div.attrs({className:"unified-rich-text-editable-container"})`
|
|
770
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
|
|
771
|
+
min-height: inherit;
|
|
772
|
+
outline: none;
|
|
773
|
+
|
|
774
|
+
& > * + * {
|
|
775
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
776
|
+
}
|
|
777
|
+
`,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:B,enableTemplateInput:F=!1,disabledTags:A=[]})=>{const O=Hs(),k=wt(()=>{var ae,Se,J,he,se,te,ue,Ce,xe;return{primaryColor:((ae=O==null?void 0:O.colors)==null?void 0:ae.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((Se=O==null?void 0:O.colors)==null?void 0:Se.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((J=O==null?void 0:O.colors)==null?void 0:J.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:((ue=O==null?void 0:O.space)==null?void 0:ue.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:((xe=O==null?void 0:O.space)==null?void 0:xe.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=Tx(),Se=W8(ae),{isInline:J}=Se;Se.isInline=te=>!A.includes("template")&&te.type==="template"?!0:J(te);const{isVoid:he}=Se;Se.isVoid=te=>!A.includes("template")&&te.type==="template"?!0:he(te);const se=te=>{if(!(F&&!A.includes("template")))return te;const{insertText:ue,insertData:Ce}=te,xe=()=>{const ke=/<template>([^<]*)<\/template>/g,De=Array.from(I.nodes(te,{match:Be=>ht.isText(Be)&&ke.test(Be.text)}));if(De.length!==0)for(const Be of De){const[Ne,Me]=Be,He=Ne.text||"",ft=[];let ot=0,Oe;for(ke.lastIndex=0;(Oe=ke.exec(He))!==null;){if(Oe.index>ot){const _e=He.slice(ot,Oe.index);_e&&ft.push({text:_e})}ft.push({type:"template",placeholder:(Oe[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),ot=Oe.index+Oe[0].length}if(ot<He.length){const _e=He.slice(ot);_e&&ft.push({text:_e})}qe.removeNodes(te,{at:Me}),qe.insertNodes(te,ft,{at:Me})}};return te.insertText=ke=>{ue(ke),xe()},te.insertData=ke=>{const De=ke.getData("text/plain");if(De&&/<template>[\s\S]*?<\/template>/.test(De)){ue(De),xe();return}return Ce(ke)},te};P.current=se(Se)}const M=P.current;er(()=>{M&&b&&t&&b(M)},[M,b,t]);const[_,T]=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),T(ae),L(Se=>Se+1)}},[e.type,e.content]);const Y=Lt(void 0),W=wt(()=>{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=W.content;Y.current!==ae&&(Y.current=ae,L(Se=>Se+1))},[e.type,W.content]);const z=wt(()=>e.type!=="markdown"?x:{...x||{},hasPendingLatex:W.hasPendingLatex},[x,e.type,W.hasPendingLatex]),K=Lt("");er(()=>{if(e.type!=="markdown")return;const ae=JSON.stringify(z||{});ae!==K.current&&(K.current=ae,L(Se=>Se+1))},[z,e.type]);const X=kt(ae=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",ae),ae&&Array.isArray(ae)?(T(ae),u==null||u(ae,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",ae)},[u]),V=wt(()=>{const ae=k==null?void 0:k.baseFontSize;return typeof ae=="number"&&!Number.isNaN(ae)?ae:o==="md"?14:12},[k,o]),Z=kt(ae=>{const Se={...ae,size:o,styles:B,eventsEmit:g,extraProps:z};return d?d(Se):UC(Se)},[d,o,B,g,z]),R=kt(ae=>{const Se={...ae,styles:B,onRetriveTagClick:v};return p?p(Se):XC(Se)},[p,B,v]);er(()=>(window.copyCodeFromData=ae=>{const Se=ae.getAttribute("data-code");if(!Se){console.error("No code content found");return}const J=Se.replace(/\\n/g,`
|
|
778
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(J).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=wt(()=>{var ae,Se;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(ae=W.content)==null?void 0:ae.length,basePath:n,hasImages:(Se=W.content)==null?void 0:Se.includes("![")});const J=Jg(W.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:J.length,hasImageElements:J.some(xe=>xe.type==="image"),imageElements:J.filter(xe=>xe.type==="image")}),J&&J.length>0)return U.jsx($u,{theme:k,$size:o,children:U.jsx(wu,{editor:M,initialValue:J,onChange:()=>{},children:U.jsx(Nu,{theme:k,children:U.jsx(xu,{renderElement:Z,renderLeaf:R,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${V}px`}})})},q)});const he={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let se=lr(W.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,(xe,ke,De)=>{const Be=De.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<pre><code${ke}>${De}</code><button class="code-copy-btn" data-code="${Be}" 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=(k==null?void 0:k.disabledBackground)||(k==null?void 0:k.backgroundColor)||"#ffffff",ue=(xe,ke)=>xe.startsWith("#")?`${xe}${Math.round(ke*255).toString(16).padStart(2,"0")}`:xe,Ce=`
|
|
779
|
+
<style>
|
|
780
|
+
.table-container{ overflow:auto; border:1px solid ${(k==null?void 0:k.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(k==null?void 0:k.backgroundColor)||"transparent"} !important; }
|
|
781
|
+
.table-container table{ background:${(k==null?void 0:k.backgroundColor)||"transparent"} !important; color:${(k==null?void 0:k.textColor)||"#24292f"} !important; }
|
|
782
|
+
.table-container th{ background:${(k==null?void 0:k.disabledBackground)||"#f6f8fa"} !important; color:${(k==null?void 0:k.textColor)||"#24292f"} !important; }
|
|
783
|
+
.table-container td{ color:${(k==null?void 0:k.textColor)||"#24292f"} !important; background:${(k==null?void 0:k.backgroundColor)||"transparent"} !important; }
|
|
784
|
+
.table-container tr:nth-child(even) td{ background:${(k==null?void 0:k.disabledBackground)||"#f6f8fa"} !important; }
|
|
785
|
+
pre{ position:relative; background:${te}; border:1px solid ${(k==null?void 0:k.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(k==null?void 0:k.textColor)||"#e5e7eb"}; }
|
|
786
|
+
pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${ue("#22c55e",.25)}, ${ue("#f59e0b",.25)}, ${ue("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
|
|
787
|
+
pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(k==null?void 0:k.borderColor)||"#e5e7eb"}; color:${(k==null?void 0:k.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
|
|
788
|
+
pre .code-copy-btn:hover{ background:${(k==null?void 0:k.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
789
|
+
</style>
|
|
790
|
+
`;return U.jsx("div",{style:{padding:(k==null?void 0:k.padding)||"1rem",fontSize:`${V}px`,lineHeight:1.6,color:(k==null?void 0:k.textColor)||"#24292f"},"data-pending-latex":W.hasPendingLatex||void 0,dangerouslySetInnerHTML:{__html:Ce+se}})}catch(J){return console.error("Markdown parsing error:",J),U.jsx("div",{children:e.content})}},[e,k,M,q,Z,R,V,W]),me=wt(()=>e.type!=="html"?null:U.jsx("div",{style:{padding:(k==null?void 0:k.padding)||"1rem",fontSize:`${V}px`,lineHeight:1.6,color:(k==null?void 0:k.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,k,V]),ye=wt(()=>e.type!=="text"?null:U.jsx("div",{style:{padding:(k==null?void 0:k.padding)||"1rem",fontSize:`${V}px`,lineHeight:1.6,color:(k==null?void 0:k.textColor)||"#24292f"},children:U.jsx("span",{children:e.content||""})}),[e,k,V]),ge=()=>{switch(e.type){case"markdown":return ie;case"html":return me;case"text":return ye;case"slate":default:return t?U.jsx($u,{theme:k,$size:o,children:U.jsx(wu,{editor:M,initialValue:_,onChange:X,children:U.jsx(Nu,{theme:k,children:U.jsx(xu,{renderElement:Z,renderLeaf:R,placeholder:r,readOnly:!1,onFocus:l,onBlur:f,style:{minHeight:"inherit",outline:"none",fontSize:`${V}px`}})})},q)}):U.jsx($u,{theme:k,$size:o,children:U.jsx(wu,{editor:M,initialValue:_,onChange:()=>{},children:U.jsx(Nu,{theme:k,children:U.jsx(xu,{renderElement:Z,renderLeaf:R,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${V}px`}})})},q)})}};return U.jsx(QC,{theme:k,$isEditing:t,className:D,style:m,children:ge()})};var N0={exports:{}},tD=N0.exports,J1;function rD(){return J1||(J1=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+)?$/,B=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,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])+"]"}},A=function(z,K,X){var V=String(z);return!V||V.length>=K?z:""+Array(K+1-V.length).join(X)+z},O={s:A,z:function(z){var K=-z.utcOffset(),X=Math.abs(K),V=Math.floor(X/60),Z=X%60;return(K<=0?"+":"-")+A(V,2,"0")+":"+A(Z,2,"0")},m:function z(K,X){if(K.date()<X.date())return-z(X,K);var V=12*(X.year()-K.year())+(X.month()-K.month()),Z=K.clone().add(V,v),R=X-Z<0,ie=K.clone().add(V+(R?-1:1),v);return+(-(V+(X-Z)/(R?Z-ie:ie-Z))||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}},k="en",P={};P[k]=F;var M="$isDayjsObject",_=function(z){return z instanceof Y||!(!z||!z[M])},T=function z(K,X,V){var Z;if(!K)return k;if(typeof K=="string"){var R=K.toLowerCase();P[R]&&(Z=R),X&&(P[R]=X,Z=R);var ie=K.split("-");if(!Z&&ie.length>1)return z(ie[0])}else{var me=K.name;P[me]=K,Z=me}return!V&&Z&&(k=Z),Z||!V&&k},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=T,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=T(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[M]=!0}var K=z.prototype;return K.parse=function(X){this.$d=(function(V){var Z=V.date,R=V.utc;if(Z===null)return new Date(NaN);if(L.u(Z))return new Date;if(Z instanceof Date)return new Date(Z);if(typeof Z=="string"&&!/Z$/i.test(Z)){var ie=Z.match(m);if(ie){var me=ie[2]-1||0,ye=(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,ye)):new Date(ie[1],me,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,ye)}}return new Date(Z)})(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,V){var Z=q(X);return this.startOf(V)<=Z&&Z<=this.endOf(V)},K.isAfter=function(X,V){return q(X)<this.startOf(V)},K.isBefore=function(X,V){return this.endOf(V)<q(X)},K.$g=function(X,V,Z){return L.u(X)?this[V]:this.set(Z,X)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(X,V){var Z=this,R=!!L.u(V)||V,ie=L.p(X),me=function(te,ue){var Ce=L.w(Z.$u?Date.UTC(Z.$y,ue,te):new Date(Z.$y,ue,te),Z);return R?Ce:Ce.endOf(d)},ye=function(te,ue){return L.w(Z.toDate()[te].apply(Z.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(ue)),Z)},ge=this.$W,ae=this.$M,Se=this.$D,J="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?Se-se:Se+(6-se),ae);case d:case x:return ye(J+"Hours",0);case f:return ye(J+"Minutes",1);case l:return ye(J+"Seconds",2);case u:return ye(J+"Milliseconds",3);default:return this.clone()}},K.endOf=function(X){return this.startOf(X,!1)},K.$set=function(X,V){var Z,R=L.p(X),ie="set"+(this.$u?"UTC":""),me=(Z={},Z[d]=ie+"Date",Z[x]=ie+"Date",Z[v]=ie+"Month",Z[b]=ie+"FullYear",Z[f]=ie+"Hours",Z[l]=ie+"Minutes",Z[u]=ie+"Seconds",Z[a]=ie+"Milliseconds",Z)[R],ye=R===d?this.$D+(V-this.$W):V;if(R===v||R===b){var ge=this.clone().set(x,1);ge.$d[me](ye),ge.init(),this.$d=ge.set(x,Math.min(this.$D,ge.daysInMonth())).$d}else me&&this.$d[me](ye);return this.init(),this},K.set=function(X,V){return this.clone().$set(X,V)},K.get=function(X){return this[L.p(X)]()},K.add=function(X,V){var Z,R=this;X=Number(X);var ie=L.p(V),me=function(ae){var Se=q(R);return L.w(Se.date(Se.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 ye=(Z={},Z[l]=n,Z[f]=o,Z[u]=r,Z)[ie]||1,ge=this.$d.getTime()+X*ye;return L.w(ge,this)},K.subtract=function(X,V){return this.add(-1*X,V)},K.format=function(X){var V=this,Z=this.$locale();if(!this.isValid())return Z.invalidDate||D;var R=X||"YYYY-MM-DDTHH:mm:ssZ",ie=L.z(this),me=this.$H,ye=this.$m,ge=this.$M,ae=Z.weekdays,Se=Z.months,J=Z.meridiem,he=function(ue,Ce,xe,ke){return ue&&(ue[Ce]||ue(V,R))||xe[Ce].slice(0,ke)},se=function(ue){return L.s(me%12||12,ue,"0")},te=J||function(ue,Ce,xe){var ke=ue<12?"AM":"PM";return xe?ke.toLowerCase():ke};return R.replace(B,(function(ue,Ce){return Ce||(function(xe){switch(xe){case"YY":return String(V.$y).slice(-2);case"YYYY":return L.s(V.$y,4,"0");case"M":return ge+1;case"MM":return L.s(ge+1,2,"0");case"MMM":return he(Z.monthsShort,ge,Se,3);case"MMMM":return he(Se,ge);case"D":return V.$D;case"DD":return L.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return he(Z.weekdaysMin,V.$W,ae,2);case"ddd":return he(Z.weekdaysShort,V.$W,ae,3);case"dddd":return ae[V.$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,ye,!0);case"A":return te(me,ye,!1);case"m":return String(ye);case"mm":return L.s(ye,2,"0");case"s":return String(V.$s);case"ss":return L.s(V.$s,2,"0");case"SSS":return L.s(V.$ms,3,"0");case"Z":return ie}return null})(ue)||ie.replace(":","")}))},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(X,V,Z){var R,ie=this,me=L.p(V),ye=q(X),ge=(ye.utcOffset()-this.utcOffset())*n,ae=this-ye,Se=function(){return L.m(ie,ye)};switch(me){case b:R=Se()/12;break;case v:R=Se();break;case g:R=Se()/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 Z?R:L.a(R)},K.daysInMonth=function(){return this.endOf(v).$D},K.$locale=function(){return P[this.$L]},K.locale=function(X,V){if(!X)return this.$L;var Z=this.clone(),R=T(X,V,!0);return R&&(Z.$L=R),Z},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})(),W=Y.prototype;return q.prototype=W,[["$ms",a],["$s",u],["$m",l],["$H",f],["$W",d],["$M",v],["$y",b],["$D",x]].forEach((function(z){W[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=T,q.isDayjs=_,q.unix=function(z){return q(1e3*z)},q.en=P[k],q.Ls=P,q.p={},q}))})(N0)),N0.exports}var nD=rD();const oD=Gs(nD);/**
|
|
791
|
+
* @license lucide-react v0.456.0 - ISC
|
|
792
|
+
*
|
|
793
|
+
* This source code is licensed under the ISC license.
|
|
794
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
795
|
+
*/const aD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zg=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
796
|
+
* @license lucide-react v0.456.0 - ISC
|
|
797
|
+
*
|
|
798
|
+
* This source code is licensed under the ISC license.
|
|
799
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
800
|
+
*/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"};/**
|
|
801
|
+
* @license lucide-react v0.456.0 - ISC
|
|
802
|
+
*
|
|
803
|
+
* This source code is licensed under the ISC license.
|
|
804
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
805
|
+
*/const sD=$o(({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:Zg("lucide",o),...l},[...u.map(([d,p])=>ds(d,p)),...Array.isArray(a)?a:[a]]));/**
|
|
806
|
+
* @license lucide-react v0.456.0 - ISC
|
|
807
|
+
*
|
|
808
|
+
* This source code is licensed under the ISC license.
|
|
809
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
810
|
+
*/const cn=(e,t)=>{const r=$o(({className:n,...o},a)=>ds(sD,{ref:a,iconNode:t,className:Zg(`lucide-${aD(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
811
|
+
* @license lucide-react v0.456.0 - ISC
|
|
812
|
+
*
|
|
813
|
+
* This source code is licensed under the ISC license.
|
|
814
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
815
|
+
*/const qa=cn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
816
|
+
* @license lucide-react v0.456.0 - ISC
|
|
817
|
+
*
|
|
818
|
+
* This source code is licensed under the ISC license.
|
|
819
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
820
|
+
*/const lD=cn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
821
|
+
* @license lucide-react v0.456.0 - ISC
|
|
822
|
+
*
|
|
823
|
+
* This source code is licensed under the ISC license.
|
|
824
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
825
|
+
*/const Va=cn("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
826
|
+
* @license lucide-react v0.456.0 - ISC
|
|
827
|
+
*
|
|
828
|
+
* This source code is licensed under the ISC license.
|
|
829
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
830
|
+
*/const uD=cn("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"}]]);/**
|
|
831
|
+
* @license lucide-react v0.456.0 - ISC
|
|
832
|
+
*
|
|
833
|
+
* This source code is licensed under the ISC license.
|
|
834
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
835
|
+
*/const cD=cn("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"}]]);/**
|
|
836
|
+
* @license lucide-react v0.456.0 - ISC
|
|
837
|
+
*
|
|
838
|
+
* This source code is licensed under the ISC license.
|
|
839
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
840
|
+
*/const dD=cn("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"}]]);/**
|
|
841
|
+
* @license lucide-react v0.456.0 - ISC
|
|
842
|
+
*
|
|
843
|
+
* This source code is licensed under the ISC license.
|
|
844
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
845
|
+
*/const fD=cn("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"}]]);/**
|
|
846
|
+
* @license lucide-react v0.456.0 - ISC
|
|
847
|
+
*
|
|
848
|
+
* This source code is licensed under the ISC license.
|
|
849
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
850
|
+
*/const hD=cn("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"}]]);/**
|
|
851
|
+
* @license lucide-react v0.456.0 - ISC
|
|
852
|
+
*
|
|
853
|
+
* This source code is licensed under the ISC license.
|
|
854
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
855
|
+
*/const pD=cn("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"}]]);/**
|
|
856
|
+
* @license lucide-react v0.456.0 - ISC
|
|
857
|
+
*
|
|
858
|
+
* This source code is licensed under the ISC license.
|
|
859
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
860
|
+
*/const mD=cn("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
861
|
+
* @license lucide-react v0.456.0 - ISC
|
|
862
|
+
*
|
|
863
|
+
* This source code is licensed under the ISC license.
|
|
864
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
865
|
+
*/const gD=cn("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"}]]);/**
|
|
866
|
+
* @license lucide-react v0.456.0 - ISC
|
|
867
|
+
*
|
|
868
|
+
* This source code is licensed under the ISC license.
|
|
869
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
870
|
+
*/const vD=cn("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"}]]);/**
|
|
871
|
+
* @license lucide-react v0.456.0 - ISC
|
|
872
|
+
*
|
|
873
|
+
* This source code is licensed under the ISC license.
|
|
874
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
875
|
+
*/const bD=cn("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"}]]);/**
|
|
876
|
+
* @license lucide-react v0.456.0 - ISC
|
|
877
|
+
*
|
|
878
|
+
* This source code is licensed under the ISC license.
|
|
879
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
880
|
+
*/const yD=cn("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"}]]);/**
|
|
881
|
+
* @license lucide-react v0.456.0 - ISC
|
|
882
|
+
*
|
|
883
|
+
* This source code is licensed under the ISC license.
|
|
884
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
885
|
+
*/const xD=cn("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"}]]),Tu=({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"})),Z1=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=Dt.div.attrs({className:"thought-chain-section-wrapper"})`
|
|
886
|
+
padding: 12px 0 8px 0;
|
|
887
|
+
`,SD=Dt.div.attrs({className:"thought-chain-section-title-row"})`
|
|
888
|
+
display: flex;
|
|
889
|
+
align-items: center;
|
|
890
|
+
gap: 8px;
|
|
891
|
+
margin-bottom: 8px;
|
|
892
|
+
padding-left: 20px;
|
|
893
|
+
`,kD=Wg`
|
|
894
|
+
from {
|
|
895
|
+
transform: rotate(0deg);
|
|
896
|
+
}
|
|
897
|
+
to {
|
|
898
|
+
transform: rotate(360deg);
|
|
899
|
+
}
|
|
900
|
+
`,BD=Dt.div.attrs({className:"thought-chain-section-icon"})`
|
|
901
|
+
width: 16px;
|
|
902
|
+
height: 16px;
|
|
903
|
+
flex-shrink: 0;
|
|
904
|
+
display: flex;
|
|
905
|
+
align-items: center;
|
|
906
|
+
justify-content: center;
|
|
907
|
+
|
|
908
|
+
svg {
|
|
909
|
+
width: 100%;
|
|
910
|
+
height: 100%;
|
|
911
|
+
${({$isRotating:e})=>e?ul`
|
|
912
|
+
animation: ${kD} 2s linear infinite;
|
|
913
|
+
`:""}
|
|
914
|
+
}
|
|
915
|
+
`,AD=Dt.div.attrs({className:"thought-chain-section-title"})`
|
|
916
|
+
font-size: 14px;
|
|
917
|
+
font-weight: 600;
|
|
918
|
+
color: #111827;
|
|
919
|
+
display: flex;
|
|
920
|
+
align-items: center;
|
|
921
|
+
gap: 6px;
|
|
922
|
+
`,FD=Dt.span.attrs({className:"thought-chain-section-time"})`
|
|
923
|
+
font-size: 12px;
|
|
924
|
+
font-weight: 400;
|
|
925
|
+
color: #6b7280;
|
|
926
|
+
`,$D=Dt.div.attrs({className:"thought-chain-vertical-line"})`
|
|
927
|
+
position: absolute;
|
|
928
|
+
left: 10px;
|
|
929
|
+
top: 0;
|
|
930
|
+
bottom: 0;
|
|
931
|
+
width: 2px;
|
|
932
|
+
background: #e5e7eb;
|
|
933
|
+
z-index: 0;
|
|
934
|
+
`,ND=Dt.div.attrs({className:"thought-chain-content-container"})`
|
|
935
|
+
position: relative;
|
|
936
|
+
padding-left: 0px;
|
|
937
|
+
margin-left:18px
|
|
938
|
+
`,TD=Dt.div.attrs({className:"thought-chain-node-item"})`
|
|
939
|
+
display: flex;
|
|
940
|
+
align-items: flex-start;
|
|
941
|
+
gap: 12px;
|
|
942
|
+
padding: 8px 0;
|
|
943
|
+
position: relative;
|
|
944
|
+
`,OD=Dt.div.attrs({className:"thought-chain-node-content-area"})`
|
|
945
|
+
flex: 1;
|
|
946
|
+
margin-left: 20px;
|
|
947
|
+
display: flex;
|
|
948
|
+
flex-direction: column;
|
|
949
|
+
gap: 4px;
|
|
950
|
+
`,Q1=Dt.div.attrs({className:"thought-chain-content-text-wrapper"})`
|
|
951
|
+
font-size: 13px;
|
|
952
|
+
line-height: 1.6;
|
|
953
|
+
color: #374151;
|
|
954
|
+
opacity: 0.7;
|
|
955
|
+
`;function MD(e){switch(e){case 1:return{label:"\u8FD0\u884C\u4E2D",color:"#2563eb",icon:Z1,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:Z1,isRotating:!1}}}const Ou=({title:e,content:t,nodes:r,mode:n="history"})=>{var d,p;if(!r||r.length===0)return null;const o=(d=r[0])==null?void 0:d.respTime,a=o&&o>0?`\xB7 ${(o/1e3).toFixed(2)} \u79D2`:"",u=((p=r[0])==null?void 0:p.nodeStatus)??3,l=MD(u),f=l.icon;return U.jsxs(ED,{children:[U.jsxs(SD,{children:[U.jsx(BD,{$isRotating:l.isRotating,children:U.jsx(f,{})}),U.jsxs(AD,{children:[e,a&&U.jsx(FD,{children:a})]})]}),U.jsxs(ND,{children:[U.jsx($D,{}),r.map(v=>{var b,x,D,m;const g=((b=v==null?void 0:v.rawContent)==null?void 0:b.type)==="markdown"||(v==null?void 0:v.format)==="markdown"||((x=v.content)==null?void 0:x.includes("```"))||((D=v.content)==null?void 0:D.includes("**"))||((m=v.content)==null?void 0:m.includes("##"));return U.jsx(TD,{children:U.jsx(OD,{children:v.content&&(g?U.jsx(Q1,{children:U.jsx(cl,{dataSource:{type:pi.MARKDOWN,content:v.content},styles:{text:{fontSize:"14px",lineHeight:"1.6",color:"#374151"}},theme:{baseFontSize:14,minHeight:"auto"}})}):U.jsx(Q1,{className:"px-[15px]",children:v.content}))})},v.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 BE(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="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAABCcAAAQnAEmzTo0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANzSURBVHgBlVbtUeMwEN2Vk5m7HwemgjMVwFVwUAAQKiAUcBAqwKmArwIIFRCgAKACoALcASEwcz/A2ntrSY5InB+nGU9sabX79PT0FKaodXrjjght4TXFM7KW7pOkfTc8/l5QQ+v0JC3LcdcYXtE5QlyIlaebs4VBiGEX+Dez8nlJIqtNiZhpwNzuh0IaL/JxCDBdam6FMe11ja8KbO2PLxHcYZLCGu4nQEIkqbXSQfodP2kkIv2EE7Fkc0WM+BGqDy1jpW4OCgsKcwZQd1cnC+vc6b2vWmsfNDkbi6pLxVcaXjJrTR4V8k1OjLE54kdT8anY5FkAANStGyrLtSqc6Go6uTbtuz5d7CqiiLIh+nrTyX38SEgu9L0sJTPR2ExwaJt7b8r3mlLCFVXU2fjz2qP5beSAoECZsP/gn02RuqFYX17FCB9YQwc+/kjpbZqDMVUVgaJHk1A51A9FpfxNB0Mt5+Edm3nOls4nY/aoqQDo9oXLR6OceX6hGtObIH9bg7pulZoJNCmqpy5Aa5t742e3Stc2euMuKlQq0v3jkAySvMXryJhymWx7B1I8rvNWCjO7w+Mfdy7+BXI0tyrHiJjcmNaFlY9bLaAK0ngOw+EskNug1CXGhnq5heTxCj2ouBV4FP0AZ2BXO2oVMZe7HCXXpMJBWZ+PNNPqvkJj/XumAJGrH6LqAiUlHfHJHb+yz1J/p7MF2lkcGw0gtpV9KaCbhGSHPrwP/RZKVyhopbU/nR70bAXUwWb0dPuxy6DIluv4VBvw3C3mGBwQJee1gkR62KMUMr2qUMFxgbobiqlimO3uFVSDuBWd5xWZV5u8uT9+djtfLsd2AfvuwtmOpJEiry7h/jCy51iR16cLSxw6QMsj0P+aTrK595oj1aFHqodyNLFp6cOT8uk54fxUZlfCYh0LdN+EUhNocf8J2XprAfqm5C6XPOmvml0rKeH7XDE11+zA7zZJ8uCQCwVrp/mt0ex+z4//RsJ6oXiE1fn4RvMBTcyO4wsCSzu4OVusLULvXGvfIVFRRaSVFFkp4Myh5GO1h/jO3t573ynJDsIqnRfB20GTc0bwzeAZl0YKqJEduxuMnCnmX264yZyMvD8FsDxBC0n6+7SehwsGK7swxgxnvchdpUiwhV1J4zlWqB+Y4Gn+3CUietyLeX9X/mfOP1bpFRs68mWiAAAAAElFTkSuQmCC",PD=Dt.div.attrs({className:"thought-chain-card-wrapper"})`
|
|
956
|
+
width: 100%;
|
|
957
|
+
border-radius: 8px;
|
|
958
|
+
background-color: #f9fafb;
|
|
959
|
+
padding: 12px 16px;
|
|
960
|
+
box-sizing: border-box;
|
|
961
|
+
`,zD=Dt.div.attrs({className:"thought-chain-card-header"})`
|
|
962
|
+
display: flex;
|
|
963
|
+
align-items: center;
|
|
964
|
+
justify-content: space-between;
|
|
965
|
+
cursor: pointer;
|
|
966
|
+
padding: 4px 0;
|
|
967
|
+
`,jD=Dt.div.attrs({className:"thought-chain-card-header-left"})`
|
|
968
|
+
display: flex;
|
|
969
|
+
align-items: center;
|
|
970
|
+
gap: 8px;
|
|
971
|
+
flex: 1;
|
|
972
|
+
`,_D=Wg`
|
|
973
|
+
from {
|
|
974
|
+
transform: rotate(0deg);
|
|
975
|
+
}
|
|
976
|
+
to {
|
|
977
|
+
transform: rotate(360deg);
|
|
978
|
+
}
|
|
979
|
+
`,LD=Dt.div.attrs({className:"thought-chain-card-avatar"})`
|
|
980
|
+
width: 25px;
|
|
981
|
+
height: 25px;
|
|
982
|
+
border-radius: 9999px;
|
|
983
|
+
display: flex;
|
|
984
|
+
align-items: center;
|
|
985
|
+
justify-content: center;
|
|
986
|
+
flex-shrink: 0;
|
|
987
|
+
overflow: hidden;
|
|
988
|
+
|
|
989
|
+
img {
|
|
990
|
+
width: 80%;
|
|
991
|
+
height: 80%;
|
|
992
|
+
object-fit: contain;
|
|
993
|
+
${({$isRotating:e})=>e?ul`
|
|
994
|
+
animation: ${_D} 2s linear infinite;
|
|
995
|
+
`:""}
|
|
996
|
+
}
|
|
997
|
+
`,HD=Dt.div.attrs({className:"thought-chain-card-header-title"})`
|
|
998
|
+
display: flex;
|
|
999
|
+
align-items: center;
|
|
1000
|
+
gap: 6px;
|
|
1001
|
+
`,KD=Dt.span.attrs({className:"thought-chain-card-header-main-text"})`
|
|
1002
|
+
font-size: 14px;
|
|
1003
|
+
font-weight: 600;
|
|
1004
|
+
color: #111827;
|
|
1005
|
+
`,qD=Dt.span.attrs({className:"thought-chain-card-header-sub-text"})`
|
|
1006
|
+
font-size: 14px;
|
|
1007
|
+
color: #6b7280;
|
|
1008
|
+
`,VD=Dt.div.attrs({className:"thought-chain-card-header-right"})`
|
|
1009
|
+
display: flex;
|
|
1010
|
+
align-items: center;
|
|
1011
|
+
flex-shrink: 0;
|
|
1012
|
+
`,WD=Dt.div.attrs({className:"thought-chain-card-body"})`
|
|
1013
|
+
margin-top: 12px;
|
|
1014
|
+
display: flex;
|
|
1015
|
+
flex-direction: column;
|
|
1016
|
+
gap: 0;
|
|
1017
|
+
`,UD=Dt.div.attrs({className:"thought-chain-card-empty-text"})`
|
|
1018
|
+
font-size: 12px;
|
|
1019
|
+
color: #9ca3af;
|
|
1020
|
+
`,XD=({nodes:e,mode:t="history",status:r,simpleThinkOnly:n=!1,chainRespTime:o})=>{const[a,u]=Ot(!1),l=wt(()=>{const b={};return(e||[]).forEach(x=>{b[x.businessType]||(b[x.businessType]=[]),b[x.businessType].push(x)}),b},[e]),f=wt(()=>typeof r=="number"?r===4:t==="live"?e.some(b=>b.nodeStatus===1):!1,[t,r,e]),d=wt(()=>!e||e.length===0?!1:t==="history"?e.every(b=>b.nodeStatus===2):e.every(b=>b.nodeStatus===2),[e,t]),p=wt(()=>f?"\u6B63\u5728\u601D\u8003\u4E2D":d?"\u601D\u8003\u5B8C\u6210":e&&e.length>0&&!d?"\u6B63\u5728\u601D\u8003\u4E2D":"",[f,d,e]);wt(()=>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=wt(()=>!o||o<=0?"":`\xB7 ${(o/1e3).toFixed(2)} \u79D2`,[o]);return U.jsxs(PD,{"data-mode":t,children:[U.jsxs(zD,{onClick:()=>u(b=>!b),children:[U.jsxs(jD,{children:[U.jsx(LD,{$isRotating:f,children:U.jsx("img",{src:ID,alt:"thinking"})}),U.jsxs(HD,{children:[U.jsx(KD,{children:p}),g&&d&&U.jsxs(qD,{children:["\u603B\u8BA1\u7528\u65F6",g]})]})]}),U.jsx(VD,{children:a?U.jsx(qa,{size:18,color:"#6b7280"}):U.jsx(Va,{size:18,color:"#6b7280"})})]}),!a&&U.jsxs(WD,{children:[!v&&U.jsx(UD,{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})]})]})},YD=({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(GD,{className:`knowledge-base-document-list ${o||""}`,style:a,$theme:f,children:[U.jsx(JD,{children:e.title}),e.subtitle&&U.jsxs(ZD,{children:[e.subtitle," (\u5171",e.totalCount,"\u4E2A):"]}),U.jsx(QD,{children:b.map((x,D)=>U.jsxs(eE,{onClick:()=>d(x),$theme:f,children:[g(x),U.jsx(tE,{children:x.name}),U.jsxs(rE,{children:["(",x.documentCount,")"]})]},x.id||D))}),e.showViewAll!==!1&&U.jsx(nE,{onClick:p,$theme:f,children:e.viewAllText||"\u67E5\u770B\u5168\u90E8>>"})]})},GD=Dt.div.attrs({className:"knowledge-base-document-list-container"})`
|
|
1021
|
+
margin-bottom: 16px;
|
|
1022
|
+
padding: 16px;
|
|
1023
|
+
margin-left:25px;
|
|
1024
|
+
|
|
1025
|
+
background: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1026
|
+
border-radius: 8px;
|
|
1027
|
+
`,JD=Dt.h3.attrs({className:"knowledge-base-document-list-title"})`
|
|
1028
|
+
font-size: 18px;
|
|
1029
|
+
font-weight: 600;
|
|
1030
|
+
color: #1f2937;
|
|
1031
|
+
margin: 0 0 8px 0;
|
|
1032
|
+
`,ZD=Dt.div.attrs({className:"knowledge-base-document-list-subtitle"})`
|
|
1033
|
+
font-size: 14px;
|
|
1034
|
+
color: #6b7280;
|
|
1035
|
+
margin-bottom: 12px;
|
|
1036
|
+
`,QD=Dt.div.attrs({className:"knowledge-base-document-list-category-list"})`
|
|
1037
|
+
display: flex;
|
|
1038
|
+
flex-direction: column;
|
|
1039
|
+
gap: 8px;
|
|
1040
|
+
margin-bottom: 12px;
|
|
1041
|
+
`,eE=Dt.div.attrs({className:"knowledge-base-document-list-category-item"})`
|
|
1042
|
+
display: flex;
|
|
1043
|
+
align-items: center;
|
|
1044
|
+
gap: 8px;
|
|
1045
|
+
padding: 8px 0;
|
|
1046
|
+
cursor: pointer;
|
|
1047
|
+
transition: all 0.2s ease;
|
|
1048
|
+
|
|
1049
|
+
&:hover {
|
|
1050
|
+
opacity: 0.8;
|
|
1051
|
+
}
|
|
1052
|
+
`,tE=Dt.span.attrs({className:"knowledge-base-document-list-category-name"})`
|
|
1053
|
+
font-size: 14px;
|
|
1054
|
+
color: #1f2937;
|
|
1055
|
+
`,rE=Dt.span.attrs({className:"knowledge-base-document-list-category-count"})`
|
|
1056
|
+
font-size: 14px;
|
|
1057
|
+
color: #6b7280;
|
|
1058
|
+
`,nE=Dt.a.attrs({className:"knowledge-base-document-list-view-all"})`
|
|
1059
|
+
display: inline-block;
|
|
1060
|
+
font-size: 14px;
|
|
1061
|
+
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1062
|
+
text-decoration: none;
|
|
1063
|
+
cursor: pointer;
|
|
1064
|
+
transition: color 0.2s ease;
|
|
1065
|
+
|
|
1066
|
+
&:hover {
|
|
1067
|
+
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#2563eb"}};
|
|
1068
|
+
text-decoration: underline;
|
|
1069
|
+
}
|
|
1070
|
+
`;function Mu(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(je.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 oE(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 aE(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 iE=Dt.div.attrs({className:"chat-message-container"})`
|
|
1071
|
+
display: flex;
|
|
1072
|
+
flex-direction: column;
|
|
1073
|
+
margin-bottom: 0.5rem;
|
|
1074
|
+
animation: fadeIn 0.3s ease-in-out;
|
|
1075
|
+
width: 100%;
|
|
1076
|
+
text-wrap: wrap;
|
|
1077
|
+
|
|
1078
|
+
${e=>e.$align==="right"&&`
|
|
1079
|
+
align-items: flex-end;
|
|
1080
|
+
`}
|
|
1081
|
+
|
|
1082
|
+
${e=>e.$align==="center"&&`
|
|
1083
|
+
align-items: center;
|
|
1084
|
+
`}
|
|
1085
|
+
|
|
1086
|
+
@keyframes fadeIn {
|
|
1087
|
+
from {
|
|
1088
|
+
opacity: 0;
|
|
1089
|
+
transform: translateY(10px);
|
|
1090
|
+
}
|
|
1091
|
+
to {
|
|
1092
|
+
opacity: 1;
|
|
1093
|
+
transform: translateY(0);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
`,sE=Dt.div.attrs({className:"chat-message-header"})`
|
|
1097
|
+
display: flex;
|
|
1098
|
+
align-items: center;
|
|
1099
|
+
gap: 0.25rem;
|
|
1100
|
+
margin-bottom: 0.5rem;
|
|
1101
|
+
width: 100%;
|
|
1102
|
+
|
|
1103
|
+
${e=>e.$isUser&&`
|
|
1104
|
+
flex-direction: row-reverse;
|
|
1105
|
+
justify-content: end;
|
|
1106
|
+
`}
|
|
1107
|
+
`,lE=Dt.div.attrs({className:"chat-message-avatar"})`
|
|
1108
|
+
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
1109
|
+
border-radius: 50%;
|
|
1110
|
+
width: 2rem;
|
|
1111
|
+
height: 2rem;
|
|
1112
|
+
flex-shrink: 0;
|
|
1113
|
+
display: flex;
|
|
1114
|
+
align-items: center;
|
|
1115
|
+
justify-content: center;
|
|
1116
|
+
font-size: 1rem;
|
|
1117
|
+
`,uE=Dt.div.attrs({className:"chat-message-content"})`
|
|
1118
|
+
width: 100%;
|
|
1119
|
+
.message-time {
|
|
1120
|
+
font-size: 0.75rem;
|
|
1121
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
.message-card {
|
|
1125
|
+
background: ${e=>e.$isUser?"linear-gradient(180deg, #E3ECFF 0%, #EEEBFF 100%)":"#ffffff"};
|
|
1126
|
+
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
1127
|
+
border-radius: 0.5rem;
|
|
1128
|
+
padding-top: 12px;
|
|
1129
|
+
padding-bottom: 12px;
|
|
1130
|
+
overflow: hidden;
|
|
1131
|
+
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
1132
|
+
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
1133
|
+
margin-right: ${e=>e.$isUser?"40px":"0"};
|
|
1134
|
+
padding: 0.25rem 1.8rem;
|
|
1135
|
+
.message-text {
|
|
1136
|
+
width: 100%;
|
|
1137
|
+
line-height: 1.6;
|
|
1138
|
+
white-space: pre-wrap !important; /* 保留换行和空格格式,使用 !important 确保优先级 */
|
|
1139
|
+
border-radius: 0.5rem;
|
|
1140
|
+
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
1141
|
+
font-size: 0.875rem;
|
|
1142
|
+
|
|
1143
|
+
/* 确保子元素也继承 white-space 属性 */
|
|
1144
|
+
& > * {
|
|
1145
|
+
white-space: pre-wrap !important;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
`,cE=Dt.div.attrs({className:"chat-message-actions-container"})`
|
|
1150
|
+
margin-top: 0.5rem;
|
|
1151
|
+
display: flex;
|
|
1152
|
+
padding: 0.5rem;
|
|
1153
|
+
align-items: center;
|
|
1154
|
+
|
|
1155
|
+
gap: 0.75rem;
|
|
1156
|
+
|
|
1157
|
+
button {
|
|
1158
|
+
display: flex;
|
|
1159
|
+
align-items: center;
|
|
1160
|
+
gap: 0.25rem;
|
|
1161
|
+
font-size: 0.875rem;
|
|
1162
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1163
|
+
background: none;
|
|
1164
|
+
border: none;
|
|
1165
|
+
cursor: pointer;
|
|
1166
|
+
transition: color 0.2s;
|
|
1167
|
+
|
|
1168
|
+
&:hover {
|
|
1169
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
&.active {
|
|
1173
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
`,dE=Dt.div.attrs({className:"chat-message-follow-up-container"})`
|
|
1177
|
+
margin-top: 1rem;
|
|
1178
|
+
padding: 0 2.9rem;
|
|
1179
|
+
|
|
1180
|
+
border-radius: 0.5rem;
|
|
1181
|
+
|
|
1182
|
+
@keyframes followUpIn {
|
|
1183
|
+
from {
|
|
1184
|
+
opacity: 0;
|
|
1185
|
+
transform: translateY(6px);
|
|
1186
|
+
}
|
|
1187
|
+
to {
|
|
1188
|
+
opacity: 1;
|
|
1189
|
+
transform: translateY(0);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.follow-up-title {
|
|
1194
|
+
font-size: 0.875rem;
|
|
1195
|
+
font-weight: 600;
|
|
1196
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1197
|
+
margin-bottom: 0.75rem;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
.follow-up-list {
|
|
1201
|
+
display: flex;
|
|
1202
|
+
flex-direction: column;
|
|
1203
|
+
gap: 0.5rem;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
.follow-up-item {
|
|
1207
|
+
width: fit-content;
|
|
1208
|
+
background: #ffffff;
|
|
1209
|
+
border: 1px solid #e5e7eb;
|
|
1210
|
+
border-radius: 0.375rem;
|
|
1211
|
+
padding: 0.75rem 1rem;
|
|
1212
|
+
cursor: pointer;
|
|
1213
|
+
transition: all 0.2s ease;
|
|
1214
|
+
text-align: left;
|
|
1215
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1216
|
+
font-size: 0.875rem;
|
|
1217
|
+
line-height: 1.4;
|
|
1218
|
+
opacity: 0;
|
|
1219
|
+
transform: translateY(6px);
|
|
1220
|
+
animation: followUpIn 280ms ease forwards;
|
|
1221
|
+
animation-play-state: running;
|
|
1222
|
+
|
|
1223
|
+
&:hover {
|
|
1224
|
+
background: #e5e7eb;
|
|
1225
|
+
border-color: #d1d5db;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
&:active {
|
|
1229
|
+
transform: translateY(1px);
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
`,Gi=Dt.div.attrs({className:"chat-message-reference-container"})`
|
|
1233
|
+
padding: 1rem;
|
|
1234
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1235
|
+
|
|
1236
|
+
border-radius: 0.5rem;
|
|
1237
|
+
|
|
1238
|
+
.reference-title {
|
|
1239
|
+
font-size: 0.875rem;
|
|
1240
|
+
font-weight: 600;
|
|
1241
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1242
|
+
margin-bottom: 0.75rem;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.reference-list {
|
|
1246
|
+
display: flex;
|
|
1247
|
+
flex-direction: column;
|
|
1248
|
+
gap: 0.5rem;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
.reference-item {
|
|
1252
|
+
background: #ffffff;
|
|
1253
|
+
|
|
1254
|
+
border-radius: 0.375rem;
|
|
1255
|
+
padding: 0.75rem 0;
|
|
1256
|
+
display: flex;
|
|
1257
|
+
align-items: center;
|
|
1258
|
+
gap: 0.5rem;
|
|
1259
|
+
|
|
1260
|
+
.file-icon {
|
|
1261
|
+
width: 2rem;
|
|
1262
|
+
height: 2rem;
|
|
1263
|
+
background: #e2e8f0;
|
|
1264
|
+
border-radius: 0.25rem;
|
|
1265
|
+
display: flex;
|
|
1266
|
+
align-items: center;
|
|
1267
|
+
justify-content: center;
|
|
1268
|
+
font-size: 0.75rem;
|
|
1269
|
+
color: #64748b;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
.file-info {
|
|
1273
|
+
flex: 1;
|
|
1274
|
+
|
|
1275
|
+
.file-name {
|
|
1276
|
+
font-size: 0.875rem;
|
|
1277
|
+
font-weight: 500;
|
|
1278
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1279
|
+
margin-bottom: 0.25rem;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.file-meta {
|
|
1283
|
+
font-size: 0.75rem;
|
|
1284
|
+
color: #64748b;
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
.file-score {
|
|
1289
|
+
font-size: 0.75rem;
|
|
1290
|
+
color: #059669;
|
|
1291
|
+
font-weight: 500;
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
`,fE=Dt.div.attrs({className:"chat-message-image-preview-modal"})`
|
|
1295
|
+
position: fixed;
|
|
1296
|
+
top: 0;
|
|
1297
|
+
left: 0;
|
|
1298
|
+
right: 0;
|
|
1299
|
+
bottom: 0;
|
|
1300
|
+
background: rgba(0, 0, 0, 0.8);
|
|
1301
|
+
display: ${e=>e.$show?"flex":"none"};
|
|
1302
|
+
align-items: center;
|
|
1303
|
+
justify-content: center;
|
|
1304
|
+
z-index: 1000;
|
|
1305
|
+
cursor: pointer;
|
|
1306
|
+
|
|
1307
|
+
.modal-content {
|
|
1308
|
+
max-width: 90vw;
|
|
1309
|
+
max-height: 90vh;
|
|
1310
|
+
position: relative;
|
|
1311
|
+
cursor: default;
|
|
1312
|
+
display: flex;
|
|
1313
|
+
flex-direction: column;
|
|
1314
|
+
align-items: center;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
.modal-image {
|
|
1318
|
+
max-width: 100%;
|
|
1319
|
+
max-height: calc(90vh - 60px);
|
|
1320
|
+
object-fit: contain;
|
|
1321
|
+
border-radius: 8px;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
.modal-close {
|
|
1325
|
+
margin-top: 16px;
|
|
1326
|
+
background: rgba(255, 255, 255, 0.3);
|
|
1327
|
+
border: none;
|
|
1328
|
+
border-radius: 20px;
|
|
1329
|
+
padding: 8px 20px;
|
|
1330
|
+
display: flex;
|
|
1331
|
+
align-items: center;
|
|
1332
|
+
justify-content: center;
|
|
1333
|
+
cursor: pointer;
|
|
1334
|
+
font-size: 14px;
|
|
1335
|
+
color: #333;
|
|
1336
|
+
font-weight: 500;
|
|
1337
|
+
transition: all 0.2s ease;
|
|
1338
|
+
|
|
1339
|
+
&:hover {
|
|
1340
|
+
background: rgba(255, 255, 255, 1);
|
|
1341
|
+
transform: translateY(-1px);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
`,Ru=Dt.div.attrs({className:"chat-message-image-gallery-container"})`
|
|
1345
|
+
padding: 0rem 0.5rem;
|
|
1346
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1347
|
+
|
|
1348
|
+
.gallery-grid {
|
|
1349
|
+
display: grid;
|
|
1350
|
+
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
1351
|
+
gap: 0.75rem;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
.gallery-item {
|
|
1355
|
+
position: relative;
|
|
1356
|
+
aspect-ratio: 1;
|
|
1357
|
+
border-radius: 0.375rem;
|
|
1358
|
+
overflow: hidden;
|
|
1359
|
+
cursor: pointer;
|
|
1360
|
+
transition:
|
|
1361
|
+
transform 0.2s ease,
|
|
1362
|
+
box-shadow 0.2s ease;
|
|
1363
|
+
border: 2px solid transparent;
|
|
1364
|
+
|
|
1365
|
+
&:hover {
|
|
1366
|
+
transform: translateY(-2px);
|
|
1367
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1368
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
.gallery-image {
|
|
1372
|
+
width: 100%;
|
|
1373
|
+
height: 100%;
|
|
1374
|
+
object-fit: cover;
|
|
1375
|
+
background: #f3f4f6;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
.gallery-overlay {
|
|
1379
|
+
position: absolute;
|
|
1380
|
+
bottom: 0;
|
|
1381
|
+
left: 0;
|
|
1382
|
+
right: 0;
|
|
1383
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1384
|
+
color: white;
|
|
1385
|
+
padding: 0.5rem;
|
|
1386
|
+
font-size: 0.75rem;
|
|
1387
|
+
text-align: center;
|
|
1388
|
+
opacity: 0;
|
|
1389
|
+
transition: opacity 0.2s ease;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
&:hover .gallery-overlay {
|
|
1393
|
+
opacity: 1;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
`,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:B,webReference:F,databaseReference:A,graphReference:O,filePaths:k,currentFiles:P,fileManagerData:M,audioUrl:_,feedbackResult:T,queryId:q,defaultAnswer:L,isWelcome:Y=!1,isLast:W=!1,respTime:z,tokens:K,resultType:X,followUpQuestions:V=[],tools:Z={},eventsEmit:R,referenceMode:ie="list",enableThoughtChain:me=!1,thoughtChainVersionMode:ye="auto",chain:ge,thoughtChainNodes:ae,knowledgeBases:Se,enableCot:J,chainRespTime:he,thoughtChainStatus:se})=>{er(()=>{console.log("isUser",f),console.log("isLast",W)},[W,f]);const te=Hs(),ue=wt(()=>{var ce,Te,st,Le,de,Ue,Ve,lt,le,we,Ee;return{colors:{primary:((ce=te==null?void 0:te.colors)==null?void 0:ce.primary)||"#3b82f6",background:((Te=te==null?void 0:te.colors)==null?void 0:Te.background)||"#ffffff",userBackground:((st=te==null?void 0:te.colors)==null?void 0:st.primary)||"#3b82f6",border:((Le=te==null?void 0:te.colors)==null?void 0:Le.border)||"#e5e7eb",text:((de=te==null?void 0:te.colors)==null?void 0:de.text)||"#374151",disabled:((Ue=te==null?void 0:te.colors)==null?void 0:Ue.disabled)||"#6b7280",info:((Ve=te==null?void 0:te.colors)==null?void 0:Ve.info)||"#3b82f6",warning:((lt=te==null?void 0:te.colors)==null?void 0:lt.warning)||"#f59e0b",error:((le=te==null?void 0:te.colors)==null?void 0:le.error)||"#ef4444",...(we=m==null?void 0:m.theme)==null?void 0:we.colors},icons:{aiAvatar:p||"/vite.svg",userAvatar:d||"/default-user-avatar.png",...(Ee=m==null?void 0:m.theme)==null?void 0:Ee.icons}}},[te,m,p,d]),Ce=wt(()=>{const ce=g||v||b;return!ce||!x?null:oD(ce).format("YY-MM-DD HH:mm:ss")},[g,v,b,x]),[xe,ke]=Ot([]),[De,Be]=Ot(null),[Ne,Me]=Ot(!1),[He,ft]=Ot(!1),[ot,Oe]=Ot(!1),[_e,We]=Ot(!1),[ct,at]=Ot(!1),Qe=(ce,Te)=>{switch(console.log("handleImageClick",ce,Te),ce){case"imageClick":Be(Te);break}},Nt=wt(()=>{if(!me)return[];if(ye==="v1")return[];if(Array.isArray(ae)&&ae.length)return ae;const ce=ge||(n==null?void 0:n.chain),Te=RD(ce);return J===0?Te.filter(st=>st.businessType==="think"):Te},[me,ye,ae,ge,n,J]),Ct=()=>{if(me&&ye!=="v1")return null;const ce={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}"},Te=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:ce.icon}),U.jsx("div",{className:"think-title",children:ce.text}),Te&&U.jsx("div",{className:"think-time",children:Te}),Mr&&U.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{at(!ct)},children:U.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:ct?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:U.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},mt=()=>{if(!me||ye==="v1"||f||!Nt.length)return null;const ce=se!==void 0?se===4?4:2:u==="ready"?2:1,Te=J===0;return U.jsx("div",{className:"thought-chain-wrapper ml-[16px] mr-[16px] mt-2",children:U.jsx(XD,{mode:o==="stream"?"live":"history",nodes:Nt,status:ce,simpleThinkOnly:Te,chainRespTime:he})})},[dt,Pe]=Ot([]),[fe,gt]=Ot(null),St=wt(()=>{try{if(!B)return[];const ce=JSON.parse(B);return Array.isArray(ce)?ce:[]}catch{return[]}},[B]),Ft=(ce,Te)=>{var Ve,lt,le;const st=((Ve=ce==null?void 0:ce.metadata)==null?void 0:Ve.source)||(ce==null?void 0:ce.file_path)||(ce==null?void 0:ce.path)||(ce==null?void 0:ce.convertedFilePath)||(ce==null?void 0:ce.parsedFilePath)||"",Le=((lt=ce==null?void 0:ce.metadata)==null?void 0:lt.title)||(ce==null?void 0:ce.file_name)||"",de=((le=ce==null?void 0:ce.metadata)==null?void 0:le.id)||(ce==null?void 0:ce.id)||(ce==null?void 0:ce.file_id)||"",Ue=St.find(we=>{var Wt,Mt,ut;const Ee=((Wt=we==null?void 0:we.metadata)==null?void 0:Wt.source)||(we==null?void 0:we.file_path)||(we==null?void 0:we.path)||(we==null?void 0:we.convertedFilePath)||(we==null?void 0:we.parsedFilePath)||"",Ge=((Mt=we==null?void 0:we.metadata)==null?void 0:Mt.title)||(we==null?void 0:we.file_name)||"",vt=((ut=we==null?void 0:we.metadata)==null?void 0:ut.id)||(we==null?void 0:we.id)||"";return de&&vt&&String(de)===String(vt)||st&&Ee&&Ee===st||Le&&Ge&&Ge===Le});if(Ue){const we=(Ue!=null&&Ue.references&&Array.isArray(Ue.references)?Ue.references:[Ue]).find(Ee=>String(Ee.order_num)===String(Te)||String(Ee.id)===String(Te));if(we)return we}for(const we of St){if(we!=null&&we.references&&Array.isArray(we.references)){const Ee=we.references.find(Ge=>String(Ge.order_num)===String(Te)||String(Ge.id)===String(Te));if(Ee)return Ee}if(String(we.order_num)===String(Te)||String(we.id)===String(Te))return we}return null},Et=(ce,Te)=>{function st(lt,le){for(const we of lt){if(we.references&&Array.isArray(we.references)){const Ee=we.references.find(Ge=>String(Ge.order_num)===String(le)||String(Ge.id)===String(le));if(Ee)return Ee}if(String(we.order_num)===String(le)||String(we.id)===String(le))return we}return null}let Le=[];try{B&&(Le=JSON.parse(B))}catch(lt){console.error("Failed to parse reference:",lt)}const de=st(Le,ce.id),Ue=lt=>{if(typeof n!="string")return;const le=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${lt}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(le&&le[1]){const we=Number(le[1]);return Number.isNaN(we)?void 0:we}},Ve={tagInfo:{id:ce==null?void 0:ce.id,index:Ue(String(ce==null?void 0:ce.id)),image_urls:(ce==null?void 0:ce.imageUrls)||(ce==null?void 0:ce.image_urls)||[]},fromtype:String((ce==null?void 0:ce.fromtype)??""),leaf:ce,attributes:Te,referenceDoc:de||void 0};if(String(ce==null?void 0:ce.fromtype)==="2"&&O)try{const lt=JSON.parse(O||"[]"),le=(Array.isArray(lt)?lt:[]).find(we=>{if(Array.isArray(we==null?void 0:we.traceNodes))return we.traceNodes.some(Ge=>String(Ge==null?void 0:Ge.id)===String(ce.id));const Ee=String(ce.id||"").split("_")[0];return String(we==null?void 0:we.id)===Ee});le&&(Ve.graph={id:le.id,graphName:le.graphName,fetchUrl:le.fetchUrl,cyphers:le.cyphers},Ve.traceNode=Array.isArray(le.traceNodes)?le.traceNodes.find(we=>String(we==null?void 0:we.id)===String(ce.id)):void 0)}catch{}R==null||R("action_retrive_tag",Ve),R==null||R("retrive_tag:click",Ve)},or=ce=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",ce),console.log("databaseReference available:",!!A),ce.id&&A){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",A);const Te=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:ce.id,databaseReference:A}});console.log("Dispatching event:",Te),window.dispatchEvent(Te)}else console.log("Cannot send response - missing id or databaseReference")};je.useEffect(()=>{const ce=Te=>{or(Te.detail)};return window.addEventListener("retrieve-sql-data:request-data",ce),()=>{window.removeEventListener("retrieve-sql-data:request-data",ce)}},[A]),je.useEffect(()=>{const ce=Te=>{Bt(Te.detail)};return window.addEventListener("rtext_pagination_click",ce),()=>{window.removeEventListener("rtext_pagination_click",ce)}},[fe]);const Bt=ce=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",ce),ce.replacePredataFunction&&fe){const Te={...fe,rows:fe.rows};ce.replacePredataFunction(Te)}R==null||R("rtext_pagination_click",ce)},Rt=Lt(new Map),tr=Lt(1),ur=Lt(""),At=Lt({0:1,1:1,2:1,3:1}),Ht=wt(()=>{if(typeof n=="string"){let ce=n;const Te=[];return q&&q!==ur.current&&(Rt.current.clear(),tr.current=1,At.current={0:1,1:1,2:1,3:1},ur.current=q),o==="stream"&&(ce=ce.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(st,Le)=>{const de=Le.match(/id=['"]([^'"]+)['"]/),Ue=Le.match(/fromType=['"]([^'"]+)['"]/);if(de){const Ve=de[1],lt=Ue?Ue[1]:"0";if(!Rt.current.has(Ve)){const we=At.current,Ee=lt==="1"?"1":lt==="2"?"2":lt==="3"?"3":"0",Ge=we[Ee]??1;Rt.current.set(Ve,Ge),we[Ee]=Ge+1,At.current=we}const le=Rt.current.get(Ve);return`[retrive-tag${Le}][${le}][/retrive-tag]`}return st})),ce=ce.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,st=>{const Le=st.match(/image_urls=['"]([^'"]+)['"]/);if(Le){const de=Le[1].split(";").map(Ue=>Ue.trim()).filter(Boolean);Te.push(...de)}return st}),Te.length>0&&ke(Te),ce}return n},[n,o,q]),jt=wt(()=>{if(typeof Ht=="string")try{return Jg(Ht)}catch(ce){return console.error("Failed to deserialize markdown:",ce),[]}return[]},[Ht]),Cr=kt(ce=>{if(!(!ce||typeof Ht!="string"))try{const Te=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ce}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Ht);if(Te&&Te[1]){const st=Number(Te[1]);return Number.isNaN(st)?Te[1]:st}}catch{}},[Ht]),zr=wt(()=>aE(jt||[]),[jt]),jr=wt(()=>{const ce={};return zr.forEach(Te=>{Te!=null&&Te.id&&!ce[Te.id]&&(ce[Te.id]=Te.index)}),ce},[zr]);er(()=>{try{o==="stream"&&A&&(ce=>{try{const Te=typeof ce=="string"?JSON.parse(ce):ce;return Te?Array.isArray(Te)?Te:[Te]:[]}catch{return[]}})(A).forEach(ce=>{const Te=ce==null?void 0:ce.id;if(!Te)return;const st=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Te,databaseReference:ce}});window.dispatchEvent(st)})}catch{}},[o,A]);const Mr=wt(()=>{if(!Array.isArray(jt))return!1;const ce=st=>{for(const Le of st)if(Le.type==="think"||Array.isArray(Le.children)&&ce(Le.children))return!0;return!1},Te=ce(jt);return console.log("Think detection:",{slateContent:jt,hasThinkElement:Te,displayStatus:u,isUser:f}),Te},[jt,u,f]),vr=wt(()=>({databaseReference:A,...Mr&&{isThinkCollapsed:ct}}),[A,Mr,ct]),pr=wt(()=>l||(f?ue.icons.userAvatar:ue.icons.aiAvatar),[l,f,ue.icons]),_t=wt(()=>typeof n=="string"?n:Array.isArray(n)?n.map(ce=>typeof ce=="string"?ce:ce.text||"").join(""):L||"",[n,L]),w=()=>{if(Y)return null;const ce=[{key:"copy",show:Z.copy!==!1,icon:uD,label:"\u590D\u5236",onClick:()=>R==null?void 0:R("chatbox:copy",{content:_t})},{key:"like",show:Z.like!==!1,icon:yD,label:"\u8D5E",onClick:()=>R==null?void 0:R("chatbox:like",{result:T,queryId:q}),active:T===1},{key:"dislike",show:Z.dislike!==!1,icon:bD,label:"\u8E29",onClick:()=>R==null?void 0:R("chatbox:dislike",{result:T,queryId:q}),active:T===0},{key:"repeat",show:!f&&W,icon:gD,label:"\u91CD\u590D",onClick:()=>R==null?void 0:R("chatbox:repeat",{content:n,queryId:q,filePaths:k,audioUrl:_})},{key:"forward",show:Z.forward,icon:vD,label:"\u8F6C\u53D1",onClick:()=>R==null?void 0:R("chatbox:forward",{content:_t,queryId:q})},{key:"delete",show:Z.delete,icon:xD,label:"\u5220\u9664",onClick:()=>R==null?void 0:R("chatbox:delete",{queryId:q})},{key:"edit",show:Z.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(cE,{$theme:ue,children:ce.filter(Te=>Te.show).map(Te=>{const st=Te.icon;return U.jsx(hs,{title:Te.label,placement:"top",children:U.jsx("button",{className:Te.active?"active":"",onClick:Te.onClick,children:U.jsx(st,{size:18})})},Te.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:ue.colors.primary},children:K||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",U.jsx("span",{style:{color:ue.colors.primary},children:Math.round((z||0)/1e3)}),"\u79D2"]})]})},E=wt(()=>{if(!B)return[];let ce=[];try{const de=JSON.parse(B);ce=Array.isArray(de)?de:[]}catch{return[]}let Te=ce.map(de=>{var Ue;try{const Ve=de.metadata||{};let lt="";Ve.type==="video"&&Ve.source_name&&typeof Ve.source_name=="string"?lt=Ve.source_name:de.name&&typeof de.name=="string"?lt=de.name:de.file_name&&typeof de.file_name=="string"?lt=de.file_name:Ve.title&&typeof Ve.title=="string"?lt=Ve.title:Ve.source&&typeof Ve.source=="string"?lt=Ve.source.split("/").pop()||"":de.order_num?lt=String(de.order_num):lt="\u672A\u77E5\u6587\u6863";let le="pdf";if(Ve.type&&typeof Ve.type=="string")le=Ve.type.toLowerCase();else if(de.name&&typeof de.name=="string"){const Mt=de.name.split(".").pop();Mt&&(le=Mt.toLowerCase())}else if(Ve.source&&typeof Ve.source=="string"){const Mt=Ve.source.split(".").pop();Mt&&(le=Mt.toLowerCase())}else if(de.file_path&&typeof de.file_path=="string"){const Mt=de.file_path.split(".").pop();Mt&&(le=Mt.toLowerCase())}const we=de.parsedFilePath||Ve.file_path||de.file_path||de.convertedFilePath||Ve.link||Ve.source_link||"",{metadata:Ee,...Ge}=de,vt=Ve.source||"",Wt=Yi(de.score??Ve.score);return{file_id:Ve.id||de.uid||"",file_name:lt,file_type:le,path:we,score:Wt,tags:[],parsedFilePath:de.parsedFilePath,source:vt,...Ge}}catch(Ve){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Ve,de);const{metadata:lt,...le}=de,we=((Ue=de.metadata)==null?void 0:Ue.source)||de.file_path||de.convertedFilePath||"",Ee=Yi(de.score);return{file_id:de.uid||"",file_name:de.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:de.convertedFilePath||de.file_path||"",score:Ee,tags:[],parsedFilePath:de.parsedFilePath,source:we,...le}}});const st=oa(jt||[]);if(st&&st.length){const de=st.filter(Ve=>Ve.fromtype==="0"),Ue=st.filter(Ve=>Ve.fromtype==="3");Te=Te.map(Ve=>{const lt=de.map(we=>{var Wt;const Ee=ce.find(Mt=>String(Mt.order_num)===String(we.id));if(!Ee||!((Wt=Ee==null?void 0:Ee.metadata)!=null&&Wt.source))return null;const Ge=Ve.source||"",vt=Ee.metadata.source||"";return Ge&&vt&&Ge!==vt?null:{id:we.id||"",index:Cr(String(we.id))||we.indexId||"",image_urls:we.imageUrls?Array.isArray(we.imageUrls)?we.imageUrls:[we.imageUrls]:we.image_urls?we.image_urls.split(";").map(Mt=>Mt.trim()).filter(Boolean):[],metadata:Ee.metadata||{},order_num:Ee.order_num,parsedFilePath:Ee.parsedFilePath}}).filter(we=>we!==null),le=Ue.map(we=>{var Wt;const Ee=ce.find(Mt=>String(Mt.order_num)===String(we.id));if(!Ee||!((Wt=Ee==null?void 0:Ee.metadata)!=null&&Wt.source))return null;const Ge=Ve.source||"",vt=Ee.metadata.source||"";return Ge&&vt&&Ge!==vt?null:{id:we.id||"",index:Cr(String(we.id))||we.indexId||"",image_urls:we.imageUrls?Array.isArray(we.imageUrls)?we.imageUrls:[we.imageUrls]:we.image_urls?we.image_urls.split(";").map(Mt=>Mt.trim()).filter(Boolean):[],metadata:Ee.metadata||{},order_num:Ee.order_num,parsedFilePath:Ee.parsedFilePath}}).filter(we=>we!==null);return{...Ve,tags:[...lt,...le]}})}const Le=new Map;return Te.filter(de=>{const Ue=(de==null?void 0:de.source)||de.file_name;return Ue?Le.has(Ue)?!1:(Le.set(Ue,!0),!0):!0}).sort((de,Ue)=>Number((Ue==null?void 0:Ue.score)??0)-Number((de==null?void 0:de.score)??0))},[B,jt,Ht,Cr]),Ie=wt(()=>{if(!F)return[];let ce=[];try{const Le=JSON.parse(F);ce=Array.isArray(Le)?Le:[]}catch{return[]}if(!(ce!=null&&ce.length))return[];let Te=ce.map(Le=>{var Ue,Ve,lt;const de=(Le==null?void 0:Le.score)??((Ue=Le==null?void 0:Le.metadata)==null?void 0:Ue.score);return{link:(Ve=Le==null?void 0:Le.metadata)==null?void 0:Ve.link,file_name:(lt=Le==null?void 0:Le.metadata)==null?void 0:lt.title,score:Yi(de),tags:[]}});const st=oa(jt||[]);if(st&&st.length){const Le=st.filter(de=>de.fromtype==="1");Te=Te.map(de=>{const Ue=Le.map(Ve=>{var le;const lt=ce.find(we=>String(we.order_num)===String(Ve.id));return!lt||!((le=lt==null?void 0:lt.metadata)!=null&&le.title)||lt.metadata.title!==de.file_name?null:{id:Ve.id||"",index:Cr(String(Ve.id))||Ve.indexId||"",image_urls:Ve.imageUrls?Array.isArray(Ve.imageUrls)?Ve.imageUrls:[Ve.imageUrls]:Ve.image_urls?Ve.image_urls.split(";").map(we=>we.trim()).filter(Boolean):[],metadata:lt.metadata||{},order_num:lt.order_num}}).filter(Ve=>Ve!==null);return{...de,tags:Ue}})}return Te.sort((Le,de)=>Number((de==null?void 0:de.score)??0)-Number((Le==null?void 0:Le.score)??0))},[F,jt,Ht,Cr]),N=wt(()=>{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 ce=[];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 Le=JSON.parse(O);ce=Array.isArray(Le)?Le:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",ce.length)}else if(Array.isArray(O))ce=O,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",ce.length);else if(typeof O=="object"&&O!==null)ce=[O],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",ce.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof O,O),[]}catch(Le){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",Le,O),[]}let Te=ce.map((Le,de)=>{const{metadata:Ue,...Ve}=Le;return{id:Le.id||`graph-${de}`,graphName:Le.graphName||`\u56FE\u8C31${de+1}`,tags:[],...Ve}});const st=oa(jt||[]);if(st&&st.length){const Le=st.filter(de=>de.fromtype==="2");Te=Te.map(de=>{let Ue=[];Array.isArray(de.traceNodes)&&de.traceNodes.length>0?Ue=de.traceNodes.map((le,we)=>({id:le.id,index:Cr(String(le.id))??we+1,image_urls:[],metadata:le.metadata||{},...le})):Ue=Le.filter(le=>String(le.id)===String(de.id)).map(le=>({id:le.id||"",index:Cr(String(le.id))||le.indexId||"",image_urls:le.imageUrls?Array.isArray(le.imageUrls)?le.imageUrls:[le.imageUrls]:le.image_urls?le.image_urls.split(";").map(we=>we.trim()).filter(Boolean):[],metadata:{}}));const Ve=new Set,lt=Ue.filter(le=>Ve.has(String(le.id))?!1:(Ve.add(String(le.id)),!0)).sort((le,we)=>Number(le.index)-Number(we.index));return{...de,tags:lt}})}return Te},[O,jt,Ht,Cr]),Q=wt(()=>{const ce=[...oa(jt||[]).filter(Te=>Te.imageUrls&&Array.isArray(Te.imageUrls)).flatMap(Te=>Te.imageUrls),...xe];return Array.from(new Set(ce))},[jt,xe]),Jt=wt(()=>typeof n!="string"?[]:oE(n),[n]),rt=wt(()=>Array.from(new Set([...Q||[],...Jt||[]])),[Q,Jt]),Ke=wt(()=>{var ce,Te,st,Le,de,Ue,Ve,lt;if(!A)return null;try{const le=typeof A=="string"?JSON.parse(A):A;if(Array.isArray(le)&&le.length>0){const we=le[0];if(we.retrieveSqlData)return{dataFetchUrl:we.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:we.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:we.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:we.retrieveSqlData.total||0,type:we.retrieveSqlData.type||"COLLECTION",preData:{columns:((Te=(ce=we.retrieveSqlData.preData)==null?void 0:ce[0])==null?void 0:Te.columns)||[],rows:((Le=(st=we.retrieveSqlData.preData)==null?void 0:st[0])==null?void 0:Le.data)||[]}}}return le.retrieveSqlData?{dataFetchUrl:le.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:le.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:le.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:le.retrieveSqlData.total||0,type:le.retrieveSqlData.type||"COLLECTION",preData:{columns:((Ue=(de=le.retrieveSqlData.preData)==null?void 0:de[0])==null?void 0:Ue.columns)||[],rows:((lt=(Ve=le.retrieveSqlData.preData)==null?void 0:Ve[0])==null?void 0:lt.data)||[]}}:{dataFetchUrl:le.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:le.databaseName||"\u6570\u636E\u5E93",tableName:le.tableName||"\u6570\u636E\u8868",total:le.total||0,type:le.type||"COLLECTION",preData:le.preData||{columns:[],rows:[]}}}catch(le){return console.error("Failed to parse databaseReference:",le),null}},[A]),xt=ce=>{const{dataSourceType:Te,databaseName:st,businessTableName:Le,tableName:de}=ce;return Te==="DataTable"?`${st||"\u6570\u636E\u5E93"} - ${Le||"\u6570\u636E\u8868"}`:Te==="DirectDB"?`${st||"\u6570\u636E\u5E93"} - ${de||"\u6570\u636E\u8868"}`:st||Le||de||"\u6570\u636E\u5E93"};je.useEffect(()=>{gt(null),ke([])},[q]),je.useEffect(()=>{var st;const ce=Le=>{try{const de=typeof Le=="string"?JSON.parse(Le):Le;return de?Array.isArray(de)?de:[de]:[]}catch(de){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",de),[]}},Te=(Le,de)=>{if(!Array.isArray(Le))return[];const Ue=de!=null&&de.id?String(de.id):void 0,Ve=Ue?Cr(Ue):void 0,lt=Ue?jr[Ue]:void 0,le=Ve??lt??(de==null?void 0:de.referenceIndex)??void 0,we=Ue&&le!==void 0?[{id:Ue,index:le}]:[];return Le.map(Ee=>{var Ge,vt,Wt,Mt;return{...Ee,id:Ee.id||Ue||Ee.tableName,referenceId:Ue,referenceIndex:le,tags:we,fetchUrl:Ee.fetchUrl||((Ge=de==null?void 0:de.retrieveSqlData)==null?void 0:Ge.fetchUrl)||(Ke==null?void 0:Ke.dataFetchUrl)||"",databaseName:Ee.databaseName||((vt=de==null?void 0:de.retrieveSqlData)==null?void 0:vt.databaseName)||(Ke==null?void 0:Ke.databaseName)||"",tableName:Ee.tableName||((Wt=de==null?void 0:de.retrieveSqlData)==null?void 0:Wt.tableName)||(Ke==null?void 0:Ke.tableName)||"",dataSourceType:Ee.dataSourceType||((Mt=de==null?void 0:de.retrieveSqlData)==null?void 0:Mt.type)||(Ke==null?void 0:Ke.type)||"DataTable"}})};if(A){const Le=ce(A),de=[];if(Le.forEach(Ue=>{var Ve,lt,le;if(Array.isArray(Ue==null?void 0:Ue.retrieveTableDataList)&&Ue.retrieveTableDataList.length)de.push(...Te(Ue.retrieveTableDataList,Ue));else if(Array.isArray((le=(lt=(Ve=Ue==null?void 0:Ue.retrieveSqlData)==null?void 0:Ve.preData)==null?void 0:lt[0])==null?void 0:le.data)&&Ue.retrieveSqlData.preData[0].data.length){const we={businessTableName:Ue.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:Ue.retrieveSqlData.databaseName||(Ke==null?void 0:Ke.databaseName)||"\u6570\u636E\u5E93",tableName:Ue.retrieveSqlData.tableName||(Ke==null?void 0:Ke.tableName)||"\u6570\u636E\u8868",fetchUrl:Ue.retrieveSqlData.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",dataSourceType:Ue.retrieveSqlData.type||"DirectDB",total:Ue.retrieveSqlData.total};de.push(...Te([we],Ue))}}),de.length>0){Pe(de);return}if((st=Ke==null?void 0:Ke.preData)!=null&&st.rows){const Ue=Te(Ke.preData.rows,{});Pe(Ue);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([])},[A,Ke,q,jr,Cr]);const et=kt(()=>{try{const ce=Array.isArray(E)?E:[],Te=Array.isArray(Ie)?Ie:[],st=Array.isArray(N)?N:[],Le=rt,de=oa(jt||[]),Ue=Ge=>typeof Ht!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Ge}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(Ht),Ve=Ge=>{const vt=new Map;return Ge.forEach(Wt=>{if(Wt.id){const Mt=String(Wt.id);if(!vt.has(Mt))vt.set(Mt,Wt);else{const ut=vt.get(Mt),qt=Number(Wt.index)||0,Jr=Number(ut.index)||0;(qt<Jr||qt===Jr&&!ut.index)&&vt.set(Mt,Wt)}}}),Array.from(vt.values())},lt=ce.map(Ge=>({...Ge,tags:Ve((Ge.tags||[]).filter(vt=>vt.id&&Ue(String(vt.id))))})),le=Te.map(Ge=>({...Ge,tags:Ve((Ge.tags||[]).filter(vt=>vt.id&&Ue(String(vt.id))))})),we=st.map(Ge=>({...Ge,tags:Ve((Ge.tags||[]).filter(vt=>vt.id&&Ue(String(vt.id))))})),Ee=dt&&dt.length>0?dt.map(Ge=>({id:Ge.id||Ge.tableName||Ge.referenceId||"",databaseName:Ge.databaseName||(Ke==null?void 0:Ke.databaseName)||"",tableName:Ge.tableName||(Ke==null?void 0:Ke.tableName)||"",fetchUrl:Ge.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",score:Yi(Ge.score),tags:Ge.tags||[],referenceIndex:Ge.referenceIndex,metadata:Ge.metadata?{...Ge.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})):[];return{queryId:q,knowledgeRefs:lt,webRefs:le,graphRefs:we,databaseRefs:Ee,images:Le,raw:{reference:B,webReference:F,graphReference:O,databaseReference:A,retriveNodes:de}}}catch{return{queryId:q,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:B,webReference:F,graphReference:O,databaseReference:A,retriveNodes:[]}}}},[E,Ie,N,Ke,dt,rt,jt,q,B,F,O,A,Ht]),Tt=wt(()=>{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||Tt.length===0)return null;const ce=le=>{if(!le)return"";if(typeof le=="string"&&(le.includes("KB")||le.includes("MB")||le.includes("GB")||le.includes("B")))return le;const we=typeof le=="string"?parseFloat(le)||0:le;return we<1024?`${we}B`:we<1024*1024?`${(we/1024).toFixed(1)}KB`:`${(we/1024/1024).toFixed(1)}MB`},Te=le=>le!=null&&le.status&&(String(le.status).toLowerCase()==="uploading"||String(le.status).toLowerCase()==="parsing")?!1:!!(le!=null&&le.url||le!=null&&le.filePath||le!=null&&le.convertedFilePath),st=Tt.filter(le=>{const we=(le.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(we.toLowerCase())}),Le=Tt.filter(le=>{const we=(le.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(we.toLowerCase())}),de=st.filter(Te),Ue=st.filter(le=>!Te(le)),Ve=Le.filter(Te),lt=Le.filter(le=>!Te(le));return Ve.length+lt.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:[(de.length>0||Ue.length>0)&&U.jsx(Ru,{$theme:ue,children:U.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[Ue.map((le,we)=>{var Ee;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:((Ee=ue.colors)==null?void 0:Ee.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${we}`)}),de.map(le=>U.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{...le,file:le.name,file_type:le.file_type||"image",url:le.url||le.filePath,parse_url:le.parseUrl||le.convertedFilePath,retrieve_tags:le.retrieveTags||[],file_id:le.uid||le.file_id,parsed_file_type:le.parsed_file_type||"image",references:le,type:le.type||"image",isUploadFile:!0,pdfPages:le.pdfPages||0})},children:[U.jsx(Tu,{src:le.url||le.filePath,alt:le.name,className:"gallery-image",token:e,url:t,eventsEmit:Qe}),U.jsx("div",{className:"gallery-overlay",children:le.name})]},le.uid||le.name))]})}),(Ve.length>0||lt.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:[lt.map((le,we)=>{const Ee=(le.name||"").split(".").pop()||"",Ge=Mu(Ee,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:Ge})}),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-${le.uid||we}`)}),Ve.map(le=>{var Wt;const we=(le.name||"").split(".").pop()||"",Ee=le.size??((Wt=le.file)==null?void 0:Wt.size)??le.fileSize,Ge=ce(Ee),vt=Mu(we,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:le.name,onClick:()=>{R==null||R("reference_file:click",{...le,file:le.name,file_type:le.file_type||we,url:le.url||le.filePath,parse_url:le.parseUrl||le.convertedFilePath,retrieve_tags:le.retrieveTags||[],file_id:le.uid||le.file_id,parsed_file_type:le.parsed_file_type||we,references:le,type:le.type||"file",isUploadFile:!0,pdfPages:le.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:vt})}),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:le.name,children:le.name})})}),U.jsx("div",{className:" text-[12px] text-gray-400 whitespace-nowrap",children:Ge})]})]},le.uid||le.name)})]})})]})},Nr=()=>{if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases:",Se),!Se||!Array.isArray(Se)||Se.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases \u4E3A\u7A7A\u6216\u4E0D\u662F\u6570\u7EC4"),null;const ce=Se[0];if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - firstKB:",ce),!ce||!ce.treeData||!Array.isArray(ce.treeData))return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - firstKB \u6216 treeData \u65E0\u6548"),null;let Te=[],st="\u6309\u76EE\u5F55\u5206\u7C7B";const Le=ce.treeData.filter(le=>le.type==="dir").map((le,we)=>({id:le.name||we,name:le.name||"",documentCount:le.fileCount||0,visible:!0,itemType:"dir"}));if(Le.length>0)Te=Le,st="\u6309\u76EE\u5F55\u5206\u7C7B";else{const le=ce.treeData.filter(we=>we.type==="file");if(le.length>0)Te=le.map((we,Ee)=>({id:we.name||Ee,name:we.name||"\u672A\u77E5\u6587\u4EF6",documentCount:1,visible:!0,itemType:"file",fileType:we.fileType||""})),st="\u77E5\u8BC6\u5E93\u6587\u6863";else return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u76EE\u5F55\u6216\u6587\u4EF6\u6570\u636E"),null}if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - categories:",Te),Te.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u53EF\u7528\u7684\u5206\u7C7B"),null;const de=ce.totalFileCount||ce.treeData.filter(le=>le.type==="file").length||0,Ue=Te.slice(0,5),Ve=Te.length>5,lt={title:"\u77E5\u8BC6\u5E93\u6587\u6863\u5217\u8868",subtitle:st,totalCount:de,categories:Ue,showViewAll:Ve,viewAllText:"\u67E5\u770B\u5168\u90E8>>"};return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - result:",lt),lt},ee=()=>{if(f)return null;const ce=Nr();return ce?U.jsx(YD,{data:ce,styles:m,onCategoryClick:Te=>{R==null||R("knowledge_base_category:click",{category:Te,knowledgeBase:Se==null?void 0:Se[0]})},onViewAllClick:()=>{R==null||R("knowledge_base_view_all:click",{knowledgeBases:Se})}}):null},br=()=>{var we;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:",N);const ce=Array.isArray(E)?E:[],Te=Array.isArray(Ie)?Ie:[],st=Array.isArray(N)?N:[];console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",ce.length,"webList:",Te.length,"graphList:",st.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",st);const Le=ce.length>0&&X!==5,de=Te.length>0,Ue=st.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",Le,"hasWebRefs:",de,"hasGraphRefs:",Ue);const Ve=rt.length>0,lt=dt&&dt.length>0,le=Le||de||Ue||Ve||lt;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",le),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",A),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",dt),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",dt==null?void 0:dt.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",lt),ie==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",le),!le)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const Ee=Le&&(ce==null?void 0:ce.length)||0,Ge=de&&(Te==null?void 0:Te.length)||0,vt=Ue&&(st==null?void 0:st.length)||0,Wt=lt&&(dt==null?void 0:dt.length)||0;let Mt=Ee+Ge+vt+Wt;return Mt===0&&Ve&&(Mt=1),U.jsxs(U.Fragment,{children:[Ve&&U.jsx(Ru,{$theme:ue,children:U.jsx("div",{className:"gallery-grid",children:rt.map((ut,qt)=>U.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{file:`\u56FE${qt+1}`,file_type:"image",url:ut,parse_url:ut,retrieve_tags:[],references:{url:ut},type:"image",isUploadFile:!1})},children:[U.jsx(Tu,{src:ut,alt:`\u56FE${qt+1}`,className:"gallery-image",token:e,url:t,eventsEmit:Qe}),U.jsxs("div",{className:"gallery-overlay",children:["\u56FE",qt+1]})]},ut+qt))})}),U.jsx("div",{style:{padding:"6px 2.9rem"},children:U.jsxs("button",{style:{cursor:"pointer",color:((we=ue.colors)==null?void 0:we.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 ut=et();R==null||R("references:click",ut)},onMouseEnter:ut=>{var qt;ut.currentTarget.style.color=((qt=ue.colors)==null?void 0:qt.primary)||"#3b82f6"},onMouseLeave:ut=>{var qt;ut.currentTarget.style.color=((qt=ue.colors)==null?void 0:qt.textDisabled)||"#86909C"},children:[U.jsx(fD,{size:16}),U.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",Mt?` ${Mt}`:""]}),U.jsx(lD,{size:16})]})})]})}return le?U.jsxs(U.Fragment,{children:[Ve&&U.jsx(Ru,{$theme:ue,children:U.jsx("div",{className:"gallery-grid",children:rt.map((Ee,Ge)=>U.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{file:`\u56FE${Ge+1}`,file_type:"image",url:Ee,parse_url:Ee,retrieve_tags:[],references:{url:Ee},type:"image",isUploadFile:!1})},children:[U.jsx(Tu,{src:Ee,alt:`\u56FE${Ge+1}`,className:"gallery-image",token:e,url:t,eventsEmit:Qe}),U.jsxs("div",{className:"gallery-overlay",children:["\u56FE",Ge+1]})]},Ee+Ge))})}),Le&&U.jsxs(Gi,{$theme:ue,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:` (${ce.length})`}),ce.length>2&&U.jsx("div",{onClick:()=>Me(!Ne),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ne?U.jsx(Va,{size:16,className:"text-[#b4b4b4]"}):U.jsx(qa,{size:16,className:"text-[#b4b4b4]"})})]})}),U.jsx("div",{className:"reference-list",children:(Ne?ce:ce.slice(0,2)).map((Ee,Ge)=>Ee&&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 vt=Ee.file_type||(Ee.file_name||"").split(".").pop()||"pdf",Wt=(Ee.file_name||"").split(".").pop()||"file";return vt==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(vt)?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:Mu(Wt,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:vt=>{vt.stopPropagation(),R==null||R("knowledge_referenceFile_title:click",{data:{...Ee,file_type:Ee.file_type,file_name:Ee.file_name,metadata:Ee.metadata,parsedFilePath:Ee.parsedFilePath}})},children:Ee.file_name})}),U.jsx("div",{className:"flex items-center gap-1",children:(()=>{const vt=new Set,Wt=(Ee.tags||[]).filter(ut=>vt.has(ut.id)?!1:(vt.add(ut.id),!0)).sort((ut,qt)=>Number(ut.index)-Number(qt.index)),Mt=ut=>{if(typeof Ht!="string")return ut;const qt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Ht);return qt?qt[1]:ut};return Wt.slice(0,10).map(ut=>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(Ee,ut.id),Br=Ee.file_type==="video"?"3":"0";R==null||R("retrive_tag:click",{tagInfo:Jr||Ee,fromtype:Br,leaf:{id:ut.id,fromtype:Br},attributes:{}})},children:Mt(ut.id)},ut.id))})()}),typeof Ee.score=="number"&&U.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(Ee.score).toFixed(2)]}),Ee.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:vt=>{r&&(vt.stopPropagation(),R==null||R("referenceFile_download",{data:{...Ee,file_type:Ee.file_type,file_name:Ee.file_name,metadata:Ee.metadata,parsedFilePath:Ee.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:vt=>{vt.stopPropagation(),R==null||R("referenceFile_filechat",{data:{...Ee,file_type:Ee.file_type,file_name:Ee.file_name,metadata:Ee.metadata,parsedFilePath:Ee.parsedFilePath}})}})]})]})},Ee.file_id||Ge))})]}),lt&&U.jsxs(Gi,{$theme:ue,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:` (${dt.length||0})`}),dt.length>2&&U.jsx("div",{onClick:()=>Oe(!ot),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:ot?U.jsx(Va,{size:16,className:"text-[#b4b4b4]"}):U.jsx(qa,{size:16,className:"text-[#b4b4b4]"})})]})}),U.jsx("div",{className:"reference-list",children:(ot?dt:dt.slice(0,2)).map((Ee,Ge)=>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:vt=>{vt.stopPropagation(),R==null||R("database_referenceFile_title:click",{data:{...Ee,file_type:"database",file_name:xt(Ee),metadata:Ee,parsedFilePath:Ee.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",file:Ee.databaseName||"database",url:Ee.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",parse_url:Ee.fetchUrl||(Ke==null?void 0:Ke.dataFetchUrl)||"",retrieve_tags:Ee.tags||[],references:Ee,type:"database",isUploadFile:!1}})},children:xt(Ee)})}),U.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(Ee.tags)&&Ee.tags.length?Ee.tags:[{id:Ee.referenceId||`database-${Ge}`,index:Ee.referenceIndex??Ge+1}]).map(vt=>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:vt.index??Ge+1},`${vt.id||"database"}-${vt.index}`))}),typeof Ee.score=="number"&&U.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(Ee.score).toFixed(2)]})]})},Ee.tableName||Ge))})]}),de&&U.jsxs(Gi,{$theme:ue,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:` (${Te.length})`}),Te.length>2&&U.jsx("div",{onClick:()=>ft(!He),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:He?U.jsx(Va,{size:16,className:"text-[#b4b4b4]"}):U.jsx(qa,{size:16,className:"text-[#b4b4b4]"})})]})}),U.jsx("div",{className:"reference-list",children:(He?Te:Te.slice(0,2)).map((Ee,Ge)=>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:vt=>{vt.stopPropagation(),R==null||R("web_referenceFile_title:click",{data:{...Ee,file_type:Ee.file_type,file_name:Ee.file_name,metadata:Ee.metadata,parsedFilePath:Ee.parsedFilePath,file:Ee.file_name,url:Ee.link,parse_url:Ee.link,retrieve_tags:Ee.tags||[],references:Ee,type:"file",isUploadFile:!1}})},children:Ee.file_name})}),U.jsx("div",{className:"flex items-center gap-1",children:(()=>{const vt=new Set,Wt=(Ee.tags||[]).filter(ut=>vt.has(ut.id)?!1:(vt.add(ut.id),!0)).sort((ut,qt)=>Number(ut.index)-Number(qt.index)),Mt=ut=>{if(typeof Ht!="string")return ut;const qt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Ht);return qt?qt[1]:ut};return Wt.slice(0,1).map(ut=>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(Ee,ut.id);R==null||R("retrive_tag:click",{tagInfo:Jr||Ee,fromtype:"1",leaf:{id:ut.id,fromtype:"1"},attributes:{}})},children:Mt(ut.id)},ut.id))})()}),typeof Ee.score=="number"&&U.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(Ee.score).toFixed(2)]})]})},(Ee.link||"")+Ge))})]}),Ue&&U.jsxs(Gi,{$theme:ue,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:()=>We(!_e),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:_e?U.jsx(Va,{size:16,className:"text-[#b4b4b4]"}):U.jsx(qa,{size:16,className:"text-[#b4b4b4]"})})]})}),U.jsx("div",{className:"reference-list",children:(_e?st:st.slice(0,2)).map((Ee,Ge)=>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:Ee.graphName||`\u56FE\u8C31${Ge+1}`})}),U.jsx("div",{className:"flex items-center gap-1",children:(()=>{const vt=new Set,Wt=(Ee.tags||[]).filter(ut=>vt.has(ut.id)?!1:(vt.add(ut.id),!0)).sort((ut,qt)=>Number(ut.index)-Number(qt.index)),Mt=ut=>{if(typeof Ht!="string")return null;const qt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Ht);return qt?qt[1]??null:null};return Wt.map(ut=>({tag:ut,num:Mt(ut.id)})).filter(ut=>ut.num!==null&&ut.num!==void 0&&ut.num!=="").slice(0,10).map(({tag:ut,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 Br=Array.isArray(Ee.traceNodes)?Ee.traceNodes.find(dn=>String(dn==null?void 0:dn.id)===String(ut.id)):void 0;R==null||R("retrive_tag:click",{tagInfo:{id:ut.id,index:ut.index,image_urls:ut.image_urls||[]},fromtype:"2",graph:{id:Ee.id,graphName:Ee.graphName,fetchUrl:Ee.fetchUrl,cyphers:Ee.cyphers},traceNode:Br})},children:qt},ut.id))})()})]})},Ee.id||Ge))})]})]}):null},oe=()=>f||!W||!V||V.length===0?null:U.jsx(dE,{$theme:ue,children:U.jsx("div",{className:"follow-up-list",children:V.map((ce,Te)=>U.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Te*260}ms`},onClick:()=>{R==null||R("chatbox:follow_up_question_click",{question:ce,queryId:q})},children:ce},`${String(ce)}-${Te}`))})});return U.jsxs(iE,{$align:a,$isUser:f,children:[U.jsxs(sE,{$isUser:f,children:[U.jsx(lE,{$src:pr,$isUser:f}),Ce&&U.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:Ce})]}),ar(),U.jsx(uE,{$isUser:f,$theme:ue,children:U.jsx("div",{className:"message-card",children:U.jsx("div",{className:"message-text",children:o==="stream"?U.jsxs(U.Fragment,{children:[!f&&Ct(),mt(),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-${ct}`)]}):U.jsx("div",{style:{whiteSpace:"pre-wrap"},children:_t})})})}),ee(),br(),!f&&w(),oe(),typeof document<"u"&&e2(U.jsx(fE,{$show:De!==null,onClick:()=>Be(null),children:De&&U.jsxs("div",{className:"modal-content",onClick:ce=>ce.stopPropagation(),children:[U.jsx("img",{src:De,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),U.jsx("button",{className:"modal-close",onClick:()=>Be(null),children:"\u5173\u95ED"})]})}),document.body)]})},hE=Dt.div`
|
|
1397
|
+
position: relative;
|
|
1398
|
+
width: 100%;
|
|
1399
|
+
height: 100%;
|
|
1400
|
+
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
1401
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1402
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
1403
|
+
|
|
1404
|
+
/* 自定义滚动条 */
|
|
1405
|
+
&::-webkit-scrollbar {
|
|
1406
|
+
width: 8px;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
&::-webkit-scrollbar-track {
|
|
1410
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1411
|
+
border-radius: 4px;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
&::-webkit-scrollbar-thumb {
|
|
1415
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1416
|
+
border-radius: 4px;
|
|
1417
|
+
|
|
1418
|
+
&:hover {
|
|
1419
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
`,pE=Dt.div`
|
|
1423
|
+
position: relative;
|
|
1424
|
+
width: 100%;
|
|
1425
|
+
height: 100%;
|
|
1426
|
+
overflow: auto;
|
|
1427
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1428
|
+
|
|
1429
|
+
/* 自定义滚动条 */
|
|
1430
|
+
&::-webkit-scrollbar {
|
|
1431
|
+
width: 8px;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
&::-webkit-scrollbar-track {
|
|
1435
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1436
|
+
border-radius: 4px;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
&::-webkit-scrollbar-thumb {
|
|
1440
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1441
|
+
border-radius: 4px;
|
|
1442
|
+
|
|
1443
|
+
&:hover {
|
|
1444
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
`,ep=Dt.div`
|
|
1448
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
1449
|
+
min-height: ${e=>e.height||"auto"};
|
|
1450
|
+
|
|
1451
|
+
/* 富文本内容样式增强 */
|
|
1452
|
+
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
1453
|
+
scroll-margin-top: 2rem;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
& img {
|
|
1457
|
+
max-width: 100%;
|
|
1458
|
+
height: auto;
|
|
1459
|
+
border-radius: 0.5rem;
|
|
1460
|
+
margin: 1rem 0;
|
|
1461
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
1462
|
+
transition: transform 0.2s ease-in-out;
|
|
1463
|
+
|
|
1464
|
+
&:hover {
|
|
1465
|
+
transform: scale(1.02);
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/* 表格样式 - 主题感知 */
|
|
1470
|
+
& .table-container {
|
|
1471
|
+
overflow: auto;
|
|
1472
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
1473
|
+
border-radius: 6px;
|
|
1474
|
+
margin: 1rem 0;
|
|
1475
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
& .table-container table {
|
|
1479
|
+
width: 100%;
|
|
1480
|
+
border-collapse: collapse;
|
|
1481
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1482
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
& .table-container th,
|
|
1486
|
+
& .table-container td {
|
|
1487
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
1488
|
+
padding: 8px 12px;
|
|
1489
|
+
text-align: left;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
& .table-container th {
|
|
1493
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1494
|
+
font-weight: 600;
|
|
1495
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
& .table-container td {
|
|
1499
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
& .table-container tr:nth-child(even) {
|
|
1503
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
& pre {
|
|
1507
|
+
position: relative;
|
|
1508
|
+
|
|
1509
|
+
&::before {
|
|
1510
|
+
content: '';
|
|
1511
|
+
position: absolute;
|
|
1512
|
+
top: 0;
|
|
1513
|
+
left: 0;
|
|
1514
|
+
right: 0;
|
|
1515
|
+
height: 2px;
|
|
1516
|
+
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
1517
|
+
border-radius: 2px 2px 0 0;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
& blockquote {
|
|
1522
|
+
position: relative;
|
|
1523
|
+
|
|
1524
|
+
&::before {
|
|
1525
|
+
content: '"';
|
|
1526
|
+
position: absolute;
|
|
1527
|
+
top: -0.5rem;
|
|
1528
|
+
left: -1rem;
|
|
1529
|
+
font-size: 3rem;
|
|
1530
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1531
|
+
opacity: 0.3;
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
`,mE=Dt.div`
|
|
1537
|
+
display: flex;
|
|
1538
|
+
align-items: center;
|
|
1539
|
+
justify-content: center;
|
|
1540
|
+
padding: 2rem;
|
|
1541
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1542
|
+
font-size: 0.875rem;
|
|
1543
|
+
|
|
1544
|
+
&::before {
|
|
1545
|
+
content: '';
|
|
1546
|
+
width: 20px;
|
|
1547
|
+
height: 20px;
|
|
1548
|
+
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
1549
|
+
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1550
|
+
border-radius: 50%;
|
|
1551
|
+
animation: spin 1s linear infinite;
|
|
1552
|
+
margin-right: 0.5rem;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
@keyframes spin {
|
|
1556
|
+
0% { transform: rotate(0deg); }
|
|
1557
|
+
100% { transform: rotate(360deg); }
|
|
1558
|
+
}
|
|
1559
|
+
`,gE=Dt.div`
|
|
1560
|
+
display: flex;
|
|
1561
|
+
flex-direction: column;
|
|
1562
|
+
align-items: center;
|
|
1563
|
+
justify-content: center;
|
|
1564
|
+
padding: 3rem;
|
|
1565
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1566
|
+
text-align: center;
|
|
1567
|
+
|
|
1568
|
+
&::before {
|
|
1569
|
+
content: '📄';
|
|
1570
|
+
font-size: 3rem;
|
|
1571
|
+
margin-bottom: 1rem;
|
|
1572
|
+
}
|
|
1573
|
+
`,vE=({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:B="100%"})=>{const F=Hs(),A=wt(()=>{var ue,Ce,xe,ke,De,Be,Ne,Me,He;return{primaryColor:(d==null?void 0:d.primaryColor)||((ue=F==null?void 0:F.colors)==null?void 0:ue.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)||((xe=F==null?void 0:F.colors)==null?void 0:xe.background)||"#ffffff",textColor:(d==null?void 0:d.textColor)||((ke=F==null?void 0:F.colors)==null?void 0:ke.text)||"#24292f",borderColor:(d==null?void 0:d.borderColor)||((De=F==null?void 0:F.colors)==null?void 0:De.border)||"#dee2e6",disabledBackground:(d==null?void 0:d.disabledBackground)||((Be=F==null?void 0:F.colors)==null?void 0:Be.disabledBackground)||"#f8f9fa",hoverBackground:(d==null?void 0:d.hoverBackground)||((Ne=F==null?void 0:F.colors)==null?void 0:Ne.hoverBackground)||"#e9ecef",borderRadius:(d==null?void 0:d.borderRadius)||((Me=F==null?void 0:F.space)==null?void 0:Me.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[k,P]=Ot([]),[M,_]=Ot({start:0,end:10}),[T,q]=Ot(0),[L,Y]=Ot(0),[W,z]=Ot(!1),[K,X]=Ot(!1),[V,Z]=Ot(!1),R=Lt(null),ie=Lt(null),me=Lt(null),ye=wt(()=>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(ye)?ye.length:"n/a"),P(ye)},[ye]);const ge=wt(()=>t?`${k.length*r}px`:"auto",[k.length,r,t]),ae=wt(()=>{if(!t)return k;const ue=Math.max(0,M.start-n),Ce=Math.min(k.length,M.end+n);return k.slice(ue,Ce).map((xe,ke)=>({...xe,virtualIndex:ue+ke}))},[k,M,t,n]),Se=kt(ue=>{const{scrollTop:Ce,scrollHeight:xe,clientHeight:ke}=ue.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:Ce,scrollHeight:xe,clientHeight:ke});const De=!t&&!v&&!g&&!b&&!o;if(console.log("[Markdownit] passiveOnly:",De),De||q(Be=>Be!==Ce?(console.log("[Markdownit] setScrollTop:",Ce),Ce):Be),t&&!De){const Be=Math.floor(Ce/r),Ne=Math.min(k.length,Be+Math.ceil(L/r)+1);_(Me=>Me.start!==Be||Me.end!==Ne?(console.log("[Markdownit] setVisibleRange:",{start:Be,end:Ne}),{start:Be,end:Ne}):Me)}if(!De){const Be=Ce<=10;Be!==K&&(console.log("[Markdownit] isAtTop ->",Be),X(Be),Be&&g&&(console.log("[Markdownit] onScrollToTop callback"),g()))}if(!De){const Be=Ce+ke>=xe-10;Be!==V&&(console.log("[Markdownit] isAtBottom ->",Be),Z(Be),Be&&b&&(console.log("[Markdownit] onScrollToBottom callback"),b()))}v&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:Ce,scrollHeight:xe}),v(Ce,xe)),o&&a&&!W&&!u&&xe-Ce-L<100&&J()},[t,r,k.length,L,o,a,W,u,K,V,g,b,v]),J=kt(async()=>{if(!(!a||W||u)){z(!0);try{const ue=k[k.length-1],Ce=await a(ue.id);P(xe=>[...xe,...Ce])}catch(ue){console.error("Failed to load more segments:",ue)}finally{z(!1)}}},[a,k,W,u]);er(()=>{const ue=()=>{R.current&&Y(R.current.clientHeight)};return ue(),window.addEventListener("resize",ue),()=>window.removeEventListener("resize",ue)},[]);const he=kt((ue,Ce)=>{const xe={type:ue.type,content:ue.content},ke=t?{position:"absolute",top:`${(ue.virtualIndex||Ce)*r}px`,left:0,right:0,height:`${r}px`}:{};return U.jsx("div",{style:ke,onClick:()=>x==null?void 0:x(ue.id,ue),className:x?"cursor-pointer hover:bg-gray-50":"",children:U.jsx(cl,{dataSource:xe,isEditing:!1,size:l,basePath:f,theme:A,onChange:p,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},ue.id)},[t,r,A,p,x]),se=()=>(console.log("[Markdownit] renderContent segments.len:",k.length,"enableVirtualScroll:",t),k.length===0?U.jsxs(gE,{theme:A,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:k.map(he)})),te=()=>!W&&!u?null:U.jsx(mE,{theme:A,children:u?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return U.jsx(hE,{ref:R,theme:A,$isVirtualized:t,className:D,style:{height:B,...m},children:t?U.jsx(pE,{ref:ie,theme:A,onScroll:Se,children:U.jsx(ep,{theme:A,height:ge,children:se()})}):U.jsxs(ep,{theme:A,onScroll:Se,children:[se(),te()]})})},FE=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(vE,{...e})})};Dt.div`
|
|
1574
|
+
background: #f6f8fa;
|
|
1575
|
+
border: 1px solid #d0d7de;
|
|
1576
|
+
border-radius: 6px;
|
|
1577
|
+
padding: 16px;
|
|
1578
|
+
margin-bottom: 20px;
|
|
1579
|
+
`;Dt.p`
|
|
1580
|
+
margin: 0 0 16px 0;
|
|
1581
|
+
color: #656d76;
|
|
1582
|
+
font-size: 14px;
|
|
1583
|
+
line-height: 1.5;
|
|
1584
|
+
`;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 B=e.slice(n,d);B.trim()!==""&&(r.push({text:B}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:B}))}const v=B=>{const F=new RegExp(`${B}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
1585
|
+
])*?)\\1`,"i"),A=l.match(F);return A?A[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},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+=n.value||n.placeholder||"")}),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=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=`\`\`\`template\`\`\`
|
|
1586
|
+
${n.value||n.placeholder}\`\`\`
|
|
1587
|
+
\`\`\`
|
|
1588
|
+
`)}),r},xE=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},$E=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var b,x,D,m,B,F,A,O,k,P,M,_,T,q,L,Y,W,z,K,X,V,Z,R,ie,me,ye,ge,ae,Se,J,he,se,te,ue,Ce,xe,ke,De,Be,Ne,Me,He,ft,ot,Oe,_e,We,ct,at,Qe,Nt,Ct;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:((B=a==null?void 0:a.colors)==null?void 0:B.border)||"#84ADFF",success:((F=a==null?void 0:a.colors)==null?void 0:F.success)||"#008000",warning:((A=a==null?void 0:a.colors)==null?void 0:A.warning)||"#FFA500",error:((O=a==null?void 0:a.colors)==null?void 0:O.error)||"#FF0000",info:((k=a==null?void 0:a.colors)==null?void 0:k.info)||"#0000FF",disabled:((P=a==null?void 0:a.colors)==null?void 0:P.disabled)||"#808080",disabledBackground:((M=a==null?void 0:a.colors)==null?void 0:M.disabledBackground)||"#F5F5F5",disabledText:((_=a==null?void 0:a.colors)==null?void 0:_.disabledText)||"#808080",shadow:((T=a==null?void 0:a.colors)==null?void 0:T.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:((W=a==null?void 0:a.colors)==null?void 0:W.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:((V=a==null?void 0:a.space)==null?void 0:V.padding)||"16px",margin:((Z=a==null?void 0:a.space)==null?void 0:Z.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:((ye=(me=a==null?void 0:a.fonts)==null?void 0:me.body)==null?void 0:ye.size)||"14px",weight:((ae=(ge=a==null?void 0:a.fonts)==null?void 0:ge.body)==null?void 0:ae.weight)||"normal",family:((J=(Se=a==null?void 0:a.fonts)==null?void 0:Se.body)==null?void 0:J.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:((ue=(te=a==null?void 0:a.fonts)==null?void 0:te.heading)==null?void 0:ue.weight)||"600",family:((xe=(Ce=a==null?void 0:a.fonts)==null?void 0:Ce.heading)==null?void 0:xe.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((ke=a==null?void 0:a.others)==null?void 0:ke.baseFontWeight)||"normal"}},mode:(a==null?void 0:a.mode)||"light"},l={backgroundColor:((De=a==null?void 0:a.colors)==null?void 0:De.background)||"#E5EEFF",borderColor:((Be=a==null?void 0:a.colors)==null?void 0:Be.border)||"#84ADFF",borderRadius:((Ne=a==null?void 0:a.space)==null?void 0:Ne.radius)||"6px",padding:((Me=a==null?void 0:a.space)==null?void 0:Me.padding)||"8px 12px",margin:"2px",fontSize:((ft=(He=a==null?void 0:a.fonts)==null?void 0:He.body)==null?void 0:ft.size)||"14px",fontWeight:((Oe=(ot=a==null?void 0:a.fonts)==null?void 0:ot.body)==null?void 0:Oe.weight)||"500",minWidth:"30px",textColor:((_e=a==null?void 0:a.colors)==null?void 0:_e.text)||"#84ADFF"},f={...u,...n,theme:{...u.theme,...n==null?void 0:n.theme,colors:{...(We=u.theme)==null?void 0:We.colors,...(ct=n==null?void 0:n.theme)==null?void 0:ct.colors},space:{...(at=u.theme)==null?void 0:at.space,...(Qe=n==null?void 0:n.theme)==null?void 0:Qe.space},fonts:{...(Nt=u.theme)==null?void 0:Nt.fonts,...(Ct=n==null?void 0:n.theme)==null?void 0:Ct.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 mt=tp(e);console.log("\u65B0\u7684Slate\u6570\u636E:",mt),p(mt)},[e]),er(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",d)},[d]);const v=kt((mt,dt)=>{if(dt===pi.SLATE&&mt){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",mt),p(mt);const Pe=Iu(mt);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Pe),t==null||t(Pe)}},[t]),g=kt(mt=>{if(!d||d.length===0)return"";switch(mt){case"pure_string":return bE(d);case"string":return Iu(d);case"markdown":return yE(d);case"html":return xE(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,$E as O,BE as S,FE as T,pi as Z,sc as a,AE as b};
|