@gientech/modual 2.0.11 → 2.1.1
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-DybWMK4d.js → GientechStreamReader-AvqfscDM.js} +2 -2
- package/assets/{index-D9lYd8TZ.js → index-B3zi0w0x.js} +1 -1
- package/assets/{index-B1ZDDbC1.js → index-BB1f6JnZ.js} +1 -1
- package/assets/{index-DYhXjvk4.js → index-BDoDq_qz.js} +1 -1
- package/assets/index-BRq6VK9v.js +285 -0
- package/assets/{index-s0cmC4Ks.js → index-BfDZSwG3.js} +1 -1
- package/assets/index-CJZ9OITS.js +1403 -0
- package/assets/{index-S4W4X-HN.js → index-CUWsjoSm.js} +1 -1
- package/assets/{index-CBTA5S-5.js → index-DKwGCqM2.js} +1 -1
- package/assets/{index-NFQIKNFn.js → index-DNMf-zgr.js} +1 -1
- package/assets/{index-CN2AYX8Q.js → index-md7-ni21.js} +1 -1
- package/assets/{plus-G7zGXf6S.js → plus-CldFV1Lg.js} +1 -1
- package/assets/style-BXl32bWg.js +16 -0
- package/assets/style.css +1 -1
- package/assets/{x-vfKYzKkK.js → x-D-pV1NCt.js} +1 -1
- package/assistantConfig.js +1 -1
- package/chat.js +2 -2
- package/database.js +1 -1
- package/databaseId.js +1 -1
- package/databaseTable.js +1 -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-D0DDewJ2.js +0 -1398
- package/assets/index-LDFwTu47.js +0 -280
- package/assets/style-Bn7b5XHU.js +0 -21
|
@@ -0,0 +1,1403 @@
|
|
|
1
|
+
import*as w from"react";import Le,{useState as Bt,useCallback as xt,useImperativeHandle as B0,forwardRef as wo,useMemo as wt,useRef as $t,createContext as to,useContext as Do,useEffect as Ut,createElement as ss,useLayoutEffect as j4,useReducer as _4,Component as H4,memo as K4}from"react";import Tu,{flushSync as q4,unstable_batchedUpdates as W4,createPortal as V4}from"react-dom";import{R as Zp,y as ls}from"./index-md7-ni21.js";import{aS as vn,bB as U4,aB as Qp,M as Er,V as Jp,bC as A0,bD as us,y as ir,H as ut,f as Je,aR as e1,A as ht,L as $e,bE as F0,bF as bo,J as ze,_ as Ot,aU as t1,a5 as Jn,G as jn,z as r1,aC as ro,bG as n1,bH as o1,aX as a1,aW as i1,aY as Ha,t as zs,p as O0,ad as dn,ac as Hr,l as no,o as la,T as cs,bI as X4,X as Y4,k as Ye,af as s1,bj as N0,g as ui,m as Lo,bJ as l1,bd as ds,$ as $0,aJ as Mu,r as ci,b7 as on,bK as G4,W as Ls,aq as Bn,as as di,bL as u1,bg as Z4,bf as Q4,bi as J4,bh as e2,a0 as t2,be as jd,U as _d,a3 as r2,a2 as n2,ax as js,am as T0,bM as o2,Y as a2,bs as i2,bn as s2,B as fs,P as l2,aG as u2,bN as c2,bO as d2,ay as f2,Z as hs,u as h2,an as p2,bP as m2,N as yo,bQ as M0,aV as R0,bR as Hd,bS as I0,bT as Kd,bU as qd,E as ps,bV as c1,a9 as ms,bW as g2,bx as jt,bX as v2,K as b2,at as y2,a_ as x2,bY as C2,bZ as w2,v as d1,bz as Wd,b_ as D2,w as E2,aN as k2,s as S2,D as B2,aK as A2,c as _s}from"./index-BRq6VK9v.js";import{R as gs,a as vs,S as f1,P as h1}from"./index-B3zi0w0x.js";import{S as F2}from"./index-DNMf-zgr.js";function Ru(e){return e!=null&&e===e.window}const O2=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return Ru(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!Ru(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 N2(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(),c=O2(a),l=Date.now(),f=()=>{const m=Date.now()-l,v=N2(m>o?o:m,c,e,o);Ru(a)?a.scrollTo(window.pageXOffset,v):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=v:a.scrollTop=v,m<o?vn(f):typeof n=="function"&&n()};vn(f)}const T2=e=>{const[t,r]=Bt(null);return[xt((o,a,c)=>{const l=t??o,f=Math.min(l||0,o),d=Math.max(l||0,o),m=a.slice(f,d+1).map(e),v=m.some(y=>!c.has(y)),g=[];return m.forEach(y=>{v?(c.has(y)||g.push(y),c.add(y)):(c.delete(y),g.push(y))}),r(v?d:null),g},[t]),r]};function M2(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 R2=(e,t)=>B0(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)}}):M2(n,r)}),I2=e=>{const t=w.useRef(e),[,r]=U4();return[()=>t.current,n=>{t.current=n,r()}]};var p1=function(t){if(Qp()&&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},P2=function(t,r){if(!p1(t))return!1;var n=document.createElement("div"),o=n.style[t];return n.style[t]=r,n.style[t]!==o};function z2(e,t){return!Array.isArray(e)&&t!==void 0?P2(e,t):p1(e)}var L2=Er.ESC,j2=Er.TAB;function _2(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,c=w.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(),c.current=!0,!0):!1},d=function(v){switch(v.keyCode){case L2:l();break;case j2:{var g=!1;c.current||(g=f()),g?v.preventDefault():l();break}}};w.useEffect(function(){return t?(window.addEventListener("keydown",d),o&&vn(f,3),function(){window.removeEventListener("keydown",d),c.current=!1}):function(){c.current=!1}},[t])}var H2=wo(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]),c=Jp(t,A0(a));return Le.createElement(Le.Fragment,null,n&&Le.createElement("div",{className:"".concat(o,"-arrow")}),Le.cloneElement(a,{ref:us(a)?c:void 0}))}),Yo={adjustX:1,adjustY:1},Go=[0,0],K2={topLeft:{points:["bl","tl"],overflow:Yo,offset:[0,-4],targetOffset:Go},top:{points:["bc","tc"],overflow:Yo,offset:[0,-4],targetOffset:Go},topRight:{points:["br","tr"],overflow:Yo,offset:[0,-4],targetOffset:Go},bottomLeft:{points:["tl","bl"],overflow:Yo,offset:[0,4],targetOffset:Go},bottom:{points:["tc","bc"],overflow:Yo,offset:[0,4],targetOffset:Go},bottomRight:{points:["tr","br"],overflow:Yo,offset:[0,4],targetOffset:Go}},q2=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function W2(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,c=a===void 0?"rc-dropdown":a,l=e.transitionName,f=e.animation,d=e.align,m=e.placement,v=m===void 0?"bottomLeft":m,g=e.placements,y=g===void 0?K2:g,C=e.getPopupContainer,D=e.showAction,p=e.hideAction,A=e.overlayClassName,O=e.overlayStyle,B=e.visible,F=e.trigger,N=F===void 0?["hover"]:F,I=e.autoFocus,P=e.overlay,H=e.children,T=e.onVisibleChange,V=ir(e,q2),K=Le.useState(),G=ut(K,2),Y=G[0],L=G[1],W="visible"in e?B:Y,U=Le.useRef(null),X=Le.useRef(null),te=Le.useRef(null);Le.useImperativeHandle(t,function(){return U.current});var z=function(se){L(se),T==null||T(se)};_2({visible:W,triggerRef:te,onVisibleChange:z,autoFocus:I,overlayRef:X});var le=function(se){var ae=e.onOverlayClick;L(!1),ae&&ae(se)},ce=function(){return Le.createElement(H2,{ref:X,overlay:P,prefixCls:c,arrow:o})},he=function(){return typeof P=="function"?ce:ce()},ne=function(){var se=e.minOverlayWidthMatchTrigger,ae=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?se:!ae},pe=function(){var se=e.openClassName;return se!==void 0?se:"".concat(c,"-open")},Oe=Le.cloneElement(H,{className:Je((r=H.props)===null||r===void 0?void 0:r.className,W&&pe()),ref:us(H)?Jp(te,A0(H)):void 0}),Q=p;return!Q&&N.indexOf("contextMenu")!==-1&&(Q=["click"]),Le.createElement(e1,ht({builtinPlacements:y},V,{prefixCls:c,ref:U,popupClassName:Je(A,$e({},"".concat(c,"-show-arrow"),o)),popupStyle:O,action:N,showAction:D,hideAction:Q,popupPlacement:v,popupAlign:d,popupTransitionName:l,popupAnimation:f,popupVisible:W,stretch:ne()?"minWidth":"",popup:he(),onPopupVisibleChange:z,onPopupClick:le,getPopupContainer:C}),Oe)}const V2=Le.forwardRef(W2),U2=e=>typeof e!="object"&&typeof e!="function"||e===null;var m1=w.createContext(null);function g1(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function v1(e){var t=w.useContext(m1);return g1(t,e)}var X2=["children","locked"],An=w.createContext(null);function Y2(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 Za(e){var t=e.children,r=e.locked,n=ir(e,X2),o=w.useContext(An),a=F0(function(){return Y2(o,n)},[o,n],function(c,l){return!r&&(c[0]!==l[0]||!bo(c[1],l[1],!0))});return w.createElement(An.Provider,{value:a},t)}var G2=[],b1=w.createContext(null);function Hs(){return w.useContext(b1)}var y1=w.createContext(G2);function va(e){var t=w.useContext(y1);return w.useMemo(function(){return e!==void 0?[].concat(Ot(t),[e]):t},[t,e])}var x1=w.createContext(null),P0=w.createContext({});function Vd(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t1(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),c=null;return o&&!Number.isNaN(a)?c=a:n&&c===null&&(c=0),n&&e.disabled&&(c=null),c!==null&&(c>=0||t&&c<0)}return!1}function Z2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=Ot(e.querySelectorAll("*")).filter(function(n){return Vd(n,t)});return Vd(e,t)&&r.unshift(e),r}var Iu=Er.LEFT,Pu=Er.RIGHT,zu=Er.UP,Ui=Er.DOWN,Xi=Er.ENTER,C1=Er.ESC,Ta=Er.HOME,Ma=Er.END,Ud=[zu,Ui,Iu,Pu];function Q2(e,t,r,n){var o,a="prev",c="next",l="children",f="parent";if(e==="inline"&&n===Xi)return{inlineTrigger:!0};var d=$e($e({},zu,a),Ui,c),m=$e($e($e($e({},Iu,r?c:a),Pu,r?a:c),Ui,l),Xi,l),v=$e($e($e($e($e($e({},zu,a),Ui,c),Xi,l),C1,f),Iu,r?l:f),Pu,r?f:l),g={inline:d,horizontal:m,vertical:v,inlineSub:d,horizontalSub:v,verticalSub:v},y=(o=g["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(y){case a:return{offset:-1,sibling:!0};case c:return{offset:1,sibling:!0};case f:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function J2(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function ev(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function z0(e,t){var r=Z2(e,!0);return r.filter(function(n){return t.has(n)})}function Xd(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=z0(e,t),a=o.length,c=o.findIndex(function(l){return r===l});return n<0?c===-1?c=a-1:c-=1:n>0&&(c+=1),c=(c+a)%a,o[c]}var Lu=function(t,r){var n=new Set,o=new Map,a=new Map;return t.forEach(function(c){var l=document.querySelector("[data-menu-id='".concat(g1(r,c),"']"));l&&(n.add(l),a.set(l,c),o.set(c,l))}),{elements:n,key2element:o,element2key:a}};function tv(e,t,r,n,o,a,c,l,f,d){var m=w.useRef(),v=w.useRef();v.current=t;var g=function(){vn.cancel(m.current)};return w.useEffect(function(){return function(){g()}},[]),function(y){var C=y.which;if([].concat(Ud,[Xi,C1,Ta,Ma]).includes(C)){var D=a(),p=Lu(D,n),A=p,O=A.elements,B=A.key2element,F=A.element2key,N=B.get(t),I=ev(N,O),P=F.get(I),H=Q2(e,c(P,!0).length===1,r,C);if(!H&&C!==Ta&&C!==Ma)return;(Ud.includes(C)||[Ta,Ma].includes(C))&&y.preventDefault();var T=function(X){if(X){var te=X,z=X.querySelector("a");z!=null&&z.getAttribute("href")&&(te=z);var le=F.get(X);l(le),g(),m.current=vn(function(){v.current===le&&te.focus()})}};if([Ta,Ma].includes(C)||H.sibling||!I){var V;!I||e==="inline"?V=o.current:V=J2(I);var K,G=z0(V,O);C===Ta?K=G[0]:C===Ma?K=G[G.length-1]:K=Xd(V,O,I,H.offset),T(K)}else if(H.inlineTrigger)f(P);else if(H.offset>0)f(P,!0),g(),m.current=vn(function(){p=Lu(D,n);var U=I.getAttribute("aria-controls"),X=document.getElementById(U),te=Xd(X,p.elements);T(te)},5);else if(H.offset<0){var Y=c(P,!0),L=Y[Y.length-2],W=B.get(L);f(L,!1),T(W)}}d==null||d(y)}}function rv(e){Promise.resolve().then(e)}var L0="__RC_UTIL_PATH_SPLIT__",Yd=function(t){return t.join(L0)},nv=function(t){return t.split(L0)},ju="rc-menu-more";function ov(){var e=w.useState({}),t=ut(e,2),r=t[1],n=$t(new Map),o=$t(new Map),a=w.useState([]),c=ut(a,2),l=c[0],f=c[1],d=$t(0),m=$t(!1),v=function(){m.current||r({})},g=xt(function(B,F){var N=Yd(F);o.current.set(N,B),n.current.set(B,N),d.current+=1;var I=d.current;rv(function(){I===d.current&&v()})},[]),y=xt(function(B,F){var N=Yd(F);o.current.delete(N),n.current.delete(B)},[]),C=xt(function(B){f(B)},[]),D=xt(function(B,F){var N=n.current.get(B)||"",I=nv(N);return F&&l.includes(I[0])&&I.unshift(ju),I},[l]),p=xt(function(B,F){return B.filter(function(N){return N!==void 0}).some(function(N){var I=D(N,!0);return I.includes(F)})},[D]),A=function(){var F=Ot(n.current.keys());return l.length&&F.push(ju),F},O=xt(function(B){var F="".concat(n.current.get(B)).concat(L0),N=new Set;return Ot(o.current.keys()).forEach(function(I){I.startsWith(F)&&N.add(o.current.get(I))}),N},[]);return w.useEffect(function(){return function(){m.current=!0}},[]),{registerPath:g,unregisterPath:y,refreshOverflowKeys:C,isSubPathKey:p,getKeyPath:D,getKeys:A,getSubPathKeys:O}}function La(e){var t=w.useRef(e);t.current=e;var r=w.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var av=Math.random().toFixed(5).toString().slice(2),Gd=0;function iv(e){var t=Jn(e,{value:e}),r=ut(t,2),n=r[0],o=r[1];return w.useEffect(function(){Gd+=1;var a="".concat(av,"-").concat(Gd);o("rc-menu-uuid-".concat(a))},[]),n}function w1(e,t,r,n){var o=w.useContext(An),a=o.activeKey,c=o.onActive,l=o.onInactive,f={active:a===e};return t||(f.onMouseEnter=function(d){r==null||r({key:e,domEvent:d}),c(e)},f.onMouseLeave=function(d){n==null||n({key:e,domEvent:d}),l(e)}),f}function D1(e){var t=w.useContext(An),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 E1(e){var t=e.icon,r=e.props,n=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=w.createElement(t,ze({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var sv=["item"];function bs(e){var t=e.item,r=ir(e,sv);return Object.defineProperty(r,"item",{get:function(){return jn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var lv=["title","attribute","elementRef"],uv=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],cv=["active"],dv=(function(e){n1(r,e);var t=o1(r);function r(){return a1(this,r),t.apply(this,arguments)}return i1(r,[{key:"render",value:function(){var o=this.props,a=o.title,c=o.attribute,l=o.elementRef,f=ir(o,lv),d=ro(f,["eventKey","popupClassName","popupOffset","onTitleClick"]);return jn(!c,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),w.createElement(Ha.Item,ht({},c,{title:typeof a=="string"?a:void 0},d,{ref:l}))}}]),r})(w.Component),fv=w.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.eventKey;e.warnKey;var a=e.disabled,c=e.itemIcon,l=e.children,f=e.role,d=e.onMouseEnter,m=e.onMouseLeave,v=e.onClick,g=e.onKeyDown,y=e.onFocus,C=ir(e,uv),D=v1(o),p=w.useContext(An),A=p.prefixCls,O=p.onItemClick,B=p.disabled,F=p.overflowDisabled,N=p.itemIcon,I=p.selectedKeys,P=p.onActive,H=w.useContext(P0),T=H._internalRenderMenuItem,V="".concat(A,"-item"),K=w.useRef(),G=w.useRef(),Y=B||a,L=r1(t,G),W=va(o),U=function(ae){return{key:o,keyPath:Ot(W).reverse(),item:K.current,domEvent:ae}},X=c||N,te=w1(o,Y,d,m),z=te.active,le=ir(te,cv),ce=I.includes(o),he=D1(W.length),ne=function(ae){if(!Y){var ge=U(ae);v==null||v(bs(ge)),O(ge)}},pe=function(ae){if(g==null||g(ae),ae.which===Er.ENTER){var ge=U(ae);v==null||v(bs(ge)),O(ge)}},Oe=function(ae){P(o),y==null||y(ae)},Q={};e.role==="option"&&(Q["aria-selected"]=ce);var fe=w.createElement(dv,ht({ref:K,elementRef:L,role:f===null?"none":f||"menuitem",tabIndex:a?null:-1,"data-menu-id":F&&D?null:D},ro(C,["extra"]),le,Q,{component:"li","aria-disabled":a,style:ze(ze({},he),r),className:Je(V,$e($e($e({},"".concat(V,"-active"),z),"".concat(V,"-selected"),ce),"".concat(V,"-disabled"),Y),n),onClick:ne,onKeyDown:pe,onFocus:Oe}),l,w.createElement(E1,{props:ze(ze({},e),{},{isSelected:ce}),icon:X}));return T&&(fe=T(fe,e,{selected:ce})),fe});function hv(e,t){var r=e.eventKey,n=Hs(),o=va(r);return w.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:w.createElement(fv,ht({},e,{ref:t}))}const Ks=w.forwardRef(hv);var pv=["className","children"],mv=function(t,r){var n=t.className,o=t.children,a=ir(t,pv),c=w.useContext(An),l=c.prefixCls,f=c.mode,d=c.rtl;return w.createElement("ul",ht({className:Je(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)},j0=w.forwardRef(mv);j0.displayName="SubMenuList";function _0(e,t){return zs(e).map(function(r,n){if(w.isValidElement(r)){var o,a,c=r.key,l=(o=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&o!==void 0?o:c,f=l==null;f&&(l="tmp_key-".concat([].concat(Ot(t),[n]).join("-")));var d={key:l,eventKey:l};return w.cloneElement(r,d)}return r})}var jr={adjustX:1,adjustY:1},gv={topLeft:{points:["bl","tl"],overflow:jr},topRight:{points:["br","tr"],overflow:jr},bottomLeft:{points:["tl","bl"],overflow:jr},bottomRight:{points:["tr","br"],overflow:jr},leftTop:{points:["tr","tl"],overflow:jr},leftBottom:{points:["br","bl"],overflow:jr},rightTop:{points:["tl","tr"],overflow:jr},rightBottom:{points:["bl","br"],overflow:jr}},vv={topLeft:{points:["bl","tl"],overflow:jr},topRight:{points:["br","tr"],overflow:jr},bottomLeft:{points:["tl","bl"],overflow:jr},bottomRight:{points:["tr","br"],overflow:jr},rightTop:{points:["tr","tl"],overflow:jr},rightBottom:{points:["br","bl"],overflow:jr},leftTop:{points:["tl","tr"],overflow:jr},leftBottom:{points:["bl","br"],overflow:jr}};function k1(e,t,r){if(t)return t;if(r)return r[e]||r.other}var bv={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function yv(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,c=e.popupClassName,l=e.popupOffset,f=e.disabled,d=e.mode,m=e.onVisibleChange,v=w.useContext(An),g=v.getPopupContainer,y=v.rtl,C=v.subMenuOpenDelay,D=v.subMenuCloseDelay,p=v.builtinPlacements,A=v.triggerSubMenuAction,O=v.forceSubMenuRender,B=v.rootClassName,F=v.motion,N=v.defaultMotions,I=w.useState(!1),P=ut(I,2),H=P[0],T=P[1],V=y?ze(ze({},vv),p):ze(ze({},gv),p),K=bv[d],G=k1(d,F,N),Y=w.useRef(G);d!=="inline"&&(Y.current=G);var L=ze(ze({},Y.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),W=w.useRef();return w.useEffect(function(){return W.current=vn(function(){T(r)}),function(){vn.cancel(W.current)}},[r]),w.createElement(e1,{prefixCls:t,popupClassName:Je("".concat(t,"-popup"),$e({},"".concat(t,"-rtl"),y),c,B),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:V,popupPlacement:K,popupVisible:H,popup:o,popupStyle:a,popupAlign:l&&{offset:l},action:f?[]:[A],mouseEnterDelay:C,mouseLeaveDelay:D,onPopupVisibleChange:m,forceRender:O,popupMotion:L,fresh:!0},n)}function xv(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",c=w.useContext(An),l=c.prefixCls,f=c.forceSubMenuRender,d=c.motion,m=c.defaultMotions,v=c.mode,g=w.useRef(!1);g.current=v===a;var y=w.useState(!g.current),C=ut(y,2),D=C[0],p=C[1],A=g.current?r:!1;w.useEffect(function(){g.current&&p(!1)},[v]);var O=ze({},k1(a,d,m));n.length>1&&(O.motionAppear=!1);var B=O.onVisibleChanged;return O.onVisibleChanged=function(F){return!g.current&&!F&&p(!0),B==null?void 0:B(F)},D?null:w.createElement(Za,{mode:a,locked:!g.current},w.createElement(O0,ht({visible:A},O,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),function(F){var N=F.className,I=F.style;return w.createElement(j0,{id:t,className:N,style:I},o)}))}var Cv=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],wv=["active"],Dv=w.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.title,a=e.eventKey;e.warnKey;var c=e.disabled,l=e.internalPopupClose,f=e.children,d=e.itemIcon,m=e.expandIcon,v=e.popupClassName,g=e.popupOffset,y=e.popupStyle,C=e.onClick,D=e.onMouseEnter,p=e.onMouseLeave,A=e.onTitleClick,O=e.onTitleMouseEnter,B=e.onTitleMouseLeave,F=ir(e,Cv),N=v1(a),I=w.useContext(An),P=I.prefixCls,H=I.mode,T=I.openKeys,V=I.disabled,K=I.overflowDisabled,G=I.activeKey,Y=I.selectedKeys,L=I.itemIcon,W=I.expandIcon,U=I.onItemClick,X=I.onOpenChange,te=I.onActive,z=w.useContext(P0),le=z._internalRenderSubMenuItem,ce=w.useContext(x1),he=ce.isSubPathKey,ne=va(),pe="".concat(P,"-submenu"),Oe=V||c,Q=w.useRef(),fe=w.useRef(),se=d??L,ae=m??W,ge=T.includes(a),be=!K&&ge,Ce=he(Y,a),ke=w1(a,Oe,O,B),Ee=ke.active,Be=ir(ke,wv),Ne=w.useState(!1),Me=ut(Ne,2),He=Me[0],Ze=Me[1],tt=function(vt){Oe||Ze(vt)},Te=function(vt){tt(!0),D==null||D({key:a,domEvent:vt})},_e=function(vt){tt(!1),p==null||p({key:a,domEvent:vt})},We=w.useMemo(function(){return Ee||(H!=="inline"?He||he([G],a):!1)},[H,Ee,G,He,a,he]),st=D1(ne.length),rt=function(vt){Oe||(A==null||A({key:a,domEvent:vt}),H==="inline"&&X(a,!ge))},Qe=La(function(Dt){C==null||C(bs(Dt)),U(Dt)}),St=function(vt){H!=="inline"&&X(a,vt)},mt=function(){te(a)},ct=N&&"".concat(N,"-popup"),bt=w.useMemo(function(){return w.createElement(E1,{icon:H!=="horizontal"?ae:void 0,props:ze(ze({},e),{},{isOpen:be,isSubMenu:!0})},w.createElement("i",{className:"".concat(pe,"-arrow")}))},[H,ae,e,be,pe]),Ie=w.createElement("div",ht({role:"menuitem",style:st,className:"".concat(pe,"-title"),tabIndex:Oe?null:-1,ref:Q,title:typeof o=="string"?o:null,"data-menu-id":K&&N?null:N,"aria-expanded":be,"aria-haspopup":!0,"aria-controls":ct,"aria-disabled":Oe,onClick:rt,onFocus:mt},Be),o,bt),ue=w.useRef(H);if(H!=="inline"&&ne.length>1?ue.current="vertical":ue.current=H,!K){var nt=ue.current;Ie=w.createElement(yv,{mode:nt,prefixCls:pe,visible:!l&&be&&H!=="inline",popupClassName:v,popupOffset:g,popupStyle:y,popup:w.createElement(Za,{mode:nt==="horizontal"?"vertical":nt},w.createElement(j0,{id:ct,ref:fe},f)),disabled:Oe,onVisibleChange:St},Ie)}var pt=w.createElement(Ha.Item,ht({ref:t,role:"none"},F,{component:"li",style:r,className:Je(pe,"".concat(pe,"-").concat(H),n,$e($e($e($e({},"".concat(pe,"-open"),be),"".concat(pe,"-active"),We),"".concat(pe,"-selected"),Ce),"".concat(pe,"-disabled"),Oe)),onMouseEnter:Te,onMouseLeave:_e}),Ie,!K&&w.createElement(xv,{id:ct,open:be,keyPath:ne},f));return le&&(pt=le(pt,e,{selected:Ce,active:We,open:be,disabled:Oe})),w.createElement(Za,{onItemClick:Qe,mode:H==="horizontal"?"vertical":H,itemIcon:se,expandIcon:ae},pt)}),qs=w.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=va(r),a=_0(n,o),c=Hs();w.useEffect(function(){if(c)return c.registerPath(r,o),function(){c.unregisterPath(r,o)}},[o]);var l;return c?l=a:l=w.createElement(Dv,ht({ref:t},e),a),w.createElement(y1.Provider,{value:o},l)});function H0(e){var t=e.className,r=e.style,n=w.useContext(An),o=n.prefixCls,a=Hs();return a?null:w.createElement("li",{role:"separator",className:Je("".concat(o,"-item-divider"),t),style:r})}var Ev=["className","title","eventKey","children"],kv=w.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var o=e.children,a=ir(e,Ev),c=w.useContext(An),l=c.prefixCls,f="".concat(l,"-item-group");return w.createElement("li",ht({ref:t,role:"presentation"},a,{onClick:function(m){return m.stopPropagation()},className:Je(f,r)}),w.createElement("div",{role:"presentation",className:"".concat(f,"-title"),title:typeof n=="string"?n:void 0},n),w.createElement("ul",{role:"group",className:"".concat(f,"-list")},o))}),K0=w.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=va(r),a=_0(n,o),c=Hs();return c?a:w.createElement(kv,ht({ref:t},ro(e,["warnKey"])),a)}),Sv=["label","children","key","type","extra"];function _u(e,t,r){var n=t.item,o=t.group,a=t.submenu,c=t.divider;return(e||[]).map(function(l,f){if(l&&dn(l)==="object"){var d=l,m=d.label,v=d.children,g=d.key,y=d.type,C=d.extra,D=ir(d,Sv),p=g??"tmp-".concat(f);return v||y==="group"?y==="group"?w.createElement(o,ht({key:p},D,{title:m}),_u(v,t,r)):w.createElement(a,ht({key:p},D,{title:m}),_u(v,t,r)):y==="divider"?w.createElement(c,ht({key:p},D)):w.createElement(n,ht({key:p},D,{extra:C}),m,(!!C||C===0)&&w.createElement("span",{className:"".concat(r,"-item-extra")},C))}return null}).filter(function(l){return l})}function Zd(e,t,r,n,o){var a=e,c=ze({divider:H0,item:Ks,group:K0,submenu:qs},n);return t&&(a=_u(t,c,o)),_0(a,r)}var Bv=["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"],Fo=[],Av=w.forwardRef(function(e,t){var r,n=e,o=n.prefixCls,a=o===void 0?"rc-menu":o,c=n.rootClassName,l=n.style,f=n.className,d=n.tabIndex,m=d===void 0?0:d,v=n.items,g=n.children,y=n.direction,C=n.id,D=n.mode,p=D===void 0?"vertical":D,A=n.inlineCollapsed,O=n.disabled,B=n.disabledOverflow,F=n.subMenuOpenDelay,N=F===void 0?.1:F,I=n.subMenuCloseDelay,P=I===void 0?.1:I,H=n.forceSubMenuRender,T=n.defaultOpenKeys,V=n.openKeys,K=n.activeKey,G=n.defaultActiveFirst,Y=n.selectable,L=Y===void 0?!0:Y,W=n.multiple,U=W===void 0?!1:W,X=n.defaultSelectedKeys,te=n.selectedKeys,z=n.onSelect,le=n.onDeselect,ce=n.inlineIndent,he=ce===void 0?24:ce,ne=n.motion,pe=n.defaultMotions,Oe=n.triggerSubMenuAction,Q=Oe===void 0?"hover":Oe,fe=n.builtinPlacements,se=n.itemIcon,ae=n.expandIcon,ge=n.overflowedIndicator,be=ge===void 0?"...":ge,Ce=n.overflowedIndicatorPopupClassName,ke=n.getPopupContainer,Ee=n.onClick,Be=n.onOpenChange,Ne=n.onKeyDown;n.openAnimation,n.openTransitionName;var Me=n._internalRenderMenuItem,He=n._internalRenderSubMenuItem,Ze=n._internalComponents,tt=ir(n,Bv),Te=w.useMemo(function(){return[Zd(g,v,Fo,Ze,a),Zd(g,v,Fo,{},a)]},[g,v,Ze]),_e=ut(Te,2),We=_e[0],st=_e[1],rt=w.useState(!1),Qe=ut(rt,2),St=Qe[0],mt=Qe[1],ct=w.useRef(),bt=iv(C),Ie=y==="rtl",ue=Jn(T,{value:V,postState:function(qt){return qt||Fo}}),nt=ut(ue,2),pt=nt[0],Dt=nt[1],vt=function(qt){var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function $r(){Dt(qt),Be==null||Be(qt)}Qt?q4($r):$r()},Kt=w.useState(pt),Ct=ut(Kt,2),Nt=Ct[0],_t=Ct[1],rr=w.useRef(!1),yt=w.useMemo(function(){return(p==="inline"||p==="vertical")&&A?["vertical",A]:[p,!1]},[p,A]),cr=ut(yt,2),Xt=cr[0],Pr=cr[1],kr=Xt==="inline",yr=w.useState(Xt),dt=ut(yr,2),nr=dt[0],or=dt[1],Tt=w.useState(Pr),x=ut(Tt,2),k=x[0],Pe=x[1];w.useEffect(function(){or(Xt),Pe(Pr),rr.current&&(kr?Dt(Nt):vt(Fo))},[Xt,Pr]);var E=w.useState(0),j=ut(E,2),Ue=j[0],De=j[1],de=Ue>=We.length-1||nr!=="horizontal"||B;w.useEffect(function(){kr&&_t(pt)},[pt]),w.useEffect(function(){return rr.current=!0,function(){rr.current=!1}},[]);var Ae=ov(),ve=Ae.registerPath,je=Ae.unregisterPath,ie=Ae.refreshOverflowKeys,we=Ae.isSubPathKey,M=Ae.getKeyPath,qe=Ae.getKeys,J=Ae.getSubPathKeys,Mt=w.useMemo(function(){return{registerPath:ve,unregisterPath:je}},[ve,je]),kt=w.useMemo(function(){return{isSubPathKey:we}},[we]);w.useEffect(function(){ie(de?Fo:We.slice(Ue+1).map(function(lr){return lr.key}))},[Ue,de]);var at=Jn(K||G&&((r=We[0])===null||r===void 0?void 0:r.key),{value:K}),gt=ut(at,2),it=gt[0],qr=gt[1],fn=La(function(lr){qr(lr)}),ko=La(function(){qr(void 0)});B0(t,function(){return{list:ct.current,focus:function(qt){var Qt,$r=qe(),Sr=Lu($r,bt),_n=Sr.elements,Ao=Sr.key2element,Hn=Sr.element2key,Kn=z0(ct.current,_n),ao=it??(Kn[0]?Hn.get(Kn[0]):(Qt=We.find(function(Cn){return!Cn.props.disabled}))===null||Qt===void 0?void 0:Qt.key),ye=Ao.get(ao);if(ao&&ye){var Jt;ye==null||(Jt=ye.focus)===null||Jt===void 0||Jt.call(ye,qt)}}}});var ka=Jn(X||[],{value:te,postState:function(qt){return Array.isArray(qt)?qt:qt==null?Fo:[qt]}}),xn=ut(ka,2),Jr=xn[0],Lr=xn[1],Sa=function(qt){if(L){var Qt=qt.key,$r=Jr.includes(Qt),Sr;U?$r?Sr=Jr.filter(function(Ao){return Ao!==Qt}):Sr=[].concat(Ot(Jr),[Qt]):Sr=[Qt],Lr(Sr);var _n=ze(ze({},qt),{},{selectedKeys:Sr});$r?le==null||le(_n):z==null||z(_n)}!U&&pt.length&&nr!=="inline"&&vt(Fo)},Vo=La(function(lr){Ee==null||Ee(bs(lr)),Sa(lr)}),So=La(function(lr,qt){var Qt=pt.filter(function(Sr){return Sr!==lr});if(qt)Qt.push(lr);else if(nr!=="inline"){var $r=J(lr);Qt=Qt.filter(function(Sr){return!$r.has(Sr)})}bo(pt,Qt,!0)||vt(Qt,!0)}),Ba=function(qt,Qt){var $r=Qt??!pt.includes(qt);So(qt,$r)},Aa=tv(nr,it,Ie,bt,ct,qe,M,qr,Ba,Ne);w.useEffect(function(){mt(!0)},[]);var Bo=w.useMemo(function(){return{_internalRenderMenuItem:Me,_internalRenderSubMenuItem:He}},[Me,He]),Fr=nr!=="horizontal"||B?We:We.map(function(lr,qt){return w.createElement(Za,{key:lr.key,overflowDisabled:qt>Ue},lr)}),Fn=w.createElement(Ha,ht({id:C,ref:ct,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:Ks,className:Je(a,"".concat(a,"-root"),"".concat(a,"-").concat(nr),f,$e($e({},"".concat(a,"-inline-collapsed"),k),"".concat(a,"-rtl"),Ie),c),dir:y,style:l,role:"menu",tabIndex:m,data:Fr,renderRawItem:function(qt){return qt},renderRawRest:function(qt){var Qt=qt.length,$r=Qt?We.slice(-Qt):null;return w.createElement(qs,{eventKey:ju,title:be,disabled:de,internalPopupClose:Qt===0,popupClassName:Ce},$r)},maxCount:nr!=="horizontal"||B?Ha.INVALIDATE:Ha.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(qt){De(qt)},onKeyDown:Aa},tt));return w.createElement(P0.Provider,{value:Bo},w.createElement(m1.Provider,{value:bt},w.createElement(Za,{prefixCls:a,rootClassName:c,mode:nr,openKeys:pt,rtl:Ie,disabled:O,motion:St?ne:null,defaultMotions:St?pe:null,activeKey:it,onActive:fn,onInactive:ko,selectedKeys:Jr,inlineIndent:he,subMenuOpenDelay:N,subMenuCloseDelay:P,forceSubMenuRender:H,builtinPlacements:fe,triggerSubMenuAction:Q,getPopupContainer:ke,itemIcon:se,expandIcon:ae,onItemClick:Vo,onOpenChange:So},w.createElement(x1.Provider,{value:kt},Fn),w.createElement("div",{style:{display:"none"},"aria-hidden":!0},w.createElement(b1.Provider,{value:Mt},st)))))}),fi=Av;fi.Item=Ks;fi.SubMenu=qs;fi.ItemGroup=K0;fi.Divider=H0;const S1=w.createContext({});var Fv={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"},Ov=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:Fv}))},B1=w.forwardRef(Ov);const ys=to({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var Nv=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 A1=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=Nv(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=w.useContext(no),c=a("menu",t),l=Je({[`${c}-item-divider-dashed`]:!!n},r);return w.createElement(H0,Object.assign({className:l},o))},F1=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:c,extra:l}=e,{prefixCls:f,firstLevel:d,direction:m,disableMenuItemTitleTooltip:v,inlineCollapsed:g}=w.useContext(ys),y=B=>{const F=n==null?void 0:n[0],N=w.createElement("span",{className:Je(`${f}-title-content`,{[`${f}-title-content-with-extra`]:!!l||l===0})},n);return(!o||w.isValidElement(n)&&n.type==="span")&&n&&B&&d&&typeof F=="string"?w.createElement("div",{className:`${f}-inline-collapsed-noicon`},F.charAt(0)):N},{siderCollapsed:C}=w.useContext(S1);let D=a;typeof a>"u"?D=d?n:"":a===!1&&(D="");const p={title:D};!C&&!g&&(p.title=null,p.open=!1);const A=zs(n).length;let O=w.createElement(Ks,Object.assign({},ro(e,["title","icon","danger"]),{className:Je({[`${f}-item-danger`]:c,[`${f}-item-only-child`]:(o?A+1:A)===1},r),title:typeof a=="string"?a:void 0}),la(o,{className:Je(w.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${f}-item-icon`)}),y(g));return v||(O=w.createElement(cs,Object.assign({},p,{placement:m==="rtl"?"left":"right",classNames:{root:`${f}-inline-collapsed-tooltip`}}),O)),O};var $v=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 xs=w.createContext(null),O1=w.forwardRef((e,t)=>{const{children:r}=e,n=$v(e,["children"]),o=w.useContext(xs),a=w.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),c=X4(r),l=r1(t,c?A0(r):null);return w.createElement(xs.Provider,{value:a},w.createElement(Y4,{space:!0},c?w.cloneElement(r,{ref:l}):r))}),Tv=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:a,lineType:c,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${Ye(a)} ${c} ${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"}}}},Mv=({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(${Ye(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Ye(t)})`}}}}),Qd=e=>s1(e),Jd=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:c,itemBg:l,subMenuItemBg:f,itemSelectedBg:d,activeBarHeight:m,activeBarWidth:v,activeBarBorderWidth:g,motionDurationSlow:y,motionEaseInOut:C,motionEaseOut:D,itemPaddingInline:p,motionDurationMid:A,itemHoverColor:O,lineType:B,colorSplit:F,itemDisabledColor:N,dangerItemColor:I,dangerItemHoverColor:P,dangerItemSelectedColor:H,dangerItemActiveBg:T,dangerItemSelectedBg:V,popupBg:K,itemHoverBg:G,itemActiveBg:Y,menuSubMenuBg:L,horizontalItemSelectedColor:W,horizontalItemSelectedBg:U,horizontalItemBorderRadius:X,horizontalItemHoverBg:te}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:l,[`&${r}-root:focus-visible`]:Object.assign({},Qd(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:c}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:a},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},Qd(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${N} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:O}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:G},"&:active":{backgroundColor:Y}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:G},"&:active":{backgroundColor:Y}}},[`${r}-item-danger`]:{color:I,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:P}},[`&${r}-item:active`]:{background:T}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:H},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:d,[`&${r}-item-danger`]:{backgroundColor:V}},[`&${r}-submenu > ${r}`]:{backgroundColor:L},[`&${r}-popup > ${r}`]:{backgroundColor:K},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:K},[`&${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:X,"&::after":{position:"absolute",insetInline:p,bottom:0,borderBottom:`${Ye(m)} solid transparent`,transition:`border-color ${y} ${C}`,content:'""'},"&:hover, &-active, &-open":{background:te,"&::after":{borderBottomWidth:m,borderBottomColor:W}},"&-selected":{color:W,backgroundColor:U,"&:hover":{backgroundColor:U},"&::after":{borderBottomWidth:m,borderBottomColor:W}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${Ye(g)} ${B} ${F}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:f},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Ye(v)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${A} ${D}`,`opacity ${A} ${D}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:H}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${A} ${C}`,`opacity ${A} ${C}`].join(",")}}}}}},ef=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:c,itemMarginBlock:l,itemWidth:f,itemPaddingInline:d}=e,m=e.calc(a).add(o).add(c).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:Ye(r),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:l,width:f},[`> ${t}-item,
|
|
5
|
+
> ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:Ye(r)},[`${t}-item-group-list ${t}-submenu-title,
|
|
6
|
+
${t}-submenu-title`]:{paddingInlineEnd:m}}},Rv=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:c,motionEaseOut:l,paddingXL:f,itemMarginInline:d,fontSizeLG:m,motionDurationFast:v,motionDurationSlow:g,paddingXS:y,boxShadowSecondary:C,collapsedWidth:D,collapsedIconSize:p}=e,A={height:n,lineHeight:Ye(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},ef(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},ef(e)),{boxShadow:C})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${Ye(e.calc(c).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`]:A,[`& ${t}-item-group-title`]:{paddingInlineStart:f}},[`${t}-item`]:A}},{[`${t}-inline-collapsed`]:{width:D,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:m,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% - ${Ye(e.calc(p).div(2).equal())} - ${Ye(d)})`,textOverflow:"clip",[`
|
|
10
|
+
${t}-submenu-arrow,
|
|
11
|
+
${t}-submenu-expand-icon
|
|
12
|
+
`]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:p,lineHeight:Ye(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({},N0),{paddingInline:y})}}]},tf=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:c,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, ${c}`]:{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({},G4()),[`&${t}-item-only-child`]:{[`> ${c}, > ${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"}}}},rf=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:a,menuArrowOffset:c}=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(${Ye(e.calc(c).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Ye(c)})`}}}}},Iv=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:c,paddingXS:l,padding:f,colorSplit:d,lineWidth:m,zIndexPopup:v,borderRadiusLG:g,subMenuItemBorderRadius:y,menuArrowSize:C,menuArrowOffset:D,lineType:p,groupTitleLineHeight:A,groupTitleFontSize:O}=e;return[{"":{[r]:Object.assign(Object.assign({},Mu()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ci(e)),Mu()),{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:`${Ye(l)} ${Ye(f)}`,fontSize:O,lineHeight:A,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${o} ${c}`,`background ${o} ${c}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o} ${c}`,`background ${o} ${c}`,`padding ${a} ${c}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${o} ${c}`,`padding ${o} ${c}`].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:p,borderWidth:0,borderTopWidth:m,marginBlock:m,padding:0,"&-dashed":{borderStyle:"dashed"}}}),tf(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${Ye(e.calc(n).mul(2).equal())} ${Ye(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},tf(e)),rf(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:y},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${c}`}})},"\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}}}),rf(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
|
|
13
|
+
&-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Ye(D)})`},"&::after":{transform:`rotate(45deg) translateX(${Ye(e.calc(D).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${Ye(e.calc(C).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Ye(e.calc(D).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Ye(D)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},Pv=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:c,colorErrorBg:l,colorText:f,colorTextDescription:d,colorBgContainer:m,colorFillAlter:v,colorFillContent:g,lineWidth:y,lineWidthBold:C,controlItemBgActive:D,colorBgTextHover:p,controlHeightLG:A,lineHeight:O,colorBgElevated:B,marginXXS:F,padding:N,fontSize:I,controlHeightSM:P,fontSizeLG:H,colorTextLightSolid:T,colorErrorHover:V}=e,K=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,G=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:y,Y=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,L=new on(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:m,itemBg:m,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:g,itemActiveBg:D,colorSubItemBg:v,subMenuItemBg:v,colorItemBgSelected:D,itemSelectedBg:D,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:K,colorActiveBarHeight:C,activeBarHeight:C,colorActiveBarBorderSize:y,activeBarBorderWidth:G,colorItemTextDisabled:c,itemDisabledColor:c,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:Y,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:A,groupTitleLineHeight:O,collapsedWidth:A*2,popupBg:B,itemMarginBlock:F,itemPaddingInline:N,horizontalLineHeight:`${A*1.15}px`,iconSize:I,iconMarginInlineEnd:P-I,collapsedIconSize:H,groupTitleFontSize:I,darkItemDisabledColor:new on(T).setA(.25).toRgbString(),darkItemColor:L,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:T,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:L,darkItemHoverColor:T,darkDangerItemHoverColor:V,darkDangerItemSelectedColor:T,darkDangerItemActiveBg:a,itemWidth:K?`calc(100% + ${G}px)`:`calc(100% - ${Y*2}px)`}},zv=(e,t=e,r=!0)=>ui("Menu",o=>{const{colorBgElevated:a,controlHeightLG:c,fontSize:l,darkItemColor:f,darkDangerItemColor:d,darkItemBg:m,darkSubMenuItemBg:v,darkItemSelectedColor:g,darkItemSelectedBg:y,darkDangerItemSelectedBg:C,darkItemHoverBg:D,darkGroupTitleColor:p,darkItemHoverColor:A,darkItemDisabledColor:O,darkDangerItemHoverColor:B,darkDangerItemSelectedColor:F,darkDangerItemActiveBg:N,popupBg:I,darkPopupBg:P}=o,H=o.calc(l).div(7).mul(5).equal(),T=Lo(o,{menuArrowSize:H,menuHorizontalHeight:o.calc(c).mul(1.15).equal(),menuArrowOffset:o.calc(H).mul(.25).equal(),menuSubMenuBg:a,calc:o.calc,popupBg:I}),V=Lo(T,{itemColor:f,itemHoverColor:A,groupTitleColor:p,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:m,popupBg:P,subMenuItemBg:v,itemActiveBg:"transparent",itemSelectedBg:y,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:D,itemDisabledColor:O,dangerItemColor:d,dangerItemHoverColor:B,dangerItemSelectedColor:F,dangerItemActiveBg:N,dangerItemSelectedBg:C,menuSubMenuBg:v,horizontalItemSelectedColor:g,horizontalItemSelectedBg:y});return[Iv(T),Tv(T),Rv(T),Jd(T,"light"),Jd(V,"dark"),Mv(T),l1(T),ds(T,"slide-up"),ds(T,"slide-down"),$0(T,"zoom-big")]},Pv,{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),N1=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,c=w.useContext(ys),{prefixCls:l,inlineCollapsed:f,theme:d}=c,m=va();let v;if(!n)v=f&&!m.length&&o&&typeof o=="string"?w.createElement("div",{className:`${l}-inline-collapsed-noicon`},o.charAt(0)):w.createElement("span",{className:`${l}-title-content`},o);else{const C=w.isValidElement(o)&&o.type==="span";v=w.createElement(w.Fragment,null,la(n,{className:Je(w.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${l}-item-icon`)}),C?o:w.createElement("span",{className:`${l}-title-content`},o))}const g=w.useMemo(()=>Object.assign(Object.assign({},c),{firstLevel:!1}),[c]),[y]=Ls("Menu");return w.createElement(ys.Provider,{value:g},w.createElement(qs,Object.assign({},ro(e,["icon"]),{title:v,popupClassName:Je(l,r,`${l}-${a||d}`),popupStyle:Object.assign({zIndex:y},e.popupStyle)})))};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};function jl(e){return e===null||e===!1}const jv={item:F1,submenu:N1,divider:A1},_v=wo((e,t)=>{var r;const n=w.useContext(xs),o=n||{},{getPrefixCls:a,getPopupContainer:c,direction:l,menu:f}=w.useContext(no),d=a(),{prefixCls:m,className:v,style:g,theme:y="light",expandIcon:C,_internalDisableMenuItemTitleTooltip:D,inlineCollapsed:p,siderCollapsed:A,rootClassName:O,mode:B,selectable:F,onClick:N,overflowedIndicatorPopupClassName:I}=e,P=Lv(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),H=ro(P,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:B});const T=Bn((...he)=>{var ne;N==null||N.apply(void 0,he),(ne=o.onClick)===null||ne===void 0||ne.call(o)}),V=o.mode||B,K=F??o.selectable,G=p??A,Y={horizontal:{motionName:`${d}-slide-up`},inline:u1(d),other:{motionName:`${d}-zoom-big`}},L=a("menu",m||o.prefixCls),W=di(L),[U,X,te]=zv(L,W,!n),z=Je(`${L}-${y}`,f==null?void 0:f.className,v),le=w.useMemo(()=>{var he,ne;if(typeof C=="function"||jl(C))return C||null;if(typeof o.expandIcon=="function"||jl(o.expandIcon))return o.expandIcon||null;if(typeof(f==null?void 0:f.expandIcon)=="function"||jl(f==null?void 0:f.expandIcon))return(f==null?void 0:f.expandIcon)||null;const pe=(he=C??(o==null?void 0:o.expandIcon))!==null&&he!==void 0?he:f==null?void 0:f.expandIcon;return la(pe,{className:Je(`${L}-submenu-expand-icon`,w.isValidElement(pe)?(ne=pe.props)===null||ne===void 0?void 0:ne.className:void 0)})},[C,o==null?void 0:o.expandIcon,f==null?void 0:f.expandIcon,L]),ce=w.useMemo(()=>({prefixCls:L,inlineCollapsed:G||!1,direction:l,firstLevel:!0,theme:y,mode:V,disableMenuItemTitleTooltip:D}),[L,G,l,D,y]);return U(w.createElement(xs.Provider,{value:null},w.createElement(ys.Provider,{value:ce},w.createElement(fi,Object.assign({getPopupContainer:c,overflowedIndicator:w.createElement(B1,null),overflowedIndicatorPopupClassName:Je(L,`${L}-${y}`,I),mode:V,selectable:K,onClick:T},H,{inlineCollapsed:G,style:Object.assign(Object.assign({},f==null?void 0:f.style),g),className:z,prefixCls:L,direction:l,defaultMotions:Y,expandIcon:le,ref:t,rootClassName:Je(O,X,o.rootClassName,te,W),_internalComponents:jv})))))}),ba=wo((e,t)=>{const r=$t(null),n=w.useContext(S1);return B0(t,()=>({menu:r.current,focus:o=>{var a;(a=r.current)===null||a===void 0||a.focus(o)}})),w.createElement(_v,Object.assign({ref:r},e,n))});ba.Item=F1;ba.SubMenu=N1;ba.Divider=A1;ba.ItemGroup=K0;const Hv=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}}}}}},Kv=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:a,antCls:c,iconCls:l,motionDurationMid:f,paddingBlock:d,fontSize:m,dropdownEdgeChildPadding:v,colorTextDisabled:g,fontSizeIcon:y,controlPaddingHorizontal:C,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${c}-btn`]:{[`& > ${l}-down, & > ${c}-btn-icon > ${l}-down`]:{fontSize:y}},[`${t}-wrap`]:{position:"relative",[`${c}-btn > ${l}-down`]:{fontSize:y},[`${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"},[`&${c}-slide-down-enter${c}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
14
|
+
&${c}-slide-down-appear${c}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
15
|
+
&${c}-slide-down-enter${c}-slide-down-enter-active${t}-placement-bottom,
|
|
16
|
+
&${c}-slide-down-appear${c}-slide-down-appear-active${t}-placement-bottom,
|
|
17
|
+
&${c}-slide-down-enter${c}-slide-down-enter-active${t}-placement-bottomRight,
|
|
18
|
+
&${c}-slide-down-appear${c}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:e2},[`&${c}-slide-up-enter${c}-slide-up-enter-active${t}-placement-topLeft,
|
|
19
|
+
&${c}-slide-up-appear${c}-slide-up-appear-active${t}-placement-topLeft,
|
|
20
|
+
&${c}-slide-up-enter${c}-slide-up-enter-active${t}-placement-top,
|
|
21
|
+
&${c}-slide-up-appear${c}-slide-up-appear-active${t}-placement-top,
|
|
22
|
+
&${c}-slide-up-enter${c}-slide-up-enter-active${t}-placement-topRight,
|
|
23
|
+
&${c}-slide-up-appear${c}-slide-up-appear-active${t}-placement-topRight`]:{animationName:J4},[`&${c}-slide-down-leave${c}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
24
|
+
&${c}-slide-down-leave${c}-slide-down-leave-active${t}-placement-bottom,
|
|
25
|
+
&${c}-slide-down-leave${c}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Q4},[`&${c}-slide-up-leave${c}-slide-up-leave-active${t}-placement-topLeft,
|
|
26
|
+
&${c}-slide-up-leave${c}-slide-up-leave-active${t}-placement-top,
|
|
27
|
+
&${c}-slide-up-leave${c}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Z4}}},t2(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({},ci(e)),{[r]:Object.assign(Object.assign({padding:v,listStyleType:"none",backgroundColor:D,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},_d(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${Ye(d)} ${Ye(C)}`,color:e.colorTextDescription,transition:`all ${f}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:m,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:`${Ye(d)} ${Ye(C)}`,color:e.colorText,fontWeight:"normal",fontSize:m,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${f}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},_d(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:`${Ye(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:y,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${Ye(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(C).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}})})},[ds(e,"slide-up"),ds(e,"slide-down"),jd(e,"move-up"),jd(e,"move-down"),$0(e,"zoom-big")]]},qv=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},r2({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),n2(e)),Wv=ui("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=Lo(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[Kv(a),Hv(a)]},qv,{resetStyle:!1}),Ws=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:c,disabled:l,dropdownRender:f,popupRender:d,getPopupContainer:m,overlayClassName:v,rootClassName:g,overlayStyle:y,open:C,onOpenChange:D,visible:p,onVisibleChange:A,mouseEnterDelay:O=.15,mouseLeaveDelay:B=.1,autoAdjustOverflow:F=!0,placement:N="",overlay:I,transitionName:P,destroyOnHidden:H,destroyPopupOnHide:T}=e,{getPopupContainer:V,getPrefixCls:K,direction:G,dropdown:Y}=w.useContext(no),L=d||f;js();const W=w.useMemo(()=>{const Me=K();return P!==void 0?P:N.includes("top")?`${Me}-slide-down`:`${Me}-slide-up`},[K,N,P]),U=w.useMemo(()=>N?N.includes("Center")?N.slice(0,N.indexOf("Center")):N:G==="rtl"?"bottomRight":"bottomLeft",[N,G]),X=K("dropdown",o),te=di(X),[z,le,ce]=Wv(X,te),[,he]=T0(),ne=w.Children.only(U2(a)?w.createElement("span",null,a):a),pe=la(ne,{className:Je(`${X}-trigger`,{[`${X}-rtl`]:G==="rtl"},ne.props.className),disabled:(t=ne.props.disabled)!==null&&t!==void 0?t:l}),Oe=l?[]:c,Q=!!(Oe!=null&&Oe.includes("contextMenu")),[fe,se]=Jn(!1,{value:C??p}),ae=Bn(Me=>{D==null||D(Me,{source:"trigger"}),A==null||A(Me),se(Me)}),ge=Je(v,g,le,ce,te,Y==null?void 0:Y.className,{[`${X}-rtl`]:G==="rtl"}),be=o2({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:F,offset:he.marginXXS,arrowWidth:n?he.sizePopupArrow:0,borderRadius:he.borderRadius}),Ce=Bn(()=>{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=w.createElement(ba,Object.assign({},r)):typeof I=="function"?Me=I():Me=I,L&&(Me=L(Me)),Me=w.Children.only(typeof Me=="string"?w.createElement("span",null,Me):Me),w.createElement(O1,{prefixCls:`${X}-menu`,rootClassName:Je(ce,te),expandIcon:w.createElement("span",{className:`${X}-menu-submenu-arrow`},G==="rtl"?w.createElement(gs,{className:`${X}-menu-submenu-arrow-icon`}):w.createElement(vs,{className:`${X}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ce,validator:({mode:He})=>{}},Me)},[Ee,Be]=Ls("Dropdown",y==null?void 0:y.zIndex);let Ne=w.createElement(V2,Object.assign({alignPoint:Q},ro(e,["rootClassName"]),{mouseEnterDelay:O,mouseLeaveDelay:B,visible:fe,builtinPlacements:be,arrow:!!n,overlayClassName:ge,prefixCls:X,getPopupContainer:m||V,transitionName:W,trigger:Oe,overlay:ke,placement:U,onVisibleChange:ae,overlayStyle:Object.assign(Object.assign(Object.assign({},Y==null?void 0:Y.style),y),{zIndex:Ee}),autoDestroy:H??T}),pe);return Ee&&(Ne=w.createElement(a2.Provider,{value:Be},Ne)),z(Ne)},Vv=i2(Ws,"align",void 0,"dropdown",e=>e),Uv=e=>w.createElement(Vv,Object.assign({},e),w.createElement("span",null));Ws._InternalPanelDoNotUseOrYouWillBeFired=Uv;function nn(e,t){return e[t]}var Xv=["children"];function $1(e,t){return"".concat(e,"-").concat(t)}function Yv(e){return e&&e.type&&e.type.isTreeNode}function hi(e,t){return e??t}function ua(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,c=r||"title";return{title:c,_title:n||[c],key:o||"key",children:a||"children"}}function T1(e){function t(r){var n=zs(r);return n.map(function(o){if(!Yv(o))return jn(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,c=o.props,l=c.children,f=ir(c,Xv),d=ze({key:a},f),m=t(l);return m.length&&(d.children=m),d}).filter(function(o){return o})}return t(e)}function _l(e,t,r){var n=ua(r),o=n._title,a=n.key,c=n.children,l=new Set(t===!0?[]:t),f=[];function d(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return m.map(function(g,y){for(var C=$1(v?v.pos:"0",y),D=hi(g[a],C),p,A=0;A<o.length;A+=1){var O=o[A];if(g[O]!==void 0){p=g[O];break}}var B=Object.assign(ro(g,[].concat(Ot(o),[a,c])),{title:p,key:D,parent:v,pos:C,children:null,data:g,isStart:[].concat(Ot(v?v.isStart:[]),[y===0]),isEnd:[].concat(Ot(v?v.isEnd:[]),[y===m.length-1])});return f.push(B),t===!0||l.has(D)?B.children=d(g[c]||[],B):B.children=[],B})}return d(e),f}function Gv(e,t,r){var n={};dn(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,c=o.externalGetKey,l=o.fieldNames,f=ua(l),d=f.key,m=f.children,v=a||m,g;c?typeof c=="string"?g=function(D){return D[c]}:typeof c=="function"&&(g=function(D){return c(D)}):g=function(D,p){return hi(D[d],p)};function y(C,D,p,A){var O=C?C[v]:e,B=C?$1(p.pos,D):"0",F=C?[].concat(Ot(A),[C]):[];if(C){var N=g(C,B),I={node:C,index:D,pos:B,key:N,parentPos:p.node?p.pos:null,level:p.level+1,nodes:F};t(I)}O&&O.forEach(function(P,H){y(P,H,{node:C,pos:B,level:p?p.level+1:-1},F)})}y(null)}function q0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,c=t.childrenPropName,l=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,d=a||f,m={},v={},g={posEntities:m,keyEntities:v};return r&&(g=r(g)||g),Gv(e,function(y){var C=y.node,D=y.index,p=y.pos,A=y.key,O=y.parentPos,B=y.level,F=y.nodes,N={node:C,nodes:F,index:D,key:A,pos:p,level:B},I=hi(A,p);m[p]=N,v[I]=N,N.parent=m[O],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),n&&n(N,g)},{externalGetKey:d,childrenPropName:c,fieldNames:l}),o&&o(g),g}function Ka(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,c=t.checkedKeys,l=t.halfCheckedKeys,f=t.dragOverNodeKey,d=t.dropPosition,m=t.keyEntities,v=nn(m,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:c.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 Br(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,c=e.loading,l=e.halfChecked,f=e.dragOver,d=e.dragOverGapTop,m=e.dragOverGapBottom,v=e.pos,g=e.active,y=e.eventKey,C=ze(ze({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:c,halfChecked:l,dragOver:f,dragOverGapTop:d,dragOverGapBottom:m,pos:v,active:g,key:y});return"props"in C||Object.defineProperty(C,"props",{get:function(){return jn(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),C}function M1(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function Zv(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function Qv(e,t,r,n){for(var o=new Set(e),a=new Set,c=0;c<=r;c+=1){var l=t.get(c)||new Set;l.forEach(function(v){var g=v.key,y=v.node,C=v.children,D=C===void 0?[]:C;o.has(g)&&!n(y)&&D.filter(function(p){return!n(p.node)}).forEach(function(p){o.add(p.key)})})}for(var f=new Set,d=r;d>=0;d-=1){var m=t.get(d)||new Set;m.forEach(function(v){var g=v.parent,y=v.node;if(!(n(y)||!v.parent||f.has(v.parent.key))){if(n(v.parent.node)){f.add(g.key);return}var C=!0,D=!1;(g.children||[]).filter(function(p){return!n(p.node)}).forEach(function(p){var A=p.key,O=o.has(A);C&&!O&&(C=!1),!D&&(O||a.has(A))&&(D=!0)}),C&&o.add(g.key),D&&a.add(g.key),f.add(g.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(M1(a,o))}}function Jv(e,t,r,n,o){for(var a=new Set(e),c=new Set(t),l=0;l<=n;l+=1){var f=r.get(l)||new Set;f.forEach(function(g){var y=g.key,C=g.node,D=g.children,p=D===void 0?[]:D;!a.has(y)&&!c.has(y)&&!o(C)&&p.filter(function(A){return!o(A.node)}).forEach(function(A){a.delete(A.key)})})}c=new Set;for(var d=new Set,m=n;m>=0;m-=1){var v=r.get(m)||new Set;v.forEach(function(g){var y=g.parent,C=g.node;if(!(o(C)||!g.parent||d.has(g.parent.key))){if(o(g.parent.node)){d.add(y.key);return}var D=!0,p=!1;(y.children||[]).filter(function(A){return!o(A.node)}).forEach(function(A){var O=A.key,B=a.has(O);D&&!B&&(D=!1),!p&&(B||c.has(O))&&(p=!0)}),D||a.delete(y.key),p&&c.add(y.key),d.add(y.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(M1(c,a))}}function oa(e,t,r,n){var o=[],a;n?a=n:a=Zv;var c=new Set(e.filter(function(m){var v=!!nn(r,m);return v||o.push(m),v})),l=new Map,f=0;Object.keys(r).forEach(function(m){var v=r[m],g=v.level,y=l.get(g);y||(y=new Set,l.set(g,y)),y.add(v),f=Math.max(f,g)}),jn(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(m){return"'".concat(m,"'")}).join(", ")));var d;return t===!0?d=Qv(c,l,f,a):d=Jv(c,t.halfCheckedKeys,l,f,a),d}var e3=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 R1=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=w.useContext(no),{prefixCls:o,type:a="default",danger:c,disabled:l,loading:f,onClick:d,htmlType:m,children:v,className:g,menu:y,arrow:C,autoFocus:D,overlay:p,trigger:A,align:O,open:B,onOpenChange:F,placement:N,getPopupContainer:I,href:P,icon:H=w.createElement(B1,null),title:T,buttonsRender:V=be=>be,mouseEnterDelay:K,mouseLeaveDelay:G,overlayClassName:Y,overlayStyle:L,destroyOnHidden:W,destroyPopupOnHide:U,dropdownRender:X,popupRender:te}=e,z=e3(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"]),le=r("dropdown",o),ce=`${le}-button`,ne={menu:y,arrow:C,autoFocus:D,align:O,disabled:l,trigger:l?[]:A,onOpenChange:F,getPopupContainer:I||t,mouseEnterDelay:K,mouseLeaveDelay:G,overlayClassName:Y,overlayStyle:L,destroyOnHidden:W,popupRender:te||X},{compactSize:pe,compactItemClassnames:Oe}=s2(le,n),Q=Je(ce,Oe,g);"destroyPopupOnHide"in e&&(ne.destroyPopupOnHide=U),"overlay"in e&&(ne.overlay=p),"open"in e&&(ne.open=B),"placement"in e?ne.placement=N:ne.placement=n==="rtl"?"bottomLeft":"bottomRight";const fe=w.createElement(fs,{type:a,danger:c,disabled:l,loading:f,onClick:d,htmlType:m,href:P,title:T},v),se=w.createElement(fs,{type:a,danger:c,icon:H}),[ae,ge]=V([fe,se]);return w.createElement(F2.Compact,Object.assign({className:Q,size:pe,block:!0},z),ae,w.createElement(Ws,Object.assign({},ne),ge))};R1.__ANT_BUTTON=!0;const W0=Ws;W0.Button=R1;function I1(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function t3(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 go(e,t,r,n){var o=Tu.unstable_batchedUpdates?function(c){Tu.unstable_batchedUpdates(r,c)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var pi=w.createContext(null),r3=function(t){var r=t.visible,n=t.maskTransitionName,o=t.getContainer,a=t.prefixCls,c=t.rootClassName,l=t.icons,f=t.countRender,d=t.showSwitch,m=t.showProgress,v=t.current,g=t.transform,y=t.count,C=t.scale,D=t.minScale,p=t.maxScale,A=t.closeIcon,O=t.onActive,B=t.onClose,F=t.onZoomIn,N=t.onZoomOut,I=t.onRotateRight,P=t.onRotateLeft,H=t.onFlipX,T=t.onFlipY,V=t.onReset,K=t.toolbarRender,G=t.zIndex,Y=t.image,L=Do(pi),W=l.rotateLeft,U=l.rotateRight,X=l.zoomIn,te=l.zoomOut,z=l.close,le=l.left,ce=l.right,he=l.flipX,ne=l.flipY,pe="".concat(a,"-operations-operation");w.useEffect(function(){var Ne=function(He){He.keyCode===Er.ESC&&B()};return r&&window.addEventListener("keydown",Ne),function(){window.removeEventListener("keydown",Ne)}},[r]);var Oe=function(Me,He){Me.preventDefault(),Me.stopPropagation(),O(He)},Q=w.useCallback(function(Ne){var Me=Ne.type,He=Ne.disabled,Ze=Ne.onClick,tt=Ne.icon;return w.createElement("div",{key:Me,className:Je(pe,"".concat(a,"-operations-operation-").concat(Me),$e({},"".concat(a,"-operations-operation-disabled"),!!He)),onClick:Ze},tt)},[pe,a]),fe=d?Q({icon:le,onClick:function(Me){return Oe(Me,-1)},type:"prev",disabled:v===0}):void 0,se=d?Q({icon:ce,onClick:function(Me){return Oe(Me,1)},type:"next",disabled:v===y-1}):void 0,ae=Q({icon:ne,onClick:T,type:"flipY"}),ge=Q({icon:he,onClick:H,type:"flipX"}),be=Q({icon:W,onClick:P,type:"rotateLeft"}),Ce=Q({icon:U,onClick:I,type:"rotateRight"}),ke=Q({icon:te,onClick:N,type:"zoomOut",disabled:C<=D}),Ee=Q({icon:X,onClick:F,type:"zoomIn",disabled:C===p}),Be=w.createElement("div",{className:"".concat(a,"-operations")},ae,ge,be,Ce,ke,Ee);return w.createElement(O0,{visible:r,motionName:n},function(Ne){var Me=Ne.className,He=Ne.style;return w.createElement(l2,{open:!0,getContainer:o??document.body},w.createElement("div",{className:Je("".concat(a,"-operations-wrapper"),Me,c),style:ze(ze({},He),{},{zIndex:G})},A===null?null:w.createElement("button",{className:"".concat(a,"-close"),onClick:B},A||z),d&&w.createElement(w.Fragment,null,w.createElement("div",{className:Je("".concat(a,"-switch-left"),$e({},"".concat(a,"-switch-left-disabled"),v===0)),onClick:function(tt){return Oe(tt,-1)}},le),w.createElement("div",{className:Je("".concat(a,"-switch-right"),$e({},"".concat(a,"-switch-right-disabled"),v===y-1)),onClick:function(tt){return Oe(tt,1)}},ce)),w.createElement("div",{className:"".concat(a,"-footer")},m&&w.createElement("div",{className:"".concat(a,"-progress")},f?f(v+1,y):w.createElement("bdi",null,"".concat(v+1," / ").concat(y))),K?K(Be,ze(ze({icons:{prevIcon:fe,nextIcon:se,flipYIcon:ae,flipXIcon:ge,rotateLeftIcon:be,rotateRightIcon:Ce,zoomOutIcon:ke,zoomInIcon:Ee},actions:{onActive:O,onFlipY:T,onFlipX:H,onRotateLeft:P,onRotateRight:I,onZoomOut:N,onZoomIn:F,onReset:V,onClose:B},transform:g},L?{current:v,total:y}:{}),{},{image:Y})):Be)))})},Fi={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function n3(e,t,r,n){var o=$t(null),a=$t([]),c=Bt(Fi),l=ut(c,2),f=l[0],d=l[1],m=function(C){d(Fi),bo(Fi,f)||n==null||n({transform:Fi,action:C})},v=function(C,D){o.current===null&&(a.current=[],o.current=vn(function(){d(function(p){var A=p;return a.current.forEach(function(O){A=ze(ze({},A),O)}),o.current=null,n==null||n({transform:A,action:D}),A})})),a.current.push(ze(ze({},f),C))},g=function(C,D,p,A,O){var B=e.current,F=B.width,N=B.height,I=B.offsetWidth,P=B.offsetHeight,H=B.offsetLeft,T=B.offsetTop,V=C,K=f.scale*C;K>r?(K=r,V=r/f.scale):K<t&&(K=O?K:t,V=K/f.scale);var G=p??innerWidth/2,Y=A??innerHeight/2,L=V-1,W=L*F*.5,U=L*N*.5,X=L*(G-f.x-H),te=L*(Y-f.y-T),z=f.x-(X-W),le=f.y-(te-U);if(C<1&&K===1){var ce=I*K,he=P*K,ne=I1(),pe=ne.width,Oe=ne.height;ce<=pe&&he<=Oe&&(z=0,le=0)}v({x:z,y:le,scale:K},D)};return{transform:f,resetTransform:m,updateTransform:v,dispatchZoomChange:g}}function nf(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 P1(e,t,r,n){var o=I1(),a=o.width,c=o.height,l=null;return e<=a&&t<=c?l={x:0,y:0}:(e>a||t>c)&&(l=ze(ze({},nf("x",r,e,a)),nf("y",n,t,c))),l}var ea=1,o3=1;function a3(e,t,r,n,o,a,c){var l=o.rotate,f=o.scale,d=o.x,m=o.y,v=Bt(!1),g=ut(v,2),y=g[0],C=g[1],D=$t({diffX:0,diffY:0,transformX:0,transformY:0}),p=function(N){!t||N.button!==0||(N.preventDefault(),N.stopPropagation(),D.current={diffX:N.pageX-d,diffY:N.pageY-m,transformX:d,transformY:m},C(!0))},A=function(N){r&&y&&a({x:N.pageX-D.current.diffX,y:N.pageY-D.current.diffY},"move")},O=function(){if(r&&y){C(!1);var N=D.current,I=N.transformX,P=N.transformY,H=d!==I&&m!==P;if(!H)return;var T=e.current.offsetWidth*f,V=e.current.offsetHeight*f,K=e.current.getBoundingClientRect(),G=K.left,Y=K.top,L=l%180!==0,W=P1(L?V:T,L?T:V,G,Y);W&&a(ze({},W),"dragRebound")}},B=function(N){if(!(!r||N.deltaY==0)){var I=Math.abs(N.deltaY/100),P=Math.min(I,o3),H=ea+P*n;N.deltaY>0&&(H=ea/H),c(H,"wheel",N.clientX,N.clientY)}};return Ut(function(){var F,N,I,P;if(t){I=go(window,"mouseup",O,!1),P=go(window,"mousemove",A,!1);try{window.top!==window.self&&(F=go(window.top,"mouseup",O,!1),N=go(window.top,"mousemove",A,!1))}catch{}}return function(){var H,T,V,K;(H=I)===null||H===void 0||H.remove(),(T=P)===null||T===void 0||T.remove(),(V=F)===null||V===void 0||V.remove(),(K=N)===null||K===void 0||K.remove()}},[r,y,d,m,l,t]),{isMoving:y,onMouseDown:p,onMouseMove:A,onMouseUp:O,onWheel:B}}function i3(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 z1(e){var t=e.src,r=e.isCustomPlaceholder,n=e.fallback,o=Bt(r?"loading":"normal"),a=ut(o,2),c=a[0],l=a[1],f=$t(!1),d=c==="error";Ut(function(){var y=!0;return i3(t).then(function(C){!C&&y&&l("error")}),function(){y=!1}},[t]),Ut(function(){r&&!f.current?l("loading"):d&&l("normal")},[t]);var m=function(){l("normal")},v=function(C){f.current=!1,c==="loading"&&C!==null&&C!==void 0&&C.complete&&(C.naturalWidth||C.naturalHeight)&&(f.current=!0,m())},g=d&&n?{src:n}:{onLoad:m,src:t};return[v,g,c]}function Cs(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.hypot(r,n)}function s3(e,t,r,n){var o=Cs(e,r),a=Cs(t,n);if(o===0&&a===0)return[e.x,e.y];var c=o/(o+a),l=e.x+c*(t.x-e.x),f=e.y+c*(t.y-e.y);return[l,f]}function l3(e,t,r,n,o,a,c){var l=o.rotate,f=o.scale,d=o.x,m=o.y,v=Bt(!1),g=ut(v,2),y=g[0],C=g[1],D=$t({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),p=function(N){D.current=ze(ze({},D.current),N)},A=function(N){if(t){N.stopPropagation(),C(!0);var I=N.touches,P=I===void 0?[]:I;P.length>1?p({point1:{x:P[0].clientX,y:P[0].clientY},point2:{x:P[1].clientX,y:P[1].clientY},eventType:"touchZoom"}):p({point1:{x:P[0].clientX-d,y:P[0].clientY-m},eventType:"move"})}},O=function(N){var I=N.touches,P=I===void 0?[]:I,H=D.current,T=H.point1,V=H.point2,K=H.eventType;if(P.length>1&&K==="touchZoom"){var G={x:P[0].clientX,y:P[0].clientY},Y={x:P[1].clientX,y:P[1].clientY},L=s3(T,V,G,Y),W=ut(L,2),U=W[0],X=W[1],te=Cs(G,Y)/Cs(T,V);c(te,"touchZoom",U,X,!0),p({point1:G,point2:Y,eventType:"touchZoom"})}else K==="move"&&(a({x:P[0].clientX-T.x,y:P[0].clientY-T.y},"move"),p({eventType:"move"}))},B=function(){if(r){if(y&&C(!1),p({eventType:"none"}),n>f)return a({x:0,y:0,scale:n},"touchZoom");var N=e.current.offsetWidth*f,I=e.current.offsetHeight*f,P=e.current.getBoundingClientRect(),H=P.left,T=P.top,V=l%180!==0,K=P1(V?I:N,V?N:I,H,T);K&&a(ze({},K),"dragRebound")}};return Ut(function(){var F;return r&&t&&(F=go(window,"touchmove",function(N){return N.preventDefault()},{passive:!1})),function(){var N;(N=F)===null||N===void 0||N.remove()}},[r,t]),{isTouching:y,onTouchStart:A,onTouchMove:O,onTouchEnd:B}}var u3=["fallback","src","imgRef"],c3=["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"],d3=function(t){var r=t.fallback,n=t.src,o=t.imgRef,a=ir(t,u3),c=z1({src:n,fallback:r}),l=ut(c,2),f=l[0],d=l[1];return Le.createElement("img",ht({ref:function(v){o.current=v,f(v)}},a,d))},L1=function(t){var r=t.prefixCls,n=t.src,o=t.alt,a=t.imageInfo,c=t.fallback,l=t.movable,f=l===void 0?!0:l,d=t.onClose,m=t.visible,v=t.icons,g=v===void 0?{}:v,y=t.rootClassName,C=t.closeIcon,D=t.getContainer,p=t.current,A=p===void 0?0:p,O=t.count,B=O===void 0?1:O,F=t.countRender,N=t.scaleStep,I=N===void 0?.5:N,P=t.minScale,H=P===void 0?1:P,T=t.maxScale,V=T===void 0?50:T,K=t.transitionName,G=K===void 0?"zoom":K,Y=t.maskTransitionName,L=Y===void 0?"fade":Y,W=t.imageRender,U=t.imgCommonProps,X=t.toolbarRender,te=t.onTransform,z=t.onChange,le=ir(t,c3),ce=$t(),he=Do(pi),ne=he&&B>1,pe=he&&B>=1,Oe=Bt(!0),Q=ut(Oe,2),fe=Q[0],se=Q[1],ae=n3(ce,H,V,te),ge=ae.transform,be=ae.resetTransform,Ce=ae.updateTransform,ke=ae.dispatchZoomChange,Ee=a3(ce,f,m,I,ge,Ce,ke),Be=Ee.isMoving,Ne=Ee.onMouseDown,Me=Ee.onWheel,He=l3(ce,f,m,H,ge,Ce,ke),Ze=He.isTouching,tt=He.onTouchStart,Te=He.onTouchMove,_e=He.onTouchEnd,We=ge.rotate,st=ge.scale,rt=Je($e({},"".concat(r,"-moving"),Be));Ut(function(){fe||se(!0)},[fe]);var Qe=function(){be("close")},St=function(){ke(ea+I,"zoomIn")},mt=function(){ke(ea/(ea+I),"zoomOut")},ct=function(){Ce({rotate:We+90},"rotateRight")},bt=function(){Ce({rotate:We-90},"rotateLeft")},Ie=function(){Ce({flipX:!ge.flipX},"flipX")},ue=function(){Ce({flipY:!ge.flipY},"flipY")},nt=function(){be("reset")},pt=function(_t){var rr=A+_t;!Number.isInteger(rr)||rr<0||rr>B-1||(se(!1),be(_t<0?"prev":"next"),z==null||z(rr,A))},Dt=function(_t){!m||!ne||(_t.keyCode===Er.LEFT?pt(-1):_t.keyCode===Er.RIGHT&&pt(1))},vt=function(_t){m&&(st!==1?Ce({x:0,y:0,scale:1},"doubleClick"):ke(ea+I,"doubleClick",_t.clientX,_t.clientY))};Ut(function(){var Nt=go(window,"keydown",Dt,!1);return function(){Nt.remove()}},[m,ne,A]);var Kt=Le.createElement(d3,ht({},U,{width:t.width,height:t.height,imgRef:ce,className:"".concat(r,"-img"),alt:o,style:{transform:"translate3d(".concat(ge.x,"px, ").concat(ge.y,"px, 0) scale3d(").concat(ge.flipX?"-":"").concat(st,", ").concat(ge.flipY?"-":"").concat(st,", 1) rotate(").concat(We,"deg)"),transitionDuration:(!fe||Ze)&&"0s"},fallback:c,src:n,onWheel:Me,onMouseDown:Ne,onDoubleClick:vt,onTouchStart:tt,onTouchMove:Te,onTouchEnd:_e,onTouchCancel:_e})),Ct=ze({url:n,alt:o},a);return Le.createElement(Le.Fragment,null,Le.createElement(u2,ht({transitionName:G,maskTransitionName:L,closable:!1,keyboard:!0,prefixCls:r,onClose:d,visible:m,classNames:{wrapper:rt},rootClassName:y,getContainer:D},le,{afterClose:Qe}),Le.createElement("div",{className:"".concat(r,"-img-wrapper")},W?W(Kt,ze({transform:ge,image:Ct},he?{current:A}:{})):Kt)),Le.createElement(r3,{visible:m,transform:ge,maskTransitionName:L,closeIcon:C,getContainer:D,prefixCls:r,rootClassName:y,icons:g,countRender:F,showSwitch:ne,showProgress:pe,current:A,count:B,scale:st,minScale:H,maxScale:V,toolbarRender:X,onActive:pt,onZoomIn:St,onZoomOut:mt,onRotateRight:ct,onRotateLeft:bt,onFlipX:Ie,onFlipY:ue,onClose:d,onReset:nt,zIndex:le.zIndex!==void 0?le.zIndex+1:void 0,image:Ct}))},Hu=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function f3(e){var t=w.useState({}),r=ut(t,2),n=r[0],o=r[1],a=w.useCallback(function(l,f){return o(function(d){return ze(ze({},d),{},$e({},l,f))}),function(){o(function(d){var m=ze({},d);return delete m[l],m})}},[]),c=w.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(Ot(Hu)).includes(d)&&(f[d]=l[d])}),{data:f}}):Object.keys(n).reduce(function(l,f){var d=n[f],m=d.canPreview,v=d.data;return m&&l.push({data:v,id:f}),l},[])},[e,n]);return[c,a,!!e]}var h3=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],p3=["src"],m3=function(t){var r,n=t.previewPrefixCls,o=n===void 0?"rc-image-preview":n,a=t.children,c=t.icons,l=c===void 0?{}:c,f=t.items,d=t.preview,m=t.fallback,v=dn(d)==="object"?d:{},g=v.visible,y=v.onVisibleChange,C=v.getContainer,D=v.current,p=v.movable,A=v.minScale,O=v.maxScale,B=v.countRender,F=v.closeIcon,N=v.onChange,I=v.onTransform,P=v.toolbarRender,H=v.imageRender,T=ir(v,h3),V=f3(f),K=ut(V,3),G=K[0],Y=K[1],L=K[2],W=Jn(0,{value:D}),U=ut(W,2),X=U[0],te=U[1],z=Bt(!1),le=ut(z,2),ce=le[0],he=le[1],ne=((r=G[X])===null||r===void 0?void 0:r.data)||{},pe=ne.src,Oe=ir(ne,p3),Q=Jn(!!g,{value:g,onChange:function(Ze,tt){y==null||y(Ze,tt,X)}}),fe=ut(Q,2),se=fe[0],ae=fe[1],ge=Bt(null),be=ut(ge,2),Ce=be[0],ke=be[1],Ee=w.useCallback(function(He,Ze,tt,Te){var _e=L?G.findIndex(function(We){return We.data.src===Ze}):G.findIndex(function(We){return We.id===He});te(_e<0?0:_e),ae(!0),ke({x:tt,y:Te}),he(!0)},[G,L]);w.useEffect(function(){se?ce||te(0):he(!1)},[se]);var Be=function(Ze,tt){te(Ze),N==null||N(Ze,tt)},Ne=function(){ae(!1),ke(null)},Me=w.useMemo(function(){return{register:Y,onPreview:Ee}},[Y,Ee]);return w.createElement(pi.Provider,{value:Me},a,w.createElement(L1,ht({"aria-hidden":!se,movable:p,visible:se,prefixCls:o,closeIcon:F,onClose:Ne,mousePosition:Ce,imgCommonProps:Oe,src:pe,fallback:m,icons:l,minScale:A,maxScale:O,getContainer:C,current:X,count:G.length,countRender:B,onTransform:I,toolbarRender:P,imageRender:H,onChange:Be},T)))},of=0;function g3(e,t){var r=w.useState(function(){return of+=1,String(of)}),n=ut(r,1),o=n[0],a=w.useContext(pi),c={data:t,canPreview:e};return w.useEffect(function(){if(a)return a.register(o,c)},[]),w.useEffect(function(){a&&a.register(o,c)},[e,t]),o}var v3=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],b3=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],V0=function(t){var r=t.src,n=t.alt,o=t.onPreviewClose,a=t.prefixCls,c=a===void 0?"rc-image":a,l=t.previewPrefixCls,f=l===void 0?"".concat(c,"-preview"):l,d=t.placeholder,m=t.fallback,v=t.width,g=t.height,y=t.style,C=t.preview,D=C===void 0?!0:C,p=t.className,A=t.onClick,O=t.onError,B=t.wrapperClassName,F=t.wrapperStyle,N=t.rootClassName,I=ir(t,v3),P=d&&d!==!0,H=dn(D)==="object"?D:{},T=H.src,V=H.visible,K=V===void 0?void 0:V,G=H.onVisibleChange,Y=G===void 0?o:G,L=H.getContainer,W=L===void 0?void 0:L,U=H.mask,X=H.maskClassName,te=H.movable,z=H.icons,le=H.scaleStep,ce=H.minScale,he=H.maxScale,ne=H.imageRender,pe=H.toolbarRender,Oe=ir(H,b3),Q=T??r,fe=Jn(!!K,{value:K,onChange:Y}),se=ut(fe,2),ae=se[0],ge=se[1],be=z1({src:r,isCustomPlaceholder:P,fallback:m}),Ce=ut(be,3),ke=Ce[0],Ee=Ce[1],Be=Ce[2],Ne=Bt(null),Me=ut(Ne,2),He=Me[0],Ze=Me[1],tt=Do(pi),Te=!!D,_e=function(){ge(!1),Ze(null)},We=Je(c,B,N,$e({},"".concat(c,"-error"),Be==="error")),st=wt(function(){var mt={};return Hu.forEach(function(ct){t[ct]!==void 0&&(mt[ct]=t[ct])}),mt},Hu.map(function(mt){return t[mt]})),rt=wt(function(){return ze(ze({},st),{},{src:Q})},[Q,st]),Qe=g3(Te,rt),St=function(ct){var bt=t3(ct.target),Ie=bt.left,ue=bt.top;tt?tt.onPreview(Qe,Q,Ie,ue):(Ze({x:Ie,y:ue}),ge(!0)),A==null||A(ct)};return w.createElement(w.Fragment,null,w.createElement("div",ht({},I,{className:We,onClick:Te?St:A,style:ze({width:v,height:g},F)}),w.createElement("img",ht({},st,{className:Je("".concat(c,"-img"),$e({},"".concat(c,"-img-placeholder"),d===!0),p),style:ze({height:g},y),ref:ke},Ee,{width:v,height:g,onError:O})),Be==="loading"&&w.createElement("div",{"aria-hidden":"true",className:"".concat(c,"-placeholder")},d),U&&Te&&w.createElement("div",{className:Je("".concat(c,"-mask"),X),style:{display:(y==null?void 0:y.display)==="none"?"none":void 0}},U)),!tt&&Te&&w.createElement(L1,ht({"aria-hidden":!ae,visible:ae,prefixCls:f,onClose:_e,mousePosition:He,src:Q,alt:n,imageInfo:{width:v,height:g},fallback:m,getContainer:W,icons:z,movable:te,scaleStep:le,minScale:ce,maxScale:he,rootClassName:N,imageRender:ne,imgCommonProps:st,toolbarRender:pe},Oe)))};V0.PreviewGroup=m3;var y3={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"},x3=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:y3}))},C3=w.forwardRef(x3),w3={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"},D3=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:w3}))},E3=w.forwardRef(D3),k3={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"},S3=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:k3}))},af=w.forwardRef(S3),B3={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"},A3=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:B3}))},F3=w.forwardRef(A3),O3={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"},N3=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:O3}))},$3=w.forwardRef(N3);const Ku=e=>({position:e||"absolute",inset:0}),T3=e=>{const{iconCls:t,motionDurationSlow:r,paddingXXS:n,marginXXS:o,prefixCls:a,colorTextLightSolid:c}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:c,background:new on("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${a}-mask-info`]:Object.assign(Object.assign({},N0),{padding:`0 ${Ye(n)}`,[t]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},M3=e=>{const{previewCls:t,modalMaskBg:r,paddingSM:n,marginXL:o,margin:a,paddingLG:c,previewOperationColorDisabled:l,previewOperationHoverColor:f,motionDurationSlow:d,iconCls:m,colorTextLightSolid:v}=e,g=new on(r).setA(.1),y=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:y.toRgbString()},[`& > ${m}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${Ye(c)}`,backgroundColor:g.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${d}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${m}`]:{color:f},"&-disabled":{color:l,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${m}`]:{fontSize:e.previewOperationSize}}}}},R3=e=>{const{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:n,previewCls:o,zIndexPopup:a,motionDurationSlow:c}=e,l=new on(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 ${c}`,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}}},I3=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({},Ku()),{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({},Ku()),{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()},"&":[M3(e),R3(e)]}]},P3=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({},T3(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},Ku())}}},z3=e=>{const{previewCls:t}=e;return{[`${t}-root`]:$0(e,"zoom"),"&":d2(e,!0)}},L3=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new on(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new on(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new on(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),j1=ui("Image",e=>{const t=`${e.componentCls}-preview`,r=Lo(e,{previewCls:t,modalMaskBg:new on("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[P3(r),I3(r),c2(Lo(r,{componentCls:t})),z3(r)]},L3);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 _1={rotateLeft:w.createElement(C3,null),rotateRight:w.createElement(E3,null),zoomIn:w.createElement(F3,null),zoomOut:w.createElement($3,null),close:w.createElement(f2,null),left:w.createElement(gs,null),right:w.createElement(vs,null),flipX:w.createElement(af,null),flipY:w.createElement(af,{rotate:90})},_3=e=>{var{previewPrefixCls:t,preview:r}=e,n=j3(e,["previewPrefixCls","preview"]);const{getPrefixCls:o,direction:a}=w.useContext(no),c=o("image",t),l=`${c}-preview`,f=o(),d=di(c),[m,v,g]=j1(c,d),[y]=Ls("ImagePreview",typeof r=="object"?r.zIndex:void 0),C=w.useMemo(()=>Object.assign(Object.assign({},_1),{left:a==="rtl"?w.createElement(vs,null):w.createElement(gs,null),right:a==="rtl"?w.createElement(gs,null):w.createElement(vs,null)}),[a]),D=w.useMemo(()=>{var p;if(r===!1)return r;const A=typeof r=="object"?r:{},O=Je(v,g,d,(p=A.rootClassName)!==null&&p!==void 0?p:"");return Object.assign(Object.assign({},A),{transitionName:hs(f,"zoom",A.transitionName),maskTransitionName:hs(f,"fade",A.maskTransitionName),rootClassName:O,zIndex:y})},[r,f,y,v,g,d]);return m(w.createElement(V0.PreviewGroup,Object.assign({preview:D,previewPrefixCls:l,icons:C},n)))};var sf=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 H1=e=>{const{prefixCls:t,preview:r,className:n,rootClassName:o,style:a,fallback:c}=e,l=sf(e,["prefixCls","preview","className","rootClassName","style","fallback"]),{getPrefixCls:f,getPopupContainer:d,className:m,style:v,preview:g,fallback:y}=h2("image"),[C]=p2("Image"),D=f("image",t),p=f(),A=di(D),[O,B,F]=j1(D,A),N=Je(o,B,F,A),I=Je(n,B,m),[P]=Ls("ImagePreview",typeof r=="object"?r.zIndex:void 0),H=w.useMemo(()=>{if(r===!1)return r;const K=typeof r=="object"?r:{},{getContainer:G,closeIcon:Y,rootClassName:L,destroyOnClose:W,destroyOnHidden:U}=K,X=sf(K,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:w.createElement("div",{className:`${D}-mask-info`},w.createElement(m2,null),C==null?void 0:C.preview),icons:_1},X),{destroyOnClose:U??W,rootClassName:Je(N,L),getContainer:G??d,transitionName:hs(p,"zoom",K.transitionName),maskTransitionName:hs(p,"fade",K.maskTransitionName),zIndex:P,closeIcon:Y??(g==null?void 0:g.closeIcon)})},[r,C,g==null?void 0:g.closeIcon]),T=Object.assign(Object.assign({},v),a),V=c??y;return O(w.createElement(V0,Object.assign({prefixCls:D,preview:H,rootClassName:N,className:I,style:T,fallback:V},l)))};H1.PreviewGroup=_3;var ho={},mi="rc-table-internal-hook";function U0(e){var t=w.createContext(void 0),r=function(o){var a=o.value,c=o.children,l=w.useRef(a);l.current=a;var f=w.useState(function(){return{getValue:function(){return l.current},listeners:new Set}}),d=ut(f,1),m=d[0];return yo(function(){W4(function(){m.listeners.forEach(function(v){v(a)})})},[a]),w.createElement(t.Provider,{value:m},c)};return{Context:t,Provider:r,defaultValue:e}}function Ir(e,t){var r=Bn(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(y){g[y]=v[y]}),g}),n=w.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,c=o.getValue,l=w.useRef();l.current=r(n?c():e==null?void 0:e.defaultValue);var f=w.useState({}),d=ut(f,2),m=d[1];return yo(function(){if(!n)return;function v(g){var y=r(g);bo(l.current,y,!0)||m({})}return a.add(v),function(){a.delete(v)}},[n]),l.current}function H3(){var e=w.createContext(null);function t(){return w.useContext(e)}function r(o,a){var c=us(o),l=function(d,m){var v=c?{ref:m}:{},g=w.useRef(0),y=w.useRef(d),C=t();return C!==null?w.createElement(o,ht({},d,v)):((!a||a(y.current,d))&&(g.current+=1),y.current=d,w.createElement(e.Provider,{value:g.current},w.createElement(o,ht({},d,v))))};return c?w.forwardRef(l):l}function n(o,a){var c=us(o),l=function(d,m){var v=c?{ref:m}:{};return t(),w.createElement(o,ht({},d,v))};return c?w.memo(w.forwardRef(l),a):w.memo(l,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var X0=H3(),K1=X0.makeImmutable,ya=X0.responseImmutable,K3=X0.useImmutableMark,Kr=U0(),q1=w.createContext({renderWithProps:!1}),q3="RC_TABLE_KEY";function W3(e){return e==null?[]:Array.isArray(e)?e:[e]}function Vs(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,c=o.dataIndex,l=a||W3(c).join("-")||q3;r[l];)l="".concat(l,"_next");r[l]=!0,t.push(l)}),t}function qu(e){return e!=null}function V3(e){return typeof e=="number"&&!Number.isNaN(e)}function U3(e){return e&&dn(e)==="object"&&!Array.isArray(e)&&!w.isValidElement(e)}function X3(e,t,r,n,o,a){var c=w.useContext(q1),l=K3(),f=F0(function(){if(qu(n))return[n];var d=t==null||t===""?[]:Array.isArray(t)?t:[t],m=M0(e,d),v=m,g=void 0;if(o){var y=o(m,e,r);U3(y)?(v=y.children,g=y.props,c.renderWithProps=!0):v=y}return[v,g]},[l,e,n,t,o,r],function(d,m){if(a){var v=ut(d,2),g=v[1],y=ut(m,2),C=y[1];return a(C,g)}return c.renderWithProps?!0:!bo(d,m,!0)});return f}function Y3(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function G3(e,t){return Ir(Kr,function(r){var n=Y3(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var Z3=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,a,c=r===!0?{showTitle:!0}:r;return c&&(c.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?a=o.toString():w.isValidElement(o)&&typeof o.props.children=="string"&&(a=o.props.children)),a};function Q3(e){var t,r,n,o,a,c,l,f,d=e.component,m=e.children,v=e.ellipsis,g=e.scope,y=e.prefixCls,C=e.className,D=e.align,p=e.record,A=e.render,O=e.dataIndex,B=e.renderIndex,F=e.shouldCellUpdate,N=e.index,I=e.rowType,P=e.colSpan,H=e.rowSpan,T=e.fixLeft,V=e.fixRight,K=e.firstFixLeft,G=e.lastFixLeft,Y=e.firstFixRight,L=e.lastFixRight,W=e.appendNode,U=e.additionalProps,X=U===void 0?{}:U,te=e.isSticky,z="".concat(y,"-cell"),le=Ir(Kr,["supportSticky","allColumnsFixedLeft","rowHoverable"]),ce=le.supportSticky,he=le.allColumnsFixedLeft,ne=le.rowHoverable,pe=X3(p,O,B,m,A,F),Oe=ut(pe,2),Q=Oe[0],fe=Oe[1],se={},ae=typeof T=="number"&&ce,ge=typeof V=="number"&&ce;ae&&(se.position="sticky",se.left=T),ge&&(se.position="sticky",se.right=V);var be=(t=(r=(n=fe==null?void 0:fe.colSpan)!==null&&n!==void 0?n:X.colSpan)!==null&&r!==void 0?r:P)!==null&&t!==void 0?t:1,Ce=(o=(a=(c=fe==null?void 0:fe.rowSpan)!==null&&c!==void 0?c:X.rowSpan)!==null&&a!==void 0?a:H)!==null&&o!==void 0?o:1,ke=G3(N,Ce),Ee=ut(ke,2),Be=Ee[0],Ne=Ee[1],Me=Bn(function(st){var rt;p&&Ne(N,N+Ce-1),X==null||(rt=X.onMouseEnter)===null||rt===void 0||rt.call(X,st)}),He=Bn(function(st){var rt;p&&Ne(-1,-1),X==null||(rt=X.onMouseLeave)===null||rt===void 0||rt.call(X,st)});if(be===0||Ce===0)return null;var Ze=(l=X.title)!==null&&l!==void 0?l:Z3({rowType:I,ellipsis:v,children:Q}),tt=Je(z,C,(f={},$e($e($e($e($e($e($e($e($e($e(f,"".concat(z,"-fix-left"),ae&&ce),"".concat(z,"-fix-left-first"),K&&ce),"".concat(z,"-fix-left-last"),G&&ce),"".concat(z,"-fix-left-all"),G&&he&&ce),"".concat(z,"-fix-right"),ge&&ce),"".concat(z,"-fix-right-first"),Y&&ce),"".concat(z,"-fix-right-last"),L&&ce),"".concat(z,"-ellipsis"),v),"".concat(z,"-with-append"),W),"".concat(z,"-fix-sticky"),(ae||ge)&&te&&ce),$e(f,"".concat(z,"-row-hover"),!fe&&Be)),X.className,fe==null?void 0:fe.className),Te={};D&&(Te.textAlign=D);var _e=ze(ze(ze(ze({},fe==null?void 0:fe.style),se),Te),X.style),We=Q;return dn(We)==="object"&&!Array.isArray(We)&&!w.isValidElement(We)&&(We=null),v&&(G||Y)&&(We=w.createElement("span",{className:"".concat(z,"-content")},We)),w.createElement(d,ht({},fe,X,{className:tt,style:_e,title:Ze,scope:g,onMouseEnter:ne?Me:void 0,onMouseLeave:ne?He:void 0,colSpan:be!==1?be:null,rowSpan:Ce!==1?Ce:null}),W,We)}const xa=w.memo(Q3);function Y0(e,t,r,n,o){var a=r[e]||{},c=r[t]||{},l,f;a.fixed==="left"?l=n.left[o==="rtl"?t:e]:c.fixed==="right"&&(f=n.right[o==="rtl"?e:t]);var d=!1,m=!1,v=!1,g=!1,y=r[t+1],C=r[e-1],D=y&&!y.fixed||C&&!C.fixed||r.every(function(F){return F.fixed==="left"});if(o==="rtl"){if(l!==void 0){var p=C&&C.fixed==="left";g=!p&&D}else if(f!==void 0){var A=y&&y.fixed==="right";v=!A&&D}}else if(l!==void 0){var O=y&&y.fixed==="left";d=!O&&D}else if(f!==void 0){var B=C&&C.fixed==="right";m=!B&&D}return{fixLeft:l,fixRight:f,lastFixLeft:d,firstFixRight:m,lastFixRight:v,firstFixLeft:g,isSticky:n.isSticky}}var W1=w.createContext({});function J3(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,c=e.rowSpan,l=e.align,f=Ir(Kr,["prefixCls","direction"]),d=f.prefixCls,m=f.direction,v=w.useContext(W1),g=v.scrollColumnIndex,y=v.stickyOffsets,C=v.flattenColumns,D=r+a-1,p=D+1===g?a+1:a,A=Y0(r,r+p-1,C,y,m);return w.createElement(xa,ht({className:t,index:r,component:"td",prefixCls:d,record:null,dataIndex:null,align:l,colSpan:p,rowSpan:c,render:function(){return n}},A))}var e5=["children"];function t5(e){var t=e.children,r=ir(e,e5);return w.createElement("tr",r,t)}function Us(e){var t=e.children;return t}Us.Row=t5;Us.Cell=J3;function r5(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Ir(Kr,"prefixCls"),a=n.length-1,c=n[a],l=w.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:c!=null&&c.scrollbar?a:null}},[c,n,a,r]);return w.createElement(W1.Provider,{value:l},w.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const Oi=ya(r5);var V1=Us;function n5(e){return null}function o5(e){return null}function U1(e,t,r,n,o,a,c){var l=a(t,c);e.push({record:t,indent:r,index:c,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)U1(e,t[n][d],r+1,n,o,a,d)}function X1(e,t,r,n){var o=w.useMemo(function(){if(r!=null&&r.size){for(var a=[],c=0;c<(e==null?void 0:e.length);c+=1){var l=e[c];U1(a,l,0,t,r,n,c)}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 Y1(e,t,r,n){var o=Ir(Kr,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,c=o.expandableType,l=o.expandedKeys,f=o.childrenColumnName,d=o.onTriggerExpand,m=o.rowExpandable,v=o.onRow,g=o.expandRowByClick,y=o.rowClassName,C=c==="nest",D=c==="row"&&(!m||m(e)),p=D||C,A=l&&l.has(t),O=f&&e&&e[f],B=Bn(d),F=v==null?void 0:v(e,r),N=F==null?void 0:F.onClick,I=function(V){g&&p&&d(e,V);for(var K=arguments.length,G=new Array(K>1?K-1:0),Y=1;Y<K;Y++)G[Y-1]=arguments[Y];N==null||N.apply(void 0,[V].concat(G))},P;typeof y=="string"?P=y:typeof y=="function"&&(P=y(e,r,n));var H=Vs(a);return ze(ze({},o),{},{columnsKey:H,nestExpandable:C,expanded:A,hasNestChildren:O,record:e,onTriggerExpand:B,rowSupportExpand:D,expandable:p,rowProps:ze(ze({},F),{},{className:Je(P,F==null?void 0:F.className),onClick:I})})}function G1(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,c=e.expanded,l=e.colSpan,f=e.isEmpty,d=e.stickyOffset,m=d===void 0?0:d,v=Ir(Kr,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),g=v.scrollbarSize,y=v.fixHeader,C=v.fixColumn,D=v.componentWidth,p=v.horizonScroll,A=r;return(f?p&&D:C)&&(A=w.createElement("div",{style:{width:D-m-(y&&!f?g:0),position:"sticky",left:m,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},A)),w.createElement(n,{className:a,style:{display:c?null:"none"}},w.createElement(xa,{component:o,prefixCls:t,colSpan:l},A))}function a5(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,c="".concat(t,"-row-expand-icon");if(!a)return w.createElement("span",{className:Je(c,"".concat(t,"-row-spaced"))});var l=function(d){n(r,d),d.stopPropagation()};return w.createElement("span",{className:Je(c,$e($e({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:l})}function i5(e,t,r){var n=[];function o(a){(a||[]).forEach(function(c,l){n.push(t(c,l)),o(c[r])})}return o(e),n}function Z1(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function Q1(e,t,r,n,o){var a,c=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,m=e.columnsKey,v=e.fixedInfoList,g=e.expandIconColumnIndex,y=e.nestExpandable,C=e.indentSize,D=e.expandIcon,p=e.expanded,A=e.hasNestChildren,O=e.onTriggerExpand,B=e.expandable,F=e.expandedKeys,N=m[r],I=v[r],P;r===(g||0)&&y&&(P=w.createElement(w.Fragment,null,w.createElement("span",{style:{paddingLeft:"".concat(C*n,"px")},className:"".concat(d,"-row-indent indent-level-").concat(n)}),D({prefixCls:d,expanded:p,expandable:A,record:f,onExpand:O})));var H=((a=t.onCell)===null||a===void 0?void 0:a.call(t,f,o))||{};if(l){var T=H.rowSpan,V=T===void 0?1:T;if(B&&V&&r<l){for(var K=V,G=o;G<o+V;G+=1){var Y=c[G];F.has(Y)&&(K+=1)}H.rowSpan=K}}return{key:N,fixedInfo:I,appendCellNode:P,additionalCellProps:H}}function s5(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,c=e.rowKey,l=e.rowKeys,f=e.indent,d=f===void 0?0:f,m=e.rowComponent,v=e.cellComponent,g=e.scopeCellComponent,y=e.expandedRowInfo,C=Y1(n,c,o,d),D=C.prefixCls,p=C.flattenColumns,A=C.expandedRowClassName,O=C.expandedRowRender,B=C.rowProps,F=C.expanded,N=C.rowSupportExpand,I=w.useRef(!1);I.current||(I.current=F);var P=Z1(A,n,o,d),H=w.createElement(m,ht({},B,{"data-row-key":c,className:Je(t,"".concat(D,"-row"),"".concat(D,"-row-level-").concat(d),B==null?void 0:B.className,$e({},P,d>=1)),style:ze(ze({},r),B==null?void 0:B.style)}),p.map(function(K,G){var Y=K.render,L=K.dataIndex,W=K.className,U=Q1(C,K,G,d,o,l,y==null?void 0:y.offset),X=U.key,te=U.fixedInfo,z=U.appendCellNode,le=U.additionalCellProps;return w.createElement(xa,ht({className:W,ellipsis:K.ellipsis,align:K.align,scope:K.rowScope,component:K.rowScope?g:v,prefixCls:D,key:X,record:n,index:o,renderIndex:a,dataIndex:L,render:Y,shouldCellUpdate:K.shouldCellUpdate},te,{appendNode:z,additionalProps:le}))})),T;if(N&&(I.current||F)){var V=O(n,o,d+1,F);T=w.createElement(G1,{expanded:F,className:Je("".concat(D,"-expanded-row"),"".concat(D,"-expanded-row-level-").concat(d+1),P),prefixCls:D,component:m,cellComponent:v,colSpan:y?y.colSpan:p.length,stickyOffset:y==null?void 0:y.sticky,isEmpty:!1},V)}return w.createElement(w.Fragment,null,H,T)}const l5=ya(s5);function u5(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=w.useRef();return yo(function(){a.current&&r(t,a.current.offsetWidth)},[]),w.createElement(R0,{data:t},w.createElement("th",{ref:a,className:"".concat(n,"-measure-cell")},w.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function c5(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,a=w.useRef(null),c=Ir(Kr,["measureRowRender"]),l=c.measureRowRender,f=w.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:a,tabIndex:-1},w.createElement(R0.Collection,{onBatchResize:function(m){t1(a.current)&&m.forEach(function(v){var g=v.data,y=v.size;n(g,y.offsetWidth)})}},r.map(function(d){var m=o.find(function(y){return y.key===d}),v=m==null?void 0:m.title,g=w.isValidElement(v)?w.cloneElement(v,{ref:null}):v;return w.createElement(u5,{prefixCls:t,key:d,columnKey:d,onColumnResize:n,title:g})})));return l?l(f):f}function d5(e){var t=e.data,r=e.measureColumnWidth,n=Ir(Kr,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,c=n.onColumnResize,l=n.flattenColumns,f=n.getRowKey,d=n.expandedKeys,m=n.childrenColumnName,v=n.emptyNode,g=n.expandedRowOffset,y=g===void 0?0:g,C=n.colWidths,D=X1(t,m,d,f),p=w.useMemo(function(){return D.map(function(T){return T.rowKey})},[D]),A=w.useRef({renderWithProps:!1}),O=w.useMemo(function(){for(var T=l.length-y,V=0,K=0;K<y;K+=1)V+=C[K]||0;return{offset:y,colSpan:T,sticky:V}},[l.length,y,C]),B=a(["body","wrapper"],"tbody"),F=a(["body","row"],"tr"),N=a(["body","cell"],"td"),I=a(["body","cell"],"th"),P;t.length?P=D.map(function(T,V){var K=T.record,G=T.indent,Y=T.index,L=T.rowKey;return w.createElement(l5,{key:L,rowKey:L,rowKeys:p,record:K,index:V,renderIndex:Y,rowComponent:F,cellComponent:N,scopeCellComponent:I,indent:G,expandedRowInfo:O})}):P=w.createElement(G1,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:F,cellComponent:N,colSpan:l.length,isEmpty:!0},v);var H=Vs(l);return w.createElement(q1.Provider,{value:A.current},w.createElement(B,{className:"".concat(o,"-tbody")},r&&w.createElement(c5,{prefixCls:o,columnsKey:H,onColumnResize:c,columns:l}),P))}const f5=ya(d5);var h5=["expandable"],qa="RC_TABLE_INTERNAL_COL_DEFINE";function p5(e){var t=e.expandable,r=ir(e,h5),n;return"expandable"in e?n=ze(ze({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var m5=["columnType"];function J1(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Ir(Kr,["tableLayout"]),a=o.tableLayout,c=[],l=n||r.length,f=!1,d=l-1;d>=0;d-=1){var m=t[d],v=r&&r[d],g=void 0,y=void 0;if(v&&(g=v[qa],a==="auto"&&(y=v.minWidth)),m||y||g||f){var C=g||{};C.columnType;var D=ir(C,m5);c.unshift(w.createElement("col",ht({key:d,style:{width:m,minWidth:y}},D))),f=!0}}return c.length>0?w.createElement("colgroup",null,c):null}var g5=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function v5(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 b5=w.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,c=e.colWidths,l=e.colGroup,f=e.columCount,d=e.stickyOffsets,m=e.direction,v=e.fixHeader,g=e.stickyTopOffset,y=e.stickyBottomOffset,C=e.stickyClassName,D=e.scrollX,p=e.tableLayout,A=p===void 0?"fixed":p,O=e.onScroll,B=e.children,F=ir(e,g5),N=Ir(Kr,["prefixCls","scrollbarSize","isSticky","getComponent"]),I=N.prefixCls,P=N.scrollbarSize,H=N.isSticky,T=N.getComponent,V=T(["header","table"],"table"),K=H&&!v?0:P,G=w.useRef(null),Y=w.useCallback(function(ce){Hd(t,ce),Hd(G,ce)},[]);w.useEffect(function(){function ce(ne){var pe=ne,Oe=pe.currentTarget,Q=pe.deltaX;Q&&(O({currentTarget:Oe,scrollLeft:Oe.scrollLeft+Q}),ne.preventDefault())}var he=G.current;return he==null||he.addEventListener("wheel",ce,{passive:!1}),function(){he==null||he.removeEventListener("wheel",ce)}},[]);var L=a[a.length-1],W={fixed:L?L.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(I,"-cell-scrollbar")}}},U=wt(function(){return K?[].concat(Ot(o),[W]):o},[K,o]),X=wt(function(){return K?[].concat(Ot(a),[W]):a},[K,a]),te=wt(function(){var ce=d.right,he=d.left;return ze(ze({},d),{},{left:m==="rtl"?[].concat(Ot(he.map(function(ne){return ne+K})),[0]):he,right:m==="rtl"?ce:[].concat(Ot(ce.map(function(ne){return ne+K})),[0]),isSticky:H})},[K,d,H]),z=v5(c,f),le=wt(function(){var ce=!z||!z.length||z.every(function(he){return!he});return n||ce},[n,z]);return w.createElement("div",{style:ze({overflow:"hidden"},H?{top:g,bottom:y}:{}),ref:Y,className:Je(r,$e({},C,!!C))},w.createElement(V,{style:{tableLayout:A,minWidth:"100%",width:D}},le?l:w.createElement(J1,{colWidths:[].concat(Ot(z),[K]),columCount:f+1,columns:X}),B(ze(ze({},F),{},{stickyOffsets:te,columns:U,flattenColumns:X}))))});const lf=w.memo(b5);var y5=function(t){var r=t.cells,n=t.stickyOffsets,o=t.flattenColumns,a=t.rowComponent,c=t.cellComponent,l=t.onHeaderRow,f=t.index,d=Ir(Kr,["prefixCls","direction"]),m=d.prefixCls,v=d.direction,g;l&&(g=l(r.map(function(C){return C.column}),f));var y=Vs(r.map(function(C){return C.column}));return w.createElement(a,g,r.map(function(C,D){var p=C.column,A=Y0(C.colStart,C.colEnd,o,n,v),O;return p&&p.onHeaderCell&&(O=C.column.onHeaderCell(p)),w.createElement(xa,ht({},C,{scope:p.title?C.colSpan>1?"colgroup":"col":null,ellipsis:p.ellipsis,align:p.align,component:c,prefixCls:m,key:y[D]},A,{additionalProps:O,rowType:"header"}))}))};function x5(e){var t=[];function r(c,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[f]=t[f]||[];var d=l,m=c.filter(Boolean).map(function(v){var g={key:v.key,className:v.className||"",children:v.title,column:v,colStart:d},y=1,C=v.children;return C&&C.length>0&&(y=r(C,d,f+1).reduce(function(D,p){return D+p},0),g.hasSubColumns=!0),"colSpan"in v&&(y=v.colSpan),"rowSpan"in v&&(g.rowSpan=v.rowSpan),g.colSpan=y,g.colEnd=g.colStart+y-1,t[f].push(g),d+=y,y});return m}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 C5=function(t){var r=t.stickyOffsets,n=t.columns,o=t.flattenColumns,a=t.onHeaderRow,c=Ir(Kr,["prefixCls","getComponent"]),l=c.prefixCls,f=c.getComponent,d=w.useMemo(function(){return x5(n)},[n]),m=f(["header","wrapper"],"thead"),v=f(["header","row"],"tr"),g=f(["header","cell"],"th");return w.createElement(m,{className:"".concat(l,"-thead")},d.map(function(y,C){var D=w.createElement(y5,{key:C,flattenColumns:o,cells:y,stickyOffsets:r,rowComponent:v,cellComponent:g,onHeaderRow:a,index:C});return D}))};const uf=ya(C5);function cf(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 w5(e,t,r){return w.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(g){var y=cf(t,g.width);y?n+=y:o+=1});var a=Math.max(t,r),c=Math.max(a-n,o),l=o,f=c/o,d=0,m=e.map(function(g){var y=ze({},g),C=cf(t,y.width);if(C)y.width=C;else{var D=Math.floor(f);y.width=l===1?c:D,c-=D,l-=1}return d+=y.width,y});if(d<a){var v=a/d;c=a,m.forEach(function(g,y){var C=Math.floor(g.width*v);g.width=y===m.length-1?c:C,c-=C})}return[m,Math.max(d,a)]}return[e,t]},[e,t,r])}var D5=["children"],E5=["fixed"];function G0(e){return zs(e).filter(function(t){return w.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=ir(n,D5),c=ze({key:r},a);return o&&(c.children=G0(o)),c})}function em(e){return e.filter(function(t){return t&&dn(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?ze(ze({},t),{},{children:em(r)}):t})}function Wu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&dn(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,c=a===!0?"left":a,l="".concat(t,"-").concat(o),f=n.children;return f&&f.length>0?[].concat(Ot(r),Ot(Wu(f,l).map(function(d){var m;return ze(ze({},d),{},{fixed:(m=d.fixed)!==null&&m!==void 0?m:c})}))):[].concat(Ot(r),[ze(ze({key:l},n),{},{fixed:c})])},[])}function k5(e){return e.map(function(t){var r=t.fixed,n=ir(t,E5),o=r;return r==="left"?o="right":r==="right"&&(o="left"),ze({fixed:o},n)})}function S5(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,c=e.expandedKeys,l=e.columnTitle,f=e.getRowKey,d=e.onTriggerExpand,m=e.expandIcon,v=e.rowExpandable,g=e.expandIconColumnIndex,y=e.expandedRowOffset,C=y===void 0?0:y,D=e.direction,p=e.expandRowByClick,A=e.columnWidth,O=e.fixed,B=e.scrollWidth,F=e.clientWidth,N=w.useMemo(function(){var L=n||G0(o)||[];return em(L.slice())},[n,o]),I=w.useMemo(function(){if(a){var L=N.slice();if(!L.includes(ho)){var W=g||0,U=W===0&&O==="right"?N.length:W;U>=0&&L.splice(U,0,ho)}var X=L.indexOf(ho);L=L.filter(function(ce,he){return ce!==ho||he===X});var te=N[X],z;O?z=O:z=te?te.fixed:null;var le=$e($e($e($e($e($e({},qa,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",l),"fixed",z),"className","".concat(r,"-row-expand-icon-cell")),"width",A),"render",function(he,ne,pe){var Oe=f(ne,pe),Q=c.has(Oe),fe=v?v(ne):!0,se=m({prefixCls:r,expanded:Q,expandable:fe,record:ne,onExpand:d});return p?w.createElement("span",{onClick:function(ge){return ge.stopPropagation()}},se):se});return L.map(function(ce,he){var ne=ce===ho?le:ce;return he<C?ze(ze({},ne),{},{fixed:ne.fixed||"left"}):ne})}return N.filter(function(ce){return ce!==ho})},[a,N,f,c,m,D,C]),P=w.useMemo(function(){var L=I;return t&&(L=t(L)),L.length||(L=[{render:function(){return null}}]),L},[t,I,D]),H=w.useMemo(function(){return D==="rtl"?k5(Wu(P)):Wu(P)},[P,D,B]),T=w.useMemo(function(){for(var L=-1,W=H.length-1;W>=0;W-=1){var U=H[W].fixed;if(U==="left"||U===!0){L=W;break}}if(L>=0)for(var X=0;X<=L;X+=1){var te=H[X].fixed;if(te!=="left"&&te!==!0)return!0}var z=H.findIndex(function(he){var ne=he.fixed;return ne==="right"});if(z>=0)for(var le=z;le<H.length;le+=1){var ce=H[le].fixed;if(ce!=="right")return!0}return!1},[H]),V=w5(H,B,F),K=ut(V,2),G=K[0],Y=K[1];return[P,G,Y,T]}function B5(e,t,r){var n=p5(e),o=n.expandIcon,a=n.expandedRowKeys,c=n.defaultExpandedRowKeys,l=n.defaultExpandAllRows,f=n.expandedRowRender,d=n.onExpand,m=n.onExpandedRowsChange,v=n.childrenColumnName,g=o||a5,y=v||"children",C=w.useMemo(function(){return f?"row":e.expandable&&e.internalHooks===mi&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(N){return N&&dn(N)==="object"&&N[y]})?"nest":!1},[!!f,t]),D=w.useState(function(){return c||(l?i5(t,r,y):[])}),p=ut(D,2),A=p[0],O=p[1],B=w.useMemo(function(){return new Set(a||A||[])},[a,A]),F=w.useCallback(function(N){var I=r(N,t.indexOf(N)),P,H=B.has(I);H?(B.delete(I),P=Ot(B)):P=[].concat(Ot(B),[I]),O(P),d&&d(!H,N),m&&m(P)},[r,B,t,d,m]);return[n,C,B,g,y,F]}function A5(e,t,r){var n=e.map(function(o,a){return Y0(a,a,e,t,r)});return F0(function(){return n},[n],function(o,a){return!bo(o,a)})}function F5(e){var t=$t(e),r=Bt({}),n=ut(r,2),o=n[1],a=$t(null),c=$t([]);function l(f){c.current.push(f);var d=Promise.resolve();a.current=d,d.then(function(){if(a.current===d){var m=c.current,v=t.current;c.current=[],m.forEach(function(g){t.current=g(t.current)}),a.current=null,v!==t.current&&o({})}})}return Ut(function(){return function(){a.current=null}},[]),[t.current,l]}function O5(e){var t=$t(null),r=$t();function n(){window.clearTimeout(r.current)}function o(c){t.current=c,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return Ut(function(){return n},[]),[o,a]}function N5(){var e=w.useState(-1),t=ut(e,2),r=t[0],n=t[1],o=w.useState(-1),a=ut(o,2),c=a[0],l=a[1],f=w.useCallback(function(d,m){n(d),l(m)},[]);return[r,c,f]}var df=Qp()?window:null;function $5(e,t){var r=dn(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,c=a===void 0?0:a,l=r.offsetScroll,f=l===void 0?0:l,d=r.getContainer,m=d===void 0?function(){return df}:d,v=m()||df,g=!!e;return w.useMemo(function(){return{isSticky:g,stickyClassName:g?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:c,offsetScroll:f,container:v}},[g,f,o,c,t,v])}function T5(e,t,r){var n=wt(function(){var o=t.length,a=function(d,m,v){for(var g=[],y=0,C=d;C!==m;C+=v)g.push(y),t[C].fixed&&(y+=e[C]||0);return g},c=a(0,o,1),l=a(o-1,-1,-1).reverse();return r==="rtl"?{left:l,right:c}:{left:c,right:l}},[e,t,r]);return n}function ff(e){var t=e.className,r=e.children;return w.createElement("div",{className:t},r)}function hf(e){var t=I0(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 M5=function(t,r){var n,o,a=t.scrollBodyRef,c=t.onScroll,l=t.offsetScroll,f=t.container,d=t.direction,m=Ir(Kr,"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,y=v&&g*(g/v),C=w.useRef(),D=F5({scrollLeft:0,isHiddenScrollBar:!0}),p=ut(D,2),A=p[0],O=p[1],B=w.useRef({delta:0,x:0}),F=w.useState(!1),N=ut(F,2),I=N[0],P=N[1],H=w.useRef(null);w.useEffect(function(){return function(){vn.cancel(H.current)}},[]);var T=function(){P(!1)},V=function(W){W.persist(),B.current.delta=W.pageX-A.scrollLeft,B.current.x=0,P(!0),W.preventDefault()},K=function(W){var U,X=W||((U=window)===null||U===void 0?void 0:U.event),te=X.buttons;if(!I||te===0){I&&P(!1);return}var z=B.current.x+W.pageX-B.current.x-B.current.delta,le=d==="rtl";z=Math.max(le?y-g:0,Math.min(le?0:g-y,z));var ce=!le||Math.abs(z)+Math.abs(y)<g;ce&&(c({scrollLeft:z/g*(v+2)}),B.current.x=W.pageX)},G=function(){vn.cancel(H.current),H.current=vn(function(){if(a.current){var W=hf(a.current).top,U=W+a.current.offsetHeight,X=f===window?document.documentElement.scrollTop+window.innerHeight:hf(f).top+f.clientHeight;O(function(te){return ze(ze({},te),{},{isHiddenScrollBar:U-Kd()<=X||W>=X-l})})}})},Y=function(W){O(function(U){return ze(ze({},U),{},{scrollLeft:v?W/v*g:0})})};return w.useImperativeHandle(r,function(){return{setScrollLeft:Y,checkScrollBarVisible:G}}),w.useEffect(function(){var L=go(document.body,"mouseup",T,!1),W=go(document.body,"mousemove",K,!1);return G(),function(){L.remove(),W.remove()}},[y,I]),w.useEffect(function(){if(a.current){for(var L=[],W=I0(a.current);W;)L.push(W),W=W.parentElement;return L.forEach(function(U){return U.addEventListener("scroll",G,!1)}),window.addEventListener("resize",G,!1),window.addEventListener("scroll",G,!1),f.addEventListener("scroll",G,!1),function(){L.forEach(function(U){return U.removeEventListener("scroll",G)}),window.removeEventListener("resize",G),window.removeEventListener("scroll",G),f.removeEventListener("scroll",G)}}},[f]),w.useEffect(function(){A.isHiddenScrollBar||O(function(L){var W=a.current;return W?ze(ze({},L),{},{scrollLeft:W.scrollLeft/W.scrollWidth*W.clientWidth}):L})},[A.isHiddenScrollBar]),v<=g||!y||A.isHiddenScrollBar?null:w.createElement("div",{style:{height:Kd(),width:g,bottom:l},className:"".concat(m,"-sticky-scroll")},w.createElement("div",{onMouseDown:V,ref:C,className:Je("".concat(m,"-sticky-scroll-bar"),$e({},"".concat(m,"-sticky-scroll-bar-active"),I)),style:{width:"".concat(y,"px"),transform:"translate3d(".concat(A.scrollLeft,"px, 0, 0)")}}))};const R5=w.forwardRef(M5);var tm="rc-table",I5=[],P5={};function z5(){return"No Data"}function L5(e,t){var r=ze({rowKey:"key",prefixCls:tm,emptyText:z5},e),n=r.prefixCls,o=r.className,a=r.rowClassName,c=r.style,l=r.data,f=r.rowKey,d=r.scroll,m=r.tableLayout,v=r.direction,g=r.title,y=r.footer,C=r.summary,D=r.caption,p=r.id,A=r.showHeader,O=r.components,B=r.emptyText,F=r.onRow,N=r.onHeaderRow,I=r.measureRowRender,P=r.onScroll,H=r.internalHooks,T=r.transformColumns,V=r.internalRefs,K=r.tailor,G=r.getContainerWidth,Y=r.sticky,L=r.rowHoverable,W=L===void 0?!0:L,U=l||I5,X=!!U.length,te=H===mi,z=w.useCallback(function(Et,Pt){return M0(O,Et)||Pt},[O]),le=w.useMemo(function(){return typeof f=="function"?f:function(Et){var Pt=Et&&Et[f];return Pt}},[f]),ce=z(["body"]),he=N5(),ne=ut(he,3),pe=ne[0],Oe=ne[1],Q=ne[2],fe=B5(r,U,le),se=ut(fe,6),ae=se[0],ge=se[1],be=se[2],Ce=se[3],ke=se[4],Ee=se[5],Be=d==null?void 0:d.x,Ne=w.useState(0),Me=ut(Ne,2),He=Me[0],Ze=Me[1],tt=S5(ze(ze(ze({},r),ae),{},{expandable:!!ae.expandedRowRender,columnTitle:ae.columnTitle,expandedKeys:be,getRowKey:le,onTriggerExpand:Ee,expandIcon:Ce,expandIconColumnIndex:ae.expandIconColumnIndex,direction:v,scrollWidth:te&&K&&typeof Be=="number"?Be:null,clientWidth:He}),te?T:null),Te=ut(tt,4),_e=Te[0],We=Te[1],st=Te[2],rt=Te[3],Qe=st??Be,St=w.useMemo(function(){return{columns:_e,flattenColumns:We}},[_e,We]),mt=w.useRef(),ct=w.useRef(),bt=w.useRef(),Ie=w.useRef();w.useImperativeHandle(t,function(){return{nativeElement:mt.current,scrollTo:function(Pt){var Or;if(bt.current instanceof HTMLElement){var Wr=Pt.index,wr=Pt.top,wn=Pt.key;if(V3(wr)){var et;(et=bt.current)===null||et===void 0||et.scrollTo({top:wr})}else{var Vr,On=wn??le(U[Wr]);(Vr=bt.current.querySelector('[data-row-key="'.concat(On,'"]')))===null||Vr===void 0||Vr.scrollIntoView()}}else(Or=bt.current)!==null&&Or!==void 0&&Or.scrollTo&&bt.current.scrollTo(Pt)}}});var ue=w.useRef(),nt=w.useState(!1),pt=ut(nt,2),Dt=pt[0],vt=pt[1],Kt=w.useState(!1),Ct=ut(Kt,2),Nt=Ct[0],_t=Ct[1],rr=w.useState(new Map),yt=ut(rr,2),cr=yt[0],Xt=yt[1],Pr=Vs(We),kr=Pr.map(function(Et){return cr.get(Et)}),yr=w.useMemo(function(){return kr},[kr.join("_")]),dt=T5(yr,We,v),nr=d&&qu(d.y),or=d&&qu(Qe)||!!ae.fixed,Tt=or&&We.some(function(Et){var Pt=Et.fixed;return Pt}),x=w.useRef(),k=$5(Y,n),Pe=k.isSticky,E=k.offsetHeader,j=k.offsetSummary,Ue=k.offsetScroll,De=k.stickyClassName,de=k.container,Ae=w.useMemo(function(){return C==null?void 0:C(U)},[C,U]),ve=(nr||Pe)&&w.isValidElement(Ae)&&Ae.type===Us&&Ae.props.fixed,je,ie,we;nr&&(ie={overflowY:X?"scroll":"auto",maxHeight:d.y}),or&&(je={overflowX:"auto"},nr||(ie={overflowY:"hidden"}),we={width:Qe===!0?"auto":Qe,minWidth:"100%"});var M=w.useCallback(function(Et,Pt){Xt(function(Or){if(Or.get(Et)!==Pt){var Wr=new Map(Or);return Wr.set(Et,Pt),Wr}return Or})},[]),qe=O5(),J=ut(qe,2),Mt=J[0],kt=J[1];function at(Et,Pt){Pt&&(typeof Pt=="function"?Pt(Et):Pt.scrollLeft!==Et&&(Pt.scrollLeft=Et,Pt.scrollLeft!==Et&&setTimeout(function(){Pt.scrollLeft=Et},0)))}var gt=Bn(function(Et){var Pt=Et.currentTarget,Or=Et.scrollLeft,Wr=v==="rtl",wr=typeof Or=="number"?Or:Pt.scrollLeft,wn=Pt||P5;if(!kt()||kt()===wn){var et;Mt(wn),at(wr,ct.current),at(wr,bt.current),at(wr,ue.current),at(wr,(et=x.current)===null||et===void 0?void 0:et.setScrollLeft)}var Vr=Pt||ct.current;if(Vr){var On=te&&K&&typeof Qe=="number"?Qe:Vr.scrollWidth,fr=Vr.clientWidth;if(On===fr){vt(!1),_t(!1);return}Wr?(vt(-wr<On-fr),_t(-wr>0)):(vt(wr>0),_t(wr<On-fr))}}),it=Bn(function(Et){gt(Et),P==null||P(Et)}),qr=function(){if(or&&bt.current){var Pt;gt({currentTarget:I0(bt.current),scrollLeft:(Pt=bt.current)===null||Pt===void 0?void 0:Pt.scrollLeft})}else vt(!1),_t(!1)},fn=function(Pt){var Or,Wr=Pt.width;(Or=x.current)===null||Or===void 0||Or.checkScrollBarVisible();var wr=mt.current?mt.current.offsetWidth:Wr;te&&G&&mt.current&&(wr=G(mt.current,wr)||wr),wr!==He&&(qr(),Ze(wr))},ko=w.useRef(!1);w.useEffect(function(){ko.current&&qr()},[or,l,_e.length]),w.useEffect(function(){ko.current=!0},[]);var ka=w.useState(0),xn=ut(ka,2),Jr=xn[0],Lr=xn[1],Sa=w.useState(!0),Vo=ut(Sa,2),So=Vo[0],Ba=Vo[1];yo(function(){(!K||!te)&&(bt.current instanceof Element?Lr(qd(bt.current).width):Lr(qd(Ie.current).width)),Ba(z2("position","sticky"))},[]),w.useEffect(function(){te&&V&&(V.body.current=bt.current)});var Aa=w.useCallback(function(Et){return w.createElement(w.Fragment,null,w.createElement(uf,Et),ve==="top"&&w.createElement(Oi,Et,Ae))},[ve,Ae]),Bo=w.useCallback(function(Et){return w.createElement(Oi,Et,Ae)},[Ae]),Fr=z(["table"],"table"),Fn=w.useMemo(function(){return m||(Tt?Qe==="max-content"?"auto":"fixed":nr||Pe||We.some(function(Et){var Pt=Et.ellipsis;return Pt})?"fixed":"auto")},[nr,Tt,We,m,Pe]),lr,qt={colWidths:yr,columCount:We.length,stickyOffsets:dt,onHeaderRow:N,fixHeader:nr,scroll:d},Qt=w.useMemo(function(){return X?null:typeof B=="function"?B():B},[X,B]),$r=w.createElement(f5,{data:U,measureColumnWidth:nr||or||Pe}),Sr=w.createElement(J1,{colWidths:We.map(function(Et){var Pt=Et.width;return Pt}),columns:We}),_n=D!=null?w.createElement("caption",{className:"".concat(n,"-caption")},D):void 0,Ao=ps(r,{data:!0}),Hn=ps(r,{aria:!0});if(nr||Pe){var Kn;typeof ce=="function"?(Kn=ce(U,{scrollbarSize:Jr,ref:bt,onScroll:gt}),qt.colWidths=We.map(function(Et,Pt){var Or=Et.width,Wr=Pt===We.length-1?Or-Jr:Or;return typeof Wr=="number"&&!Number.isNaN(Wr)?Wr:0})):Kn=w.createElement("div",{style:ze(ze({},je),ie),onScroll:it,ref:bt,className:Je("".concat(n,"-body"))},w.createElement(Fr,ht({style:ze(ze({},we),{},{tableLayout:Fn})},Hn),_n,Sr,$r,!ve&&Ae&&w.createElement(Oi,{stickyOffsets:dt,flattenColumns:We},Ae)));var ao=ze(ze(ze({noData:!U.length},qt),St),{},{direction:v,stickyClassName:De,scrollX:Qe,tableLayout:Fn,onScroll:gt});lr=w.createElement(w.Fragment,null,A!==!1&&w.createElement(lf,ht({},ao,{stickyTopOffset:E,className:"".concat(n,"-header"),ref:ct,colGroup:Sr}),Aa),Kn,ve&&ve!=="top"&&w.createElement(lf,ht({},ao,{stickyBottomOffset:j,className:"".concat(n,"-summary"),ref:ue,colGroup:Sr}),Bo),Pe&&bt.current&&bt.current instanceof Element&&w.createElement(R5,{ref:x,offsetScroll:Ue,scrollBodyRef:bt,onScroll:gt,container:de,direction:v}))}else lr=w.createElement("div",{style:ze(ze({},je),ie),className:Je("".concat(n,"-content")),onScroll:gt,ref:bt},w.createElement(Fr,ht({style:ze(ze({},we),{},{tableLayout:Fn})},Hn),_n,Sr,A!==!1&&w.createElement(uf,ht({},qt,St)),$r,Ae&&w.createElement(Oi,{stickyOffsets:dt,flattenColumns:We},Ae)));var ye=w.createElement("div",ht({className:Je(n,o,$e($e($e($e($e($e($e($e($e($e({},"".concat(n,"-rtl"),v==="rtl"),"".concat(n,"-ping-left"),Dt),"".concat(n,"-ping-right"),Nt),"".concat(n,"-layout-fixed"),m==="fixed"),"".concat(n,"-fixed-header"),nr),"".concat(n,"-fixed-column"),Tt),"".concat(n,"-fixed-column-gapped"),Tt&&rt),"".concat(n,"-scroll-horizontal"),or),"".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:c,id:p,ref:mt},Ao),g&&w.createElement(ff,{className:"".concat(n,"-title")},g(U)),w.createElement("div",{ref:Ie,className:"".concat(n,"-container")},lr),y&&w.createElement(ff,{className:"".concat(n,"-footer")},y(U)));or&&(ye=w.createElement(R0,{onResize:fn},ye));var Jt=A5(We,dt,v),Cn=w.useMemo(function(){return{scrollX:Qe,prefixCls:n,getComponent:z,scrollbarSize:Jr,direction:v,fixedInfoList:Jt,isSticky:Pe,supportSticky:So,componentWidth:He,fixHeader:nr,fixColumn:Tt,horizonScroll:or,tableLayout:Fn,rowClassName:a,expandedRowClassName:ae.expandedRowClassName,expandIcon:Ce,expandableType:ge,expandRowByClick:ae.expandRowByClick,expandedRowRender:ae.expandedRowRender,expandedRowOffset:ae.expandedRowOffset,onTriggerExpand:Ee,expandIconColumnIndex:ae.expandIconColumnIndex,indentSize:ae.indentSize,allColumnsFixedLeft:We.every(function(Et){return Et.fixed==="left"}),emptyNode:Qt,columns:_e,flattenColumns:We,onColumnResize:M,colWidths:yr,hoverStartRow:pe,hoverEndRow:Oe,onHover:Q,rowExpandable:ae.rowExpandable,onRow:F,getRowKey:le,expandedKeys:be,childrenColumnName:ke,rowHoverable:W,measureRowRender:I}},[Qe,n,z,Jr,v,Jt,Pe,So,He,nr,Tt,or,Fn,a,ae.expandedRowClassName,Ce,ge,ae.expandRowByClick,ae.expandedRowRender,ae.expandedRowOffset,Ee,ae.expandIconColumnIndex,ae.indentSize,Qt,_e,We,M,yr,pe,Oe,Q,ae.rowExpandable,F,le,be,ke,W,I]);return w.createElement(Kr.Provider,{value:Cn},ye)}var j5=w.forwardRef(L5);function rm(e){return K1(j5,e)}var Ca=rm();Ca.EXPAND_COLUMN=ho;Ca.INTERNAL_HOOKS=mi;Ca.Column=n5;Ca.ColumnGroup=o5;Ca.Summary=V1;var Z0=U0(null),nm=U0(null);function _5(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function H5(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,c=e.component,l=e.renderIndex,f=e.record,d=e.style,m=e.className,v=e.inverse,g=e.getHeight,y=r.render,C=r.dataIndex,D=r.className,p=r.width,A=Ir(nm,["columnsOffset"]),O=A.columnsOffset,B=Q1(t,r,n,o,a),F=B.key,N=B.fixedInfo,I=B.appendCellNode,P=B.additionalCellProps,H=P.style,T=P.colSpan,V=T===void 0?1:T,K=P.rowSpan,G=K===void 0?1:K,Y=n-1,L=_5(Y,V,O),W=V>1?p-L:0,U=ze(ze(ze({},H),d),{},{flex:"0 0 ".concat(L,"px"),width:"".concat(L,"px"),marginRight:W,pointerEvents:"auto"}),X=w.useMemo(function(){return v?G<=1:V===0||G===0||G>1},[G,V,v]);X?U.visibility="hidden":v&&(U.height=g==null?void 0:g(G));var te=X?function(){return null}:y,z={};return(G===0||V===0)&&(z.rowSpan=1,z.colSpan=1),w.createElement(xa,ht({className:Je(D,m),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:c,prefixCls:t.prefixCls,key:F,record:f,index:a,renderIndex:l,dataIndex:C,render:te,shouldCellUpdate:r.shouldCellUpdate},N,{appendNode:I,additionalProps:ze(ze({},P),{},{style:U},z)}))}var K5=["data","index","className","rowKey","style","extra","getHeight"],q5=w.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,c=e.style,l=e.extra,f=e.getHeight,d=ir(e,K5),m=r.record,v=r.indent,g=r.index,y=Ir(Kr,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),C=y.scrollX,D=y.flattenColumns,p=y.prefixCls,A=y.fixColumn,O=y.componentWidth,B=Ir(Z0,["getComponent"]),F=B.getComponent,N=Y1(m,a,n,v),I=F(["body","row"],"div"),P=F(["body","cell"],"div"),H=N.rowSupportExpand,T=N.expanded,V=N.rowProps,K=N.expandedRowRender,G=N.expandedRowClassName,Y;if(H&&T){var L=K(m,n,v+1,T),W=Z1(G,m,n,v),U={};A&&(U={style:$e({},"--virtual-width","".concat(O,"px"))});var X="".concat(p,"-expanded-row-cell");Y=w.createElement(I,{className:Je("".concat(p,"-expanded-row"),"".concat(p,"-expanded-row-level-").concat(v+1),W)},w.createElement(xa,{component:P,prefixCls:p,className:Je(X,$e({},"".concat(X,"-fixed"),A)),additionalProps:U},L))}var te=ze(ze({},c),{},{width:C});l&&(te.position="absolute",te.pointerEvents="none");var z=w.createElement(I,ht({},V,d,{"data-row-key":a,ref:H?null:t,className:Je(o,"".concat(p,"-row"),V==null?void 0:V.className,$e({},"".concat(p,"-row-extra"),l)),style:ze(ze({},te),V==null?void 0:V.style)}),D.map(function(le,ce){return w.createElement(H5,{key:ce,component:P,rowInfo:N,column:le,colIndex:ce,indent:v,index:n,renderIndex:g,record:m,inverse:l,getHeight:f})}));return H?w.createElement("div",{ref:t},z,Y):z}),pf=ya(q5),W5=w.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Ir(Kr,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,c=o.onColumnResize,l=o.getRowKey,f=o.expandedKeys,d=o.prefixCls,m=o.childrenColumnName,v=o.scrollX,g=o.direction,y=Ir(Z0),C=y.sticky,D=y.scrollY,p=y.listItemHeight,A=y.getComponent,O=y.onScroll,B=w.useRef(),F=X1(r,m,f,l),N=w.useMemo(function(){var Y=0;return a.map(function(L){var W=L.width,U=L.minWidth,X=L.key,te=Math.max(W||0,U||0);return Y+=te,[X,te,Y]})},[a]),I=w.useMemo(function(){return N.map(function(Y){return Y[2]})},[N]);w.useEffect(function(){N.forEach(function(Y){var L=ut(Y,2),W=L[0],U=L[1];c(W,U)})},[N]),w.useImperativeHandle(t,function(){var Y,L={scrollTo:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo(U)},nativeElement:(Y=B.current)===null||Y===void 0?void 0:Y.nativeElement};return Object.defineProperty(L,"scrollLeft",{get:function(){var U;return((U=B.current)===null||U===void 0?void 0:U.getScrollInfo().x)||0},set:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo({left:U})}}),Object.defineProperty(L,"scrollTop",{get:function(){var U;return((U=B.current)===null||U===void 0?void 0:U.getScrollInfo().y)||0},set:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo({top:U})}}),L});var P=function(L,W){var U,X=(U=F[W])===null||U===void 0?void 0:U.record,te=L.onCell;if(te){var z,le=te(X,W);return(z=le==null?void 0:le.rowSpan)!==null&&z!==void 0?z:1}return 1},H=function(L){var W=L.start,U=L.end,X=L.getSize,te=L.offsetY;if(U<0)return null;for(var z=a.filter(function(be){return P(be,W)===0}),le=W,ce=function(Ce){if(z=z.filter(function(ke){return P(ke,Ce)===0}),!z.length)return le=Ce,1},he=W;he>=0&&!ce(he);he-=1);for(var ne=a.filter(function(be){return P(be,U)!==1}),pe=U,Oe=function(Ce){if(ne=ne.filter(function(ke){return P(ke,Ce)!==1}),!ne.length)return pe=Math.max(Ce-1,U),1},Q=U;Q<F.length&&!Oe(Q);Q+=1);for(var fe=[],se=function(Ce){var ke=F[Ce];if(!ke)return 1;a.some(function(Ee){return P(Ee,Ce)>1})&&fe.push(Ce)},ae=le;ae<=pe;ae+=1)se(ae);var ge=fe.map(function(be){var Ce=F[be],ke=l(Ce.record,be),Ee=function(Me){var He=be+Me-1,Ze=l(F[He].record,He),tt=X(ke,Ze);return tt.bottom-tt.top},Be=X(ke);return w.createElement(pf,{key:be,data:Ce,rowKey:ke,index:be,style:{top:-te+Be.top},extra:!0,getHeight:Ee})});return ge},T=w.useMemo(function(){return{columnsOffset:I}},[I]),V="".concat(d,"-tbody"),K=A(["body","wrapper"]),G={};return C&&(G.position="sticky",G.bottom=0,dn(C)==="object"&&C.offsetScroll&&(G.bottom=C.offsetScroll)),w.createElement(nm.Provider,{value:T},w.createElement(c1,{fullHeight:!1,ref:B,prefixCls:"".concat(V,"-virtual"),styles:{horizontalScrollBar:G},className:V,height:D,itemHeight:p||24,data:F,itemKey:function(L){return l(L.record)},component:K,scrollWidth:v,direction:g,onVirtualScroll:function(L){var W,U=L.x;n({currentTarget:(W=B.current)===null||W===void 0?void 0:W.nativeElement,scrollLeft:U})},onScroll:O,extraRender:H},function(Y,L,W){var U=l(Y.record,L);return w.createElement(pf,{data:Y,rowKey:U,index:L,style:W.style})}))}),V5=ya(W5),U5=function(t,r){var n=r.ref,o=r.onScroll;return w.createElement(V5,{ref:n,data:t,onScroll:o})};function X5(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,c=e.prefixCls,l=c===void 0?tm:c,f=e.className,d=e.listItemHeight,m=e.components,v=e.onScroll,g=o||{},y=g.x,C=g.y;typeof y!="number"&&(y=1),typeof C!="number"&&(C=500);var D=Bn(function(O,B){return M0(m,O)||B}),p=Bn(v),A=w.useMemo(function(){return{sticky:a,scrollY:C,listItemHeight:d,getComponent:D,onScroll:p}},[a,C,d,D,p]);return w.createElement(Z0.Provider,{value:A},w.createElement(Ca,ht({},e,{className:Je(f,"".concat(l,"-virtual")),scroll:ze(ze({},o),{},{x:y}),components:ze(ze({},m),{},{body:r!=null&&r.length?U5:void 0}),columns:n,internalHooks:mi,tailor:!0,ref:t})))}var Y5=w.forwardRef(X5);function om(e){return K1(Y5,e)}om();const G5=e=>null,Z5=e=>null;var Q0=w.createContext(null),Q5=w.createContext({}),J5=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,a=t.isEnd,c="".concat(r,"-indent-unit"),l=[],f=0;f<n;f+=1)l.push(w.createElement("span",{key:f,className:Je(c,$e($e({},"".concat(c,"-start"),o[f]),"".concat(c,"-end"),a[f]))}));return w.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},l)};const e6=w.memo(J5);var t6=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],mf="open",gf="close",r6="---",Qa=function(t){var r,n,o,a=t.eventKey,c=t.className,l=t.style,f=t.dragOver,d=t.dragOverGapTop,m=t.dragOverGapBottom,v=t.isLeaf,g=t.isStart,y=t.isEnd,C=t.expanded,D=t.selected,p=t.checked,A=t.halfChecked,O=t.loading,B=t.domRef,F=t.active,N=t.data,I=t.onMouseMove,P=t.selectable,H=ir(t,t6),T=Le.useContext(Q0),V=Le.useContext(Q5),K=Le.useRef(null),G=Le.useState(!1),Y=ut(G,2),L=Y[0],W=Y[1],U=!!(T.disabled||t.disabled||(r=V.nodeDisabled)!==null&&r!==void 0&&r.call(V,N)),X=Le.useMemo(function(){return!T.checkable||t.checkable===!1?!1:T.checkable},[T.checkable,t.checkable]),te=function(ue){U||T.onNodeSelect(ue,Br(t))},z=function(ue){U||!X||t.disableCheckbox||T.onNodeCheck(ue,Br(t),!p)},le=Le.useMemo(function(){return typeof P=="boolean"?P:T.selectable},[P,T.selectable]),ce=function(ue){T.onNodeClick(ue,Br(t)),le?te(ue):z(ue)},he=function(ue){T.onNodeDoubleClick(ue,Br(t))},ne=function(ue){T.onNodeMouseEnter(ue,Br(t))},pe=function(ue){T.onNodeMouseLeave(ue,Br(t))},Oe=function(ue){T.onNodeContextMenu(ue,Br(t))},Q=Le.useMemo(function(){return!!(T.draggable&&(!T.draggable.nodeDraggable||T.draggable.nodeDraggable(N)))},[T.draggable,N]),fe=function(ue){ue.stopPropagation(),W(!0),T.onNodeDragStart(ue,t);try{ue.dataTransfer.setData("text/plain","")}catch{}},se=function(ue){ue.preventDefault(),ue.stopPropagation(),T.onNodeDragEnter(ue,t)},ae=function(ue){ue.preventDefault(),ue.stopPropagation(),T.onNodeDragOver(ue,t)},ge=function(ue){ue.stopPropagation(),T.onNodeDragLeave(ue,t)},be=function(ue){ue.stopPropagation(),W(!1),T.onNodeDragEnd(ue,t)},Ce=function(ue){ue.preventDefault(),ue.stopPropagation(),W(!1),T.onNodeDrop(ue,t)},ke=function(ue){O||T.onNodeExpand(ue,Br(t))},Ee=Le.useMemo(function(){var Ie=nn(T.keyEntities,a)||{},ue=Ie.children;return!!(ue||[]).length},[T.keyEntities,a]),Be=Le.useMemo(function(){return v===!1?!1:v||!T.loadData&&!Ee||T.loadData&&t.loaded&&!Ee},[v,T.loadData,Ee,t.loaded]);Le.useEffect(function(){O||typeof T.loadData=="function"&&C&&!Be&&!t.loaded&&T.onNodeLoad(Br(t))},[O,T.loadData,T.onNodeLoad,C,Be,t]);var Ne=Le.useMemo(function(){var Ie;return(Ie=T.draggable)!==null&&Ie!==void 0&&Ie.icon?Le.createElement("span",{className:"".concat(T.prefixCls,"-draggable-icon")},T.draggable.icon):null},[T.draggable]),Me=function(ue){var nt=t.switcherIcon||T.switcherIcon;return typeof nt=="function"?nt(ze(ze({},t),{},{isLeaf:ue})):nt},He=function(){if(Be){var ue=Me(!0);return ue!==!1?Le.createElement("span",{className:Je("".concat(T.prefixCls,"-switcher"),"".concat(T.prefixCls,"-switcher-noop"))},ue):null}var nt=Me(!1);return nt!==!1?Le.createElement("span",{onClick:ke,className:Je("".concat(T.prefixCls,"-switcher"),"".concat(T.prefixCls,"-switcher_").concat(C?mf:gf))},nt):null},Ze=Le.useMemo(function(){if(!X)return null;var Ie=typeof X!="boolean"?X:null;return Le.createElement("span",{className:Je("".concat(T.prefixCls,"-checkbox"),$e($e($e({},"".concat(T.prefixCls,"-checkbox-checked"),p),"".concat(T.prefixCls,"-checkbox-indeterminate"),!p&&A),"".concat(T.prefixCls,"-checkbox-disabled"),U||t.disableCheckbox)),onClick:z,role:"checkbox","aria-checked":A?"mixed":p,"aria-disabled":U||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},Ie)},[X,p,A,U,t.disableCheckbox,t.title]),tt=Le.useMemo(function(){return Be?null:C?mf:gf},[Be,C]),Te=Le.useMemo(function(){return Le.createElement("span",{className:Je("".concat(T.prefixCls,"-iconEle"),"".concat(T.prefixCls,"-icon__").concat(tt||"docu"),$e({},"".concat(T.prefixCls,"-icon_loading"),O))})},[T.prefixCls,tt,O]),_e=Le.useMemo(function(){var Ie=!!T.draggable,ue=!t.disabled&&Ie&&T.dragOverNodeKey===a;return ue?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=Le.useMemo(function(){var Ie=t.title,ue=Ie===void 0?r6:Ie,nt="".concat(T.prefixCls,"-node-content-wrapper"),pt;if(T.showIcon){var Dt=t.icon||T.icon;pt=Dt?Le.createElement("span",{className:Je("".concat(T.prefixCls,"-iconEle"),"".concat(T.prefixCls,"-icon__customize"))},typeof Dt=="function"?Dt(t):Dt):Te}else T.loadData&&O&&(pt=Te);var vt;return typeof ue=="function"?vt=ue(N):T.titleRender?vt=T.titleRender(N):vt=ue,Le.createElement("span",{ref:K,title:typeof ue=="string"?ue:"",className:Je(nt,"".concat(nt,"-").concat(tt||"normal"),$e({},"".concat(T.prefixCls,"-node-selected"),!U&&(D||L))),onMouseEnter:ne,onMouseLeave:pe,onContextMenu:Oe,onClick:ce,onDoubleClick:he},pt,Le.createElement("span",{className:"".concat(T.prefixCls,"-title")},vt),_e)},[T.prefixCls,T.showIcon,t,T.icon,Te,T.titleRender,N,tt,ne,pe,Oe,ce,he]),st=ps(H,{aria:!0,data:!0}),rt=nn(T.keyEntities,a)||{},Qe=rt.level,St=y[y.length-1],mt=!U&&Q,ct=T.draggingNodeKey===a,bt=P!==void 0?{"aria-selected":!!P}:void 0;return Le.createElement("div",ht({ref:B,role:"treeitem","aria-expanded":v?void 0:C,className:Je(c,"".concat(T.prefixCls,"-treenode"),(o={},$e($e($e($e($e($e($e($e($e($e(o,"".concat(T.prefixCls,"-treenode-disabled"),U),"".concat(T.prefixCls,"-treenode-switcher-").concat(C?"open":"close"),!v),"".concat(T.prefixCls,"-treenode-checkbox-checked"),p),"".concat(T.prefixCls,"-treenode-checkbox-indeterminate"),A),"".concat(T.prefixCls,"-treenode-selected"),D),"".concat(T.prefixCls,"-treenode-loading"),O),"".concat(T.prefixCls,"-treenode-active"),F),"".concat(T.prefixCls,"-treenode-leaf-last"),St),"".concat(T.prefixCls,"-treenode-draggable"),Q),"dragging",ct),$e($e($e($e($e($e($e(o,"drop-target",T.dropTargetKey===a),"drop-container",T.dropContainerKey===a),"drag-over",!U&&f),"drag-over-gap-top",!U&&d),"drag-over-gap-bottom",!U&&m),"filter-node",(n=T.filterTreeNode)===null||n===void 0?void 0:n.call(T,Br(t))),"".concat(T.prefixCls,"-treenode-leaf"),Be))),style:l,draggable:mt,onDragStart:mt?fe:void 0,onDragEnter:Q?se:void 0,onDragOver:Q?ae:void 0,onDragLeave:Q?ge:void 0,onDrop:Q?Ce:void 0,onDragEnd:Q?be:void 0,onMouseMove:I},bt,st),Le.createElement(e6,{prefixCls:T.prefixCls,level:Qe,isStart:g,isEnd:y}),Ne,He(),Ze,We)};Qa.isTreeNode=1;function In(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function Xn(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function J0(e){return e.split("-")}function n6(e,t){var r=[],n=nn(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(c){var l=c.key,f=c.children;r.push(l),o(f)})}return o(n.children),r}function o6(e){if(e.parent){var t=J0(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function a6(e){var t=J0(e.pos);return Number(t[t.length-1])===0}function vf(e,t,r,n,o,a,c,l,f,d){var m,v=e.clientX,g=e.clientY,y=e.target.getBoundingClientRect(),C=y.top,D=y.height,p=(d==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-v),A=(p-12)/n,O=f.filter(function(U){var X;return(X=l[U])===null||X===void 0||(X=X.children)===null||X===void 0?void 0:X.length}),B=nn(l,r.eventKey);if(g<C+D/2){var F=c.findIndex(function(U){return U.key===B.key}),N=F<=0?0:F-1,I=c[N].key;B=nn(l,I)}var P=B.key,H=B,T=B.key,V=0,K=0;if(!O.includes(P))for(var G=0;G<A&&o6(B);G+=1)B=B.parent,K+=1;var Y=t.data,L=B.node,W=!0;return a6(B)&&B.level===0&&g<C+D/2&&a({dragNode:Y,dropNode:L,dropPosition:-1})&&B.key===r.eventKey?V=-1:(H.children||[]).length&&O.includes(T)?a({dragNode:Y,dropNode:L,dropPosition:0})?V=0:W=!1:K===0?A>-1.5?a({dragNode:Y,dropNode:L,dropPosition:1})?V=1:W=!1:a({dragNode:Y,dropNode:L,dropPosition:0})?V=0:a({dragNode:Y,dropNode:L,dropPosition:1})?V=1:W=!1:a({dragNode:Y,dropNode:L,dropPosition:1})?V=1:W=!1,{dropPosition:V,dropLevelOffset:K,dropTargetKey:B.key,dropTargetPos:B.pos,dragOverNodeKey:T,dropContainerKey:V===0?null:((m=B.parent)===null||m===void 0?void 0:m.key)||null,dropAllowed:W}}function bf(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function Hl(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(dn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return jn(!1,"`checkedKeys` is not an array or an object"),null;return t}function Vu(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=nn(t,o);if(a){r.add(o);var c=a.parent,l=a.node;l.disabled||c&&n(c.key)}}}return(e||[]).forEach(function(o){n(o)}),Ot(r)}const co={},Uu="SELECT_ALL",Xu="SELECT_INVERT",Yu="SELECT_NONE",yf=[],am=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&am(e,n[e],r)}),r),i6=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:c,onChange:l,onSelect:f,onSelectAll:d,onSelectInvert:m,onSelectNone:v,onSelectMultiple:g,columnWidth:y,type:C,selections:D,fixed:p,renderCell:A,hideSelectAll:O,checkStrictly:B=!0}=t||{},{prefixCls:F,data:N,pageData:I,getRecordByKey:P,getRowKey:H,expandType:T,childrenColumnName:V,locale:K,getPopupContainer:G}=e,Y=js(),[L,W]=T2(Ce=>Ce),[U,X]=Jn(n||o||yf,{value:n}),te=w.useRef(new Map),z=xt(Ce=>{if(r){const ke=new Map;Ce.forEach(Ee=>{let Be=P(Ee);!Be&&te.current.has(Ee)&&(Be=te.current.get(Ee)),ke.set(Ee,Be)}),te.current=ke}},[P,r]);w.useEffect(()=>{z(U)},[U]);const le=wt(()=>am(V,I),[V,I]),{keyEntities:ce}=wt(()=>{if(B)return{keyEntities:null};let Ce=N;if(r){const ke=new Set(le.map((Be,Ne)=>H(Be,Ne))),Ee=Array.from(te.current).reduce((Be,[Ne,Me])=>ke.has(Ne)?Be:Be.concat(Me),[]);Ce=[].concat(Ot(Ce),Ot(Ee))}return q0(Ce,{externalGetKey:H,childrenPropName:V})},[N,H,B,V,r,le]),he=wt(()=>{const Ce=new Map;return le.forEach((ke,Ee)=>{const Be=H(ke,Ee),Ne=(a?a(ke):null)||{};Ce.set(Be,Ne)}),Ce},[le,H,a]),ne=xt(Ce=>{const ke=H(Ce);let Ee;return he.has(ke)?Ee=he.get(H(Ce)):Ee=a?a(Ce):void 0,!!(Ee!=null&&Ee.disabled)},[he,H]),[pe,Oe]=wt(()=>{if(B)return[U||[],[]];const{checkedKeys:Ce,halfCheckedKeys:ke}=oa(U,!0,ce,ne);return[Ce||[],ke]},[U,B,ce,ne]),Q=wt(()=>{const Ce=C==="radio"?pe.slice(0,1):pe;return new Set(Ce)},[pe,C]),fe=wt(()=>C==="radio"?new Set:new Set(Oe),[Oe,C]);w.useEffect(()=>{t||X(yf)},[!!t]);const se=xt((Ce,ke)=>{let Ee,Be;z(Ce),r?(Ee=Ce,Be=Ce.map(Ne=>te.current.get(Ne))):(Ee=[],Be=[],Ce.forEach(Ne=>{const Me=P(Ne);Me!==void 0&&(Ee.push(Ne),Be.push(Me))})),X(Ee),l==null||l(Ee,Be,{type:ke})},[X,P,l,r]),ae=xt((Ce,ke,Ee,Be)=>{if(f){const Ne=Ee.map(Me=>P(Me));f(P(Ce),ke,Ne,Be)}se(Ee,"single")},[f,P,se]),ge=wt(()=>!D||O?null:(D===!0?[Uu,Xu,Yu]:D).map(ke=>ke===Uu?{key:"all",text:K.selectionAll,onSelect(){se(N.map((Ee,Be)=>H(Ee,Be)).filter(Ee=>{const Be=he.get(Ee);return!(Be!=null&&Be.disabled)||Q.has(Ee)}),"all")}}:ke===Xu?{key:"invert",text:K.selectInvert,onSelect(){const Ee=new Set(Q);I.forEach((Ne,Me)=>{const He=H(Ne,Me),Ze=he.get(He);Ze!=null&&Ze.disabled||(Ee.has(He)?Ee.delete(He):Ee.add(He))});const Be=Array.from(Ee);m&&(Y.deprecated(!1,"onSelectInvert","onChange"),m(Be)),se(Be,"invert")}}:ke===Yu?{key:"none",text:K.selectNone,onSelect(){v==null||v(),se(Array.from(Q).filter(Ee=>{const Be=he.get(Ee);return Be==null?void 0:Be.disabled}),"none")}}:ke).map(ke=>Object.assign(Object.assign({},ke),{onSelect:(...Ee)=>{var Be,Ne;(Ne=ke.onSelect)===null||Ne===void 0||(Be=Ne).call.apply(Be,[ke].concat(Ee)),W(null)}})),[D,Q,I,H,m,se]);return[xt(Ce=>{var ke;if(!t)return Ce.filter(Ie=>Ie!==co);let Ee=Ot(Ce);const Be=new Set(Q),Ne=le.map(H).filter(Ie=>!he.get(Ie).disabled),Me=Ne.every(Ie=>Be.has(Ie)),He=Ne.some(Ie=>Be.has(Ie)),Ze=()=>{const Ie=[];Me?Ne.forEach(nt=>{Be.delete(nt),Ie.push(nt)}):Ne.forEach(nt=>{Be.has(nt)||(Be.add(nt),Ie.push(nt))});const ue=Array.from(Be);d==null||d(!Me,ue.map(nt=>P(nt)),Ie.map(nt=>P(nt))),se(ue,"all"),W(null)};let tt,Te;if(C!=="radio"){let Ie;if(ge){const Nt={getPopupContainer:G,items:ge.map((_t,rr)=>{const{key:yt,text:cr,onSelect:Xt}=_t;return{key:yt??rr,onClick:()=>{Xt==null||Xt(Ne)},label:cr}})};Ie=w.createElement("div",{className:`${F}-selection-extra`},w.createElement(W0,{menu:Nt,getPopupContainer:G},w.createElement("span",null,w.createElement(g2,null))))}const ue=le.map((Nt,_t)=>{const rr=H(Nt,_t),yt=he.get(rr)||{};return Object.assign({checked:Be.has(rr)},yt)}).filter(({disabled:Nt})=>Nt),nt=!!ue.length&&ue.length===le.length,pt=nt&&ue.every(({checked:Nt})=>Nt),Dt=nt&&ue.some(({checked:Nt})=>Nt),vt=(c==null?void 0:c())||{},{onChange:Kt,disabled:Ct}=vt;Te=w.createElement(ms,Object.assign({"aria-label":Ie?"Custom selection":"Select all"},vt,{checked:nt?pt:!!le.length&&Me,indeterminate:nt?!pt&&Dt:!Me&&He,onChange:Nt=>{Ze(),Kt==null||Kt(Nt)},disabled:Ct??(le.length===0||nt),skipGroup:!0})),tt=!O&&w.createElement("div",{className:`${F}-selection`},Te,Ie)}let _e;C==="radio"?_e=(Ie,ue,nt)=>{const pt=H(ue,nt),Dt=Be.has(pt),vt=he.get(pt);return{node:w.createElement(Zp,Object.assign({},vt,{checked:Dt,onClick:Kt=>{var Ct;Kt.stopPropagation(),(Ct=vt==null?void 0:vt.onClick)===null||Ct===void 0||Ct.call(vt,Kt)},onChange:Kt=>{var Ct;Be.has(pt)||ae(pt,!0,[pt],Kt.nativeEvent),(Ct=vt==null?void 0:vt.onChange)===null||Ct===void 0||Ct.call(vt,Kt)}})),checked:Dt}}:_e=(Ie,ue,nt)=>{var pt;const Dt=H(ue,nt),vt=Be.has(Dt),Kt=fe.has(Dt),Ct=he.get(Dt);let Nt;return T==="nest"?Nt=Kt:Nt=(pt=Ct==null?void 0:Ct.indeterminate)!==null&&pt!==void 0?pt:Kt,{node:w.createElement(ms,Object.assign({},Ct,{indeterminate:Nt,checked:vt,skipGroup:!0,onClick:_t=>{var rr;_t.stopPropagation(),(rr=Ct==null?void 0:Ct.onClick)===null||rr===void 0||rr.call(Ct,_t)},onChange:_t=>{var rr;const{nativeEvent:yt}=_t,{shiftKey:cr}=yt,Xt=Ne.indexOf(Dt),Pr=pe.some(kr=>Ne.includes(kr));if(cr&&B&&Pr){const kr=L(Xt,Ne,Be),yr=Array.from(Be);g==null||g(!vt,yr.map(dt=>P(dt)),kr.map(dt=>P(dt))),se(yr,"multiple")}else{const kr=pe;if(B){const yr=vt?In(kr,Dt):Xn(kr,Dt);ae(Dt,!vt,yr,yt)}else{const yr=oa([].concat(Ot(kr),[Dt]),!0,ce,ne),{checkedKeys:dt,halfCheckedKeys:nr}=yr;let or=dt;if(vt){const Tt=new Set(dt);Tt.delete(Dt),or=oa(Array.from(Tt),{halfCheckedKeys:nr},ce,ne).checkedKeys}ae(Dt,!vt,or,yt)}}W(vt?null:Xt),(rr=Ct==null?void 0:Ct.onChange)===null||rr===void 0||rr.call(Ct,_t)}})),checked:vt}};const We=(Ie,ue,nt)=>{const{node:pt,checked:Dt}=_e(Ie,ue,nt);return A?A(Dt,ue,nt,pt):pt};if(!Ee.includes(co))if(Ee.findIndex(Ie=>{var ue;return((ue=Ie[qa])===null||ue===void 0?void 0:ue.columnType)==="EXPAND_COLUMN"})===0){const[Ie,...ue]=Ee;Ee=[Ie,co].concat(Ot(ue))}else Ee=[co].concat(Ot(Ee));const st=Ee.indexOf(co);Ee=Ee.filter((Ie,ue)=>Ie!==co||ue===st);const rt=Ee[st-1],Qe=Ee[st+1];let St=p;St===void 0&&((Qe==null?void 0:Qe.fixed)!==void 0?St=Qe.fixed:(rt==null?void 0:rt.fixed)!==void 0&&(St=rt.fixed)),St&&rt&&((ke=rt[qa])===null||ke===void 0?void 0:ke.columnType)==="EXPAND_COLUMN"&&rt.fixed===void 0&&(rt.fixed=St);const mt=Je(`${F}-selection-col`,{[`${F}-selection-col-with-dropdown`]:D&&C==="checkbox"}),ct=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Te):t.columnTitle:tt,bt={fixed:St,width:y,className:`${F}-selection-column`,title:ct(),render:We,onCell:t.onCell,align:t.align,[qa]:{className:mt}};return Ee.map(Ie=>Ie===co?bt:Ie)},[H,le,t,pe,Q,fe,y,ge,T,he,g,ae,ne]),Q]};function s6(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:c}=t,l=`${r}-row-expand-icon`;return w.createElement("button",{type:"button",onClick:f=>{n(o,f),f.stopPropagation()},className:Je(l,{[`${l}-spaced`]:!c,[`${l}-expanded`]:c&&a,[`${l}-collapsed`]:c&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function l6(e){return(r,n)=>{const o=r.querySelector(`.${e}-container`);let a=n;if(o){const c=getComputedStyle(o),l=Number.parseInt(c.borderLeftWidth,10),f=Number.parseInt(c.borderRightWidth,10);a=n-l-f}return a}}const xo=(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 wa(e,t){return t?`${t}-${e}`:`${e}`}const Xs=(e,t)=>typeof e=="function"?e(t):e,u6=(e,t)=>{const r=Xs(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var c6={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"},d6=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:c6}))},f6=w.forwardRef(d6),h6=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 Le.createElement("div",{style:a})};function im(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function p6(e,t){var r=w.useState(!1),n=ut(r,2),o=n[0],a=n[1];yo(function(){if(o)return e(),function(){t()}},[o]),yo(function(){return a(!0),function(){a(!1)}},[])}var m6=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],g6=w.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,c=e.motionType,l=e.onMotionStart,f=e.onMotionEnd,d=e.active,m=e.treeNodeRequiredProps,v=ir(e,m6),g=w.useState(!0),y=ut(g,2),C=y[0],D=y[1],p=w.useContext(Q0),A=p.prefixCls,O=a&&c!=="hide";yo(function(){a&&O!==C&&D(O)},[a]);var B=function(){a&&l()},F=w.useRef(!1),N=function(){a&&!F.current&&(F.current=!0,f())};p6(B,N);var I=function(H){O===H&&N()};return a?w.createElement(O0,ht({ref:t,visible:C},o,{motionAppear:c==="show",onVisibleChanged:I}),function(P,H){var T=P.className,V=P.style;return w.createElement("div",{ref:H,className:Je("".concat(A,"-treenode-motion"),T),style:V},a.map(function(K){var G=Object.assign({},(im(K.data),K.data)),Y=K.title,L=K.key,W=K.isStart,U=K.isEnd;delete G.children;var X=Ka(L,m);return w.createElement(Qa,ht({},G,X,{title:Y,active:d,data:K.data,key:L,isStart:W,isEnd:U}))}))}):w.createElement(Qa,ht({domRef:t,className:r,style:n},v,{active:d}))});function v6(){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,c){var l=new Map;a.forEach(function(d){l.set(d,!0)});var f=c.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 xf(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 c=t.findIndex(function(l){return l.key===o.key});return t.slice(a+1,c)}return t.slice(a+1)}var b6=["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"],Cf={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},y6=function(){},jo="RC_TREE_MOTION_".concat(Math.random()),Gu={key:jo},sm={key:jo,level:0,index:0,pos:"0",node:Gu,nodes:[Gu]},wf={parent:null,children:[],pos:sm.pos,data:Gu,title:null,key:jo,isStart:[],isEnd:[]};function Df(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function Ef(e){var t=e.key,r=e.pos;return hi(t,r)}function x6(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 C6=w.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,c=e.checkedKeys,l=e.loadedKeys,f=e.loadingKeys,d=e.halfCheckedKeys,m=e.keyEntities,v=e.disabled,g=e.dragging,y=e.dragOverNodeKey,C=e.dropPosition,D=e.motion,p=e.height,A=e.itemHeight,O=e.virtual,B=e.scrollWidth,F=e.focusable,N=e.activeItem,I=e.focused,P=e.tabIndex,H=e.onKeyDown,T=e.onFocus,V=e.onBlur,K=e.onActiveChange,G=e.onListChangeStart,Y=e.onListChangeEnd,L=ir(e,b6),W=w.useRef(null),U=w.useRef(null);w.useImperativeHandle(t,function(){return{scrollTo:function(_e){W.current.scrollTo(_e)},getIndentWidth:function(){return U.current.offsetWidth}}});var X=w.useState(o),te=ut(X,2),z=te[0],le=te[1],ce=w.useState(n),he=ut(ce,2),ne=he[0],pe=he[1],Oe=w.useState(n),Q=ut(Oe,2),fe=Q[0],se=Q[1],ae=w.useState([]),ge=ut(ae,2),be=ge[0],Ce=ge[1],ke=w.useState(null),Ee=ut(ke,2),Be=Ee[0],Ne=Ee[1],Me=w.useRef(n);Me.current=n;function He(){var Te=Me.current;pe(Te),se(Te),Ce([]),Ne(null),Y()}yo(function(){le(o);var Te=v6(z,o);if(Te.key!==null)if(Te.add){var _e=ne.findIndex(function(mt){var ct=mt.key;return ct===Te.key}),We=Df(xf(ne,n,Te.key),O,p,A),st=ne.slice();st.splice(_e+1,0,wf),se(st),Ce(We),Ne("show")}else{var rt=n.findIndex(function(mt){var ct=mt.key;return ct===Te.key}),Qe=Df(xf(n,ne,Te.key),O,p,A),St=n.slice();St.splice(rt+1,0,wf),se(St),Ce(Qe),Ne("hide")}else ne!==n&&(pe(n),se(n))},[o,n]),w.useEffect(function(){g||He()},[g]);var Ze=D?fe:n,tt={expandedKeys:o,selectedKeys:a,loadedKeys:l,loadingKeys:f,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:y,dropPosition:C,keyEntities:m};return w.createElement(w.Fragment,null,I&&N&&w.createElement("span",{style:Cf,"aria-live":"assertive"},x6(N)),w.createElement("div",null,w.createElement("input",{style:Cf,disabled:F===!1||v,tabIndex:F!==!1?P:null,onKeyDown:H,onFocus:T,onBlur:V,value:"",onChange:y6,"aria-label":"for screen reader"})),w.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},w.createElement("div",{className:"".concat(r,"-indent")},w.createElement("div",{ref:U,className:"".concat(r,"-indent-unit")}))),w.createElement(c1,ht({},L,{data:Ze,itemKey:Ef,height:p,fullHeight:!1,virtual:O,itemHeight:A,scrollWidth:B,prefixCls:"".concat(r,"-list"),ref:W,role:"tree",onVisibleChange:function(_e){_e.every(function(We){return Ef(We)!==jo})&&He()}}),function(Te){var _e=Te.pos,We=Object.assign({},(im(Te.data),Te.data)),st=Te.title,rt=Te.key,Qe=Te.isStart,St=Te.isEnd,mt=hi(rt,_e);delete We.key,delete We.children;var ct=Ka(mt,tt);return w.createElement(g6,ht({},We,ct,{title:st,active:!!N&&rt===N.key,pos:_e,data:Te.data,isStart:Qe,isEnd:St,motion:D,motionNodes:rt===jo?be:null,motionType:Be,onMotionStart:G,onMotionEnd:He,treeNodeRequiredProps:tt,onMouseMove:function(){K(null)}}))}))}),w6=10,ec=(function(e){n1(r,e);var t=o1(r);function r(){var n;a1(this,r);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return n=t.call.apply(t,[this].concat(a)),$e(jt(n),"destroyed",!1),$e(jt(n),"delayedDragEnterLogic",void 0),$e(jt(n),"loadingRetryTimes",{}),$e(jt(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:ua()}),$e(jt(n),"dragStartMousePosition",null),$e(jt(n),"dragNodeProps",null),$e(jt(n),"currentMouseOverDroppableNodeKey",null),$e(jt(n),"listRef",w.createRef()),$e(jt(n),"onNodeDragStart",function(l,f){var d=n.state,m=d.expandedKeys,v=d.keyEntities,g=n.props.onDragStart,y=f.eventKey;n.dragNodeProps=f,n.dragStartMousePosition={x:l.clientX,y:l.clientY};var C=In(m,y);n.setState({draggingNodeKey:y,dragChildrenKeys:n6(y,v),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(C),window.addEventListener("dragend",n.onWindowDragEnd),g==null||g({event:l,node:Br(f)})}),$e(jt(n),"onNodeDragEnter",function(l,f){var d=n.state,m=d.expandedKeys,v=d.keyEntities,g=d.dragChildrenKeys,y=d.flattenNodes,C=d.indent,D=n.props,p=D.onDragEnter,A=D.onExpand,O=D.allowDrop,B=D.direction,F=f.pos,N=f.eventKey;if(n.currentMouseOverDroppableNodeKey!==N&&(n.currentMouseOverDroppableNodeKey=N),!n.dragNodeProps){n.resetDragState();return}var I=vf(l,n.dragNodeProps,f,C,n.dragStartMousePosition,O,y,v,m,B),P=I.dropPosition,H=I.dropLevelOffset,T=I.dropTargetKey,V=I.dropContainerKey,K=I.dropTargetPos,G=I.dropAllowed,Y=I.dragOverNodeKey;if(g.includes(T)||!G){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(L){clearTimeout(n.delayedDragEnterLogic[L])}),n.dragNodeProps.eventKey!==f.eventKey&&(l.persist(),n.delayedDragEnterLogic[F]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var L=Ot(m),W=nn(v,f.eventKey);W&&(W.children||[]).length&&(L=Xn(m,f.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(L),A==null||A(L,{node:Br(f),expanded:!0,nativeEvent:l.nativeEvent})}},800)),n.dragNodeProps.eventKey===T&&H===0){n.resetDragState();return}n.setState({dragOverNodeKey:Y,dropPosition:P,dropLevelOffset:H,dropTargetKey:T,dropContainerKey:V,dropTargetPos:K,dropAllowed:G}),p==null||p({event:l,node:Br(f),expandedKeys:m})}),$e(jt(n),"onNodeDragOver",function(l,f){var d=n.state,m=d.dragChildrenKeys,v=d.flattenNodes,g=d.keyEntities,y=d.expandedKeys,C=d.indent,D=n.props,p=D.onDragOver,A=D.allowDrop,O=D.direction;if(n.dragNodeProps){var B=vf(l,n.dragNodeProps,f,C,n.dragStartMousePosition,A,v,g,y,O),F=B.dropPosition,N=B.dropLevelOffset,I=B.dropTargetKey,P=B.dropContainerKey,H=B.dropTargetPos,T=B.dropAllowed,V=B.dragOverNodeKey;m.includes(I)||!T||(n.dragNodeProps.eventKey===I&&N===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():F===n.state.dropPosition&&N===n.state.dropLevelOffset&&I===n.state.dropTargetKey&&P===n.state.dropContainerKey&&H===n.state.dropTargetPos&&T===n.state.dropAllowed&&V===n.state.dragOverNodeKey||n.setState({dropPosition:F,dropLevelOffset:N,dropTargetKey:I,dropContainerKey:P,dropTargetPos:H,dropAllowed:T,dragOverNodeKey:V}),p==null||p({event:l,node:Br(f)}))}}),$e(jt(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:Br(f)})}),$e(jt(n),"onWindowDragEnd",function(l){n.onNodeDragEnd(l,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),$e(jt(n),"onNodeDragEnd",function(l,f){var d=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),d==null||d({event:l,node:Br(f)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),$e(jt(n),"onNodeDrop",function(l,f){var d,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,v=n.state,g=v.dragChildrenKeys,y=v.dropPosition,C=v.dropTargetKey,D=v.dropTargetPos,p=v.dropAllowed;if(p){var A=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),C!==null){var O=ze(ze({},Ka(C,n.getTreeNodeRequiredProps())),{},{active:((d=n.getActiveItem())===null||d===void 0?void 0:d.key)===C,data:nn(n.state.keyEntities,C).node}),B=g.includes(C);jn(!B,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var F=J0(D),N={event:l,node:Br(O),dragNode:n.dragNodeProps?Br(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(g),dropToGap:y!==0,dropPosition:y+Number(F[F.length-1])};m||A==null||A(N),n.dragNodeProps=null}}}),$e(jt(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(jt(n),"triggerExpandActionExpand",function(l,f){var d=n.state,m=d.expandedKeys,v=d.flattenNodes,g=f.expanded,y=f.key,C=f.isLeaf;if(!(C||l.shiftKey||l.metaKey||l.ctrlKey)){var D=v.filter(function(A){return A.key===y})[0],p=Br(ze(ze({},Ka(y,n.getTreeNodeRequiredProps())),{},{data:D.data}));n.setExpandedKeys(g?In(m,y):Xn(m,y)),n.onNodeExpand(l,p)}}),$e(jt(n),"onNodeClick",function(l,f){var d=n.props,m=d.onClick,v=d.expandAction;v==="click"&&n.triggerExpandActionExpand(l,f),m==null||m(l,f)}),$e(jt(n),"onNodeDoubleClick",function(l,f){var d=n.props,m=d.onDoubleClick,v=d.expandAction;v==="doubleClick"&&n.triggerExpandActionExpand(l,f),m==null||m(l,f)}),$e(jt(n),"onNodeSelect",function(l,f){var d=n.state.selectedKeys,m=n.state,v=m.keyEntities,g=m.fieldNames,y=n.props,C=y.onSelect,D=y.multiple,p=f.selected,A=f[g.key],O=!p;O?D?d=Xn(d,A):d=[A]:d=In(d,A);var B=d.map(function(F){var N=nn(v,F);return N?N.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:d}),C==null||C(d,{event:"select",selected:O,node:f,selectedNodes:B,nativeEvent:l.nativeEvent})}),$e(jt(n),"onNodeCheck",function(l,f,d){var m=n.state,v=m.keyEntities,g=m.checkedKeys,y=m.halfCheckedKeys,C=n.props,D=C.checkStrictly,p=C.onCheck,A=f.key,O,B={event:"check",node:f,checked:d,nativeEvent:l.nativeEvent};if(D){var F=d?Xn(g,A):In(g,A),N=In(y,A);O={checked:F,halfChecked:N},B.checkedNodes=F.map(function(K){return nn(v,K)}).filter(Boolean).map(function(K){return K.node}),n.setUncontrolledState({checkedKeys:F})}else{var I=oa([].concat(Ot(g),[A]),!0,v),P=I.checkedKeys,H=I.halfCheckedKeys;if(!d){var T=new Set(P);T.delete(A);var V=oa(Array.from(T),{halfCheckedKeys:H},v);P=V.checkedKeys,H=V.halfCheckedKeys}O=P,B.checkedNodes=[],B.checkedNodesPositions=[],B.halfCheckedKeys=H,P.forEach(function(K){var G=nn(v,K);if(G){var Y=G.node,L=G.pos;B.checkedNodes.push(Y),B.checkedNodesPositions.push({node:Y,pos:L})}}),n.setUncontrolledState({checkedKeys:P},!1,{halfCheckedKeys:H})}p==null||p(O,B)}),$e(jt(n),"onNodeLoad",function(l){var f,d=l.key,m=n.state.keyEntities,v=nn(m,d);if(!(v!=null&&(f=v.children)!==null&&f!==void 0&&f.length)){var g=new Promise(function(y,C){n.setState(function(D){var p=D.loadedKeys,A=p===void 0?[]:p,O=D.loadingKeys,B=O===void 0?[]:O,F=n.props,N=F.loadData,I=F.onLoad;if(!N||A.includes(d)||B.includes(d))return null;var P=N(l);return P.then(function(){var H=n.state.loadedKeys,T=Xn(H,d);I==null||I(T,{event:"load",node:l}),n.setUncontrolledState({loadedKeys:T}),n.setState(function(V){return{loadingKeys:In(V.loadingKeys,d)}}),y()}).catch(function(H){if(n.setState(function(V){return{loadingKeys:In(V.loadingKeys,d)}}),n.loadingRetryTimes[d]=(n.loadingRetryTimes[d]||0)+1,n.loadingRetryTimes[d]>=w6){var T=n.state.loadedKeys;jn(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Xn(T,d)}),y()}C(H)}),{loadingKeys:Xn(B,d)}})});return g.catch(function(){}),g}}),$e(jt(n),"onNodeMouseEnter",function(l,f){var d=n.props.onMouseEnter;d==null||d({event:l,node:f})}),$e(jt(n),"onNodeMouseLeave",function(l,f){var d=n.props.onMouseLeave;d==null||d({event:l,node:f})}),$e(jt(n),"onNodeContextMenu",function(l,f){var d=n.props.onRightClick;d&&(l.preventDefault(),d({event:l,node:f}))}),$e(jt(n),"onFocus",function(){var l=n.props.onFocus;n.setState({focused:!0});for(var f=arguments.length,d=new Array(f),m=0;m<f;m++)d[m]=arguments[m];l==null||l.apply(void 0,d)}),$e(jt(n),"onBlur",function(){var l=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var f=arguments.length,d=new Array(f),m=0;m<f;m++)d[m]=arguments[m];l==null||l.apply(void 0,d)}),$e(jt(n),"getTreeNodeRequiredProps",function(){var l=n.state,f=l.expandedKeys,d=l.selectedKeys,m=l.loadedKeys,v=l.loadingKeys,g=l.checkedKeys,y=l.halfCheckedKeys,C=l.dragOverNodeKey,D=l.dropPosition,p=l.keyEntities;return{expandedKeys:f||[],selectedKeys:d||[],loadedKeys:m||[],loadingKeys:v||[],checkedKeys:g||[],halfCheckedKeys:y||[],dragOverNodeKey:C,dropPosition:D,keyEntities:p}}),$e(jt(n),"setExpandedKeys",function(l){var f=n.state,d=f.treeData,m=f.fieldNames,v=_l(d,l,m);n.setUncontrolledState({expandedKeys:l,flattenNodes:v},!0)}),$e(jt(n),"onNodeExpand",function(l,f){var d=n.state.expandedKeys,m=n.state,v=m.listChanging,g=m.fieldNames,y=n.props,C=y.onExpand,D=y.loadData,p=f.expanded,A=f[g.key];if(!v){var O=d.includes(A),B=!p;if(jn(p&&O||!p&&!O,"Expand state not sync with index check"),d=B?Xn(d,A):In(d,A),n.setExpandedKeys(d),C==null||C(d,{node:f,expanded:B,nativeEvent:l.nativeEvent}),B&&D){var F=n.onNodeLoad(f);F&&F.then(function(){var N=_l(n.state.treeData,d,g);n.setUncontrolledState({flattenNodes:N})}).catch(function(){var N=n.state.expandedKeys,I=In(N,A);n.setExpandedKeys(I)})}}}),$e(jt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),$e(jt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),$e(jt(n),"onActiveChange",function(l){var f=n.state.activeKey,d=n.props,m=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}),m==null||m(l))}),$e(jt(n),"getActiveItem",function(){var l=n.state,f=l.activeKey,d=l.flattenNodes;return f===null?null:d.find(function(m){var v=m.key;return v===f})||null}),$e(jt(n),"offsetActiveKey",function(l){var f=n.state,d=f.flattenNodes,m=f.activeKey,v=d.findIndex(function(C){var D=C.key;return D===m});v===-1&&l<0&&(v=d.length),v=(v+l+d.length)%d.length;var g=d[v];if(g){var y=g.key;n.onActiveChange(y)}else n.onActiveChange(null)}),$e(jt(n),"onKeyDown",function(l){var f=n.state,d=f.activeKey,m=f.expandedKeys,v=f.checkedKeys,g=f.fieldNames,y=n.props,C=y.onKeyDown,D=y.checkable,p=y.selectable;switch(l.which){case Er.UP:{n.offsetActiveKey(-1),l.preventDefault();break}case Er.DOWN:{n.offsetActiveKey(1),l.preventDefault();break}}var A=n.getActiveItem();if(A&&A.data){var O=n.getTreeNodeRequiredProps(),B=A.data.isLeaf===!1||!!(A.data[g.children]||[]).length,F=Br(ze(ze({},Ka(d,O)),{},{data:A.data,active:!0}));switch(l.which){case Er.LEFT:{B&&m.includes(d)?n.onNodeExpand({},F):A.parent&&n.onActiveChange(A.parent.key),l.preventDefault();break}case Er.RIGHT:{B&&!m.includes(d)?n.onNodeExpand({},F):A.children&&A.children.length&&n.onActiveChange(A.children[0].key),l.preventDefault();break}case Er.ENTER:case Er.SPACE:{D&&!F.disabled&&F.checkable!==!1&&!F.disableCheckbox?n.onNodeCheck({},F,!v.includes(d)):!D&&p&&!F.disabled&&F.selectable!==!1&&n.onNodeSelect({},F);break}}}C==null||C(l)}),$e(jt(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 m=!1,v=!0,g={};Object.keys(l).forEach(function(y){if(n.props.hasOwnProperty(y)){v=!1;return}m=!0,g[y]=l[y]}),m&&(!f||v)&&n.setState(ze(ze({},g),d))}}),$e(jt(n),"scrollTo",function(l){n.listRef.current.scrollTo(l)}),n}return i1(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,c=o.itemScrollOffset,l=c===void 0?0:c;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,c=o.flattenNodes,l=o.keyEntities,f=o.draggingNodeKey,d=o.activeKey,m=o.dropLevelOffset,v=o.dropContainerKey,g=o.dropTargetKey,y=o.dropPosition,C=o.dragOverNodeKey,D=o.indent,p=this.props,A=p.prefixCls,O=p.className,B=p.style,F=p.showLine,N=p.focusable,I=p.tabIndex,P=I===void 0?0:I,H=p.selectable,T=p.showIcon,V=p.icon,K=p.switcherIcon,G=p.draggable,Y=p.checkable,L=p.checkStrictly,W=p.disabled,U=p.motion,X=p.loadData,te=p.filterTreeNode,z=p.height,le=p.itemHeight,ce=p.scrollWidth,he=p.virtual,ne=p.titleRender,pe=p.dropIndicatorRender,Oe=p.onContextMenu,Q=p.onScroll,fe=p.direction,se=p.rootClassName,ae=p.rootStyle,ge=ps(this.props,{aria:!0,data:!0}),be;G&&(dn(G)==="object"?be=G:typeof G=="function"?be={nodeDraggable:G}:be={});var Ce={prefixCls:A,selectable:H,showIcon:T,icon:V,switcherIcon:K,draggable:be,draggingNodeKey:f,checkable:Y,checkStrictly:L,disabled:W,keyEntities:l,dropLevelOffset:m,dropContainerKey:v,dropTargetKey:g,dropPosition:y,dragOverNodeKey:C,indent:D,direction:fe,dropIndicatorRender:pe,loadData:X,filterTreeNode:te,titleRender:ne,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 w.createElement(Q0.Provider,{value:Ce},w.createElement("div",{className:Je(A,O,se,$e($e($e({},"".concat(A,"-show-line"),F),"".concat(A,"-focused"),a),"".concat(A,"-active-focused"),d!==null)),style:ae},w.createElement(C6,ht({ref:this.listRef,prefixCls:A,style:B,data:c,disabled:W,selectable:H,checkable:!!Y,motion:U,dragging:f!==null,height:z,itemHeight:le,virtual:he,focusable:N,focused:a,tabIndex:P,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Oe,onScroll:Q,scrollWidth:ce},this.getTreeNodeRequiredProps(),ge))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var c=a.prevProps,l={prevProps:o};function f(P){return!c&&o.hasOwnProperty(P)||c&&c[P]!==o[P]}var d,m=a.fieldNames;if(f("fieldNames")&&(m=ua(o.fieldNames),l.fieldNames=m),f("treeData")?d=o.treeData:f("children")&&(jn(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=T1(o.children)),d){l.treeData=d;var v=q0(d,{fieldNames:m});l.keyEntities=ze($e({},jo,sm),v.keyEntities)}var g=l.keyEntities||a.keyEntities;if(f("expandedKeys")||c&&f("autoExpandParent"))l.expandedKeys=o.autoExpandParent||!c&&o.defaultExpandParent?Vu(o.expandedKeys,g):o.expandedKeys;else if(!c&&o.defaultExpandAll){var y=ze({},g);delete y[jo];var C=[];Object.keys(y).forEach(function(P){var H=y[P];H.children&&H.children.length&&C.push(H.key)}),l.expandedKeys=C}else!c&&o.defaultExpandedKeys&&(l.expandedKeys=o.autoExpandParent||o.defaultExpandParent?Vu(o.defaultExpandedKeys,g):o.defaultExpandedKeys);if(l.expandedKeys||delete l.expandedKeys,d||l.expandedKeys){var D=_l(d||a.treeData,l.expandedKeys||a.expandedKeys,m);l.flattenNodes=D}if(o.selectable&&(f("selectedKeys")?l.selectedKeys=bf(o.selectedKeys,o):!c&&o.defaultSelectedKeys&&(l.selectedKeys=bf(o.defaultSelectedKeys,o))),o.checkable){var p;if(f("checkedKeys")?p=Hl(o.checkedKeys)||{}:!c&&o.defaultCheckedKeys?p=Hl(o.defaultCheckedKeys)||{}:d&&(p=Hl(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),p){var A=p,O=A.checkedKeys,B=O===void 0?[]:O,F=A.halfCheckedKeys,N=F===void 0?[]:F;if(!o.checkStrictly){var I=oa(B,!0,g);B=I.checkedKeys,N=I.halfCheckedKeys}l.checkedKeys=B,l.halfCheckedKeys=N}}return f("loadedKeys")&&(l.loadedKeys=o.loadedKeys),l}}]),r})(w.Component);$e(ec,"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:h6,allowDrop:function(){return!0},expandAction:!1});$e(ec,"TreeNode",Qa);var D6={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"},E6=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:D6}))},lm=w.forwardRef(E6),k6={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"},S6=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:k6}))},B6=w.forwardRef(S6),A6={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"},F6=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:A6}))},O6=w.forwardRef(F6),N6={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 w.createElement(Hr,ht({},t,{ref:r,icon:N6}))},T6=w.forwardRef($6);const M6=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:c})=>({[`${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:c}},[`${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}}}}}),R6=new b2("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),I6=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),P6=(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:`${Ye(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),z6=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:c,nodeSelectedBg:l,nodeHoverBg:f,colorTextQuaternary:d,controlItemBgActiveDisabled:m}=t;return{[r]:Object.assign(Object.assign({},ci(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)`]:s1(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:R6,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:Ye(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:m},[`${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:c}},[`${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({},I6(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`},P6(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:`${Ye(t.calc(a).div(2).equal())} !important`}})}},L6=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),c=Lo(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[z6(e,c),r&&M6(c)].filter(Boolean)},j6=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}},_6=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},j6(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},H6=ui("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:v2(`${t}-checkbox`,e)},L6(t,e),l1(e)],_6),kf=4;function K6(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,c=a==="ltr"?"left":"right",l=a==="ltr"?"right":"left",f={[c]:-r*o+kf,[l]:0};switch(t){case-1:f.top=-3;break;case 1:f.bottom=-3;break;default:f.bottom=-3,f[c]=o+kf;break}return Le.createElement("div",{style:f,className:`${n}-drop-indicator`})}var q6={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"},W6=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:q6}))},V6=w.forwardRef(W6),U6={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"},X6=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:U6}))},Y6=w.forwardRef(X6),G6={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"},Z6=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:G6}))},Q6=w.forwardRef(Z6);const J6=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:c,switcherLoadingIcon:l}=e,{isLeaf:f,expanded:d,loading:m}=a;if(m)return w.isValidElement(l)?l:w.createElement(y2,{className:`${n}-switcher-loading-icon`});let v;if(c&&typeof c=="object"&&(v=c.showLeafIcon),f){if(!c)return null;if(typeof v!="boolean"&&v){const C=typeof v=="function"?v(a):v,D=`${n}-switcher-line-custom-icon`;return w.isValidElement(C)?la(C,{className:Je((t=C.props)===null||t===void 0?void 0:t.className,D)}):C}return v?w.createElement(lm,{className:`${n}-switcher-line-icon`}):w.createElement("span",{className:`${n}-switcher-leaf-line`})}const g=`${n}-switcher-icon`,y=typeof o=="function"?o(a):o;return w.isValidElement(y)?la(y,{className:Je((r=y.props)===null||r===void 0?void 0:r.className,g)}):y!==void 0?y:c?d?w.createElement(Y6,{className:`${n}-switcher-line-icon`}):w.createElement(Q6,{className:`${n}-switcher-line-icon`}):w.createElement(V6,{className:g})},um=Le.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:c}=Le.useContext(no),{prefixCls:l,className:f,showIcon:d=!1,showLine:m,switcherIcon:v,switcherLoadingIcon:g,blockNode:y=!1,children:C,checkable:D=!1,selectable:p=!0,draggable:A,disabled:O,motion:B,style:F}=e,N=n("tree",l),I=n(),P=Le.useContext(x2),H=O??P,T=B??Object.assign(Object.assign({},u1(I)),{motionAppear:!1}),V=Object.assign(Object.assign({},e),{checkable:D,selectable:p,showIcon:d,motion:T,blockNode:y,disabled:H,showLine:!!m,dropIndicatorRender:K6}),[K,G,Y]=H6(N),[,L]=T0(),W=L.paddingXS/2+(((r=L.Tree)===null||r===void 0?void 0:r.titleHeight)||L.controlHeightSM),U=Le.useMemo(()=>{if(!A)return!1;let te={};switch(typeof A){case"function":te.nodeDraggable=A;break;case"object":te=Object.assign({},A);break}return te.icon!==!1&&(te.icon=te.icon||Le.createElement(T6,null)),te},[A]),X=te=>Le.createElement(J6,{prefixCls:N,switcherIcon:v,switcherLoadingIcon:g,treeNodeProps:te,showLine:m});return K(Le.createElement(ec,Object.assign({itemHeight:W,ref:t,virtual:a},V,{style:Object.assign(Object.assign({},c==null?void 0:c.style),F),prefixCls:N,className:Je({[`${N}-icon-hide`]:!d,[`${N}-block-node`]:y,[`${N}-unselectable`]:!p,[`${N}-rtl`]:o==="rtl",[`${N}-disabled`]:H},c==null?void 0:c.className,f,G,Y),direction:o,checkable:D&&Le.createElement("span",{className:`${N}-checkbox-inner`}),selectable:p,switcherIcon:X,draggable:U}),C))}),Sf=0,Kl=1,Bf=2;function tc(e,t,r){const{key:n,children:o}=r;function a(c){const l=c[n],f=c[o];t(l,c)!==!1&&tc(f||[],t,r)}e.forEach(a)}function e8({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let c=Sf;if(r&&r===n)return[r];if(!r||!n)return[];function l(f){return f===r||f===n}return tc(e,f=>{if(c===Bf)return!1;if(l(f)){if(a.push(f),c===Sf)c=Kl;else if(c===Kl)return c=Bf,!1}else c===Kl&&a.push(f);return t.includes(f)},ua(o)),a}function ql(e,t,r){const n=Ot(t),o=[];return tc(e,(a,c)=>{const l=n.indexOf(a);return l!==-1&&(o.push(c),n.splice(l,1)),!!n.length},ua(r)),o}var Af=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 t8(e){const{isLeaf:t,expanded:r}=e;return t?w.createElement(lm,null):r?w.createElement(B6,null):w.createElement(O6,null)}function Ff({treeData:e,children:t}){return e||T1(t)}const r8=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=Af(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const c=w.useRef(null),l=w.useRef(null),f=()=>{const{keyEntities:H}=q0(Ff(a),{fieldNames:a.fieldNames});let T;return r?T=Object.keys(H):n?T=Vu(a.expandedKeys||o||[],H):T=a.expandedKeys||o||[],T},[d,m]=w.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[v,g]=w.useState(()=>f());w.useEffect(()=>{"selectedKeys"in a&&m(a.selectedKeys)},[a.selectedKeys]),w.useEffect(()=>{"expandedKeys"in a&&g(a.expandedKeys)},[a.expandedKeys]);const y=(H,T)=>{var V;return"expandedKeys"in a||g(H),(V=a.onExpand)===null||V===void 0?void 0:V.call(a,H,T)},C=(H,T)=>{var V;const{multiple:K,fieldNames:G}=a,{node:Y,nativeEvent:L}=T,{key:W=""}=Y,U=Ff(a),X=Object.assign(Object.assign({},T),{selected:!0}),te=(L==null?void 0:L.ctrlKey)||(L==null?void 0:L.metaKey),z=L==null?void 0:L.shiftKey;let le;K&&te?(le=H,c.current=W,l.current=le,X.selectedNodes=ql(U,le,G)):K&&z?(le=Array.from(new Set([].concat(Ot(l.current||[]),Ot(e8({treeData:U,expandedKeys:v,startKey:W,endKey:c.current,fieldNames:G}))))),X.selectedNodes=ql(U,le,G)):(le=[W],c.current=W,l.current=le,X.selectedNodes=ql(U,le,G)),(V=a.onSelect)===null||V===void 0||V.call(a,le,X),"selectedKeys"in a||m(le)},{getPrefixCls:D,direction:p}=w.useContext(no),{prefixCls:A,className:O,showIcon:B=!0,expandAction:F="click"}=a,N=Af(a,["prefixCls","className","showIcon","expandAction"]),I=D("tree",A),P=Je(`${I}-directory`,{[`${I}-directory-rtl`]:p==="rtl"},O);return w.createElement(um,Object.assign({icon:t8,ref:t,blockNode:!0},N,{showIcon:B,expandAction:F,prefixCls:I,className:P,expandedKeys:v,selectedKeys:d,onSelect:C,onExpand:y}))},n8=w.forwardRef(r8),rc=um;rc.DirectoryTree=n8;rc.TreeNode=Qa;const Of=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?w.createElement("div",{className:`${n}-filter-dropdown-search`},w.createElement(C2,{prefix:w.createElement(w2,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},o8=e=>{const{keyCode:t}=e;t===Er.ENTER&&e.stopPropagation()},a8=w.forwardRef((e,t)=>w.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:o8,ref:t},e.children));function aa(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(Ot(t),Ot(aa(n))))}),t}function i8(e){return e.some(({children:t})=>t)}function cm(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function dm({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((c,l)=>{const f=String(c.value);if(c.children)return{key:f||l,label:c.text,popupClassName:`${t}-dropdown-submenu`,children:dm({filters:c.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const d=n?ms:Zp,m={key:c.value!==void 0?f:l,label:w.createElement(w.Fragment,null,w.createElement(d,{checked:r.includes(f)}),w.createElement("span",null,c.text))};return o.trim()?typeof a=="function"?a(o,c)?m:null:cm(o,c.text)?m:null:m})}function Wl(e){return e||[]}const s8=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:c,column:l,dropdownPrefixCls:f,columnKey:d,filterOnClose:m,filterMultiple:v,filterMode:g="menu",filterSearch:y=!1,filterState:C,triggerFilter:D,locale:p,children:A,getPopupContainer:O,rootClassName:B}=e,{filterResetToDefaultFilteredValue:F,defaultFilteredValue:N,filterDropdownProps:I={},filterDropdownOpen:P,filterDropdownVisible:H,onFilterDropdownVisibleChange:T,onFilterDropdownOpenChange:V}=l,[K,G]=w.useState(!1),Y=!!(C&&(!((t=C.filteredKeys)===null||t===void 0)&&t.length||C.forceFiltered)),L=Te=>{var _e;G(Te),(_e=I.onOpenChange)===null||_e===void 0||_e.call(I,Te),V==null||V(Te),T==null||T(Te)},W=(o=(n=(r=I.open)!==null&&r!==void 0?r:P)!==null&&n!==void 0?n:H)!==null&&o!==void 0?o:K,U=C==null?void 0:C.filteredKeys,[X,te]=I2(Wl(U)),z=({selectedKeys:Te})=>{te(Te)},le=(Te,{node:_e,checked:We})=>{z(v?{selectedKeys:Te}:{selectedKeys:We&&_e.key?[_e.key]:[]})};w.useEffect(()=>{K&&z({selectedKeys:Wl(U)})},[U]);const[ce,he]=w.useState([]),ne=Te=>{he(Te)},[pe,Oe]=w.useState(""),Q=Te=>{const{value:_e}=Te.target;Oe(_e)};w.useEffect(()=>{K||Oe("")},[K]);const fe=Te=>{const _e=Te!=null&&Te.length?Te:null;if(_e===null&&(!C||!C.filteredKeys)||bo(_e,C==null?void 0:C.filteredKeys,!0))return null;D({column:l,key:d,filteredKeys:_e})},se=()=>{L(!1),fe(X())},ae=({confirm:Te,closeDropdown:_e}={confirm:!1,closeDropdown:!1})=>{Te&&fe([]),_e&&L(!1),Oe(""),te(F?(N||[]).map(We=>String(We)):[])},ge=({closeDropdown:Te}={closeDropdown:!0})=>{Te&&L(!1),fe(X())},be=(Te,_e)=>{_e.source==="trigger"&&(Te&&U!==void 0&&te(Wl(U)),L(Te),!Te&&!l.filterDropdown&&m&&se())},Ce=Je({[`${f}-menu-without-submenu`]:!i8(l.filters||[])}),ke=Te=>{if(Te.target.checked){const _e=aa(l==null?void 0:l.filters).map(We=>String(We));te(_e)}else te([])},Ee=({filters:Te})=>(Te||[]).map((_e,We)=>{const st=String(_e.value),rt={title:_e.text,key:_e.value!==void 0?st:String(We)};return _e.children&&(rt.children=Ee({filters:_e.children})),rt}),Be=Te=>{var _e;return Object.assign(Object.assign({},Te),{text:Te.title,value:Te.key,children:((_e=Te.children)===null||_e===void 0?void 0:_e.map(We=>Be(We)))||[]})};let Ne;const{direction:Me,renderEmpty:He}=w.useContext(no);if(typeof l.filterDropdown=="function")Ne=l.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:Te=>z({selectedKeys:Te}),selectedKeys:X(),confirm:ge,clearFilters:ae,filters:l.filters,visible:W,close:()=>{L(!1)}});else if(l.filterDropdown)Ne=l.filterDropdown;else{const Te=X()||[],_e=()=>{var st,rt;const Qe=(st=He==null?void 0:He("Table.filter"))!==null&&st!==void 0?st:w.createElement(Wd,{image:Wd.PRESENTED_IMAGE_SIMPLE,description:p.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((l.filters||[]).length===0)return Qe;if(g==="tree")return w.createElement(w.Fragment,null,w.createElement(Of,{filterSearch:y,value:pe,onChange:Q,tablePrefixCls:a,locale:p}),w.createElement("div",{className:`${a}-filter-dropdown-tree`},v?w.createElement(ms,{checked:Te.length===aa(l.filters).length,indeterminate:Te.length>0&&Te.length<aa(l.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:ke},(rt=p==null?void 0:p.filterCheckall)!==null&&rt!==void 0?rt:p==null?void 0:p.filterCheckAll):null,w.createElement(rc,{checkable:!0,selectable:!1,blockNode:!0,multiple:v,checkStrictly:!v,className:`${f}-menu`,onCheck:le,checkedKeys:Te,selectedKeys:Te,showIcon:!1,treeData:Ee({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:pe.trim()?ct=>typeof y=="function"?y(pe,Be(ct)):cm(pe,ct.title):void 0})));const St=dm({filters:l.filters||[],filterSearch:y,prefixCls:c,filteredKeys:X(),filterMultiple:v,searchValue:pe}),mt=St.every(ct=>ct===null);return w.createElement(w.Fragment,null,w.createElement(Of,{filterSearch:y,value:pe,onChange:Q,tablePrefixCls:a,locale:p}),mt?Qe:w.createElement(ba,{selectable:!0,multiple:v,prefixCls:`${f}-menu`,className:Ce,onSelect:z,onDeselect:z,selectedKeys:Te,getPopupContainer:O,openKeys:ce,onOpenChange:ne,items:St}))},We=()=>F?bo((N||[]).map(st=>String(st)),Te,!0):Te.length===0;Ne=w.createElement(w.Fragment,null,_e(),w.createElement("div",{className:`${c}-dropdown-btns`},w.createElement(fs,{type:"link",size:"small",disabled:We(),onClick:()=>ae()},p.filterReset),w.createElement(fs,{type:"primary",size:"small",onClick:se},p.filterConfirm)))}l.filterDropdown&&(Ne=w.createElement(O1,{selectable:void 0},Ne)),Ne=w.createElement(a8,{className:`${c}-dropdown`},Ne);const tt=d1({trigger:["click"],placement:Me==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let Te;return typeof l.filterIcon=="function"?Te=l.filterIcon(Y):l.filterIcon?Te=l.filterIcon:Te=w.createElement(f6,null),w.createElement("span",{role:"button",tabIndex:-1,className:Je(`${c}-trigger`,{active:Y}),onClick:_e=>{_e.stopPropagation()}},Te)})(),getPopupContainer:O},Object.assign(Object.assign({},I),{rootClassName:Je(B,I.rootClassName),open:W,onOpenChange:be,popupRender:()=>typeof(I==null?void 0:I.dropdownRender)=="function"?I.dropdownRender(Ne):Ne}));return w.createElement("div",{className:`${c}-column`},w.createElement("span",{className:`${a}-column-title`},A),w.createElement(W0,Object.assign({},tt)))},Zu=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var c;const l=wa(a,r),f=o.filterDropdown!==void 0;if(o.filters||f||"onFilter"in o)if("filteredValue"in o){let d=o.filteredValue;f||(d=(c=d==null?void 0:d.map(String))!==null&&c!==void 0?c:d),n.push({column:o,key:xo(o,l),filteredKeys:d,forceFiltered:o.filtered})}else n.push({column:o,key:xo(o,l),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(Ot(n),Ot(Zu(o.children,t,l))))}),n};function fm(e,t,r,n,o,a,c,l,f){return r.map((d,m)=>{const v=wa(m,l),{filterOnClose:g=!0,filterMultiple:y=!0,filterMode:C,filterSearch:D}=d;let p=d;if(p.filters||p.filterDropdown){const A=xo(p,v),O=n.find(({key:B})=>A===B);p=Object.assign(Object.assign({},p),{title:B=>w.createElement(s8,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:p,columnKey:A,filterState:O,filterOnClose:g,filterMultiple:y,filterMode:C,filterSearch:D,triggerFilter:a,locale:o,getPopupContainer:c,rootClassName:f},Xs(d.title,B))})}return"children"in p&&(p=Object.assign(Object.assign({},p),{children:fm(e,t,p.children,n,o,a,c,v,f)})),p})}const Nf=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:c,filterDropdown:l}=o;if(l)t[a]=n||null;else if(Array.isArray(n)){const f=aa(c);t[a]=f.filter(d=>n.includes(String(d)))}else t[a]=null}),t},Qu=(e,t,r)=>t.reduce((o,a)=>{const{column:{onFilter:c,filters:l},filteredKeys:f}=a;return c&&f&&f.length?o.map(d=>Object.assign({},d)).filter(d=>f.some(m=>{const v=aa(l),g=v.findIndex(C=>String(C)===String(m)),y=g!==-1?v[g]:m;return d[r]&&(d[r]=Qu(d[r],t,r)),c(y,d)})):o},e),hm=e=>e.flatMap(t=>"children"in t?[t].concat(Ot(hm(t.children||[]))):[t]),l8=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:c,rootClassName:l}=e;js();const f=w.useMemo(()=>hm(n||[]),[n]),[d,m]=w.useState(()=>Zu(f,!0)),v=w.useMemo(()=>{const D=Zu(f,!1);if(D.length===0)return D;let p=!0;if(D.forEach(({filteredKeys:A})=>{A!==void 0&&(p=!1)}),p){const A=(f||[]).map((O,B)=>xo(O,wa(B)));return d.filter(({key:O})=>A.includes(O)).map(O=>{const B=f[A.indexOf(O.key)];return Object.assign(Object.assign({},O),{column:Object.assign(Object.assign({},O.column),B),forceFiltered:B.filtered})})}return D},[f,d]),g=w.useMemo(()=>Nf(v),[v]),y=D=>{const p=v.filter(({key:A})=>A!==D.key);p.push(D),m(p),o(Nf(p),p)};return[D=>fm(t,r,D,v,c,y,a,void 0,l),v,g]},u8=(e,t,r)=>{const n=w.useRef({});function o(a){var c;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let f=function(d){d.forEach((m,v)=>{const g=r(m,v);l.set(g,m),m&&typeof m=="object"&&t in m&&f(m[t]||[])})};const l=new Map;f(e),n.current={data:e,childrenColumnName:t,kvMap:l,getRowKey:r}}return(c=n.current.kvMap)===null||c===void 0?void 0:c.get(a)}return[o]};var c8=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 pm=10;function d8(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 f8(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=c8(n,["total"]),[c,l]=Bt(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:pm})),f=d1(c,a,{total:o>0?o:e}),d=Math.ceil((o||e)/f.pageSize);f.current>d&&(f.current=d||1);const m=(g,y)=>{l({current:g??1,pageSize:y||f.pageSize})},v=(g,y)=>{var C;r&&((C=r.onChange)===null||C===void 0||C.call(r,g,y)),m(g,y),t(g,y||(f==null?void 0:f.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},f),{onChange:v}),m]}var h8={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"},p8=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:h8}))},m8=w.forwardRef(p8),g8={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"},v8=function(t,r){return w.createElement(Hr,ht({},t,{ref:r,icon:g8}))},b8=w.forwardRef(v8);const Yi="ascend",Vl="descend",ws=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,$f=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,y8=(e,t)=>t?e[e.indexOf(t)+1]:e[0],Ju=(e,t,r)=>{let n=[];const o=(a,c)=>{n.push({column:a,key:xo(a,c),multiplePriority:ws(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,c)=>{const l=wa(c,r);a.children?("sortOrder"in a&&o(a,l),n=[].concat(Ot(n),Ot(Ju(a.children,t,l)))):a.sorter&&("sortOrder"in a?o(a,l):t&&a.defaultSortOrder&&n.push({column:a,key:xo(a,l),multiplePriority:ws(a),sortOrder:a.defaultSortOrder}))}),n},mm=(e,t,r,n,o,a,c,l)=>(t||[]).map((d,m)=>{const v=wa(m,l);let g=d;if(g.sorter){const y=g.sortDirections||o,C=g.showSorterTooltip===void 0?c:g.showSorterTooltip,D=xo(g,v),p=r.find(({key:T})=>T===D),A=p?p.sortOrder:null,O=y8(y,A);let B;if(d.sortIcon)B=d.sortIcon({sortOrder:A});else{const T=y.includes(Yi)&&w.createElement(b8,{className:Je(`${e}-column-sorter-up`,{active:A===Yi})}),V=y.includes(Vl)&&w.createElement(m8,{className:Je(`${e}-column-sorter-down`,{active:A===Vl})});B=w.createElement("span",{className:Je(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(T&&V)})},w.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},T,V))}const{cancelSort:F,triggerAsc:N,triggerDesc:I}=a||{};let P=F;O===Vl?P=I:O===Yi&&(P=N);const H=typeof C=="object"?Object.assign({title:P},C):{title:P};g=Object.assign(Object.assign({},g),{className:Je(g.className,{[`${e}-column-sort`]:A}),title:T=>{const V=`${e}-column-sorters`,K=w.createElement("span",{className:`${e}-column-title`},Xs(d.title,T)),G=w.createElement("div",{className:V},K,B);return C?typeof C!="boolean"&&(C==null?void 0:C.target)==="sorter-icon"?w.createElement("div",{className:`${V} ${e}-column-sorters-tooltip-target-sorter`},K,w.createElement(cs,Object.assign({},H),B)):w.createElement(cs,Object.assign({},H),G):G},onHeaderCell:T=>{var V;const K=((V=d.onHeaderCell)===null||V===void 0?void 0:V.call(d,T))||{},G=K.onClick,Y=K.onKeyDown;K.onClick=U=>{n({column:d,key:D,sortOrder:O,multiplePriority:ws(d)}),G==null||G(U)},K.onKeyDown=U=>{U.keyCode===Er.ENTER&&(n({column:d,key:D,sortOrder:O,multiplePriority:ws(d)}),Y==null||Y(U))};const L=u6(d.title,{}),W=L==null?void 0:L.toString();return A&&(K["aria-sort"]=A==="ascend"?"ascending":"descending"),K["aria-label"]=W||"",K.className=Je(K.className,`${e}-column-has-sorters`),K.tabIndex=0,d.ellipsis&&(K.title=(L??"").toString()),K}})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:mm(e,g.children,r,n,o,a,c,v)})),g}),Tf=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Mf=e=>{const t=e.filter(({sortOrder:r})=>r).map(Tf);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},Tf(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},e0=(e,t,r)=>{const n=t.slice().sort((c,l)=>l.multiplePriority-c.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:c},sortOrder:l})=>$f(c)&&l);return a.length?o.sort((c,l)=>{for(let f=0;f<a.length;f+=1){const d=a[f],{column:{sorter:m},sortOrder:v}=d,g=$f(m);if(g&&v){const y=g(c,l,v);if(y!==0)return v===Yi?y:-y}}return 0}).map(c=>{const l=c[r];return l?Object.assign(Object.assign({},c),{[r]:e0(l,t,r)}):c}):o},x8=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:c}=e,[l,f]=w.useState(()=>Ju(r,!0)),d=(D,p)=>{const A=[];return D.forEach((O,B)=>{const F=wa(B,p);if(A.push(xo(O,F)),Array.isArray(O.children)){const N=d(O.children,F);A.push.apply(A,Ot(N))}}),A},m=w.useMemo(()=>{let D=!0;const p=Ju(r,!1);if(!p.length){const F=d(r);return l.filter(({key:N})=>F.includes(N))}const A=[];function O(F){D?A.push(F):A.push(Object.assign(Object.assign({},F),{sortOrder:null}))}let B=null;return p.forEach(F=>{B===null?(O(F),F.sortOrder&&(F.multiplePriority===!1?D=!1:B=!0)):(B&&F.multiplePriority!==!1||(D=!1),O(F))}),A},[r,l]),v=w.useMemo(()=>{var D,p;const A=m.map(({column:O,sortOrder:B})=>({column:O,order:B}));return{sortColumns:A,sortColumn:(D=A[0])===null||D===void 0?void 0:D.column,sortOrder:(p=A[0])===null||p===void 0?void 0:p.order}},[m]),g=D=>{let p;D.multiplePriority===!1||!m.length||m[0].multiplePriority===!1?p=[D]:p=[].concat(Ot(m.filter(({key:A})=>A!==D.key)),[D]),f(p),c(Mf(p),p)};return[D=>mm(t,D,m,g,n,o,a),m,v,()=>Mf(m)]},gm=(e,t)=>e.map(n=>{const o=Object.assign({},n);return o.title=Xs(n.title,t),"children"in o&&(o.children=gm(o.children,t)),o}),C8=e=>[w.useCallback(r=>gm(r,e),[e])],w8=rm((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),D8=om((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),E8=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:c,tablePaddingHorizontal:l,calc:f}=e,d=`${Ye(r)} ${n} ${o}`,m=(v,g,y)=>({[`&${t}-${v}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${Ye(f(g).mul(-1).equal())}
|
|
28
|
+
${Ye(f(f(y).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:`${Ye(f(c).mul(-1).equal())} ${Ye(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}}}}}},m("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),m("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:d,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Ye(r)} 0 ${Ye(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:d}}}},k8=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},N0),{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"}})}}},S8=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}}}}},B8=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:c,tableBorderColor:l,tableExpandIconBg:f,tableExpandColumnWidth:d,borderRadius:m,tablePaddingVertical:v,tablePaddingHorizontal:g,tableExpandedRowBg:y,paddingXXS:C,expandIconMarginTop:D,expandIconSize:p,expandIconHalfInner:A,expandIconScale:O,calc:B}=e,F=`${Ye(o)} ${c} ${l}`,N=B(C).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({},D2(e)),{position:"relative",float:"left",width:p,height:p,color:"inherit",lineHeight:Ye(p),background:f,border:F,borderRadius:m,transform:`scale(${O})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:A,insetInlineEnd:N,insetInlineStart:N,height:o},"&::after":{top:N,bottom:N,insetInlineStart:A,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:y}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${Ye(B(v).mul(-1).equal())} ${Ye(B(g).mul(-1).equal())}`,padding:`${Ye(v)} ${Ye(g)}`}}}},A8=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:c,paddingXS:l,colorText:f,lineWidth:d,lineType:m,tableBorderColor:v,headerIconColor:g,fontSizeSM:y,tablePaddingHorizontal:C,borderRadius:D,motionDurationSlow:p,colorIcon:A,colorPrimary:O,tableHeaderFilterActiveBg:B,colorTextDisabled:F,tableFilterDropdownBg:N,tableFilterDropdownHeight:I,controlItemBgHover:P,controlItemBgActive:H,boxShadowSecondary:T,filterDropdownMenuBg:V,calc:K}=e,G=`${r}-dropdown`,Y=`${t}-filter-dropdown`,L=`${r}-tree`,W=`${Ye(d)} ${m} ${v}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:K(c).mul(-1).equal(),marginInline:`${Ye(c)} ${Ye(K(C).div(2).mul(-1).equal())}`,padding:`0 ${Ye(c)}`,color:g,fontSize:y,borderRadius:D,cursor:"pointer",transition:`all ${p}`,"&:hover":{color:A,background:B},"&.active":{color:O}}}},{[`${r}-dropdown`]:{[Y]:Object.assign(Object.assign({},ci(e)),{minWidth:o,backgroundColor:N,borderRadius:D,boxShadow:T,overflow:"hidden",[`${G}-menu`]:{maxHeight:I,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:V,"&:empty::after":{display:"block",padding:`${Ye(l)} 0`,color:F,fontSize:y,textAlign:"center",content:'"Not Found"'}},[`${Y}-tree`]:{paddingBlock:`${Ye(l)} 0`,paddingInline:l,[L]:{padding:0},[`${L}-treenode ${L}-node-content-wrapper:hover`]:{backgroundColor:P},[`${L}-treenode-checkbox-checked ${L}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:H}}},[`${Y}-search`]:{padding:l,borderBottom:W,"&-input":{input:{minWidth:a},[n]:{color:F}}},[`${Y}-checkall`]:{width:"100%",marginBottom:c,marginInlineStart:c},[`${Y}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Ye(K(l).sub(d).equal())} ${Ye(l)}`,overflow:"hidden",borderTop:W}})}},{[`${r}-dropdown ${Y}, ${Y}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:f},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},F8=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:c,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:c},[`
|
|
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"}}}}},O8=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${Ye(n)} 0`}}},N8=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${Ye(r)} ${Ye(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 ${Ye(r)} ${Ye(r)}`}}}}},$8=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"}}}}},T8=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:c,headerIconColor:l,headerIconHoverColor:f,tableSelectionColumnWidth:d,tableSelectedRowBg:m,tableSelectedRowHoverBg:v,tableRowHoverBg:g,tablePaddingHorizontal:y,calc:C}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:d,[`&${t}-selection-col-with-dropdown`]:{width:C(d).add(o).add(C(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:C(d).add(C(c).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:C(d).add(o).add(C(a).div(4)).add(C(c).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:C(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:Ye(C(y).div(4).equal()),[n]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:f}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:m,"&-row-hover":{background:v}}},[`> ${t}-cell-row-hover`]:{background:g}}}}}},M8=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,c,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:`${Ye(c)} ${Ye(l)}`},[`${t}-filter-trigger`]:{marginInlineEnd:Ye(n(l).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${Ye(n(c).mul(-1).equal())} ${Ye(n(l).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:Ye(n(c).mul(-1).equal()),marginInline:`${Ye(n(r).sub(l).equal())} ${Ye(n(l).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:Ye(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))}},R8=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}}}},I8=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:c,zIndexTableSticky:l,stickyScrollBarBorderRadius:f,lineWidth:d,lineType:m,tableBorderColor:v}=e,g=`${Ye(d)} ${m} ${v}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Ye(a)} !important`,zIndex:l,display:"flex",alignItems:"center",background:c,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}}}}}}},Rf=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${Ye(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 ${Ye(o(r).mul(-1).equal())} 0 ${n}`}}}},P8=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:c}=e,l=`${Ye(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) - ${Ye(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:c(n).mul(-1).equal(),borderInlineStart:l}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:l,borderBottom:l}}}}}},z8=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:c,lineType:l,tableBorderColor:f,tableFontSize:d,tableBg:m,tableRadius:v,tableHeaderTextColor:g,motionDurationMid:y,tableHeaderBg:C,tableHeaderCellSplitColor:D,tableFooterTextColor:p,tableFooterBg:A,calc:O}=e,B=`${Ye(c)} ${l} ${f}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},Mu()),{[t]:Object.assign(Object.assign({},ci(e)),{fontSize:d,background:m,borderRadius:`${Ye(v)} ${Ye(v)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${Ye(v)} ${Ye(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:`${Ye(n)} ${Ye(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${Ye(n)} ${Ye(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:C,borderBottom:B,transition:`background ${y} 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 ${y}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${y}, border-color ${y}`,borderBottom:B,[`
|
|
86
|
+
> ${t}-wrapper:only-child,
|
|
87
|
+
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
88
|
+
`]:{[t]:{marginBlock:Ye(O(n).mul(-1).equal()),marginInline:`${Ye(O(a).sub(o).equal())}
|
|
89
|
+
${Ye(O(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:C,borderBottom:B,transition:`background ${y} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${Ye(n)} ${Ye(o)}`,color:p,background:A}})}},L8=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:c,controlItemBgActiveHover:l,padding:f,paddingSM:d,paddingXS:m,colorBorderSecondary:v,borderRadiusLG:g,controlHeight:y,colorTextPlaceholder:C,fontSize:D,fontSizeSM:p,lineHeight:A,lineWidth:O,colorIcon:B,colorIconHover:F,opacityLoading:N,controlInteractiveSize:I}=e,P=new on(o).onBackground(r).toHexString(),H=new on(a).onBackground(r).toHexString(),T=new on(t).onBackground(r).toHexString(),V=new on(B),K=new on(F),G=I/2-O,Y=G*2+O*3;return{headerBg:T,headerColor:n,headerSortActiveBg:P,headerSortHoverBg:H,bodySortBg:T,rowHoverBg:T,rowSelectedBg:c,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:m,cellPaddingBlockSM:m,cellPaddingInlineSM:m,borderColor:v,headerBorderRadius:g,footerBg:T,footerColor:n,cellFontSize:D,cellFontSizeMD:D,cellFontSizeSM:D,headerSplitColor:v,fixedHeaderSortActiveBg:P,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:y,stickyScrollBarBg:C,stickyScrollBarBorderRadius:100,expandIconMarginTop:(D*A-O*3)/2-Math.ceil((p*1.4-O*3)/2),headerIconColor:V.clone().setA(V.a*N).toRgbString(),headerIconHoverColor:K.clone().setA(K.a*N).toRgbString(),expandIconHalfInner:G,expandIconSize:Y,expandIconScale:I/Y}},If=2,j8=ui("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:c,headerSortActiveBg:l,headerSortHoverBg:f,bodySortBg:d,rowHoverBg:m,rowSelectedBg:v,rowSelectedHoverBg:g,rowExpandedBg:y,cellPaddingBlock:C,cellPaddingInline:D,cellPaddingBlockMD:p,cellPaddingInlineMD:A,cellPaddingBlockSM:O,cellPaddingInlineSM:B,borderColor:F,footerBg:N,footerColor:I,headerBorderRadius:P,cellFontSize:H,cellFontSizeMD:T,cellFontSizeSM:V,headerSplitColor:K,fixedHeaderSortActiveBg:G,headerFilterHoverBg:Y,filterDropdownBg:L,expandIconBg:W,selectionColumnWidth:U,stickyScrollBarBg:X,calc:te}=e,z=Lo(e,{tableFontSize:H,tableBg:n,tableRadius:P,tablePaddingVertical:C,tablePaddingHorizontal:D,tablePaddingVerticalMiddle:p,tablePaddingHorizontalMiddle:A,tablePaddingVerticalSmall:O,tablePaddingHorizontalSmall:B,tableBorderColor:F,tableHeaderTextColor:c,tableHeaderBg:a,tableFooterTextColor:I,tableFooterBg:N,tableHeaderCellSplitColor:K,tableHeaderSortBg:l,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:G,tableHeaderFilterActiveBg:Y,tableFilterDropdownBg:L,tableRowHoverBg:m,tableSelectedRowBg:v,tableSelectedRowHoverBg:g,zIndexTableFixed:If,zIndexTableSticky:te(If).add(1).equal({unit:!1}),tableFontSizeMiddle:T,tableFontSizeSmall:V,tableSelectionColumnWidth:U,tableExpandIconBg:W,tableExpandColumnWidth:te(o).add(te(e.padding).mul(2)).equal(),tableExpandedRowBg:y,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:X,tableScrollThumbBgHover:t,tableScrollBg:r});return[z8(z),O8(z),Rf(z),R8(z),A8(z),E8(z),N8(z),B8(z),Rf(z),S8(z),T8(z),F8(z),I8(z),k8(z),M8(z),$8(z),P8(z)]},L8,{unitless:{expandIconScale:!0}}),Pf=[],_8=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:c,style:l,size:f,bordered:d,dropdownPrefixCls:m,dataSource:v,pagination:g,rowSelection:y,rowKey:C="key",rowClassName:D,columns:p,children:A,childrenColumnName:O,onChange:B,getPopupContainer:F,loading:N,expandIcon:I,expandable:P,expandedRowRender:H,expandIconColumnIndex:T,indentSize:V,scroll:K,sortDirections:G,locale:Y,showSorterTooltip:L={target:"full-header"},virtual:W}=e;js();const U=w.useMemo(()=>p||G0(A),[p,A]),X=w.useMemo(()=>U.some(de=>de.responsive),[U]),te=E2(X),z=w.useMemo(()=>{const de=new Set(Object.keys(te).filter(Ae=>te[Ae]));return U.filter(Ae=>!Ae.responsive||Ae.responsive.some(ve=>de.has(ve)))},[U,te]),le=ro(e,["className","style","columns"]),{locale:ce=k2,direction:he,table:ne,renderEmpty:pe,getPrefixCls:Oe,getPopupContainer:Q}=w.useContext(no),fe=S2(f),se=Object.assign(Object.assign({},ce.Table),Y),ae=v||Pf,ge=Oe("table",o),be=Oe("dropdown",m),[,Ce]=T0(),ke=di(ge),[Ee,Be,Ne]=j8(ge,ke),Me=Object.assign(Object.assign({childrenColumnName:O,expandIconColumnIndex:T},P),{expandIcon:(r=P==null?void 0:P.expandIcon)!==null&&r!==void 0?r:(n=ne==null?void 0:ne.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:He="children"}=Me,Ze=w.useMemo(()=>ae.some(de=>de==null?void 0:de[He])?"nest":H||P!=null&&P.expandedRowRender?"row":null,[ae]),tt={body:w.useRef(null)},Te=l6(ge),_e=w.useRef(null),We=w.useRef(null);R2(t,()=>Object.assign(Object.assign({},We.current),{nativeElement:_e.current}));const st=w.useMemo(()=>typeof C=="function"?C:de=>de==null?void 0:de[C],[C]),[rt]=u8(ae,He,st),Qe={},St=(de,Ae,ve=!1)=>{var je,ie,we,M;const qe=Object.assign(Object.assign({},Qe),de);ve&&((je=Qe.resetPagination)===null||je===void 0||je.call(Qe),!((ie=qe.pagination)===null||ie===void 0)&&ie.current&&(qe.pagination.current=1),g&&((we=g.onChange)===null||we===void 0||we.call(g,1,(M=qe.pagination)===null||M===void 0?void 0:M.pageSize))),K&&K.scrollToFirstRowOnChange!==!1&&tt.body.current&&$2(0,{getContainer:()=>tt.body.current}),B==null||B(qe.pagination,qe.filters,qe.sorter,{currentDataSource:Qu(e0(ae,qe.sorterStates,He),qe.filterStates,He),action:Ae})},mt=(de,Ae)=>{St({sorter:de,sorterStates:Ae},"sort",!1)},[ct,bt,Ie,ue]=x8({prefixCls:ge,mergedColumns:z,onSorterChange:mt,sortDirections:G||["ascend","descend"],tableLocale:se,showSorterTooltip:L}),nt=w.useMemo(()=>e0(ae,bt,He),[ae,bt]);Qe.sorter=ue(),Qe.sorterStates=bt;const pt=(de,Ae)=>{St({filters:de,filterStates:Ae},"filter",!0)},[Dt,vt,Kt]=l8({prefixCls:ge,locale:se,dropdownPrefixCls:be,mergedColumns:z,onFilterChange:pt,getPopupContainer:F||Q,rootClassName:Je(c,ke)}),Ct=Qu(nt,vt,He);Qe.filters=Kt,Qe.filterStates=vt;const Nt=w.useMemo(()=>{const de={};return Object.keys(Kt).forEach(Ae=>{Kt[Ae]!==null&&(de[Ae]=Kt[Ae])}),Object.assign(Object.assign({},Ie),{filters:de})},[Ie,Kt]),[_t]=C8(Nt),rr=(de,Ae)=>{St({pagination:Object.assign(Object.assign({},Qe.pagination),{current:de,pageSize:Ae})},"paginate")},[yt,cr]=f8(Ct.length,rr,g);Qe.pagination=g===!1?{}:d8(yt,g),Qe.resetPagination=cr;const Xt=w.useMemo(()=>{if(g===!1||!yt.pageSize)return Ct;const{current:de=1,total:Ae,pageSize:ve=pm}=yt;return Ct.length<Ae?Ct.length>ve?Ct.slice((de-1)*ve,de*ve):Ct:Ct.slice((de-1)*ve,de*ve)},[!!g,Ct,yt==null?void 0:yt.current,yt==null?void 0:yt.pageSize,yt==null?void 0:yt.total]),[Pr,kr]=i6({prefixCls:ge,data:Ct,pageData:Xt,getRowKey:st,getRecordByKey:rt,expandType:Ze,childrenColumnName:He,locale:se,getPopupContainer:F||Q},y),yr=(de,Ae,ve)=>{let je;return typeof D=="function"?je=Je(D(de,Ae,ve)):je=Je(D),Je({[`${ge}-row-selected`]:kr.has(st(de,Ae))},je)};Me.__PARENT_RENDER_ICON__=Me.expandIcon,Me.expandIcon=Me.expandIcon||I||s6(se),Ze==="nest"&&Me.expandIconColumnIndex===void 0?Me.expandIconColumnIndex=y?1:0:Me.expandIconColumnIndex>0&&y&&(Me.expandIconColumnIndex-=1),typeof Me.indentSize!="number"&&(Me.indentSize=typeof V=="number"?V:15);const dt=w.useCallback(de=>_t(Pr(Dt(ct(de)))),[ct,Dt,Pr]),nr=()=>{if(g===!1||!(yt!=null&&yt.total))return{};const de=()=>yt.size||(fe==="small"||fe==="middle"?"small":void 0),Ae=gt=>{const it=gt==="left"?"start":gt==="right"?"end":gt;return w.createElement(h1,Object.assign({},yt,{align:yt.align||it,className:Je(`${ge}-pagination`,yt.className),size:de()}))},ve=he==="rtl"?"left":"right",je=yt.position;if(je===null||!Array.isArray(je))return{bottom:Ae(ve)};const ie=je.find(gt=>typeof gt=="string"&>.toLowerCase().includes("top")),we=je.find(gt=>typeof gt=="string"&>.toLowerCase().includes("bottom")),M=je.every(gt=>`${gt}`=="none"),qe=ie?ie.toLowerCase().replace("top",""):"",J=we?we.toLowerCase().replace("bottom",""):"",Mt=!ie&&!we&&!M,kt=()=>qe?Ae(qe):void 0,at=()=>{if(J)return Ae(J);if(Mt)return Ae(ve)};return{top:kt(),bottom:at()}},or=w.useMemo(()=>typeof N=="boolean"?{spinning:N}:typeof N=="object"&&N!==null?Object.assign({spinning:!0},N):void 0,[N]),Tt=Je(Ne,ke,`${ge}-wrapper`,ne==null?void 0:ne.className,{[`${ge}-wrapper-rtl`]:he==="rtl"},a,c,Be),x=Object.assign(Object.assign({},ne==null?void 0:ne.style),l),k=w.useMemo(()=>or!=null&&or.spinning&&ae===Pf?null:typeof(Y==null?void 0:Y.emptyText)<"u"?Y.emptyText:(pe==null?void 0:pe("Table"))||w.createElement(B2,{componentName:"Table"}),[or==null?void 0:or.spinning,ae,Y==null?void 0:Y.emptyText,pe]),Pe=W?D8:w8,E={},j=w.useMemo(()=>{const{fontSize:de,lineHeight:Ae,lineWidth:ve,padding:je,paddingXS:ie,paddingSM:we}=Ce,M=Math.floor(de*Ae);switch(fe){case"middle":return we*2+M+ve;case"small":return ie*2+M+ve;default:return je*2+M+ve}},[Ce,fe]);W&&(E.listItemHeight=j);const{top:Ue,bottom:De}=nr();return Ee(w.createElement("div",{ref:_e,className:Tt,style:x},w.createElement(f1,Object.assign({spinning:!1},or),Ue,w.createElement(Pe,Object.assign({},E,le,{ref:We,columns:z,direction:he,expandable:Me,prefixCls:ge,className:Je({[`${ge}-middle`]:fe==="middle",[`${ge}-small`]:fe==="small",[`${ge}-bordered`]:d,[`${ge}-empty`]:ae.length===0},Ne,ke,Be),data:Xt,rowKey:st,rowClassName:yr,emptyText:k,internalHooks:mi,internalRefs:tt,transformColumns:dt,getContainerWidth:Te,measureRowRender:de=>w.createElement(A2,{getPopupContainer:Ae=>Ae},de)})),De)))},H8=w.forwardRef(_8),K8=(e,t)=>{const r=w.useRef(0);return r.current+=1,w.createElement(H8,Object.assign({},e,{ref:t,_renderTimes:r.current}))},oo=w.forwardRef(K8);oo.SELECTION_COLUMN=co;oo.EXPAND_COLUMN=ho;oo.SELECTION_ALL=Uu;oo.SELECTION_INVERT=Xu;oo.SELECTION_NONE=Yu;oo.Column=G5;oo.ColumnGroup=Z5;oo.Summary=V1;var un={},q8=Object.defineProperty,W8=(e,t,r)=>t in e?q8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dr=(e,t,r)=>W8(e,typeof t!="symbol"?t+"":t,r),Ni=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zf={exports:{}},Ra={};/**
|
|
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 Lf;function V8(){if(Lf)return Ra;Lf=1;var e=Le,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 c(l,f,d){var m,v={},g=null,y=null;d!==void 0&&(g=""+d),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(y=f.ref);for(m in f)n.call(f,m)&&!a.hasOwnProperty(m)&&(v[m]=f[m]);if(l&&l.defaultProps)for(m in f=l.defaultProps,f)v[m]===void 0&&(v[m]=f[m]);return{$$typeof:t,type:l,key:g,ref:y,props:v,_owner:o.current}}return Ra.Fragment=r,Ra.jsx=c,Ra.jsxs=c,Ra}var jf;function U8(){return jf||(jf=1,zf.exports=V8()),zf.exports}var ee=U8();/*!
|
|
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 _f(e){return Object.prototype.toString.call(e)==="[object Object]"}function _r(e){var t,r;return _f(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(_f(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var vm=Symbol.for("immer-nothing"),Hf=Symbol.for("immer-draftable"),cn=Symbol.for("immer-state");function En(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ja=Object.getPrototypeOf;function _o(e){return!!e&&!!e[cn]}function Ho(e){var t;return e?bm(e)||Array.isArray(e)||!!e[Hf]||!!((t=e.constructor)!=null&&t[Hf])||gi(e)||Zs(e):!1}var X8=Object.prototype.constructor.toString(),Kf=new WeakMap;function bm(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=Kf.get(r);return n===void 0&&(n=Function.toString.call(r),Kf.set(r,n)),n===X8}function Ds(e,t,r=!0){Gs(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 Gs(e){const t=e[cn];return t?t.type_:Array.isArray(e)?1:gi(e)?2:Zs(e)?3:0}function t0(e,t){return Gs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ym(e,t,r){const n=Gs(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Y8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function gi(e){return e instanceof Map}function Zs(e){return e instanceof Set}function Oo(e){return e.copy_||e.base_}function r0(e,t){if(gi(e))return new Map(e);if(Zs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=bm(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[cn];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const c=o[a],l=n[c];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[c]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[c]})}return Object.create(Ja(e),n)}else{const n=Ja(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function nc(e,t=!1){return Qs(e)||_o(e)||!Ho(e)||(Gs(e)>1&&Object.defineProperties(e,{set:$i,add:$i,clear:$i,delete:$i}),Object.freeze(e),t&&Object.values(e).forEach(r=>nc(r,!0))),e}function G8(){En(2)}var $i={value:G8};function Qs(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Z8={};function Ko(e){const t=Z8[e];return t||En(0,e),t}var ei;function xm(){return ei}function Q8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qf(e,t){t&&(Ko("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function n0(e){o0(e),e.drafts_.forEach(J8),e.drafts_=null}function o0(e){e===ei&&(ei=e.parent_)}function Wf(e){return ei=Q8(ei,e)}function J8(e){const t=e[cn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Vf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[cn].modified_&&(n0(t),En(4)),Ho(e)&&(e=Es(t,e),t.parent_||ks(t,e)),t.patches_&&Ko("Patches").generateReplacementPatches_(r[cn].base_,e,t.patches_,t.inversePatches_)):e=Es(t,r,[]),n0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vm?e:void 0}function Es(e,t,r){if(Qs(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[cn];if(!o)return Ds(t,(a,c)=>Uf(e,o,t,a,c,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return ks(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const a=o.copy_;let c=a,l=!1;o.type_===3&&(c=new Set(a),a.clear(),l=!0),Ds(c,(f,d)=>Uf(e,o,a,f,d,r,l),n),ks(e,a,!1),r&&e.patches_&&Ko("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Uf(e,t,r,n,o,a,c){if(o==null||typeof o!="object"&&!c)return;const l=Qs(o);if(!(l&&!c)){if(_o(o)){const f=a&&t&&t.type_!==3&&!t0(t.assigned_,n)?a.concat(n):void 0,d=Es(e,o,f);if(ym(r,n,d),_o(d))e.canAutoFreeze_=!1;else return}else c&&r.add(o);if(Ho(o)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&l)return;Es(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(gi(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&ks(e,o)}}}function ks(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nc(t,r)}function eb(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:xm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=oc;r&&(o=[n],a=ti);const{revoke:c,proxy:l}=Proxy.revocable(o,a);return n.draft_=l,n.revoke_=c,l}var oc={get(e,t){if(t===cn)return e;const r=Oo(e);if(!t0(r,t))return tb(e,r,t);const n=r[t];return e.finalized_||!Ho(n)?n:n===Ul(e.base_,t)?(Xl(e),e.copy_[t]=i0(n,e)):n},has(e,t){return t in Oo(e)},ownKeys(e){return Reflect.ownKeys(Oo(e))},set(e,t,r){const n=Cm(Oo(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Ul(Oo(e),t),a=o==null?void 0:o[cn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Y8(r,o)&&(r!==void 0||t0(e.base_,t)))return!0;Xl(e),a0(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 Ul(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xl(e),a0(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Oo(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){En(11)},getPrototypeOf(e){return Ja(e.base_)},setPrototypeOf(){En(12)}},ti={};Ds(oc,(e,t)=>{ti[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ti.deleteProperty=function(e,t){return ti.set.call(this,e,t,void 0)};ti.set=function(e,t,r){return oc.set.call(this,e[0],t,r,e[0])};function Ul(e,t){const r=e[cn];return(r?Oo(r):e)[t]}function tb(e,t,r){var o;const n=Cm(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Cm(e,t){if(!(t in e))return;let r=Ja(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ja(r)}}function a0(e){e.modified_||(e.modified_=!0,e.parent_&&a0(e.parent_))}function Xl(e){e.copy_||(e.copy_=r0(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var rb=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 c=this;return function(l=a,...f){return c.produce(l,d=>r.call(this,d,...f))}}typeof r!="function"&&En(6),n!==void 0&&typeof n!="function"&&En(7);let o;if(Ho(t)){const a=Wf(this),c=i0(t,void 0);let l=!0;try{o=r(c),l=!1}finally{l?n0(a):o0(a)}return qf(a,n),Vf(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===vm&&(o=void 0),this.autoFreeze_&&nc(o,!0),n){const a=[],c=[];Ko("Patches").generateReplacementPatches_(t,o,a,c),n(a,c)}return o}else En(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,l=>t(l,...c));let n,o;return[this.produce(t,r,(a,c)=>{n=a,o=c}),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){Ho(e)||En(8),_o(e)&&(e=nb(e));const t=Wf(this),r=i0(e,void 0);return r[cn].isManual_=!0,o0(t),r}finishDraft(e,t){const r=e&&e[cn];(!r||!r.isManual_)&&En(9);const{scope_:n}=r;return qf(n,t),Vf(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=Ko("Patches").applyPatches_;return _o(e)?n(e,t):this.produce(e,o=>n(o,t))}};function i0(e,t){const r=gi(e)?Ko("MapSet").proxyMap_(e,t):Zs(e)?Ko("MapSet").proxySet_(e,t):eb(e,t);return(t?t.scope_:xm()).drafts_.push(r),r}function nb(e){return _o(e)||En(10,e),wm(e)}function wm(e){if(!Ho(e)||Qs(e))return e;const t=e[cn];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=r0(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=r0(e,!0);return Ds(r,(o,a)=>{ym(r,o,wm(a))},n),t&&(t.finalized_=!1),r}var ri=new rb,ac=ri.produce,Xf=ri.createDraft.bind(ri),Yf=ri.finishDraft.bind(ri),ob={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=oe.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},ab={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=zt.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},ib={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()}}},Ss=new WeakMap,Bs=new WeakMap,Wa=new WeakMap,Dm=new WeakMap,Gf=new WeakMap,Zf=new WeakMap,Qf=new WeakMap,oe={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=oe.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],c=t[r];return oe.equals(n,o)&&a>c},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return oe.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],c=t[r];return oe.equals(n,o)&&a<c},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 oe.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&oe.compare(e,t)===0},isBefore(e,t){return oe.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&oe.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&oe.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&oe.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&oe.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&&oe.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(!oe.isAncestor(t,e)&&!oe.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;(oe.equals(a,n)||oe.endsBefore(a,n)||oe.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:c}=t;if(oe.equals(c,n)||oe.isAncestor(c,n))return null;oe.endsBefore(c,n)&&(n[c.length-1]-=1);break}case"merge_node":{var{path:l,position:f}=t;oe.equals(l,n)||oe.endsBefore(l,n)?n[l.length-1]-=1:oe.isAncestor(l,n)&&(n[l.length-1]-=1,n[l.length]+=f);break}case"split_node":{var{path:d,position:m}=t;if(oe.equals(d,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else oe.endsBefore(d,n)?n[d.length-1]+=1:oe.isAncestor(d,n)&&e[d.length]>=m&&(n[d.length-1]+=1,n[d.length]-=m);break}case"move_node":{var{path:v,newPath:g}=t;if(oe.equals(v,g))return n;if(oe.isAncestor(v,n)||oe.equals(v,n)){var y=g.slice();return oe.endsBefore(v,g)&&v.length<g.length&&(y[v.length-1]-=1),y.concat(n.slice(v.length))}else oe.isSibling(v,g)&&(oe.isAncestor(g,n)||oe.equals(g,n))?oe.endsBefore(v,n)?n[v.length-1]-=1:n[v.length-1]+=1:oe.endsBefore(g,n)||oe.equals(g,n)||oe.isAncestor(g,n)?(oe.endsBefore(v,n)&&(n[v.length-1]-=1),n[g.length-1]+=1):oe.endsBefore(v,n)&&(oe.equals(g,n)&&(n[g.length-1]+=1),n[v.length-1]-=1);break}}return n}};function ni(e){"@babel/helpers - typeof";return ni=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},ni(e)}function sb(e,t){if(ni(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ni(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lb(e){var t=sb(e,"string");return ni(t)==="symbol"?t:String(t)}function Zr(e,t,r){return t=lb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jf(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 Ia(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jf(Object(r),!0).forEach(function(n){Zr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ub=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Ge.parent(e,n),c=n[n.length-1];if(c>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(c,0,o),t)for(var[l,f]of Fe.points(t))t[f]=zt.transform(l,r);break}case"insert_text":{var{path:d,offset:m,text:v}=r;if(v.length===0)break;var g=Ge.leaf(e,d),y=g.text.slice(0,m),C=g.text.slice(m);if(g.text=y+v+C,t)for(var[D,p]of Fe.points(t))t[p]=zt.transform(D,r);break}case"merge_node":{var{path:A}=r,O=Ge.get(e,A),B=oe.previous(A),F=Ge.get(e,B),N=Ge.parent(e,A),I=A[A.length-1];if(lt.isText(O)&<.isText(F))F.text+=O.text;else if(!lt.isText(O)&&!lt.isText(F))F.children.push(...O.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(A,"] to nodes of different interfaces: ").concat(Rr.stringify(O)," ").concat(Rr.stringify(F)));if(N.children.splice(I,1),t)for(var[P,H]of Fe.points(t))t[H]=zt.transform(P,r);break}case"move_node":{var{path:T,newPath:V}=r;if(oe.isAncestor(T,V))throw new Error("Cannot move a path [".concat(T,"] to new path [").concat(V,"] because the destination is inside itself."));var K=Ge.get(e,T),G=Ge.parent(e,T),Y=T[T.length-1];G.children.splice(Y,1);var L=oe.transform(T,r),W=Ge.get(e,oe.parent(L)),U=L[L.length-1];if(W.children.splice(U,0,K),t)for(var[X,te]of Fe.points(t))t[te]=zt.transform(X,r);break}case"remove_node":{var{path:z}=r,le=z[z.length-1],ce=Ge.parent(e,z);if(ce.children.splice(le,1),t)for(var[he,ne]of Fe.points(t)){var pe=zt.transform(he,r);if(t!=null&&pe!=null)t[ne]=pe;else{var Oe=void 0,Q=void 0;for(var[fe,se]of Ge.texts(e))if(oe.compare(se,z)===-1)Oe=[fe,se];else{Q=[fe,se];break}var ae=!1;Oe&&Q&&(oe.equals(Q[1],z)?ae=!oe.hasPrevious(Q[1]):ae=oe.common(Oe[1],z).length<oe.common(Q[1],z).length),Oe&&!ae?(he.path=Oe[1],he.offset=Oe[0].text.length):Q?(he.path=Q[1],he.offset=0):t=null}}break}case"remove_text":{var{path:ge,offset:be,text:Ce}=r;if(Ce.length===0)break;var ke=Ge.leaf(e,ge),Ee=ke.text.slice(0,be),Be=ke.text.slice(be+Ce.length);if(ke.text=Ee+Be,t)for(var[Ne,Me]of Fe.points(t))t[Me]=zt.transform(Ne,r);break}case"set_node":{var{path:He,properties:Ze,newProperties:tt}=r;if(He.length===0)throw new Error("Cannot set properties on the root node!");var Te=Ge.get(e,He);for(var _e in tt){if(_e==="children"||_e==="text")throw new Error('Cannot set the "'.concat(_e,'" property of nodes!'));var We=tt[_e];We==null?delete Te[_e]:Te[_e]=We}for(var st in Ze)tt.hasOwnProperty(st)||delete Te[st];break}case"set_selection":{var{newProperties:rt}=r;if(rt==null)t=rt;else{if(t==null){if(!Fe.isRange(rt))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Rr.stringify(rt)," when there is no current selection."));t=Ia({},rt)}for(var Qe in rt){var St=rt[Qe];if(St==null){if(Qe==="anchor"||Qe==="focus")throw new Error('Cannot remove the "'.concat(Qe,'" selection property'));delete t[Qe]}else t[Qe]=St}}break}case"split_node":{var{path:mt,position:ct,properties:bt}=r;if(mt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(mt,"] because the root node cannot be split."));var Ie=Ge.get(e,mt),ue=Ge.parent(e,mt),nt=mt[mt.length-1],pt;if(lt.isText(Ie)){var Dt=Ie.text.slice(0,ct),vt=Ie.text.slice(ct);Ie.text=Dt,pt=Ia(Ia({},bt),{},{text:vt})}else{var Kt=Ie.children.slice(0,ct),Ct=Ie.children.slice(ct);Ie.children=Kt,pt=Ia(Ia({},bt),{},{children:Ct})}if(ue.children.splice(nt+1,0,pt),t)for(var[Nt,_t]of Fe.points(t))t[_t]=zt.transform(Nt,r);break}}return t},cb={transform(e,t){e.children=Xf(e.children);var r=e.selection&&Xf(e.selection);try{r=ub(e,r,t)}finally{e.children=Yf(e.children),r?e.selection=_o(r)?Yf(r):r:e.selection=null}}},db={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)}},fb={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)}},Em=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(_r(n)&&_r(o)){if(!Em(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 c in t)if(e[c]===void 0&&t[c]!==void 0)return!1;return!0};function hb(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 eo(e,t){if(e==null)return{};var r=hb(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 pb=["anchor","focus"];function eh(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 mb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eh(Object(r),!0).forEach(function(n){Zr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eh(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 zt.equals(e.anchor,t.anchor)&&zt.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 zt.isBefore(r,o)&&zt.isAfter(n,a)}var[c,l]=Fe.edges(e),f=!1,d=!1;return zt.isPoint(t)?(f=zt.compare(t,c)>=0,d=zt.compare(t,l)<=0):(f=oe.compare(t,c.path)>=0,d=oe.compare(t,l.path)<=0),f&&d},intersection(e,t){var r=eo(e,pb),[n,o]=Fe.edges(e),[a,c]=Fe.edges(t),l=zt.isBefore(n,a)?a:n,f=zt.isBefore(o,c)?o:c;return zt.isBefore(f,l)?null:mb({anchor:l,focus:f},r)},isBackward(e){var{anchor:t,focus:r}=e;return zt.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return zt.equals(t,r)},isExpanded(e){return!Fe.isCollapsed(e)},isForward(e){return!Fe.isBackward(e)},isRange(e){return _r(e)&&zt.isPoint(e.anchor)&&zt.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 ac(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,c;if(o==="inward"){var l=Fe.isCollapsed(n);Fe.isForward(n)?(a="forward",c=l?a:"backward"):(a="backward",c=l?a:"forward")}else o==="outward"?Fe.isForward(n)?(a="backward",c="forward"):(a="forward",c="backward"):(a=o,c=o);var f=zt.transform(n.anchor,t,{affinity:a}),d=zt.transform(n.focus,t,{affinity:c});if(!f||!d)return null;n.anchor=f,n.focus=d})}},th=e=>_r(e)&&Ge.isNodeList(e.children)&&!R.isEditor(e),ft={isAncestor(e){return _r(e)&&Ge.isNodeList(e.children)},isElement:th,isElementList(e){return Array.isArray(e)&&e.every(t=>ft.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 th(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},gb=["children"],vb=["text"],rh=new WeakMap,Ge={ancestor(e,t){var r=Ge.get(e,t);if(lt.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Rr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of oe.ancestors(t,r)){var o=Ge.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(lt.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Rr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Rr.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=Ge.ancestor(e,t),{children:a}=o,c=n?a.length-1:0;n?c>=0:c<a.length;){var l=Ge.child(o,c),f=t.concat(c);yield[l,f],c=n?c-1:c+1}})()},common(e,t,r){var n=oe.common(t,r),o=Ge.get(e,n);return[o,n]},descendant(e,t){var r=Ge.get(e,t);if(R.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Rr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ge.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 Ge.nodes(e,t))ft.isElement(r)&&(yield[r,n])})()},extractProps(e){if(ft.isAncestor(e)){var t=eo(e,gb);return t}else{var t=eo(e,vb);return t}},first(e,t){for(var r=t.slice(),n=Ge.get(e,r);n&&!(lt.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(lt.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Rr.stringify(e)));var r=ac({children:e.children},n=>{var[o,a]=Fe.edges(t),c=Ge.nodes(n,{reverse:!0,pass:g=>{var[,y]=g;return!Fe.includes(t,y)}});for(var[,l]of c){if(!Fe.includes(t,l)){var f=Ge.parent(n,l),d=l[l.length-1];f.children.splice(d,1)}if(oe.equals(l,a.path)){var m=Ge.leaf(n,l);m.text=m.text.slice(0,a.offset)}if(oe.equals(l,o.path)){var v=Ge.leaf(n,l);v.text=v.text.slice(o.offset)}}R.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(lt.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Rr.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(lt.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return lt.isText(e)||ft.isElement(e)||R.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=rh.get(e);if(t!==void 0)return t;var r=e.every(n=>Ge.isNode(n));return rh.set(e,r),r},last(e,t){for(var r=t.slice(),n=Ge.get(e,r);n&&!(lt.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=Ge.get(e,t);if(!lt.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Rr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of oe.levels(t,r)){var o=Ge.get(e,n);yield[o,n]}})()},matches(e,t){return ft.isElement(e)&&ft.isElementProps(t)&&ft.matches(e,t)||lt.isText(e)&<.isTextProps(t)&<.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,c=new Set,l=[],f=e;!(a&&(n?oe.isBefore(l,a):oe.isAfter(l,a)));){if(c.has(f)||(yield[f,l]),!c.has(f)&&!lt.isText(f)&&f.children.length!==0&&(r==null||r([f,l])===!1)){c.add(f);var d=n?f.children.length-1:0;oe.isAncestor(l,o)&&(d=o[l.length]),l=l.concat(d),f=Ge.get(e,l);continue}if(l.length===0)break;if(!n){var m=oe.next(l);if(Ge.has(e,m)){l=m,f=Ge.get(e,l);continue}}if(n&&l[l.length-1]!==0){var v=oe.previous(l);l=v,f=Ge.get(e,l);continue}l=oe.parent(l),f=Ge.get(e,l),c.add(f)}})()},parent(e,t){var r=oe.parent(t),n=Ge.get(e,r);if(lt.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 lt.isText(e)?e.text:e.children.map(Ge.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ge.nodes(e,t))lt.isText(r)&&(yield[r,n])})()}};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 vr(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){Zr(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 ja={isNodeOperation(e){return ja.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!_r(e))return!1;switch(e.type){case"insert_node":return oe.isPath(e.path)&&Ge.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&oe.isPath(e.path);case"merge_node":return typeof e.position=="number"&&oe.isPath(e.path)&&_r(e.properties);case"move_node":return oe.isPath(e.path)&&oe.isPath(e.newPath);case"remove_node":return oe.isPath(e.path)&&Ge.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&oe.isPath(e.path);case"set_node":return oe.isPath(e.path)&&_r(e.properties)&&_r(e.newProperties);case"set_selection":return e.properties===null&&Fe.isRange(e.newProperties)||e.newProperties===null&&Fe.isRange(e.properties)||_r(e.properties)&&_r(e.newProperties);case"split_node":return oe.isPath(e.path)&&typeof e.position=="number"&&_r(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>ja.isOperation(t))},isSelectionOperation(e){return ja.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return ja.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return vr(vr({},e),{},{type:"remove_node"});case"insert_text":return vr(vr({},e),{},{type:"remove_text"});case"merge_node":return vr(vr({},e),{},{type:"split_node",path:oe.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(oe.equals(t,r))return e;if(oe.isSibling(r,t))return vr(vr({},e),{},{path:t,newPath:r});var n=oe.transform(r,e),o=oe.transform(oe.next(r),e);return vr(vr({},e),{},{path:n,newPath:o})}case"remove_node":return vr(vr({},e),{},{type:"insert_node"});case"remove_text":return vr(vr({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:c}=e;return vr(vr({},e),{},{properties:c,newProperties:a})}case"set_selection":{var{properties:l,newProperties:f}=e;return l==null?vr(vr({},e),{},{properties:f,newProperties:null}):f==null?vr(vr({},e),{},{properties:null,newProperties:l}):vr(vr({},e),{},{properties:f,newProperties:l})}case"split_node":return vr(vr({},e),{},{type:"merge_node",path:oe.next(e.path)})}}},oh=new WeakMap,bb=e=>{var t=oh.get(e);if(t!==void 0)return t;if(!_r(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||_r(e.marks))&&(e.selection===null||Fe.isRange(e.selection))&&Ge.isNodeList(e.children)&&ja.isOperationList(e.operations);return oh.set(e,r),r},R={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 bb(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)},yb={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(oe.isPath)}};function ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ah(Object(r),!0).forEach(function(n){Zr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zt={compare(e,t){var r=oe.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return zt.compare(e,t)===1},isBefore(e,t){return zt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&oe.equals(e.path,t.path)},isPoint(e){return _r(e)&&typeof e.offset=="number"&&oe.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ac(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:c}=n;switch(t.type){case"insert_node":case"move_node":{n.path=oe.transform(a,t,r);break}case"insert_text":{oe.equals(t.path,a)&&(t.offset<c||t.offset===c&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{oe.equals(t.path,a)&&(n.offset+=t.position),n.path=oe.transform(a,t,r);break}case"remove_text":{oe.equals(t.path,a)&&t.offset<=c&&(n.offset-=Math.min(c-t.offset,t.text.length));break}case"remove_node":{if(oe.equals(t.path,a)||oe.isAncestor(t.path,a))return null;n.path=oe.transform(a,t,r);break}case"split_node":{if(oe.equals(t.path,a)){if(t.position===c&&o==null)return null;(t.position<c||t.position===c&&o==="forward")&&(n.offset-=t.position,n.path=oe.transform(a,t,ih(ih({},r),{},{affinity:"forward"})))}else n.path=oe.transform(a,t,r);break}}})}},sh=void 0,Rr={setScrubber(e){sh=e},stringify(e){return JSON.stringify(e,sh)}},xb=["text"],Cb=["anchor","focus"];function lh(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 Un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lh(Object(r),!0).forEach(function(n){Zr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var lt={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var c=eo(a,xb);return c}return Em(n?o(e):e,n?o(t):t)},isText(e){return _r(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>lt.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=[Un({},e)];for(var n of t){var o=eo(n,Cb),[a,c]=Fe.edges(n),l=[],f=0,d=a.offset,m=c.offset;for(var v of r){var{length:g}=v.text,y=f;if(f+=g,d<=y&&f<=m){Object.assign(v,o),l.push(v);continue}if(d!==m&&(d===f||m===y)||d>f||m<y||m===y&&y!==0){l.push(v);continue}var C=v,D=void 0,p=void 0;if(m<f){var A=m-y;p=Un(Un({},C),{},{text:C.text.slice(A)}),C=Un(Un({},C),{},{text:C.text.slice(0,A)})}if(d>y){var O=d-y;D=Un(Un({},C),{},{text:C.text.slice(0,O)}),C=Un(Un({},C),{},{text:C.text.slice(O)})}Object.assign(C,o),D&&l.push(D),l.push(C),p&&l.push(p)}r=l}return r}},ic=e=>e.selection?e.selection:e.children.length>0?R.end(e,[]):[0],Da=(e,t)=>{var[r]=R.node(e,t);return n=>n===r},sc=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?Bb(e):e,o=At.None,a=At.None,c=0,l=null,f=null;for(var d of n){var m=d.codePointAt(0);if(!m)break;var v=Lb(d,m);if([o,a]=r?[a,v]:[v,o],ta(o,At.ZWJ)&&ta(a,At.ExtPict)&&(r?l=uh(e.substring(0,c)):l=uh(e.substring(0,e.length-c)),!l)||ta(o,At.RI)&&ta(a,At.RI)&&(f!==null?f=!f:r?f=!0:f=qb(e.substring(0,e.length-c)),!f)||o!==At.None&&a!==At.None&&_b(o,a))break;c+=d.length}return c||1},wb=/\s/,Db=/[\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]/,Eb=/['\u2018\u2019]/,kb=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=sc(e,t),[a,c]=lc(e,o,t);if(Sb(a,c,t))n=!0,r+=o;else if(!n)r+=o;else break;e=c}return r},lc=(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)]},Sb=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(wb.test(t))return!1;if(Eb.test(t)){var o=sc(r,n),[a,c]=lc(r,o,n);if(e(a,c,n))return!0}return!Db.test(t)},Bb=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(Fb(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(Ab(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},Ab=e=>e>=55296&&e<=56319,Fb=e=>e>=56320&&e<=57343,At;(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"})(At||(At={}));var Ob=/^(?:[\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])$/,Nb=/^(?:[\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])$/,Tb=/^[\u1100-\u115F\uA960-\uA97C]$/,Mb=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Rb=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Ib=/^[\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]$/,Pb=/^[\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]$/,zb=/^(?:[\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])$/,Lb=(e,t)=>{var r=At.Any;return e.search(Ob)!==-1&&(r|=At.Extend),t===8205&&(r|=At.ZWJ),t>=127462&&t<=127487&&(r|=At.RI),e.search(Nb)!==-1&&(r|=At.Prepend),e.search($b)!==-1&&(r|=At.SpacingMark),e.search(Tb)!==-1&&(r|=At.L),e.search(Mb)!==-1&&(r|=At.V),e.search(Rb)!==-1&&(r|=At.T),e.search(Ib)!==-1&&(r|=At.LV),e.search(Pb)!==-1&&(r|=At.LVT),e.search(zb)!==-1&&(r|=At.ExtPict),r};function ta(e,t){return(e&t)!==0}var jb=[[At.L,At.L|At.V|At.LV|At.LVT],[At.LV|At.V,At.V|At.T],[At.LVT|At.T,At.T],[At.Any,At.Extend|At.ZWJ],[At.Any,At.SpacingMark],[At.Prepend,At.Any],[At.ZWJ,At.ExtPict],[At.RI,At.RI]];function _b(e,t){return jb.findIndex(r=>ta(e,r[0])&&ta(t,r[1]))===-1}var Hb=/(?:[\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$/,uh=e=>e.search(Hb)!==-1,Kb=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,qb=e=>{var t=e.match(Kb);if(t===null)return!1;var r=t[0].length/2;return r%2===1},Wb={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]:{};R.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=ic(e)}=r;if(oe.isPath(o)&&(o=R.range(e,o)),Fe.isRange(o))if(Fe.isCollapsed(o))o=o.anchor;else{var a=Fe.end(o);if(!n&&R.void(e,{at:a}))return;var c=Fe.start(o),l=R.pointRef(e,c),f=R.pointRef(e,a);Ke.delete(e,{at:o,voids:n});var d=l.unref(),m=f.unref();o=d||m,Ke.setSelection(e,{anchor:o,focus:o})}if(!(!n&&R.void(e,{at:o})||R.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 ch(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 Ti(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ch(Object(r),!0).forEach(function(n){Zr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ke=Ti(Ti(Ti(Ti({},cb),db),fb),Wb),Gi=new WeakMap,Vb=e=>Gi.get(e)||!1,Ub=(e,t,r)=>{var n=Gi.get(e)||!1;Gi.set(e,!0);try{t(),r()}finally{Gi.set(e,n)}};function km(e,t,r){var n=Ss.get(e)||[],o=Bs.get(e)||new Set,a,c,l=v=>{if(v){var g=v.join(",");c.has(g)||(c.add(g),a.push(v))}};if(r){a=[],c=new Set;for(var f of n){var d=r(f);l(d)}}else a=n,c=o;for(var m of t)l(m);Ss.set(e,a),Bs.set(e,c)}var Xb=(e,t)=>{for(var r of R.pathRefs(e))ob.transform(r,t);for(var n of R.pointRefs(e))ab.transform(n,t);for(var o of R.rangeRefs(e))ib.transform(o,t);if(!Vb(e)){var a=oe.operationCanTransformPath(t)?c=>oe.transform(c,t):void 0;km(e,e.getDirtyPaths(t),a)}Ke.transform(e,t),e.operations.push(t),R.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Wa.get(e)||(Wa.set(e,!0),Promise.resolve().then(()=>{Wa.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},Yb=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return oe.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=oe.levels(o),c=lt.isText(n)?[]:Array.from(Ge.nodes(n),V=>{var[,K]=V;return o.concat(K)});return[...a,...c]}case"merge_node":{var{path:l}=t,f=oe.ancestors(l),d=oe.previous(l);return[...f,d]}case"move_node":{var{path:m,newPath:v}=t;if(oe.equals(m,v))return[];var g=[],y=[];for(var C of oe.ancestors(m)){var D=oe.transform(C,t);g.push(D)}for(var p of oe.ancestors(v)){var A=oe.transform(p,t);y.push(A)}var O=y[y.length-1],B=v[v.length-1],F=O.concat(B);return[...g,...y,F]}case"remove_node":{var{path:N}=t,I=oe.ancestors(N);return[...I]}case"split_node":{var{path:P}=t,H=oe.levels(P),T=oe.next(P);return[...H,T]}default:return[]}},Gb=e=>{var{selection:t}=e;return t?Ge.fragment(e,t):[]},Zb=(e,t)=>{var[r,n]=t;if(!lt.isText(r)){if(ft.isElement(r)&&r.children.length===0){var o={text:""};Ke.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=R.isEditor(r)?!1:ft.isElement(r)&&(e.isInline(r)||r.children.length===0||lt.isText(r.children[0])||e.isInline(r.children[0])),c=0,l=0;l<r.children.length;l++,c++){var f=Ge.get(e,n);if(!lt.isText(f)){var d=f.children[c],m=f.children[c-1],v=l===r.children.length-1,g=lt.isText(d)||ft.isElement(d)&&e.isInline(d);if(g!==a)Ke.removeNodes(e,{at:n.concat(c),voids:!0}),c--;else if(ft.isElement(d)){if(e.isInline(d)){if(m==null||!lt.isText(m)){var y={text:""};Ke.insertNodes(e,y,{at:n.concat(c),voids:!0}),c++}else if(v){var C={text:""};Ke.insertNodes(e,C,{at:n.concat(c+1),voids:!0}),c++}}}else{if(!lt.isText(d)&&!("children"in d)){var D=d;D.children=[]}m!=null&<.isText(m)&&(lt.equals(d,m,{loose:!0})?(Ke.mergeNodes(e,{at:n.concat(c),voids:!0}),c--):m.text===""?(Ke.removeNodes(e,{at:n.concat(c-1),voids:!0}),c--):d.text===""&&(Ke.removeNodes(e,{at:n.concat(c),voids:!0}),c--))}}}}},Qb=(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},Jb=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 c=R.path(e,o),l=n==="lowest";for(var[f,d]of R.levels(e,{at:c,voids:r,match:a,reverse:l}))if(!lt.isText(f)){if(Fe.isRange(o)){if(oe.isAncestor(d,o.anchor.path)&&oe.isAncestor(d,o.focus.path))return[f,d]}else if(!oe.equals(c,d))return[f,d]}}};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 fh(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){Zr(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 ey=(e,t,r)=>{var{selection:n}=e;if(n){var o=(v,g)=>{if(!lt.isText(v))return!1;var[y,C]=R.parent(e,g);return!e.isVoid(y)||e.markableVoid(y)},a=Fe.isExpanded(n),c=!1;if(!a){var[l,f]=R.node(e,n);if(l&&o(l,f)){var[d]=R.parent(e,f);c=d&&e.markableVoid(d)}}if(a||c)Ke.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var m=fh(fh({},R.marks(e)||{}),{},{[t]:r});e.marks=m,Wa.get(e)||e.onChange()}}};function hh(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 ph(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hh(Object(r),!0).forEach(function(n){Zr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ty=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.point(e,t,{edge:"end"}),o=R.end(e,[]),a={anchor:n,focus:o},{distance:c=1}=r,l=0,f;for(var d of R.positions(e,ph(ph({},r),{},{at:a}))){if(l>c)break;l!==0&&(f=d),l++}return f};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){Zr(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 ry=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.start(e,[]),o=R.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:c=1}=r,l=0,f;for(var d of R.positions(e,gh(gh({},r),{},{at:a,reverse:!0}))){if(l>c)break;l!==0&&(f=d),l++}return f},ny=(e,t)=>{var{selection:r}=e;r&&Fe.isCollapsed(r)&&Ke.delete(e,{unit:t,reverse:!0})},oy=(e,t)=>{var{selection:r}=e;r&&Fe.isCollapsed(r)&&Ke.delete(e,{unit:t})},ay=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Fe.isExpanded(r)&&Ke.delete(e,{reverse:t==="backward"})},iy=(e,t)=>[R.start(e,t),R.end(e,t)];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){Zr(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 sy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return R.above(e,bh(bh({},t),{},{match:r=>ft.isElement(r)&&R.isElementReadOnly(e,r)}))},ly=(e,t)=>R.point(e,t,{edge:"end"}),uy=(e,t)=>{var r=R.path(e,t,{edge:"start"});return R.node(e,r)},cy=(e,t)=>{var r=R.range(e,t);return Ge.fragment(e,r)};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){Zr(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 dy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return R.above(e,xh(xh({},t),{},{match:r=>ft.isElement(r)&&R.isVoid(e,r)}))},fy=(e,t)=>t.children.some(r=>ft.isElement(r)&&R.isBlock(e,r)),hy=(e,t)=>t.children.some(r=>lt.isText(r)||R.isInline(e,r)),py=(e,t)=>Ge.has(e,t),my=(e,t)=>t.children.every(r=>lt.isText(r)),gy=e=>{Ke.splitNodes(e,{always:!0})},vy=(e,t,r)=>{Ke.insertNodes(e,t,r)},by=e=>{Ke.splitNodes(e,{always:!0})};function Ch(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 yy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ch(Object(r),!0).forEach(function(n){Zr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xy=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=yy({text:t},o);Ke.insertNodes(e,a,{at:r.at,voids:r.voids})}else Ke.insertText(e,t,r);e.marks=null}},Cy=(e,t)=>!e.isInline(t),wy=(e,t,r)=>R.isStart(e,t,r)||R.isEnd(e,t,r),Dy=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&<.isText(n)&&n.text===""&&!e.isVoid(t)},Ey=(e,t,r)=>{var n=R.end(e,r);return zt.equals(t,n)},ky=e=>{var t=Dm.get(e);return t===void 0?!0:t},Sy=(e,t,r)=>{if(t.offset!==0)return!1;var n=R.start(e,r);return zt.equals(t,n)},By=(e,t)=>{var r=R.path(e,t,{edge:"end"});return R.node(e,r)},Ay=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=Ge.leaf(e,n);return[o,n]};function Fy(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 c=[],l=R.path(e,r);for(var[f,d]of Ge.levels(e,l))if(a(f,d)&&(c.push([f,d]),!o&&ft.isElement(f)&&R.isVoid(e,f)))break;n&&c.reverse(),yield*c}})()}var Oy=["text"],Ny=["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=R.isEnd(e,n,n.path);if(a){var c=R.after(e,n);c&&(n=c)}var[l]=R.nodes(e,{match:lt.isText,at:{anchor:n,focus:o}});if(l){var[f]=l,d=eo(f,Oy);return d}else return{}}var{path:m}=n,[v]=R.leaf(e,m);if(n.offset===0){var g=R.previous(e,{at:m,match:lt.isText}),y=R.above(e,{match:B=>ft.isElement(B)&&R.isVoid(e,B)&&e.markableVoid(B)});if(!y){var C=R.above(e,{match:B=>ft.isElement(B)&&R.isBlock(e,B)});if(g&&C){var[D,p]=g,[,A]=C;oe.isAncestor(A,p)&&(v=D)}}}var O=eo(v,Ny);return O},Ty=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 c=R.after(e,a,{voids:n});if(c){var[,l]=R.last(e,[]),f=[c.path,l];if(oe.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(oe.isPath(a)){var[d]=R.parent(e,a);o=v=>d.children.includes(v)}else o=()=>!0;var[m]=R.nodes(e,{at:f,match:o,mode:r,voids:n});return m}}},My=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=Ge.get(e,n);return[o,n]};function Ry(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:c=!1,ignoreNonSelectable:l=!1}=t,{match:f}=t;if(f||(f=()=>!0),!!r){var d,m;if(yb.isSpan(r))d=r[0],m=r[1];else{var v=R.path(e,r,{edge:"start"}),g=R.path(e,r,{edge:"end"});d=a?g:v,m=a?v:g}var y=Ge.nodes(e,{reverse:a,from:d,to:m,pass:F=>{var[N]=F;return ft.isElement(N)?!!(!c&&(R.isVoid(e,N)||R.isElementReadOnly(e,N))||l&&!R.isSelectable(e,N)):!1}}),C=[],D;for(var[p,A]of y)if(!(l&&ft.isElement(p)&&!R.isSelectable(e,p))){var O=D&&oe.compare(A,D[1])===0;if(!(n==="highest"&&O)){if(!f(p,A)){if(o&&!O&<.isText(p))return;continue}if(n==="lowest"&&O){D=[p,A];continue}var B=n==="lowest"?D:[p,A];B&&(o?C.push(B):yield B),D=[p,A]}}n==="lowest"&&D&&(o?C.push(D):yield D),o&&(yield*C)}})()}var Iy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=d=>Ss.get(d)||[],a=d=>Bs.get(d)||new Set,c=d=>{var m=o(d).pop(),v=m.join(",");return a(d).delete(v),m};if(R.isNormalizing(e)){if(r){var l=Array.from(Ge.nodes(e),d=>{var[,m]=d;return m}),f=new Set(l.map(d=>d.join(",")));Ss.set(e,l),Bs.set(e,f)}o(e).length!==0&&R.withoutNormalizing(e,()=>{for(var d of o(e))if(Ge.has(e,d)){var m=R.node(e,d),[v,g]=m;ft.isElement(v)&&v.children.length===0&&e.normalizeNode(m,{operation:n})}for(var y=o(e),C=y.length,D=0;y.length!==0;){if(!e.shouldNormalize({dirtyPaths:y,iteration:D,initialDirtyPathsLength:C,operation:n}))return;var p=c(e);if(Ge.has(e,p)){var A=R.node(e,p);e.normalizeNode(A,{operation:n})}D++,y=o(e)}})}},Py=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=R.path(e,t,r),o=oe.parent(n),a=R.node(e,o);return a},zy=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:c}=o,l=R.pathRefs(e);return l.delete(o),o.current=null,c}},a=R.pathRefs(e);return a.add(o),o},Ly=e=>{var t=Gf.get(e);return t||(t=new Set,Gf.set(e,t)),t},jy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(oe.isPath(t)){if(o==="start"){var[,a]=Ge.first(e,t);t=a}else if(o==="end"){var[,c]=Ge.last(e,t);t=c}}return Fe.isRange(t)&&(o==="start"?t=Fe.start(t):o==="end"?t=Fe.end(t):t=oe.common(t.anchor.path,t.focus.path)),zt.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},_y=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:c}=o,l=R.pointRefs(e);return l.delete(o),o.current=null,c}},a=R.pointRefs(e);return a.add(o),o},Hy=e=>{var t=Zf.get(e);return t||(t=new Set,Zf.set(e,t)),t},Ky=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(oe.isPath(t)){var o;if(n==="end"){var[,a]=Ge.last(e,t);o=a}else{var[,c]=Ge.first(e,t);o=c}var l=Ge.get(e,o);if(!lt.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 qy(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:c=!1}=t;if(!r)return;var l=R.range(e,r),[f,d]=Fe.edges(l),m=o?d:f,v=!1,g="",y=0,C=0,D=0;for(var[p,A]of R.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:c})){if(ft.isElement(p)){if(!a&&(e.isVoid(p)||e.isElementReadOnly(p))){yield R.start(e,A);continue}if(e.isInline(p))continue;if(R.hasInlines(e,p)){var O=oe.isAncestor(A,d.path)?d:R.end(e,A),B=oe.isAncestor(A,f.path)?f:R.start(e,A);g=R.string(e,{anchor:B,focus:O},{voids:a}),v=!0}}if(lt.isText(p)){var F=oe.equals(A,m.path);for(F?(C=o?m.offset:p.text.length-m.offset,D=m.offset):(C=p.text.length,D=o?C:0),(F||v||n==="offset")&&(yield{path:A,offset:D},v=!1);;){if(y===0){if(g==="")break;y=N(g,n,o),g=lc(g,y,o)[1]}if(D=o?D-y:D+y,C=C-y,C<0){y=-C;break}y=0,yield{path:A,offset:D}}}}function N(I,P,H){return P==="character"?sc(I,H):P==="word"?kb(I,H):P==="line"||P==="block"?I.length:1}})()}var Wy=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 c=R.before(e,a,{voids:n});if(c){var[,l]=R.first(e,[]),f=[c.path,l];if(oe.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(oe.isPath(a)){var[d]=R.parent(e,a);o=v=>d.children.includes(v)}else o=()=>!0;var[m]=R.nodes(e,{reverse:!0,at:f,match:o,mode:r,voids:n});return m}}},Vy=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:c}=o,l=R.rangeRefs(e);return l.delete(o),o.current=null,c}},a=R.rangeRefs(e);return a.add(o),o},Uy=e=>{var t=Qf.get(e);return t||(t=new Set,Qf.set(e,t)),t},Xy=(e,t,r)=>{if(Fe.isRange(t)&&!r)return t;var n=R.start(e,t),o=R.end(e,r||t);return{anchor:n,focus:o}};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 Yy(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){Zr(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 Gy=(e,t)=>{var{selection:r}=e;if(r){var n=(m,v)=>{if(!lt.isText(m))return!1;var[g,y]=R.parent(e,v);return!e.isVoid(g)||e.markableVoid(g)},o=Fe.isExpanded(r),a=!1;if(!o){var[c,l]=R.node(e,r);if(c&&n(c,l)){var[f]=R.parent(e,l);a=f&&e.markableVoid(f)}}if(o||a)Ke.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var d=Yy({},R.marks(e)||{});delete d[t],e.marks=d,Wa.get(e)||e.onChange()}}},Zy=(e,t)=>{Dm.set(e,t)},Qy=(e,t)=>R.point(e,t,{edge:"start"}),Jy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=R.range(e,t),[a,c]=Fe.edges(o),l="";for(var[f,d]of R.nodes(e,{at:o,match:lt.isText,voids:n})){var m=f.text;oe.equals(d,c.path)&&(m=m.slice(0,c.offset)),oe.equals(d,a.path)&&(m=m.slice(a.offset)),l+=m}return l},ex=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)||oe.hasPrevious(a.path))return t;var c=R.above(e,{at:a,match:y=>ft.isElement(y)&&R.isBlock(e,y),voids:n}),l=c?c[1]:[],f=R.start(e,o),d={anchor:f,focus:a},m=!0;for(var[v,g]of R.nodes(e,{at:d,match:lt.isText,reverse:!0,voids:n})){if(m){m=!1;continue}if(v.text!==""||oe.isBefore(g,l)){a={path:g,offset:v.text.length};break}}return{anchor:o,focus:a}},tx=(e,t)=>{var r=R.isNormalizing(e);R.setNormalizing(e,!1);try{t()}finally{R.setNormalizing(e,r)}R.normalize(e)},rx=(e,t,r)=>{var[n,o]=t;return ft.isElement(n)&&R.isEmpty(e,n)||lt.isText(n)&&n.text===""&&o[o.length-1]!==0},nx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:c=1,voids:l=!1}=t,{at:f=e.selection,hanging:d=!1}=t;if(f){var m=!1;if(Fe.isRange(f)&&Fe.isCollapsed(f)&&(m=!0,f=f.anchor),zt.isPoint(f)){var v=R.void(e,{at:f,mode:"highest"});if(!l&&v){var[,g]=v;f=g}else{var y={unit:a,distance:c},C=o?R.before(e,f,y)||R.start(e,[]):R.after(e,f,y)||R.end(e,[]);f={anchor:f,focus:C},d=!0}}if(oe.isPath(f)){Ke.removeNodes(e,{at:f,voids:l});return}if(!Fe.isCollapsed(f)){if(!d){var[,D]=Fe.edges(f),p=R.end(e,[]);zt.equals(D,p)||(f=R.unhangRange(e,f,{voids:l}))}var[A,O]=Fe.edges(f),B=R.above(e,{match:ke=>ft.isElement(ke)&&R.isBlock(e,ke),at:A,voids:l}),F=R.above(e,{match:ke=>ft.isElement(ke)&&R.isBlock(e,ke),at:O,voids:l}),N=B&&F&&!oe.equals(B[1],F[1]),I=oe.equals(A.path,O.path),P=l?null:(r=R.void(e,{at:A,mode:"highest"}))!==null&&r!==void 0?r:R.elementReadOnly(e,{at:A,mode:"highest"}),H=l?null:(n=R.void(e,{at:O,mode:"highest"}))!==null&&n!==void 0?n:R.elementReadOnly(e,{at:O,mode:"highest"});if(P){var T=R.before(e,A);T&&B&&oe.isAncestor(B[1],T.path)&&(A=T)}if(H){var V=R.after(e,O);V&&F&&oe.isAncestor(F[1],V.path)&&(O=V)}var K=[],G;for(var Y of R.nodes(e,{at:f,voids:l})){var[L,W]=Y;G&&oe.compare(W,G)===0||(!l&&ft.isElement(L)&&(R.isVoid(e,L)||R.isElementReadOnly(e,L))||!oe.isCommon(W,A.path)&&!oe.isCommon(W,O.path))&&(K.push(Y),G=W)}var U=Array.from(K,ke=>{var[,Ee]=ke;return R.pathRef(e,Ee)}),X=R.pointRef(e,A),te=R.pointRef(e,O),z="";if(!I&&!P){var le=X.current,[ce]=R.leaf(e,le),{path:he}=le,{offset:ne}=A,pe=ce.text.slice(ne);pe.length>0&&(e.apply({type:"remove_text",path:he,offset:ne,text:pe}),z=pe)}if(U.reverse().map(ke=>ke.unref()).filter(ke=>ke!==null).forEach(ke=>Ke.removeNodes(e,{at:ke,voids:l})),!H){var Oe=te.current,[Q]=R.leaf(e,Oe),{path:fe}=Oe,se=I?A.offset:0,ae=Q.text.slice(se,O.offset);ae.length>0&&(e.apply({type:"remove_text",path:fe,offset:se,text:ae}),z=ae)}!I&&N&&te.current&&X.current&&Ke.mergeNodes(e,{at:te.current,hanging:!0,voids:l}),m&&o&&a==="character"&&z.length>1&&z.match(/[\u0E00-\u0E7F]+/)&&Ke.insertText(e,z.slice(0,z.length-c));var ge=X.unref(),be=te.unref(),Ce=o?ge||be:be||ge;t.at==null&&Ce&&Ke.select(e,Ce)}}})},ox=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=ic(e),batchDirty:c=!0}=r;if(t.length){if(Fe.isRange(a))if(n||(a=R.unhangRange(e,a,{voids:o})),Fe.isCollapsed(a))a=a.anchor;else{var[,l]=Fe.edges(a);if(!o&&R.void(e,{at:l}))return;var f=R.pointRef(e,l);Ke.delete(e,{at:a}),a=f.unref()}else oe.isPath(a)&&(a=R.start(e,a));if(!(!o&&R.void(e,{at:a}))){var d=R.above(e,{at:a,match:pe=>ft.isElement(pe)&&R.isInline(e,pe),mode:"highest",voids:o});if(d){var[,m]=d;if(R.isEnd(e,a,m)){var v=R.after(e,m);a=v}else if(R.isStart(e,a,m)){var g=R.before(e,m);a=g}}var y=R.above(e,{match:pe=>ft.isElement(pe)&&R.isBlock(e,pe),at:a,voids:o}),[,C]=y,D=R.isStart(e,a,C),p=R.isEnd(e,a,C),A=D&&p,O=!D||D&&p,B=!p,[,F]=Ge.first({children:t},[]),[,N]=Ge.last({children:t},[]),I=[],P=pe=>{var[Oe,Q]=pe,fe=Q.length===0;return fe?!1:A?!0:!(O&&oe.isAncestor(Q,F)&&ft.isElement(Oe)&&!e.isVoid(Oe)&&!e.isInline(Oe)||B&&oe.isAncestor(Q,N)&&ft.isElement(Oe)&&!e.isVoid(Oe)&&!e.isInline(Oe))};for(var H of Ge.nodes({children:t},{pass:P}))P(H)&&I.push(H);var T=[],V=[],K=[],G=!0,Y=!1;for(var[L]of I)ft.isElement(L)&&!e.isInline(L)?(G=!1,Y=!0,V.push(L)):G?T.push(L):K.push(L);var[W]=R.nodes(e,{at:a,match:pe=>lt.isText(pe)||R.isInline(e,pe),mode:"highest",voids:o}),[,U]=W,X=R.isStart(e,a,U),te=R.isEnd(e,a,U),z=R.pathRef(e,p&&!K.length?oe.next(C):C),le=R.pathRef(e,te?oe.next(U):U);Ke.splitNodes(e,{at:a,match:pe=>Y?ft.isElement(pe)&&R.isBlock(e,pe):lt.isText(pe)||R.isInline(e,pe),mode:Y?"lowest":"highest",always:Y&&(!D||T.length>0)&&(!p||K.length>0),voids:o});var ce=R.pathRef(e,!X||X&&te?oe.next(U):U);if(Ke.insertNodes(e,T,{at:ce.current,match:pe=>lt.isText(pe)||R.isInline(e,pe),mode:"highest",voids:o,batchDirty:c}),A&&!T.length&&V.length&&!K.length&&Ke.delete(e,{at:C,voids:o}),Ke.insertNodes(e,V,{at:z.current,match:pe=>ft.isElement(pe)&&R.isBlock(e,pe),mode:"lowest",voids:o,batchDirty:c}),Ke.insertNodes(e,K,{at:le.current,match:pe=>lt.isText(pe)||R.isInline(e,pe),mode:"highest",voids:o,batchDirty:c}),!r.at){var he;if(K.length>0&&le.current?he=oe.previous(le.current):V.length>0&&z.current?he=oe.previous(z.current):ce.current&&(he=oe.previous(ce.current)),he){var ne=R.end(e,he);Ke.select(e,ne)}}ce.unref(),z.unref(),le.unref()}}})},ax=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")Ke.select(e,n.anchor);else if(r==="focus")Ke.select(e,n.focus);else if(r==="start"){var[o]=Fe.edges(n);Ke.select(e,o)}else if(r==="end"){var[,a]=Fe.edges(n);Ke.select(e,a)}}else return},ix=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},sx=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:c=null}=t;if(r){c==="start"&&(c=Fe.isBackward(r)?"focus":"anchor"),c==="end"&&(c=Fe.isBackward(r)?"anchor":"focus");var{anchor:l,focus:f}=r,d={distance:n,unit:o,ignoreNonSelectable:!0},m={};if(c==null||c==="anchor"){var v=a?R.before(e,l,d):R.after(e,l,d);v&&(m.anchor=v)}if(c==null||c==="focus"){var g=a?R.before(e,f,d):R.after(e,f,d);g&&(m.focus=g)}Ke.setSelection(e,m)}},lx=(e,t)=>{var{selection:r}=e;if(t=R.range(e,t),r){Ke.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(Rr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};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){Zr(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 ux=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:c}=n,l=o==="anchor"?a:c;Ke.setSelection(e,{[o==="anchor"?"anchor":"focus"]:Eh(Eh({},l),t)})}},cx=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!zt.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!zt.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})}},dx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:c=!0}=r,{at:l,match:f,select:d}=r;if(Ge.isNode(t)&&(t=[t]),t.length!==0){var[m]=t;if(l||(l=ic(e),d!==!1&&(d=!0)),d==null&&(d=!1),Fe.isRange(l))if(n||(l=R.unhangRange(e,l,{voids:o})),Fe.isCollapsed(l))l=l.anchor;else{var[,v]=Fe.edges(l),g=R.pointRef(e,v);Ke.delete(e,{at:l}),l=g.unref()}if(zt.isPoint(l)){f==null&&(lt.isText(m)?f=T=>lt.isText(T):e.isInline(m)?f=T=>lt.isText(T)||R.isInline(e,T):f=T=>ft.isElement(T)&&R.isBlock(e,T));var[y]=R.nodes(e,{at:l.path,match:f,mode:a,voids:o});if(y){var[,C]=y,D=R.pathRef(e,C),p=R.isEnd(e,l,C);Ke.splitNodes(e,{at:l,match:f,mode:a,voids:o});var A=D.unref();l=p?oe.next(A):A}else return}var O=oe.parent(l),B=l[l.length-1];if(!(!o&&R.void(e,{at:O}))){if(c){var F=[],N=oe.levels(O);Ub(e,()=>{var T=function(){var K=O.concat(B);B++;var G={type:"insert_node",path:K,node:V};e.apply(G),l=oe.next(l),F.push(G),lt.isText?N.push(...Array.from(Ge.nodes(V),Y=>{var[,L]=Y;return K.concat(L)})):N.push(K)};for(var V of t)T()},()=>{km(e,N,T=>{var V=T;for(var K of F)if(oe.operationCanTransformPath(K)&&(V=oe.transform(V,K),!V))return null;return V})})}else for(var I of t){var P=O.concat(B);B++,e.apply({type:"insert_node",path:P,node:I}),l=oe.next(l)}if(l=oe.previous(l),d){var H=R.end(e,l);H&&Ke.select(e,H)}}}})},fx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=oe.isPath(r)?Da(e,r):B=>ft.isElement(B)&&R.isBlock(e,B)),!!r){var c=R.nodes(e,{at:r,match:a,mode:n,voids:o}),l=Array.from(c,B=>{var[,F]=B;return R.pathRef(e,F)});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 m=R.node(e,oe.parent(d)),[v,g]=m,y=d[d.length-1],{length:C}=v.children;if(C===1){var D=oe.next(g);Ke.moveNodes(e,{at:d,to:D,voids:o}),Ke.removeNodes(e,{at:g,voids:o})}else if(y===0)Ke.moveNodes(e,{at:d,to:g,voids:o});else if(y===C-1){var p=oe.next(g);Ke.moveNodes(e,{at:d,to:p,voids:o})}else{var A=oe.next(d),O=oe.next(g);Ke.splitNodes(e,{at:A,voids:o}),Ke.moveNodes(e,{at:d,to:O,voids:o})}}}})},hx=["text"],px=["children"],Sm=(e,t)=>{if(ft.isElement(t)){var r=t;return R.isVoid(e,t)?!0:r.children.length===1?Sm(e,r.children[0]):!1}else return!R.isEditor(t)},mx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:c="lowest"}=t;if(n){if(r==null)if(oe.isPath(n)){var[l]=R.parent(e,n);r=T=>l.children.includes(T)}else r=T=>ft.isElement(T)&&R.isBlock(e,T);if(!o&&Fe.isRange(n)&&(n=R.unhangRange(e,n,{voids:a})),Fe.isRange(n))if(Fe.isCollapsed(n))n=n.anchor;else{var[,f]=Fe.edges(n),d=R.pointRef(e,f);Ke.delete(e,{at:n}),n=d.unref(),t.at==null&&Ke.select(e,n)}var[m]=R.nodes(e,{at:n,match:r,voids:a,mode:c}),v=R.previous(e,{at:n,match:r,voids:a,mode:c});if(!(!m||!v)){var[g,y]=m,[C,D]=v;if(!(y.length===0||D.length===0)){var p=oe.next(D),A=oe.common(y,D),O=oe.isSibling(y,D),B=Array.from(R.levels(e,{at:y}),T=>{var[V]=T;return V}).slice(A.length).slice(0,-1),F=R.above(e,{at:y,mode:"highest",match:T=>B.includes(T)&&Sm(e,T)}),N=F&&R.pathRef(e,F[1]),I,P;if(lt.isText(g)&<.isText(C)){var H=eo(g,hx);P=C.text.length,I=H}else if(ft.isElement(g)&&ft.isElement(C)){var H=eo(g,px);P=C.children.length,I=H}else throw new Error("Cannot merge the node at path [".concat(y,"] with the previous sibling because it is not the same kind: ").concat(Rr.stringify(g)," ").concat(Rr.stringify(C)));O||Ke.moveNodes(e,{at:y,to:p,voids:a}),N&&Ke.removeNodes(e,{at:N.current,voids:a}),R.shouldMergeNodesRemovePrevNode(e,v,m)?Ke.removeNodes(e,{at:D,voids:a}):e.apply({type:"merge_node",path:p,position:P,properties:I}),N&&N.unref()}}}})},gx=(e,t)=>{R.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:c}=t;if(n){c==null&&(c=oe.isPath(n)?Da(e,n):y=>ft.isElement(y)&&R.isBlock(e,y));var l=R.pathRef(e,r),f=R.nodes(e,{at:n,match:c,mode:o,voids:a}),d=Array.from(f,y=>{var[,C]=y;return R.pathRef(e,C)});for(var m of d){var v=m.unref(),g=l.current;v.length!==0&&e.apply({type:"move_node",path:v,newPath:g}),l.current&&oe.isSibling(g,v)&&oe.isAfter(g,v)&&(l.current=oe.next(l.current))}l.unref()}})},vx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:c}=t;if(a){c==null&&(c=oe.isPath(a)?Da(e,a):g=>ft.isElement(g)&&R.isBlock(e,g)),!r&&Fe.isRange(a)&&(a=R.unhangRange(e,a,{voids:n}));var l=R.nodes(e,{at:a,match:c,mode:o,voids:n}),f=Array.from(l,g=>{var[,y]=g;return R.pathRef(e,y)});for(var d of f){var m=d.unref();if(m){var[v]=R.node(e,m);e.apply({type:"remove_node",path:m,node:v})}}}})},bx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:c}=r,{hanging:l=!1,mode:f="lowest",split:d=!1,voids:m=!1}=r;if(o){if(n==null&&(n=oe.isPath(o)?Da(e,o):P=>ft.isElement(P)&&R.isBlock(e,P)),!l&&Fe.isRange(o)&&(o=R.unhangRange(e,o,{voids:m})),d&&Fe.isRange(o)){if(Fe.isCollapsed(o)&&R.leaf(e,o.anchor)[0].text.length>0)return;var v=R.rangeRef(e,o,{affinity:"inward"}),[g,y]=Fe.edges(o),C=f==="lowest"?"lowest":"highest",D=R.isEnd(e,y,y.path);Ke.splitNodes(e,{at:y,match:n,mode:C,voids:m,always:!D});var p=R.isStart(e,g,g.path);Ke.splitNodes(e,{at:g,match:n,mode:C,voids:m,always:!p}),o=v.unref(),r.at==null&&Ke.select(e,o)}a||(a=(P,H)=>P!==H);for(var[A,O]of R.nodes(e,{at:o,match:n,mode:f,voids:m})){var B={},F={};if(O.length!==0){var N=!1;for(var I in t)I==="children"||I==="text"||a(t[I],A[I])&&(N=!0,A.hasOwnProperty(I)&&(B[I]=A[I]),c?t[I]!=null&&(F[I]=c(A[I],t[I])):t[I]!=null&&(F[I]=t[I]));N&&e.apply({type:"set_node",path:O,properties:B,newProperties:F})}}}})},yx=(e,t)=>{if(Fe.isCollapsed(t))return t.anchor;var[,r]=Fe.edges(t),n=R.pointRef(e,r);return Ke.delete(e,{at:t}),n.unref()},xx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:c=0,always:l=!1}=t;if(o==null&&(o=te=>ft.isElement(te)&&R.isBlock(e,te)),Fe.isRange(a)&&(a=yx(e,a)),oe.isPath(a)){var f=a,d=R.point(e,f),[m]=R.parent(e,f);o=te=>te===m,c=d.path.length-f.length+1,a=d,l=!0}if(a){var v=R.pointRef(e,a,{affinity:"backward"}),g;try{var[y]=R.nodes(e,{at:a,match:o,mode:r,voids:n});if(!y)return;var C=R.void(e,{at:a,mode:"highest"}),D=0;if(!n&&C){var[p,A]=C;if(ft.isElement(p)&&e.isInline(p)){var O=R.after(e,A);if(!O){var B={text:""},F=oe.next(A);Ke.insertNodes(e,B,{at:F,voids:n}),O=R.point(e,F)}a=O,l=!0}var N=a.path.length-A.length;c=N+1,l=!0}g=R.pointRef(e,a);var I=a.path.length-c,[,P]=y,H=a.path.slice(0,I),T=c===0?a.offset:a.path[I]+D;for(var[V,K]of R.levels(e,{at:H,reverse:!0,voids:n})){var G=!1;if(K.length<P.length||K.length===0||!n&&ft.isElement(V)&&R.isVoid(e,V))break;var Y=v.current,L=R.isEnd(e,Y,K);if(l||!v||!R.isEdge(e,Y,K)){G=!0;var W=Ge.extractProps(V);e.apply({type:"split_node",path:K,position:T,properties:W})}T=K[K.length-1]+(G||L?1:0)}if(t.at==null){var U=g.current||R.end(e,[]);Ke.select(e,U)}}finally{var X;v.unref(),(X=g)===null||X===void 0||X.unref()}}})},Cx=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;Ke.setNodes(e,n,r)},wx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};R.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:c}=t;if(a){c==null&&(c=oe.isPath(a)?Da(e,a):g=>ft.isElement(g)&&R.isBlock(e,g)),oe.isPath(a)&&(a=R.range(e,a));var l=Fe.isRange(a)?R.rangeRef(e,a):null,f=R.nodes(e,{at:a,match:c,mode:r,voids:o}),d=Array.from(f,g=>{var[,y]=g;return R.pathRef(e,y)}).reverse(),m=function(){var g=v.unref(),[y]=R.node(e,g),C=R.range(e,g);n&&l&&(C=Fe.intersection(l.current,C)),Ke.liftNodes(e,{at:C,match:D=>ft.isAncestor(y)&&y.children.includes(D),voids:o})};for(var v of d)m();l&&l.unref()}})};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 Sh(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){Zr(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 Dx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};R.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:c,at:l=e.selection}=r;if(l){if(c==null&&(oe.isPath(l)?c=Da(e,l):e.isInline(t)?c=C=>ft.isElement(C)&&R.isInline(e,C)||lt.isText(C):c=C=>ft.isElement(C)&&R.isBlock(e,C)),o&&Fe.isRange(l)){var[f,d]=Fe.edges(l),m=R.rangeRef(e,l,{affinity:"inward"});Ke.splitNodes(e,{at:d,match:c,voids:a}),Ke.splitNodes(e,{at:f,match:c,voids:a}),l=m.unref(),r.at==null&&Ke.select(e,l)}var v=Array.from(R.nodes(e,{at:l,match:e.isInline(t)?C=>ft.isElement(C)&&R.isBlock(e,C):C=>R.isEditor(C),mode:"lowest",voids:a})),g=function(){var C=Fe.isRange(l)?Fe.intersection(l,R.range(e,y)):l;if(!C)return 0;var D=Array.from(R.nodes(e,{at:C,match:c,mode:n,voids:a}));if(D.length>0){var[p]=D,A=D[D.length-1],[,O]=p,[,B]=A;if(O.length===0&&B.length===0)return 0;var F=oe.equals(O,B)?oe.parent(O):oe.common(O,B),N=R.range(e,O,B),I=R.node(e,F),[P]=I,H=F.length+1,T=oe.next(B.slice(0,H)),V=Sh(Sh({},t),{},{children:[]});Ke.insertNodes(e,V,{at:T,voids:a}),Ke.moveNodes(e,{at:N,match:K=>ft.isAncestor(P)&&P.children.includes(K),to:T.concat(0),voids:a})}};for(var[,y]of v)g()}})},Ex=()=>{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 Xb(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ey(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ny(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return oy(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ay(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gb(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gy(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return by(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ox(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vy(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xy(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zb(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gy(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yb(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qb(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jb(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ty(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ry(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ax(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nx(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ix(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return iy(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sy(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ly(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uy(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cy(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 fy(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hy(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return py(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return my(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dx(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cy(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wy(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dy(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ey(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ky(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sy(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return By(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ay(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fy(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fx(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mx(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sx(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gx(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ty(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return My(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ry(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Iy(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Py(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jy(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zy(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ly(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ky(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _y(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hy(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qy(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wy(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xy(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vy(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uy(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vx(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lx(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bx(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zy(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ux(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cx(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xx(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qy(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jy(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ex(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cx(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wx(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dy(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tx(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dx(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rx(e,...r)}};return e},Yl,Bh;function kx(){if(Bh)return Yl;Bh=1,Yl=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 Yl}var Sx=kx();const Bm=Ys(Sx);var Gl,Ah;function uc(){if(Ah)return Gl;Ah=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Gl=e,Gl}var Zl,Fh;function Bx(){if(Fh)return Zl;Fh=1;var e=typeof Ni=="object"&&Ni&&Ni.Object===Object&&Ni;return Zl=e,Zl}var Ql,Oh;function Am(){if(Oh)return Ql;Oh=1;var e=Bx(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Ql=r,Ql}var Jl,Nh;function Ax(){if(Nh)return Jl;Nh=1;var e=Am(),t=function(){return e.Date.now()};return Jl=t,Jl}var eu,$h;function Fx(){if($h)return eu;$h=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return eu=t,eu}var tu,Th;function Ox(){if(Th)return tu;Th=1;var e=Fx(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return tu=r,tu}var ru,Mh;function Fm(){if(Mh)return ru;Mh=1;var e=Am(),t=e.Symbol;return ru=t,ru}var nu,Rh;function Nx(){if(Rh)return nu;Rh=1;var e=Fm(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(c){var l=r.call(c,o),f=c[o];try{c[o]=void 0;var d=!0}catch{}var m=n.call(c);return d&&(l?c[o]=f:delete c[o]),m}return nu=a,nu}var ou,Ih;function $x(){if(Ih)return ou;Ih=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return ou=r,ou}var au,Ph;function Tx(){if(Ph)return au;Ph=1;var e=Fm(),t=Nx(),r=$x(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function c(l){return l==null?l===void 0?o:n:a&&a in Object(l)?t(l):r(l)}return au=c,au}var iu,zh;function Mx(){if(zh)return iu;zh=1;function e(t){return t!=null&&typeof t=="object"}return iu=e,iu}var su,Lh;function Rx(){if(Lh)return su;Lh=1;var e=Tx(),t=Mx(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return su=n,su}var lu,jh;function Ix(){if(jh)return lu;jh=1;var e=Ox(),t=uc(),r=Rx(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function f(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var v=a.test(d);return v||c.test(d)?l(d.slice(2),v?2:8):o.test(d)?n:+d}return lu=f,lu}var uu,_h;function Om(){if(_h)return uu;_h=1;var e=uc(),t=Ax(),r=Ix(),n="Expected a function",o=Math.max,a=Math.min;function c(l,f,d){var m,v,g,y,C,D,p=0,A=!1,O=!1,B=!0;if(typeof l!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(A=!!d.leading,O="maxWait"in d,g=O?o(r(d.maxWait)||0,f):g,B="trailing"in d?!!d.trailing:B);function F(Y){var L=m,W=v;return m=v=void 0,p=Y,y=l.apply(W,L),y}function N(Y){return p=Y,C=setTimeout(H,f),A?F(Y):y}function I(Y){var L=Y-D,W=Y-p,U=f-L;return O?a(U,g-W):U}function P(Y){var L=Y-D,W=Y-p;return D===void 0||L>=f||L<0||O&&W>=g}function H(){var Y=t();if(P(Y))return T(Y);C=setTimeout(H,I(Y))}function T(Y){return C=void 0,B&&m?F(Y):(m=v=void 0,y)}function V(){C!==void 0&&clearTimeout(C),p=0,m=D=v=C=void 0}function K(){return C===void 0?y:T(t())}function G(){var Y=t(),L=P(Y);if(m=arguments,v=this,D=Y,L){if(C===void 0)return N(D);if(O)return clearTimeout(C),C=setTimeout(H,f),F(D)}return C===void 0&&(C=setTimeout(H,f)),y}return G.cancel=V,G.flush=K,G}return uu=c,uu}var Px=Om();const zx=Ys(Px);var cu,Hh;function Lx(){if(Hh)return cu;Hh=1;var e=Om(),t=uc(),r="Expected a function";function n(o,a,c){var l=!0,f=!0;if(typeof o!="function")throw new TypeError(r);return t(c)&&(l="leading"in c?!!c.leading:l,f="trailing"in c?!!c.trailing:f),e(o,a,{leading:l,maxWait:a,trailing:f})}return cu=n,cu}var jx=Lx();const _x=Ys(jx),Kh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,qh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Mi=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return qh(r.overflowY,t)||qh(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},Ri=(e,t,r,n,o,a,c,l)=>a<e&&c>t||a>e&&c<t?0:a<=e&&l<=r||c>=t&&l>=r?a-e-n:c>t&&l<r||a<e&&l>r?c-t+o:0,Hx=e=>e.parentElement??(e.getRootNode().host||null),Wh=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:c,block:l,inline:f,boundary:d,skipOverflowHiddenElements:m}=t,v=typeof d=="function"?d:U=>U!==d;if(!Kh(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,y=[];let C=e;for(;Kh(C)&&v(C);){if(C=Hx(C),C===g){y.push(C);break}C!=null&&C===document.body&&Mi(C)&&!Mi(document.documentElement)||C!=null&&Mi(C,m)&&y.push(C)}const D=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,p=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:A,scrollY:O}=window,{height:B,width:F,top:N,right:I,bottom:P,left:H}=e.getBoundingClientRect(),{top:T,right:V,bottom:K,left:G}=(U=>{const X=window.getComputedStyle(U);return{top:parseFloat(X.scrollMarginTop)||0,right:parseFloat(X.scrollMarginRight)||0,bottom:parseFloat(X.scrollMarginBottom)||0,left:parseFloat(X.scrollMarginLeft)||0}})(e);let Y=l==="start"||l==="nearest"?N-T:l==="end"?P+K:N+B/2-T+K,L=f==="center"?H+F/2-G+V:f==="end"?I+V:H-G;const W=[];for(let U=0;U<y.length;U++){const X=y[U],{height:te,width:z,top:le,right:ce,bottom:he,left:ne}=X.getBoundingClientRect();if(c==="if-needed"&&N>=0&&H>=0&&P<=p&&I<=D&&(X===g&&!Mi(X)||N>=le&&P<=he&&H>=ne&&I<=ce))return W;const pe=getComputedStyle(X),Oe=parseInt(pe.borderLeftWidth,10),Q=parseInt(pe.borderTopWidth,10),fe=parseInt(pe.borderRightWidth,10),se=parseInt(pe.borderBottomWidth,10);let ae=0,ge=0;const be="offsetWidth"in X?X.offsetWidth-X.clientWidth-Oe-fe:0,Ce="offsetHeight"in X?X.offsetHeight-X.clientHeight-Q-se:0,ke="offsetWidth"in X?X.offsetWidth===0?0:z/X.offsetWidth:0,Ee="offsetHeight"in X?X.offsetHeight===0?0:te/X.offsetHeight:0;if(g===X)ae=l==="start"?Y:l==="end"?Y-p:l==="nearest"?Ri(O,O+p,p,Q,se,O+Y,O+Y+B,B):Y-p/2,ge=f==="start"?L:f==="center"?L-D/2:f==="end"?L-D:Ri(A,A+D,D,Oe,fe,A+L,A+L+F,F),ae=Math.max(0,ae+O),ge=Math.max(0,ge+A);else{ae=l==="start"?Y-le-Q:l==="end"?Y-he+se+Ce:l==="nearest"?Ri(le,he,te,Q,se+Ce,Y,Y+B,B):Y-(le+te/2)+Ce/2,ge=f==="start"?L-ne-Oe:f==="center"?L-(ne+z/2)+be/2:f==="end"?L-ce+fe+be:Ri(ne,ce,z,Oe,fe+be,L,L+F,F);const{scrollLeft:Be,scrollTop:Ne}=X;ae=Ee===0?0:Math.max(0,Math.min(Ne+ae/Ee,X.scrollHeight-te/Ee+Ce)),ge=ke===0?0:Math.max(0,Math.min(Be+ge/ke,X.scrollWidth-z/ke+be)),Y+=Ne-ae,L+=Be-ge}W.push({el:X,top:ae,left:ge})}return W},Kx=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function qx(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(Wh(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:c}of Wh(e,Kx(t))){const l=a-r.top+r.bottom,f=c-r.left+r.right;o.scroll({top:l,left:f,behavior:n})}}var Mo=[],Wx=function(){return Mo.some(function(e){return e.activeTargets.length>0})},Vx=function(){return Mo.some(function(e){return e.skippedTargets.length>0})},Vh="ResizeObserver loop completed with undelivered notifications.",Ux=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Vh}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Vh),window.dispatchEvent(e)},oi;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(oi||(oi={}));var Ro=function(e){return Object.freeze(e)},Xx=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Ro(this)}return e})(),Nm=(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,Ro(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,c=t.bottom,l=t.left,f=t.width,d=t.height;return{x:r,y:n,top:o,right:a,bottom:c,left:l,width:f,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),cc=function(e){return e instanceof SVGElement&&"getBBox"in e},$m=function(e){if(cc(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,c=o.offsetHeight;return!(a||c||e.getClientRects().length)},Uh=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)},Yx=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},Va=typeof window<"u"?window:{},Ii=new WeakMap,Xh=/auto|scroll/,Gx=/^tb|vertical/,Zx=/msie|trident/i.test(Va.navigator&&Va.navigator.userAgent),Rn=function(e){return parseFloat(e||"0")},ia=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new Xx((r?t:e)||0,(r?e:t)||0)},Yh=Ro({devicePixelContentBoxSize:ia(),borderBoxSize:ia(),contentBoxSize:ia(),contentRect:new Nm(0,0,0,0)}),Tm=function(e,t){if(t===void 0&&(t=!1),Ii.has(e)&&!t)return Ii.get(e);if($m(e))return Ii.set(e,Yh),Yh;var r=getComputedStyle(e),n=cc(e)&&e.ownerSVGElement&&e.getBBox(),o=!Zx&&r.boxSizing==="border-box",a=Gx.test(r.writingMode||""),c=!n&&Xh.test(r.overflowY||""),l=!n&&Xh.test(r.overflowX||""),f=n?0:Rn(r.paddingTop),d=n?0:Rn(r.paddingRight),m=n?0:Rn(r.paddingBottom),v=n?0:Rn(r.paddingLeft),g=n?0:Rn(r.borderTopWidth),y=n?0:Rn(r.borderRightWidth),C=n?0:Rn(r.borderBottomWidth),D=n?0:Rn(r.borderLeftWidth),p=v+d,A=f+m,O=D+y,B=g+C,F=l?e.offsetHeight-B-e.clientHeight:0,N=c?e.offsetWidth-O-e.clientWidth:0,I=o?p+O:0,P=o?A+B:0,H=n?n.width:Rn(r.width)-I-N,T=n?n.height:Rn(r.height)-P-F,V=H+p+N+O,K=T+A+F+B,G=Ro({devicePixelContentBoxSize:ia(Math.round(H*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:ia(V,K,a),contentBoxSize:ia(H,T,a),contentRect:new Nm(v,f,H,T)});return Ii.set(e,G),G},Mm=function(e,t,r){var n=Tm(e,r),o=n.borderBoxSize,a=n.contentBoxSize,c=n.devicePixelContentBoxSize;switch(t){case oi.DEVICE_PIXEL_CONTENT_BOX:return c;case oi.BORDER_BOX:return o;default:return a}},Qx=(function(){function e(t){var r=Tm(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Ro([r.borderBoxSize]),this.contentBoxSize=Ro([r.contentBoxSize]),this.devicePixelContentBoxSize=Ro([r.devicePixelContentBoxSize])}return e})(),Rm=function(e){if($m(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Jx=function(){var e=1/0,t=[];Mo.forEach(function(a){if(a.activeTargets.length!==0){var c=[];a.activeTargets.forEach(function(l){var f=new Qx(l.target),d=Rm(l.target);c.push(f),l.lastReportedSize=Mm(l.target,l.observedBox),d<e&&(e=d)}),t.push(function(){a.callback.call(a.observer,c,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},Gh=function(e){Mo.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(Rm(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},e7=function(){var e=0;for(Gh(e);Wx();)e=Jx(),Gh(e);return Vx()&&Ux(),e>0},du,Im=[],t7=function(){return Im.splice(0).forEach(function(e){return e()})},r7=function(e){if(!du){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return t7()}).observe(r,n),du=function(){r.textContent="".concat(t?t--:t++)}}Im.push(e),du()},n7=function(e){r7(function(){requestAnimationFrame(e)})},Zi=0,o7=function(){return!!Zi},a7=250,i7={attributes:!0,characterData:!0,childList:!0,subtree:!0},Zh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Qh=function(e){return e===void 0&&(e=0),Date.now()+e},fu=!1,s7=(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=a7),!fu){fu=!0;var n=Qh(t);n7(function(){var o=!1;try{o=e7()}finally{if(fu=!1,t=n-Qh(),!o7())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,i7)};document.body?r():Va.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Zh.forEach(function(r){return Va.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Zh.forEach(function(r){return Va.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),s0=new s7,Jh=function(e){!Zi&&e>0&&s0.start(),Zi+=e,!Zi&&s0.stop()},l7=function(e){return!cc(e)&&!Yx(e)&&getComputedStyle(e).display==="inline"},u7=(function(){function e(t,r){this.target=t,this.observedBox=r||oi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Mm(this.target,this.observedBox,!0);return l7(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),c7=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Pi=new WeakMap,ep=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},zi=(function(){function e(){}return e.connect=function(t,r){var n=new c7(t,r);Pi.set(t,n)},e.observe=function(t,r,n){var o=Pi.get(t),a=o.observationTargets.length===0;ep(o.observationTargets,r)<0&&(a&&Mo.push(o),o.observationTargets.push(new u7(r,n&&n.box)),Jh(1),s0.schedule())},e.unobserve=function(t,r){var n=Pi.get(t),o=ep(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&Mo.splice(Mo.indexOf(n),1),n.observationTargets.splice(o,1),Jh(-1))},e.disconnect=function(t){var r=this,n=Pi.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),d7=(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.");zi.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(!Uh(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zi.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(!Uh(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zi.unobserve(this,t)},e.prototype.disconnect=function(){zi.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Dn={},tp;function f7(){if(tp)return Dn;tp=1,Object.defineProperty(Dn,"__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,y,C){y&&!("byKey"in y)&&(C=y,y=null),Array.isArray(g)||(g=[g]);var D=g.map(function(O){return f(O,y)}),p=function(O){return D.some(function(B){return d(B,O)})},A=C==null?p:p(C);return A}function c(g,y){return a(g,y)}function l(g,y){return a(g,{byKey:!0},y)}function f(g,y){var C=y&&y.byKey,D={};g=g.replace("++","+add");var p=g.split("+"),A=p.length;for(var O in t)D[t[O]]=!1;var B=!0,F=!1,N=void 0;try{for(var I=p[Symbol.iterator](),P;!(B=(P=I.next()).done);B=!0){var H=P.value,T=H.endsWith("?")&&H.length>1;T&&(H=H.slice(0,-1));var V=v(H),K=t[V];if(H.length>1&&!K&&!r[H]&&!n[V])throw new TypeError('Unknown modifier: "'+H+'"');(A===1||!K)&&(C?D.key=V:D.which=m(H)),K&&(D[K]=T?null:!0)}}catch(G){F=!0,N=G}finally{try{!B&&I.return&&I.return()}finally{if(F)throw N}}return D}function d(g,y){for(var C in g){var D=g[C],p=void 0;if(D!=null&&(C==="key"&&y.key!=null?p=y.key.toLowerCase():C==="which"?p=D===91&&y.which===93?91:y.which:p=y[C],!(p==null&&D===!1)&&p!==D))return!1}return!0}function m(g){g=v(g);var y=n[g]||g.toUpperCase().charCodeAt(0);return y}function v(g){return g=g.toLowerCase(),g=r[g]||g,g}return Dn.default=a,Dn.isHotkey=a,Dn.isCodeHotkey=c,Dn.isKeyHotkey=l,Dn.parseHotkey=f,Dn.compareHotkey=d,Dn.toKeyCode=m,Dn.toKeyName=v,Dn}var hu=f7();function h7(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 ca(e,t){if(e==null)return{};var r=h7(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 ai(e){"@babel/helpers - typeof";return ai=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},ai(e)}function p7(e,t){if(ai(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ai(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function m7(e){var t=p7(e,"string");return ai(t)==="symbol"?t:String(t)}function bn(e,t,r){return t=m7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var dc=to(null),Eo=()=>{var e=Do(dc);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},pu,mu,Pm=parseInt(Le.version.split(".")[0],10),zm=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,rp=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Yr=typeof navigator<"u"&&/Android/.test(navigator.userAgent),ra=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),No=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),g7=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Lm=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),v7=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),b7=Yr&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),y7=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),x7=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),C7=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Qi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(pu=navigator.userAgent.match(/Version\/(\d+)/))!==null&&pu!==void 0&&pu[1]&&parseInt((mu=navigator.userAgent.match(/Version\/(\d+)/))===null||mu===void 0?void 0:mu[1],10)<17;var uo=(!v7||!b7)&&!g7&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",sa=new WeakMap,fc=new WeakMap,hc=new WeakMap,jm=new WeakMap,Ji=new WeakMap,l0=new WeakMap,ii=new WeakMap,Io=new WeakMap,As=new WeakMap,Js=new WeakMap,u0=new WeakMap,vo=new WeakMap,$o=new WeakMap,Ua=new WeakMap,c0=new WeakMap,pc=new WeakMap,kn=new WeakMap,Gn=new WeakMap,rn=new WeakMap,po=new WeakMap,mo=new WeakMap,_m=new WeakMap,da=Symbol("placeholder"),Hm=Symbol("mark-placeholder"),Km=globalThis.Node,w7=globalThis.Text,mc=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,D7=e=>Co(e)&&e.nodeType===8,gn=e=>Co(e)&&e.nodeType===1,Co=e=>{var t=mc(e);return!!t&&e instanceof t.Node},d0=e=>{var t=e&&e.anchorNode&&mc(e.anchorNode);return!!t&&e instanceof t.Selection},qm=e=>Co(e)&&e.nodeType===3,E7=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,k7=e=>{var[t,r]=e;if(gn(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=Wm(t,o,n?"backward":"forward"),n=o<r;gn(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=B7(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},S7=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},Wm=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,c=!1,l=!1;(D7(o)||gn(o)&&o.childNodes.length===0||gn(o)&&o.getAttribute("contenteditable")==="false")&&!(c&&l);){if(a>=n.length){c=!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]},B7=(e,t,r)=>{var[n]=Wm(e,t,r);return n},Vm=e=>{var t="";if(qm(e)&&e.nodeValue)return e.nodeValue;if(gn(e)){for(var r of Array.from(e.childNodes))t+=Vm(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
103
|
+
`)}return t},A7=/data-slate-fragment="(.+?)"/m,F7=e=>{var t=e.getData("text/html"),[,r]=t.match(A7)||[];return r},Xa=e=>e.getSelection!=null?e.getSelection():document.getSelection(),gc=(e,t,r)=>{var{target:n}=t;if(gn(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(c=>{var{addedNodes:l,removedNodes:f}=c;for(var d of l)if(d===n||d.contains(n))return!0;for(var m of f)if(m===n||m.contains(n))return!0});return!a||a===t?!1:gc(e,a,r)},O7=()=>{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},np=(e,t)=>!!(e.compareDocumentPosition(t)&Km.DOCUMENT_POSITION_PRECEDING),N7=(e,t)=>!!(e.compareDocumentPosition(t)&Km.DOCUMENT_POSITION_FOLLOWING),$7=0;class T7{constructor(){bn(this,"id",void 0),this.id="".concat($7++)}}var Re={androidPendingDiffs:e=>rn.get(e),androidScheduleFlush:e=>{var t;(t=pc.get(e))===null||t===void 0||t()},blur:e=>{var t=Re.toDOMNode(e,e),r=Re.findDocumentOrShadowRoot(e);vo.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=Re.findDocumentOrShadowRoot(e),n=Xa(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&Ke.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),c=Re.findPath(e,a);if(ft.isElement(a)&&R.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=R.point(e,c,{edge:f?"start":"end"}),m=f?R.before(e,d):R.after(e,d);if(m){var v=R.range(e,m);return v}}var g,{document:y}=Re.getWindow(e);if(y.caretRangeFromPoint)g=y.caretRangeFromPoint(r,n);else{var C=y.caretPositionFromPoint(r,n);C&&(g=y.createRange(),g.setStart(C.offsetNode,C.offset),g.setEnd(C.offsetNode,C.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=As.get(t);return r||(r=new T7,As.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=hc.get(n);if(o==null){if(R.isEditor(n))return r;break}var a=fc.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Rr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!vo.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=Xa(n),a=Re.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||Ke.select(e,R.start(e,[])),vo.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=jm.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=gn(t)?t:t.parentElement}catch(c){if(c instanceof Error&&!c.message.includes('Permission denied to access property "nodeType"'))throw c}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)=>Co(t)&&Re.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return R.hasPath(e,r.path)&&R.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>Re.hasEditableTarget(e,t)||Re.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Co(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=>!!$o.get(e),isFocused:e=>!!vo.get(e),isReadOnly:e=>!!u0.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(u0.get(e))return!1;var r=Re.hasTarget(e,t)&&Re.toSlateNode(e,t);return ft.isElement(r)&&R.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=Js.get(e),n=R.isEditor(t)?Ji.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(Rr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=R.node(e,t.path),n=Re.toDOMNode(e,r),o;R.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",c=Array.from(n.querySelectorAll(a)),l=0,f=0;f<c.length;f++){var d=c[f],m=d.childNodes[0];if(!(m==null||m.textContent==null)){var{length:v}=m.textContent,g=d.getAttribute("data-slate-length"),y=g==null?v:parseInt(g,10),C=l+y,D=c[f+1];if(t.offset===C&&D!==null&&D!==void 0&&D.hasAttribute("data-slate-mark-placeholder")){var p,A=D.childNodes[0];o=[A instanceof w7?A:D,(p=D.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")?1:0];break}if(t.offset<=C){var O=Math.min(v,Math.max(0,t.offset-l));o=[m,O];break}l=C}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Rr.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=Fe.isBackward(t),a=Re.toDOMPoint(e,r),c=Fe.isCollapsed(t)?a:Re.toDOMPoint(e,n),l=Re.getWindow(e),f=l.document.createRange(),[d,m]=o?c:a,[v,g]=o?a:c,y=gn(d)?d:d.parentElement,C=!!y.getAttribute("data-slate-zero-width"),D=gn(v)?v:v.parentElement,p=!!D.getAttribute("data-slate-zero-width");return f.setStart(d,C?1:m),f.setEnd(v,p?1:g),f},toSlateNode:(e,t)=>{var r=gn(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?ii.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,[c,l]=n?t:k7(t),f=c.parentNode,d=null,m=0;if(f){var v,g,y=Re.toDOMNode(e,e),C=f.closest('[data-slate-void="true"]'),D=C&&y.contains(C)?C:null,p=f.closest('[contenteditable="false"]'),A=p&&y.contains(p)?p:null,O=f.closest("[data-slate-leaf]"),B=null;if(O){if(d=O.closest('[data-slate-node="text"]'),d){var F=Re.getWindow(e),N=F.document.createRange();N.setStart(d,0),N.setEnd(c,l);var I=N.cloneContents(),P=[...Array.prototype.slice.call(I.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(I.querySelectorAll("[contenteditable=false]"))];P.forEach(ne=>{if(Yr&&!n&&ne.hasAttribute("data-slate-zero-width")&&ne.textContent.length>0&&ne.textContext!=="\uFEFF"){ne.textContent.startsWith("\uFEFF")&&(ne.textContent=ne.textContent.slice(1));return}ne.parentNode.removeChild(ne)}),m=I.textContent.length,B=d}}else if(D){for(var H=D.querySelectorAll("[data-slate-leaf]"),T=0;T<H.length;T++){var V=H[T];if(Re.hasDOMNode(e,V)){O=V;break}}O?(d=O.closest('[data-slate-node="text"]'),B=O,m=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(ne=>{m-=ne.textContent.length})):m=1}else if(A){var K=ne=>ne?ne.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],G=A.closest('[data-slate-node="element"]');if(a==="forward"){var Y,L=[...K(G),...K(G==null?void 0:G.nextElementSibling)];O=(Y=L.find(ne=>N7(A,ne)))!==null&&Y!==void 0?Y:null}else{var W,U=[...K(G==null?void 0:G.previousElementSibling),...K(G)];O=(W=U.findLast(ne=>np(A,ne)))!==null&&W!==void 0?W:null}O&&(d=O.closest('[data-slate-node="text"]'),B=O,a==="forward"?m=0:(m=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(ne=>{m-=ne.textContent.length})))}B&&m===B.textContent.length&&Yr&&B.getAttribute("data-slate-zero-width")==="z"&&(v=B.textContent)!==null&&v!==void 0&&v.startsWith("\uFEFF")&&(f.hasAttribute("data-slate-zero-width")||ra&&(g=B.textContent)!==null&&g!==void 0&&g.endsWith(`
|
|
104
|
+
|
|
105
|
+
`))&&m--}if(Yr&&!d&&!n){var X=f.hasAttribute("data-slate-node")?f:f.closest("[data-slate-node]");if(X&&Re.hasDOMNode(e,X,{editable:!0})){var te=Re.toSlateNode(e,X),{path:z,offset:le}=R.start(e,Re.findPath(e,te));return X.querySelector("[data-slate-leaf]")||(le=l),{path:z,offset:le}}}if(!d){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var ce=Re.toSlateNode(e,d),he=Re.findPath(e,ce);return{path:he,offset:m}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,c=d0(t)?t.anchorNode:t.startContainer,l,f,d,m,v;if(c)if(d0(t)){if(ra&&t.rangeCount>1){d=t.focusNode;var g=t.getRangeAt(0),y=t.getRangeAt(t.rangeCount-1);if(d instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){let I=function(P){return P.childElementCount>0?I(P.children[0]):P};var C=g.startContainer,D=y.startContainer,p=I(C.children[g.startOffset]),A=I(D.children[y.startOffset]);m=0,A.childNodes.length>0?l=A.childNodes[0]:l=A,p.childNodes.length>0?d=p.childNodes[0]:d=p,A instanceof HTMLElement?f=A.innerHTML.length:f=0}else g.startContainer===d?(l=y.endContainer,f=y.endOffset,m=g.startOffset):(l=g.startContainer,f=g.endOffset,m=y.startOffset)}else l=t.anchorNode,f=t.anchorOffset,d=t.focusNode,m=t.focusOffset;Lm&&S7(l)||ra?v=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:v=t.isCollapsed}else l=t.startContainer,f=t.startOffset,d=t.endContainer,m=t.endOffset,v=t.collapsed;if(l==null||d==null||f==null||m==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));ra&&(n=d.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
106
|
+
|
|
107
|
+
`)&&m===d.textContent.length&&m--;var O=Re.toSlatePoint(e,[l,f],{exactMatch:o,suppressThrow:a});if(!O)return null;var B=np(l,d)||l===d&&m<f,F=v?O:Re.toSlatePoint(e,[d,m],{exactMatch:o,suppressThrow:a,searchDirection:B?"forward":"backward"});if(!F)return null;var N={anchor:O,focus:F};return Fe.isExpanded(N)&&Fe.isForward(N)&&gn(d)&&R.void(e,{at:N.focus,mode:"highest"})&&(N=R.unhangRange(e,N,{voids:!0})),N}};function M7(e,t){var{path:r,diff:n}=t;if(!R.hasPath(e,r))return!1;var o=Ge.get(e,r);if(!lt.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=oe.next(r);if(!R.hasPath(e,a))return!1;var c=Ge.get(e,a);return lt.isText(c)&&c.text.startsWith(n.text)}function Um(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 R7(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 I7(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 Xm(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),c=R7(a,o),l=Math.min(a.length-c,o.length-c),f=I7(a,o,l),d={start:r+c,end:n-f,text:o.slice(c,o.length-f)};return d.start===d.end&&d.text.length===0?null:d}function P7(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=Um(e,t,r),c=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,c),f=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return Xm(e,{start:n,end:f,text:l})}function z7(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function f0(e,t){var{path:r,offset:n}=t;if(!R.hasPath(e,r))return null;var o=Ge.get(e,r);if(!lt.isText(o))return null;var a=R.above(e,{match:l=>ft.isElement(l)&&R.isBlock(e,l),at:r});if(!a)return null;for(;n>o.text.length;){var c=R.next(e,{at:r,match:lt.isText});if(!c||!oe.isDescendant(c[1],a[1]))return null;n-=o.text.length,o=c[0],r=c[1]}return{path:r,offset:n}}function op(e,t){var r=f0(e,t.anchor);if(!r)return null;if(Fe.isCollapsed(t))return{anchor:r,focus:r};var n=f0(e,t.focus);return n?{anchor:r,focus:n}:null}function h0(e,t,r){var n=rn.get(e),o=n==null?void 0:n.find(m=>{var{path:v}=m;return oe.equals(v,t.path)});if(!o||t.offset<=o.diff.start)return zt.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var c={path:t.path,offset:a.start},l=zt.transform(c,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=zt.transform(f,r,{affinity:"backward"});return d?r.type==="split_node"&&oe.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 ap(e,t,r){var n=h0(e,t.anchor,r);if(!n)return null;if(Fe.isCollapsed(t))return{anchor:n,focus:n};var o=h0(e,t.focus,r);return o?{anchor:n,focus:o}:null}function L7(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!oe.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!oe.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!oe.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:oe.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:oe.transform(r,t,{affinity:"forward"})};case"merge_node":return oe.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:oe.transform(r,t)}:{diff:n,id:o,path:oe.transform(r,t)}}var a=oe.transform(r,t);return a?{diff:n,path:a,id:o}:null}function ip(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 Li(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ip(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ip(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var j7=25,_7=200,H7=function(){},K7=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function q7(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,c=null,l=null,f=0,d=!1,m=()=>{var G=mo.get(t);if(mo.delete(t),G){var{selection:Y}=t,L=op(t,G);L&&(!Y||!Fe.equals(L,Y))&&Ke.select(t,L)}},v=()=>{var G=po.get(t);if(po.delete(t),!!G){if(G.at){var Y=zt.isPoint(G.at)?f0(t,G.at):op(t,G.at);if(!Y)return;var L=R.range(t,Y);(!t.selection||!Fe.equals(t.selection,L))&&Ke.select(t,Y)}G.run()}},g=()=>{if(c&&(clearTimeout(c),c=null),l&&(clearTimeout(l),l=null),!F()&&!B()){m();return}o||(o=!0,setTimeout(()=>o=!1)),B()&&(o="action");var G=t.selection&&R.rangeRef(t,t.selection,{affinity:"forward"});Gn.set(t,t.marks),H7("flush",po.get(t),rn.get(t));for(var Y=F(),L;L=(W=rn.get(t))===null||W===void 0?void 0:W[0];){var W,U,X=kn.get(t);X!==void 0&&(kn.delete(t),t.marks=X),X&&d===!1&&(d=null);var te=z7(L);(!t.selection||!Fe.equals(t.selection,te))&&Ke.select(t,te),L.diff.text?R.insertText(t,L.diff.text):R.deleteFragment(t),rn.set(t,(U=rn.get(t))===null||U===void 0?void 0:U.filter(ce=>{var{id:he}=ce;return he!==L.id})),M7(t,L)||(Y=!1,po.delete(t),Gn.delete(t),o="action",mo.delete(t),r.cancel(),n.cancel(),G==null||G.unref())}var z=G==null?void 0:G.unref();if(z&&!mo.get(t)&&(!t.selection||!Fe.equals(z,t.selection))&&Ke.select(t,z),B()){v();return}Y&&r(),r.flush(),n.flush(),m();var le=Gn.get(t);Gn.delete(t),le!==void 0&&(t.marks=le,t.onChange())},y=G=>{a&&clearTimeout(a),a=setTimeout(()=>{$o.set(t,!1),g()},j7)},C=G=>{$o.set(t,!0),a&&(clearTimeout(a),a=null)},D=function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Y=l0.get(t);if(Y){if(F()||G){Y.style.display="none";return}Y.style.removeProperty("display")}},p=(G,Y)=>{var L,W=(L=rn.get(t))!==null&&L!==void 0?L:[];rn.set(t,W);var U=Ge.leaf(t,G),X=W.findIndex(le=>oe.equals(le.path,G));if(X<0){var te=Xm(U.text,Y);te&&W.push({path:G,diff:Y,id:f++}),D();return}var z=P7(U.text,W[X].diff,Y);if(!z){W.splice(X,1),D();return}W[X]=Li(Li({},W[X]),{},{diff:z})},A=function(G){var{at:Y}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};d=!1,mo.delete(t),r.cancel(),n.cancel(),B()&&g(),po.set(t,{at:Y,run:G}),l=setTimeout(g)},O=G=>{var Y;if(c&&(clearTimeout(c),c=null),!sa.get(t)){var{inputType:L}=G,W=null,U=G.dataTransfer||G.data||void 0;d!==!1&&L!=="insertText"&&L!=="insertCompositionText"&&(d=!1);var[X]=G.getTargetRanges();X&&(W=Re.toSlateRange(t,X,{exactMatch:!1,suppressThrow:!0}));var te=Re.getWindow(t),z=te.getSelection();if(!W&&z&&(X=z,W=Re.toSlateRange(t,z,{exactMatch:!1,suppressThrow:!0})),W=(Y=W)!==null&&Y!==void 0?Y:t.selection,!!W){var le=!0;if(L.startsWith("delete")){if(Fe.isExpanded(W)){var[ce,he]=Fe.edges(W),ne=Ge.leaf(t,ce.path);if(ne.text.length===ce.offset&&he.offset===0){var pe=R.next(t,{at:ce.path,match:lt.isText});pe&&oe.equals(pe[1],he.path)&&(W={anchor:he,focus:he})}}var Oe=L.endsWith("Backward")?"backward":"forward",[Q,fe]=Fe.edges(W),[se,ae]=R.leaf(t,Q.path),ge={text:"",start:Q.offset,end:fe.offset},be=rn.get(t),Ce=be==null?void 0:be.find(mt=>oe.equals(mt.path,ae)),ke=Ce?[Ce.diff,ge]:[ge],Ee=Um(se.text,...ke);if(Ee.length===0&&(le=!1),Fe.isExpanded(W)){if(le&&oe.equals(W.anchor.path,W.focus.path)){var Be={path:W.anchor.path,offset:Q.offset},Ne=R.range(t,Be,Be);return P(Ne),p(W.anchor.path,{text:"",end:fe.offset,start:Q.offset})}return A(()=>R.deleteFragment(t,{direction:Oe}),{at:W})}}switch(L){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return A(()=>R.deleteFragment(t),{at:W});case"deleteContent":case"deleteContentForward":{var{anchor:Me}=W;if(le&&Fe.isCollapsed(W)){var He=Ge.leaf(t,Me.path);if(Me.offset<He.text.length)return p(Me.path,{text:"",start:Me.offset,end:Me.offset+1})}return A(()=>R.deleteForward(t),{at:W})}case"deleteContentBackward":{var Ze,{anchor:tt}=W,Te=d0(X)?X.isCollapsed:!!((Ze=X)!==null&&Ze!==void 0&&Ze.collapsed);return le&&Te&&Fe.isCollapsed(W)&&tt.offset>0?p(tt.path,{text:"",start:tt.offset-1,end:tt.offset}):A(()=>R.deleteBackward(t),{at:W})}case"deleteEntireSoftLine":return A(()=>{R.deleteBackward(t,{unit:"line"}),R.deleteForward(t,{unit:"line"})},{at:W});case"deleteHardLineBackward":return A(()=>R.deleteBackward(t,{unit:"block"}),{at:W});case"deleteSoftLineBackward":return A(()=>R.deleteBackward(t,{unit:"line"}),{at:W});case"deleteHardLineForward":return A(()=>R.deleteForward(t,{unit:"block"}),{at:W});case"deleteSoftLineForward":return A(()=>R.deleteForward(t,{unit:"line"}),{at:W});case"deleteWordBackward":return A(()=>R.deleteBackward(t,{unit:"word"}),{at:W});case"deleteWordForward":return A(()=>R.deleteForward(t,{unit:"word"}),{at:W});case"insertLineBreak":return A(()=>R.insertSoftBreak(t),{at:W});case"insertParagraph":return A(()=>R.insertBreak(t),{at:W});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(K7(U))return A(()=>Re.insertData(t,U),{at:W});var _e=U??"";if(kn.get(t)&&(_e=_e.replace("\uFEFF","")),L==="insertText"&&/.*\n.*\n$/.test(_e)&&(_e=_e.slice(0,-1)),_e.includes(`
|
|
108
|
+
`))return A(()=>{var mt=_e.split(`
|
|
109
|
+
`);mt.forEach((ct,bt)=>{ct&&R.insertText(t,ct),bt!==mt.length-1&&R.insertSoftBreak(t)})},{at:W});if(oe.equals(W.anchor.path,W.focus.path)){var[We,st]=Fe.edges(W),rt={start:We.offset,end:st.offset,text:_e};if(_e&&d&&L==="insertCompositionText"){var Qe=d.start+d.text.search(/\S|$/),St=rt.start+rt.text.search(/\S|$/);St===Qe+1&&rt.end===d.start+d.text.length?(rt.start-=1,d=null,V()):d=!1}else L==="insertText"?d===null?d=rt:d&&Fe.isCollapsed(W)&&d.end+d.text.length===We.offset?d=Li(Li({},d),{},{text:d.text+_e}):d=!1:d=!1;if(le){p(We.path,rt);return}}return A(()=>R.insertText(t,_e),{at:W})}}}}},B=()=>!!po.get(t),F=()=>{var G;return!!((G=rn.get(t))!==null&&G!==void 0&&G.length)},N=()=>B()||F(),I=()=>o,P=G=>{mo.set(t,G),c&&(clearTimeout(c),c=null);var{selection:Y}=t;if(G){var L=!Y||!oe.equals(Y.anchor.path,G.anchor.path),W=!Y||!oe.equals(Y.anchor.path.slice(0,-1),G.anchor.path.slice(0,-1));(L&&d||W)&&(d=!1),(L||F())&&(c=setTimeout(g,_7))}},H=()=>{(B()||!F())&&g()},T=G=>{F()||(D(!0),setTimeout(D))},V=()=>{B()||(l=setTimeout(g))},K=G=>{if(!(F()||B())&&G.some(L=>gc(t,L,G))){var Y;(Y=_m.get(t))===null||Y===void 0||Y()}};return{flush:g,scheduleFlush:V,hasPendingDiffs:F,hasPendingAction:B,hasPendingChanges:N,isFlushing:I,handleUserSelect:P,handleCompositionEnd:y,handleCompositionStart:C,handleDOMBeforeInput:O,handleKeyDown:T,handleDomMutations:K,handleInput:H}}function W7(){var e=$t(!1);return Ut(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var si=Qi?j4:Ut;function V7(e,t,r){var[n]=Bt(()=>new MutationObserver(t));si(()=>{n.takeRecords()}),Ut(()=>{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 U7=["node"];function sp(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 X7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sp(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Y7={subtree:!0,childList:!0,characterData:!0},G7=Yr?e=>{var{node:t}=e,r=ca(e,U7);if(!Yr)return null;var n=Eo(),o=W7(),[a]=Bt(()=>q7(X7({editor:n},r)));return V7(t,a.handleDomMutations,Y7),pc.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,Z7=["anchor","focus"],Q7=["anchor","focus"],J7=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),Ym=(e,t)=>{var r=ca(e,Z7),n=ca(t,Q7);return e[da]===t[da]&&J7(r,n)},e9=(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)||!Ym(n,o))return!1}return!0},t9=(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||!Ym(n,o))return!1}return!0};function lp(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 r9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var n9=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=Eo(),c=Re.findPath(a,o),l=oe.parent(c),f=!!r[Hm];return a.isVoid(n)?Le.createElement(gu,{length:Ge.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&R.string(a,l)===""?Le.createElement(gu,{isLineBreak:!0,isMarkPlaceholder:f}):r.text===""?Le.createElement(gu,{isMarkPlaceholder:f}):t&&r.text.slice(-1)===`
|
|
110
|
+
`?Le.createElement(up,{isTrailing:!0,text:r.text}):Le.createElement(up,{text:r.text})},up=e=>{var{text:t,isTrailing:r=!1}=e,n=$t(null),o=()=>"".concat(t??"").concat(r?`
|
|
111
|
+
`:""),[a]=Bt(o);return si(()=>{var c=o();n.current&&n.current.textContent!==c&&(n.current.textContent=c)}),Le.createElement(o9,{ref:n},a)},o9=K4(wo((e,t)=>Le.createElement("span",{"data-slate-string":!0,ref:t},e.children))),gu=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),Le.createElement("span",r9({},o),!(Yr||zm)||!r?"\uFEFF":null,r?Le.createElement("br",null):null)};function cp(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 Gm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cp(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var a9=Yr?300:0;function i9(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function dp(e){e.current&&(clearTimeout(e.current),e.current=null)}var s9=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:c=O=>Le.createElement(u9,Gm({},O))}=e,l=Eo(),f=$t(null),d=$t(null),[m,v]=Bt(!1),g=$t(null),y=xt(O=>{if(i9(f,O==null),O==null){var B;l0.delete(l),(B=t.onPlaceholderResize)===null||B===void 0||B.call(t,null)}else{if(l0.set(l,O),!f.current){var F=window.ResizeObserver||d7;f.current=new F(()=>{var N;(N=t.onPlaceholderResize)===null||N===void 0||N.call(t,O)})}f.current.observe(O),d.current=O}},[d,t,l]),C=Le.createElement(n9,{isLast:r,leaf:t,parent:o,text:n}),D=!!t[da];if(Ut(()=>(D?g.current||(g.current=setTimeout(()=>{v(!0),g.current=null},a9)):(dp(g),v(!1)),()=>dp(g)),[D,v]),D&&m){var p={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:No?"inherit":void 0},contentEditable:!1,ref:y}};C=Le.createElement(Le.Fragment,null,a(p),C)}var A={"data-slate-leaf":!0};return c({attributes:A,children:C,leaf:t,text:n})},l9=Le.memo(s9,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&<.equals(t.leaf,e.leaf)&&t.leaf[da]===e.leaf[da]),u9=e=>{var{attributes:t,children:r}=e;return Le.createElement("span",Gm({},t),r)},c9=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:c}=e,l=Eo(),f=$t(null),d=lt.decorations(c,t),m=Re.findKey(l,c),v=[],g=0;g<d.length;g++){var y=d[g];v.push(Le.createElement(l9,{isLast:r&&g===d.length-1,key:"".concat(m.id,"-").concat(g),renderPlaceholder:o,leaf:y,text:c,parent:n,renderLeaf:a}))}var C=xt(D=>{var p=Js.get(l);D?(p==null||p.set(m,D),Io.set(c,D),ii.set(D,c)):(p==null||p.delete(m),Io.delete(c),f.current&&ii.delete(f.current)),f.current=D},[f,l,m,c]);return Le.createElement("span",{"data-slate-node":"text",ref:C},v)},Zm=Le.memo(c9,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&t9(t.decorations,e.decorations));function fp(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 p0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fp(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var d9=e=>{var{decorations:t,element:r,renderElement:n=O=>Le.createElement(h9,p0({},O)),renderPlaceholder:o,renderLeaf:a,selection:c}=e,l=Eo(),f=g9(),d=l.isInline(r),m=Re.findKey(l,r),v=xt(O=>{var B=Js.get(l);O?(B==null||B.set(m,O),Io.set(r,O),ii.set(O,r)):(B==null||B.delete(m),Io.delete(r))},[l,m,r]),g=Jm({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:c}),y={"data-slate-node":"element",ref:v};if(d&&(y["data-slate-inline"]=!0),!d&&R.hasInlines(l,r)){var C=Ge.string(r),D=Bm(C);D==="rtl"&&(y.dir=D)}if(R.isVoid(l,r)){y["data-slate-void"]=!0,!f&&d&&(y.contentEditable=!1);var p=d?"span":"div",[[A]]=Ge.texts(r);g=Le.createElement(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Le.createElement(Zm,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:A})),fc.set(A,0),hc.set(A,r)}return n({attributes:y,children:g,element:r})},f9=Le.memo(d9,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e9(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Fe.equals(e.selection,t.selection))),h9=e=>{var{attributes:t,children:r,element:n}=e,o=Eo(),a=o.isInline(n)?"span":"div";return Le.createElement(a,p0(p0({},t),{},{style:{position:"relative"}}),r)},Qm=to(()=>[]),p9=()=>Do(Qm),m9=to(!1),Jm=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:c}=e,l=p9(),f=Eo();sa.set(f,!1);for(var d=Re.findPath(f,r),m=[],v=ft.isElement(r)&&!f.isInline(r)&&R.hasInlines(f,r),g=0;g<r.children.length;g++){var y=d.concat(g),C=r.children[g],D=Re.findKey(f,C),p=R.range(f,y),A=c&&Fe.intersection(p,c),O=l([C,y]);for(var B of t){var F=Fe.intersection(B,p);F&&O.push(F)}ft.isElement(C)?m.push(Le.createElement(m9.Provider,{key:"provider-".concat(D.id),value:!!A},Le.createElement(f9,{decorations:O,element:C,key:D.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:A}))):m.push(Le.createElement(Zm,{decorations:O,key:D.id,isLast:v&&g===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:C})),fc.set(C,g),hc.set(C,r)}return m},eg=to(!1),g9=()=>Do(eg),tg=to(null),rg=()=>{var e=Do(tg);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function v9(){var e=Eo(),t=$t(!1),r=$t(0),n=xt(()=>{if(!t.current){t.current=!0;var o=Re.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Ut(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var b9=3,y9={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"},x9={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"},C9={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},br=e=>{var t=y9[e],r=x9[e],n=C9[e],o=t&&hu.isHotkey(t),a=r&&hu.isHotkey(r),c=n&&hu.isHotkey(n);return l=>!!(o&&o(l)||rp&&a&&a(l)||!rp&&c&&c(l))},Cr={isBold:br("bold"),isCompose:br("compose"),isMoveBackward:br("moveBackward"),isMoveForward:br("moveForward"),isDeleteBackward:br("deleteBackward"),isDeleteForward:br("deleteForward"),isDeleteLineBackward:br("deleteLineBackward"),isDeleteLineForward:br("deleteLineForward"),isDeleteWordBackward:br("deleteWordBackward"),isDeleteWordForward:br("deleteWordForward"),isExtendBackward:br("extendBackward"),isExtendForward:br("extendForward"),isExtendLineBackward:br("extendLineBackward"),isExtendLineForward:br("extendLineForward"),isItalic:br("italic"),isMoveLineBackward:br("moveLineBackward"),isMoveLineForward:br("moveLineForward"),isMoveWordBackward:br("moveWordBackward"),isMoveWordForward:br("moveWordForward"),isRedo:br("redo"),isSoftBreak:br("insertSoftBreak"),isSplitBlock:br("splitBlock"),isTransposeCharacter:br("transposeCharacter"),isUndo:br("undo")},w9=(e,t)=>{var r=[],n=()=>{r=[]},o=c=>{if(t.current){var l=c.filter(f=>gc(e,f,c));r.push(...l)}};function a(){r.length>0&&(r.reverse().forEach(c=>{c.type!=="characterData"&&(c.removedNodes.forEach(l=>{c.target.insertBefore(l,c.nextSibling)}),c.addedNodes.forEach(l=>{c.target.removeChild(l)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},D9={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class ng extends H4{constructor(){super(...arguments),bn(this,"context",null),bn(this,"manager",null),bn(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,D9)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=w9(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}bn(ng,"contextType",dc);var E9=Yr?ng:e=>{var{children:t}=e;return Le.createElement(Le.Fragment,null,t)},k9=to(!1),S9=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],B9=["text"];function hp(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 Pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hp(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var A9=e=>Le.createElement(Le.Fragment,null,Jm(e)),vu=wo((e,t)=>{var r=xt(Q=>Le.createElement(F9,Pn({},Q)),[]),{autoFocus:n,decorate:o=O9,onDOMBeforeInput:a,placeholder:c,readOnly:l=!1,renderElement:f,renderLeaf:d,renderPlaceholder:m=r,scrollSelectionIntoView:v=N9,style:g={},as:y="div",disableDefaultStyles:C=!1}=e,D=ca(e,S9),p=rg(),[A,O]=Bt(!1),B=$t(null),F=$t([]),[N,I]=Bt(),P=$t(!1),{onUserInput:H,receivedUserInput:T}=v9(),[,V]=_4(Q=>Q+1,0);_m.set(p,V),u0.set(p,l);var K=wt(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Ut(()=>{B.current&&n&&B.current.focus()},[n]);var G=$t(),Y=wt(()=>_x(()=>{if(sa.get(p)){Y();return}var Q=Re.toDOMNode(p,p),fe=Q.getRootNode();if(!P.current&&No&&fe instanceof ShadowRoot){P.current=!0;var se=O7();se?document.execCommand("indent"):Ke.deselect(p),P.current=!1;return}var ae=G.current;if((Yr||!Re.isComposing(p))&&(!K.isUpdatingSelection||ae!=null&&ae.isFlushing())&&!K.isDraggingInternally){var ge=Re.findDocumentOrShadowRoot(p),{activeElement:be}=ge,Ce=Re.toDOMNode(p,p),ke=Xa(ge);if(be===Ce?(K.latestElement=be,vo.set(p,!0)):vo.delete(p),!ke)return Ke.deselect(p);var{anchorNode:Ee,focusNode:Be}=ke,Ne=Re.hasEditableTarget(p,Ee)||Re.isTargetInsideNonReadonlyVoid(p,Ee),Me=Re.hasTarget(p,Be);if(Ne&&Me){var He=Re.toSlateRange(p,ke,{exactMatch:!1,suppressThrow:!0});He&&(!Re.isComposing(p)&&!(ae!=null&&ae.hasPendingChanges())&&!(ae!=null&&ae.isFlushing())?Ke.select(p,He):ae==null||ae.handleUserSelect(He))}l&&(!Ne||!Me)&&Ke.deselect(p)}},100),[p,l,K]),L=wt(()=>zx(Y,0),[Y]);G.current=G7({node:B,onDOMSelectionChange:Y,scheduleOnDOMSelectionChange:L}),si(()=>{var Q,fe,se;B.current&&(se=mc(B.current))?(jm.set(p,se),Ji.set(p,B.current),Io.set(p,B.current),ii.set(B.current,p)):Io.delete(p);var{selection:ae}=p,ge=Re.findDocumentOrShadowRoot(p),be=Xa(ge);if(!(!be||!Re.isFocused(p)||(Q=G.current)!==null&&Q!==void 0&&Q.hasPendingAction())){var Ce=Ne=>{var Me=be.type!=="None";if(!(!ae&&!Me)){var He=be.focusNode,Ze;if(ra&&be.rangeCount>1){var tt=be.getRangeAt(0),Te=be.getRangeAt(be.rangeCount-1);tt.startContainer===He?Ze=Te.endContainer:Ze=tt.startContainer}else Ze=be.anchorNode;var _e=Ji.get(p),We=!1;if(_e.contains(Ze)&&_e.contains(He)&&(We=!0),Me&&We&&ae&&!Ne){var st=Re.toSlateRange(p,be,{exactMatch:!0,suppressThrow:!0});if(st&&Fe.equals(st,ae)){var rt;if(!K.hasMarkPlaceholder||(rt=Ze)!==null&&rt!==void 0&&(rt=rt.parentElement)!==null&&rt!==void 0&&rt.hasAttribute("data-slate-mark-placeholder"))return}}if(ae&&!Re.hasRange(p,ae)){p.selection=Re.toSlateRange(p,be,{exactMatch:!1,suppressThrow:!0});return}K.isUpdatingSelection=!0;var Qe=ae&&Re.toDOMRange(p,ae);return Qe?(Re.isComposing(p)&&!Yr?be.collapseToEnd():Fe.isBackward(ae)?be.setBaseAndExtent(Qe.endContainer,Qe.endOffset,Qe.startContainer,Qe.startOffset):be.setBaseAndExtent(Qe.startContainer,Qe.startOffset,Qe.endContainer,Qe.endOffset),v(p,Qe)):be.removeAllRanges(),Qe}};be.rangeCount<=1&&Ce();var ke=((fe=G.current)===null||fe===void 0?void 0:fe.isFlushing())==="action";if(!Yr||!ke){setTimeout(()=>{K.isUpdatingSelection=!1});return}var Ee=null,Be=requestAnimationFrame(()=>{if(ke){var Ne=Me=>{try{var He=Re.toDOMNode(p,p);He.focus(),Ce(Me)}catch{}};Ne(),Ee=setTimeout(()=>{Ne(!0),K.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Be),Ee&&clearTimeout(Ee)}}});var W=xt(Q=>{var fe=Re.toDOMNode(p,p),se=fe.getRootNode();if(P!=null&&P.current&&No&&se instanceof ShadowRoot){var ae=Q.getTargetRanges(),ge=ae[0],be=new window.Range;be.setStart(ge.startContainer,ge.startOffset),be.setEnd(ge.endContainer,ge.endOffset);var Ce=Re.toSlateRange(p,be,{exactMatch:!1,suppressThrow:!1});Ke.select(p,Ce),Q.preventDefault(),Q.stopImmediatePropagation();return}if(H(),!l&&Re.hasEditableTarget(p,Q.target)&&!$9(Q,a)){var ke;if(G.current)return G.current.handleDOMBeforeInput(Q);L.flush(),Y.flush();var{selection:Ee}=p,{inputType:Be}=Q,Ne=Q.dataTransfer||Q.data||void 0,Me=Be==="insertCompositionText"||Be==="deleteCompositionText";if(Me&&Re.isComposing(p))return;var He=!1;if(Be==="insertText"&&Ee&&Fe.isCollapsed(Ee)&&Q.data&&Q.data.length===1&&/[a-z ]/i.test(Q.data)&&Ee.anchor.offset!==0&&(He=!0,p.marks&&(He=!1),!sa.get(p))){var Ze,tt,{anchor:Te}=Ee,[_e,We]=Re.toDOMPoint(p,Te),st=(Ze=_e.parentElement)===null||Ze===void 0?void 0:Ze.closest("a"),rt=Re.getWindow(p);if(He&&st&&Re.hasDOMNode(p,st)){var Qe,St=rt==null?void 0:rt.document.createTreeWalker(st,NodeFilter.SHOW_TEXT).lastChild();St===_e&&((Qe=St.textContent)===null||Qe===void 0?void 0:Qe.length)===We&&(He=!1)}if(He&&_e.parentElement&&(rt==null||(tt=rt.getComputedStyle(_e.parentElement))===null||tt===void 0?void 0:tt.whiteSpace)==="pre"){var mt=R.above(p,{at:Te.path,match:pt=>ft.isElement(pt)&&R.isBlock(p,pt)});mt&&Ge.string(mt[0]).includes(" ")&&(He=!1)}}if((!Be.startsWith("delete")||Be.startsWith("deleteBy"))&&!sa.get(p)){var[ct]=Q.getTargetRanges();if(ct){var bt=Re.toSlateRange(p,ct,{exactMatch:!1,suppressThrow:!1});if(!Ee||!Fe.equals(Ee,bt)){He=!1;var Ie=!Me&&p.selection&&R.rangeRef(p,p.selection);Ke.select(p,bt),Ie&&Ua.set(p,Ie)}}}if(Me)return;if(He||Q.preventDefault(),Ee&&Fe.isExpanded(Ee)&&Be.startsWith("delete")){var ue=Be.endsWith("Backward")?"backward":"forward";R.deleteFragment(p,{direction:ue});return}switch(Be){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{R.deleteFragment(p);break}case"deleteContent":case"deleteContentForward":{R.deleteForward(p);break}case"deleteContentBackward":{R.deleteBackward(p);break}case"deleteEntireSoftLine":{R.deleteBackward(p,{unit:"line"}),R.deleteForward(p,{unit:"line"});break}case"deleteHardLineBackward":{R.deleteBackward(p,{unit:"block"});break}case"deleteSoftLineBackward":{R.deleteBackward(p,{unit:"line"});break}case"deleteHardLineForward":{R.deleteForward(p,{unit:"block"});break}case"deleteSoftLineForward":{R.deleteForward(p,{unit:"line"});break}case"deleteWordBackward":{R.deleteBackward(p,{unit:"word"});break}case"deleteWordForward":{R.deleteForward(p,{unit:"word"});break}case"insertLineBreak":R.insertSoftBreak(p);break;case"insertParagraph":{R.insertBreak(p);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Be==="insertFromComposition"&&Re.isComposing(p)&&(O(!1),$o.set(p,!1)),(Ne==null?void 0:Ne.constructor.name)==="DataTransfer"?Re.insertData(p,Ne):typeof Ne=="string"&&(He?F.current.push(()=>R.insertText(p,Ne)):R.insertText(p,Ne));break}}var nt=(ke=Ua.get(p))===null||ke===void 0?void 0:ke.unref();Ua.delete(p),nt&&(!p.selection||!Fe.equals(p.selection,nt))&&Ke.select(p,nt)}},[p,Y,H,a,l,L]),U=xt(Q=>{Q==null?(Y.cancel(),L.cancel(),Ji.delete(p),Io.delete(p),B.current&&uo&&B.current.removeEventListener("beforeinput",W)):uo&&Q.addEventListener("beforeinput",W),B.current=Q,typeof t=="function"?t(Q):t&&(t.current=Q)},[Y,L,p,W,t]);si(()=>{var Q=Re.getWindow(p);Q.document.addEventListener("selectionchange",L);var fe=()=>{K.isDraggingInternally=!1};return Q.document.addEventListener("dragend",fe),Q.document.addEventListener("drop",fe),()=>{Q.document.removeEventListener("selectionchange",L),Q.document.removeEventListener("dragend",fe),Q.document.removeEventListener("drop",fe)}},[L,K]);var X=o([p,[]]),te=c&&p.children.length===1&&Array.from(Ge.texts(p)).length===1&&Ge.string(p)===""&&!A,z=xt(Q=>{if(Q&&te){var fe;I((fe=Q.getBoundingClientRect())===null||fe===void 0?void 0:fe.height)}else I(void 0)},[te]);if(te){var le=R.start(p,[]);X.push({[da]:!0,placeholder:c,onPlaceholderResize:z,anchor:le,focus:le})}var{marks:ce}=p;if(K.hasMarkPlaceholder=!1,p.selection&&Fe.isCollapsed(p.selection)&&ce){var{anchor:he}=p.selection,ne=Ge.leaf(p,he.path),pe=ca(ne,B9);if(!lt.equals(ne,ce,{loose:!0})){K.hasMarkPlaceholder=!0;var Oe=Object.fromEntries(Object.keys(pe).map(Q=>[Q,null]));X.push(Pn(Pn(Pn({[Hm]:!0},Oe),ce),{},{anchor:he,focus:he}))}}return Ut(()=>{setTimeout(()=>{var{selection:Q}=p;if(Q){var{anchor:fe}=Q,se=Ge.leaf(p,fe.path);if(ce&&!lt.equals(se,ce,{loose:!0})){kn.set(p,ce);return}}kn.delete(p)})}),Le.createElement(eg.Provider,{value:l},Le.createElement(k9.Provider,{value:A},Le.createElement(Qm.Provider,{value:o},Le.createElement(E9,{node:B,receivedUserInput:T},Le.createElement(y,Pn(Pn({role:l?void 0:"textbox","aria-multiline":l?void 0:!0},D),{},{spellCheck:uo||!Qi?D.spellCheck:!1,autoCorrect:uo||!Qi?D.autoCorrect:"false",autoCapitalize:uo||!Qi?D.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!l,zindex:-1,suppressContentEditableWarning:!0,ref:U,style:Pn(Pn({},C?{}:Pn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},N?{minHeight:N}:{})),g),onBeforeInput:xt(Q=>{if(!uo&&!l&&!Xr(Q,D.onBeforeInput)&&Re.hasSelectableTarget(p,Q.target)&&(Q.preventDefault(),!Re.isComposing(p))){var fe=Q.data;R.insertText(p,fe)}},[D.onBeforeInput,p,l]),onInput:xt(Q=>{if(!Xr(Q,D.onInput)){if(G.current){G.current.handleInput();return}for(var fe of F.current)fe();if(F.current=[],!Re.isFocused(p)){var se=Q.nativeEvent,ae=p;if(se.inputType==="historyUndo"&&typeof ae.undo=="function"){ae.undo();return}if(se.inputType==="historyRedo"&&typeof ae.redo=="function"){ae.redo();return}}}},[D.onInput,p]),onBlur:xt(Q=>{if(!(l||K.isUpdatingSelection||!Re.hasSelectableTarget(p,Q.target)||Xr(Q,D.onBlur))){var fe=Re.findDocumentOrShadowRoot(p);if(K.latestElement!==fe.activeElement){var{relatedTarget:se}=Q,ae=Re.toDOMNode(p,p);if(se!==ae&&!(gn(se)&&se.hasAttribute("data-slate-spacer"))){if(se!=null&&Co(se)&&Re.hasDOMNode(p,se)){var ge=Re.toSlateNode(p,se);if(ft.isElement(ge)&&!p.isVoid(ge))return}if(No){var be=Xa(fe);be==null||be.removeAllRanges()}vo.delete(p)}}}},[l,K.isUpdatingSelection,K.latestElement,p,D.onBlur]),onClick:xt(Q=>{if(Re.hasTarget(p,Q.target)&&!Xr(Q,D.onClick)&&Co(Q.target)){var fe=Re.toSlateNode(p,Q.target),se=Re.findPath(p,fe);if(!R.hasPath(p,se)||Ge.get(p,se)!==fe)return;if(Q.detail===b9&&se.length>=1){var ae=se;if(!(ft.isElement(fe)&&R.isBlock(p,fe))){var ge,be=R.above(p,{match:He=>ft.isElement(He)&&R.isBlock(p,He),at:se});ae=(ge=be==null?void 0:be[1])!==null&&ge!==void 0?ge:se.slice(0,1)}var Ce=R.range(p,ae);Ke.select(p,Ce);return}if(l)return;var ke=R.start(p,se),Ee=R.end(p,se),Be=R.void(p,{at:ke}),Ne=R.void(p,{at:Ee});if(Be&&Ne&&oe.equals(Be[1],Ne[1])){var Me=R.range(p,ke);Ke.select(p,Me)}}},[p,D.onClick,l]),onCompositionEnd:xt(Q=>{if(Re.hasSelectableTarget(p,Q.target)){var fe;if(Re.isComposing(p)&&Promise.resolve().then(()=>{O(!1),$o.set(p,!1)}),(fe=G.current)===null||fe===void 0||fe.handleCompositionEnd(Q),Xr(Q,D.onCompositionEnd)||Yr)return;if(!No&&!y7&&!zm&&!C7&&!x7&&Q.data){var se=kn.get(p);kn.delete(p),se!==void 0&&(Gn.set(p,p.marks),p.marks=se),R.insertText(p,Q.data);var ae=Gn.get(p);Gn.delete(p),ae!==void 0&&(p.marks=ae)}}},[D.onCompositionEnd,p]),onCompositionUpdate:xt(Q=>{Re.hasSelectableTarget(p,Q.target)&&!Xr(Q,D.onCompositionUpdate)&&(Re.isComposing(p)||(O(!0),$o.set(p,!0)))},[D.onCompositionUpdate,p]),onCompositionStart:xt(Q=>{if(Re.hasSelectableTarget(p,Q.target)){var fe;if((fe=G.current)===null||fe===void 0||fe.handleCompositionStart(Q),Xr(Q,D.onCompositionStart)||Yr)return;O(!0);var{selection:se}=p;if(se&&Fe.isExpanded(se)){R.deleteFragment(p);return}}},[D.onCompositionStart,p]),onCopy:xt(Q=>{Re.hasSelectableTarget(p,Q.target)&&!Xr(Q,D.onCopy)&&!pp(Q)&&(Q.preventDefault(),Re.setFragmentData(p,Q.clipboardData,"copy"))},[D.onCopy,p]),onCut:xt(Q=>{if(!l&&Re.hasSelectableTarget(p,Q.target)&&!Xr(Q,D.onCut)&&!pp(Q)){Q.preventDefault(),Re.setFragmentData(p,Q.clipboardData,"cut");var{selection:fe}=p;if(fe)if(Fe.isExpanded(fe))R.deleteFragment(p);else{var se=Ge.parent(p,fe.anchor.path);R.isVoid(p,se)&&Ke.delete(p)}}},[l,p,D.onCut]),onDragOver:xt(Q=>{if(Re.hasTarget(p,Q.target)&&!Xr(Q,D.onDragOver)){var fe=Re.toSlateNode(p,Q.target);ft.isElement(fe)&&R.isVoid(p,fe)&&Q.preventDefault()}},[D.onDragOver,p]),onDragStart:xt(Q=>{if(!l&&Re.hasTarget(p,Q.target)&&!Xr(Q,D.onDragStart)){var fe=Re.toSlateNode(p,Q.target),se=Re.findPath(p,fe),ae=ft.isElement(fe)&&R.isVoid(p,fe)||R.void(p,{at:se,voids:!0});if(ae){var ge=R.range(p,se);Ke.select(p,ge)}K.isDraggingInternally=!0,Re.setFragmentData(p,Q.dataTransfer,"drag")}},[l,p,D.onDragStart,K]),onDrop:xt(Q=>{if(!l&&Re.hasTarget(p,Q.target)&&!Xr(Q,D.onDrop)){Q.preventDefault();var fe=p.selection,se=Re.findEventRange(p,Q),ae=Q.dataTransfer;Ke.select(p,se),K.isDraggingInternally&&fe&&!Fe.equals(fe,se)&&!R.void(p,{at:se,voids:!0})&&Ke.delete(p,{at:fe}),Re.insertData(p,ae),Re.isFocused(p)||Re.focus(p)}},[l,p,D.onDrop,K]),onDragEnd:xt(Q=>{!l&&K.isDraggingInternally&&D.onDragEnd&&Re.hasTarget(p,Q.target)&&D.onDragEnd(Q)},[l,K,D,p]),onFocus:xt(Q=>{if(!l&&!K.isUpdatingSelection&&Re.hasEditableTarget(p,Q.target)&&!Xr(Q,D.onFocus)){var fe=Re.toDOMNode(p,p),se=Re.findDocumentOrShadowRoot(p);if(K.latestElement=se.activeElement,ra&&Q.target!==fe){fe.focus();return}vo.set(p,!0)}},[l,K,p,D.onFocus]),onKeyDown:xt(Q=>{if(!l&&Re.hasEditableTarget(p,Q.target)){var fe;(fe=G.current)===null||fe===void 0||fe.handleKeyDown(Q);var{nativeEvent:se}=Q;if(Re.isComposing(p)&&se.isComposing===!1&&($o.set(p,!1),O(!1)),Xr(Q,D.onKeyDown)||Re.isComposing(p))return;var{selection:ae}=p,ge=p.children[ae!==null?ae.focus.path[0]:0],be=Bm(Ge.string(ge))==="rtl";if(Cr.isRedo(se)){Q.preventDefault();var Ce=p;typeof Ce.redo=="function"&&Ce.redo();return}if(Cr.isUndo(se)){Q.preventDefault();var ke=p;typeof ke.undo=="function"&&ke.undo();return}if(Cr.isMoveLineBackward(se)){Q.preventDefault(),Ke.move(p,{unit:"line",reverse:!0});return}if(Cr.isMoveLineForward(se)){Q.preventDefault(),Ke.move(p,{unit:"line"});return}if(Cr.isExtendLineBackward(se)){Q.preventDefault(),Ke.move(p,{unit:"line",edge:"focus",reverse:!0});return}if(Cr.isExtendLineForward(se)){Q.preventDefault(),Ke.move(p,{unit:"line",edge:"focus"});return}if(Cr.isMoveBackward(se)){Q.preventDefault(),ae&&Fe.isCollapsed(ae)?Ke.move(p,{reverse:!be}):Ke.collapse(p,{edge:be?"end":"start"});return}if(Cr.isMoveForward(se)){Q.preventDefault(),ae&&Fe.isCollapsed(ae)?Ke.move(p,{reverse:be}):Ke.collapse(p,{edge:be?"start":"end"});return}if(Cr.isMoveWordBackward(se)){Q.preventDefault(),ae&&Fe.isExpanded(ae)&&Ke.collapse(p,{edge:"focus"}),Ke.move(p,{unit:"word",reverse:!be});return}if(Cr.isMoveWordForward(se)){Q.preventDefault(),ae&&Fe.isExpanded(ae)&&Ke.collapse(p,{edge:"focus"}),Ke.move(p,{unit:"word",reverse:be});return}if(uo){if((Lm||No)&&ae&&(Cr.isDeleteBackward(se)||Cr.isDeleteForward(se))&&Fe.isCollapsed(ae)){var Ee=Ge.parent(p,ae.anchor.path);if(ft.isElement(Ee)&&R.isVoid(p,Ee)&&(R.isInline(p,Ee)||R.isBlock(p,Ee))){Q.preventDefault(),R.deleteBackward(p,{unit:"block"});return}}}else{if(Cr.isBold(se)||Cr.isItalic(se)||Cr.isTransposeCharacter(se)){Q.preventDefault();return}if(Cr.isSoftBreak(se)){Q.preventDefault(),R.insertSoftBreak(p);return}if(Cr.isSplitBlock(se)){Q.preventDefault(),R.insertBreak(p);return}if(Cr.isDeleteBackward(se)){Q.preventDefault(),ae&&Fe.isExpanded(ae)?R.deleteFragment(p,{direction:"backward"}):R.deleteBackward(p);return}if(Cr.isDeleteForward(se)){Q.preventDefault(),ae&&Fe.isExpanded(ae)?R.deleteFragment(p,{direction:"forward"}):R.deleteForward(p);return}if(Cr.isDeleteLineBackward(se)){Q.preventDefault(),ae&&Fe.isExpanded(ae)?R.deleteFragment(p,{direction:"backward"}):R.deleteBackward(p,{unit:"line"});return}if(Cr.isDeleteLineForward(se)){Q.preventDefault(),ae&&Fe.isExpanded(ae)?R.deleteFragment(p,{direction:"forward"}):R.deleteForward(p,{unit:"line"});return}if(Cr.isDeleteWordBackward(se)){Q.preventDefault(),ae&&Fe.isExpanded(ae)?R.deleteFragment(p,{direction:"backward"}):R.deleteBackward(p,{unit:"word"});return}if(Cr.isDeleteWordForward(se)){Q.preventDefault(),ae&&Fe.isExpanded(ae)?R.deleteFragment(p,{direction:"forward"}):R.deleteForward(p,{unit:"word"});return}}}},[l,p,D.onKeyDown]),onPaste:xt(Q=>{!l&&Re.hasEditableTarget(p,Q.target)&&!Xr(Q,D.onPaste)&&(!uo||E7(Q.nativeEvent)||No)&&(Q.preventDefault(),Re.insertData(p,Q.clipboardData))},[l,p,D.onPaste])}),Le.createElement(A9,{decorations:X,node:p,renderElement:f,renderPlaceholder:m,renderLeaf:d,selection:p.selection}))))))}),F9=e=>{var{attributes:t,children:r}=e;return Le.createElement("span",Pn({},t),r,Yr&&Le.createElement("br",null))},O9=()=>[],N9=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Fe.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),qx(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},Xr=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},pp=e=>Co(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),$9=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},T9=to(!1),M9=to({});function R9(e){var t=$t([]).current,r=$t({editor:e}).current,n=xt(a=>{r.editor=a,t.forEach(c=>c(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 I9=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],bu=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:c}=e,l=ca(e,I9),[f,d]=Le.useState(()=>{if(!Ge.isNodeList(c))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Rr.stringify(c)));if(!R.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Rr.stringify(t)));return t.children=c,Object.assign(t,l),{v:0,editor:t}}),{selectorContext:m,onChange:v}=R9(t),g=xt(D=>{var p;switch(n&&n(t.children),D==null||(p=D.operation)===null||p===void 0?void 0:p.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}d(A=>({v:A.v+1,editor:t})),v(t)},[t,v,n,o,a]);Ut(()=>(c0.set(t,g),()=>{c0.set(t,()=>{})}),[t,g]);var[y,C]=Bt(Re.isFocused(t));return Ut(()=>{C(Re.isFocused(t))},[t]),si(()=>{var D=()=>C(Re.isFocused(t));return Pm>=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)})},[]),Le.createElement(M9.Provider,{value:m},Le.createElement(tg.Provider,{value:f},Le.createElement(dc.Provider,{value:f.editor},Le.createElement(T9.Provider,{value:y},r))))},mp=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},gp=(e,t,r)=>{var n=Re.toDOMRange(e,t).getBoundingClientRect(),o=Re.toDOMRange(e,r).getBoundingClientRect();return mp(n,o)&&mp(o,n)},P9=(e,t)=>{var r=R.range(e,Fe.end(t)),n=Array.from(R.positions(e,{at:t})),o=0,a=n.length,c=Math.floor(a/2);if(gp(e,R.range(e,n[o]),r))return R.range(e,n[o],r);if(n.length<2)return R.range(e,n[n.length-1],r);for(;c!==n.length&&c!==o;)gp(e,R.range(e,n[c]),r)?a=c:o=c,c=Math.floor((o+a)/2);return R.range(e,n[a],r)};function vp(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 bp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vp(Object(r),!0).forEach(function(n){bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var z9=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:c,removeMark:l}=r;return Js.set(r,new WeakMap),r.addMark=(f,d)=>{var m,v;(m=pc.get(r))===null||m===void 0||m(),!kn.get(r)&&(v=rn.get(r))!==null&&v!==void 0&&v.length&&kn.set(r,null),Gn.delete(r),c(f,d)},r.removeMark=f=>{var d;!kn.get(r)&&(d=rn.get(r))!==null&&d!==void 0&&d.length&&kn.set(r,null),Gn.delete(r),l(f)},r.deleteBackward=f=>{if(f!=="line")return a(f);if(r.selection&&Fe.isCollapsed(r.selection)){var d=R.above(r,{match:y=>ft.isElement(y)&&R.isBlock(r,y),at:r.selection});if(d){var[,m]=d,v=R.range(r,m,r.selection.anchor),g=P9(r,v);Fe.isCollapsed(g)||Ke.delete(r,{at:g})}}},r.apply=f=>{var d=[],m=[],v=rn.get(r);if(v!=null&&v.length){var g=v.map(Y=>L7(Y,f)).filter(Boolean);rn.set(r,g)}var y=mo.get(r);y&&mo.set(r,ap(r,y,f));var C=po.get(r);if(C!=null&&C.at){var D=zt.isPoint(C==null?void 0:C.at)?h0(r,C.at,f):ap(r,C.at,f);po.set(r,D?bp(bp({},C),{},{at:D}):null)}switch(f.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{d.push(...Zo(r,f.path));break}case"set_selection":{var p;(p=Ua.get(r))===null||p===void 0||p.unref(),Ua.delete(r);break}case"insert_node":case"remove_node":{d.push(...Zo(r,oe.parent(f.path)));break}case"merge_node":{var A=oe.previous(f.path);d.push(...Zo(r,A));break}case"move_node":{var O=oe.common(oe.parent(f.path),oe.parent(f.newPath));d.push(...Zo(r,O));var B;oe.isBefore(f.path,f.newPath)?(d.push(...Zo(r,oe.parent(f.path))),B=f.newPath):(d.push(...Zo(r,oe.parent(f.newPath))),B=f.path);var F=Ge.get(e,oe.parent(B)),N=Re.findKey(r,F),I=R.pathRef(r,oe.parent(B));m.push([I,N]);break}}switch(n(f),f.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":sa.set(r,!0)}for(var[P,H]of d){var[T]=R.node(r,P);As.set(T,H)}for(var[V,K]of m){if(V.current){var[G]=R.node(r,V.current);As.set(G,K)}V.unref()}},r.setFragmentData=f=>{var{selection:d}=r;if(d){var[m,v]=Fe.edges(d),g=R.void(r,{at:m.path}),y=R.void(r,{at:v.path});if(!(Fe.isCollapsed(d)&&!g)){var C=Re.toDOMRange(r,d),D=C.cloneContents(),p=D.childNodes[0];if(D.childNodes.forEach(T=>{T.textContent&&T.textContent.trim()!==""&&(p=T)}),y){var[A]=y,O=C.cloneRange(),B=Re.toDOMNode(r,A);O.setEndAfter(B),D=O.cloneContents()}if(g&&(p=D.querySelector("[data-slate-spacer]")),Array.from(D.querySelectorAll("[data-slate-zero-width]")).forEach(T=>{var V=T.getAttribute("data-slate-zero-width")==="n";T.textContent=V?`
|
|
112
|
+
`:""}),qm(p)){var F=p.ownerDocument.createElement("span");F.style.whiteSpace="pre",F.appendChild(p),D.appendChild(F),p=F}var N=r.getFragment(),I=JSON.stringify(N),P=window.btoa(encodeURIComponent(I));p.setAttribute("data-slate-fragment",P),f.setData("application/".concat(t),P);var H=D.ownerDocument.createElement("div");return H.appendChild(D),H.setAttribute("hidden","true"),D.ownerDocument.body.appendChild(H),f.setData("text/html",H.innerHTML),f.setData("text/plain",Vm(H)),D.ownerDocument.body.removeChild(H),f}}},r.insertData=f=>{r.insertFragmentData(f)||r.insertTextData(f)},r.insertFragmentData=f=>{var d=f.getData("application/".concat(t))||F7(f);if(d){var m=decodeURIComponent(window.atob(d)),v=JSON.parse(m);return r.insertFragment(v),!0}return!1},r.insertTextData=f=>{var d=f.getData("text/plain");if(d){var m=d.split(/\r\n|\r|\n/),v=!1;for(var g of m)v&&Ke.splitNodes(r,{always:!0}),r.insertText(g),v=!0;return!0}return!1},r.onChange=f=>{var d=Pm<18?Tu.unstable_batchedUpdates:m=>m();d(()=>{var m=c0.get(r);m&&m(f),o(f)})},r},Zo=(e,t)=>{var r=[];for(var[n,o]of R.levels(e,{at:t})){var a=Re.findKey(e,n);r.push([o,a])}return r};function vc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Wo=vc();function og(e){Wo=e}var Ya={exec:()=>null};function tr(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(Gr.caret,"$1"),r=r.replace(o,c),n},getRegex:()=>new RegExp(r,t)};return n}var Gr={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")},L9=/^(?:[ \t]*(?:\n|$))+/,j9=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_9=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,H9=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bc=/(?:[*+-]|\d{1,9}[.)])/,ag=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ig=tr(ag).replace(/bull/g,bc).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(),K9=tr(ag).replace(/bull/g,bc).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(),yc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,q9=/^[^\n]+/,xc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,W9=tr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",xc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),V9=tr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bc).getRegex(),el="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",Cc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,U9=tr("^ {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",Cc).replace("tag",el).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sg=tr(yc).replace("hr",vi).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",el).getRegex(),X9=tr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sg).getRegex(),wc={blockquote:X9,code:j9,def:W9,fences:_9,heading:H9,hr:vi,html:U9,lheading:ig,list:V9,newline:L9,paragraph:sg,table:Ya,text:q9},yp=tr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vi).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",el).getRegex(),Y9={...wc,lheading:K9,table:yp,paragraph:tr(yc).replace("hr",vi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yp).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",el).getRegex()},G9={...wc,html:tr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cc).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:Ya,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:tr(yc).replace("hr",vi).replace("heading",` *#{1,6} *[^
|
|
113
|
+
]`).replace("lheading",ig).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Z9=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Q9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,lg=/^( {2,}|\\)\n(?!\s*$)/,J9=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tl=/[\p{P}\p{S}]/u,Dc=/[\s\p{P}\p{S}]/u,ug=/[^\s\p{P}\p{S}]/u,eC=tr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Dc).getRegex(),cg=/(?!~)[\p{P}\p{S}]/u,tC=/(?!~)[\s\p{P}\p{S}]/u,rC=/(?:[^\s\p{P}\p{S}]|~)/u,nC=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,dg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,oC=tr(dg,"u").replace(/punct/g,tl).getRegex(),aC=tr(dg,"u").replace(/punct/g,cg).getRegex(),fg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",iC=tr(fg,"gu").replace(/notPunctSpace/g,ug).replace(/punctSpace/g,Dc).replace(/punct/g,tl).getRegex(),sC=tr(fg,"gu").replace(/notPunctSpace/g,rC).replace(/punctSpace/g,tC).replace(/punct/g,cg).getRegex(),lC=tr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ug).replace(/punctSpace/g,Dc).replace(/punct/g,tl).getRegex(),uC=tr(/\\(punct)/,"gu").replace(/punct/g,tl).getRegex(),cC=tr(/^<(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(),dC=tr(Cc).replace("(?:-->|$)","-->").getRegex(),fC=tr("^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",dC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Fs=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,hC=tr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Fs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hg=tr(/^!?\[(label)\]\[(ref)\]/).replace("label",Fs).replace("ref",xc).getRegex(),pg=tr(/^!?\[(ref)\](?:\[\])?/).replace("ref",xc).getRegex(),pC=tr("reflink|nolink(?!\\()","g").replace("reflink",hg).replace("nolink",pg).getRegex(),Ec={_backpedal:Ya,anyPunctuation:uC,autolink:cC,blockSkip:nC,br:lg,code:Q9,del:Ya,emStrongLDelim:oC,emStrongRDelimAst:iC,emStrongRDelimUnd:lC,escape:Z9,link:hC,nolink:pg,punctuation:eC,reflink:hg,reflinkSearch:pC,tag:fC,text:J9,url:Ya},mC={...Ec,link:tr(/^!?\[(label)\]\((.*?)\)/).replace("label",Fs).getRegex(),reflink:tr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Fs).getRegex()},m0={...Ec,emStrongRDelimAst:sC,emStrongLDelim:aC,url:tr(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},gC={...m0,br:tr(lg).replace("{2,}","*").getRegex(),text:tr(m0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ji={normal:wc,gfm:Y9,pedantic:G9},Pa={normal:Ec,gfm:m0,breaks:gC,pedantic:mC},vC={"&":"&","<":"<",">":">",'"':""","'":"'"},xp=e=>vC[e];function zn(e,t){if(t){if(Gr.escapeTest.test(e))return e.replace(Gr.escapeReplace,xp)}else if(Gr.escapeTestNoEncode.test(e))return e.replace(Gr.escapeReplaceNoEncode,xp);return e}function Cp(e){try{e=encodeURI(e).replace(Gr.percentDecode,"%")}catch{return null}return e}function wp(e,t){var a;const r=e.replace(Gr.findPipe,(c,l,f)=>{let d=!1,m=l;for(;--m>=0&&f[m]==="\\";)d=!d;return d?"|":" |"}),n=r.split(Gr.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(Gr.slashPipe,"|");return n}function za(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 bC(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 Dp(e,t,r,n,o){const a=t.href,c=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:c,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,f}function yC(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 c=a.match(r.other.beginningSpace);if(c===null)return a;const[l]=c;return l.length>=o.length?a.slice(o.length):a}).join(`
|
|
115
|
+
`)}var Os=class{constructor(e){dr(this,"options"),dr(this,"rules"),dr(this,"lexer"),this.options=e||Wo}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:za(r,`
|
|
116
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=yC(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=za(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:za(t[0],`
|
|
117
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=za(t[0],`
|
|
118
|
+
`).split(`
|
|
119
|
+
`),n="",o="";const a=[];for(;r.length>0;){let c=!1;const l=[];let f;for(f=0;f<r.length;f++)if(this.rules.other.blockquoteStart.test(r[f]))l.push(r[f]),c=!0;else if(!c)l.push(r[f]);else break;r=r.slice(f);const d=l.join(`
|
|
120
|
+
`),m=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
121
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
122
|
+
${d}`:d,o=o?`${o}
|
|
123
|
+
${m}`:m;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,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 y=g,C=y.raw+`
|
|
124
|
+
`+r.join(`
|
|
125
|
+
`),D=this.blockquote(C);a[a.length-1]=D,n=n.substring(0,n.length-y.raw.length)+D.raw,o=o.substring(0,o.length-y.text.length)+D.text;break}else if((g==null?void 0:g.type)==="list"){const y=g,C=y.raw+`
|
|
126
|
+
`+r.join(`
|
|
127
|
+
`),D=this.list(C);a[a.length-1]=D,n=n.substring(0,n.length-g.raw.length)+D.raw,o=o.substring(0,o.length-y.raw.length)+D.raw,r=C.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 c=!1;for(;e;){let f=!1,d="",m="";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,A=>" ".repeat(3*A.length)),g=e.split(`
|
|
130
|
+
`,1)[0],y=!v.trim(),C=0;if(this.options.pedantic?(C=2,m=v.trimStart()):y?C=t[1].length+1:(C=t[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,m=v.slice(C),C+=t[1].length),y&&this.rules.other.blankLine.test(g)&&(d+=g+`
|
|
131
|
+
`,e=e.substring(g.length+1),f=!0),!f){const A=this.rules.other.nextBulletRegex(C),O=this.rules.other.hrRegex(C),B=this.rules.other.fencesBeginRegex(C),F=this.rules.other.headingBeginRegex(C),N=this.rules.other.htmlBeginRegex(C);for(;e;){const I=e.split(`
|
|
132
|
+
`,1)[0];let P;if(g=I,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),P=g):P=g.replace(this.rules.other.tabCharGlobal," "),B.test(g)||F.test(g)||N.test(g)||A.test(g)||O.test(g))break;if(P.search(this.rules.other.nonSpaceChar)>=C||!g.trim())m+=`
|
|
133
|
+
`+P.slice(C);else{if(y||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||B.test(v)||F.test(v)||O.test(v))break;m+=`
|
|
134
|
+
`+g}!y&&!g.trim()&&(y=!0),d+=I+`
|
|
135
|
+
`,e=e.substring(I.length+1),v=P.slice(C)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let D=null,p;this.options.gfm&&(D=this.rules.other.listIsTask.exec(m),D&&(p=D[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!D,checked:p,loose:!1,text:m,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"),m=d.length>0&&d.some(v=>this.rules.other.anyLine.test(v.raw));o.loose=m}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 c;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=wp(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(c=t[3])!=null&&c.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(wp(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=za(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=bC(t[2],"()");if(a===-2)return;if(a>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,c).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)),Dp(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 Dp(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,c,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(c=[...a].length,n[3]||n[4]){l+=c;continue}else if((n[5]||n[6])&&o%3&&!((o+c)%3)){f+=c;continue}if(l-=c,l>0)continue;c=Math.min(c,c+l+f);const m=[...n[0]][0].length,v=e.slice(0,o+n.index+m+c);if(Math.min(o,c)%2){const y=v.slice(1,-1);return{type:"em",raw:v,text:y,tokens:this.lexer.inlineTokens(y)}}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}}}},Zn=class g0{constructor(t){dr(this,"tokens"),dr(this,"options"),dr(this,"state"),dr(this,"tokenizer"),dr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Wo,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:Gr,block:ji.normal,inline:Pa.normal};this.options.pedantic?(r.block=ji.pedantic,r.inline=Pa.pedantic):this.options.gfm&&(r.block=ji.gfm,this.options.breaks?r.inline=Pa.breaks:r.inline=Pa.gfm),this.tokenizer.rules=r}static get rules(){return{block:ji,inline:Pa}}static lex(t,r){return new g0(r).lex(t)}static lexInline(t,r){return new g0(r).inlineTokens(t)}lex(t){t=t.replace(Gr.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,c;for(this.options.pedantic&&(t=t.replace(Gr.tabCharGlobal," ").replace(Gr.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((c=this.options.extensions)!=null&&c.startBlock){let d=1/0;const m=t.slice(1);let v;this.options.extensions.startBlock.forEach(g=>{v=g.call({lexer:this},m),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 m=Object.keys(this.tokens.links);if(m.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)m.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,c="";for(;t;){a||(c=""),a=!1;let m;if((f=(l=this.options.extensions)==null?void 0:l.inline)!=null&&f.some(g=>(m=g.call({lexer:this},t,r))?(t=t.substring(m.raw.length),r.push(m),!0):!1))continue;if(m=this.tokenizer.escape(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.tag(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.link(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(m.raw.length);const g=r.at(-1);m.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=m.raw,g.text+=m.text):r.push(m);continue}if(m=this.tokenizer.emStrong(t,n,c)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.codespan(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.br(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.del(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.autolink(t)){t=t.substring(m.raw.length),r.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(t))){t=t.substring(m.raw.length),r.push(m);continue}let v=t;if((d=this.options.extensions)!=null&&d.startInline){let g=1/0;const y=t.slice(1);let C;this.options.extensions.startInline.forEach(D=>{C=D.call({lexer:this},y),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(v=t.substring(0,g+1))}if(m=this.tokenizer.inlineText(v)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(c=m.raw.slice(-1)),a=!0;const g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=m.raw,g.text+=m.text):r.push(m);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}},Ns=class{constructor(e){dr(this,"options"),dr(this,"parser"),this.options=e||Wo}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(Gr.notSpaceStart))==null?void 0:a[0],o=e.replace(Gr.endingNewline,"")+`
|
|
148
|
+
`;return n?'<pre><code class="language-'+zn(n)+'">'+(r?o:zn(o,!0))+`</code></pre>
|
|
149
|
+
`:"<pre><code>"+(r?o:zn(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 c=0;c<e.items.length;c++){const l=e.items[c];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+" "+zn(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 c=0;c<a.length;c++)r+=this.tablecell(a[c]);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>${zn(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=Cp(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+zn(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=Cp(e);if(o===null)return zn(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${zn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:zn(e.text)}},kc=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""}},Qn=class v0{constructor(t){dr(this,"options"),dr(this,"renderer"),dr(this,"textRenderer"),this.options=t||Wo,this.options.renderer=this.options.renderer||new Ns,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kc}static parse(t,r){return new v0(r).parse(t)}static parseInline(t,r){return new v0(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let c=0;c<t.length;c++){const l=t[c];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const d=l,m=this.options.extensions.renderers[d.type].call({parser:this},d);if(m!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=m||"";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,m=this.renderer.text(d);for(;c+1<t.length&&t[c+1].type==="text";)d=t[++c],m+=`
|
|
166
|
+
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:m,text:m,tokens:[{type:"text",raw:m,text:m,escaped:!0}]}):n+=m;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 c=0;c<t.length;c++){const l=t[c];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}},yu,es=(yu=class{constructor(e){dr(this,"options"),dr(this,"block"),this.options=e||Wo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Zn.lex:Zn.lexInline}provideParser(){return this.block?Qn.parse:Qn.parseInline}},dr(yu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),yu),xC=class{constructor(...e){dr(this,"defaults",vc()),dr(this,"options",this.setOptions),dr(this,"parse",this.parseMarkdown(!0)),dr(this,"parseInline",this.parseMarkdown(!1)),dr(this,"Parser",Qn),dr(this,"Renderer",Ns),dr(this,"TextRenderer",kc),dr(this,"Lexer",Zn),dr(this,"Tokenizer",Os),dr(this,"Hooks",es),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 c=a;for(const l of c.header)r=r.concat(this.walkTokens(l.tokens,t));for(const l of c.rows)for(const f of l)r=r.concat(this.walkTokens(f.tokens,t));break}case"list":{const c=a;r=r.concat(this.walkTokens(c.items,t));break}default:{const c=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(l=>{const f=c[l].flat(1/0);r=r.concat(this.walkTokens(f,t))}):c.tokens&&(r=r.concat(this.walkTokens(c.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(...c){let l=o.renderer.apply(this,c);return l===!1&&(l=a.apply(this,c)),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 Ns(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 c=a,l=r.renderer[c],f=o[c];o[c]=(...d)=>{let m=l.apply(o,d);return m===!1&&(m=f.apply(o,d)),m||""}}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 c=a,l=r.tokenizer[c],f=o[c];o[c]=(...d)=>{let m=l.apply(o,d);return m===!1&&(m=f.apply(o,d)),m}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new es;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 c=a,l=r.hooks[c],f=o[c];es.passThroughHooks.has(a)?o[c]=d=>{if(this.defaults.async)return Promise.resolve(l.call(o,d)).then(v=>f.call(o,v));const m=l.call(o,d);return f.call(o,m)}:o[c]=(...d)=>{let m=l.apply(o,d);return m===!1&&(m=f.apply(o,d)),m}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(c){let l=[];return l.push(a.call(this,c)),o&&(l=l.concat(o.call(this,c))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Zn.lex(e,t??this.defaults)}parser(e,t){return Qn.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 c=o.hooks?o.hooks.provideLexer():e?Zn.lex:Zn.lexInline,l=o.hooks?o.hooks.provideParser():e?Qn.parse:Qn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(f=>c(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=c(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>"+zn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},qo=new xC;function Zt(e,t){return qo.parse(e,t)}Zt.options=Zt.setOptions=function(e){return qo.setOptions(e),Zt.defaults=qo.defaults,og(Zt.defaults),Zt};Zt.getDefaults=vc;Zt.defaults=Wo;Zt.use=function(...e){return qo.use(...e),Zt.defaults=qo.defaults,og(Zt.defaults),Zt};Zt.walkTokens=function(e,t){return qo.walkTokens(e,t)};Zt.parseInline=qo.parseInline;Zt.Parser=Qn;Zt.parser=Qn.parse;Zt.Renderer=Ns;Zt.TextRenderer=kc;Zt.Lexer=Zn;Zt.lexer=Zn.lex;Zt.Tokenizer=Os;Zt.Hooks=es;Zt.parse=Zt;Zt.options;Zt.setOptions;Zt.use;Zt.walkTokens;Zt.parseInline;Qn.parse;Zn.lex;var an=function(){return an=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},an.apply(this,arguments)};function $s(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 mr="-ms-",Ga="-moz-",er="-webkit-",mg="comm",rl="rule",Sc="decl",CC="@import",gg="@keyframes",wC="@layer",vg=Math.abs,Bc=String.fromCharCode,b0=Object.assign;function DC(e,t){return Mr(e,0)^45?(((t<<2^Mr(e,0))<<2^Mr(e,1))<<2^Mr(e,2))<<2^Mr(e,3):0}function bg(e){return e.trim()}function Yn(e,t){return(e=t.exec(e))?e[0]:e}function It(e,t,r){return e.replace(t,r)}function ts(e,t,r){return e.indexOf(t,r)}function Mr(e,t){return e.charCodeAt(t)|0}function fa(e,t,r){return e.slice(t,r)}function Ln(e){return e.length}function yg(e){return e.length}function _a(e,t){return t.push(e),e}function EC(e,t){return e.map(t).join("")}function Ep(e,t){return e.filter(function(r){return!Yn(r,t)})}var nl=1,ha=1,xg=0,yn=0,Ar=0,Ea="";function ol(e,t,r,n,o,a,c,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:nl,column:ha,length:c,return:"",siblings:l}}function fo(e,t){return b0(ol("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Qo(e){for(;e.root;)e=fo(e.root,{children:[e]});_a(e,e.siblings)}function kC(){return Ar}function SC(){return Ar=yn>0?Mr(Ea,--yn):0,ha--,Ar===10&&(ha=1,nl--),Ar}function Sn(){return Ar=yn<xg?Mr(Ea,yn++):0,ha++,Ar===10&&(ha=1,nl++),Ar}function Po(){return Mr(Ea,yn)}function rs(){return yn}function al(e,t){return fa(Ea,e,t)}function y0(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 BC(e){return nl=ha=1,xg=Ln(Ea=e),yn=0,[]}function AC(e){return Ea="",e}function xu(e){return bg(al(yn-1,x0(e===91?e+2:e===40?e+1:e)))}function FC(e){for(;(Ar=Po())&&Ar<33;)Sn();return y0(e)>2||y0(Ar)>3?"":" "}function OC(e,t){for(;--t&&Sn()&&!(Ar<48||Ar>102||Ar>57&&Ar<65||Ar>70&&Ar<97););return al(e,rs()+(t<6&&Po()==32&&Sn()==32))}function x0(e){for(;Sn();)switch(Ar){case e:return yn;case 34:case 39:e!==34&&e!==39&&x0(Ar);break;case 40:e===41&&x0(e);break;case 92:Sn();break}return yn}function NC(e,t){for(;Sn()&&e+Ar!==57&&!(e+Ar===84&&Po()===47););return"/*"+al(t,yn-1)+"*"+Bc(e===47?e:Sn())}function $C(e){for(;!y0(Po());)Sn();return al(e,yn)}function TC(e){return AC(ns("",null,null,null,[""],e=BC(e),0,[0],e))}function ns(e,t,r,n,o,a,c,l,f){for(var d=0,m=0,v=c,g=0,y=0,C=0,D=1,p=1,A=1,O=0,B="",F=o,N=a,I=n,P=B;p;)switch(C=O,O=Sn()){case 40:if(C!=108&&Mr(P,v-1)==58){ts(P+=It(xu(O),"&","&\f"),"&\f",vg(d?l[d-1]:0))!=-1&&(A=-1);break}case 34:case 39:case 91:P+=xu(O);break;case 9:case 10:case 13:case 32:P+=FC(C);break;case 92:P+=OC(rs()-1,7);continue;case 47:switch(Po()){case 42:case 47:_a(MC(NC(Sn(),rs()),t,r,f),f);break;default:P+="/"}break;case 123*D:l[d++]=Ln(P)*A;case 125*D:case 59:case 0:switch(O){case 0:case 125:p=0;case 59+m:A==-1&&(P=It(P,/\f/g,"")),y>0&&Ln(P)-v&&_a(y>32?Sp(P+";",n,r,v-1,f):Sp(It(P," ","")+";",n,r,v-2,f),f);break;case 59:P+=";";default:if(_a(I=kp(P,t,r,d,m,o,l,B,F=[],N=[],v,a),a),O===123)if(m===0)ns(P,t,I,I,F,a,v,l,N);else switch(g===99&&Mr(P,3)===110?100:g){case 100:case 108:case 109:case 115:ns(e,I,I,n&&_a(kp(e,I,I,0,0,o,l,B,o,F=[],v,N),N),o,N,v,l,n?F:N);break;default:ns(P,I,I,I,[""],N,0,l,N)}}d=m=y=0,D=A=1,B=P="",v=c;break;case 58:v=1+Ln(P),y=C;default:if(D<1){if(O==123)--D;else if(O==125&&D++==0&&SC()==125)continue}switch(P+=Bc(O),O*D){case 38:A=m>0?1:(P+="\f",-1);break;case 44:l[d++]=(Ln(P)-1)*A,A=1;break;case 64:Po()===45&&(P+=xu(Sn())),g=Po(),m=v=Ln(B=P+=$C(rs())),O++;break;case 45:C===45&&Ln(P)==2&&(D=0)}}return a}function kp(e,t,r,n,o,a,c,l,f,d,m,v){for(var g=o-1,y=o===0?a:[""],C=yg(y),D=0,p=0,A=0;D<n;++D)for(var O=0,B=fa(e,g+1,g=vg(p=c[D])),F=e;O<C;++O)(F=bg(p>0?y[O]+" "+B:It(B,/&\f/g,y[O])))&&(f[A++]=F);return ol(e,t,r,o===0?rl:l,f,d,m,v)}function MC(e,t,r,n){return ol(e,t,r,mg,Bc(kC()),fa(e,2,-2),0,n)}function Sp(e,t,r,n,o){return ol(e,t,r,Sc,fa(e,0,n),fa(e,n+1,-1),n,o)}function Cg(e,t,r){switch(DC(e,t)){case 5103:return er+"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 er+e+e;case 4789:return Ga+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return er+e+Ga+e+mr+e+e;case 5936:switch(Mr(e,t+11)){case 114:return er+e+mr+It(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return er+e+mr+It(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return er+e+mr+It(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return er+e+mr+e+e;case 6165:return er+e+mr+"flex-"+e+e;case 5187:return er+e+It(e,/(\w+).+(:[^]+)/,er+"box-$1$2"+mr+"flex-$1$2")+e;case 5443:return er+e+mr+"flex-item-"+It(e,/flex-|-self/g,"")+(Yn(e,/flex-|baseline/)?"":mr+"grid-row-"+It(e,/flex-|-self/g,""))+e;case 4675:return er+e+mr+"flex-line-pack"+It(e,/align-content|flex-|-self/g,"")+e;case 5548:return er+e+mr+It(e,"shrink","negative")+e;case 5292:return er+e+mr+It(e,"basis","preferred-size")+e;case 6060:return er+"box-"+It(e,"-grow","")+er+e+mr+It(e,"grow","positive")+e;case 4554:return er+It(e,/([^-])(transform)/g,"$1"+er+"$2")+e;case 6187:return It(It(It(e,/(zoom-|grab)/,er+"$1"),/(image-set)/,er+"$1"),e,"")+e;case 5495:case 3959:return It(e,/(image-set\([^]*)/,er+"$1$`$1");case 4968:return It(It(e,/(.+:)(flex-)?(.*)/,er+"box-pack:$3"+mr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+er+e+e;case 4200:if(!Yn(e,/flex-|baseline/))return mr+"grid-column-align"+fa(e,t)+e;break;case 2592:case 3360:return mr+It(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,Yn(n.props,/grid-\w+-end/)})?~ts(e+(r=r[t].value),"span",0)?e:mr+It(e,"-start","")+e+mr+"grid-row-span:"+(~ts(r,"span",0)?Yn(r,/\d+/):+Yn(r,/\d+/)-+Yn(e,/\d+/))+";":mr+It(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return Yn(n.props,/grid-\w+-start/)})?e:mr+It(It(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return It(e,/(.+)-inline(.+)/,er+"$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(Ln(e)-1-t>6)switch(Mr(e,t+1)){case 109:if(Mr(e,t+4)!==45)break;case 102:return It(e,/(.+:)(.+)-([^]+)/,"$1"+er+"$2-$3$1"+Ga+(Mr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ts(e,"stretch",0)?Cg(It(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return It(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,c,l,f,d){return mr+o+":"+a+d+(c?mr+o+"-span:"+(l?f:+f-+a)+d:"")+e});case 4949:if(Mr(e,t+6)===121)return It(e,":",":"+er)+e;break;case 6444:switch(Mr(e,Mr(e,14)===45?18:11)){case 120:return It(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+er+(Mr(e,14)===45?"inline-":"")+"box$3$1"+er+"$2$3$1"+mr+"$2box$3")+e;case 100:return It(e,":",":"+mr)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return It(e,"scroll-","scroll-snap-")+e}return e}function Ts(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function RC(e,t,r,n){switch(e.type){case wC:if(e.children.length)break;case CC:case Sc:return e.return=e.return||e.value;case mg:return"";case gg:return e.return=e.value+"{"+Ts(e.children,n)+"}";case rl:if(!Ln(e.value=e.props.join(",")))return""}return Ln(r=Ts(e.children,n))?e.return=e.value+"{"+r+"}":""}function IC(e){var t=yg(e);return function(r,n,o,a){for(var c="",l=0;l<t;l++)c+=e[l](r,n,o,a)||"";return c}}function PC(e){return function(t){t.root||(t=t.return)&&e(t)}}function zC(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Sc:e.return=Cg(e.value,e.length,r);return;case gg:return Ts([fo(e,{value:It(e.value,"@","@"+er)})],n);case rl:if(e.length)return EC(r=e.props,function(o){switch(Yn(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Qo(fo(e,{props:[It(o,/:(read-\w+)/,":"+Ga+"$1")]})),Qo(fo(e,{props:[o]})),b0(e,{props:Ep(r,n)});break;case"::placeholder":Qo(fo(e,{props:[It(o,/:(plac\w+)/,":"+er+"input-$1")]})),Qo(fo(e,{props:[It(o,/:(plac\w+)/,":"+Ga+"$1")]})),Qo(fo(e,{props:[It(o,/:(plac\w+)/,mr+"input-$1")]})),Qo(fo(e,{props:[o]})),b0(e,{props:Ep(r,n)});break}return""})}}var LC={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},pa=typeof process<"u"&&un!==void 0&&(un.REACT_APP_SC_ATTR||un.SC_ATTR)||"data-styled",wg="active",Dg="data-styled-version",il="6.1.19",Ac=`/*!sc*/
|
|
168
|
+
`,Ms=typeof window<"u"&&typeof document<"u",jC=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&un!==void 0&&un.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&un.REACT_APP_SC_DISABLE_SPEEDY!==""?un.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&un.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&un!==void 0&&un.SC_DISABLE_SPEEDY!==void 0&&un.SC_DISABLE_SPEEDY!==""&&un.SC_DISABLE_SPEEDY!=="false"&&un.SC_DISABLE_SPEEDY),sl=Object.freeze([]),ma=Object.freeze({});function _C(e,t,r){return r===void 0&&(r=ma),e.theme!==r.theme&&e.theme||t||r.theme}var Eg=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"]),HC=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,KC=/(^-|-$)/g;function Bp(e){return e.replace(HC,"-").replace(KC,"")}var qC=/(a)(d)/gi,_i=52,Ap=function(e){return String.fromCharCode(e+(e>25?39:97))};function C0(e){var t,r="";for(t=Math.abs(e);t>_i;t=t/_i|0)r=Ap(t%_i)+r;return(Ap(t%_i)+r).replace(qC,"$1-$2")}var Cu,kg=5381,na=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Sg=function(e){return na(kg,e)};function WC(e){return C0(Sg(e)>>>0)}function VC(e){return e.displayName||e.name||"Component"}function wu(e){return typeof e=="string"&&!0}var Bg=typeof Symbol=="function"&&Symbol.for,Ag=Bg?Symbol.for("react.memo"):60115,UC=Bg?Symbol.for("react.forward_ref"):60112,XC={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},YC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Fg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},GC=((Cu={})[UC]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Cu[Ag]=Fg,Cu);function Fp(e){return("type"in(t=e)&&t.type.$$typeof)===Ag?Fg:"$$typeof"in e?GC[e.$$typeof]:XC;var t}var ZC=Object.defineProperty,QC=Object.getOwnPropertyNames,Op=Object.getOwnPropertySymbols,JC=Object.getOwnPropertyDescriptor,ew=Object.getPrototypeOf,Np=Object.prototype;function Og(e,t,r){if(typeof t!="string"){if(Np){var n=ew(t);n&&n!==Np&&Og(e,n,r)}var o=QC(t);Op&&(o=o.concat(Op(t)));for(var a=Fp(e),c=Fp(t),l=0;l<o.length;++l){var f=o[l];if(!(f in YC||r&&r[f]||c&&f in c||a&&f in a)){var d=JC(t,f);try{ZC(e,f,d)}catch{}}}}return e}function ga(e){return typeof e=="function"}function Fc(e){return typeof e=="object"&&"styledComponentId"in e}function To(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function $p(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function li(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function w0(e,t,r){if(r===void 0&&(r=!1),!r&&!li(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=w0(e[n],t[n]);else if(li(t))for(var n in t)e[n]=w0(e[n],t[n]);return e}function Oc(e,t){Object.defineProperty(e,"toString",{value:t})}function bi(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 tw=(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 bi(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var c=o;c<a;c++)this.groupSizes[c]=0}for(var l=this.indexOfGroup(t+1),f=(c=0,r.length);c<f;c++)this.tag.insertRule(l,r[c])&&(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,c=o;c<a;c++)r+="".concat(this.tag.getRule(c)).concat(Ac);return r},e})(),os=new Map,Rs=new Map,as=1,Hi=function(e){if(os.has(e))return os.get(e);for(;Rs.has(as);)as++;var t=as++;return os.set(e,t),Rs.set(t,e),t},rw=function(e,t){as=t+1,os.set(e,t),Rs.set(t,e)},nw="style[".concat(pa,"][").concat(Dg,'="').concat(il,'"]'),ow=new RegExp("^".concat(pa,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),aw=function(e,t,r){for(var n,o=r.split(","),a=0,c=o.length;a<c;a++)(n=o[a])&&e.registerName(t,n)},iw=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(Ac),o=[],a=0,c=n.length;a<c;a++){var l=n[a].trim();if(l){var f=l.match(ow);if(f){var d=0|parseInt(f[1],10),m=f[2];d!==0&&(rw(m,d),aw(e,m,f[3]),e.getTag().insertRules(d,o)),o.length=0}else o.push(l)}}},Tp=function(e){for(var t=document.querySelectorAll(nw),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(pa)!==wg&&(iw(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function sw(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Ng=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(l){var f=Array.from(l.querySelectorAll("style[".concat(pa,"]")));return f[f.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(pa,wg),n.setAttribute(Dg,il);var c=sw();return c&&n.setAttribute("nonce",c),r.insertBefore(n,a),n},lw=(function(){function e(t){this.element=Ng(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 c=n[o];if(c.ownerNode===r)return c}throw bi(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})(),uw=(function(){function e(t){this.element=Ng(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})(),cw=(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})(),Mp=Ms,dw={isServer:!Ms,useCSSOMInjection:!jC},$g=(function(){function e(t,r,n){t===void 0&&(t=ma),r===void 0&&(r={});var o=this;this.options=an(an({},dw),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&Ms&&Mp&&(Mp=!1,Tp(this)),Oc(this,function(){return(function(a){for(var c=a.getTag(),l=c.length,f="",d=function(v){var g=(function(A){return Rs.get(A)})(v);if(g===void 0)return"continue";var y=a.names.get(g),C=c.getGroup(v);if(y===void 0||!y.size||C.length===0)return"continue";var D="".concat(pa,".g").concat(v,'[id="').concat(g,'"]'),p="";y!==void 0&&y.forEach(function(A){A.length>0&&(p+="".concat(A,","))}),f+="".concat(C).concat(D,'{content:"').concat(p,'"}').concat(Ac)},m=0;m<l;m++)d(m);return f})(o)})}return e.registerId=function(t){return Hi(t)},e.prototype.rehydrate=function(){!this.server&&Ms&&Tp(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(an(an({},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 cw(o):n?new lw(o):new uw(o)})(this.options),new tw(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(Hi(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(Hi(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Hi(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),fw=/&/g,hw=/^\s*\/\/.*$/gm;function Tg(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=Tg(r.children,t)),r})}function pw(e){var t,r,n,o=ma,a=o.options,c=a===void 0?ma:a,l=o.plugins,f=l===void 0?sl:l,d=function(g,y,C){return C.startsWith(r)&&C.endsWith(r)&&C.replaceAll(r,"").length>0?".".concat(t):g},m=f.slice();m.push(function(g){g.type===rl&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(fw,r).replace(n,d))}),c.prefix&&m.push(zC),m.push(RC);var v=function(g,y,C,D){y===void 0&&(y=""),C===void 0&&(C=""),D===void 0&&(D="&"),t=D,r=y,n=new RegExp("\\".concat(r,"\\b"),"g");var p=g.replace(hw,""),A=TC(C||y?"".concat(C," ").concat(y," { ").concat(p," }"):p);c.namespace&&(A=Tg(A,c.namespace));var O=[];return Ts(A,IC(m.concat(PC(function(B){return O.push(B)})))),O};return v.hash=f.length?f.reduce(function(g,y){return y.name||bi(15),na(g,y.name)},kg).toString():"",v}var mw=new $g,D0=pw(),Mg=Le.createContext({shouldForwardProp:void 0,styleSheet:mw,stylis:D0});Mg.Consumer;Le.createContext(void 0);function Rp(){return Do(Mg)}var gw=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=D0);var c=n.name+a.hash;o.hasNameForId(n.id,c)||o.insertRules(n.id,c,a(n.rules,c,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,Oc(this,function(){throw bi(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=D0),this.name+t.hash},e})(),vw=function(e){return e>="A"&&e<="Z"};function Ip(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;vw(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Rg=function(e){return e==null||e===!1||e===""},Ig=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!Rg(a)&&(Array.isArray(a)&&a.isCss||ga(a)?n.push("".concat(Ip(o),":"),a,";"):li(a)?n.push.apply(n,$s($s(["".concat(o," {")],Ig(a),!1),["}"],!1)):n.push("".concat(Ip(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in LC||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function zo(e,t,r,n){if(Rg(e))return[];if(Fc(e))return[".".concat(e.styledComponentId)];if(ga(e)){if(!ga(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return zo(o,t,r,n)}var a;return e instanceof gw?r?(e.inject(r,n),[e.getName(n)]):[e]:li(e)?Ig(e):Array.isArray(e)?Array.prototype.concat.apply(sl,e.map(function(c){return zo(c,t,r,n)})):[e.toString()]}function bw(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(ga(r)&&!Fc(r))return!1}return!0}var yw=Sg(il),xw=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&bw(t),this.componentId=r,this.baseHash=na(yw,r),this.baseStyle=n,$g.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=To(o,this.staticRulesId);else{var a=$p(zo(this.rules,t,r,n)),c=C0(na(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,c)){var l=n(a,".".concat(c),void 0,this.componentId);r.insertRules(this.componentId,c,l)}o=To(o,c),this.staticRulesId=c}else{for(var f=na(this.baseHash,n.hash),d="",m=0;m<this.rules.length;m++){var v=this.rules[m];if(typeof v=="string")d+=v;else if(v){var g=$p(zo(v,t,r,n));f=na(f,g+m),d+=g}}if(d){var y=C0(f>>>0);r.hasNameForId(this.componentId,y)||r.insertRules(this.componentId,y,n(d,".".concat(y),void 0,this.componentId)),o=To(o,y)}}return o},e})(),Pg=Le.createContext(void 0);Pg.Consumer;var Du={};function Cw(e,t,r){var n=Fc(e),o=e,a=!wu(e),c=t.attrs,l=c===void 0?sl:c,f=t.componentId,d=f===void 0?(function(F,N){var I=typeof F!="string"?"sc":Bp(F);Du[I]=(Du[I]||0)+1;var P="".concat(I,"-").concat(WC(il+I+Du[I]));return N?"".concat(N,"-").concat(P):P})(t.displayName,t.parentComponentId):f,m=t.displayName,v=m===void 0?(function(F){return wu(F)?"styled.".concat(F):"Styled(".concat(VC(F),")")})(e):m,g=t.displayName&&t.componentId?"".concat(Bp(t.displayName),"-").concat(t.componentId):t.componentId||d,y=n&&o.attrs?o.attrs.concat(l).filter(Boolean):l,C=t.shouldForwardProp;if(n&&o.shouldForwardProp){var D=o.shouldForwardProp;if(t.shouldForwardProp){var p=t.shouldForwardProp;C=function(F,N){return D(F,N)&&p(F,N)}}else C=D}var A=new xw(r,g,n?o.componentStyle:void 0);function O(F,N){return(function(I,P,H){var T=I.attrs,V=I.componentStyle,K=I.defaultProps,G=I.foldedComponentIds,Y=I.styledComponentId,L=I.target,W=Le.useContext(Pg),U=Rp(),X=I.shouldForwardProp||U.shouldForwardProp,te=_C(P,W,K)||ma,z=(function(Oe,Q,fe){for(var se,ae=an(an({},Q),{className:void 0,theme:fe}),ge=0;ge<Oe.length;ge+=1){var be=ga(se=Oe[ge])?se(ae):se;for(var Ce in be)ae[Ce]=Ce==="className"?To(ae[Ce],be[Ce]):Ce==="style"?an(an({},ae[Ce]),be[Ce]):be[Ce]}return Q.className&&(ae.className=To(ae.className,Q.className)),ae})(T,P,te),le=z.as||L,ce={};for(var he in z)z[he]===void 0||he[0]==="$"||he==="as"||he==="theme"&&z.theme===te||(he==="forwardedAs"?ce.as=z.forwardedAs:X&&!X(he,le)||(ce[he]=z[he]));var ne=(function(Oe,Q){var fe=Rp(),se=Oe.generateAndInjectStyles(Q,fe.styleSheet,fe.stylis);return se})(V,z),pe=To(G,Y);return ne&&(pe+=" "+ne),z.className&&(pe+=" "+z.className),ce[wu(le)&&!Eg.has(le)?"class":"className"]=pe,H&&(ce.ref=H),ss(le,ce)})(B,F,N)}O.displayName=v;var B=Le.forwardRef(O);return B.attrs=y,B.componentStyle=A,B.displayName=v,B.shouldForwardProp=C,B.foldedComponentIds=n?To(o.foldedComponentIds,o.styledComponentId):"",B.styledComponentId=g,B.target=n?o.target:e,Object.defineProperty(B,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(F){this._foldedDefaultProps=n?(function(N){for(var I=[],P=1;P<arguments.length;P++)I[P-1]=arguments[P];for(var H=0,T=I;H<T.length;H++)w0(N,T[H],!0);return N})({},o.defaultProps,F):F}}),Oc(B,function(){return".".concat(B.styledComponentId)}),a&&Og(B,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),B}function Pp(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 zp=function(e){return Object.assign(e,{isCss:!0})};function ww(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(ga(e)||li(e))return zp(zo(Pp(sl,$s([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?zo(n):zp(zo(Pp(n,t)))}function E0(e,t,r){if(r===void 0&&(r=ma),!t)throw bi(1,t);var n=function(o){for(var a=[],c=1;c<arguments.length;c++)a[c-1]=arguments[c];return e(t,r,ww.apply(void 0,$s([o],a,!1)))};return n.attrs=function(o){return E0(e,t,an(an({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return E0(e,t,an(an({},r),o))},n}var zg=function(e){return E0(Cw,e)},sr=zg;Eg.forEach(function(e){sr[e]=zg(e)});const Dw=sr.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 c,l,f,d;const t=((l=(c=e.$styles)==null?void 0:c.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(m=>parseInt(m)),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
|
+
`,Ew=sr.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,m,v,g;const t=e.$value.length;if(t===0)return((m=(d=e.$styles)==null?void 0:d.templateField)==null?void 0:m.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(y=>parseInt(y)),o=n.length===2?n[1]:n[0],a=12.5,c=20,l=t*a+o*2+c,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:c,calculatedWidth:l,maxWidth:e.$maxWidth,finalWidth:f,inputValue:e.$value}),f+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
217
|
+
height: ${e=>{var c,l,f,d;const t=((l=(c=e.$styles)==null?void 0:c.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(m=>parseInt(m)),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
|
+
`,Lg=wo(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var I,P,H,T,V,K,G,Y,L,W,U,X;const c=rg(),[l,f]=Bt(!1),[d,m]=Bt(e.value||""),[v,g]=Bt(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[y,C]=Bt(600),D=$t(null),p=xt(()=>{try{const te=document.querySelector('[data-slate-editor="true"]');if(te){const z=te.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||te.parentElement;if(z){const le=z.clientWidth,ce=le-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",le,"\u53EF\u7528\u5BBD\u5EA6:",ce),Math.max(ce,200)}}return 600}catch(te){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",te),600}},[]);Ut(()=>{g(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const te=p();C(te)},[e.value,e.placeholder,p]);const A=xt(()=>{f(!0),m(e.value||""),setTimeout(()=>{D.current&&(D.current.focus(),D.current.select())},0)},[e.value]),O=xt(te=>{const z=te.target.value;m(z)},[]),B=xt(()=>{const te=Re.findPath(c,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",te),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",d),Ke.setNodes(c,{value:d},{at:te});const z=d.trim()!==""?d:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";g(z);const le=c.children[te[0]];if(le&&"children"in le){const ce=le.children[te[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",ce)}f(!1)},[c,e,d]),F=xt(()=>{B()},[B]),N=xt(te=>{te.key==="Enter"?(te.preventDefault(),B()):te.key==="Escape"&&(te.preventDefault(),m(e.value||""),f(!1))},[B,e.value]);return l?ee.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[ee.jsx(Ew,{ref:D,value:d,onChange:O,onBlur:F,onKeyDown:N,placeholder:"",$styles:n,$value:d,$maxWidth:y,style:{backgroundColor:"white",color:((I=n==null?void 0:n.templateField)==null?void 0:I.textColor)||"#055AFF",border:`2px solid ${((P=n==null?void 0:n.templateField)==null?void 0:P.borderColor)||"#84ADFF"}`,minWidth:((H=n==null?void 0:n.templateField)==null?void 0:H.minWidth)||"120px"}}),r]}):ee.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[ee.jsxs(Dw,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:v.length,onClick:A,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:(V=n==null?void 0:n.templateField)==null?void 0:V.borderColor,borderRadius:(K=n==null?void 0:n.templateField)==null?void 0:K.borderRadius,padding:(G=n==null?void 0:n.templateField)==null?void 0:G.padding,margin:(Y=n==null?void 0:n.templateField)==null?void 0:Y.margin,fontSize:(L=n==null?void 0:n.templateField)==null?void 0:L.fontSize,fontWeight:(W=n==null?void 0:n.templateField)==null?void 0:W.fontWeight,minWidth:(U=n==null?void 0:n.templateField)==null?void 0:U.minWidth,color:(X=n==null?void 0:n.templateField)==null?void 0:X.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]}),ee.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});Lg.displayName="TemplateField";const kw=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return ee.jsxs("div",{...t,className:"think-container",children:[ee.jsx("div",{className:"think-indicator"}),ee.jsx("div",{className:"think-content py-2",children:ee.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})})]})},jg=Le.forwardRef(({attributes:e,element:t,eventsEmit:r,dataSource:n,tagIndex:o},a)=>{var F;const[c,l]=Bt(null),[f,d]=Bt(!0),[m,v]=Bt(1),[g,y]=Bt(10);Ut(()=>{if(!c){if(!n){d(!0);try{const N=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(N)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const N=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",N);let I=null,P=null,H;for(const K of N){const G=K==null?void 0:K.reply;if(!(G!=null&&G.databaseReference))continue;const Y=G.databaseReference;console.log(Y,"123123123jk123lk12j3l12jl3"),Y!=null&&Y.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",Y.retrieveSqlData.filePath),H=Y.retrieveSqlData.filePath);let L=Y;if(typeof Y=="string")try{L=JSON.parse(Y)}catch{}if(!L)continue;const W=Array.isArray(L)?L:[L],U=W.findIndex(z=>(z==null?void 0:z.id)===t.id),X=U>=0?W[U]:null;if(console.log("~~~~~~~~~~~~~~~",X),X){I=X,P=X.retrieveSqlData||X.retrieve_table_data||X.retrieveTableData;break}const te=W.find(z=>{var le,ce;return(((ce=(le=z==null?void 0:z.retrieveSqlData)==null?void 0:le.preData)==null?void 0:ce.length)||0)>0});!I&&te&&(I=te,P=te.retrieveSqlData||te.retrieve_table_data||te.retrieveTableData)}if(!I||!P){console.warn("No databaseReference with preData found for id:",t.id),d(!1);return}const T=Array.isArray(P==null?void 0:P.preData)?P.preData[0]:null;if(!T){console.warn("Matched item has no preData"),d(!1);return}const V={columns:(T.columns||[]).map(K=>({key:K.key,title:K.title})),rows:T.data||T.rows||[],total:(P==null?void 0:P.total)||0,fetchUrl:(P==null?void 0:P.fetchUrl)||"/index/knowledgeBase/file/stream",source:H||(P==null?void 0:P.source)||(I==null?void 0:I.source)};l(V),d(!1)}catch(N){console.error("Init preData parsing failed:",N),d(!1)}}},[t.id,c,n]),Ut(()=>{const N=I=>{try{const P=(I==null?void 0:I.detail)||{},H=P==null?void 0:P.id;if(!H||String(H)!==String(t.id))return;const T=P.databaseReference;if(!T)return;let V=T;if(typeof T=="string")try{V=JSON.parse(T)}catch{}if(!V)return;const K=Array.isArray(V)?V:[V],G=K.findIndex(X=>String(X==null?void 0:X.id)===String(t.id)),Y=G>=0?K[G]:null;if(!Y)return;const L=(Y==null?void 0:Y.retrieveSqlData)||(Y==null?void 0:Y.retrieve_table_data)||(Y==null?void 0:Y.retrieveTableData),W=Array.isArray(L==null?void 0:L.preData)?L.preData[0]:null;if(!W)return;const U={columns:(W.columns||[]).map(X=>({key:X.key,title:X.title})),rows:W.data||W.rows||[],total:(L==null?void 0:L.total)||0,fetchUrl:(L==null?void 0:L.fetchUrl)||"/index/knowledgeBase/file/stream",source:(Y==null?void 0:Y.source)||(L==null?void 0:L.source)};l(U),d(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",N),()=>{window.removeEventListener("retrieve-sql-data:data-response",N)}},[t.id]);const C=N=>{if(!N||N.length===0)return[];const I=N.find(P=>P&&typeof P=="object")||{};return Object.keys(I).map(P=>({key:P,title:P}))},D=(N,I)=>{v(N),I&&y(I);const P=H=>{let T=null;if(H&&Array.isArray(H.columns)&&Array.isArray(H.rows))T={columns:H.columns,rows:H.rows,total:Number(H.total)||0,fetchUrl:H.fetchUrl||(c==null?void 0:c.fetchUrl)||"",source:H.source||(c==null?void 0:c.source)};else if(H&&Array.isArray(H.data)){const V=H.data;T={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:C(V),rows:V,total:Number(H.totalCount??H.total??(c==null?void 0:c.total)??V.length)||0,fetchUrl:(c==null?void 0:c.fetchUrl)||"",source:c==null?void 0:c.source},typeof H.currentPage=="number"&&v(H.currentPage),typeof H.pageSize=="number"&&y(H.pageSize)}else if(Array.isArray(H)){const V=H;T={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:C(V),rows:V,total:Number((c==null?void 0:c.total)??V.length)||0,fetchUrl:(c==null?void 0:c.fetchUrl)||"",source:c==null?void 0:c.source}}if(!T){console.warn("replacePredataFunction received unsupported data format:",H);return}console.log("Replacing table data with:",T),l(T)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:N,pageSize:I||g,fetchUrl:c==null?void 0:c.fetchUrl,total:c==null?void 0:c.total,source:c==null?void 0:c.source,replacePredataFunction:P})},p=N=>c!=null&&c.rows?Math.max(...c.rows.map(I=>{const P=I[N];return P?String(P).length:0})):0,A=(((F=c==null?void 0:c.columns)==null?void 0:F.length)||0)===1,O=(c==null?void 0:c.columns.map((N,I)=>({title:N.title||N.key,dataIndex:N.key,key:N.key,render:P=>{const H=P==null||P===""?"-":P;return A?ee.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(H)}):H},...A?{width:void 0}:{}})))||[],B=(c==null?void 0:c.rows.map((N,I)=>({key:I,...N})))||[];return ee.jsx("div",{...e,ref:a,className:"retrieve-sql-data-container my-4",children:f?ee.jsxs("div",{className:"flex items-center justify-center py-8",children:[ee.jsx(f1,{size:"large"}),ee.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):c?ee.jsxs("div",{className:"retrieve-sql-data-content",children:[o!==null&&ee.jsxs("div",{className:"mb-2 flex items-center",children:[ee.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center",children:o}),ee.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]}),ee.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:ee.jsx(oo,{columns:O.map((N,I)=>({...N,...A?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:I===0?160:void 0,minWidth:120,maxWidth:I===0?180:300,fixed:I===0?"left":void 0,ellipsis:{showTitle:!0}},render:P=>{if(P==null)return"-";const H=String(P);if(A)return ee.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:H,children:H});const T=p(N.key);let V="200px";return I===0?V="80px":T<=8?V="100px":T<=15?V="150px":T<=25?V="200px":T<=40?V="250px":V="300px",ee.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:V,display:"inline-block",cursor:"default"},title:H,children:H})}})),dataSource:B,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:A?"100%":"1000px"},scroll:{x:A?void 0:"max-content",y:400}})}),c.total>g&&ee.jsx("div",{className:"flex justify-center mt-3",children:ee.jsx(h1,{current:m,pageSize:g,total:c.total,onChange:D,onShowSizeChange:D,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):ee.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});jg.displayName="RetrieveSqlDataElement";var is={exports:{}},Eu={exports:{}},ku,Lp;function Sw(){if(Lp)return ku;Lp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ku=e,ku}var Su,jp;function Bw(){if(jp)return Su;jp=1;var e=Sw();function t(){}function r(){}return r.resetWarningCache=t,Su=function(){function n(c,l,f,d,m,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},Su}var _p;function Aw(){return _p||(_p=1,Eu.exports=Bw()()),Eu.exports}var k0={exports:{}},Fw=k0.exports,Hp;function Ow(){return Hp||(Hp=1,(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:Fw,function(){return(function(){var r={};(function(){r.d=function(s,i){for(var u in i)r.o(i,u)&&!r.o(s,u)&&Object.defineProperty(s,u,{enumerable:!0,get:i[u]})}})(),(function(){r.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)}})();var n={};r.d(n,{default:function(){return P4}});class o{constructor(i,u){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let h="KaTeX parse error: "+i,b,S;const $=u&&u.loc;if($&&$.start<=$.end){const Z=$.lexer.input;b=$.start,S=$.end,b===Z.length?h+=" at end of input: ":h+=" at position "+(b+1)+": ";const re=Z.slice(b,S).replace(/[^]/g,"$&\u0332");let me;b>15?me="\u2026"+Z.slice(b-15,b):me=Z.slice(0,b);let xe;S+15<Z.length?xe=Z.slice(S,S+15)+"\u2026":xe=Z.slice(S),h+=me+re+xe}const _=new Error(h);return _.name="ParseError",_.__proto__=o.prototype,_.position=b,b!=null&&S!=null&&(_.length=S-b),_.rawMessage=i,_}}o.prototype.__proto__=Error.prototype;var a=o;const c=function(s,i){return s===void 0?i:s},l=/([A-Z])/g,f=function(s){return s.replace(l,"-$1").toLowerCase()},d={"&":"&",">":">","<":"<",'"':""","'":"'"},m=/[&><"']/g;function v(s){return String(s).replace(m,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},y=function(s){const i=g(s);return i.type==="mathord"||i.type==="textord"||i.type==="atom"},C=function(s){if(!s)throw new Error("Expected non-null, but got "+String(s));return s};var D={deflt:c,escape:v,hyphenate:f,getBaseElem:g,isCharacterBox:y,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 p={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 A(s){if(s.default)return s.default;const i=s.type,u=Array.isArray(i)?i[0]:i;if(typeof u!="string")return u.enum[0];switch(u){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class O{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 u in p)if(p.hasOwnProperty(u)){const h=p[u];this[u]=i[u]!==void 0?h.processor?h.processor(i[u]):i[u]:A(h)}}reportNonstrict(i,u,h){let b=this.strict;if(typeof b=="function"&&(b=b(i,u,h)),!(!b||b==="ignore")){if(b===!0||b==="error")throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+(u+" ["+i+"]"),h);b==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(u+" ["+i+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+u+" ["+i+"]"))}}useStrictBehavior(i,u,h){let b=this.strict;if(typeof b=="function")try{b=b(i,u,h)}catch{b="error"}return!b||b==="ignore"?!1:b===!0||b==="error"?!0:b==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(u+" ["+i+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+u+" ["+i+"]")),!1)}isTrusted(i){if(i.url&&!i.protocol){const u=D.protocolFromUrl(i.url);if(u==null)return!1;i.protocol=u}return!!(typeof this.trust=="function"?this.trust(i):this.trust)}}class B{constructor(i,u,h){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=i,this.size=u,this.cramped=h}sup(){return G[Y[this.id]]}sub(){return G[L[this.id]]}fracNum(){return G[W[this.id]]}fracDen(){return G[U[this.id]]}cramp(){return G[X[this.id]]}text(){return G[te[this.id]]}isTight(){return this.size>=2}}const F=0,N=1,I=2,P=3,H=4,T=5,V=6,K=7,G=[new B(F,0,!1),new B(N,0,!0),new B(I,1,!1),new B(P,1,!0),new B(H,2,!1),new B(T,2,!0),new B(V,3,!1),new B(K,3,!0)],Y=[H,T,H,T,V,K,V,K],L=[T,T,T,T,K,K,K,K],W=[I,P,H,T,V,K,V,K],U=[P,P,T,T,K,K,K,K],X=[N,N,P,P,T,T,K,K],te=[F,N,I,P,I,P,I,P];var z={DISPLAY:G[F],TEXT:G[I],SCRIPT:G[H],SCRIPTSCRIPT:G[V]};const le=[{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 ce(s){for(let i=0;i<le.length;i++){const u=le[i];for(let h=0;h<u.blocks.length;h++){const b=u.blocks[h];if(s>=b[0]&&s<=b[1])return u.name}}return null}const he=[];le.forEach(s=>s.blocks.forEach(i=>he.push(...i)));function ne(s){for(let i=0;i<he.length;i+=2)if(s>=he[i]&&s<=he[i+1])return!0;return!1}const pe=80,Oe=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"},Q=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"},fe=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"},ae=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"},ge=function(s){const i=s/2;return"M400000 "+s+" H0 L"+i+" 0 l65 45 L145 "+(s-80)+" H400000z"},be=function(s,i,u){const h=u-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"},Ce=function(s,i,u){i=1e3*i;let h="";switch(s){case"sqrtMain":h=Oe(i,pe);break;case"sqrtSize1":h=Q(i,pe);break;case"sqrtSize2":h=fe(i,pe);break;case"sqrtSize3":h=se(i,pe);break;case"sqrtSize4":h=ae(i,pe);break;case"sqrtTall":h=be(i,pe,u)}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""}},Ee={doubleleftarrow:`M262 157
|
|
284
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
285
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
286
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
287
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
288
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
289
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
290
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
291
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
292
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
293
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
294
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
295
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
296
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
297
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
298
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
299
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
300
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
301
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
302
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
303
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
304
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
305
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
306
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
307
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
308
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
309
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
310
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
311
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
312
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
313
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
314
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
315
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
316
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
317
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
318
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
319
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
320
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
321
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
322
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
323
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
324
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
325
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
326
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
327
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
328
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
329
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
330
|
+
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
331
|
+
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
332
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
333
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
334
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
335
|
+
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
336
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
337
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
338
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
339
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
340
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
341
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
342
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
343
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
344
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
345
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
346
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
347
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
348
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
349
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
350
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
351
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
352
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
353
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
354
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
355
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
356
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
357
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
358
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
359
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
360
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
361
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
362
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
363
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
364
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
365
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
366
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
367
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
368
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
369
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
370
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
371
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
372
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
373
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
374
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
375
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
376
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
377
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
378
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
379
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
380
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
381
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
382
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
383
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
384
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
385
|
+
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
386
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
387
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
388
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
389
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
390
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
391
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
392
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
393
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
394
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
395
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
396
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
397
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
398
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
399
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
400
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
401
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
402
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
403
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
404
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
405
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
406
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
407
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
408
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
409
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
410
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
411
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
412
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
413
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
414
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
415
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
416
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
417
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
418
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
419
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
420
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
421
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
422
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
423
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
424
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
425
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
426
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
427
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
428
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
429
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
430
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
431
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
432
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
433
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
434
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
435
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
436
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
437
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
438
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
439
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
440
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
441
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
442
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
443
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
444
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
445
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
446
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
447
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
448
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
449
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
450
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
451
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
452
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
453
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
454
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
455
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
456
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
457
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
458
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},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 Ze(s,i){Ne[s]=i}function tt(s,i,u){if(!Ne[i])throw new Error("Font metrics not found for font: "+i+".");let h=s.charCodeAt(0),b=Ne[i][h];if(!b&&s[0]in He&&(h=He[s[0]].charCodeAt(0),b=Ne[i][h]),!b&&u==="text"&&ne(h)&&(b=Ne[i][77]),b)return{depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]}}const Te={};function _e(s){let i;if(s>=5?i=0:s>=3?i=1:i=2,!Te[i]){const u=Te[i]={cssEmPerMu:Me.quad[i]/18};for(const h in Me)Me.hasOwnProperty(h)&&(u[h]=Me[h][i])}return Te[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]],st=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],rt=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=st[this.size-1],this.maxSize=i.maxSize,this.minRuleThickness=i.minRuleThickness,this._fontMetrics=void 0}extend(i){const u={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)&&(u[h]=i[h]);return new Qe(u)}havingStyle(i){return this.style===i?this:this.extend({style:i,size:rt(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:st[i-1]})}havingBaseStyle(i){i=i||this.style.text();const u=rt(Qe.BASESIZE,i);return this.size===u&&this.textSize===Qe.BASESIZE&&this.style===i?this:this.extend({style:i,size:u})}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 St=Qe;const mt={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},ct={ex:!0,em:!0,mu:!0},bt=function(s){return typeof s!="string"&&(s=s.unit),s in mt||s in ct||s==="ex"},Ie=function(s,i){let u;if(s.unit in mt)u=mt[s.unit]/i.fontMetrics().ptPerEm/i.sizeMultiplier;else if(s.unit==="mu")u=i.fontMetrics().cssEmPerMu;else{let h;if(i.style.isTight()?h=i.havingStyle(i.style.text()):h=i,s.unit==="ex")u=h.fontMetrics().xHeight;else if(s.unit==="em")u=h.fontMetrics().quad;else throw new a("Invalid unit: '"+s.unit+"'");h!==i&&(u*=h.sizeMultiplier/i.sizeMultiplier)}return Math.min(s.number*u,i.maxSize)},ue=function(s){return+s.toFixed(4)+"em"},nt=function(s){return s.filter(i=>i).join(" ")},pt=function(s,i,u){if(this.classes=s||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=u||{},i){i.style.isTight()&&this.classes.push("mtight");const h=i.getColor();h&&(this.style.color=h)}},Dt=function(s){const i=document.createElement(s);i.className=nt(this.classes);for(const u in this.style)this.style.hasOwnProperty(u)&&(i.style[u]=this.style[u]);for(const u in this.attributes)this.attributes.hasOwnProperty(u)&&i.setAttribute(u,this.attributes[u]);for(let u=0;u<this.children.length;u++)i.appendChild(this.children[u].toNode());return i},vt=/[\s"'>/=\x00-\x1f]/,Kt=function(s){let i="<"+s;this.classes.length&&(i+=' class="'+D.escape(nt(this.classes))+'"');let u="";for(const h in this.style)this.style.hasOwnProperty(h)&&(u+=D.hyphenate(h)+":"+this.style[h]+";");u&&(i+=' style="'+D.escape(u)+'"');for(const h in this.attributes)if(this.attributes.hasOwnProperty(h)){if(vt.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 Ct{constructor(i,u,h,b){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,pt.call(this,i,h,b),this.children=u||[]}setAttribute(i,u){this.attributes[i]=u}hasClass(i){return this.classes.includes(i)}toNode(){return Dt.call(this,"span")}toMarkup(){return Kt.call(this,"span")}}class Nt{constructor(i,u,h,b){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,pt.call(this,u,b),this.children=h||[],this.setAttribute("href",i)}setAttribute(i,u){this.attributes[i]=u}hasClass(i){return this.classes.includes(i)}toNode(){return Dt.call(this,"a")}toMarkup(){return Kt.call(this,"a")}}class _t{constructor(i,u,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=u,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 u in this.style)this.style.hasOwnProperty(u)&&(i.style[u]=this.style[u]);return i}toMarkup(){let i='<img src="'+D.escape(this.src)+'"'+(' alt="'+D.escape(this.alt)+'"'),u="";for(const h in this.style)this.style.hasOwnProperty(h)&&(u+=D.hyphenate(h)+":"+this.style[h]+";");return u&&(i+=' style="'+D.escape(u)+'"'),i+="'/>",i}}const rr={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"};class yt{constructor(i,u,h,b,S,$,_,Z){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=u||0,this.depth=h||0,this.italic=b||0,this.skew=S||0,this.width=$||0,this.classes=_||[],this.style=Z||{},this.maxFontSize=0;const re=ce(this.text.charCodeAt(0));re&&this.classes.push(re+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=rr[this.text])}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createTextNode(this.text);let u=null;this.italic>0&&(u=document.createElement("span"),u.style.marginRight=ue(this.italic)),this.classes.length>0&&(u=u||document.createElement("span"),u.className=nt(this.classes));for(const h in this.style)this.style.hasOwnProperty(h)&&(u=u||document.createElement("span"),u.style[h]=this.style[h]);return u?(u.appendChild(i),u):i}toMarkup(){let i=!1,u="<span";this.classes.length&&(i=!0,u+=' class="',u+=D.escape(nt(this.classes)),u+='"');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,u+=' style="'+D.escape(h)+'"');const b=D.escape(this.text);return i?(u+=">",u+=b,u+="</span>",u):b}}class cr{constructor(i,u){this.children=void 0,this.attributes=void 0,this.children=i||[],this.attributes=u||{}}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const u in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,u)&&i.setAttribute(u,this.attributes[u]);for(let u=0;u<this.children.length;u++)i.appendChild(this.children[u].toNode());return i}toMarkup(){let i='<svg xmlns="http://www.w3.org/2000/svg"';for(const u in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,u)&&(i+=" "+u+'="'+D.escape(this.attributes[u])+'"');i+=">";for(let u=0;u<this.children.length;u++)i+=this.children[u].toMarkup();return i+="</svg>",i}}class Xt{constructor(i,u){this.pathName=void 0,this.alternate=void 0,this.pathName=i,this.alternate=u}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?i.setAttribute("d",this.alternate):i.setAttribute("d",Ee[this.pathName]),i}toMarkup(){return this.alternate?'<path d="'+D.escape(this.alternate)+'"/>':'<path d="'+D.escape(Ee[this.pathName])+'"/>'}}class Pr{constructor(i){this.attributes=void 0,this.attributes=i||{}}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","line");for(const u in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,u)&&i.setAttribute(u,this.attributes[u]);return i}toMarkup(){let i="<line";for(const u in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,u)&&(i+=" "+u+'="'+D.escape(this.attributes[u])+'"');return i+="/>",i}}function kr(s){if(s instanceof yt)return s;throw new Error("Expected symbolNode but got "+String(s)+".")}function yr(s){if(s instanceof Ct)return s;throw new Error("Expected span<HtmlDomNode> but got "+String(s)+".")}const dt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},nr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},or={math:{},text:{}};var Tt=or;function x(s,i,u,h,b,S){or[s][b]={font:i,group:u,replace:h},S&&h&&(or[s][h]=or[s][b])}const k="math",Pe="text",E="main",j="ams",Ue="accent-token",De="bin",de="close",Ae="inner",ve="mathord",je="op-token",ie="open",we="punct",M="rel",qe="spacing",J="textord";x(k,E,M,"\u2261","\\equiv",!0),x(k,E,M,"\u227A","\\prec",!0),x(k,E,M,"\u227B","\\succ",!0),x(k,E,M,"\u223C","\\sim",!0),x(k,E,M,"\u22A5","\\perp"),x(k,E,M,"\u2AAF","\\preceq",!0),x(k,E,M,"\u2AB0","\\succeq",!0),x(k,E,M,"\u2243","\\simeq",!0),x(k,E,M,"\u2223","\\mid",!0),x(k,E,M,"\u226A","\\ll",!0),x(k,E,M,"\u226B","\\gg",!0),x(k,E,M,"\u224D","\\asymp",!0),x(k,E,M,"\u2225","\\parallel"),x(k,E,M,"\u22C8","\\bowtie",!0),x(k,E,M,"\u2323","\\smile",!0),x(k,E,M,"\u2291","\\sqsubseteq",!0),x(k,E,M,"\u2292","\\sqsupseteq",!0),x(k,E,M,"\u2250","\\doteq",!0),x(k,E,M,"\u2322","\\frown",!0),x(k,E,M,"\u220B","\\ni",!0),x(k,E,M,"\u221D","\\propto",!0),x(k,E,M,"\u22A2","\\vdash",!0),x(k,E,M,"\u22A3","\\dashv",!0),x(k,E,M,"\u220B","\\owns"),x(k,E,we,".","\\ldotp"),x(k,E,we,"\u22C5","\\cdotp"),x(k,E,J,"#","\\#"),x(Pe,E,J,"#","\\#"),x(k,E,J,"&","\\&"),x(Pe,E,J,"&","\\&"),x(k,E,J,"\u2135","\\aleph",!0),x(k,E,J,"\u2200","\\forall",!0),x(k,E,J,"\u210F","\\hbar",!0),x(k,E,J,"\u2203","\\exists",!0),x(k,E,J,"\u2207","\\nabla",!0),x(k,E,J,"\u266D","\\flat",!0),x(k,E,J,"\u2113","\\ell",!0),x(k,E,J,"\u266E","\\natural",!0),x(k,E,J,"\u2663","\\clubsuit",!0),x(k,E,J,"\u2118","\\wp",!0),x(k,E,J,"\u266F","\\sharp",!0),x(k,E,J,"\u2662","\\diamondsuit",!0),x(k,E,J,"\u211C","\\Re",!0),x(k,E,J,"\u2661","\\heartsuit",!0),x(k,E,J,"\u2111","\\Im",!0),x(k,E,J,"\u2660","\\spadesuit",!0),x(k,E,J,"\xA7","\\S",!0),x(Pe,E,J,"\xA7","\\S"),x(k,E,J,"\xB6","\\P",!0),x(Pe,E,J,"\xB6","\\P"),x(k,E,J,"\u2020","\\dag"),x(Pe,E,J,"\u2020","\\dag"),x(Pe,E,J,"\u2020","\\textdagger"),x(k,E,J,"\u2021","\\ddag"),x(Pe,E,J,"\u2021","\\ddag"),x(Pe,E,J,"\u2021","\\textdaggerdbl"),x(k,E,de,"\u23B1","\\rmoustache",!0),x(k,E,ie,"\u23B0","\\lmoustache",!0),x(k,E,de,"\u27EF","\\rgroup",!0),x(k,E,ie,"\u27EE","\\lgroup",!0),x(k,E,De,"\u2213","\\mp",!0),x(k,E,De,"\u2296","\\ominus",!0),x(k,E,De,"\u228E","\\uplus",!0),x(k,E,De,"\u2293","\\sqcap",!0),x(k,E,De,"\u2217","\\ast"),x(k,E,De,"\u2294","\\sqcup",!0),x(k,E,De,"\u25EF","\\bigcirc",!0),x(k,E,De,"\u2219","\\bullet",!0),x(k,E,De,"\u2021","\\ddagger"),x(k,E,De,"\u2240","\\wr",!0),x(k,E,De,"\u2A3F","\\amalg"),x(k,E,De,"&","\\And"),x(k,E,M,"\u27F5","\\longleftarrow",!0),x(k,E,M,"\u21D0","\\Leftarrow",!0),x(k,E,M,"\u27F8","\\Longleftarrow",!0),x(k,E,M,"\u27F6","\\longrightarrow",!0),x(k,E,M,"\u21D2","\\Rightarrow",!0),x(k,E,M,"\u27F9","\\Longrightarrow",!0),x(k,E,M,"\u2194","\\leftrightarrow",!0),x(k,E,M,"\u27F7","\\longleftrightarrow",!0),x(k,E,M,"\u21D4","\\Leftrightarrow",!0),x(k,E,M,"\u27FA","\\Longleftrightarrow",!0),x(k,E,M,"\u21A6","\\mapsto",!0),x(k,E,M,"\u27FC","\\longmapsto",!0),x(k,E,M,"\u2197","\\nearrow",!0),x(k,E,M,"\u21A9","\\hookleftarrow",!0),x(k,E,M,"\u21AA","\\hookrightarrow",!0),x(k,E,M,"\u2198","\\searrow",!0),x(k,E,M,"\u21BC","\\leftharpoonup",!0),x(k,E,M,"\u21C0","\\rightharpoonup",!0),x(k,E,M,"\u2199","\\swarrow",!0),x(k,E,M,"\u21BD","\\leftharpoondown",!0),x(k,E,M,"\u21C1","\\rightharpoondown",!0),x(k,E,M,"\u2196","\\nwarrow",!0),x(k,E,M,"\u21CC","\\rightleftharpoons",!0),x(k,j,M,"\u226E","\\nless",!0),x(k,j,M,"\uE010","\\@nleqslant"),x(k,j,M,"\uE011","\\@nleqq"),x(k,j,M,"\u2A87","\\lneq",!0),x(k,j,M,"\u2268","\\lneqq",!0),x(k,j,M,"\uE00C","\\@lvertneqq"),x(k,j,M,"\u22E6","\\lnsim",!0),x(k,j,M,"\u2A89","\\lnapprox",!0),x(k,j,M,"\u2280","\\nprec",!0),x(k,j,M,"\u22E0","\\npreceq",!0),x(k,j,M,"\u22E8","\\precnsim",!0),x(k,j,M,"\u2AB9","\\precnapprox",!0),x(k,j,M,"\u2241","\\nsim",!0),x(k,j,M,"\uE006","\\@nshortmid"),x(k,j,M,"\u2224","\\nmid",!0),x(k,j,M,"\u22AC","\\nvdash",!0),x(k,j,M,"\u22AD","\\nvDash",!0),x(k,j,M,"\u22EA","\\ntriangleleft"),x(k,j,M,"\u22EC","\\ntrianglelefteq",!0),x(k,j,M,"\u228A","\\subsetneq",!0),x(k,j,M,"\uE01A","\\@varsubsetneq"),x(k,j,M,"\u2ACB","\\subsetneqq",!0),x(k,j,M,"\uE017","\\@varsubsetneqq"),x(k,j,M,"\u226F","\\ngtr",!0),x(k,j,M,"\uE00F","\\@ngeqslant"),x(k,j,M,"\uE00E","\\@ngeqq"),x(k,j,M,"\u2A88","\\gneq",!0),x(k,j,M,"\u2269","\\gneqq",!0),x(k,j,M,"\uE00D","\\@gvertneqq"),x(k,j,M,"\u22E7","\\gnsim",!0),x(k,j,M,"\u2A8A","\\gnapprox",!0),x(k,j,M,"\u2281","\\nsucc",!0),x(k,j,M,"\u22E1","\\nsucceq",!0),x(k,j,M,"\u22E9","\\succnsim",!0),x(k,j,M,"\u2ABA","\\succnapprox",!0),x(k,j,M,"\u2246","\\ncong",!0),x(k,j,M,"\uE007","\\@nshortparallel"),x(k,j,M,"\u2226","\\nparallel",!0),x(k,j,M,"\u22AF","\\nVDash",!0),x(k,j,M,"\u22EB","\\ntriangleright"),x(k,j,M,"\u22ED","\\ntrianglerighteq",!0),x(k,j,M,"\uE018","\\@nsupseteqq"),x(k,j,M,"\u228B","\\supsetneq",!0),x(k,j,M,"\uE01B","\\@varsupsetneq"),x(k,j,M,"\u2ACC","\\supsetneqq",!0),x(k,j,M,"\uE019","\\@varsupsetneqq"),x(k,j,M,"\u22AE","\\nVdash",!0),x(k,j,M,"\u2AB5","\\precneqq",!0),x(k,j,M,"\u2AB6","\\succneqq",!0),x(k,j,M,"\uE016","\\@nsubseteqq"),x(k,j,De,"\u22B4","\\unlhd"),x(k,j,De,"\u22B5","\\unrhd"),x(k,j,M,"\u219A","\\nleftarrow",!0),x(k,j,M,"\u219B","\\nrightarrow",!0),x(k,j,M,"\u21CD","\\nLeftarrow",!0),x(k,j,M,"\u21CF","\\nRightarrow",!0),x(k,j,M,"\u21AE","\\nleftrightarrow",!0),x(k,j,M,"\u21CE","\\nLeftrightarrow",!0),x(k,j,M,"\u25B3","\\vartriangle"),x(k,j,J,"\u210F","\\hslash"),x(k,j,J,"\u25BD","\\triangledown"),x(k,j,J,"\u25CA","\\lozenge"),x(k,j,J,"\u24C8","\\circledS"),x(k,j,J,"\xAE","\\circledR"),x(Pe,j,J,"\xAE","\\circledR"),x(k,j,J,"\u2221","\\measuredangle",!0),x(k,j,J,"\u2204","\\nexists"),x(k,j,J,"\u2127","\\mho"),x(k,j,J,"\u2132","\\Finv",!0),x(k,j,J,"\u2141","\\Game",!0),x(k,j,J,"\u2035","\\backprime"),x(k,j,J,"\u25B2","\\blacktriangle"),x(k,j,J,"\u25BC","\\blacktriangledown"),x(k,j,J,"\u25A0","\\blacksquare"),x(k,j,J,"\u29EB","\\blacklozenge"),x(k,j,J,"\u2605","\\bigstar"),x(k,j,J,"\u2222","\\sphericalangle",!0),x(k,j,J,"\u2201","\\complement",!0),x(k,j,J,"\xF0","\\eth",!0),x(Pe,E,J,"\xF0","\xF0"),x(k,j,J,"\u2571","\\diagup"),x(k,j,J,"\u2572","\\diagdown"),x(k,j,J,"\u25A1","\\square"),x(k,j,J,"\u25A1","\\Box"),x(k,j,J,"\u25CA","\\Diamond"),x(k,j,J,"\xA5","\\yen",!0),x(Pe,j,J,"\xA5","\\yen",!0),x(k,j,J,"\u2713","\\checkmark",!0),x(Pe,j,J,"\u2713","\\checkmark"),x(k,j,J,"\u2136","\\beth",!0),x(k,j,J,"\u2138","\\daleth",!0),x(k,j,J,"\u2137","\\gimel",!0),x(k,j,J,"\u03DD","\\digamma",!0),x(k,j,J,"\u03F0","\\varkappa"),x(k,j,ie,"\u250C","\\@ulcorner",!0),x(k,j,de,"\u2510","\\@urcorner",!0),x(k,j,ie,"\u2514","\\@llcorner",!0),x(k,j,de,"\u2518","\\@lrcorner",!0),x(k,j,M,"\u2266","\\leqq",!0),x(k,j,M,"\u2A7D","\\leqslant",!0),x(k,j,M,"\u2A95","\\eqslantless",!0),x(k,j,M,"\u2272","\\lesssim",!0),x(k,j,M,"\u2A85","\\lessapprox",!0),x(k,j,M,"\u224A","\\approxeq",!0),x(k,j,De,"\u22D6","\\lessdot"),x(k,j,M,"\u22D8","\\lll",!0),x(k,j,M,"\u2276","\\lessgtr",!0),x(k,j,M,"\u22DA","\\lesseqgtr",!0),x(k,j,M,"\u2A8B","\\lesseqqgtr",!0),x(k,j,M,"\u2251","\\doteqdot"),x(k,j,M,"\u2253","\\risingdotseq",!0),x(k,j,M,"\u2252","\\fallingdotseq",!0),x(k,j,M,"\u223D","\\backsim",!0),x(k,j,M,"\u22CD","\\backsimeq",!0),x(k,j,M,"\u2AC5","\\subseteqq",!0),x(k,j,M,"\u22D0","\\Subset",!0),x(k,j,M,"\u228F","\\sqsubset",!0),x(k,j,M,"\u227C","\\preccurlyeq",!0),x(k,j,M,"\u22DE","\\curlyeqprec",!0),x(k,j,M,"\u227E","\\precsim",!0),x(k,j,M,"\u2AB7","\\precapprox",!0),x(k,j,M,"\u22B2","\\vartriangleleft"),x(k,j,M,"\u22B4","\\trianglelefteq"),x(k,j,M,"\u22A8","\\vDash",!0),x(k,j,M,"\u22AA","\\Vvdash",!0),x(k,j,M,"\u2323","\\smallsmile"),x(k,j,M,"\u2322","\\smallfrown"),x(k,j,M,"\u224F","\\bumpeq",!0),x(k,j,M,"\u224E","\\Bumpeq",!0),x(k,j,M,"\u2267","\\geqq",!0),x(k,j,M,"\u2A7E","\\geqslant",!0),x(k,j,M,"\u2A96","\\eqslantgtr",!0),x(k,j,M,"\u2273","\\gtrsim",!0),x(k,j,M,"\u2A86","\\gtrapprox",!0),x(k,j,De,"\u22D7","\\gtrdot"),x(k,j,M,"\u22D9","\\ggg",!0),x(k,j,M,"\u2277","\\gtrless",!0),x(k,j,M,"\u22DB","\\gtreqless",!0),x(k,j,M,"\u2A8C","\\gtreqqless",!0),x(k,j,M,"\u2256","\\eqcirc",!0),x(k,j,M,"\u2257","\\circeq",!0),x(k,j,M,"\u225C","\\triangleq",!0),x(k,j,M,"\u223C","\\thicksim"),x(k,j,M,"\u2248","\\thickapprox"),x(k,j,M,"\u2AC6","\\supseteqq",!0),x(k,j,M,"\u22D1","\\Supset",!0),x(k,j,M,"\u2290","\\sqsupset",!0),x(k,j,M,"\u227D","\\succcurlyeq",!0),x(k,j,M,"\u22DF","\\curlyeqsucc",!0),x(k,j,M,"\u227F","\\succsim",!0),x(k,j,M,"\u2AB8","\\succapprox",!0),x(k,j,M,"\u22B3","\\vartriangleright"),x(k,j,M,"\u22B5","\\trianglerighteq"),x(k,j,M,"\u22A9","\\Vdash",!0),x(k,j,M,"\u2223","\\shortmid"),x(k,j,M,"\u2225","\\shortparallel"),x(k,j,M,"\u226C","\\between",!0),x(k,j,M,"\u22D4","\\pitchfork",!0),x(k,j,M,"\u221D","\\varpropto"),x(k,j,M,"\u25C0","\\blacktriangleleft"),x(k,j,M,"\u2234","\\therefore",!0),x(k,j,M,"\u220D","\\backepsilon"),x(k,j,M,"\u25B6","\\blacktriangleright"),x(k,j,M,"\u2235","\\because",!0),x(k,j,M,"\u22D8","\\llless"),x(k,j,M,"\u22D9","\\gggtr"),x(k,j,De,"\u22B2","\\lhd"),x(k,j,De,"\u22B3","\\rhd"),x(k,j,M,"\u2242","\\eqsim",!0),x(k,E,M,"\u22C8","\\Join"),x(k,j,M,"\u2251","\\Doteq",!0),x(k,j,De,"\u2214","\\dotplus",!0),x(k,j,De,"\u2216","\\smallsetminus"),x(k,j,De,"\u22D2","\\Cap",!0),x(k,j,De,"\u22D3","\\Cup",!0),x(k,j,De,"\u2A5E","\\doublebarwedge",!0),x(k,j,De,"\u229F","\\boxminus",!0),x(k,j,De,"\u229E","\\boxplus",!0),x(k,j,De,"\u22C7","\\divideontimes",!0),x(k,j,De,"\u22C9","\\ltimes",!0),x(k,j,De,"\u22CA","\\rtimes",!0),x(k,j,De,"\u22CB","\\leftthreetimes",!0),x(k,j,De,"\u22CC","\\rightthreetimes",!0),x(k,j,De,"\u22CF","\\curlywedge",!0),x(k,j,De,"\u22CE","\\curlyvee",!0),x(k,j,De,"\u229D","\\circleddash",!0),x(k,j,De,"\u229B","\\circledast",!0),x(k,j,De,"\u22C5","\\centerdot"),x(k,j,De,"\u22BA","\\intercal",!0),x(k,j,De,"\u22D2","\\doublecap"),x(k,j,De,"\u22D3","\\doublecup"),x(k,j,De,"\u22A0","\\boxtimes",!0),x(k,j,M,"\u21E2","\\dashrightarrow",!0),x(k,j,M,"\u21E0","\\dashleftarrow",!0),x(k,j,M,"\u21C7","\\leftleftarrows",!0),x(k,j,M,"\u21C6","\\leftrightarrows",!0),x(k,j,M,"\u21DA","\\Lleftarrow",!0),x(k,j,M,"\u219E","\\twoheadleftarrow",!0),x(k,j,M,"\u21A2","\\leftarrowtail",!0),x(k,j,M,"\u21AB","\\looparrowleft",!0),x(k,j,M,"\u21CB","\\leftrightharpoons",!0),x(k,j,M,"\u21B6","\\curvearrowleft",!0),x(k,j,M,"\u21BA","\\circlearrowleft",!0),x(k,j,M,"\u21B0","\\Lsh",!0),x(k,j,M,"\u21C8","\\upuparrows",!0),x(k,j,M,"\u21BF","\\upharpoonleft",!0),x(k,j,M,"\u21C3","\\downharpoonleft",!0),x(k,E,M,"\u22B6","\\origof",!0),x(k,E,M,"\u22B7","\\imageof",!0),x(k,j,M,"\u22B8","\\multimap",!0),x(k,j,M,"\u21AD","\\leftrightsquigarrow",!0),x(k,j,M,"\u21C9","\\rightrightarrows",!0),x(k,j,M,"\u21C4","\\rightleftarrows",!0),x(k,j,M,"\u21A0","\\twoheadrightarrow",!0),x(k,j,M,"\u21A3","\\rightarrowtail",!0),x(k,j,M,"\u21AC","\\looparrowright",!0),x(k,j,M,"\u21B7","\\curvearrowright",!0),x(k,j,M,"\u21BB","\\circlearrowright",!0),x(k,j,M,"\u21B1","\\Rsh",!0),x(k,j,M,"\u21CA","\\downdownarrows",!0),x(k,j,M,"\u21BE","\\upharpoonright",!0),x(k,j,M,"\u21C2","\\downharpoonright",!0),x(k,j,M,"\u21DD","\\rightsquigarrow",!0),x(k,j,M,"\u21DD","\\leadsto"),x(k,j,M,"\u21DB","\\Rrightarrow",!0),x(k,j,M,"\u21BE","\\restriction"),x(k,E,J,"\u2018","`"),x(k,E,J,"$","\\$"),x(Pe,E,J,"$","\\$"),x(Pe,E,J,"$","\\textdollar"),x(k,E,J,"%","\\%"),x(Pe,E,J,"%","\\%"),x(k,E,J,"_","\\_"),x(Pe,E,J,"_","\\_"),x(Pe,E,J,"_","\\textunderscore"),x(k,E,J,"\u2220","\\angle",!0),x(k,E,J,"\u221E","\\infty",!0),x(k,E,J,"\u2032","\\prime"),x(k,E,J,"\u25B3","\\triangle"),x(k,E,J,"\u0393","\\Gamma",!0),x(k,E,J,"\u0394","\\Delta",!0),x(k,E,J,"\u0398","\\Theta",!0),x(k,E,J,"\u039B","\\Lambda",!0),x(k,E,J,"\u039E","\\Xi",!0),x(k,E,J,"\u03A0","\\Pi",!0),x(k,E,J,"\u03A3","\\Sigma",!0),x(k,E,J,"\u03A5","\\Upsilon",!0),x(k,E,J,"\u03A6","\\Phi",!0),x(k,E,J,"\u03A8","\\Psi",!0),x(k,E,J,"\u03A9","\\Omega",!0),x(k,E,J,"A","\u0391"),x(k,E,J,"B","\u0392"),x(k,E,J,"E","\u0395"),x(k,E,J,"Z","\u0396"),x(k,E,J,"H","\u0397"),x(k,E,J,"I","\u0399"),x(k,E,J,"K","\u039A"),x(k,E,J,"M","\u039C"),x(k,E,J,"N","\u039D"),x(k,E,J,"O","\u039F"),x(k,E,J,"P","\u03A1"),x(k,E,J,"T","\u03A4"),x(k,E,J,"X","\u03A7"),x(k,E,J,"\xAC","\\neg",!0),x(k,E,J,"\xAC","\\lnot"),x(k,E,J,"\u22A4","\\top"),x(k,E,J,"\u22A5","\\bot"),x(k,E,J,"\u2205","\\emptyset"),x(k,j,J,"\u2205","\\varnothing"),x(k,E,ve,"\u03B1","\\alpha",!0),x(k,E,ve,"\u03B2","\\beta",!0),x(k,E,ve,"\u03B3","\\gamma",!0),x(k,E,ve,"\u03B4","\\delta",!0),x(k,E,ve,"\u03F5","\\epsilon",!0),x(k,E,ve,"\u03B6","\\zeta",!0),x(k,E,ve,"\u03B7","\\eta",!0),x(k,E,ve,"\u03B8","\\theta",!0),x(k,E,ve,"\u03B9","\\iota",!0),x(k,E,ve,"\u03BA","\\kappa",!0),x(k,E,ve,"\u03BB","\\lambda",!0),x(k,E,ve,"\u03BC","\\mu",!0),x(k,E,ve,"\u03BD","\\nu",!0),x(k,E,ve,"\u03BE","\\xi",!0),x(k,E,ve,"\u03BF","\\omicron",!0),x(k,E,ve,"\u03C0","\\pi",!0),x(k,E,ve,"\u03C1","\\rho",!0),x(k,E,ve,"\u03C3","\\sigma",!0),x(k,E,ve,"\u03C4","\\tau",!0),x(k,E,ve,"\u03C5","\\upsilon",!0),x(k,E,ve,"\u03D5","\\phi",!0),x(k,E,ve,"\u03C7","\\chi",!0),x(k,E,ve,"\u03C8","\\psi",!0),x(k,E,ve,"\u03C9","\\omega",!0),x(k,E,ve,"\u03B5","\\varepsilon",!0),x(k,E,ve,"\u03D1","\\vartheta",!0),x(k,E,ve,"\u03D6","\\varpi",!0),x(k,E,ve,"\u03F1","\\varrho",!0),x(k,E,ve,"\u03C2","\\varsigma",!0),x(k,E,ve,"\u03C6","\\varphi",!0),x(k,E,De,"\u2217","*",!0),x(k,E,De,"+","+"),x(k,E,De,"\u2212","-",!0),x(k,E,De,"\u22C5","\\cdot",!0),x(k,E,De,"\u2218","\\circ",!0),x(k,E,De,"\xF7","\\div",!0),x(k,E,De,"\xB1","\\pm",!0),x(k,E,De,"\xD7","\\times",!0),x(k,E,De,"\u2229","\\cap",!0),x(k,E,De,"\u222A","\\cup",!0),x(k,E,De,"\u2216","\\setminus",!0),x(k,E,De,"\u2227","\\land"),x(k,E,De,"\u2228","\\lor"),x(k,E,De,"\u2227","\\wedge",!0),x(k,E,De,"\u2228","\\vee",!0),x(k,E,J,"\u221A","\\surd"),x(k,E,ie,"\u27E8","\\langle",!0),x(k,E,ie,"\u2223","\\lvert"),x(k,E,ie,"\u2225","\\lVert"),x(k,E,de,"?","?"),x(k,E,de,"!","!"),x(k,E,de,"\u27E9","\\rangle",!0),x(k,E,de,"\u2223","\\rvert"),x(k,E,de,"\u2225","\\rVert"),x(k,E,M,"=","="),x(k,E,M,":",":"),x(k,E,M,"\u2248","\\approx",!0),x(k,E,M,"\u2245","\\cong",!0),x(k,E,M,"\u2265","\\ge"),x(k,E,M,"\u2265","\\geq",!0),x(k,E,M,"\u2190","\\gets"),x(k,E,M,">","\\gt",!0),x(k,E,M,"\u2208","\\in",!0),x(k,E,M,"\uE020","\\@not"),x(k,E,M,"\u2282","\\subset",!0),x(k,E,M,"\u2283","\\supset",!0),x(k,E,M,"\u2286","\\subseteq",!0),x(k,E,M,"\u2287","\\supseteq",!0),x(k,j,M,"\u2288","\\nsubseteq",!0),x(k,j,M,"\u2289","\\nsupseteq",!0),x(k,E,M,"\u22A8","\\models"),x(k,E,M,"\u2190","\\leftarrow",!0),x(k,E,M,"\u2264","\\le"),x(k,E,M,"\u2264","\\leq",!0),x(k,E,M,"<","\\lt",!0),x(k,E,M,"\u2192","\\rightarrow",!0),x(k,E,M,"\u2192","\\to"),x(k,j,M,"\u2271","\\ngeq",!0),x(k,j,M,"\u2270","\\nleq",!0),x(k,E,qe,"\xA0","\\ "),x(k,E,qe,"\xA0","\\space"),x(k,E,qe,"\xA0","\\nobreakspace"),x(Pe,E,qe,"\xA0","\\ "),x(Pe,E,qe,"\xA0"," "),x(Pe,E,qe,"\xA0","\\space"),x(Pe,E,qe,"\xA0","\\nobreakspace"),x(k,E,qe,null,"\\nobreak"),x(k,E,qe,null,"\\allowbreak"),x(k,E,we,",",","),x(k,E,we,";",";"),x(k,j,De,"\u22BC","\\barwedge",!0),x(k,j,De,"\u22BB","\\veebar",!0),x(k,E,De,"\u2299","\\odot",!0),x(k,E,De,"\u2295","\\oplus",!0),x(k,E,De,"\u2297","\\otimes",!0),x(k,E,J,"\u2202","\\partial",!0),x(k,E,De,"\u2298","\\oslash",!0),x(k,j,De,"\u229A","\\circledcirc",!0),x(k,j,De,"\u22A1","\\boxdot",!0),x(k,E,De,"\u25B3","\\bigtriangleup"),x(k,E,De,"\u25BD","\\bigtriangledown"),x(k,E,De,"\u2020","\\dagger"),x(k,E,De,"\u22C4","\\diamond"),x(k,E,De,"\u22C6","\\star"),x(k,E,De,"\u25C3","\\triangleleft"),x(k,E,De,"\u25B9","\\triangleright"),x(k,E,ie,"{","\\{"),x(Pe,E,J,"{","\\{"),x(Pe,E,J,"{","\\textbraceleft"),x(k,E,de,"}","\\}"),x(Pe,E,J,"}","\\}"),x(Pe,E,J,"}","\\textbraceright"),x(k,E,ie,"{","\\lbrace"),x(k,E,de,"}","\\rbrace"),x(k,E,ie,"[","\\lbrack",!0),x(Pe,E,J,"[","\\lbrack",!0),x(k,E,de,"]","\\rbrack",!0),x(Pe,E,J,"]","\\rbrack",!0),x(k,E,ie,"(","\\lparen",!0),x(k,E,de,")","\\rparen",!0),x(Pe,E,J,"<","\\textless",!0),x(Pe,E,J,">","\\textgreater",!0),x(k,E,ie,"\u230A","\\lfloor",!0),x(k,E,de,"\u230B","\\rfloor",!0),x(k,E,ie,"\u2308","\\lceil",!0),x(k,E,de,"\u2309","\\rceil",!0),x(k,E,J,"\\","\\backslash"),x(k,E,J,"\u2223","|"),x(k,E,J,"\u2223","\\vert"),x(Pe,E,J,"|","\\textbar",!0),x(k,E,J,"\u2225","\\|"),x(k,E,J,"\u2225","\\Vert"),x(Pe,E,J,"\u2225","\\textbardbl"),x(Pe,E,J,"~","\\textasciitilde"),x(Pe,E,J,"\\","\\textbackslash"),x(Pe,E,J,"^","\\textasciicircum"),x(k,E,M,"\u2191","\\uparrow",!0),x(k,E,M,"\u21D1","\\Uparrow",!0),x(k,E,M,"\u2193","\\downarrow",!0),x(k,E,M,"\u21D3","\\Downarrow",!0),x(k,E,M,"\u2195","\\updownarrow",!0),x(k,E,M,"\u21D5","\\Updownarrow",!0),x(k,E,je,"\u2210","\\coprod"),x(k,E,je,"\u22C1","\\bigvee"),x(k,E,je,"\u22C0","\\bigwedge"),x(k,E,je,"\u2A04","\\biguplus"),x(k,E,je,"\u22C2","\\bigcap"),x(k,E,je,"\u22C3","\\bigcup"),x(k,E,je,"\u222B","\\int"),x(k,E,je,"\u222B","\\intop"),x(k,E,je,"\u222C","\\iint"),x(k,E,je,"\u222D","\\iiint"),x(k,E,je,"\u220F","\\prod"),x(k,E,je,"\u2211","\\sum"),x(k,E,je,"\u2A02","\\bigotimes"),x(k,E,je,"\u2A01","\\bigoplus"),x(k,E,je,"\u2A00","\\bigodot"),x(k,E,je,"\u222E","\\oint"),x(k,E,je,"\u222F","\\oiint"),x(k,E,je,"\u2230","\\oiiint"),x(k,E,je,"\u2A06","\\bigsqcup"),x(k,E,je,"\u222B","\\smallint"),x(Pe,E,Ae,"\u2026","\\textellipsis"),x(k,E,Ae,"\u2026","\\mathellipsis"),x(Pe,E,Ae,"\u2026","\\ldots",!0),x(k,E,Ae,"\u2026","\\ldots",!0),x(k,E,Ae,"\u22EF","\\@cdots",!0),x(k,E,Ae,"\u22F1","\\ddots",!0),x(k,E,J,"\u22EE","\\varvdots"),x(Pe,E,J,"\u22EE","\\varvdots"),x(k,E,Ue,"\u02CA","\\acute"),x(k,E,Ue,"\u02CB","\\grave"),x(k,E,Ue,"\xA8","\\ddot"),x(k,E,Ue,"~","\\tilde"),x(k,E,Ue,"\u02C9","\\bar"),x(k,E,Ue,"\u02D8","\\breve"),x(k,E,Ue,"\u02C7","\\check"),x(k,E,Ue,"^","\\hat"),x(k,E,Ue,"\u20D7","\\vec"),x(k,E,Ue,"\u02D9","\\dot"),x(k,E,Ue,"\u02DA","\\mathring"),x(k,E,ve,"\uE131","\\@imath"),x(k,E,ve,"\uE237","\\@jmath"),x(k,E,J,"\u0131","\u0131"),x(k,E,J,"\u0237","\u0237"),x(Pe,E,J,"\u0131","\\i",!0),x(Pe,E,J,"\u0237","\\j",!0),x(Pe,E,J,"\xDF","\\ss",!0),x(Pe,E,J,"\xE6","\\ae",!0),x(Pe,E,J,"\u0153","\\oe",!0),x(Pe,E,J,"\xF8","\\o",!0),x(Pe,E,J,"\xC6","\\AE",!0),x(Pe,E,J,"\u0152","\\OE",!0),x(Pe,E,J,"\xD8","\\O",!0),x(Pe,E,Ue,"\u02CA","\\'"),x(Pe,E,Ue,"\u02CB","\\`"),x(Pe,E,Ue,"\u02C6","\\^"),x(Pe,E,Ue,"\u02DC","\\~"),x(Pe,E,Ue,"\u02C9","\\="),x(Pe,E,Ue,"\u02D8","\\u"),x(Pe,E,Ue,"\u02D9","\\."),x(Pe,E,Ue,"\xB8","\\c"),x(Pe,E,Ue,"\u02DA","\\r"),x(Pe,E,Ue,"\u02C7","\\v"),x(Pe,E,Ue,"\xA8",'\\"'),x(Pe,E,Ue,"\u02DD","\\H"),x(Pe,E,Ue,"\u25EF","\\textcircled");const Mt={"--":!0,"---":!0,"``":!0,"''":!0};x(Pe,E,J,"\u2013","--",!0),x(Pe,E,J,"\u2013","\\textendash"),x(Pe,E,J,"\u2014","---",!0),x(Pe,E,J,"\u2014","\\textemdash"),x(Pe,E,J,"\u2018","`",!0),x(Pe,E,J,"\u2018","\\textquoteleft"),x(Pe,E,J,"\u2019","'",!0),x(Pe,E,J,"\u2019","\\textquoteright"),x(Pe,E,J,"\u201C","``",!0),x(Pe,E,J,"\u201C","\\textquotedblleft"),x(Pe,E,J,"\u201D","''",!0),x(Pe,E,J,"\u201D","\\textquotedblright"),x(k,E,J,"\xB0","\\degree",!0),x(Pe,E,J,"\xB0","\\degree"),x(Pe,E,J,"\xB0","\\textdegree",!0),x(k,E,J,"\xA3","\\pounds"),x(k,E,J,"\xA3","\\mathsterling",!0),x(Pe,E,J,"\xA3","\\pounds"),x(Pe,E,J,"\xA3","\\textsterling",!0),x(k,j,J,"\u2720","\\maltese"),x(Pe,j,J,"\u2720","\\maltese");const kt='0123456789/@."';for(let s=0;s<kt.length;s++){const i=kt.charAt(s);x(k,E,J,i,i)}const at='0123456789!@*()-=+";:?/.,';for(let s=0;s<at.length;s++){const i=at.charAt(s);x(Pe,E,J,i,i)}const gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let s=0;s<gt.length;s++){const i=gt.charAt(s);x(k,E,ve,i,i),x(Pe,E,J,i,i)}x(k,j,J,"C","\u2102"),x(Pe,j,J,"C","\u2102"),x(k,j,J,"H","\u210D"),x(Pe,j,J,"H","\u210D"),x(k,j,J,"N","\u2115"),x(Pe,j,J,"N","\u2115"),x(k,j,J,"P","\u2119"),x(Pe,j,J,"P","\u2119"),x(k,j,J,"Q","\u211A"),x(Pe,j,J,"Q","\u211A"),x(k,j,J,"R","\u211D"),x(Pe,j,J,"R","\u211D"),x(k,j,J,"Z","\u2124"),x(Pe,j,J,"Z","\u2124"),x(k,E,ve,"h","\u210E"),x(Pe,E,ve,"h","\u210E");let it="";for(let s=0;s<gt.length;s++){const i=gt.charAt(s);it=String.fromCharCode(55349,56320+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56372+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56424+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56580+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56684+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56736+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56788+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56840+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56944+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),s<26&&(it=String.fromCharCode(55349,56632+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,56476+s),x(k,E,ve,i,it),x(Pe,E,J,i,it))}it="\u{1D55C}",x(k,E,ve,"k",it),x(Pe,E,J,"k",it);for(let s=0;s<10;s++){const i=s.toString();it=String.fromCharCode(55349,57294+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,57314+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,57324+s),x(k,E,ve,i,it),x(Pe,E,J,i,it),it=String.fromCharCode(55349,57334+s),x(k,E,ve,i,it),x(Pe,E,J,i,it)}const qr="\xD0\xDE\xFE";for(let s=0;s<qr.length;s++){const i=qr.charAt(s);x(k,E,ve,i,i),x(Pe,E,J,i,i)}const fn=[["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"]],ko=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ka=function(s,i){const u=s.charCodeAt(0),h=s.charCodeAt(1),b=(u-55296)*1024+(h-56320)+65536,S=i==="math"?0:1;if(119808<=b&&b<120484){const $=Math.floor((b-119808)/26);return[fn[$][2],fn[$][S]]}else if(120782<=b&&b<=120831){const $=Math.floor((b-120782)/10);return[ko[$][2],ko[$][S]]}else{if(b===120485||b===120486)return[fn[0][2],fn[0][S]];if(120486<b&&b<120782)return["",""];throw new a("Unsupported character: "+s)}};class xn{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 u=0;u<this.children.length;u++)i.appendChild(this.children[u].toNode());return i}toMarkup(){let i="";for(let u=0;u<this.children.length;u++)i+=this.children[u].toMarkup();return i}toText(){const i=u=>u.toText();return this.children.map(i).join("")}}const Jr=function(s,i,u){return Tt[u][s]&&Tt[u][s].replace&&(s=Tt[u][s].replace),{value:s,metrics:tt(s,i,u)}},Lr=function(s,i,u,h,b){const S=Jr(s,i,u),$=S.metrics;s=S.value;let _;if($){let Z=$.italic;(u==="text"||h&&h.font==="mathit")&&(Z=0),_=new yt(s,$.height,$.depth,Z,$.skew,$.width,b)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+s+"' in style '"+i+"' and mode '"+u+"'")),_=new yt(s,0,0,0,0,0,b);if(h){_.maxFontSize=h.sizeMultiplier,h.style.isTight()&&_.classes.push("mtight");const Z=h.getColor();Z&&(_.style.color=Z)}return _},Sa=function(s,i,u,h){return h===void 0&&(h=[]),u.font==="boldsymbol"&&Jr(s,"Main-Bold",i).metrics?Lr(s,"Main-Bold",i,u,h.concat(["mathbf"])):s==="\\"||Tt[i][s].font==="main"?Lr(s,"Main-Regular",i,u,h):Lr(s,"AMS-Regular",i,u,h.concat(["amsrm"]))},Vo=function(s,i,u,h,b){return b!=="textord"&&Jr(s,"Math-BoldItalic",i).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},So=function(s,i,u){const h=s.mode,b=s.text,S=["mord"],$=h==="math"||h==="text"&&i.font,_=$?i.font:i.fontFamily;let Z="",re="";if(b.charCodeAt(0)===55349&&([Z,re]=ka(b,h)),Z.length>0)return Lr(b,Z,h,i,S.concat(re));if(_){let me,xe;if(_==="boldsymbol"){const Se=Vo(b,h,i,S,u);me=Se.fontName,xe=[Se.fontClass]}else $?(me=Kn[_].fontName,xe=[_]):(me=Hn(_,i.fontWeight,i.fontShape),xe=[_,i.fontWeight,i.fontShape]);if(Jr(b,me,h).metrics)return Lr(b,me,h,i,S.concat(xe));if(Mt.hasOwnProperty(b)&&me.slice(0,10)==="Typewriter"){const Se=[];for(let Xe=0;Xe<b.length;Xe++)Se.push(Lr(b[Xe],me,h,i,S.concat(xe)));return Qt(Se)}}if(u==="mathord")return Lr(b,"Math-Italic",h,i,S.concat(["mathnormal"]));if(u==="textord"){const me=Tt[h][b]&&Tt[h][b].font;if(me==="ams"){const xe=Hn("amsrm",i.fontWeight,i.fontShape);return Lr(b,xe,h,i,S.concat("amsrm",i.fontWeight,i.fontShape))}else if(me==="main"||!me){const xe=Hn("textrm",i.fontWeight,i.fontShape);return Lr(b,xe,h,i,S.concat(i.fontWeight,i.fontShape))}else{const xe=Hn(me,i.fontWeight,i.fontShape);return Lr(b,xe,h,i,S.concat(xe,i.fontWeight,i.fontShape))}}else throw new Error("unexpected type: "+u+" in makeOrd")},Ba=(s,i)=>{if(nt(s.classes)!==nt(i.classes)||s.skew!==i.skew||s.maxFontSize!==i.maxFontSize)return!1;if(s.classes.length===1){const u=s.classes[0];if(u==="mbin"||u==="mord")return!1}for(const u in s.style)if(s.style.hasOwnProperty(u)&&s.style[u]!==i.style[u])return!1;for(const u in i.style)if(i.style.hasOwnProperty(u)&&s.style[u]!==i.style[u])return!1;return!0},Aa=s=>{for(let i=0;i<s.length-1;i++){const u=s[i],h=s[i+1];u instanceof yt&&h instanceof yt&&Ba(u,h)&&(u.text+=h.text,u.height=Math.max(u.height,h.height),u.depth=Math.max(u.depth,h.depth),u.italic=h.italic,s.splice(i+1,1),i--)}return s},Bo=function(s){let i=0,u=0,h=0;for(let b=0;b<s.children.length;b++){const S=s.children[b];S.height>i&&(i=S.height),S.depth>u&&(u=S.depth),S.maxFontSize>h&&(h=S.maxFontSize)}s.height=i,s.depth=u,s.maxFontSize=h},Fr=function(s,i,u,h){const b=new Ct(s,i,u,h);return Bo(b),b},Fn=(s,i,u,h)=>new Ct(s,i,u,h),lr=function(s,i,u){const h=Fr([s],[],i);return h.height=Math.max(u||i.fontMetrics().defaultRuleThickness,i.minRuleThickness),h.style.borderBottomWidth=ue(h.height),h.maxFontSize=1,h},qt=function(s,i,u,h){const b=new Nt(s,i,u,h);return Bo(b),b},Qt=function(s){const i=new xn(s);return Bo(i),i},$r=function(s,i){return s instanceof xn?Fr([],[s],i):s},Sr=function(s){if(s.positionType==="individualShift"){const u=s.children,h=[u[0]],b=-u[0].shift-u[0].elem.depth;let S=b;for(let $=1;$<u.length;$++){const _=-u[$].shift-S-u[$].elem.depth,Z=_-(u[$-1].elem.height+u[$-1].elem.depth);S=S+_,h.push({type:"kern",size:Z}),h.push(u[$])}return{children:h,depth:b}}let i;if(s.positionType==="top"){let u=s.positionData;for(let h=0;h<s.children.length;h++){const b=s.children[h];u-=b.type==="kern"?b.size:b.elem.height+b.elem.depth}i=u}else if(s.positionType==="bottom")i=-s.positionData;else{const u=s.children[0];if(u.type!=="elem")throw new Error('First child must have type "elem".');if(s.positionType==="shift")i=-u.elem.depth-s.positionData;else if(s.positionType==="firstBaseline")i=-u.elem.depth;else throw new Error("Invalid positionType "+s.positionType+".")}return{children:s.children,depth:i}},_n=function(s,i){const{children:u,depth:h}=Sr(s);let b=0;for(let Xe=0;Xe<u.length;Xe++){const ot=u[Xe];if(ot.type==="elem"){const Ft=ot.elem;b=Math.max(b,Ft.maxFontSize,Ft.height)}}b+=2;const S=Fr(["pstrut"],[]);S.style.height=ue(b);const $=[];let _=h,Z=h,re=h;for(let Xe=0;Xe<u.length;Xe++){const ot=u[Xe];if(ot.type==="kern")re+=ot.size;else{const Ft=ot.elem,Ht=ot.wrapperClasses||[],Lt=ot.wrapperStyle||{},Yt=Fr(Ht,[S,Ft],void 0,Lt);Yt.style.top=ue(-b-re-Ft.depth),ot.marginLeft&&(Yt.style.marginLeft=ot.marginLeft),ot.marginRight&&(Yt.style.marginRight=ot.marginRight),$.push(Yt),re+=Ft.height+Ft.depth}_=Math.min(_,re),Z=Math.max(Z,re)}const me=Fr(["vlist"],$);me.style.height=ue(Z);let xe;if(_<0){const Xe=Fr([],[]),ot=Fr(["vlist"],[Xe]);ot.style.height=ue(-_);const Ft=Fr(["vlist-s"],[new yt("\u200B")]);xe=[Fr(["vlist-r"],[me,Ft]),Fr(["vlist-r"],[ot])]}else xe=[Fr(["vlist-r"],[me])];const Se=Fr(["vlist-t"],xe);return xe.length===2&&Se.classes.push("vlist-t2"),Se.height=Z,Se.depth=-_,Se},Ao=(s,i)=>{const u=Fr(["mspace"],[],i),h=Ie(s,i);return u.style.marginRight=ue(h),u},Hn=function(s,i,u){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 b;return i==="textbf"&&u==="textit"?b="BoldItalic":i==="textbf"?b="Bold":i==="textit"?b="Italic":b="Regular",h+"-"+b},Kn={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"}},ao={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var ye={fontMap:Kn,makeSymbol:Lr,mathsym:Sa,makeSpan:Fr,makeSvgSpan:Fn,makeLineSpan:lr,makeAnchor:qt,makeFragment:Qt,wrapFragment:$r,makeVList:_n,makeOrd:So,makeGlue:Ao,staticSvg:function(s,i){const[u,h,b]=ao[s],S=new Xt(u),$=new cr([S],{width:ue(h),height:ue(b),style:"width:"+ue(h),viewBox:"0 0 "+1e3*h+" "+1e3*b,preserveAspectRatio:"xMinYMin"}),_=Fn(["overlay"],[$],i);return _.height=b,_.style.height=ue(b),_.style.width=ue(h),_},svgData:ao,tryCombineChars:Aa};const Jt={number:3,unit:"mu"},Cn={number:4,unit:"mu"},Et={number:5,unit:"mu"},Pt={mord:{mop:Jt,mbin:Cn,mrel:Et,minner:Jt},mop:{mord:Jt,mop:Jt,mrel:Et,minner:Jt},mbin:{mord:Cn,mop:Cn,mopen:Cn,minner:Cn},mrel:{mord:Et,mop:Et,mopen:Et,minner:Et},mopen:{},mclose:{mop:Jt,mbin:Cn,mrel:Et,minner:Jt},mpunct:{mord:Jt,mop:Jt,mrel:Et,mopen:Jt,mclose:Jt,mpunct:Jt,minner:Jt},minner:{mord:Jt,mop:Jt,mbin:Cn,mrel:Et,mopen:Jt,mpunct:Jt,minner:Jt}},Or={mord:{mop:Jt},mop:{mord:Jt,mop:Jt},mbin:{},mrel:{},mopen:{},mclose:{mop:Jt},mpunct:{},minner:{mop:Jt}},Wr={},wr={},wn={};function et(s){let{type:i,names:u,props:h,handler:b,htmlBuilder:S,mathmlBuilder:$}=s;const _={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:b};for(let Z=0;Z<u.length;++Z)Wr[u[Z]]=_;i&&(S&&(wr[i]=S),$&&(wn[i]=$))}function Vr(s){let{type:i,htmlBuilder:u,mathmlBuilder:h}=s;et({type:i,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:u,mathmlBuilder:h})}const On=function(s){return s.type==="ordgroup"&&s.body.length===1?s.body[0]:s},fr=function(s){return s.type==="ordgroup"?s.body:[s]},qn=ye.makeSpan,Wg=["leftmost","mbin","mopen","mrel","mop","mpunct"],Vg=["rightmost","mrel","mclose","mpunct"],Ug={display:z.DISPLAY,text:z.TEXT,script:z.SCRIPT,scriptscript:z.SCRIPTSCRIPT},Xg={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Nr=function(s,i,u,h){h===void 0&&(h=[null,null]);const b=[];for(let re=0;re<s.length;re++){const me=Wt(s[re],i);if(me instanceof xn){const xe=me.children;b.push(...xe)}else b.push(me)}if(ye.tryCombineChars(b),!u)return b;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(Ug[re.style]))}const $=qn([h[0]||"leftmost"],[],i),_=qn([h[1]||"rightmost"],[],i),Z=u==="root";return ll(b,(re,me)=>{const xe=me.classes[0],Se=re.classes[0];xe==="mbin"&&Vg.includes(Se)?me.classes[0]="mord":Se==="mbin"&&Wg.includes(xe)&&(re.classes[0]="mord")},{node:$},_,Z),ll(b,(re,me)=>{const xe=cl(me),Se=cl(re),Xe=xe&&Se?re.hasClass("mtight")?Or[xe][Se]:Pt[xe][Se]:null;if(Xe)return ye.makeGlue(Xe,S)},{node:$},_,Z),b},ll=function(s,i,u,h,b){h&&s.push(h);let S=0;for(;S<s.length;S++){const $=s[S],_=$c($);if(_){ll(_.children,i,u,null,b);continue}const Z=!$.hasClass("mspace");if(Z){const re=i($,u.node);re&&(u.insertAfter?u.insertAfter(re):(s.unshift(re),S++))}Z?u.node=$:b&&$.hasClass("newline")&&(u.node=qn(["leftmost"])),u.insertAfter=(re=>me=>{s.splice(re+1,0,me),S++})(S)}h&&s.pop()},$c=function(s){return s instanceof xn||s instanceof Nt||s instanceof Ct&&s.hasClass("enclosing")?s:null},ul=function(s,i){const u=$c(s);if(u){const h=u.children;if(h.length){if(i==="right")return ul(h[h.length-1],"right");if(i==="left")return ul(h[0],"left")}}return s},cl=function(s,i){return s?(i&&(s=ul(s,i)),Xg[s.classes[0]]||null):null},Fa=function(s,i){const u=["nulldelimiter"].concat(s.baseSizingClasses());return qn(i.concat(u))},Wt=function(s,i,u){if(!s)return qn();if(wr[s.type]){let h=wr[s.type](s,i);if(u&&i.size!==u.size){h=qn(i.sizingClasses(u),[h],i);const b=i.sizeMultiplier/u.sizeMultiplier;h.height*=b,h.depth*=b}return h}else throw new a("Got group of unknown type: '"+s.type+"'")};function yi(s,i){const u=qn(["base"],s,i),h=qn(["strut"]);return h.style.height=ue(u.height+u.depth),u.depth&&(h.style.verticalAlign=ue(-u.depth)),u.children.unshift(h),u}function dl(s,i){let u=null;s.length===1&&s[0].type==="tag"&&(u=s[0].tag,s=s[0].body);const h=Nr(s,i,"root");let b;h.length===2&&h[1].hasClass("tag")&&(b=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 me=!1;for(;re<h.length-1&&h[re+1].hasClass("mspace")&&!h[re+1].hasClass("newline");)re++,$.push(h[re]),h[re].hasClass("nobreak")&&(me=!0);me||(S.push(yi($,i)),$=[])}else h[re].hasClass("newline")&&($.pop(),$.length>0&&(S.push(yi($,i)),$=[]),S.push(h[re]));$.length>0&&S.push(yi($,i));let _;u?(_=yi(Nr(u,i,!0)),_.classes=["tag"],S.push(_)):b&&S.push(b);const Z=qn(["katex-html"],S);if(Z.setAttribute("aria-hidden","true"),_){const re=_.children[0];re.style.height=ue(Z.height+Z.depth),Z.depth&&(re.style.verticalAlign=ue(-Z.depth))}return Z}function Tc(s){return new xn(s)}class sn{constructor(i,u,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=i,this.attributes={},this.children=u||[],this.classes=h||[]}setAttribute(i,u){this.attributes[i]=u}getAttribute(i){return this.attributes[i]}toNode(){const i=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const u in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,u)&&i.setAttribute(u,this.attributes[u]);this.classes.length>0&&(i.className=nt(this.classes));for(let u=0;u<this.children.length;u++)if(this.children[u]instanceof Nn&&this.children[u+1]instanceof Nn){let h=this.children[u].toText()+this.children[++u].toText();for(;this.children[u+1]instanceof Nn;)h+=this.children[++u].toText();i.appendChild(new Nn(h).toNode())}else i.appendChild(this.children[u].toNode());return i}toMarkup(){let i="<"+this.type;for(const u in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,u)&&(i+=" "+u+'="',i+=D.escape(this.attributes[u]),i+='"');this.classes.length>0&&(i+=' class ="'+D.escape(nt(this.classes))+'"'),i+=">";for(let u=0;u<this.children.length;u++)i+=this.children[u].toMarkup();return i+="</"+this.type+">",i}toText(){return this.children.map(i=>i.toText()).join("")}}class Nn{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 Yg{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",ue(this.width)),i}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ue(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ve={MathNode:sn,TextNode:Nn,SpaceNode:Yg,newDocumentFragment:Tc};const hn=function(s,i,u){return Tt[i][s]&&Tt[i][s].replace&&s.charCodeAt(0)!==55349&&!(Mt.hasOwnProperty(s)&&u&&(u.fontFamily&&u.fontFamily.slice(4,6)==="tt"||u.font&&u.font.slice(4,6)==="tt"))&&(s=Tt[i][s].replace),new Ve.TextNode(s)},fl=function(s){return s.length===1?s[0]:new Ve.MathNode("mrow",s)},hl=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 u=i.font;if(!u||u==="mathnormal")return null;const h=s.mode;if(u==="mathit")return"italic";if(u==="boldsymbol")return s.type==="textord"?"bold":"bold-italic";if(u==="mathbf")return"bold";if(u==="mathbb")return"double-struck";if(u==="mathsfit")return"sans-serif-italic";if(u==="mathfrak")return"fraktur";if(u==="mathscr"||u==="mathcal")return"script";if(u==="mathsf")return"sans-serif";if(u==="mathtt")return"monospace";let b=s.text;if(["\\imath","\\jmath"].includes(b))return null;Tt[h][b]&&Tt[h][b].replace&&(b=Tt[h][b].replace);const S=ye.fontMap[u].fontName;return tt(b,S,h)?ye.fontMap[u].variant:null};function pl(s){if(!s)return!1;if(s.type==="mi"&&s.children.length===1){const i=s.children[0];return i instanceof Nn&&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 Nn&&i.text===","}else return!1}const en=function(s,i,u){if(s.length===1){const S=ur(s[0],i);return u&&S instanceof sn&&S.type==="mo"&&(S.setAttribute("lspace","0em"),S.setAttribute("rspace","0em")),[S]}const h=[];let b;for(let S=0;S<s.length;S++){const $=ur(s[S],i);if($ instanceof sn&&b instanceof sn){if($.type==="mtext"&&b.type==="mtext"&&$.getAttribute("mathvariant")===b.getAttribute("mathvariant")){b.children.push(...$.children);continue}else if($.type==="mn"&&b.type==="mn"){b.children.push(...$.children);continue}else if(pl($)&&b.type==="mn"){b.children.push(...$.children);continue}else if($.type==="mn"&&pl(b))$.children=[...b.children,...$.children],h.pop();else if(($.type==="msup"||$.type==="msub")&&$.children.length>=1&&(b.type==="mn"||pl(b))){const _=$.children[0];_ instanceof sn&&_.type==="mn"&&(_.children=[...b.children,..._.children],h.pop())}else if(b.type==="mi"&&b.children.length===1){const _=b.children[0];if(_ instanceof Nn&&_.text==="\u0338"&&($.type==="mo"||$.type==="mi"||$.type==="mn")){const Z=$.children[0];Z instanceof Nn&&Z.text.length>0&&(Z.text=Z.text.slice(0,1)+"\u0338"+Z.text.slice(1),h.pop())}}}h.push($),b=$}return h},io=function(s,i,u){return fl(en(s,i,u))},ur=function(s,i){if(!s)return new Ve.MathNode("mrow");if(wn[s.type])return wn[s.type](s,i);throw new a("Got group of unknown type: '"+s.type+"'")};function Mc(s,i,u,h,b){const S=en(s,u);let $;S.length===1&&S[0]instanceof sn&&["mrow","mtable"].includes(S[0].type)?$=S[0]:$=new Ve.MathNode("mrow",S);const _=new Ve.MathNode("annotation",[new Ve.TextNode(i)]);_.setAttribute("encoding","application/x-tex");const Z=new Ve.MathNode("semantics",[$,_]),re=new Ve.MathNode("math",[Z]);re.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),h&&re.setAttribute("display","block");const me=b?"katex":"katex-mathml";return ye.makeSpan([me],[re])}const Rc=function(s){return new St({style:s.displayMode?z.DISPLAY:z.TEXT,maxSize:s.maxSize,minRuleThickness:s.minRuleThickness})},Ic=function(s,i){if(i.displayMode){const u=["katex-display"];i.leqno&&u.push("leqno"),i.fleqn&&u.push("fleqn"),s=ye.makeSpan(u,[s])}return s},Gg=function(s,i,u){const h=Rc(u);let b;if(u.output==="mathml")return Mc(s,i,h,u.displayMode,!0);if(u.output==="html"){const S=dl(s,h);b=ye.makeSpan(["katex"],[S])}else{const S=Mc(s,i,h,u.displayMode,!1),$=dl(s,h);b=ye.makeSpan(["katex"],[S,$])}return Ic(b,u)},Zg=function(s,i,u){const h=Rc(u),b=dl(s,h),S=ye.makeSpan(["katex"],[b]);return Ic(S,u)},Qg={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":"="},Jg=function(s){const i=new Ve.MathNode("mo",[new Ve.TextNode(Qg[s.replace(/^\\/,"")])]);return i.setAttribute("stretchy","true"),i},e4={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]},t4=function(s){return s.type==="ordgroup"?s.body.length:1};var Wn={encloseSpan:function(s,i,u,h,b){let S;const $=s.height+s.depth+u+h;if(/fbox|color|angl/.test(i)){if(S=ye.makeSpan(["stretchy",i],[],b),i==="fbox"){const _=b.color&&b.getColor();_&&(S.style.borderColor=_)}}else{const _=[];/^[bx]cancel$/.test(i)&&_.push(new Pr({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(i)&&_.push(new Pr({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const Z=new cr(_,{width:"100%",height:ue($)});S=ye.makeSvgSpan([],[Z],b)}return S.height=$,S.style.height=ue($),S},mathMLnode:Jg,svgSpan:function(s,i){function u(){let $=4e5;const _=s.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(_)){const Z=t4(s.base);let re,me,xe;if(Z>5)_==="widehat"||_==="widecheck"?(re=420,$=2364,xe=.42,me=_+"4"):(re=312,$=2340,xe=.34,me="tilde4");else{const ot=[1,1,2,2,3,3][Z];_==="widehat"||_==="widecheck"?($=[0,1062,2364,2364,2364][ot],re=[0,239,300,360,420][ot],xe=[0,.24,.3,.3,.36,.42][ot],me=_+ot):($=[0,600,1033,2339,2340][ot],re=[0,260,286,306,312][ot],xe=[0,.26,.286,.3,.306,.34][ot],me="tilde"+ot)}const Se=new Xt(me),Xe=new cr([Se],{width:"100%",height:ue(xe),viewBox:"0 0 "+$+" "+re,preserveAspectRatio:"none"});return{span:ye.makeSvgSpan([],[Xe],i),minWidth:0,height:xe}}else{const Z=[],re=e4[_],[me,xe,Se]=re,Xe=Se/1e3,ot=me.length;let Ft,Ht;if(ot===1){const Lt=re[3];Ft=["hide-tail"],Ht=[Lt]}else if(ot===2)Ft=["halfarrow-left","halfarrow-right"],Ht=["xMinYMin","xMaxYMin"];else if(ot===3)Ft=["brace-left","brace-center","brace-right"],Ht=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
487
|
+
`+ot+" children.");for(let Lt=0;Lt<ot;Lt++){const Yt=new Xt(me[Lt]),Vt=new cr([Yt],{width:"400em",height:ue(Xe),viewBox:"0 0 "+$+" "+Se,preserveAspectRatio:Ht[Lt]+" slice"}),hr=ye.makeSvgSpan([Ft[Lt]],[Vt],i);if(ot===1)return{span:hr,minWidth:xe,height:Xe};hr.style.height=ue(Xe),Z.push(hr)}return{span:ye.makeSpan(["stretchy"],Z,i),minWidth:xe,height:Xe}}}const{span:h,minWidth:b,height:S}=u();return h.height=S,h.style.height=ue(S),b>0&&(h.style.minWidth=ue(b)),h}};function Rt(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 ml(s){const i=xi(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 xi(s){return s&&(s.type==="atom"||nr.hasOwnProperty(s.type))?s:null}const gl=(s,i)=>{let u,h,b;s&&s.type==="supsub"?(h=Rt(s.base,"accent"),u=h.base,s.base=u,b=yr(Wt(s,i)),s.base=h):(h=Rt(s,"accent"),u=h.base);const S=Wt(u,i.havingCrampedStyle()),$=h.isShifty&&D.isCharacterBox(u);let _=0;if($){const Se=D.getBaseElem(u),Xe=Wt(Se,i.havingCrampedStyle());_=kr(Xe).skew}const Z=h.label==="\\c";let re=Z?S.height+S.depth:Math.min(S.height,i.fontMetrics().xHeight),me;if(h.isStretchy)me=Wn.svgSpan(h,i),me=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:S},{type:"elem",elem:me,wrapperClasses:["svg-align"],wrapperStyle:_>0?{width:"calc(100% - "+ue(2*_)+")",marginLeft:ue(2*_)}:void 0}]},i);else{let Se,Xe;h.label==="\\vec"?(Se=ye.staticSvg("vec",i),Xe=ye.svgData.vec[1]):(Se=ye.makeOrd({mode:h.mode,text:h.label},i,"textord"),Se=kr(Se),Se.italic=0,Xe=Se.width,Z&&(re+=Se.depth)),me=ye.makeSpan(["accent-body"],[Se]);const ot=h.label==="\\textcircled";ot&&(me.classes.push("accent-full"),re=S.height);let Ft=_;ot||(Ft-=Xe/2),me.style.left=ue(Ft),h.label==="\\textcircled"&&(me.style.top=".2em"),me=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:S},{type:"kern",size:-re},{type:"elem",elem:me}]},i)}const xe=ye.makeSpan(["mord","accent"],[me],i);return b?(b.children[0]=xe,b.height=Math.max(xe.height,b.height),b.classes[0]="mord",b):xe},Pc=(s,i)=>{const u=s.isStretchy?Wn.mathMLnode(s.label):new Ve.MathNode("mo",[hn(s.label,s.mode)]),h=new Ve.MathNode("mover",[ur(s.base,i),u]);return h.setAttribute("accent","true"),h},r4=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(s=>"\\"+s).join("|"));et({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 u=On(i[0]),h=!r4.test(s.funcName),b=!h||s.funcName==="\\widehat"||s.funcName==="\\widetilde"||s.funcName==="\\widecheck";return{type:"accent",mode:s.parser.mode,label:s.funcName,isStretchy:h,isShifty:b,base:u}},htmlBuilder:gl,mathmlBuilder:Pc}),et({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(s,i)=>{const u=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:u}},htmlBuilder:gl,mathmlBuilder:Pc}),et({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(s,i)=>{let{parser:u,funcName:h}=s;const b=i[0];return{type:"accentUnder",mode:u.mode,label:h,base:b}},htmlBuilder:(s,i)=>{const u=Wt(s.base,i),h=Wn.svgSpan(s,i),b=s.label==="\\utilde"?.12:0,S=ye.makeVList({positionType:"top",positionData:u.height,children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:b},{type:"elem",elem:u}]},i);return ye.makeSpan(["mord","accentunder"],[S],i)},mathmlBuilder:(s,i)=>{const u=Wn.mathMLnode(s.label),h=new Ve.MathNode("munder",[ur(s.base,i),u]);return h.setAttribute("accentunder","true"),h}});const Ci=s=>{const i=new Ve.MathNode("mpadded",s?[s]:[]);return i.setAttribute("width","+0.6em"),i.setAttribute("lspace","0.3em"),i};et({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,u){let{parser:h,funcName:b}=s;return{type:"xArrow",mode:h.mode,label:b,body:i[0],below:u[0]}},htmlBuilder(s,i){const u=i.style;let h=i.havingStyle(u.sup());const b=ye.wrapFragment(Wt(s.body,h,i),i),S=s.label.slice(0,2)==="\\x"?"x":"cd";b.classes.push(S+"-arrow-pad");let $;s.below&&(h=i.havingStyle(u.sub()),$=ye.wrapFragment(Wt(s.below,h,i),i),$.classes.push(S+"-arrow-pad"));const _=Wn.svgSpan(s,i),Z=-i.fontMetrics().axisHeight+.5*_.height;let re=-i.fontMetrics().axisHeight-.5*_.height-.111;(b.depth>.25||s.label==="\\xleftequilibrium")&&(re-=b.depth);let me;if($){const xe=-i.fontMetrics().axisHeight+$.height+.5*_.height+.111;me=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:re},{type:"elem",elem:_,shift:Z},{type:"elem",elem:$,shift:xe}]},i)}else me=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:re},{type:"elem",elem:_,shift:Z}]},i);return me.children[0].children[0].children[1].classes.push("svg-align"),ye.makeSpan(["mrel","x-arrow"],[me],i)},mathmlBuilder(s,i){const u=Wn.mathMLnode(s.label);u.setAttribute("minsize",s.label.charAt(0)==="x"?"1.75em":"3.0em");let h;if(s.body){const b=Ci(ur(s.body,i));if(s.below){const S=Ci(ur(s.below,i));h=new Ve.MathNode("munderover",[u,S,b])}else h=new Ve.MathNode("mover",[u,b])}else if(s.below){const b=Ci(ur(s.below,i));h=new Ve.MathNode("munder",[u,b])}else h=Ci(),h=new Ve.MathNode("mover",[u,h]);return h}});const n4=ye.makeSpan;function zc(s,i){const u=Nr(s.body,i,!0);return n4([s.mclass],u,i)}function Lc(s,i){let u;const h=en(s.body,i);return s.mclass==="minner"?u=new Ve.MathNode("mpadded",h):s.mclass==="mord"?s.isCharacterBox?(u=h[0],u.type="mi"):u=new Ve.MathNode("mi",h):(s.isCharacterBox?(u=h[0],u.type="mo"):u=new Ve.MathNode("mo",h),s.mclass==="mbin"?(u.attributes.lspace="0.22em",u.attributes.rspace="0.22em"):s.mclass==="mpunct"?(u.attributes.lspace="0em",u.attributes.rspace="0.17em"):s.mclass==="mopen"||s.mclass==="mclose"?(u.attributes.lspace="0em",u.attributes.rspace="0em"):s.mclass==="minner"&&(u.attributes.lspace="0.0556em",u.attributes.width="+0.1111em")),u}et({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(s,i){let{parser:u,funcName:h}=s;const b=i[0];return{type:"mclass",mode:u.mode,mclass:"m"+h.slice(5),body:fr(b),isCharacterBox:D.isCharacterBox(b)}},htmlBuilder:zc,mathmlBuilder:Lc});const wi=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"};et({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(s,i){let{parser:u}=s;return{type:"mclass",mode:u.mode,mclass:wi(i[0]),body:fr(i[1]),isCharacterBox:D.isCharacterBox(i[1])}}}),et({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(s,i){let{parser:u,funcName:h}=s;const b=i[1],S=i[0];let $;h!=="\\stackrel"?$=wi(b):$="mrel";const _={type:"op",mode:b.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:h!=="\\stackrel",body:fr(b)},Z={type:"supsub",mode:S.mode,base:_,sup:h==="\\underset"?null:S,sub:h==="\\underset"?S:null};return{type:"mclass",mode:u.mode,mclass:$,body:[Z],isCharacterBox:D.isCharacterBox(Z)}},htmlBuilder:zc,mathmlBuilder:Lc}),et({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:u}=s;return{type:"pmb",mode:u.mode,mclass:wi(i[0]),body:fr(i[0])}},htmlBuilder(s,i){const u=Nr(s.body,i,!0),h=ye.makeSpan([s.mclass],u,i);return h.style.textShadow="0.02em 0.01em 0.04px",h},mathmlBuilder(s,i){const u=en(s.body,i),h=new Ve.MathNode("mstyle",u);return h.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),h}});const o4={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jc=()=>({type:"styling",body:[],mode:"math",style:"display"}),_c=s=>s.type==="textord"&&s.text==="@",a4=(s,i)=>(s.type==="mathord"||s.type==="atom")&&s.text===i;function i4(s,i,u){const h=o4[s];switch(h){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return u.callFunction(h,[i[0]],[i[1]]);case"\\uparrow":case"\\downarrow":{const b=u.callFunction("\\\\cdleft",[i[0]],[]),S={type:"atom",text:h,mode:"math",family:"rel"},$=u.callFunction("\\Big",[S],[]),_=u.callFunction("\\\\cdright",[i[1]],[]),Z={type:"ordgroup",mode:"math",body:[b,$,_]};return u.callFunction("\\\\cdparent",[Z],[])}case"\\\\cdlongequal":return u.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const b={type:"textord",text:"\\Vert",mode:"math"};return u.callFunction("\\Big",[b],[])}default:return{type:"textord",text:" ",mode:"math"}}}function s4(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 u=[];const h=[u];for(let S=0;S<i.length;S++){const $=i[S];let _=jc();for(let Z=0;Z<$.length;Z++)if(!_c($[Z]))_.body.push($[Z]);else{u.push(_),Z+=1;const re=ml($[Z]).text,me=new Array(2);if(me[0]={type:"ordgroup",mode:"math",body:[]},me[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(re)>-1))if("<>AV".indexOf(re)>-1)for(let Se=0;Se<2;Se++){let Xe=!0;for(let ot=Z+1;ot<$.length;ot++){if(a4($[ot],re)){Xe=!1,Z=ot;break}if(_c($[ot]))throw new a("Missing a "+re+" character to complete a CD arrow.",$[ot]);me[Se].body.push($[ot])}if(Xe)throw new a("Missing a "+re+" character to complete a CD arrow.",$[Z])}else throw new a('Expected one of "<>AV=|." after @',$[Z]);const xe={type:"styling",body:[i4(re,me,s)],mode:"math",style:"display"};u.push(xe),_=jc()}S%2===0?u.push(_):u.shift(),u=[],h.push(u)}s.gullet.endGroup(),s.gullet.endGroup();const b=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:b,colSeparationType:"CD",hLinesBeforeRow:new Array(h.length+1).fill([])}}et({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(s,i){let{parser:u,funcName:h}=s;return{type:"cdlabel",mode:u.mode,side:h.slice(4),label:i[0]}},htmlBuilder(s,i){const u=i.havingStyle(i.style.sup()),h=ye.wrapFragment(Wt(s.label,u,i),i);return h.classes.push("cd-label-"+s.side),h.style.bottom=ue(.8-h.depth),h.height=0,h.depth=0,h},mathmlBuilder(s,i){let u=new Ve.MathNode("mrow",[ur(s.label,i)]);return u=new Ve.MathNode("mpadded",[u]),u.setAttribute("width","0"),s.side==="left"&&u.setAttribute("lspace","-1width"),u.setAttribute("voffset","0.7em"),u=new Ve.MathNode("mstyle",[u]),u.setAttribute("displaystyle","false"),u.setAttribute("scriptlevel","1"),u}}),et({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(s,i){let{parser:u}=s;return{type:"cdlabelparent",mode:u.mode,fragment:i[0]}},htmlBuilder(s,i){const u=ye.wrapFragment(Wt(s.fragment,i),i);return u.classes.push("cd-vert-arrow"),u},mathmlBuilder(s,i){return new Ve.MathNode("mrow",[ur(s.fragment,i)])}}),et({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:u}=s;const h=Rt(i[0],"ordgroup").body;let b="";for(let _=0;_<h.length;_++){const Z=Rt(h[_],"textord");b+=Z.text}let S=parseInt(b),$;if(isNaN(S))throw new a("\\@char has non-numeric argument "+b);if(S<0||S>=1114111)throw new a("\\@char with invalid code point "+b);return S<=65535?$=String.fromCharCode(S):(S-=65536,$=String.fromCharCode((S>>10)+55296,(S&1023)+56320)),{type:"textord",mode:u.mode,text:$}}});const Hc=(s,i)=>{const u=Nr(s.body,i.withColor(s.color),!1);return ye.makeFragment(u)},Kc=(s,i)=>{const u=en(s.body,i.withColor(s.color)),h=new Ve.MathNode("mstyle",u);return h.setAttribute("mathcolor",s.color),h};et({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(s,i){let{parser:u}=s;const h=Rt(i[0],"color-token").color,b=i[1];return{type:"color",mode:u.mode,color:h,body:fr(b)}},htmlBuilder:Hc,mathmlBuilder:Kc}),et({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(s,i){let{parser:u,breakOnTokenText:h}=s;const b=Rt(i[0],"color-token").color;u.gullet.macros.set("\\current@color",b);const S=u.parseExpression(!0,h);return{type:"color",mode:u.mode,color:b,body:S}},htmlBuilder:Hc,mathmlBuilder:Kc}),et({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(s,i,u){let{parser:h}=s;const b=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:b&&Rt(b,"size").value}},htmlBuilder(s,i){const u=ye.makeSpan(["mspace"],[],i);return s.newLine&&(u.classes.push("newline"),s.size&&(u.style.marginTop=ue(Ie(s.size,i)))),u},mathmlBuilder(s,i){const u=new Ve.MathNode("mspace");return s.newLine&&(u.setAttribute("linebreak","newline"),s.size&&u.setAttribute("height",ue(Ie(s.size,i)))),u}});const vl={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},qc=s=>{const i=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",s);return i},l4=s=>{let i=s.gullet.popToken();return i.text==="="&&(i=s.gullet.popToken(),i.text===" "&&(i=s.gullet.popToken())),i},Wc=(s,i,u,h)=>{let b=s.gullet.macros.get(u.text);b==null&&(u.noexpand=!0,b={tokens:[u],numArgs:0,unexpandable:!s.gullet.isExpandable(u.text)}),s.gullet.macros.set(i,b,h)};et({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(s){let{parser:i,funcName:u}=s;i.consumeSpaces();const h=i.fetch();if(vl[h.text])return(u==="\\global"||u==="\\\\globallong")&&(h.text=vl[h.text]),Rt(i.parseFunction(),"internal");throw new a("Invalid token after macro prefix",h)}}),et({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:u}=s,h=i.gullet.popToken();const b=h.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(b))throw new a("Expected a control sequence",h);let S=0,$;const _=[[]];for(;i.gullet.future().text!=="{";)if(h=i.gullet.popToken(),h.text==="#"){if(i.gullet.future().text==="{"){$=i.gullet.future(),_[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++,_.push([])}else{if(h.text==="EOF")throw new a("Expected a macro definition");_[S].push(h.text)}let{tokens:Z}=i.gullet.consumeArg();return $&&Z.unshift($),(u==="\\edef"||u==="\\xdef")&&(Z=i.gullet.expandTokens(Z),Z.reverse()),i.gullet.macros.set(b,{tokens:Z,numArgs:S,delimiters:_},u===vl[u]),{type:"internal",mode:i.mode}}}),et({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:u}=s;const h=qc(i.gullet.popToken());i.gullet.consumeSpaces();const b=l4(i);return Wc(i,h,b,u==="\\\\globallet"),{type:"internal",mode:i.mode}}}),et({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:u}=s;const h=qc(i.gullet.popToken()),b=i.gullet.popToken(),S=i.gullet.popToken();return Wc(i,h,S,u==="\\\\globalfuture"),i.gullet.pushToken(S),i.gullet.pushToken(b),{type:"internal",mode:i.mode}}});const Oa=function(s,i,u){const h=Tt.math[s]&&Tt.math[s].replace,b=tt(h||s,i,u);if(!b)throw new Error("Unsupported symbol "+s+" and font size "+i+".");return b},bl=function(s,i,u,h){const b=u.havingBaseStyle(i),S=ye.makeSpan(h.concat(b.sizingClasses(u)),[s],u),$=b.sizeMultiplier/u.sizeMultiplier;return S.height*=$,S.depth*=$,S.maxFontSize=b.sizeMultiplier,S},Vc=function(s,i,u){const h=i.havingBaseStyle(u),b=(1-i.sizeMultiplier/h.sizeMultiplier)*i.fontMetrics().axisHeight;s.classes.push("delimcenter"),s.style.top=ue(b),s.height-=b,s.depth+=b},u4=function(s,i,u,h,b,S){const $=ye.makeSymbol(s,"Main-Regular",b,h),_=bl($,i,h,S);return u&&Vc(_,h,i),_},c4=function(s,i,u,h){return ye.makeSymbol(s,"Size"+i+"-Regular",u,h)},Uc=function(s,i,u,h,b,S){const $=c4(s,i,b,h),_=bl(ye.makeSpan(["delimsizing","size"+i],[$],h),z.TEXT,h,S);return u&&Vc(_,h,z.TEXT),_},yl=function(s,i,u){let h;return i==="Size1-Regular"?h="delim-size1":h="delim-size4",{type:"elem",elem:ye.makeSpan(["delimsizinginner",h],[ye.makeSpan([],[ye.makeSymbol(s,i,u)])])}},xl=function(s,i,u){const h=Ne["Size4-Regular"][s.charCodeAt(0)]?Ne["Size4-Regular"][s.charCodeAt(0)][4]:Ne["Size1-Regular"][s.charCodeAt(0)][4],b=new Xt("inner",ke(s,Math.round(1e3*i))),S=new cr([b],{width:ue(h),height:ue(i),style:"width:"+ue(h),viewBox:"0 0 "+1e3*h+" "+Math.round(1e3*i),preserveAspectRatio:"xMinYMin"}),$=ye.makeSvgSpan([],[S],u);return $.height=i,$.style.height=ue(i),$.style.width=ue(h),{type:"elem",elem:$}},Cl=.008,Di={type:"kern",size:-1*Cl},d4=["|","\\lvert","\\rvert","\\vert"],f4=["\\|","\\lVert","\\rVert","\\Vert"],Xc=function(s,i,u,h,b,S){let $,_,Z,re,me="",xe=0;$=Z=re=s,_=null;let Se="Size1-Regular";s==="\\uparrow"?Z=re="\u23D0":s==="\\Uparrow"?Z=re="\u2016":s==="\\downarrow"?$=Z="\u23D0":s==="\\Downarrow"?$=Z="\u2016":s==="\\updownarrow"?($="\\uparrow",Z="\u23D0",re="\\downarrow"):s==="\\Updownarrow"?($="\\Uparrow",Z="\u2016",re="\\Downarrow"):d4.includes(s)?(Z="\u2223",me="vert",xe=333):f4.includes(s)?(Z="\u2225",me="doublevert",xe=556):s==="["||s==="\\lbrack"?($="\u23A1",Z="\u23A2",re="\u23A3",Se="Size4-Regular",me="lbrack",xe=667):s==="]"||s==="\\rbrack"?($="\u23A4",Z="\u23A5",re="\u23A6",Se="Size4-Regular",me="rbrack",xe=667):s==="\\lfloor"||s==="\u230A"?(Z=$="\u23A2",re="\u23A3",Se="Size4-Regular",me="lfloor",xe=667):s==="\\lceil"||s==="\u2308"?($="\u23A1",Z=re="\u23A2",Se="Size4-Regular",me="lceil",xe=667):s==="\\rfloor"||s==="\u230B"?(Z=$="\u23A5",re="\u23A6",Se="Size4-Regular",me="rfloor",xe=667):s==="\\rceil"||s==="\u2309"?($="\u23A4",Z=re="\u23A5",Se="Size4-Regular",me="rceil",xe=667):s==="("||s==="\\lparen"?($="\u239B",Z="\u239C",re="\u239D",Se="Size4-Regular",me="lparen",xe=875):s===")"||s==="\\rparen"?($="\u239E",Z="\u239F",re="\u23A0",Se="Size4-Regular",me="rparen",xe=875):s==="\\{"||s==="\\lbrace"?($="\u23A7",_="\u23A8",re="\u23A9",Z="\u23AA",Se="Size4-Regular"):s==="\\}"||s==="\\rbrace"?($="\u23AB",_="\u23AC",re="\u23AD",Z="\u23AA",Se="Size4-Regular"):s==="\\lgroup"||s==="\u27EE"?($="\u23A7",re="\u23A9",Z="\u23AA",Se="Size4-Regular"):s==="\\rgroup"||s==="\u27EF"?($="\u23AB",re="\u23AD",Z="\u23AA",Se="Size4-Regular"):s==="\\lmoustache"||s==="\u23B0"?($="\u23A7",re="\u23AD",Z="\u23AA",Se="Size4-Regular"):(s==="\\rmoustache"||s==="\u23B1")&&($="\u23AB",re="\u23A9",Z="\u23AA",Se="Size4-Regular");const Xe=Oa($,Se,b),ot=Xe.height+Xe.depth,Ft=Oa(Z,Se,b),Ht=Ft.height+Ft.depth,Lt=Oa(re,Se,b),Yt=Lt.height+Lt.depth;let Vt=0,hr=1;if(_!==null){const Dr=Oa(_,Se,b);Vt=Dr.height+Dr.depth,hr=2}const zr=ot+Yt+Vt,Ur=Math.max(0,Math.ceil((i-zr)/(hr*Ht))),pn=zr+Ur*hr*Ht;let Xo=h.fontMetrics().axisHeight;u&&(Xo*=h.sizeMultiplier);const Gt=pn/2-Xo,ar=[];if(me.length>0){const Dr=pn-ot-Yt,xr=Math.round(pn*1e3),mn=Be(me,Math.round(Dr*1e3)),z4=new Xt(me,mn),zd=(xe/1e3).toFixed(3)+"em",Ld=(xr/1e3).toFixed(3)+"em",L4=new cr([z4],{width:zd,height:Ld,viewBox:"0 0 "+xe+" "+xr}),Ai=ye.makeSvgSpan([],[L4],h);Ai.height=xr/1e3,Ai.style.width=zd,Ai.style.height=Ld,ar.push({type:"elem",elem:Ai})}else{if(ar.push(yl(re,Se,b)),ar.push(Di),_===null){const Dr=pn-ot-Yt+2*Cl;ar.push(xl(Z,Dr,h))}else{const Dr=(pn-ot-Yt-Vt)/2+2*Cl;ar.push(xl(Z,Dr,h)),ar.push(Di),ar.push(yl(_,Se,b)),ar.push(Di),ar.push(xl(Z,Dr,h))}ar.push(Di),ar.push(yl($,Se,b))}const pr=h.havingBaseStyle(z.TEXT),gr=ye.makeVList({positionType:"bottom",positionData:Gt,children:ar},pr);return bl(ye.makeSpan(["delimsizing","mult"],[gr],pr),z.TEXT,h,S)},wl=80,Dl=.08,El=function(s,i,u,h,b){const S=Ce(s,h,u),$=new Xt(s,S),_=new cr([$],{width:"400em",height:ue(i),viewBox:"0 0 400000 "+u,preserveAspectRatio:"xMinYMin slice"});return ye.makeSvgSpan(["hide-tail"],[_],b)},h4=function(s,i){const u=i.havingBaseSizing(),h=Qc("\\surd",s*u.sizeMultiplier,Zc,u);let b=u.sizeMultiplier;const S=Math.max(0,i.minRuleThickness-i.fontMetrics().sqrtRuleThickness);let $,_=0,Z=0,re=0,me;return h.type==="small"?(re=1e3+1e3*S+wl,s<1?b=1:s<1.4&&(b=.7),_=(1+S+Dl)/b,Z=(1+S)/b,$=El("sqrtMain",_,re,S,i),$.style.minWidth="0.853em",me=.833/b):h.type==="large"?(re=(1e3+wl)*Na[h.size],Z=(Na[h.size]+S)/b,_=(Na[h.size]+S+Dl)/b,$=El("sqrtSize"+h.size,_,re,S,i),$.style.minWidth="1.02em",me=1/b):(_=s+S+Dl,Z=s+S,re=Math.floor(1e3*s+S)+wl,$=El("sqrtTall",_,re,S,i),$.style.minWidth="0.742em",me=1.056),$.height=Z,$.style.height=ue(_),{span:$,advanceWidth:me,ruleWidth:(i.fontMetrics().sqrtRuleThickness+S)*b}},Yc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],p4=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Gc=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Na=[0,1.2,1.8,2.4,3],m4=function(s,i,u,h,b){if(s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle"),Yc.includes(s)||Gc.includes(s))return Uc(s,i,!1,u,h,b);if(p4.includes(s))return Xc(s,Na[i],!1,u,h,b);throw new a("Illegal delimiter: '"+s+"'")},g4=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],v4=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"stack"}],Zc=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],b4=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.")},Qc=function(s,i,u,h){const b=Math.min(2,3-h.style.size);for(let S=b;S<u.length&&u[S].type!=="stack";S++){const $=Oa(s,b4(u[S]),"math");let _=$.height+$.depth;if(u[S].type==="small"){const Z=h.havingBaseStyle(u[S].style);_*=Z.sizeMultiplier}if(_>i)return u[S]}return u[u.length-1]},Jc=function(s,i,u,h,b,S){s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle");let $;Gc.includes(s)?$=g4:Yc.includes(s)?$=Zc:$=v4;const _=Qc(s,i,$,h);return _.type==="small"?u4(s,_.style,u,h,b,S):_.type==="large"?Uc(s,_.size,u,h,b,S):Xc(s,i,u,h,b,S)};var Vn={sqrtImage:h4,sizedDelim:m4,sizeToMaxHeight:Na,customSizedDelim:Jc,leftRightDelim:function(s,i,u,h,b,S){const $=h.fontMetrics().axisHeight*h.sizeMultiplier,_=901,Z=5/h.fontMetrics().ptPerEm,re=Math.max(i-$,u+$),me=Math.max(re/500*_,2*re-Z);return Jc(s,me,!0,h,b,S)}};const ed={"\\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}},y4=["(","\\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 Ei(s,i){const u=xi(s);if(u&&y4.includes(u.text))return u;throw u?new a("Invalid delimiter '"+u.text+"' after '"+i.funcName+"'",s):new a("Invalid delimiter type '"+s.type+"'",s)}et({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 u=Ei(i[0],s);return{type:"delimsizing",mode:s.parser.mode,size:ed[s.funcName].size,mclass:ed[s.funcName].mclass,delim:u.text}},htmlBuilder:(s,i)=>s.delim==="."?ye.makeSpan([s.mclass]):Vn.sizedDelim(s.delim,s.size,i,s.mode,[s.mclass]),mathmlBuilder:s=>{const i=[];s.delim!=="."&&i.push(hn(s.delim,s.mode));const u=new Ve.MathNode("mo",i);s.mclass==="mopen"||s.mclass==="mclose"?u.setAttribute("fence","true"):u.setAttribute("fence","false"),u.setAttribute("stretchy","true");const h=ue(Vn.sizeToMaxHeight[s.size]);return u.setAttribute("minsize",h),u.setAttribute("maxsize",h),u}});function td(s){if(!s.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}et({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const u=s.parser.gullet.macros.get("\\current@color");if(u&&typeof u!="string")throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:s.parser.mode,delim:Ei(i[0],s).text,color:u}}}),et({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const u=Ei(i[0],s),h=s.parser;++h.leftrightDepth;const b=h.parseExpression(!1);--h.leftrightDepth,h.expect("\\right",!1);const S=Rt(h.parseFunction(),"leftright-right");return{type:"leftright",mode:h.mode,body:b,left:u.text,right:S.delim,rightColor:S.color}},htmlBuilder:(s,i)=>{td(s);const u=Nr(s.body,i,!0,["mopen","mclose"]);let h=0,b=0,S=!1;for(let Z=0;Z<u.length;Z++)u[Z].isMiddle?S=!0:(h=Math.max(u[Z].height,h),b=Math.max(u[Z].depth,b));h*=i.sizeMultiplier,b*=i.sizeMultiplier;let $;if(s.left==="."?$=Fa(i,["mopen"]):$=Vn.leftRightDelim(s.left,h,b,i,s.mode,["mopen"]),u.unshift($),S)for(let Z=1;Z<u.length;Z++){const re=u[Z].isMiddle;re&&(u[Z]=Vn.leftRightDelim(re.delim,h,b,re.options,s.mode,[]))}let _;if(s.right===".")_=Fa(i,["mclose"]);else{const Z=s.rightColor?i.withColor(s.rightColor):i;_=Vn.leftRightDelim(s.right,h,b,Z,s.mode,["mclose"])}return u.push(_),ye.makeSpan(["minner"],u,i)},mathmlBuilder:(s,i)=>{td(s);const u=en(s.body,i);if(s.left!=="."){const h=new Ve.MathNode("mo",[hn(s.left,s.mode)]);h.setAttribute("fence","true"),u.unshift(h)}if(s.right!=="."){const h=new Ve.MathNode("mo",[hn(s.right,s.mode)]);h.setAttribute("fence","true"),s.rightColor&&h.setAttribute("mathcolor",s.rightColor),u.push(h)}return fl(u)}}),et({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const u=Ei(i[0],s);if(!s.parser.leftrightDepth)throw new a("\\middle without preceding \\left",u);return{type:"middle",mode:s.parser.mode,delim:u.text}},htmlBuilder:(s,i)=>{let u;if(s.delim===".")u=Fa(i,[]);else{u=Vn.sizedDelim(s.delim,1,i,s.mode,[]);const h={delim:s.delim,options:i};u.isMiddle=h}return u},mathmlBuilder:(s,i)=>{const u=s.delim==="\\vert"||s.delim==="|"?hn("|","text"):hn(s.delim,s.mode),h=new Ve.MathNode("mo",[u]);return h.setAttribute("fence","true"),h.setAttribute("lspace","0.05em"),h.setAttribute("rspace","0.05em"),h}});const kl=(s,i)=>{const u=ye.wrapFragment(Wt(s.body,i),i),h=s.label.slice(1);let b=i.sizeMultiplier,S,$=0;const _=D.isCharacterBox(s.body);if(h==="sout")S=ye.makeSpan(["stretchy","sout"]),S.height=i.fontMetrics().defaultRuleThickness/b,$=-.5*i.fontMetrics().xHeight;else if(h==="phase"){const re=Ie({number:.6,unit:"pt"},i),me=Ie({number:.35,unit:"ex"},i),xe=i.havingBaseSizing();b=b/xe.sizeMultiplier;const Se=u.height+u.depth+re+me;u.style.paddingLeft=ue(Se/2+re);const Xe=Math.floor(1e3*Se*b),ot=ge(Xe),Ft=new cr([new Xt("phase",ot)],{width:"400em",height:ue(Xe/1e3),viewBox:"0 0 400000 "+Xe,preserveAspectRatio:"xMinYMin slice"});S=ye.makeSvgSpan(["hide-tail"],[Ft],i),S.style.height=ue(Se),$=u.depth+re+me}else{/cancel/.test(h)?_||u.classes.push("cancel-pad"):h==="angl"?u.classes.push("anglpad"):u.classes.push("boxpad");let re=0,me=0,xe=0;/box/.test(h)?(xe=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness),re=i.fontMetrics().fboxsep+(h==="colorbox"?0:xe),me=re):h==="angl"?(xe=Math.max(i.fontMetrics().defaultRuleThickness,i.minRuleThickness),re=4*xe,me=Math.max(0,.25-u.depth)):(re=_?.2:0,me=re),S=Wn.encloseSpan(u,h,re,me,i),/fbox|boxed|fcolorbox/.test(h)?(S.style.borderStyle="solid",S.style.borderWidth=ue(xe)):h==="angl"&&xe!==.049&&(S.style.borderTopWidth=ue(xe),S.style.borderRightWidth=ue(xe)),$=u.depth+me,s.backgroundColor&&(S.style.backgroundColor=s.backgroundColor,s.borderColor&&(S.style.borderColor=s.borderColor))}let Z;if(s.backgroundColor)Z=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:S,shift:$},{type:"elem",elem:u,shift:0}]},i);else{const re=/cancel|phase/.test(h)?["svg-align"]:[];Z=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:S,shift:$,wrapperClasses:re}]},i)}return/cancel/.test(h)&&(Z.height=u.height,Z.depth=u.depth),/cancel/.test(h)&&!_?ye.makeSpan(["mord","cancel-lap"],[Z],i):ye.makeSpan(["mord"],[Z],i)},Sl=(s,i)=>{let u=0;const h=new Ve.MathNode(s.label.indexOf("colorbox")>-1?"mpadded":"menclose",[ur(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(u=i.fontMetrics().fboxsep*i.fontMetrics().ptPerEm,h.setAttribute("width","+"+2*u+"pt"),h.setAttribute("height","+"+2*u+"pt"),h.setAttribute("lspace",u+"pt"),h.setAttribute("voffset",u+"pt"),s.label==="\\fcolorbox"){const b=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness);h.setAttribute("style","border: "+b+"em solid "+String(s.borderColor))}break;case"\\xcancel":h.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return s.backgroundColor&&h.setAttribute("mathbackground",s.backgroundColor),h};et({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(s,i,u){let{parser:h,funcName:b}=s;const S=Rt(i[0],"color-token").color,$=i[1];return{type:"enclose",mode:h.mode,label:b,backgroundColor:S,body:$}},htmlBuilder:kl,mathmlBuilder:Sl}),et({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(s,i,u){let{parser:h,funcName:b}=s;const S=Rt(i[0],"color-token").color,$=Rt(i[1],"color-token").color,_=i[2];return{type:"enclose",mode:h.mode,label:b,backgroundColor:$,borderColor:S,body:_}},htmlBuilder:kl,mathmlBuilder:Sl}),et({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(s,i){let{parser:u}=s;return{type:"enclose",mode:u.mode,label:"\\fbox",body:i[0]}}}),et({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(s,i){let{parser:u,funcName:h}=s;const b=i[0];return{type:"enclose",mode:u.mode,label:h,body:b}},htmlBuilder:kl,mathmlBuilder:Sl}),et({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(s,i){let{parser:u}=s;return{type:"enclose",mode:u.mode,label:"\\angl",body:i[0]}}});const rd={};function $n(s){let{type:i,names:u,props:h,handler:b,htmlBuilder:S,mathmlBuilder:$}=s;const _={type:i,numArgs:h.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:b};for(let Z=0;Z<u.length;++Z)rd[u[Z]]=_;S&&(wr[i]=S),$&&(wn[i]=$)}const nd={};function q(s,i){nd[s]=i}class tn{constructor(i,u,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=i,this.start=u,this.end=h}static range(i,u){return u?!i||!i.loc||!u.loc||i.loc.lexer!==u.loc.lexer?null:new tn(i.loc.lexer,i.loc.start,u.loc.end):i&&i.loc}}class ln{constructor(i,u){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=i,this.loc=u}range(i,u){return new ln(u,tn.range(this,i))}}function od(s){const i=[];s.consumeSpaces();let u=s.fetch().text;for(u==="\\relax"&&(s.consume(),s.consumeSpaces(),u=s.fetch().text);u==="\\hline"||u==="\\hdashline";)s.consume(),i.push(u==="\\hdashline"),s.consumeSpaces(),u=s.fetch().text;return i}const ki=s=>{if(!s.parser.settings.displayMode)throw new a("{"+s.envName+"} can be used only in display mode.")};function Bl(s){if(s.indexOf("ed")===-1)return s.indexOf("*")===-1}function so(s,i,u){let{hskipBeforeAndAfter:h,addJot:b,cols:S,arraystretch:$,colSeparationType:_,autoTag:Z,singleRow:re,emptySingleRow:me,maxNumCols:xe,leqno:Se}=i;if(s.gullet.beginGroup(),re||s.gullet.macros.set("\\cr","\\\\\\relax"),!$){const hr=s.gullet.expandMacroAsText("\\arraystretch");if(hr==null)$=1;else if($=parseFloat(hr),!$||$<0)throw new a("Invalid \\arraystretch: "+hr)}s.gullet.beginGroup();let Xe=[];const ot=[Xe],Ft=[],Ht=[],Lt=Z!=null?[]:void 0;function Yt(){Z&&s.gullet.macros.set("\\@eqnsw","1",!0)}function Vt(){Lt&&(s.gullet.macros.get("\\df@tag")?(Lt.push(s.subparse([new ln("\\df@tag")])),s.gullet.macros.set("\\df@tag",void 0,!0)):Lt.push(!!Z&&s.gullet.macros.get("\\@eqnsw")==="1"))}for(Yt(),Ht.push(od(s));;){let hr=s.parseExpression(!1,re?"\\end":"\\\\");s.gullet.endGroup(),s.gullet.beginGroup(),hr={type:"ordgroup",mode:s.mode,body:hr},u&&(hr={type:"styling",mode:s.mode,style:u,body:[hr]}),Xe.push(hr);const zr=s.fetch().text;if(zr==="&"){if(xe&&Xe.length===xe){if(re||_)throw new a("Too many tab characters: &",s.nextToken);s.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}s.consume()}else if(zr==="\\end"){Vt(),Xe.length===1&&hr.type==="styling"&&hr.body[0].body.length===0&&(ot.length>1||!me)&&ot.pop(),Ht.length<ot.length+1&&Ht.push([]);break}else if(zr==="\\\\"){s.consume();let Ur;s.gullet.future().text!==" "&&(Ur=s.parseSizeGroup(!0)),Ft.push(Ur?Ur.value:null),Vt(),Ht.push(od(s)),Xe=[],ot.push(Xe),Yt()}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:b,arraystretch:$,body:ot,cols:S,rowGaps:Ft,hskipBeforeAndAfter:h,hLinesBeforeRow:Ht,colSeparationType:_,tags:Lt,leqno:Se}}function Al(s){return s.slice(0,1)==="d"?"display":"text"}const Tn=function(s,i){let u,h;const b=s.body.length,S=s.hLinesBeforeRow;let $=0,_=new Array(b);const Z=[],re=Math.max(i.fontMetrics().arrayRuleWidth,i.minRuleThickness),me=1/i.fontMetrics().ptPerEm;let xe=5*me;s.colSeparationType&&s.colSeparationType==="small"&&(xe=.2778*(i.havingStyle(z.SCRIPT).sizeMultiplier/i.sizeMultiplier));const Se=s.colSeparationType==="CD"?Ie({number:3,unit:"ex"},i):12*me,Xe=3*me,ot=s.arraystretch*Se,Ft=.7*ot,Ht=.3*ot;let Lt=0;function Yt(Gt){for(let ar=0;ar<Gt.length;++ar)ar>0&&(Lt+=.25),Z.push({pos:Lt,isDashed:Gt[ar]})}for(Yt(S[0]),u=0;u<s.body.length;++u){const Gt=s.body[u];let ar=Ft,pr=Ht;$<Gt.length&&($=Gt.length);const gr=new Array(Gt.length);for(h=0;h<Gt.length;++h){const mn=Wt(Gt[h],i);pr<mn.depth&&(pr=mn.depth),ar<mn.height&&(ar=mn.height),gr[h]=mn}const Dr=s.rowGaps[u];let xr=0;Dr&&(xr=Ie(Dr,i),xr>0&&(xr+=Ht,pr<xr&&(pr=xr),xr=0)),s.addJot&&(pr+=Xe),gr.height=ar,gr.depth=pr,Lt+=ar,gr.pos=Lt,Lt+=pr+xr,_[u]=gr,Yt(S[u+1])}const Vt=Lt/2+i.fontMetrics().axisHeight,hr=s.cols||[],zr=[];let Ur,pn;const Xo=[];if(s.tags&&s.tags.some(Gt=>Gt))for(u=0;u<b;++u){const Gt=_[u],ar=Gt.pos-Vt,pr=s.tags[u];let gr;pr===!0?gr=ye.makeSpan(["eqn-num"],[],i):pr===!1?gr=ye.makeSpan([],[],i):gr=ye.makeSpan([],Nr(pr,i,!0),i),gr.depth=Gt.depth,gr.height=Gt.height,Xo.push({type:"elem",elem:gr,shift:ar})}for(h=0,pn=0;h<$||pn<hr.length;++h,++pn){let Gt=hr[pn]||{},ar=!0;for(;Gt.type==="separator";){if(ar||(Ur=ye.makeSpan(["arraycolsep"],[]),Ur.style.width=ue(i.fontMetrics().doubleRuleSep),zr.push(Ur)),Gt.separator==="|"||Gt.separator===":"){const Dr=Gt.separator==="|"?"solid":"dashed",xr=ye.makeSpan(["vertical-separator"],[],i);xr.style.height=ue(Lt),xr.style.borderRightWidth=ue(re),xr.style.borderRightStyle=Dr,xr.style.margin="0 "+ue(-re/2);const mn=Lt-Vt;mn&&(xr.style.verticalAlign=ue(-mn)),zr.push(xr)}else throw new a("Invalid separator type: "+Gt.separator);pn++,Gt=hr[pn]||{},ar=!1}if(h>=$)continue;let pr;(h>0||s.hskipBeforeAndAfter)&&(pr=D.deflt(Gt.pregap,xe),pr!==0&&(Ur=ye.makeSpan(["arraycolsep"],[]),Ur.style.width=ue(pr),zr.push(Ur)));let gr=[];for(u=0;u<b;++u){const Dr=_[u],xr=Dr[h];if(!xr)continue;const mn=Dr.pos-Vt;xr.depth=Dr.depth,xr.height=Dr.height,gr.push({type:"elem",elem:xr,shift:mn})}gr=ye.makeVList({positionType:"individualShift",children:gr},i),gr=ye.makeSpan(["col-align-"+(Gt.align||"c")],[gr]),zr.push(gr),(h<$-1||s.hskipBeforeAndAfter)&&(pr=D.deflt(Gt.postgap,xe),pr!==0&&(Ur=ye.makeSpan(["arraycolsep"],[]),Ur.style.width=ue(pr),zr.push(Ur)))}if(_=ye.makeSpan(["mtable"],zr),Z.length>0){const Gt=ye.makeLineSpan("hline",i,re),ar=ye.makeLineSpan("hdashline",i,re),pr=[{type:"elem",elem:_,shift:0}];for(;Z.length>0;){const gr=Z.pop(),Dr=gr.pos-Vt;gr.isDashed?pr.push({type:"elem",elem:ar,shift:Dr}):pr.push({type:"elem",elem:Gt,shift:Dr})}_=ye.makeVList({positionType:"individualShift",children:pr},i)}if(Xo.length===0)return ye.makeSpan(["mord"],[_],i);{let Gt=ye.makeVList({positionType:"individualShift",children:Xo},i);return Gt=ye.makeSpan(["tag"],[Gt],i),ye.makeFragment([_,Gt])}},x4={c:"center ",l:"left ",r:"right "},Mn=function(s,i){const u=[],h=new Ve.MathNode("mtd",[],["mtr-glue"]),b=new Ve.MathNode("mtd",[],["mml-eqn-num"]);for(let xe=0;xe<s.body.length;xe++){const Se=s.body[xe],Xe=[];for(let ot=0;ot<Se.length;ot++)Xe.push(new Ve.MathNode("mtd",[ur(Se[ot],i)]));s.tags&&s.tags[xe]&&(Xe.unshift(h),Xe.push(h),s.leqno?Xe.unshift(b):Xe.push(b)),u.push(new Ve.MathNode("mtr",Xe))}let S=new Ve.MathNode("mtable",u);const $=s.arraystretch===.5?.1:.16+s.arraystretch-1+(s.addJot?.09:0);S.setAttribute("rowspacing",ue($));let _="",Z="";if(s.cols&&s.cols.length>0){const xe=s.cols;let Se="",Xe=!1,ot=0,Ft=xe.length;xe[0].type==="separator"&&(_+="top ",ot=1),xe[xe.length-1].type==="separator"&&(_+="bottom ",Ft-=1);for(let Ht=ot;Ht<Ft;Ht++)xe[Ht].type==="align"?(Z+=x4[xe[Ht].align],Xe&&(Se+="none "),Xe=!0):xe[Ht].type==="separator"&&Xe&&(Se+=xe[Ht].separator==="|"?"solid ":"dashed ",Xe=!1);S.setAttribute("columnalign",Z.trim()),/[sd]/.test(Se)&&S.setAttribute("columnlines",Se.trim())}if(s.colSeparationType==="align"){const xe=s.cols||[];let Se="";for(let Xe=1;Xe<xe.length;Xe++)Se+=Xe%2?"0em ":"1em ";S.setAttribute("columnspacing",Se.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 me=s.hLinesBeforeRow;_+=me[0].length>0?"left ":"",_+=me[me.length-1].length>0?"right ":"";for(let xe=1;xe<me.length-1;xe++)re+=me[xe].length===0?"none ":me[xe][0]?"dashed ":"solid ";return/[sd]/.test(re)&&S.setAttribute("rowlines",re.trim()),_!==""&&(S=new Ve.MathNode("menclose",[S]),S.setAttribute("notation",_.trim())),s.arraystretch&&s.arraystretch<1&&(S=new Ve.MathNode("mstyle",[S]),S.setAttribute("scriptlevel","1")),S},ad=function(s,i){s.envName.indexOf("ed")===-1&&ki(s);const u=[],h=s.envName.indexOf("at")>-1?"alignat":"align",b=s.envName==="split",S=so(s.parser,{cols:u,addJot:!0,autoTag:b?void 0:Bl(s.envName),emptySingleRow:!0,colSeparationType:h,maxNumCols:b?2:void 0,leqno:s.parser.settings.leqno},"display");let $,_=0;const Z={type:"ordgroup",mode:s.mode,body:[]};if(i[0]&&i[0].type==="ordgroup"){let me="";for(let xe=0;xe<i[0].body.length;xe++){const Se=Rt(i[0].body[xe],"textord");me+=Se.text}$=Number(me),_=$*2}const re=!_;S.body.forEach(function(me){for(let xe=1;xe<me.length;xe+=2){const Se=Rt(me[xe],"styling");Rt(Se.body[0],"ordgroup").body.unshift(Z)}if(re)_<me.length&&(_=me.length);else{const xe=me.length/2;if($<xe)throw new a("Too many math in a row: "+("expected "+$+", but got "+xe),me[0])}});for(let me=0;me<_;++me){let xe="r",Se=0;me%2===1?xe="l":me>0&&re&&(Se=1),u[me]={type:"align",align:xe,pregap:Se,postgap:0}}return S.colSeparationType=re?"align":"alignat",S};$n({type:"array",names:["array","darray"],props:{numArgs:1},handler(s,i){const u=(xi(i[0])?[i[0]]:Rt(i[0],"ordgroup").body).map(function(b){const S=ml(b).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,b)}),h={cols:u,hskipBeforeAndAfter:!0,maxNumCols:u.length};return so(s.parser,h,Al(s.envName))},htmlBuilder:Tn,mathmlBuilder:Mn}),$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 u="c";const h={hskipBeforeAndAfter:!1,cols:[{type:"align",align:u}]};if(s.envName.charAt(s.envName.length-1)==="*"){const $=s.parser;if($.consumeSpaces(),$.fetch().text==="["){if($.consume(),$.consumeSpaces(),u=$.fetch().text,"lcr".indexOf(u)===-1)throw new a("Expected l or c or r",$.nextToken);$.consume(),$.consumeSpaces(),$.expect("]"),$.consume(),h.cols=[{type:"align",align:u}]}}const b=so(s.parser,h,Al(s.envName)),S=Math.max(0,...b.body.map($=>$.length));return b.cols=new Array(S).fill({type:"align",align:u}),i?{type:"leftright",mode:s.mode,body:[b],left:i[0],right:i[1],rightColor:void 0}:b},htmlBuilder:Tn,mathmlBuilder:Mn}),$n({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(s){const i={arraystretch:.5},u=so(s.parser,i,"script");return u.colSeparationType="small",u},htmlBuilder:Tn,mathmlBuilder:Mn}),$n({type:"array",names:["subarray"],props:{numArgs:1},handler(s,i){const u=(xi(i[0])?[i[0]]:Rt(i[0],"ordgroup").body).map(function(b){const S=ml(b).text;if("lc".indexOf(S)!==-1)return{type:"align",align:S};throw new a("Unknown column alignment: "+S,b)});if(u.length>1)throw new a("{subarray} can contain only one column");let h={cols:u,hskipBeforeAndAfter:!1,arraystretch:.5};if(h=so(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:Tn,mathmlBuilder:Mn}),$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}]},u=so(s.parser,i,Al(s.envName));return{type:"leftright",mode:s.mode,body:[u],left:s.envName.indexOf("r")>-1?".":"\\{",right:s.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Tn,mathmlBuilder:Mn}),$n({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ad,htmlBuilder:Tn,mathmlBuilder:Mn}),$n({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(s){["gather","gather*"].includes(s.envName)&&ki(s);const i={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Bl(s.envName),emptySingleRow:!0,leqno:s.parser.settings.leqno};return so(s.parser,i,"display")},htmlBuilder:Tn,mathmlBuilder:Mn}),$n({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ad,htmlBuilder:Tn,mathmlBuilder:Mn}),$n({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(s){ki(s);const i={autoTag:Bl(s.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:s.parser.settings.leqno};return so(s.parser,i,"display")},htmlBuilder:Tn,mathmlBuilder:Mn}),$n({type:"array",names:["CD"],props:{numArgs:0},handler(s){return ki(s),s4(s.parser)},htmlBuilder:Tn,mathmlBuilder:Mn}),q("\\nonumber","\\gdef\\@eqnsw{0}"),q("\\notag","\\nonumber"),et({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 id=rd;et({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(s,i){let{parser:u,funcName:h}=s;const b=i[0];if(b.type!=="ordgroup")throw new a("Invalid environment name",b);let S="";for(let $=0;$<b.body.length;++$)S+=Rt(b.body[$],"textord").text;if(h==="\\begin"){if(!id.hasOwnProperty(S))throw new a("No such environment: "+S,b);const $=id[S],{args:_,optArgs:Z}=u.parseArguments("\\begin{"+S+"}",$),re={mode:u.mode,envName:S,parser:u},me=$.handler(re,_,Z);u.expect("\\end",!1);const xe=u.nextToken,Se=Rt(u.parseFunction(),"environment");if(Se.name!==S)throw new a("Mismatch: \\begin{"+S+"} matched by \\end{"+Se.name+"}",xe);return me}return{type:"environment",mode:u.mode,name:S,nameGroup:b}}});const sd=(s,i)=>{const u=s.font,h=i.withFont(u);return Wt(s.body,h)},ld=(s,i)=>{const u=s.font,h=i.withFont(u);return ur(s.body,h)},ud={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};et({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:u,funcName:h}=s;const b=On(i[0]);let S=h;return S in ud&&(S=ud[S]),{type:"font",mode:u.mode,font:S.slice(1),body:b}},htmlBuilder:sd,mathmlBuilder:ld}),et({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(s,i)=>{let{parser:u}=s;const h=i[0],b=D.isCharacterBox(h);return{type:"mclass",mode:u.mode,mclass:wi(h),body:[{type:"font",mode:u.mode,font:"boldsymbol",body:h}],isCharacterBox:b}}}),et({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{parser:u,funcName:h,breakOnTokenText:b}=s;const{mode:S}=u,$=u.parseExpression(!0,b),_="math"+h.slice(1);return{type:"font",mode:S,font:_,body:{type:"ordgroup",mode:u.mode,body:$}}},htmlBuilder:sd,mathmlBuilder:ld});const cd=(s,i)=>{let u=i;return s==="display"?u=u.id>=z.SCRIPT.id?u.text():z.DISPLAY:s==="text"&&u.size===z.DISPLAY.size?u=z.TEXT:s==="script"?u=z.SCRIPT:s==="scriptscript"&&(u=z.SCRIPTSCRIPT),u},Fl=(s,i)=>{const u=cd(s.size,i.style),h=u.fracNum(),b=u.fracDen();let S;S=i.havingStyle(h);const $=Wt(s.numer,S,i);if(s.continued){const Yt=8.5/i.fontMetrics().ptPerEm,Vt=3.5/i.fontMetrics().ptPerEm;$.height=$.height<Yt?Yt:$.height,$.depth=$.depth<Vt?Vt:$.depth}S=i.havingStyle(b);const _=Wt(s.denom,S,i);let Z,re,me;s.hasBarLine?(s.barSize?(re=Ie(s.barSize,i),Z=ye.makeLineSpan("frac-line",i,re)):Z=ye.makeLineSpan("frac-line",i),re=Z.height,me=Z.height):(Z=null,re=0,me=i.fontMetrics().defaultRuleThickness);let xe,Se,Xe;u.size===z.DISPLAY.size||s.size==="display"?(xe=i.fontMetrics().num1,re>0?Se=3*me:Se=7*me,Xe=i.fontMetrics().denom1):(re>0?(xe=i.fontMetrics().num2,Se=me):(xe=i.fontMetrics().num3,Se=3*me),Xe=i.fontMetrics().denom2);let ot;if(Z){const Yt=i.fontMetrics().axisHeight;xe-$.depth-(Yt+.5*re)<Se&&(xe+=Se-(xe-$.depth-(Yt+.5*re))),Yt-.5*re-(_.height-Xe)<Se&&(Xe+=Se-(Yt-.5*re-(_.height-Xe)));const Vt=-(Yt-.5*re);ot=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:_,shift:Xe},{type:"elem",elem:Z,shift:Vt},{type:"elem",elem:$,shift:-xe}]},i)}else{const Yt=xe-$.depth-(_.height-Xe);Yt<Se&&(xe+=.5*(Se-Yt),Xe+=.5*(Se-Yt)),ot=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:_,shift:Xe},{type:"elem",elem:$,shift:-xe}]},i)}S=i.havingStyle(u),ot.height*=S.sizeMultiplier/i.sizeMultiplier,ot.depth*=S.sizeMultiplier/i.sizeMultiplier;let Ft;u.size===z.DISPLAY.size?Ft=i.fontMetrics().delim1:u.size===z.SCRIPTSCRIPT.size?Ft=i.havingStyle(z.SCRIPT).fontMetrics().delim2:Ft=i.fontMetrics().delim2;let Ht,Lt;return s.leftDelim==null?Ht=Fa(i,["mopen"]):Ht=Vn.customSizedDelim(s.leftDelim,Ft,!0,i.havingStyle(u),s.mode,["mopen"]),s.continued?Lt=ye.makeSpan([]):s.rightDelim==null?Lt=Fa(i,["mclose"]):Lt=Vn.customSizedDelim(s.rightDelim,Ft,!0,i.havingStyle(u),s.mode,["mclose"]),ye.makeSpan(["mord"].concat(S.sizingClasses(i)),[Ht,ye.makeSpan(["mfrac"],[ot]),Lt],i)},Ol=(s,i)=>{let u=new Ve.MathNode("mfrac",[ur(s.numer,i),ur(s.denom,i)]);if(!s.hasBarLine)u.setAttribute("linethickness","0px");else if(s.barSize){const b=Ie(s.barSize,i);u.setAttribute("linethickness",ue(b))}const h=cd(s.size,i.style);if(h.size!==i.style.size){u=new Ve.MathNode("mstyle",[u]);const b=h.size===z.DISPLAY.size?"true":"false";u.setAttribute("displaystyle",b),u.setAttribute("scriptlevel","0")}if(s.leftDelim!=null||s.rightDelim!=null){const b=[];if(s.leftDelim!=null){const S=new Ve.MathNode("mo",[new Ve.TextNode(s.leftDelim.replace("\\",""))]);S.setAttribute("fence","true"),b.push(S)}if(b.push(u),s.rightDelim!=null){const S=new Ve.MathNode("mo",[new Ve.TextNode(s.rightDelim.replace("\\",""))]);S.setAttribute("fence","true"),b.push(S)}return fl(b)}return u};et({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(s,i)=>{let{parser:u,funcName:h}=s;const b=i[0],S=i[1];let $,_=null,Z=null,re="auto";switch(h){case"\\dfrac":case"\\frac":case"\\tfrac":$=!0;break;case"\\\\atopfrac":$=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":$=!1,_="(",Z=")";break;case"\\\\bracefrac":$=!1,_="\\{",Z="\\}";break;case"\\\\brackfrac":$=!1,_="[",Z="]";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:u.mode,continued:!1,numer:b,denom:S,hasBarLine:$,leftDelim:_,rightDelim:Z,size:re,barSize:null}},htmlBuilder:Fl,mathmlBuilder:Ol}),et({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(s,i)=>{let{parser:u,funcName:h}=s;const b=i[0],S=i[1];return{type:"genfrac",mode:u.mode,continued:!0,numer:b,denom:S,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),et({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(s){let{parser:i,funcName:u,token:h}=s,b;switch(u){case"\\over":b="\\frac";break;case"\\choose":b="\\binom";break;case"\\atop":b="\\\\atopfrac";break;case"\\brace":b="\\\\bracefrac";break;case"\\brack":b="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:b,token:h}}});const dd=["display","text","script","scriptscript"],fd=function(s){let i=null;return s.length>0&&(i=s,i=i==="."?null:i),i};et({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(s,i){let{parser:u}=s;const h=i[4],b=i[5],S=On(i[0]),$=S.type==="atom"&&S.family==="open"?fd(S.text):null,_=On(i[1]),Z=_.type==="atom"&&_.family==="close"?fd(_.text):null,re=Rt(i[2],"size");let me,xe=null;re.isBlank?me=!0:(xe=re.value,me=xe.number>0);let Se="auto",Xe=i[3];if(Xe.type==="ordgroup"){if(Xe.body.length>0){const ot=Rt(Xe.body[0],"textord");Se=dd[Number(ot.text)]}}else Xe=Rt(Xe,"textord"),Se=dd[Number(Xe.text)];return{type:"genfrac",mode:u.mode,numer:h,denom:b,continued:!1,hasBarLine:me,barSize:xe,leftDelim:$,rightDelim:Z,size:Se}},htmlBuilder:Fl,mathmlBuilder:Ol}),et({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(s,i){let{parser:u,funcName:h,token:b}=s;return{type:"infix",mode:u.mode,replaceWith:"\\\\abovefrac",size:Rt(i[0],"size").value,token:b}}}),et({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(s,i)=>{let{parser:u,funcName:h}=s;const b=i[0],S=C(Rt(i[1],"infix").size),$=i[2],_=S.number>0;return{type:"genfrac",mode:u.mode,numer:b,denom:$,continued:!1,hasBarLine:_,barSize:S,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Fl,mathmlBuilder:Ol});const hd=(s,i)=>{const u=i.style;let h,b;s.type==="supsub"?(h=s.sup?Wt(s.sup,i.havingStyle(u.sup()),i):Wt(s.sub,i.havingStyle(u.sub()),i),b=Rt(s.base,"horizBrace")):b=Rt(s,"horizBrace");const S=Wt(b.base,i.havingBaseStyle(z.DISPLAY)),$=Wn.svgSpan(b,i);let _;if(b.isOver?(_=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:S},{type:"kern",size:.1},{type:"elem",elem:$}]},i),_.children[0].children[0].children[1].classes.push("svg-align")):(_=ye.makeVList({positionType:"bottom",positionData:S.depth+.1+$.height,children:[{type:"elem",elem:$},{type:"kern",size:.1},{type:"elem",elem:S}]},i),_.children[0].children[0].children[0].classes.push("svg-align")),h){const Z=ye.makeSpan(["mord",b.isOver?"mover":"munder"],[_],i);b.isOver?_=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Z},{type:"kern",size:.2},{type:"elem",elem:h}]},i):_=ye.makeVList({positionType:"bottom",positionData:Z.depth+.2+h.height+h.depth,children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:Z}]},i)}return ye.makeSpan(["mord",b.isOver?"mover":"munder"],[_],i)};et({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(s,i){let{parser:u,funcName:h}=s;return{type:"horizBrace",mode:u.mode,label:h,isOver:/^\\over/.test(h),base:i[0]}},htmlBuilder:hd,mathmlBuilder:(s,i)=>{const u=Wn.mathMLnode(s.label);return new Ve.MathNode(s.isOver?"mover":"munder",[ur(s.base,i),u])}}),et({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(s,i)=>{let{parser:u}=s;const h=i[1],b=Rt(i[0],"url").url;return u.settings.isTrusted({command:"\\href",url:b})?{type:"href",mode:u.mode,href:b,body:fr(h)}:u.formatUnsupportedCmd("\\href")},htmlBuilder:(s,i)=>{const u=Nr(s.body,i,!1);return ye.makeAnchor(s.href,[],u,i)},mathmlBuilder:(s,i)=>{let u=io(s.body,i);return u instanceof sn||(u=new sn("mrow",[u])),u.setAttribute("href",s.href),u}}),et({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(s,i)=>{let{parser:u}=s;const h=Rt(i[0],"url").url;if(!u.settings.isTrusted({command:"\\url",url:h}))return u.formatUnsupportedCmd("\\url");const b=[];for(let $=0;$<h.length;$++){let _=h[$];_==="~"&&(_="\\textasciitilde"),b.push({type:"textord",mode:"text",text:_})}const S={type:"text",mode:u.mode,font:"\\texttt",body:b};return{type:"href",mode:u.mode,href:h,body:fr(S)}}}),et({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(s,i){let{parser:u}=s;return{type:"hbox",mode:u.mode,body:fr(i[0])}},htmlBuilder(s,i){const u=Nr(s.body,i,!1);return ye.makeFragment(u)},mathmlBuilder(s,i){return new Ve.MathNode("mrow",en(s.body,i))}}),et({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(s,i)=>{let{parser:u,funcName:h,token:b}=s;const S=Rt(i[0],"raw").string,$=i[1];u.settings.strict&&u.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let _;const Z={};switch(h){case"\\htmlClass":Z.class=S,_={command:"\\htmlClass",class:S};break;case"\\htmlId":Z.id=S,_={command:"\\htmlId",id:S};break;case"\\htmlStyle":Z.style=S,_={command:"\\htmlStyle",style:S};break;case"\\htmlData":{const re=S.split(",");for(let me=0;me<re.length;me++){const xe=re[me].split("=");if(xe.length!==2)throw new a("Error parsing key-value for \\htmlData");Z["data-"+xe[0].trim()]=xe[1].trim()}_={command:"\\htmlData",attributes:Z};break}default:throw new Error("Unrecognized html command")}return u.settings.isTrusted(_)?{type:"html",mode:u.mode,attributes:Z,body:fr($)}:u.formatUnsupportedCmd(h)},htmlBuilder:(s,i)=>{const u=Nr(s.body,i,!1),h=["enclosing"];s.attributes.class&&h.push(...s.attributes.class.trim().split(/\s+/));const b=ye.makeSpan(h,u,i);for(const S in s.attributes)S!=="class"&&s.attributes.hasOwnProperty(S)&&b.setAttribute(S,s.attributes[S]);return b},mathmlBuilder:(s,i)=>io(s.body,i)}),et({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(s,i)=>{let{parser:u}=s;return{type:"htmlmathml",mode:u.mode,html:fr(i[0]),mathml:fr(i[1])}},htmlBuilder:(s,i)=>{const u=Nr(s.html,i,!1);return ye.makeFragment(u)},mathmlBuilder:(s,i)=>io(s.mathml,i)});const Nl=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 u={number:+(i[1]+i[2]),unit:i[3]};if(!bt(u))throw new a("Invalid unit: '"+u.unit+"' in \\includegraphics.");return u}};et({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(s,i,u)=>{let{parser:h}=s,b={number:0,unit:"em"},S={number:.9,unit:"em"},$={number:0,unit:"em"},_="";if(u[0]){const re=Rt(u[0],"raw").string.split(",");for(let me=0;me<re.length;me++){const xe=re[me].split("=");if(xe.length===2){const Se=xe[1].trim();switch(xe[0].trim()){case"alt":_=Se;break;case"width":b=Nl(Se);break;case"height":S=Nl(Se);break;case"totalheight":$=Nl(Se);break;default:throw new a("Invalid key: '"+xe[0]+"' in \\includegraphics.")}}}}const Z=Rt(i[0],"url").url;return _===""&&(_=Z,_=_.replace(/^.*[\\/]/,""),_=_.substring(0,_.lastIndexOf("."))),h.settings.isTrusted({command:"\\includegraphics",url:Z})?{type:"includegraphics",mode:h.mode,alt:_,width:b,height:S,totalheight:$,src:Z}:h.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(s,i)=>{const u=Ie(s.height,i);let h=0;s.totalheight.number>0&&(h=Ie(s.totalheight,i)-u);let b=0;s.width.number>0&&(b=Ie(s.width,i));const S={height:ue(u+h)};b>0&&(S.width=ue(b)),h>0&&(S.verticalAlign=ue(-h));const $=new _t(s.src,s.alt,S);return $.height=u,$.depth=h,$},mathmlBuilder:(s,i)=>{const u=new Ve.MathNode("mglyph",[]);u.setAttribute("alt",s.alt);const h=Ie(s.height,i);let b=0;if(s.totalheight.number>0&&(b=Ie(s.totalheight,i)-h,u.setAttribute("valign",ue(-b))),u.setAttribute("height",ue(h+b)),s.width.number>0){const S=Ie(s.width,i);u.setAttribute("width",ue(S))}return u.setAttribute("src",s.src),u}}),et({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(s,i){let{parser:u,funcName:h}=s;const b=Rt(i[0],"size");if(u.settings.strict){const S=h[1]==="m",$=b.value.unit==="mu";S?($||u.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" supports only mu units, "+("not "+b.value.unit+" units")),u.mode!=="math"&&u.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" works only in math mode")):$&&u.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" doesn't support mu units")}return{type:"kern",mode:u.mode,dimension:b.value}},htmlBuilder(s,i){return ye.makeGlue(s.dimension,i)},mathmlBuilder(s,i){const u=Ie(s.dimension,i);return new Ve.SpaceNode(u)}}),et({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:u,funcName:h}=s;const b=i[0];return{type:"lap",mode:u.mode,alignment:h.slice(5),body:b}},htmlBuilder:(s,i)=>{let u;s.alignment==="clap"?(u=ye.makeSpan([],[Wt(s.body,i)]),u=ye.makeSpan(["inner"],[u],i)):u=ye.makeSpan(["inner"],[Wt(s.body,i)]);const h=ye.makeSpan(["fix"],[]);let b=ye.makeSpan([s.alignment],[u,h],i);const S=ye.makeSpan(["strut"]);return S.style.height=ue(b.height+b.depth),b.depth&&(S.style.verticalAlign=ue(-b.depth)),b.children.unshift(S),b=ye.makeSpan(["thinbox"],[b],i),ye.makeSpan(["mord","vbox"],[b],i)},mathmlBuilder:(s,i)=>{const u=new Ve.MathNode("mpadded",[ur(s.body,i)]);if(s.alignment!=="rlap"){const h=s.alignment==="llap"?"-1":"-0.5";u.setAttribute("lspace",h+"width")}return u.setAttribute("width","0px"),u}}),et({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,i){let{funcName:u,parser:h}=s;const b=h.mode;h.switchMode("math");const S=u==="\\("?"\\)":"$",$=h.parseExpression(!1,S);return h.expect(S),h.switchMode(b),{type:"styling",mode:h.mode,style:"text",body:$}}}),et({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,i){throw new a("Mismatched "+s.funcName)}});const pd=(s,i)=>{switch(i.style.size){case z.DISPLAY.size:return s.display;case z.TEXT.size:return s.text;case z.SCRIPT.size:return s.script;case z.SCRIPTSCRIPT.size:return s.scriptscript;default:return s.text}};et({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(s,i)=>{let{parser:u}=s;return{type:"mathchoice",mode:u.mode,display:fr(i[0]),text:fr(i[1]),script:fr(i[2]),scriptscript:fr(i[3])}},htmlBuilder:(s,i)=>{const u=pd(s,i),h=Nr(u,i,!1);return ye.makeFragment(h)},mathmlBuilder:(s,i)=>{const u=pd(s,i);return io(u,i)}});const md=(s,i,u,h,b,S,$)=>{s=ye.makeSpan([],[s]);const _=u&&D.isCharacterBox(u);let Z,re;if(i){const Se=Wt(i,h.havingStyle(b.sup()),h);re={elem:Se,kern:Math.max(h.fontMetrics().bigOpSpacing1,h.fontMetrics().bigOpSpacing3-Se.depth)}}if(u){const Se=Wt(u,h.havingStyle(b.sub()),h);Z={elem:Se,kern:Math.max(h.fontMetrics().bigOpSpacing2,h.fontMetrics().bigOpSpacing4-Se.height)}}let me;if(re&&Z){const Se=h.fontMetrics().bigOpSpacing5+Z.elem.height+Z.elem.depth+Z.kern+s.depth+$;me=ye.makeVList({positionType:"bottom",positionData:Se,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:Z.elem,marginLeft:ue(-S)},{type:"kern",size:Z.kern},{type:"elem",elem:s},{type:"kern",size:re.kern},{type:"elem",elem:re.elem,marginLeft:ue(S)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else if(Z){const Se=s.height-$;me=ye.makeVList({positionType:"top",positionData:Se,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:Z.elem,marginLeft:ue(-S)},{type:"kern",size:Z.kern},{type:"elem",elem:s}]},h)}else if(re){const Se=s.depth+$;me=ye.makeVList({positionType:"bottom",positionData:Se,children:[{type:"elem",elem:s},{type:"kern",size:re.kern},{type:"elem",elem:re.elem,marginLeft:ue(S)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else return s;const xe=[me];if(Z&&S!==0&&!_){const Se=ye.makeSpan(["mspace"],[],h);Se.style.marginRight=ue(S),xe.unshift(Se)}return ye.makeSpan(["mop","op-limits"],xe,h)},gd=["\\smallint"],Uo=(s,i)=>{let u,h,b=!1,S;s.type==="supsub"?(u=s.sup,h=s.sub,S=Rt(s.base,"op"),b=!0):S=Rt(s,"op");const $=i.style;let _=!1;$.size===z.DISPLAY.size&&S.symbol&&!gd.includes(S.name)&&(_=!0);let Z;if(S.symbol){const xe=_?"Size2-Regular":"Size1-Regular";let Se="";if((S.name==="\\oiint"||S.name==="\\oiiint")&&(Se=S.name.slice(1),S.name=Se==="oiint"?"\\iint":"\\iiint"),Z=ye.makeSymbol(S.name,xe,"math",i,["mop","op-symbol",_?"large-op":"small-op"]),Se.length>0){const Xe=Z.italic,ot=ye.staticSvg(Se+"Size"+(_?"2":"1"),i);Z=ye.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Z,shift:0},{type:"elem",elem:ot,shift:_?.08:0}]},i),S.name="\\"+Se,Z.classes.unshift("mop"),Z.italic=Xe}}else if(S.body){const xe=Nr(S.body,i,!0);xe.length===1&&xe[0]instanceof yt?(Z=xe[0],Z.classes[0]="mop"):Z=ye.makeSpan(["mop"],xe,i)}else{const xe=[];for(let Se=1;Se<S.name.length;Se++)xe.push(ye.mathsym(S.name[Se],S.mode,i));Z=ye.makeSpan(["mop"],xe,i)}let re=0,me=0;return(Z instanceof yt||S.name==="\\oiint"||S.name==="\\oiiint")&&!S.suppressBaseShift&&(re=(Z.height-Z.depth)/2-i.fontMetrics().axisHeight,me=Z.italic),b?md(Z,u,h,i,$,me,re):(re&&(Z.style.position="relative",Z.style.top=ue(re)),Z)},$a=(s,i)=>{let u;if(s.symbol)u=new sn("mo",[hn(s.name,s.mode)]),gd.includes(s.name)&&u.setAttribute("largeop","false");else if(s.body)u=new sn("mo",en(s.body,i));else{u=new sn("mi",[new Nn(s.name.slice(1))]);const h=new sn("mo",[hn("\u2061","text")]);s.parentIsSupSub?u=new sn("mrow",[u,h]):u=Tc([u,h])}return u},C4={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};et({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:u,funcName:h}=s,b=h;return b.length===1&&(b=C4[b]),{type:"op",mode:u.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:b}},htmlBuilder:Uo,mathmlBuilder:$a}),et({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{let{parser:u}=s;const h=i[0];return{type:"op",mode:u.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:fr(h)}},htmlBuilder:Uo,mathmlBuilder:$a});const w4={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};et({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:u}=s;return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:u}},htmlBuilder:Uo,mathmlBuilder:$a}),et({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(s){let{parser:i,funcName:u}=s;return{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:u}},htmlBuilder:Uo,mathmlBuilder:$a}),et({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(s){let{parser:i,funcName:u}=s,h=u;return h.length===1&&(h=w4[h]),{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:h}},htmlBuilder:Uo,mathmlBuilder:$a});const vd=(s,i)=>{let u,h,b=!1,S;s.type==="supsub"?(u=s.sup,h=s.sub,S=Rt(s.base,"operatorname"),b=!0):S=Rt(s,"operatorname");let $;if(S.body.length>0){const _=S.body.map(re=>{const me=re.text;return typeof me=="string"?{type:"textord",mode:re.mode,text:me}:re}),Z=Nr(_,i.withFont("mathrm"),!0);for(let re=0;re<Z.length;re++){const me=Z[re];me instanceof yt&&(me.text=me.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}$=ye.makeSpan(["mop"],Z,i)}else $=ye.makeSpan(["mop"],[],i);return b?md($,u,h,i,i.style,0,0):$};et({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(s,i)=>{let{parser:u,funcName:h}=s;const b=i[0];return{type:"operatorname",mode:u.mode,body:fr(b),alwaysHandleSupSub:h==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:vd,mathmlBuilder:(s,i)=>{let u=en(s.body,i.withFont("mathrm")),h=!0;for(let $=0;$<u.length;$++){const _=u[$];if(!(_ instanceof Ve.SpaceNode))if(_ instanceof Ve.MathNode)switch(_.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const Z=_.children[0];_.children.length===1&&Z instanceof Ve.TextNode?Z.text=Z.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):h=!1;break}default:h=!1}else h=!1}if(h){const $=u.map(_=>_.toText()).join("");u=[new Ve.TextNode($)]}const b=new Ve.MathNode("mi",u);b.setAttribute("mathvariant","normal");const S=new Ve.MathNode("mo",[hn("\u2061","text")]);return s.parentIsSupSub?new Ve.MathNode("mrow",[b,S]):Ve.newDocumentFragment([b,S])}}),q("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Vr({type:"ordgroup",htmlBuilder(s,i){return s.semisimple?ye.makeFragment(Nr(s.body,i,!1)):ye.makeSpan(["mord"],Nr(s.body,i,!0),i)},mathmlBuilder(s,i){return io(s.body,i,!0)}}),et({type:"overline",names:["\\overline"],props:{numArgs:1},handler(s,i){let{parser:u}=s;const h=i[0];return{type:"overline",mode:u.mode,body:h}},htmlBuilder(s,i){const u=Wt(s.body,i.havingCrampedStyle()),h=ye.makeLineSpan("overline-line",i),b=i.fontMetrics().defaultRuleThickness,S=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:3*b},{type:"elem",elem:h},{type:"kern",size:b}]},i);return ye.makeSpan(["mord","overline"],[S],i)},mathmlBuilder(s,i){const u=new Ve.MathNode("mo",[new Ve.TextNode("\u203E")]);u.setAttribute("stretchy","true");const h=new Ve.MathNode("mover",[ur(s.body,i),u]);return h.setAttribute("accent","true"),h}}),et({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:u}=s;const h=i[0];return{type:"phantom",mode:u.mode,body:fr(h)}},htmlBuilder:(s,i)=>{const u=Nr(s.body,i.withPhantom(),!1);return ye.makeFragment(u)},mathmlBuilder:(s,i)=>{const u=en(s.body,i);return new Ve.MathNode("mphantom",u)}}),et({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:u}=s;const h=i[0];return{type:"hphantom",mode:u.mode,body:h}},htmlBuilder:(s,i)=>{let u=ye.makeSpan([],[Wt(s.body,i.withPhantom())]);if(u.height=0,u.depth=0,u.children)for(let h=0;h<u.children.length;h++)u.children[h].height=0,u.children[h].depth=0;return u=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u}]},i),ye.makeSpan(["mord"],[u],i)},mathmlBuilder:(s,i)=>{const u=en(fr(s.body),i),h=new Ve.MathNode("mphantom",u),b=new Ve.MathNode("mpadded",[h]);return b.setAttribute("height","0px"),b.setAttribute("depth","0px"),b}}),et({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:u}=s;const h=i[0];return{type:"vphantom",mode:u.mode,body:h}},htmlBuilder:(s,i)=>{const u=ye.makeSpan(["inner"],[Wt(s.body,i.withPhantom())]),h=ye.makeSpan(["fix"],[]);return ye.makeSpan(["mord","rlap"],[u,h],i)},mathmlBuilder:(s,i)=>{const u=en(fr(s.body),i),h=new Ve.MathNode("mphantom",u),b=new Ve.MathNode("mpadded",[h]);return b.setAttribute("width","0px"),b}}),et({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(s,i){let{parser:u}=s;const h=Rt(i[0],"size").value,b=i[1];return{type:"raisebox",mode:u.mode,dy:h,body:b}},htmlBuilder(s,i){const u=Wt(s.body,i),h=Ie(s.dy,i);return ye.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:u}]},i)},mathmlBuilder(s,i){const u=new Ve.MathNode("mpadded",[ur(s.body,i)]),h=s.dy.number+s.dy.unit;return u.setAttribute("voffset",h),u}}),et({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(s){let{parser:i}=s;return{type:"internal",mode:i.mode}}}),et({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(s,i,u){let{parser:h}=s;const b=u[0],S=Rt(i[0],"size"),$=Rt(i[1],"size");return{type:"rule",mode:h.mode,shift:b&&Rt(b,"size").value,width:S.value,height:$.value}},htmlBuilder(s,i){const u=ye.makeSpan(["mord","rule"],[],i),h=Ie(s.width,i),b=Ie(s.height,i),S=s.shift?Ie(s.shift,i):0;return u.style.borderRightWidth=ue(h),u.style.borderTopWidth=ue(b),u.style.bottom=ue(S),u.width=h,u.height=b+S,u.depth=-S,u.maxFontSize=b*1.125*i.sizeMultiplier,u},mathmlBuilder(s,i){const u=Ie(s.width,i),h=Ie(s.height,i),b=s.shift?Ie(s.shift,i):0,S=i.color&&i.getColor()||"black",$=new Ve.MathNode("mspace");$.setAttribute("mathbackground",S),$.setAttribute("width",ue(u)),$.setAttribute("height",ue(h));const _=new Ve.MathNode("mpadded",[$]);return b>=0?_.setAttribute("height",ue(b)):(_.setAttribute("height",ue(b)),_.setAttribute("depth",ue(-b))),_.setAttribute("voffset",ue(b)),_}});function bd(s,i,u){const h=Nr(s,i,!1),b=i.sizeMultiplier/u.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(u)):h[S].classes[$+1]==="reset-size"+i.size&&(h[S].classes[$+1]="reset-size"+u.size),h[S].height*=b,h[S].depth*=b}return ye.makeFragment(h)}const yd=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];et({type:"sizing",names:yd,props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{breakOnTokenText:u,funcName:h,parser:b}=s;const S=b.parseExpression(!1,u);return{type:"sizing",mode:b.mode,size:yd.indexOf(h)+1,body:S}},htmlBuilder:(s,i)=>{const u=i.havingSize(s.size);return bd(s.body,u,i)},mathmlBuilder:(s,i)=>{const u=i.havingSize(s.size),h=en(s.body,u),b=new Ve.MathNode("mstyle",h);return b.setAttribute("mathsize",ue(u.sizeMultiplier)),b}}),et({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(s,i,u)=>{let{parser:h}=s,b=!1,S=!1;const $=u[0]&&Rt(u[0],"ordgroup");if($){let Z="";for(let re=0;re<$.body.length;++re)if(Z=$.body[re].text,Z==="t")b=!0;else if(Z==="b")S=!0;else{b=!1,S=!1;break}}else b=!0,S=!0;const _=i[0];return{type:"smash",mode:h.mode,body:_,smashHeight:b,smashDepth:S}},htmlBuilder:(s,i)=>{const u=ye.makeSpan([],[Wt(s.body,i)]);if(!s.smashHeight&&!s.smashDepth)return u;if(s.smashHeight&&(u.height=0,u.children))for(let b=0;b<u.children.length;b++)u.children[b].height=0;if(s.smashDepth&&(u.depth=0,u.children))for(let b=0;b<u.children.length;b++)u.children[b].depth=0;const h=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u}]},i);return ye.makeSpan(["mord"],[h],i)},mathmlBuilder:(s,i)=>{const u=new Ve.MathNode("mpadded",[ur(s.body,i)]);return s.smashHeight&&u.setAttribute("height","0px"),s.smashDepth&&u.setAttribute("depth","0px"),u}}),et({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(s,i,u){let{parser:h}=s;const b=u[0],S=i[0];return{type:"sqrt",mode:h.mode,body:S,index:b}},htmlBuilder(s,i){let u=Wt(s.body,i.havingCrampedStyle());u.height===0&&(u.height=i.fontMetrics().xHeight),u=ye.wrapFragment(u,i);const h=i.fontMetrics().defaultRuleThickness;let b=h;i.style.id<z.TEXT.id&&(b=i.fontMetrics().xHeight);let S=h+b/4;const $=u.height+u.depth+S+h,{span:_,ruleWidth:Z,advanceWidth:re}=Vn.sqrtImage($,i),me=_.height-Z;me>u.height+u.depth+S&&(S=(S+me-u.height-u.depth)/2);const xe=_.height-u.height-S-Z;u.style.paddingLeft=ue(re);const Se=ye.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u,wrapperClasses:["svg-align"]},{type:"kern",size:-(u.height+xe)},{type:"elem",elem:_},{type:"kern",size:Z}]},i);if(s.index){const Xe=i.havingStyle(z.SCRIPTSCRIPT),ot=Wt(s.index,Xe,i),Ft=.6*(Se.height-Se.depth),Ht=ye.makeVList({positionType:"shift",positionData:-Ft,children:[{type:"elem",elem:ot}]},i),Lt=ye.makeSpan(["root"],[Ht]);return ye.makeSpan(["mord","sqrt"],[Lt,Se],i)}else return ye.makeSpan(["mord","sqrt"],[Se],i)},mathmlBuilder(s,i){const{body:u,index:h}=s;return h?new Ve.MathNode("mroot",[ur(u,i),ur(h,i)]):new Ve.MathNode("msqrt",[ur(u,i)])}});const xd={display:z.DISPLAY,text:z.TEXT,script:z.SCRIPT,scriptscript:z.SCRIPTSCRIPT};et({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s,i){let{breakOnTokenText:u,funcName:h,parser:b}=s;const S=b.parseExpression(!0,u),$=h.slice(1,h.length-5);return{type:"styling",mode:b.mode,style:$,body:S}},htmlBuilder(s,i){const u=xd[s.style],h=i.havingStyle(u).withFont("");return bd(s.body,h,i)},mathmlBuilder(s,i){const u=xd[s.style],h=i.havingStyle(u),b=en(s.body,h),S=new Ve.MathNode("mstyle",b),$={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 D4=function(s,i){const u=s.base;return u?u.type==="op"?u.limits&&(i.style.size===z.DISPLAY.size||u.alwaysHandleSupSub)?Uo:null:u.type==="operatorname"?u.alwaysHandleSupSub&&(i.style.size===z.DISPLAY.size||u.limits)?vd:null:u.type==="accent"?D.isCharacterBox(u.base)?gl:null:u.type==="horizBrace"&&!s.sub===u.isOver?hd:null:null};Vr({type:"supsub",htmlBuilder(s,i){const u=D4(s,i);if(u)return u(s,i);const{base:h,sup:b,sub:S}=s,$=Wt(h,i);let _,Z;const re=i.fontMetrics();let me=0,xe=0;const Se=h&&D.isCharacterBox(h);if(b){const Vt=i.havingStyle(i.style.sup());_=Wt(b,Vt,i),Se||(me=$.height-Vt.fontMetrics().supDrop*Vt.sizeMultiplier/i.sizeMultiplier)}if(S){const Vt=i.havingStyle(i.style.sub());Z=Wt(S,Vt,i),Se||(xe=$.depth+Vt.fontMetrics().subDrop*Vt.sizeMultiplier/i.sizeMultiplier)}let Xe;i.style===z.DISPLAY?Xe=re.sup1:i.style.cramped?Xe=re.sup3:Xe=re.sup2;const ot=i.sizeMultiplier,Ft=ue(.5/re.ptPerEm/ot);let Ht=null;if(Z){const Vt=s.base&&s.base.type==="op"&&s.base.name&&(s.base.name==="\\oiint"||s.base.name==="\\oiiint");($ instanceof yt||Vt)&&(Ht=ue(-$.italic))}let Lt;if(_&&Z){me=Math.max(me,Xe,_.depth+.25*re.xHeight),xe=Math.max(xe,re.sub2);const Vt=4*re.defaultRuleThickness;if(me-_.depth-(Z.height-xe)<Vt){xe=Vt-(me-_.depth)+Z.height;const zr=.8*re.xHeight-(me-_.depth);zr>0&&(me+=zr,xe-=zr)}const hr=[{type:"elem",elem:Z,shift:xe,marginRight:Ft,marginLeft:Ht},{type:"elem",elem:_,shift:-me,marginRight:Ft}];Lt=ye.makeVList({positionType:"individualShift",children:hr},i)}else if(Z){xe=Math.max(xe,re.sub1,Z.height-.8*re.xHeight);const Vt=[{type:"elem",elem:Z,marginLeft:Ht,marginRight:Ft}];Lt=ye.makeVList({positionType:"shift",positionData:xe,children:Vt},i)}else if(_)me=Math.max(me,Xe,_.depth+.25*re.xHeight),Lt=ye.makeVList({positionType:"shift",positionData:-me,children:[{type:"elem",elem:_,marginRight:Ft}]},i);else throw new Error("supsub must have either sup or sub.");const Yt=cl($,"right")||"mord";return ye.makeSpan([Yt],[$,ye.makeSpan(["msupsub"],[Lt])],i)},mathmlBuilder(s,i){let u=!1,h,b;s.base&&s.base.type==="horizBrace"&&(b=!!s.sup,b===s.base.isOver&&(u=!0,h=s.base.isOver)),s.base&&(s.base.type==="op"||s.base.type==="operatorname")&&(s.base.parentIsSupSub=!0);const S=[ur(s.base,i)];s.sub&&S.push(ur(s.sub,i)),s.sup&&S.push(ur(s.sup,i));let $;if(u)$=h?"mover":"munder";else if(s.sub)if(s.sup){const _=s.base;_&&_.type==="op"&&_.limits&&i.style===z.DISPLAY||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(i.style===z.DISPLAY||_.limits)?$="munderover":$="msubsup"}else{const _=s.base;_&&_.type==="op"&&_.limits&&(i.style===z.DISPLAY||_.alwaysHandleSupSub)||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(_.limits||i.style===z.DISPLAY)?$="munder":$="msub"}else{const _=s.base;_&&_.type==="op"&&_.limits&&(i.style===z.DISPLAY||_.alwaysHandleSupSub)||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(_.limits||i.style===z.DISPLAY)?$="mover":$="msup"}return new Ve.MathNode($,S)}}),Vr({type:"atom",htmlBuilder(s,i){return ye.mathsym(s.text,s.mode,i,["m"+s.family])},mathmlBuilder(s,i){const u=new Ve.MathNode("mo",[hn(s.text,s.mode)]);if(s.family==="bin"){const h=hl(s,i);h==="bold-italic"&&u.setAttribute("mathvariant",h)}else s.family==="punct"?u.setAttribute("separator","true"):(s.family==="open"||s.family==="close")&&u.setAttribute("stretchy","false");return u}});const Cd={mi:"italic",mn:"normal",mtext:"normal"};Vr({type:"mathord",htmlBuilder(s,i){return ye.makeOrd(s,i,"mathord")},mathmlBuilder(s,i){const u=new Ve.MathNode("mi",[hn(s.text,s.mode,i)]),h=hl(s,i)||"italic";return h!==Cd[u.type]&&u.setAttribute("mathvariant",h),u}}),Vr({type:"textord",htmlBuilder(s,i){return ye.makeOrd(s,i,"textord")},mathmlBuilder(s,i){const u=hn(s.text,s.mode,i),h=hl(s,i)||"normal";let b;return s.mode==="text"?b=new Ve.MathNode("mtext",[u]):/[0-9]/.test(s.text)?b=new Ve.MathNode("mn",[u]):s.text==="\\prime"?b=new Ve.MathNode("mo",[u]):b=new Ve.MathNode("mi",[u]),h!==Cd[b.type]&&b.setAttribute("mathvariant",h),b}});const $l={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Tl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Vr({type:"spacing",htmlBuilder(s,i){if(Tl.hasOwnProperty(s.text)){const u=Tl[s.text].className||"";if(s.mode==="text"){const h=ye.makeOrd(s,i,"textord");return h.classes.push(u),h}else return ye.makeSpan(["mspace",u],[ye.mathsym(s.text,s.mode,i)],i)}else{if($l.hasOwnProperty(s.text))return ye.makeSpan(["mspace",$l[s.text]],[],i);throw new a('Unknown type of space "'+s.text+'"')}},mathmlBuilder(s,i){let u;if(Tl.hasOwnProperty(s.text))u=new Ve.MathNode("mtext",[new Ve.TextNode("\xA0")]);else{if($l.hasOwnProperty(s.text))return new Ve.MathNode("mspace");throw new a('Unknown type of space "'+s.text+'"')}return u}});const wd=()=>{const s=new Ve.MathNode("mtd",[]);return s.setAttribute("width","50%"),s};Vr({type:"tag",mathmlBuilder(s,i){const u=new Ve.MathNode("mtable",[new Ve.MathNode("mtr",[wd(),new Ve.MathNode("mtd",[io(s.body,i)]),wd(),new Ve.MathNode("mtd",[io(s.tag,i)])])]);return u.setAttribute("width","100%"),u}});const Dd={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ed={"\\textbf":"textbf","\\textmd":"textmd"},E4={"\\textit":"textit","\\textup":"textup"},kd=(s,i)=>{const u=s.font;if(u){if(Dd[u])return i.withTextFontFamily(Dd[u]);if(Ed[u])return i.withTextFontWeight(Ed[u]);if(u==="\\emph")return i.fontShape==="textit"?i.withTextFontShape("textup"):i.withTextFontShape("textit")}else return i;return i.withTextFontShape(E4[u])};et({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:u,funcName:h}=s;const b=i[0];return{type:"text",mode:u.mode,body:fr(b),font:h}},htmlBuilder(s,i){const u=kd(s,i),h=Nr(s.body,u,!0);return ye.makeSpan(["mord","text"],h,u)},mathmlBuilder(s,i){const u=kd(s,i);return io(s.body,u)}}),et({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:u}=s;return{type:"underline",mode:u.mode,body:i[0]}},htmlBuilder(s,i){const u=Wt(s.body,i),h=ye.makeLineSpan("underline-line",i),b=i.fontMetrics().defaultRuleThickness,S=ye.makeVList({positionType:"top",positionData:u.height,children:[{type:"kern",size:b},{type:"elem",elem:h},{type:"kern",size:3*b},{type:"elem",elem:u}]},i);return ye.makeSpan(["mord","underline"],[S],i)},mathmlBuilder(s,i){const u=new Ve.MathNode("mo",[new Ve.TextNode("\u203E")]);u.setAttribute("stretchy","true");const h=new Ve.MathNode("munder",[ur(s.body,i),u]);return h.setAttribute("accentunder","true"),h}}),et({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(s,i){let{parser:u}=s;return{type:"vcenter",mode:u.mode,body:i[0]}},htmlBuilder(s,i){const u=Wt(s.body,i),h=i.fontMetrics().axisHeight,b=.5*(u.height-h-(u.depth+h));return ye.makeVList({positionType:"shift",positionData:b,children:[{type:"elem",elem:u}]},i)},mathmlBuilder(s,i){return new Ve.MathNode("mpadded",[ur(s.body,i)],["vcenter"])}}),et({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(s,i,u){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(s,i){const u=Sd(s),h=[],b=i.havingStyle(i.style.text());for(let S=0;S<u.length;S++){let $=u[S];$==="~"&&($="\\textasciitilde"),h.push(ye.makeSymbol($,"Typewriter-Regular",s.mode,b,["mord","texttt"]))}return ye.makeSpan(["mord","text"].concat(b.sizingClasses(i)),ye.tryCombineChars(h),b)},mathmlBuilder(s,i){const u=new Ve.TextNode(Sd(s)),h=new Ve.MathNode("mtext",[u]);return h.setAttribute("mathvariant","monospace"),h}});const Sd=s=>s.body.replace(/ /g,s.star?"\u2423":"\xA0");var lo=Wr;const Bd=`[ \r
|
|
488
|
+
]`,k4="\\\\[a-zA-Z@]+",S4="\\\\[^\uD800-\uDFFF]",B4="("+k4+")"+Bd+"*",A4=`\\\\(
|
|
489
|
+
|[ \r ]+
|
|
490
|
+
?)[ \r ]*`,Ml="[\u0300-\u036F]",F4=new RegExp(Ml+"+$"),O4="("+Bd+"+)|"+(A4+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Ml+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Ml+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+B4)+("|"+S4+")");class Ad{constructor(i,u){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=i,this.settings=u,this.tokenRegex=new RegExp(O4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(i,u){this.catcodes[i]=u}lex(){const i=this.input,u=this.tokenRegex.lastIndex;if(u===i.length)return new ln("EOF",new tn(this,u,u));const h=this.tokenRegex.exec(i);if(h===null||h.index!==u)throw new a("Unexpected character: '"+i[u]+"'",new ln(i[u],new tn(this,u,u+1)));const b=h[6]||h[3]||(h[2]?"\\ ":" ");if(this.catcodes[b]===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 ln(b,new tn(this,u,this.tokenRegex.lastIndex))}}class N4{constructor(i,u){i===void 0&&(i={}),u===void 0&&(u={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=u,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 u in i)i.hasOwnProperty(u)&&(i[u]==null?delete this.current[u]:this.current[u]=i[u])}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,u,h){if(h===void 0&&(h=!1),h){for(let b=0;b<this.undefStack.length;b++)delete this.undefStack[b][i];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][i]=u)}else{const b=this.undefStack[this.undefStack.length-1];b&&!b.hasOwnProperty(i)&&(b[i]=this.current[i])}u==null?delete this.current[i]:this.current[i]=u}}var $4=nd;q("\\noexpand",function(s){const i=s.popToken();return s.isExpandable(i.text)&&(i.noexpand=!0,i.treatAsRelax=!0),{tokens:[i],numArgs:0}}),q("\\expandafter",function(s){const i=s.popToken();return s.expandOnce(!0),{tokens:[i],numArgs:0}}),q("\\@firstoftwo",function(s){return{tokens:s.consumeArgs(2)[0],numArgs:0}}),q("\\@secondoftwo",function(s){return{tokens:s.consumeArgs(2)[1],numArgs:0}}),q("\\@ifnextchar",function(s){const i=s.consumeArgs(3);s.consumeSpaces();const u=s.future();return i[0].length===1&&i[0][0].text===u.text?{tokens:i[1],numArgs:0}:{tokens:i[2],numArgs:0}}),q("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),q("\\TextOrMath",function(s){const i=s.consumeArgs(2);return s.mode==="text"?{tokens:i[0],numArgs:0}:{tokens:i[1],numArgs:0}});const Fd={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};q("\\char",function(s){let i=s.popToken(),u,h="";if(i.text==="'")u=8,i=s.popToken();else if(i.text==='"')u=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 u=10;if(u){if(h=Fd[i.text],h==null||h>=u)throw new a("Invalid base-"+u+" digit "+i.text);let b;for(;(b=Fd[s.future().text])!=null&&b<u;)h*=u,h+=b,s.popToken()}return"\\@char{"+h+"}"});const Rl=(s,i,u,h)=>{let b=s.consumeArg().tokens;if(b.length!==1)throw new a("\\newcommand's first argument must be a macro name");const S=b[0].text,$=s.isDefined(S);if($&&!i)throw new a("\\newcommand{"+S+"} attempting to redefine "+(S+"; use \\renewcommand"));if(!$&&!u)throw new a("\\renewcommand{"+S+"} when command "+S+" does not yet exist; use \\newcommand");let _=0;if(b=s.consumeArg().tokens,b.length===1&&b[0].text==="["){let Z="",re=s.expandNextToken();for(;re.text!=="]"&&re.text!=="EOF";)Z+=re.text,re=s.expandNextToken();if(!Z.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+Z);_=parseInt(Z),b=s.consumeArg().tokens}return $&&h||s.macros.set(S,{tokens:b,numArgs:_}),""};q("\\newcommand",s=>Rl(s,!1,!0,!1)),q("\\renewcommand",s=>Rl(s,!0,!1,!1)),q("\\providecommand",s=>Rl(s,!0,!0,!0)),q("\\message",s=>{const i=s.consumeArgs(1)[0];return console.log(i.reverse().map(u=>u.text).join("")),""}),q("\\errmessage",s=>{const i=s.consumeArgs(1)[0];return console.error(i.reverse().map(u=>u.text).join("")),""}),q("\\show",s=>{const i=s.popToken(),u=i.text;return console.log(i,s.macros.get(u),lo[u],Tt.math[u],Tt.text[u]),""}),q("\\bgroup","{"),q("\\egroup","}"),q("~","\\nobreakspace"),q("\\lq","`"),q("\\rq","'"),q("\\aa","\\r a"),q("\\AA","\\r A"),q("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),q("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),q("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),q("\u212C","\\mathscr{B}"),q("\u2130","\\mathscr{E}"),q("\u2131","\\mathscr{F}"),q("\u210B","\\mathscr{H}"),q("\u2110","\\mathscr{I}"),q("\u2112","\\mathscr{L}"),q("\u2133","\\mathscr{M}"),q("\u211B","\\mathscr{R}"),q("\u212D","\\mathfrak{C}"),q("\u210C","\\mathfrak{H}"),q("\u2128","\\mathfrak{Z}"),q("\\Bbbk","\\Bbb{k}"),q("\xB7","\\cdotp"),q("\\llap","\\mathllap{\\textrm{#1}}"),q("\\rlap","\\mathrlap{\\textrm{#1}}"),q("\\clap","\\mathclap{\\textrm{#1}}"),q("\\mathstrut","\\vphantom{(}"),q("\\underbar","\\underline{\\text{#1}}"),q("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),q("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),q("\\ne","\\neq"),q("\u2260","\\neq"),q("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),q("\u2209","\\notin"),q("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),q("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),q("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),q("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),q("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),q("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),q("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),q("\u27C2","\\perp"),q("\u203C","\\mathclose{!\\mkern-0.8mu!}"),q("\u220C","\\notni"),q("\u231C","\\ulcorner"),q("\u231D","\\urcorner"),q("\u231E","\\llcorner"),q("\u231F","\\lrcorner"),q("\xA9","\\copyright"),q("\xAE","\\textregistered"),q("\uFE0F","\\textregistered"),q("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),q("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),q("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),q("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),q("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),q("\u22EE","\\vdots"),q("\\varGamma","\\mathit{\\Gamma}"),q("\\varDelta","\\mathit{\\Delta}"),q("\\varTheta","\\mathit{\\Theta}"),q("\\varLambda","\\mathit{\\Lambda}"),q("\\varXi","\\mathit{\\Xi}"),q("\\varPi","\\mathit{\\Pi}"),q("\\varSigma","\\mathit{\\Sigma}"),q("\\varUpsilon","\\mathit{\\Upsilon}"),q("\\varPhi","\\mathit{\\Phi}"),q("\\varPsi","\\mathit{\\Psi}"),q("\\varOmega","\\mathit{\\Omega}"),q("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),q("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),q("\\boxed","\\fbox{$\\displaystyle{#1}$}"),q("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),q("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),q("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),q("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),q("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const Od={",":"\\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"};q("\\dots",function(s){let i="\\dotso";const u=s.expandAfterFuture().text;return u in Od?i=Od[u]:(u.slice(0,4)==="\\not"||u in Tt.math&&["bin","rel"].includes(Tt.math[u].group))&&(i="\\dotsb"),i});const Il={")":!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};q("\\dotso",function(s){return s.future().text in Il?"\\ldots\\,":"\\ldots"}),q("\\dotsc",function(s){const i=s.future().text;return i in Il&&i!==","?"\\ldots\\,":"\\ldots"}),q("\\cdots",function(s){return s.future().text in Il?"\\@cdots\\,":"\\@cdots"}),q("\\dotsb","\\cdots"),q("\\dotsm","\\cdots"),q("\\dotsi","\\!\\cdots"),q("\\dotsx","\\ldots\\,"),q("\\DOTSI","\\relax"),q("\\DOTSB","\\relax"),q("\\DOTSX","\\relax"),q("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),q("\\,","\\tmspace+{3mu}{.1667em}"),q("\\thinspace","\\,"),q("\\>","\\mskip{4mu}"),q("\\:","\\tmspace+{4mu}{.2222em}"),q("\\medspace","\\:"),q("\\;","\\tmspace+{5mu}{.2777em}"),q("\\thickspace","\\;"),q("\\!","\\tmspace-{3mu}{.1667em}"),q("\\negthinspace","\\!"),q("\\negmedspace","\\tmspace-{4mu}{.2222em}"),q("\\negthickspace","\\tmspace-{5mu}{.277em}"),q("\\enspace","\\kern.5em "),q("\\enskip","\\hskip.5em\\relax"),q("\\quad","\\hskip1em\\relax"),q("\\qquad","\\hskip2em\\relax"),q("\\tag","\\@ifstar\\tag@literal\\tag@paren"),q("\\tag@paren","\\tag@literal{({#1})}"),q("\\tag@literal",s=>{if(s.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),q("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),q("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),q("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),q("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),q("\\newline","\\\\\\relax"),q("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Nd=ue(Ne["Main-Regular"][84][1]-.7*Ne["Main-Regular"][65][1]);q("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Nd+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),q("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Nd+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),q("\\hspace","\\@ifstar\\@hspacer\\@hspace"),q("\\@hspace","\\hskip #1\\relax"),q("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),q("\\ordinarycolon",":"),q("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),q("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),q("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),q("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),q("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),q("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),q("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),q("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),q("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),q("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),q("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),q("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),q("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),q("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),q("\u2237","\\dblcolon"),q("\u2239","\\eqcolon"),q("\u2254","\\coloneqq"),q("\u2255","\\eqqcolon"),q("\u2A74","\\Coloneqq"),q("\\ratio","\\vcentcolon"),q("\\coloncolon","\\dblcolon"),q("\\colonequals","\\coloneqq"),q("\\coloncolonequals","\\Coloneqq"),q("\\equalscolon","\\eqqcolon"),q("\\equalscoloncolon","\\Eqqcolon"),q("\\colonminus","\\coloneq"),q("\\coloncolonminus","\\Coloneq"),q("\\minuscolon","\\eqcolon"),q("\\minuscoloncolon","\\Eqcolon"),q("\\coloncolonapprox","\\Colonapprox"),q("\\coloncolonsim","\\Colonsim"),q("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),q("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),q("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),q("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),q("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),q("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),q("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),q("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),q("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),q("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),q("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),q("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),q("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),q("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),q("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),q("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),q("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),q("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),q("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),q("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),q("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),q("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),q("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),q("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),q("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),q("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),q("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),q("\\imath","\\html@mathml{\\@imath}{\u0131}"),q("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),q("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),q("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),q("\u27E6","\\llbracket"),q("\u27E7","\\rrbracket"),q("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),q("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),q("\u2983","\\lBrace"),q("\u2984","\\rBrace"),q("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}"),q("\u29B5","\\minuso"),q("\\darr","\\downarrow"),q("\\dArr","\\Downarrow"),q("\\Darr","\\Downarrow"),q("\\lang","\\langle"),q("\\rang","\\rangle"),q("\\uarr","\\uparrow"),q("\\uArr","\\Uparrow"),q("\\Uarr","\\Uparrow"),q("\\N","\\mathbb{N}"),q("\\R","\\mathbb{R}"),q("\\Z","\\mathbb{Z}"),q("\\alef","\\aleph"),q("\\alefsym","\\aleph"),q("\\Alpha","\\mathrm{A}"),q("\\Beta","\\mathrm{B}"),q("\\bull","\\bullet"),q("\\Chi","\\mathrm{X}"),q("\\clubs","\\clubsuit"),q("\\cnums","\\mathbb{C}"),q("\\Complex","\\mathbb{C}"),q("\\Dagger","\\ddagger"),q("\\diamonds","\\diamondsuit"),q("\\empty","\\emptyset"),q("\\Epsilon","\\mathrm{E}"),q("\\Eta","\\mathrm{H}"),q("\\exist","\\exists"),q("\\harr","\\leftrightarrow"),q("\\hArr","\\Leftrightarrow"),q("\\Harr","\\Leftrightarrow"),q("\\hearts","\\heartsuit"),q("\\image","\\Im"),q("\\infin","\\infty"),q("\\Iota","\\mathrm{I}"),q("\\isin","\\in"),q("\\Kappa","\\mathrm{K}"),q("\\larr","\\leftarrow"),q("\\lArr","\\Leftarrow"),q("\\Larr","\\Leftarrow"),q("\\lrarr","\\leftrightarrow"),q("\\lrArr","\\Leftrightarrow"),q("\\Lrarr","\\Leftrightarrow"),q("\\Mu","\\mathrm{M}"),q("\\natnums","\\mathbb{N}"),q("\\Nu","\\mathrm{N}"),q("\\Omicron","\\mathrm{O}"),q("\\plusmn","\\pm"),q("\\rarr","\\rightarrow"),q("\\rArr","\\Rightarrow"),q("\\Rarr","\\Rightarrow"),q("\\real","\\Re"),q("\\reals","\\mathbb{R}"),q("\\Reals","\\mathbb{R}"),q("\\Rho","\\mathrm{P}"),q("\\sdot","\\cdot"),q("\\sect","\\S"),q("\\spades","\\spadesuit"),q("\\sub","\\subset"),q("\\sube","\\subseteq"),q("\\supe","\\supseteq"),q("\\Tau","\\mathrm{T}"),q("\\thetasym","\\vartheta"),q("\\weierp","\\wp"),q("\\Zeta","\\mathrm{Z}"),q("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),q("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),q("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),q("\\bra","\\mathinner{\\langle{#1}|}"),q("\\ket","\\mathinner{|{#1}\\rangle}"),q("\\braket","\\mathinner{\\langle{#1}\\rangle}"),q("\\Bra","\\left\\langle#1\\right|"),q("\\Ket","\\left|#1\\right\\rangle");const $d=s=>i=>{const u=i.consumeArg().tokens,h=i.consumeArg().tokens,b=i.consumeArg().tokens,S=i.consumeArg().tokens,$=i.macros.get("|"),_=i.macros.get("\\|");i.macros.beginGroup();const Z=xe=>Se=>{s&&(Se.macros.set("|",$),b.length&&Se.macros.set("\\|",_));let Xe=xe;return!xe&&b.length&&Se.future().text==="|"&&(Se.popToken(),Xe=!0),{tokens:Xe?b:h,numArgs:0}};i.macros.set("|",Z(!1)),b.length&&i.macros.set("\\|",Z(!0));const re=i.consumeArg().tokens,me=i.expandTokens([...S,...re,...u]);return i.macros.endGroup(),{tokens:me.reverse(),numArgs:0}};q("\\bra@ket",$d(!1)),q("\\bra@set",$d(!0)),q("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),q("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),q("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),q("\\angln","{\\angl n}"),q("\\blue","\\textcolor{##6495ed}{#1}"),q("\\orange","\\textcolor{##ffa500}{#1}"),q("\\pink","\\textcolor{##ff00af}{#1}"),q("\\red","\\textcolor{##df0030}{#1}"),q("\\green","\\textcolor{##28ae7b}{#1}"),q("\\gray","\\textcolor{gray}{#1}"),q("\\purple","\\textcolor{##9d38bd}{#1}"),q("\\blueA","\\textcolor{##ccfaff}{#1}"),q("\\blueB","\\textcolor{##80f6ff}{#1}"),q("\\blueC","\\textcolor{##63d9ea}{#1}"),q("\\blueD","\\textcolor{##11accd}{#1}"),q("\\blueE","\\textcolor{##0c7f99}{#1}"),q("\\tealA","\\textcolor{##94fff5}{#1}"),q("\\tealB","\\textcolor{##26edd5}{#1}"),q("\\tealC","\\textcolor{##01d1c1}{#1}"),q("\\tealD","\\textcolor{##01a995}{#1}"),q("\\tealE","\\textcolor{##208170}{#1}"),q("\\greenA","\\textcolor{##b6ffb0}{#1}"),q("\\greenB","\\textcolor{##8af281}{#1}"),q("\\greenC","\\textcolor{##74cf70}{#1}"),q("\\greenD","\\textcolor{##1fab54}{#1}"),q("\\greenE","\\textcolor{##0d923f}{#1}"),q("\\goldA","\\textcolor{##ffd0a9}{#1}"),q("\\goldB","\\textcolor{##ffbb71}{#1}"),q("\\goldC","\\textcolor{##ff9c39}{#1}"),q("\\goldD","\\textcolor{##e07d10}{#1}"),q("\\goldE","\\textcolor{##a75a05}{#1}"),q("\\redA","\\textcolor{##fca9a9}{#1}"),q("\\redB","\\textcolor{##ff8482}{#1}"),q("\\redC","\\textcolor{##f9685d}{#1}"),q("\\redD","\\textcolor{##e84d39}{#1}"),q("\\redE","\\textcolor{##bc2612}{#1}"),q("\\maroonA","\\textcolor{##ffbde0}{#1}"),q("\\maroonB","\\textcolor{##ff92c6}{#1}"),q("\\maroonC","\\textcolor{##ed5fa6}{#1}"),q("\\maroonD","\\textcolor{##ca337c}{#1}"),q("\\maroonE","\\textcolor{##9e034e}{#1}"),q("\\purpleA","\\textcolor{##ddd7ff}{#1}"),q("\\purpleB","\\textcolor{##c6b9fc}{#1}"),q("\\purpleC","\\textcolor{##aa87ff}{#1}"),q("\\purpleD","\\textcolor{##7854ab}{#1}"),q("\\purpleE","\\textcolor{##543b78}{#1}"),q("\\mintA","\\textcolor{##f5f9e8}{#1}"),q("\\mintB","\\textcolor{##edf2df}{#1}"),q("\\mintC","\\textcolor{##e0e5cc}{#1}"),q("\\grayA","\\textcolor{##f6f7f7}{#1}"),q("\\grayB","\\textcolor{##f0f1f2}{#1}"),q("\\grayC","\\textcolor{##e3e5e6}{#1}"),q("\\grayD","\\textcolor{##d6d8da}{#1}"),q("\\grayE","\\textcolor{##babec2}{#1}"),q("\\grayF","\\textcolor{##888d93}{#1}"),q("\\grayG","\\textcolor{##626569}{#1}"),q("\\grayH","\\textcolor{##3b3e40}{#1}"),q("\\grayI","\\textcolor{##21242c}{#1}"),q("\\kaBlue","\\textcolor{##314453}{#1}"),q("\\kaGreen","\\textcolor{##71B307}{#1}");const Td={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class T4{constructor(i,u,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=u,this.expansionCount=0,this.feed(i),this.macros=new N4($4,u.macros),this.mode=h,this.stack=[]}feed(i){this.lexer=new Ad(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 u,h,b;if(i){if(this.consumeSpaces(),this.future().text!=="[")return null;u=this.popToken(),{tokens:b,end:h}=this.consumeArg(["]"])}else({tokens:b,start:u,end:h}=this.consumeArg());return this.pushToken(new ln("EOF",h.loc)),this.pushTokens(b),new ln("",tn.range(u,h))}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(i){const u=[],h=i&&i.length>0;h||this.consumeSpaces();const b=this.future();let S,$=0,_=0;do{if(S=this.popToken(),u.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[_]:"}")+"'",S);if(i&&h)if(($===0||$===1&&i[_]==="{")&&S.text===i[_]){if(++_,_===i.length){u.splice(-_,_);break}}else _=0}while($!==0||h);return b.text==="{"&&u[u.length-1].text==="}"&&(u.pop(),u.shift()),u.reverse(),{tokens:u,start:b,end:S}}consumeArgs(i,u){if(u){if(u.length!==i+1)throw new a("The length of delimiters doesn't match the number of args!");const b=u[0];for(let S=0;S<b.length;S++){const $=this.popToken();if(b[S]!==$.text)throw new a("Use of the macro doesn't match its definition",$)}}const h=[];for(let b=0;b<i;b++)h.push(this.consumeArg(u&&u[b+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 u=this.popToken(),h=u.text,b=u.noexpand?null:this._getExpansion(h);if(b==null||i&&b.unexpandable){if(i&&b==null&&h[0]==="\\"&&!this.isDefined(h))throw new a("Undefined control sequence: "+h);return this.pushToken(u),!1}this.countExpansion(1);let S=b.tokens;const $=this.consumeArgs(b.numArgs,b.delimiters);if(b.numArgs){S=S.slice();for(let _=S.length-1;_>=0;--_){let Z=S[_];if(Z.text==="#"){if(_===0)throw new a("Incomplete placeholder at end of macro body",Z);if(Z=S[--_],Z.text==="#")S.splice(_+1,1);else if(/^[1-9]$/.test(Z.text))S.splice(_,2,...$[+Z.text-1]);else throw new a("Not a valid argument number",Z)}}}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 ln(i)]):void 0}expandTokens(i){const u=[],h=this.stack.length;for(this.pushTokens(i);this.stack.length>h;)if(this.expandOnce(!0)===!1){const b=this.stack.pop();b.treatAsRelax&&(b.noexpand=!1,b.treatAsRelax=!1),u.push(b)}return this.countExpansion(u.length),u}expandMacroAsText(i){const u=this.expandMacro(i);return u&&u.map(h=>h.text).join("")}_getExpansion(i){const u=this.macros.get(i);if(u==null)return u;if(i.length===1){const b=this.lexer.catcodes[i];if(b!=null&&b!==13)return}const h=typeof u=="function"?u(this):u;if(typeof h=="string"){let b=0;if(h.indexOf("#")!==-1){const Z=h.replace(/##/g,"");for(;Z.indexOf("#"+(b+1))!==-1;)++b}const S=new Ad(h,this.settings),$=[];let _=S.lex();for(;_.text!=="EOF";)$.push(_),_=S.lex();return $.reverse(),{tokens:$,numArgs:b}}return h}isDefined(i){return this.macros.has(i)||lo.hasOwnProperty(i)||Tt.math.hasOwnProperty(i)||Tt.text.hasOwnProperty(i)||Td.hasOwnProperty(i)}isExpandable(i){const u=this.macros.get(i);return u!=null?typeof u=="string"||typeof u=="function"||!u.unexpandable:lo.hasOwnProperty(i)&&!lo[i].primitive}}const Md=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Si=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"}),Pl={"\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"}},Rd={\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 Bi{constructor(i,u){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 T4(i,u,this.mode),this.settings=u,this.leftrightDepth=0}expect(i,u){if(u===void 0&&(u=!0),this.fetch().text!==i)throw new a("Expected '"+i+"', got '"+this.fetch().text+"'",this.fetch());u&&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 u=this.nextToken;this.consume(),this.gullet.pushToken(new ln("}")),this.gullet.pushTokens(i);const h=this.parseExpression(!1);return this.expect("}"),this.nextToken=u,h}parseExpression(i,u){const h=[];for(;;){this.mode==="math"&&this.consumeSpaces();const b=this.fetch();if(Bi.endOfExpression.indexOf(b.text)!==-1||u&&b.text===u||i&&lo[b.text]&&lo[b.text].infix)break;const S=this.parseAtom(u);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 u=-1,h;for(let b=0;b<i.length;b++)if(i[b].type==="infix"){if(u!==-1)throw new a("only one infix operator per group",i[b].token);u=b,h=i[b].replaceWith}if(u!==-1&&h){let b,S;const $=i.slice(0,u),_=i.slice(u+1);$.length===1&&$[0].type==="ordgroup"?b=$[0]:b={type:"ordgroup",mode:this.mode,body:$},_.length===1&&_[0].type==="ordgroup"?S=_[0]:S={type:"ordgroup",mode:this.mode,body:_};let Z;return h==="\\\\abovefrac"?Z=this.callFunction(h,[b,i[u],S],[]):Z=this.callFunction(h,[b,S],[]),[Z]}else return i}handleSupSubscript(i){const u=this.fetch(),h=u.text;this.consume(),this.consumeSpaces();let b;do{var S;b=this.parseGroup(i)}while(((S=b)==null?void 0:S.type)==="internal");if(!b)throw new a("Expected group after '"+h+"'",u);return b}formatUnsupportedCmd(i){const u=[];for(let b=0;b<i.length;b++)u.push({type:"textord",mode:"text",text:i[b]});const h={type:"text",mode:this.mode,body:u};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[h]}}parseAtom(i){const u=this.parseGroup("atom",i);if((u==null?void 0:u.type)==="internal"||this.mode==="text")return u;let h,b;for(;;){this.consumeSpaces();const S=this.fetch();if(S.text==="\\limits"||S.text==="\\nolimits"){if(u&&u.type==="op"){const $=S.text==="\\limits";u.limits=$,u.alwaysHandleSupSub=!0}else if(u&&u.type==="operatorname")u.alwaysHandleSupSub&&(u.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(b)throw new a("Double subscript",S);b=this.handleSupSubscript("subscript")}else if(S.text==="'"){if(h)throw new a("Double superscript",S);const $={type:"textord",mode:this.mode,text:"\\prime"},_=[$];for(this.consume();this.fetch().text==="'";)_.push($),this.consume();this.fetch().text==="^"&&_.push(this.handleSupSubscript("superscript")),h={type:"ordgroup",mode:this.mode,body:_}}else if(Si[S.text]){const $=Md.test(S.text),_=[];for(_.push(new ln(Si[S.text])),this.consume();;){const re=this.fetch().text;if(!Si[re]||Md.test(re)!==$)break;_.unshift(new ln(Si[re])),this.consume()}const Z=this.subparse(_);$?b={type:"ordgroup",mode:"math",body:Z}:h={type:"ordgroup",mode:"math",body:Z}}else break}return h||b?{type:"supsub",mode:this.mode,base:u,sup:h,sub:b}:u}parseFunction(i,u){const h=this.fetch(),b=h.text,S=lo[b];if(!S)return null;if(this.consume(),u&&u!=="atom"&&!S.allowedInArgument)throw new a("Got function '"+b+"' with no arguments"+(u?" as "+u:""),h);if(this.mode==="text"&&!S.allowedInText)throw new a("Can't use function '"+b+"' in text mode",h);if(this.mode==="math"&&S.allowedInMath===!1)throw new a("Can't use function '"+b+"' in math mode",h);const{args:$,optArgs:_}=this.parseArguments(b,S);return this.callFunction(b,$,_,h,i)}callFunction(i,u,h,b,S){const $={funcName:i,parser:this,token:b,breakOnTokenText:S},_=lo[i];if(_&&_.handler)return _.handler($,u,h);throw new a("No function handler for "+i)}parseArguments(i,u){const h=u.numArgs+u.numOptionalArgs;if(h===0)return{args:[],optArgs:[]};const b=[],S=[];for(let $=0;$<h;$++){let _=u.argTypes&&u.argTypes[$];const Z=$<u.numOptionalArgs;(u.primitive&&_==null||u.type==="sqrt"&&$===1&&S[0]==null)&&(_="primitive");const re=this.parseGroupOfType("argument to '"+i+"'",_,Z);if(Z)S.push(re);else if(re!=null)b.push(re);else throw new a("Null argument, please report this as a bug")}return{args:b,optArgs:S}}parseGroupOfType(i,u,h){switch(u){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,u);case"hbox":{const b=this.parseArgumentGroup(h,"text");return b!=null?{type:"styling",mode:b.mode,body:[b],style:"text"}:null}case"raw":{const b=this.parseStringGroup("raw",h);return b!=null?{type:"raw",mode:"text",string:b.text}:null}case"primitive":{if(h)throw new a("A primitive argument cannot be optional");const b=this.parseGroup(i);if(b==null)throw new a("Expected group as "+i,this.fetch());return b}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,u){const h=this.gullet.scanArgument(u);if(h==null)return null;let b="",S;for(;(S=this.fetch()).text!=="EOF";)b+=S.text,this.consume();return this.consume(),h.text=b,h}parseRegexGroup(i,u){const h=this.fetch();let b=h,S="",$;for(;($=this.fetch()).text!=="EOF"&&i.test(S+$.text);)b=$,S+=b.text,this.consume();if(S==="")throw new a("Invalid "+u+": '"+h.text+"'",h);return h.range(b,S)}parseColorGroup(i){const u=this.parseStringGroup("color",i);if(u==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(u.text);if(!h)throw new a("Invalid color: '"+u.text+"'",u);let b=h[0];return/^[0-9a-f]{6}$/i.test(b)&&(b="#"+b),{type:"color-token",mode:this.mode,color:b}}parseSizeGroup(i){let u,h=!1;if(this.gullet.consumeSpaces(),!i&&this.gullet.future().text!=="{"?u=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):u=this.parseStringGroup("size",i),!u)return null;!i&&u.text.length===0&&(u.text="0pt",h=!0);const b=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u.text);if(!b)throw new a("Invalid size: '"+u.text+"'",u);const S={number:+(b[1]+b[2]),unit:b[3]};if(!bt(S))throw new a("Invalid unit: '"+S.unit+"'",u);return{type:"size",mode:this.mode,value:S,isBlank:h}}parseUrlGroup(i){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const u=this.parseStringGroup("url",i);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),u==null)return null;const h=u.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:h}}parseArgumentGroup(i,u){const h=this.gullet.scanArgument(i);if(h==null)return null;const b=this.mode;u&&this.switchMode(u),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 u&&this.switchMode(b),$}parseGroup(i,u){const h=this.fetch(),b=h.text;let S;if(b==="{"||b==="\\begingroup"){this.consume();const $=b==="{"?"}":"\\endgroup";this.gullet.beginGroup();const _=this.parseExpression(!1,$),Z=this.fetch();this.expect($),this.gullet.endGroup(),S={type:"ordgroup",mode:this.mode,loc:tn.range(h,Z),body:_,semisimple:b==="\\begingroup"||void 0}}else if(S=this.parseFunction(u,i)||this.parseSymbol(),S==null&&b[0]==="\\"&&!Td.hasOwnProperty(b)){if(this.settings.throwOnError)throw new a("Undefined control sequence: "+b,h);S=this.formatUnsupportedCmd(b),this.consume()}return S}formLigatures(i){let u=i.length-1;for(let h=0;h<u;++h){const b=i[h],S=b.text;S==="-"&&i[h+1].text==="-"&&(h+1<u&&i[h+2].text==="-"?(i.splice(h,3,{type:"textord",mode:"text",loc:tn.range(b,i[h+2]),text:"---"}),u-=2):(i.splice(h,2,{type:"textord",mode:"text",loc:tn.range(b,i[h+1]),text:"--"}),u-=1)),(S==="'"||S==="`")&&i[h+1].text===S&&(i.splice(h,2,{type:"textord",mode:"text",loc:tn.range(b,i[h+1]),text:S+S}),u-=1)}}parseSymbol(){const i=this.fetch();let u=i.text;if(/^\\verb[^a-zA-Z]/.test(u)){this.consume();let S=u.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:$}}Rd.hasOwnProperty(u[0])&&!Tt[this.mode][u[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+u[0]+'" used in math mode',i),u=Rd[u[0]]+u.slice(1));const h=F4.exec(u);h&&(u=u.substring(0,h.index),u==="i"?u="\u0131":u==="j"&&(u="\u0237"));let b;if(Tt[this.mode][u]){this.settings.strict&&this.mode==="math"&&qr.indexOf(u)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+u[0]+'" used in math mode',i);const S=Tt[this.mode][u].group,$=tn.range(i);let _;if(dt.hasOwnProperty(S)){const Z=S;_={type:"atom",mode:this.mode,family:Z,loc:$,text:u}}else _={type:S,mode:this.mode,loc:$,text:u};b=_}else if(u.charCodeAt(0)>=128)this.settings.strict&&(ne(u.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+u[0]+'" used in math mode',i):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+u[0]+'"'+(" ("+u.charCodeAt(0)+")"),i)),b={type:"textord",mode:"text",loc:tn.range(i),text:u};else return null;if(this.consume(),h)for(let S=0;S<h[0].length;S++){const $=h[0][S];if(!Pl[$])throw new a("Unknown accent ' "+$+"'",i);const _=Pl[$][this.mode]||Pl[$].text;if(!_)throw new a("Accent "+$+" unsupported in "+this.mode+" mode",i);b={type:"accent",mode:this.mode,loc:tn.range(i),label:_,isStretchy:!1,isShifty:!0,base:b}}return b}}Bi.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var zl=function(s,i){if(!(typeof s=="string"||s instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const u=new Bi(s,i);delete u.gullet.macros.current["\\df@tag"];let h=u.parse();if(delete u.gullet.macros.current["\\current@color"],delete u.gullet.macros.current["\\color"],u.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:u.subparse([new ln("\\df@tag")])}]}return h};let Id=function(s,i,u){i.textContent="";const h=Ll(s,u).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."),Id=function(){throw new a("KaTeX doesn't work in quirks mode.")});const M4=function(s,i){return Ll(s,i).toMarkup()},R4=function(s,i){const u=new O(i);return zl(s,u)},Pd=function(s,i,u){if(u.throwOnError||!(s instanceof a))throw s;const h=ye.makeSpan(["katex-error"],[new yt(i)]);return h.setAttribute("title",s.toString()),h.setAttribute("style","color:"+u.errorColor),h},Ll=function(s,i){const u=new O(i);try{const h=zl(s,u);return Gg(h,s,u)}catch(h){return Pd(h,s,u)}};var I4={version:"0.16.25",render:Id,renderToString:M4,ParseError:a,SETTINGS_SCHEMA:p,__parse:R4,__renderToDomTree:Ll,__renderToHTMLTree:function(s,i){const u=new O(i);try{const h=zl(s,u);return Zg(h,s,u)}catch(h){return Pd(h,s,u)}},__setFontMetrics:Ze,__defineSymbol:x,__defineFunction:et,__defineMacro:q,__domTree:{Span:Ct,Anchor:Nt,SymbolNode:yt,SvgNode:cr,PathNode:Xt,LineNode:Pr}},P4=I4;return n=n.default,n})()})})(k0)),k0.exports}var Nw=is.exports,Kp;function $w(){return Kp||(Kp=1,(function(e,t){(function(r,n){n(t,Le,Aw(),Ow())})(Nw,function(r,n,o,a){Object.defineProperty(r,"__esModule",{value:!0});function c(p,A){for(var O in A)Object.defineProperty(p,O,{enumerable:!0,get:A[O]})}c(r,{BlockMath:()=>C,InlineMath:()=>D}),n=d(n),o=l(o),a=l(a);function l(p){return p&&p.__esModule?p:{default:p}}function f(p){if(typeof WeakMap!="function")return null;var A=new WeakMap,O=new WeakMap;return(f=function(B){return B?O:A})(p)}function d(p,A){if(p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var O=f(A);if(O&&O.has(p))return O.get(p);var B={},F=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in p)if(N!=="default"&&Object.prototype.hasOwnProperty.call(p,N)){var I=F?Object.getOwnPropertyDescriptor(p,N):null;I&&(I.get||I.set)?Object.defineProperty(B,N,I):B[N]=p[N]}return B.default=p,O&&O.set(p,B),B}const m=(p,{displayMode:A})=>{const O=({children:B,errorColor:F,math:N,renderError:I})=>{const P=N??B,{html:H,error:T}=(0,n.useMemo)(()=>{try{return{html:a.default.renderToString(P,{displayMode:A,errorColor:F,throwOnError:!!I}),error:void 0}}catch(V){if(V instanceof a.default.ParseError||V instanceof TypeError)return{error:V};throw V}},[P,F,I]);return T?I?I(T):n.default.createElement(p,{html:`${T.message}`}):n.default.createElement(p,{html:H})};return O.propTypes={children:o.default.string,errorColor:o.default.string,math:o.default.string,renderError:o.default.func},O},v={html:o.default.string.isRequired},g=({html:p})=>n.default.createElement("div",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:p}});g.propTypes=v;const y=({html:p})=>n.default.createElement("span",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:p}});y.propTypes=v;const C=m(g,{displayMode:!0}),D=m(y,{displayMode:!1})})})(is,is.exports)),is.exports}var _g=$w();const Tw=sr.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
|
+
`,Mw=sr.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
|
+
`,Rw=sr.span.attrs({className:"latex-inline-error-message"})`
|
|
508
|
+
font-size: 0.75em;
|
|
509
|
+
color: #d73a49;
|
|
510
|
+
`,Iw=({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?ee.jsx(Tw,{...e,$color:o,children:ee.jsx(_g.InlineMath,{math:n,errorColor:"#d73a49",renderError:c=>ee.jsxs(Mw,{children:[ee.jsx("span",{children:n}),ee.jsx(Rw,{children:c==null?void 0:c.message})]})})}):null},Pw=sr.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
|
+
`,zw=sr.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
|
+
`,Lw=sr.span.attrs({className:"latex-block-error-title"})`
|
|
532
|
+
font-weight: 600;
|
|
533
|
+
`,jw=sr.code.attrs({className:"latex-block-error-formula"})`
|
|
534
|
+
font-size: 0.85rem;
|
|
535
|
+
color: #d73a49;
|
|
536
|
+
overflow-x: auto;
|
|
537
|
+
`,_w=({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?ee.jsx(Pw,{...e,$textColor:o,children:ee.jsx(_g.BlockMath,{math:n,errorColor:"#d73a49",renderError:c=>ee.jsxs(zw,{children:[ee.jsx(Lw,{children:"\u516C\u5F0F\u6E32\u67D3\u5931\u8D25"}),ee.jsx(jw,{children:n}),ee.jsx("span",{children:c==null?void 0:c.message})]})})}):null},Hw=e=>{var a,c,l,f,d,m,v,g;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return ee.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 ee.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(c=t==null?void 0:t.text)==null?void 0:c.color} !important`},children:n});case"heading-two":return ee.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 ee.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 ee.jsx("ul",{...o,children:n});case"numbered-list":return ee.jsx("ol",{...o,children:n});case"list-item":return ee.jsx("li",{...o,children:n});case"table":return ee.jsx("div",{className:"table-container",children:ee.jsx("table",{...o,children:ee.jsx("tbody",{children:n})})});case"table-row":return ee.jsx("tr",{...o,children:n});case"table-cell":return r.header?ee.jsx("th",{...o,children:n}):ee.jsx("td",{...o,children:n});case"block-quote":return ee.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 ee.jsx("pre",{...o,children:ee.jsx("code",{style:{color:`${(m=t==null?void 0:t.text)==null?void 0:m.color} !important`},children:n})});case"think":const y=e.extraProps||{},C=y.isCollapsed!==void 0?y.isCollapsed:Object.values(y)[1]===!0,D={...y,isCollapsed:C};return ee.jsx(kw,{attributes:o,styles:t,extraProps:D,children:n});case"template":return ee.jsx(Lg,{...o,element:r,children:n,styles:t});case"latex-inline":return ee.jsx(Iw,{attributes:o,formula:r.formula,styles:t});case"latex-block":return ee.jsx(_w,{attributes:o,formula:r.formula,styles:t});case"retrieve-sql-data":const p=(A=>{if(!A)return null;try{const O=typeof A=="string"?JSON.parse(A):A;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(O)?O[0]:O}}]}}catch(O){return console.error("Failed to parse databaseReference:",O),null}})(((v=e.extraProps)==null?void 0:v.databaseReference)||e.databaseReference);return ee.jsx(jg,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:p||void 0,tagIndex:1});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),ee.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:A=>{const O=A.target;O.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}),ee.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:A=>{const O=A.target;O.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return ee.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})}},Kw=e=>{var c,l,f,d,m,v;const{attributes:t,children:r,leaf:n,styles:o}=e;(c=o==null?void 0:o.text)!=null&&c.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",y=n.fromtype==="1",C=n.fromtype==="2",D=n.text||"";let p=D,A="#e6f7ff",O="#1890ff",B="#bae7ff";return g?(p=`${D}`,A="#e6f7ff",O="#1890ff",B="#bae7ff"):y?(p=`${D}`,A="#f6ffed",O="#52c41a",B="#d9f7be"):C&&(p=`${D}`,A="#E7F8FB",O="#10BBD9",B="#E7F8FB"),a=ee.jsx("span",{...t,style:{display:"inline-block",background:A,color:O,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:F=>F.currentTarget.style.background=B,onMouseLeave:F=>F.currentTarget.style.background=A,children:p}),a}if(n.code)a=ee.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(" "),y={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:(m=o==null?void 0:o.text)==null?void 0:m.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=ee.jsx("span",{...t,className:g,style:y,children:a})}return n.link&&(a=ee.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},Bu=sr.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 Hg(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?Hg([r])[0]:r)})}const qp="__rtext_escaped_dollar__";function Is(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return console.warn("Failed to decode LaTeX formula:",e,t),e}}function qw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ww(e){const t=new Map;let r=e||"";if(!r)return{content:r,placeholders:t};let n=0;r=r.replace(/\\\$/g,qp);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 c=new RegExp("(?<!\\\\)\\$(?!\\$)([\\s\\S]+?)(?<!\\\\)\\$(?!\\$)","g");return r=r.replace(c,(l,f)=>o("inline",f)),r=r.replace(new RegExp(qp,"g"),"\\$"),{content:r,placeholders:t}}function Vw(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",c=encodeURIComponent(n.formula),l=`<${a} data-formula="${c}"></${a}>`;r=r.replace(new RegExp(qw(o),"g"),l)}),r}function Kg(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 m;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:((m=d.match(v))==null?void 0:m[1])||"",content:""}}else return{thinkContent:"",content:d}}const{thinkContent:o,content:a,finish:c}=n(e||"");let l=[],f=0;if(!r.includes("think")&&o){const d=o.split(/\n+/).map(m=>m.trim()).filter(Boolean).flatMap(m=>{if(/<retrive-tag/i.test(m)){const v=document.createElement("div");return v.innerHTML=m,Wp(v,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:m}]}]});l.push({type:"think",id:`think-${f++}`,thinkContent:o,finish:c,children:d})}if(a){const{content:d,placeholders:m}=Ww(a);let v=d;r.includes("retrive")||(v=v.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(C,D,p)=>`<retrive-tag${D?" "+D.trim():""}>${p}</retrive-tag>`)),r.includes("retrieve-sql-data")||(v=v.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(C,D)=>`<retrieve-sql-data id="${D}"></retrieve-sql-data>`)),Zt.setOptions({gfm:!0,breaks:!0,pedantic:!1});const g=Zt(v);let y=typeof g=="string"?g:"";if(y=Vw(y,m),console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:y.length,hasImgTags:y.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:y}),typeof g=="string"){const C=document.createElement("div");C.innerHTML=y,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:C.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(C.querySelectorAll("*")).map(p=>p.tagName),imgElements:Array.from(C.querySelectorAll("img")).map(p=>({src:p.src,alt:p.alt}))});const D=Wp(C,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:D.length,hasImageElements:D.some(p=>p.type==="image")}),D&&D.length>0&&(l=l.concat(D))}}return!l||l.length===0?[{type:"paragraph",children:[{text:""}]}]:Hg(l)}function Wp(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 c;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:Tr(l,t)});break;case"h1":n.push({type:"heading-one",children:Tr(l,t)});break;case"h2":n.push({type:"heading-two",children:Tr(l,t)});break;case"h3":n.push({type:"heading-three",children:Tr(l,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(l.children).map(d=>({type:"list-item",children:Tr(d)}))});break;case"ol":const f={type:"numbered-list",children:Array.from(l.children).map(d=>({type:"list-item",children:Tr(d)}))};n.push(f);break;case"li":n.push({type:"list-item",children:Tr(l,t)});break;case"pre":{const d=l.querySelector("code");d?n.push({type:"code-block",children:Tr(d)}):n.push({type:"code-block",children:Tr(l,t)});break}case"code":{l.closest("pre")||n.push({type:"paragraph",children:Tr(l,t)});break}case"retrive-tag":{const d=Tr(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:Tr(l,t)});break;case"table":n.push(Uw(l));break;case"img":{const d=l.getAttribute("src")||"",m=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:m,children:[{text:""}]});break}case"iframe":{const d=l.getAttribute("src")||"",m=l.getAttribute("width")||"100%",v=l.getAttribute("height")||"400",g=l.getAttribute("frameborder")||"0",y=l.getAttribute("title")||"";let C=d;if(t)if(d.startsWith("./"))C=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const D=t.substring(0,t.lastIndexOf("/"));C=d.replace(/^\.\.\//,D+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(C=`${t}/${d}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:C}),n.push({type:"iframe",src:C,width:m,height:v,frameborder:g,title:y,children:[{text:""}]});break}case"latex-inline":{const d=Is(l.getAttribute("data-formula"));n.push({type:"latex-inline",formula:d,children:[{text:""}]});break}case"latex-block":{const d=Is(l.getAttribute("data-formula"));n.push({type:"latex-block",formula:d,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:Tr(l)});break;default:n.push({type:"paragraph",children:Tr(l,t)});break}}else a.nodeType===Node.TEXT_NODE&&((c=a.textContent)!=null&&c.trim())&&n.push({type:"paragraph",children:[{text:a.textContent}]})}),n))(r,e.childNodes),r}function Tr(e,t){const r=[];function n(a){const c=[];let l="",f=!1,d=!1,m=0;for(;m<a.length;)a.startsWith("**",m)?(l&&(c.push({text:l,code:!0,bold:f,italic:d}),l=""),f=!f,m+=2):a.startsWith("*",m)?(l&&(c.push({text:l,code:!0,bold:f,italic:d}),l=""),d=!d,m+=1):(l+=a[m],m+=1);return l&&c.push({text:l,code:!0,bold:f,italic:d}),c}function o(a,c={}){var l,f;if(a.nodeType===Node.TEXT_NODE){const d=(l=a.textContent)==null?void 0:l.trim();return d?c.code?n(d):[{text:d,...c}]:[]}if(a.nodeType===Node.ELEMENT_NODE){const d=a,m={...c};switch(d.tagName.toLowerCase()){case"em":case"i":m.italic=!0;break;case"strong":case"b":m.bold=!0;break;case"code":d.closest("pre")||(m.code=!0);break;case"del":case"s":m.strikethrough=!0;break;case"u":m.underline=!0;break;case"a":m.link=d.getAttribute("href")||void 0;break;case"retrive-tag":{const g={};for(const{name:y,value:C}of Array.from(d.attributes))g[y]=C;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")||"",y=d.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:g,alt:y,basePath:t});let C=g;if(t)if(g.startsWith("./"))C=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const D=t.substring(0,t.lastIndexOf("/"));C=g.replace(/^\.\.\//,D+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(C=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:C}),[{type:"image",url:C,alt:y,children:[{text:""}]}]}case"iframe":{const g=d.getAttribute("src")||"",y=d.getAttribute("width")||"100%",C=d.getAttribute("height")||"400",D=d.getAttribute("frameborder")||"0",p=d.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:g,width:y,height:C,basePath:t});let A=g;if(t)if(g.startsWith("./"))A=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const O=t.substring(0,t.lastIndexOf("/"));A=g.replace(/^\.\.\//,O+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(A=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:A}),[{type:"iframe",src:A,width:y,height:C,frameborder:D,title:p,children:[{text:""}]}]}case"latex-inline":return[{type:"latex-inline",formula:Is(d.getAttribute("data-formula")),children:[{text:""}]}];case"latex-block":return[{type:"latex-block",formula:Is(d.getAttribute("data-formula")),children:[{text:""}]}]}if(d.childNodes.length===0&&((f=d.textContent)!=null&&f.trim()))return m.code?n(d.textContent):[{text:d.textContent,...m}];let v=[];for(const g of Array.from(d.childNodes))v=v.concat(o(g,m));return v}return[]}for(const a of Array.from(e.childNodes))r.push(...o(a));return r}function Uw(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:Tr(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(c=>({type:"table-cell",header:!1,children:Tr(c)}))})}))}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:Tr(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:Tr(a)}))})})}return{type:"table",children:t}}const Xw=sr.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
|
+
`,Au=sr.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
|
+
`,Vp=(e,t)=>t<0?e:`${e.slice(0,t)}\\${e.slice(t)}`,Up=(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},Yw=e=>{const t=e||"";if(!t)return{content:"",hasPendingLatex:!1};let r=t,n=!1;const o=[],a=Up(t,"$$");a!==-1&&(r=Vp(r,a),o.push(a),n=!0);const c=Up(t,"$");if(c!==-1){const l=o.filter(f=>f<=c).length;r=Vp(r,c+l),n=!0}return{content:r,hasPendingLatex:n}};var Ps=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(Ps||{});const Nc=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:a={},onChange:c,onFocus:l,onBlur:f,renderElement:d,renderLeaf:m,onRetriveTagClick:v,eventsEmit:g,extraProps:y={},className:C,style:D,styles:p,enableTemplateInput:A=!1,disabledTags:O=[]})=>{const B=_s(),F=wt(()=>{var ne,pe,Oe,Q,fe,se,ae,ge,be;return{primaryColor:((ne=B==null?void 0:B.colors)==null?void 0:ne.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((pe=B==null?void 0:B.colors)==null?void 0:pe.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((Oe=B==null?void 0:B.colors)==null?void 0:Oe.background)||(a==null?void 0:a.backgroundColor)||"transparent",textColor:((Q=B==null?void 0:B.colors)==null?void 0:Q.text)||(a==null?void 0:a.textColor)||"#24292f",borderColor:((fe=B==null?void 0:B.colors)==null?void 0:fe.border)||(a==null?void 0:a.borderColor)||"#dee2e6",disabledBackground:((se=B==null?void 0:B.colors)==null?void 0:se.disabledBackground)||(a==null?void 0:a.disabledBackground)||"#f8f9fa",hoverBackground:(a==null?void 0:a.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((ae=B==null?void 0:B.space)==null?void 0:ae.radius)||(a==null?void 0:a.borderRadius)||"4px",padding:((ge=B==null?void 0:B.space)==null?void 0:ge.padding)||(a==null?void 0:a.padding)||"0rem 1rem",margin:((be=B==null?void 0:B.space)==null?void 0:be.margin)||(a==null?void 0:a.margin)||"0.5rem",minHeight:(a==null?void 0:a.minHeight)||"200px",baseFontSize:(a==null?void 0:a.baseFontSize)||(o==="md"?14:12),...a}},[B,a,o]),N=$t();if(!N.current){const ne=Ex(),pe=z9(ne),{isInline:Oe}=pe;pe.isInline=se=>!O.includes("template")&&se.type==="template"?!0:Oe(se);const{isVoid:Q}=pe;pe.isVoid=se=>!O.includes("template")&&se.type==="template"?!0:Q(se);const fe=se=>{if(!(A&&!O.includes("template")))return se;const{insertText:ae,insertData:ge}=se,be=()=>{const Ce=/<template>([^<]*)<\/template>/g,ke=Array.from(R.nodes(se,{match:Ee=>lt.isText(Ee)&&Ce.test(Ee.text)}));if(ke.length!==0)for(const Ee of ke){const[Be,Ne]=Ee,Me=Be.text||"",He=[];let Ze=0,tt;for(Ce.lastIndex=0;(tt=Ce.exec(Me))!==null;){if(tt.index>Ze){const Te=Me.slice(Ze,tt.index);Te&&He.push({text:Te})}He.push({type:"template",placeholder:(tt[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),Ze=tt.index+tt[0].length}if(Ze<Me.length){const Te=Me.slice(Ze);Te&&He.push({text:Te})}Ke.removeNodes(se,{at:Ne}),Ke.insertNodes(se,He,{at:Ne})}};return se.insertText=Ce=>{ae(Ce),be()},se.insertData=Ce=>{const ke=Ce.getData("text/plain");if(ke&&/<template>[\s\S]*?<\/template>/.test(ke)){ae(ke),be();return}return ge(Ce)},se};N.current=fe(pe)}const I=N.current,[P,H]=Bt(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[T,V]=Bt(0);Ut(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const ne=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",ne),H(ne),V(pe=>pe+1)}},[e.type,e.content]);const K=$t(void 0),G=wt(()=>{if(e.type!=="markdown")return{content:"",hasPendingLatex:!1};const ne=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");return Yw(ne)},[e.type,e.content]);Ut(()=>{if(e.type!=="markdown")return;const ne=G.content;K.current!==ne&&(K.current=ne,V(pe=>pe+1))},[e.type,G.content]);const Y=wt(()=>e.type!=="markdown"?y:{...y||{},hasPendingLatex:G.hasPendingLatex},[y,e.type,G.hasPendingLatex]),L=$t("");Ut(()=>{if(e.type!=="markdown")return;const ne=JSON.stringify(Y||{});ne!==L.current&&(L.current=ne,V(pe=>pe+1))},[Y,e.type]);const W=xt(ne=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",ne),ne&&Array.isArray(ne)?(H(ne),c==null||c(ne,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",ne)},[c]),U=wt(()=>{const ne=F==null?void 0:F.baseFontSize;return typeof ne=="number"&&!Number.isNaN(ne)?ne:o==="md"?14:12},[F,o]),X=xt(ne=>{const pe={...ne,size:o,styles:p,eventsEmit:g,extraProps:Y};return d?d(pe):Hw(pe)},[d,o,p,g,Y]),te=xt(ne=>{const pe={...ne,styles:p,onRetriveTagClick:v};return m?m(pe):Kw(pe)},[m,p,v]);Ut(()=>(window.copyCodeFromData=ne=>{const pe=ne.getAttribute("data-code");if(!pe){console.error("No code content found");return}const Oe=pe.replace(/\\n/g,`
|
|
778
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(Oe).then(()=>{const Q=ne.innerHTML;ne.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>',ne.classList.add("copied"),setTimeout(()=>{ne.innerHTML=Q,ne.classList.remove("copied")},2e3)}).catch(Q=>{console.error("\u590D\u5236\u5931\u8D25:",Q);const fe=ne.innerHTML;ne.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>',ne.style.background="#d73a49",ne.style.borderColor="#d73a49",ne.style.color="white",setTimeout(()=>{ne.innerHTML=fe,ne.style.background="",ne.style.borderColor="",ne.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const z=wt(()=>{var ne,pe;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(ne=G.content)==null?void 0:ne.length,basePath:n,hasImages:(pe=G.content)==null?void 0:pe.includes("![")});const Oe=Kg(G.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:Oe.length,hasImageElements:Oe.some(be=>be.type==="image"),imageElements:Oe.filter(be=>be.type==="image")}),Oe&&Oe.length>0)return ee.jsx(Bu,{theme:F,$size:o,children:ee.jsx(bu,{editor:I,initialValue:Oe,onChange:()=>{},children:ee.jsx(Au,{theme:F,children:ee.jsx(vu,{renderElement:X,renderLeaf:te,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${U}px`}})})},T)});const Q={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let fe=Zt(G.content||"",Q);fe=fe.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),fe=fe.replace(/<\/table>/g,"</table></div>"),fe=fe.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(be,Ce,ke)=>{const Ee=ke.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<pre><code${Ce}>${ke}</code><button class="code-copy-btn" data-code="${Ee}" onclick="copyCodeFromData(this)" title="\u590D\u5236\u4EE3\u7801"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></pre>`});const se=(F==null?void 0:F.disabledBackground)||(F==null?void 0:F.backgroundColor)||"#ffffff",ae=(be,Ce)=>be.startsWith("#")?`${be}${Math.round(Ce*255).toString(16).padStart(2,"0")}`:be,ge=`
|
|
779
|
+
<style>
|
|
780
|
+
.table-container{ overflow:auto; border:1px solid ${(F==null?void 0:F.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(F==null?void 0:F.backgroundColor)||"transparent"} !important; }
|
|
781
|
+
.table-container table{ background:${(F==null?void 0:F.backgroundColor)||"transparent"} !important; color:${(F==null?void 0:F.textColor)||"#24292f"} !important; }
|
|
782
|
+
.table-container th{ background:${(F==null?void 0:F.disabledBackground)||"#f6f8fa"} !important; color:${(F==null?void 0:F.textColor)||"#24292f"} !important; }
|
|
783
|
+
.table-container td{ color:${(F==null?void 0:F.textColor)||"#24292f"} !important; background:${(F==null?void 0:F.backgroundColor)||"transparent"} !important; }
|
|
784
|
+
.table-container tr:nth-child(even) td{ background:${(F==null?void 0:F.disabledBackground)||"#f6f8fa"} !important; }
|
|
785
|
+
pre{ position:relative; background:${se}; border:1px solid ${(F==null?void 0:F.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(F==null?void 0:F.textColor)||"#e5e7eb"}; }
|
|
786
|
+
pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${ae("#22c55e",.25)}, ${ae("#f59e0b",.25)}, ${ae("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
|
|
787
|
+
pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(F==null?void 0:F.borderColor)||"#e5e7eb"}; color:${(F==null?void 0:F.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
|
|
788
|
+
pre .code-copy-btn:hover{ background:${(F==null?void 0:F.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
789
|
+
</style>
|
|
790
|
+
`;return ee.jsx("div",{style:{padding:(F==null?void 0:F.padding)||"1rem",fontSize:`${U}px`,lineHeight:1.6,color:(F==null?void 0:F.textColor)||"#24292f"},"data-pending-latex":G.hasPendingLatex||void 0,dangerouslySetInnerHTML:{__html:ge+fe}})}catch(Oe){return console.error("Markdown parsing error:",Oe),ee.jsx("div",{children:e.content})}},[e,F,I,T,X,te,U,G]),le=wt(()=>e.type!=="html"?null:ee.jsx("div",{style:{padding:(F==null?void 0:F.padding)||"1rem",fontSize:`${U}px`,lineHeight:1.6,color:(F==null?void 0:F.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,F,U]),ce=wt(()=>e.type!=="text"?null:ee.jsx("div",{style:{padding:(F==null?void 0:F.padding)||"1rem",fontSize:`${U}px`,lineHeight:1.6,color:(F==null?void 0:F.textColor)||"#24292f"},children:ee.jsx("span",{children:e.content||""})}),[e,F,U]),he=()=>{switch(e.type){case"markdown":return z;case"html":return le;case"text":return ce;case"slate":default:return t?ee.jsx(Bu,{theme:F,$size:o,children:ee.jsx(bu,{editor:I,initialValue:P,onChange:W,children:ee.jsx(Au,{theme:F,children:ee.jsx(vu,{renderElement:X,renderLeaf:te,placeholder:r,readOnly:!1,onFocus:l,onBlur:f,style:{minHeight:"inherit",outline:"none",fontSize:`${U}px`}})})},T)}):ee.jsx(Bu,{theme:F,$size:o,children:ee.jsx(bu,{editor:I,initialValue:P,onChange:()=>{},children:ee.jsx(Au,{theme:F,children:ee.jsx(vu,{renderElement:X,renderLeaf:te,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${U}px`}})})},T)})}};return ee.jsx(Xw,{theme:F,$isEditing:t,className:C,style:D,children:he()})};var S0={exports:{}},Gw=S0.exports,Xp;function Zw(){return Xp||(Xp=1,(function(e,t){(function(r,n){e.exports=n()})(Gw,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",c="second",l="minute",f="hour",d="day",m="week",v="month",g="quarter",y="year",C="date",D="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|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,O={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(L){var W=["th","st","nd","rd"],U=L%100;return"["+L+(W[(U-20)%10]||W[U]||W[0])+"]"}},B=function(L,W,U){var X=String(L);return!X||X.length>=W?L:""+Array(W+1-X.length).join(U)+L},F={s:B,z:function(L){var W=-L.utcOffset(),U=Math.abs(W),X=Math.floor(U/60),te=U%60;return(W<=0?"+":"-")+B(X,2,"0")+":"+B(te,2,"0")},m:function L(W,U){if(W.date()<U.date())return-L(U,W);var X=12*(U.year()-W.year())+(U.month()-W.month()),te=W.clone().add(X,v),z=U-te<0,le=W.clone().add(X+(z?-1:1),v);return+(-(X+(U-te)/(z?te-le:le-te))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:v,y,w:m,d,D:C,h:f,m:l,s:c,ms:a,Q:g}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},N="en",I={};I[N]=O;var P="$isDayjsObject",H=function(L){return L instanceof G||!(!L||!L[P])},T=function L(W,U,X){var te;if(!W)return N;if(typeof W=="string"){var z=W.toLowerCase();I[z]&&(te=z),U&&(I[z]=U,te=z);var le=W.split("-");if(!te&&le.length>1)return L(le[0])}else{var ce=W.name;I[ce]=W,te=ce}return!X&&te&&(N=te),te||!X&&N},V=function(L,W){if(H(L))return L.clone();var U=typeof W=="object"?W:{};return U.date=L,U.args=arguments,new G(U)},K=F;K.l=T,K.i=H,K.w=function(L,W){return V(L,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var G=(function(){function L(U){this.$L=T(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[P]=!0}var W=L.prototype;return W.parse=function(U){this.$d=(function(X){var te=X.date,z=X.utc;if(te===null)return new Date(NaN);if(K.u(te))return new Date;if(te instanceof Date)return new Date(te);if(typeof te=="string"&&!/Z$/i.test(te)){var le=te.match(p);if(le){var ce=le[2]-1||0,he=(le[7]||"0").substring(0,3);return z?new Date(Date.UTC(le[1],ce,le[3]||1,le[4]||0,le[5]||0,le[6]||0,he)):new Date(le[1],ce,le[3]||1,le[4]||0,le[5]||0,le[6]||0,he)}}return new Date(te)})(U),this.init()},W.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},W.$utils=function(){return K},W.isValid=function(){return this.$d.toString()!==D},W.isSame=function(U,X){var te=V(U);return this.startOf(X)<=te&&te<=this.endOf(X)},W.isAfter=function(U,X){return V(U)<this.startOf(X)},W.isBefore=function(U,X){return this.endOf(X)<V(U)},W.$g=function(U,X,te){return K.u(U)?this[X]:this.set(te,U)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(U,X){var te=this,z=!!K.u(X)||X,le=K.p(U),ce=function(ae,ge){var be=K.w(te.$u?Date.UTC(te.$y,ge,ae):new Date(te.$y,ge,ae),te);return z?be:be.endOf(d)},he=function(ae,ge){return K.w(te.toDate()[ae].apply(te.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(ge)),te)},ne=this.$W,pe=this.$M,Oe=this.$D,Q="set"+(this.$u?"UTC":"");switch(le){case y:return z?ce(1,0):ce(31,11);case v:return z?ce(1,pe):ce(0,pe+1);case m:var fe=this.$locale().weekStart||0,se=(ne<fe?ne+7:ne)-fe;return ce(z?Oe-se:Oe+(6-se),pe);case d:case C:return he(Q+"Hours",0);case f:return he(Q+"Minutes",1);case l:return he(Q+"Seconds",2);case c:return he(Q+"Milliseconds",3);default:return this.clone()}},W.endOf=function(U){return this.startOf(U,!1)},W.$set=function(U,X){var te,z=K.p(U),le="set"+(this.$u?"UTC":""),ce=(te={},te[d]=le+"Date",te[C]=le+"Date",te[v]=le+"Month",te[y]=le+"FullYear",te[f]=le+"Hours",te[l]=le+"Minutes",te[c]=le+"Seconds",te[a]=le+"Milliseconds",te)[z],he=z===d?this.$D+(X-this.$W):X;if(z===v||z===y){var ne=this.clone().set(C,1);ne.$d[ce](he),ne.init(),this.$d=ne.set(C,Math.min(this.$D,ne.daysInMonth())).$d}else ce&&this.$d[ce](he);return this.init(),this},W.set=function(U,X){return this.clone().$set(U,X)},W.get=function(U){return this[K.p(U)]()},W.add=function(U,X){var te,z=this;U=Number(U);var le=K.p(X),ce=function(pe){var Oe=V(z);return K.w(Oe.date(Oe.date()+Math.round(pe*U)),z)};if(le===v)return this.set(v,this.$M+U);if(le===y)return this.set(y,this.$y+U);if(le===d)return ce(1);if(le===m)return ce(7);var he=(te={},te[l]=n,te[f]=o,te[c]=r,te)[le]||1,ne=this.$d.getTime()+U*he;return K.w(ne,this)},W.subtract=function(U,X){return this.add(-1*U,X)},W.format=function(U){var X=this,te=this.$locale();if(!this.isValid())return te.invalidDate||D;var z=U||"YYYY-MM-DDTHH:mm:ssZ",le=K.z(this),ce=this.$H,he=this.$m,ne=this.$M,pe=te.weekdays,Oe=te.months,Q=te.meridiem,fe=function(ge,be,Ce,ke){return ge&&(ge[be]||ge(X,z))||Ce[be].slice(0,ke)},se=function(ge){return K.s(ce%12||12,ge,"0")},ae=Q||function(ge,be,Ce){var ke=ge<12?"AM":"PM";return Ce?ke.toLowerCase():ke};return z.replace(A,(function(ge,be){return be||(function(Ce){switch(Ce){case"YY":return String(X.$y).slice(-2);case"YYYY":return K.s(X.$y,4,"0");case"M":return ne+1;case"MM":return K.s(ne+1,2,"0");case"MMM":return fe(te.monthsShort,ne,Oe,3);case"MMMM":return fe(Oe,ne);case"D":return X.$D;case"DD":return K.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return fe(te.weekdaysMin,X.$W,pe,2);case"ddd":return fe(te.weekdaysShort,X.$W,pe,3);case"dddd":return pe[X.$W];case"H":return String(ce);case"HH":return K.s(ce,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return ae(ce,he,!0);case"A":return ae(ce,he,!1);case"m":return String(he);case"mm":return K.s(he,2,"0");case"s":return String(X.$s);case"ss":return K.s(X.$s,2,"0");case"SSS":return K.s(X.$ms,3,"0");case"Z":return le}return null})(ge)||le.replace(":","")}))},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(U,X,te){var z,le=this,ce=K.p(X),he=V(U),ne=(he.utcOffset()-this.utcOffset())*n,pe=this-he,Oe=function(){return K.m(le,he)};switch(ce){case y:z=Oe()/12;break;case v:z=Oe();break;case g:z=Oe()/3;break;case m:z=(pe-ne)/6048e5;break;case d:z=(pe-ne)/864e5;break;case f:z=pe/o;break;case l:z=pe/n;break;case c:z=pe/r;break;default:z=pe}return te?z:K.a(z)},W.daysInMonth=function(){return this.endOf(v).$D},W.$locale=function(){return I[this.$L]},W.locale=function(U,X){if(!U)return this.$L;var te=this.clone(),z=T(U,X,!0);return z&&(te.$L=z),te},W.clone=function(){return K.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},L})(),Y=G.prototype;return V.prototype=Y,[["$ms",a],["$s",c],["$m",l],["$H",f],["$W",d],["$M",v],["$y",y],["$D",C]].forEach((function(L){Y[L[1]]=function(W){return this.$g(W,L[0],L[1])}})),V.extend=function(L,W){return L.$i||(L(W,G,V),L.$i=!0),V},V.locale=T,V.isDayjs=H,V.unix=function(L){return V(1e3*L)},V.en=I[N],V.Ls=I,V.p={},V}))})(S0)),S0.exports}var Qw=Zw();const Jw=Ys(Qw);/**
|
|
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 eD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qg=(...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 tD={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 rD=wo(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:c,...l},f)=>ss("svg",{ref:f,...tD,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:qg("lucide",o),...l},[...c.map(([d,m])=>ss(d,m)),...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 Qr=(e,t)=>{const r=wo(({className:n,...o},a)=>ss(rD,{ref:a,iconNode:t,className:qg(`lucide-${eD(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 Ki=Qr("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 nD=Qr("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 qi=Qr("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 oD=Qr("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 aD=Qr("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 iD=Qr("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 sD=Qr("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 lD=Qr("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 uD=Qr("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 cD=Qr("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 dD=Qr("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 fD=Qr("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 hD=Qr("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 pD=Qr("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 mD=Qr("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"}]]),Fu=({src:e,index:t,token:r,url:n,eventsEmit:o,...a})=>{const[c,l]=Bt(""),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 y=new Blob([g.data]);return window.URL.createObjectURL(y)},m=async v=>{const g=await d(v);l(g||"")};return Ut(()=>{try{if(!r||!n){l(e);return}m(e)}catch{l(e)}},[e]),ee.jsx(ee.Fragment,{children:c&&ee.jsx(H1,{src:c,...a,preview:!1},t||1)})};function Ou(e,t,r=18){var c;const n=(e||"").toLowerCase(),o=((c=t==null?void 0:t.theme)==null?void 0:c.icons)||{},a=(l,f,d)=>{const m=[l,...d||[]];for(const v of m){const g=o[v];if(g){if(Le.isValidElement(g))return g;if(typeof g=="string")return ee.jsx("img",{src:g,alt:v,style:{width:r,height:r}})}}return ee.jsx(ls,{type:f,size:r})};return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(n)?a("image","Files/tupian_color",["png","jpg","jpeg"]):n==="pdf"?a("pdf","Files/pdf_color"):["doc","docx"].includes(n)?a("docx","Files/docx_color",["doc"]):["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(n)?a("sheets","Files/xls_color",["excel","xls","xlsx"]):n==="csv"?a("csv","Files/csv_color",["sheets","excel"]):["ppt","pptx"].includes(n)?a("pptx","Files/ppt_color",["ppt"]):n==="txt"||n==="md"?a("txt","Files/txt_color",["md"]):["zip","rar","7z"].includes(n)?a("archive","Files/yasuobao_color",["zip","rar"]):["odt","ods","odp","odf"].includes(n)?a("odt","Files/odt_color"):["html","htm","url"].includes(n)?a("html","Files/lianjie_color",["htm","url"]):n==="json"?a("json","Files/unknow_color"):ee.jsx(ls,{type:"Files/unknow_color",size:r})}function Jo(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Jo(r.children)));return t}function gD(e){const t=[],r=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g;let n;for(;n=r.exec(e);){const a=n[1].split(";").map(c=>c.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(c=>c.trim()).filter(Boolean);t.push(...a)}return Array.from(new Set(t))}function Wi(e){if(e==null)return null;const t=Number(e);return Number.isNaN(t)?null:t}function vD(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 bD=sr.div.attrs({className:"chat-message-container"})`
|
|
886
|
+
display: flex;
|
|
887
|
+
flex-direction: column;
|
|
888
|
+
margin-bottom: 0.5rem;
|
|
889
|
+
animation: fadeIn 0.3s ease-in-out;
|
|
890
|
+
width: 100%;
|
|
891
|
+
text-wrap: wrap;
|
|
892
|
+
|
|
893
|
+
${e=>e.$align==="right"&&`
|
|
894
|
+
align-items: flex-end;
|
|
895
|
+
`}
|
|
896
|
+
|
|
897
|
+
${e=>e.$align==="center"&&`
|
|
898
|
+
align-items: center;
|
|
899
|
+
`}
|
|
900
|
+
|
|
901
|
+
@keyframes fadeIn {
|
|
902
|
+
from {
|
|
903
|
+
opacity: 0;
|
|
904
|
+
transform: translateY(10px);
|
|
905
|
+
}
|
|
906
|
+
to {
|
|
907
|
+
opacity: 1;
|
|
908
|
+
transform: translateY(0);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
`,yD=sr.div.attrs({className:"chat-message-header"})`
|
|
912
|
+
display: flex;
|
|
913
|
+
align-items: center;
|
|
914
|
+
gap: 0.25rem;
|
|
915
|
+
margin-bottom: 0.5rem;
|
|
916
|
+
width: 100%;
|
|
917
|
+
|
|
918
|
+
${e=>e.$isUser&&`
|
|
919
|
+
flex-direction: row-reverse;
|
|
920
|
+
justify-content: end;
|
|
921
|
+
`}
|
|
922
|
+
`,xD=sr.div.attrs({className:"chat-message-avatar"})`
|
|
923
|
+
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
924
|
+
border-radius: 50%;
|
|
925
|
+
width: 2rem;
|
|
926
|
+
height: 2rem;
|
|
927
|
+
flex-shrink: 0;
|
|
928
|
+
display: flex;
|
|
929
|
+
align-items: center;
|
|
930
|
+
justify-content: center;
|
|
931
|
+
font-size: 1rem;
|
|
932
|
+
`,CD=sr.div.attrs({className:"chat-message-content"})`
|
|
933
|
+
width: 100%;
|
|
934
|
+
.message-time {
|
|
935
|
+
font-size: 0.75rem;
|
|
936
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.message-card {
|
|
940
|
+
background: ${e=>e.$isUser?"linear-gradient(180deg, #E3ECFF 0%, #EEEBFF 100%)":"#ffffff"};
|
|
941
|
+
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
942
|
+
border-radius: 0.5rem;
|
|
943
|
+
padding-top: 12px;
|
|
944
|
+
padding-bottom: 12px;
|
|
945
|
+
overflow: hidden;
|
|
946
|
+
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
947
|
+
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
948
|
+
margin-right: ${e=>e.$isUser?"40px":"0"};
|
|
949
|
+
padding: 0.25rem 1.8rem;
|
|
950
|
+
.message-text {
|
|
951
|
+
width: 100%;
|
|
952
|
+
line-height: 1.6;
|
|
953
|
+
white-space: pre-wrap !important; /* 保留换行和空格格式,使用 !important 确保优先级 */
|
|
954
|
+
border-radius: 0.5rem;
|
|
955
|
+
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
956
|
+
font-size: 0.875rem;
|
|
957
|
+
|
|
958
|
+
/* 确保子元素也继承 white-space 属性 */
|
|
959
|
+
& > * {
|
|
960
|
+
white-space: pre-wrap !important;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
`,wD=sr.div.attrs({className:"chat-message-actions-container"})`
|
|
965
|
+
margin-top: 0.5rem;
|
|
966
|
+
display: flex;
|
|
967
|
+
padding: 0.5rem;
|
|
968
|
+
align-items: center;
|
|
969
|
+
|
|
970
|
+
gap: 0.75rem;
|
|
971
|
+
|
|
972
|
+
button {
|
|
973
|
+
display: flex;
|
|
974
|
+
align-items: center;
|
|
975
|
+
gap: 0.25rem;
|
|
976
|
+
font-size: 0.875rem;
|
|
977
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
978
|
+
background: none;
|
|
979
|
+
border: none;
|
|
980
|
+
cursor: pointer;
|
|
981
|
+
transition: color 0.2s;
|
|
982
|
+
|
|
983
|
+
&:hover {
|
|
984
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
&.active {
|
|
988
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
`,DD=sr.div.attrs({className:"chat-message-follow-up-container"})`
|
|
992
|
+
margin-top: 1rem;
|
|
993
|
+
padding: 0 2.9rem;
|
|
994
|
+
|
|
995
|
+
border-radius: 0.5rem;
|
|
996
|
+
|
|
997
|
+
@keyframes followUpIn {
|
|
998
|
+
from {
|
|
999
|
+
opacity: 0;
|
|
1000
|
+
transform: translateY(6px);
|
|
1001
|
+
}
|
|
1002
|
+
to {
|
|
1003
|
+
opacity: 1;
|
|
1004
|
+
transform: translateY(0);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.follow-up-title {
|
|
1009
|
+
font-size: 0.875rem;
|
|
1010
|
+
font-weight: 600;
|
|
1011
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1012
|
+
margin-bottom: 0.75rem;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.follow-up-list {
|
|
1016
|
+
display: flex;
|
|
1017
|
+
flex-direction: column;
|
|
1018
|
+
gap: 0.5rem;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.follow-up-item {
|
|
1022
|
+
width: fit-content;
|
|
1023
|
+
background: #ffffff;
|
|
1024
|
+
border: 1px solid #e5e7eb;
|
|
1025
|
+
border-radius: 0.375rem;
|
|
1026
|
+
padding: 0.75rem 1rem;
|
|
1027
|
+
cursor: pointer;
|
|
1028
|
+
transition: all 0.2s ease;
|
|
1029
|
+
text-align: left;
|
|
1030
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1031
|
+
font-size: 0.875rem;
|
|
1032
|
+
line-height: 1.4;
|
|
1033
|
+
opacity: 0;
|
|
1034
|
+
transform: translateY(6px);
|
|
1035
|
+
animation: followUpIn 280ms ease forwards;
|
|
1036
|
+
animation-play-state: running;
|
|
1037
|
+
|
|
1038
|
+
&:hover {
|
|
1039
|
+
background: #e5e7eb;
|
|
1040
|
+
border-color: #d1d5db;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
&:active {
|
|
1044
|
+
transform: translateY(1px);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
`,Vi=sr.div.attrs({className:"chat-message-reference-container"})`
|
|
1048
|
+
padding: 1rem;
|
|
1049
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1050
|
+
|
|
1051
|
+
border-radius: 0.5rem;
|
|
1052
|
+
|
|
1053
|
+
.reference-title {
|
|
1054
|
+
font-size: 0.875rem;
|
|
1055
|
+
font-weight: 600;
|
|
1056
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1057
|
+
margin-bottom: 0.75rem;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
.reference-list {
|
|
1061
|
+
display: flex;
|
|
1062
|
+
flex-direction: column;
|
|
1063
|
+
gap: 0.5rem;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.reference-item {
|
|
1067
|
+
background: #ffffff;
|
|
1068
|
+
|
|
1069
|
+
border-radius: 0.375rem;
|
|
1070
|
+
padding: 0.75rem 0;
|
|
1071
|
+
display: flex;
|
|
1072
|
+
align-items: center;
|
|
1073
|
+
gap: 0.5rem;
|
|
1074
|
+
|
|
1075
|
+
.file-icon {
|
|
1076
|
+
width: 2rem;
|
|
1077
|
+
height: 2rem;
|
|
1078
|
+
background: #e2e8f0;
|
|
1079
|
+
border-radius: 0.25rem;
|
|
1080
|
+
display: flex;
|
|
1081
|
+
align-items: center;
|
|
1082
|
+
justify-content: center;
|
|
1083
|
+
font-size: 0.75rem;
|
|
1084
|
+
color: #64748b;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.file-info {
|
|
1088
|
+
flex: 1;
|
|
1089
|
+
|
|
1090
|
+
.file-name {
|
|
1091
|
+
font-size: 0.875rem;
|
|
1092
|
+
font-weight: 500;
|
|
1093
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1094
|
+
margin-bottom: 0.25rem;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.file-meta {
|
|
1098
|
+
font-size: 0.75rem;
|
|
1099
|
+
color: #64748b;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.file-score {
|
|
1104
|
+
font-size: 0.75rem;
|
|
1105
|
+
color: #059669;
|
|
1106
|
+
font-weight: 500;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
`,ED=sr.div.attrs({className:"chat-message-image-preview-modal"})`
|
|
1110
|
+
position: fixed;
|
|
1111
|
+
top: 0;
|
|
1112
|
+
left: 0;
|
|
1113
|
+
right: 0;
|
|
1114
|
+
bottom: 0;
|
|
1115
|
+
background: rgba(0, 0, 0, 0.8);
|
|
1116
|
+
display: ${e=>e.$show?"flex":"none"};
|
|
1117
|
+
align-items: center;
|
|
1118
|
+
justify-content: center;
|
|
1119
|
+
z-index: 1000;
|
|
1120
|
+
cursor: pointer;
|
|
1121
|
+
|
|
1122
|
+
.modal-content {
|
|
1123
|
+
max-width: 90vw;
|
|
1124
|
+
max-height: 90vh;
|
|
1125
|
+
position: relative;
|
|
1126
|
+
cursor: default;
|
|
1127
|
+
display: flex;
|
|
1128
|
+
flex-direction: column;
|
|
1129
|
+
align-items: center;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
.modal-image {
|
|
1133
|
+
max-width: 100%;
|
|
1134
|
+
max-height: calc(90vh - 60px);
|
|
1135
|
+
object-fit: contain;
|
|
1136
|
+
border-radius: 8px;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
.modal-close {
|
|
1140
|
+
margin-top: 16px;
|
|
1141
|
+
background: rgba(255, 255, 255, 0.3);
|
|
1142
|
+
border: none;
|
|
1143
|
+
border-radius: 20px;
|
|
1144
|
+
padding: 8px 20px;
|
|
1145
|
+
display: flex;
|
|
1146
|
+
align-items: center;
|
|
1147
|
+
justify-content: center;
|
|
1148
|
+
cursor: pointer;
|
|
1149
|
+
font-size: 14px;
|
|
1150
|
+
color: #333;
|
|
1151
|
+
font-weight: 500;
|
|
1152
|
+
transition: all 0.2s ease;
|
|
1153
|
+
|
|
1154
|
+
&:hover {
|
|
1155
|
+
background: rgba(255, 255, 255, 1);
|
|
1156
|
+
transform: translateY(-1px);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
`,Nu=sr.div.attrs({className:"chat-message-image-gallery-container"})`
|
|
1160
|
+
padding: 0rem 0.5rem;
|
|
1161
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1162
|
+
|
|
1163
|
+
.gallery-grid {
|
|
1164
|
+
display: grid;
|
|
1165
|
+
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
1166
|
+
gap: 0.75rem;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
.gallery-item {
|
|
1170
|
+
position: relative;
|
|
1171
|
+
aspect-ratio: 1;
|
|
1172
|
+
border-radius: 0.375rem;
|
|
1173
|
+
overflow: hidden;
|
|
1174
|
+
cursor: pointer;
|
|
1175
|
+
transition:
|
|
1176
|
+
transform 0.2s ease,
|
|
1177
|
+
box-shadow 0.2s ease;
|
|
1178
|
+
border: 2px solid transparent;
|
|
1179
|
+
|
|
1180
|
+
&:hover {
|
|
1181
|
+
transform: translateY(-2px);
|
|
1182
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1183
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
.gallery-image {
|
|
1187
|
+
width: 100%;
|
|
1188
|
+
height: 100%;
|
|
1189
|
+
object-fit: cover;
|
|
1190
|
+
background: #f3f4f6;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.gallery-overlay {
|
|
1194
|
+
position: absolute;
|
|
1195
|
+
bottom: 0;
|
|
1196
|
+
left: 0;
|
|
1197
|
+
right: 0;
|
|
1198
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1199
|
+
color: white;
|
|
1200
|
+
padding: 0.5rem;
|
|
1201
|
+
font-size: 0.75rem;
|
|
1202
|
+
text-align: center;
|
|
1203
|
+
opacity: 0;
|
|
1204
|
+
transition: opacity 0.2s ease;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
&:hover .gallery-overlay {
|
|
1208
|
+
opacity: 1;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
`,LD=({token:e,streamUrl:t,is_download:r,content:n,contentType:o="plainText",align:a="left",displayStatus:c="ready",avatar:l,isUser:f=!1,userAvatar:d,aiAvatar:m,date:v,time:g,timestamp:y,showTime:C=!0,errorMessage:D,styles:p,reference:A,webReference:O,databaseReference:B,graphReference:F,filePaths:N,currentFiles:I,fileManagerData:P,audioUrl:H,feedbackResult:T,queryId:V,defaultAnswer:K,isWelcome:G=!1,isLast:Y=!1,respTime:L,tokens:W,resultType:U,followUpQuestions:X=[],tools:te={},eventsEmit:z,referenceMode:le="list"})=>{Ut(()=>{console.log("isUser",f),console.log("isLast",Y)},[Y,f]);const ce=_s(),he=wt(()=>{var E,j,Ue,De,de,Ae,ve,je,ie,we,M;return{colors:{primary:((E=ce==null?void 0:ce.colors)==null?void 0:E.primary)||"#3b82f6",background:((j=ce==null?void 0:ce.colors)==null?void 0:j.background)||"#ffffff",userBackground:((Ue=ce==null?void 0:ce.colors)==null?void 0:Ue.primary)||"#3b82f6",border:((De=ce==null?void 0:ce.colors)==null?void 0:De.border)||"#e5e7eb",text:((de=ce==null?void 0:ce.colors)==null?void 0:de.text)||"#374151",disabled:((Ae=ce==null?void 0:ce.colors)==null?void 0:Ae.disabled)||"#6b7280",info:((ve=ce==null?void 0:ce.colors)==null?void 0:ve.info)||"#3b82f6",warning:((je=ce==null?void 0:ce.colors)==null?void 0:je.warning)||"#f59e0b",error:((ie=ce==null?void 0:ce.colors)==null?void 0:ie.error)||"#ef4444",...(we=p==null?void 0:p.theme)==null?void 0:we.colors},icons:{aiAvatar:m||"/vite.svg",userAvatar:d||"/default-user-avatar.png",...(M=p==null?void 0:p.theme)==null?void 0:M.icons}}},[ce,p,m,d]),ne=wt(()=>{const E=g||v||y;return!E||!C?null:Jw(E).format("YY-MM-DD HH:mm:ss")},[g,v,y,C]),[pe,Oe]=Bt([]),[Q,fe]=Bt(null),[se,ae]=Bt(!1),[ge,be]=Bt(!1),[Ce,ke]=Bt(!1),[Ee,Be]=Bt(!1),[Ne,Me]=Bt(!1),He=()=>{const E={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:ee.jsx(ls,{type:"rag/think",size:16})}}[c]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},j=L?`(\u7528\u65F6 ${Math.round(L/1e3)} \u79D2)`:"";return ee.jsx("div",{className:"think-header",children:ee.jsx("div",{className:"think-header-left ml-[16px]",children:ee.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-full",children:[ee.jsx("div",{className:"think-icon",children:E.icon}),ee.jsx("div",{className:"think-title",children:E.text}),j&&ee.jsx("div",{className:"think-time",children:j}),Kt&&ee.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{Me(!Ne)},children:ee.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:Ne?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:ee.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},[Ze,tt]=Bt([]),[Te,_e]=Bt(null),We=wt(()=>{try{if(!A)return[];const E=JSON.parse(A);return Array.isArray(E)?E:[]}catch{return[]}},[A]),st=(E,j)=>{var ve,je,ie;const Ue=((ve=E==null?void 0:E.metadata)==null?void 0:ve.source)||(E==null?void 0:E.file_path)||(E==null?void 0:E.path)||(E==null?void 0:E.convertedFilePath)||(E==null?void 0:E.parsedFilePath)||"",De=((je=E==null?void 0:E.metadata)==null?void 0:je.title)||(E==null?void 0:E.file_name)||"",de=((ie=E==null?void 0:E.metadata)==null?void 0:ie.id)||(E==null?void 0:E.id)||(E==null?void 0:E.file_id)||"",Ae=We.find(we=>{var Mt,kt,at;const M=((Mt=we==null?void 0:we.metadata)==null?void 0:Mt.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)||"",qe=((kt=we==null?void 0:we.metadata)==null?void 0:kt.title)||(we==null?void 0:we.file_name)||"",J=((at=we==null?void 0:we.metadata)==null?void 0:at.id)||(we==null?void 0:we.id)||"";return de&&J&&String(de)===String(J)||Ue&&M&&M===Ue||De&&qe&&qe===De});if(Ae){const we=(Ae!=null&&Ae.references&&Array.isArray(Ae.references)?Ae.references:[Ae]).find(M=>String(M.order_num)===String(j)||String(M.id)===String(j));if(we)return we}for(const we of We){if(we!=null&&we.references&&Array.isArray(we.references)){const M=we.references.find(qe=>String(qe.order_num)===String(j)||String(qe.id)===String(j));if(M)return M}if(String(we.order_num)===String(j)||String(we.id)===String(j))return we}return null},rt=(E,j)=>{function Ue(je,ie){for(const we of je){if(we.references&&Array.isArray(we.references)){const M=we.references.find(qe=>String(qe.order_num)===String(ie)||String(qe.id)===String(ie));if(M)return M}if(String(we.order_num)===String(ie)||String(we.id)===String(ie))return we}return null}let De=[];try{A&&(De=JSON.parse(A))}catch(je){console.error("Failed to parse reference:",je)}const de=Ue(De,E.id),Ae=je=>{if(typeof n!="string")return;const ie=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${je}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(ie&&ie[1]){const we=Number(ie[1]);return Number.isNaN(we)?void 0:we}},ve={tagInfo:{id:E==null?void 0:E.id,index:Ae(String(E==null?void 0:E.id)),image_urls:(E==null?void 0:E.imageUrls)||(E==null?void 0:E.image_urls)||[]},fromtype:String((E==null?void 0:E.fromtype)??""),leaf:E,attributes:j,referenceDoc:de||void 0};if(String(E==null?void 0:E.fromtype)==="2"&&F)try{const je=JSON.parse(F||"[]"),ie=(Array.isArray(je)?je:[]).find(we=>{if(Array.isArray(we==null?void 0:we.traceNodes))return we.traceNodes.some(qe=>String(qe==null?void 0:qe.id)===String(E.id));const M=String(E.id||"").split("_")[0];return String(we==null?void 0:we.id)===M});ie&&(ve.graph={id:ie.id,graphName:ie.graphName,fetchUrl:ie.fetchUrl,cyphers:ie.cyphers},ve.traceNode=Array.isArray(ie.traceNodes)?ie.traceNodes.find(we=>String(we==null?void 0:we.id)===String(E.id)):void 0)}catch{}z==null||z("action_retrive_tag",ve),z==null||z("retrive_tag:click",ve)},Qe=E=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",E),console.log("databaseReference available:",!!B),E.id&&B){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",B);const j=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:E.id,databaseReference:B}});console.log("Dispatching event:",j),window.dispatchEvent(j)}else console.log("Cannot send response - missing id or databaseReference")};Le.useEffect(()=>{const E=j=>{Qe(j.detail)};return window.addEventListener("retrieve-sql-data:request-data",E),()=>{window.removeEventListener("retrieve-sql-data:request-data",E)}},[B]),Le.useEffect(()=>{const E=j=>{St(j.detail)};return window.addEventListener("rtext_pagination_click",E),()=>{window.removeEventListener("rtext_pagination_click",E)}},[Te]);const St=E=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",E),E.replacePredataFunction&&Te){const j={...Te,rows:Te.rows};E.replacePredataFunction(j)}z==null||z("rtext_pagination_click",E)},mt=$t(new Map),ct=$t(1),bt=$t(""),Ie=$t({0:1,1:1,2:1,3:1}),ue=wt(()=>{if(typeof n=="string"){let E=n;const j=[];return V&&V!==bt.current&&(mt.current.clear(),ct.current=1,Ie.current={0:1,1:1,2:1,3:1},bt.current=V),o==="stream"&&(E=E.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Ue,De)=>{const de=De.match(/id=['"]([^'"]+)['"]/),Ae=De.match(/fromType=['"]([^'"]+)['"]/);if(de){const ve=de[1],je=Ae?Ae[1]:"0";if(!mt.current.has(ve)){const we=Ie.current,M=je==="1"?"1":je==="2"?"2":je==="3"?"3":"0",qe=we[M]??1;mt.current.set(ve,qe),we[M]=qe+1,Ie.current=we}const ie=mt.current.get(ve);return`[retrive-tag${De}][${ie}][/retrive-tag]`}return Ue})),E=E.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Ue=>{const De=Ue.match(/image_urls=['"]([^'"]+)['"]/);if(De){const de=De[1].split(";").map(Ae=>Ae.trim()).filter(Boolean);j.push(...de)}return Ue}),j.length>0&&Oe(j),E}return n},[n,o,V]),nt=wt(()=>{if(typeof ue=="string")try{return Kg(ue)}catch(E){return console.error("Failed to deserialize markdown:",E),[]}return[]},[ue]),pt=xt(E=>{if(!(!E||typeof ue!="string"))try{const j=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${E}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(ue);if(j&&j[1]){const Ue=Number(j[1]);return Number.isNaN(Ue)?j[1]:Ue}}catch{}},[ue]),Dt=wt(()=>vD(nt||[]),[nt]),vt=wt(()=>{const E={};return Dt.forEach(j=>{j!=null&&j.id&&!E[j.id]&&(E[j.id]=j.index)}),E},[Dt]);Ut(()=>{try{o==="stream"&&B&&(E=>{try{const j=typeof E=="string"?JSON.parse(E):E;return j?Array.isArray(j)?j:[j]:[]}catch{return[]}})(B).forEach(E=>{const j=E==null?void 0:E.id;if(!j)return;const Ue=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:j,databaseReference:E}});window.dispatchEvent(Ue)})}catch{}},[o,B]);const Kt=wt(()=>{if(!Array.isArray(nt))return!1;const E=Ue=>{for(const De of Ue)if(De.type==="think"||Array.isArray(De.children)&&E(De.children))return!0;return!1},j=E(nt);return console.log("Think detection:",{slateContent:nt,hasThinkElement:j,displayStatus:c,isUser:f}),j},[nt,c,f]),Ct=wt(()=>({databaseReference:B,...Kt&&{isThinkCollapsed:Ne}}),[B,Kt,Ne]),Nt=wt(()=>l||(f?he.icons.userAvatar:he.icons.aiAvatar),[l,f,he.icons]),_t=wt(()=>typeof n=="string"?n:Array.isArray(n)?n.map(E=>typeof E=="string"?E:E.text||"").join(""):K||"",[n,K]),rr=()=>{if(G)return null;const E=[{key:"copy",show:te.copy!==!1,icon:oD,label:"\u590D\u5236",onClick:()=>z==null?void 0:z("chatbox:copy",{content:_t})},{key:"like",show:te.like!==!1,icon:pD,label:"\u8D5E",onClick:()=>z==null?void 0:z("chatbox:like",{result:T,queryId:V}),active:T===1},{key:"dislike",show:te.dislike!==!1,icon:hD,label:"\u8E29",onClick:()=>z==null?void 0:z("chatbox:dislike",{result:T,queryId:V}),active:T===0},{key:"repeat",show:!f&&Y,icon:dD,label:"\u91CD\u590D",onClick:()=>z==null?void 0:z("chatbox:repeat",{content:n,queryId:V,filePaths:N,audioUrl:H})},{key:"forward",show:te.forward,icon:fD,label:"\u8F6C\u53D1",onClick:()=>z==null?void 0:z("chatbox:forward",{content:_t,queryId:V})},{key:"delete",show:te.delete,icon:mD,label:"\u5220\u9664",onClick:()=>z==null?void 0:z("chatbox:delete",{queryId:V})},{key:"edit",show:te.edit,icon:uD,label:"\u7F16\u8F91",onClick:()=>z==null?void 0:z("chatbox:edit",{content:_t,queryId:V})}];return ee.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[ee.jsx(wD,{$theme:he,children:E.filter(j=>j.show).map(j=>{const Ue=j.icon;return ee.jsx(cs,{title:j.label,placement:"top",children:ee.jsx("button",{className:j.active?"active":"",onClick:j.onClick,children:ee.jsx(Ue,{size:18})})},j.key)})}),!f&&c=="ready"&&!G&&ee.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017 ",ee.jsx("span",{style:{color:he.colors.primary},children:W||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",ee.jsx("span",{style:{color:he.colors.primary},children:Math.round((L||0)/1e3)}),"\u79D2"]})]})},yt=wt(()=>{if(!A)return[];let E=[];try{const de=JSON.parse(A);E=Array.isArray(de)?de:[]}catch{return[]}let j=E.map(de=>{var Ae;try{const ve=de.metadata||{};let je="";ve.type==="video"&&ve.source_name&&typeof ve.source_name=="string"?je=ve.source_name:de.name&&typeof de.name=="string"?je=de.name:de.file_name&&typeof de.file_name=="string"?je=de.file_name:ve.title&&typeof ve.title=="string"?je=ve.title:ve.source&&typeof ve.source=="string"?je=ve.source.split("/").pop()||"":de.order_num?je=String(de.order_num):je="\u672A\u77E5\u6587\u6863";let ie="pdf";if(ve.type&&typeof ve.type=="string")ie=ve.type.toLowerCase();else if(de.name&&typeof de.name=="string"){const kt=de.name.split(".").pop();kt&&(ie=kt.toLowerCase())}else if(ve.source&&typeof ve.source=="string"){const kt=ve.source.split(".").pop();kt&&(ie=kt.toLowerCase())}else if(de.file_path&&typeof de.file_path=="string"){const kt=de.file_path.split(".").pop();kt&&(ie=kt.toLowerCase())}const we=de.parsedFilePath||ve.file_path||de.file_path||de.convertedFilePath||ve.link||ve.source_link||"",{metadata:M,...qe}=de,J=ve.source||"",Mt=Wi(de.score??ve.score);return{file_id:ve.id||de.uid||"",file_name:je,file_type:ie,path:we,score:Mt,tags:[],parsedFilePath:de.parsedFilePath,source:J,...qe}}catch(ve){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",ve,de);const{metadata:je,...ie}=de,we=((Ae=de.metadata)==null?void 0:Ae.source)||de.file_path||de.convertedFilePath||"",M=Wi(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:M,tags:[],parsedFilePath:de.parsedFilePath,source:we,...ie}}});const Ue=Jo(nt||[]);if(Ue&&Ue.length){const de=Ue.filter(ve=>ve.fromtype==="0"),Ae=Ue.filter(ve=>ve.fromtype==="3");j=j.map(ve=>{const je=de.map(we=>{var Mt;const M=E.find(kt=>String(kt.order_num)===String(we.id));if(!M||!((Mt=M==null?void 0:M.metadata)!=null&&Mt.source))return null;const qe=ve.source||"",J=M.metadata.source||"";return qe&&J&&qe!==J?null:{id:we.id||"",index:pt(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(kt=>kt.trim()).filter(Boolean):[],metadata:M.metadata||{},order_num:M.order_num,parsedFilePath:M.parsedFilePath}}).filter(we=>we!==null),ie=Ae.map(we=>{var Mt;const M=E.find(kt=>String(kt.order_num)===String(we.id));if(!M||!((Mt=M==null?void 0:M.metadata)!=null&&Mt.source))return null;const qe=ve.source||"",J=M.metadata.source||"";return qe&&J&&qe!==J?null:{id:we.id||"",index:pt(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(kt=>kt.trim()).filter(Boolean):[],metadata:M.metadata||{},order_num:M.order_num,parsedFilePath:M.parsedFilePath}}).filter(we=>we!==null);return{...ve,tags:[...je,...ie]}})}const De=new Map;return j.filter(de=>{const Ae=(de==null?void 0:de.source)||de.file_name;return Ae?De.has(Ae)?!1:(De.set(Ae,!0),!0):!0}).sort((de,Ae)=>Number((Ae==null?void 0:Ae.score)??0)-Number((de==null?void 0:de.score)??0))},[A,nt,ue,pt]),cr=wt(()=>{if(!O)return[];let E=[];try{const De=JSON.parse(O);E=Array.isArray(De)?De:[]}catch{return[]}if(!(E!=null&&E.length))return[];let j=E.map(De=>{var Ae,ve,je;const de=(De==null?void 0:De.score)??((Ae=De==null?void 0:De.metadata)==null?void 0:Ae.score);return{link:(ve=De==null?void 0:De.metadata)==null?void 0:ve.link,file_name:(je=De==null?void 0:De.metadata)==null?void 0:je.title,score:Wi(de),tags:[]}});const Ue=Jo(nt||[]);if(Ue&&Ue.length){const De=Ue.filter(de=>de.fromtype==="1");j=j.map(de=>{const Ae=De.map(ve=>{var ie;const je=E.find(we=>String(we.order_num)===String(ve.id));return!je||!((ie=je==null?void 0:je.metadata)!=null&&ie.title)||je.metadata.title!==de.file_name?null:{id:ve.id||"",index:pt(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:je.metadata||{},order_num:je.order_num}}).filter(ve=>ve!==null);return{...de,tags:Ae}})}return j.sort((De,de)=>Number((de==null?void 0:de.score)??0)-Number((De==null?void 0:De.score)??0))},[O,nt,ue,pt]),Xt=wt(()=>{if(console.log("[ChatMessageAdapter] parseGraphReferenceData - graphReference:",F,"type:",typeof F),!F)return console.log("[ChatMessageAdapter] graphReference \u4E3A\u7A7A\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];let E=[];try{if(typeof F=="string"){if(F==="[]"||F==="null"||F.trim()==="")return console.log("[ChatMessageAdapter] graphReference \u662F\u7A7A\u5B57\u7B26\u4E32\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];const De=JSON.parse(F);E=Array.isArray(De)?De:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",E.length)}else if(Array.isArray(F))E=F,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",E.length);else if(typeof F=="object"&&F!==null)E=[F],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",E.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof F,F),[]}catch(De){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",De,F),[]}let j=E.map((De,de)=>{const{metadata:Ae,...ve}=De;return{id:De.id||`graph-${de}`,graphName:De.graphName||`\u56FE\u8C31${de+1}`,tags:[],...ve}});const Ue=Jo(nt||[]);if(Ue&&Ue.length){const De=Ue.filter(de=>de.fromtype==="2");j=j.map(de=>{let Ae=[];Array.isArray(de.traceNodes)&&de.traceNodes.length>0?Ae=de.traceNodes.map((ie,we)=>({id:ie.id,index:pt(String(ie.id))??we+1,image_urls:[],metadata:ie.metadata||{},...ie})):Ae=De.filter(ie=>String(ie.id)===String(de.id)).map(ie=>({id:ie.id||"",index:pt(String(ie.id))||ie.indexId||"",image_urls:ie.imageUrls?Array.isArray(ie.imageUrls)?ie.imageUrls:[ie.imageUrls]:ie.image_urls?ie.image_urls.split(";").map(we=>we.trim()).filter(Boolean):[],metadata:{}}));const ve=new Set,je=Ae.filter(ie=>ve.has(String(ie.id))?!1:(ve.add(String(ie.id)),!0)).sort((ie,we)=>Number(ie.index)-Number(we.index));return{...de,tags:je}})}return j},[F,nt,ue,pt]),Pr=wt(()=>{const E=[...Jo(nt||[]).filter(j=>j.imageUrls&&Array.isArray(j.imageUrls)).flatMap(j=>j.imageUrls),...pe];return Array.from(new Set(E))},[nt,pe]),kr=wt(()=>typeof n!="string"?[]:gD(n),[n]),yr=wt(()=>Array.from(new Set([...Pr||[],...kr||[]])),[Pr,kr]),dt=wt(()=>{var E,j,Ue,De,de,Ae,ve,je;if(!B)return null;try{const ie=typeof B=="string"?JSON.parse(B):B;if(Array.isArray(ie)&&ie.length>0){const we=ie[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:((j=(E=we.retrieveSqlData.preData)==null?void 0:E[0])==null?void 0:j.columns)||[],rows:((De=(Ue=we.retrieveSqlData.preData)==null?void 0:Ue[0])==null?void 0:De.data)||[]}}}return ie.retrieveSqlData?{dataFetchUrl:ie.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:ie.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:ie.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:ie.retrieveSqlData.total||0,type:ie.retrieveSqlData.type||"COLLECTION",preData:{columns:((Ae=(de=ie.retrieveSqlData.preData)==null?void 0:de[0])==null?void 0:Ae.columns)||[],rows:((je=(ve=ie.retrieveSqlData.preData)==null?void 0:ve[0])==null?void 0:je.data)||[]}}:{dataFetchUrl:ie.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:ie.databaseName||"\u6570\u636E\u5E93",tableName:ie.tableName||"\u6570\u636E\u8868",total:ie.total||0,type:ie.type||"COLLECTION",preData:ie.preData||{columns:[],rows:[]}}}catch(ie){return console.error("Failed to parse databaseReference:",ie),null}},[B]),nr=E=>{const{dataSourceType:j,databaseName:Ue,businessTableName:De,tableName:de}=E;return j==="DataTable"?`${Ue||"\u6570\u636E\u5E93"} - ${De||"\u6570\u636E\u8868"}`:j==="DirectDB"?`${Ue||"\u6570\u636E\u5E93"} - ${de||"\u6570\u636E\u8868"}`:Ue||De||de||"\u6570\u636E\u5E93"};Le.useEffect(()=>{_e(null),Oe([])},[V]),Le.useEffect(()=>{var Ue;const E=De=>{try{const de=typeof De=="string"?JSON.parse(De):De;return de?Array.isArray(de)?de:[de]:[]}catch(de){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",de),[]}},j=(De,de)=>{if(!Array.isArray(De))return[];const Ae=de!=null&&de.id?String(de.id):void 0,ve=Ae?pt(Ae):void 0,je=Ae?vt[Ae]:void 0,ie=ve??je??(de==null?void 0:de.referenceIndex)??void 0,we=Ae&&ie!==void 0?[{id:Ae,index:ie}]:[];return De.map(M=>{var qe,J,Mt,kt;return{...M,id:M.id||Ae||M.tableName,referenceId:Ae,referenceIndex:ie,tags:we,fetchUrl:M.fetchUrl||((qe=de==null?void 0:de.retrieveSqlData)==null?void 0:qe.fetchUrl)||(dt==null?void 0:dt.dataFetchUrl)||"",databaseName:M.databaseName||((J=de==null?void 0:de.retrieveSqlData)==null?void 0:J.databaseName)||(dt==null?void 0:dt.databaseName)||"",tableName:M.tableName||((Mt=de==null?void 0:de.retrieveSqlData)==null?void 0:Mt.tableName)||(dt==null?void 0:dt.tableName)||"",dataSourceType:M.dataSourceType||((kt=de==null?void 0:de.retrieveSqlData)==null?void 0:kt.type)||(dt==null?void 0:dt.type)||"DataTable"}})};if(B){const De=E(B),de=[];if(De.forEach(Ae=>{var ve,je,ie;if(Array.isArray(Ae==null?void 0:Ae.retrieveTableDataList)&&Ae.retrieveTableDataList.length)de.push(...j(Ae.retrieveTableDataList,Ae));else if(Array.isArray((ie=(je=(ve=Ae==null?void 0:Ae.retrieveSqlData)==null?void 0:ve.preData)==null?void 0:je[0])==null?void 0:ie.data)&&Ae.retrieveSqlData.preData[0].data.length){const we={businessTableName:Ae.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:Ae.retrieveSqlData.databaseName||(dt==null?void 0:dt.databaseName)||"\u6570\u636E\u5E93",tableName:Ae.retrieveSqlData.tableName||(dt==null?void 0:dt.tableName)||"\u6570\u636E\u8868",fetchUrl:Ae.retrieveSqlData.fetchUrl||(dt==null?void 0:dt.dataFetchUrl)||"",dataSourceType:Ae.retrieveSqlData.type||"DirectDB",total:Ae.retrieveSqlData.total};de.push(...j([we],Ae))}}),de.length>0){tt(de);return}if((Ue=dt==null?void 0:dt.preData)!=null&&Ue.rows){const Ae=j(dt.preData.rows,{});tt(Ae);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");tt([])},[B,dt,V,vt,pt]);const or=xt(()=>{try{const E=Array.isArray(yt)?yt:[],j=Array.isArray(cr)?cr:[],Ue=Array.isArray(Xt)?Xt:[],De=yr,de=Jo(nt||[]),Ae=qe=>typeof ue!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${qe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(ue),ve=qe=>{const J=new Map;return qe.forEach(Mt=>{if(Mt.id){const kt=String(Mt.id);if(!J.has(kt))J.set(kt,Mt);else{const at=J.get(kt),gt=Number(Mt.index)||0,it=Number(at.index)||0;(gt<it||gt===it&&!at.index)&&J.set(kt,Mt)}}}),Array.from(J.values())},je=E.map(qe=>({...qe,tags:ve((qe.tags||[]).filter(J=>J.id&&Ae(String(J.id))))})),ie=j.map(qe=>({...qe,tags:ve((qe.tags||[]).filter(J=>J.id&&Ae(String(J.id))))})),we=Ue.map(qe=>({...qe,tags:ve((qe.tags||[]).filter(J=>J.id&&Ae(String(J.id))))})),M=Ze&&Ze.length>0?Ze.map(qe=>({id:qe.id||qe.tableName||qe.referenceId||"",databaseName:qe.databaseName||(dt==null?void 0:dt.databaseName)||"",tableName:qe.tableName||(dt==null?void 0:dt.tableName)||"",fetchUrl:qe.fetchUrl||(dt==null?void 0:dt.dataFetchUrl)||"",score:Wi(qe.score),tags:qe.tags||[],referenceIndex:qe.referenceIndex,metadata:qe.metadata?{...qe.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})):[];return{queryId:V,knowledgeRefs:je,webRefs:ie,graphRefs:we,databaseRefs:M,images:De,raw:{reference:A,webReference:O,graphReference:F,databaseReference:B,retriveNodes:de}}}catch{return{queryId:V,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:A,webReference:O,graphReference:F,databaseReference:B,retriveNodes:[]}}}},[yt,cr,Xt,dt,Ze,yr,nt,V,A,O,F,B,ue]),Tt=wt(()=>{if(!f)return[];if(Array.isArray(I))return I;if(typeof I=="string"&&I)try{return JSON.parse(I)}catch{return[]}return[]},[f,I]),x=()=>{if(!f||Tt.length===0)return null;const E=ie=>{if(!ie)return"";if(typeof ie=="string"&&(ie.includes("KB")||ie.includes("MB")||ie.includes("GB")||ie.includes("B")))return ie;const we=typeof ie=="string"?parseFloat(ie)||0:ie;return we<1024?`${we}B`:we<1024*1024?`${(we/1024).toFixed(1)}KB`:`${(we/1024/1024).toFixed(1)}MB`},j=ie=>ie!=null&&ie.status&&(String(ie.status).toLowerCase()==="uploading"||String(ie.status).toLowerCase()==="parsing")?!1:!!(ie!=null&&ie.url||ie!=null&&ie.filePath||ie!=null&&ie.convertedFilePath),Ue=Tt.filter(ie=>{const we=(ie.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(we.toLowerCase())}),De=Tt.filter(ie=>{const we=(ie.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(we.toLowerCase())}),de=Ue.filter(j),Ae=Ue.filter(ie=>!j(ie)),ve=De.filter(j),je=De.filter(ie=>!j(ie));return ve.length+je.length,ee.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||Ae.length>0)&&ee.jsx(Nu,{$theme:he,children:ee.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[Ae.map((ie,we)=>{var M;return ee.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:ee.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((M=he.colors)==null?void 0:M.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${we}`)}),de.map(ie=>ee.jsxs("div",{className:"gallery-item",onClick:()=>{fe(ie.url||ie.filePath||null),z==null||z("reference_file:click",{...ie,file:ie.name,file_type:ie.file_type||"image",url:ie.url||ie.filePath,parse_url:ie.parseUrl||ie.convertedFilePath,retrieve_tags:ie.retrieveTags||[],file_id:ie.uid||ie.file_id,parsed_file_type:ie.parsed_file_type||"image",references:ie,type:ie.type||"image",isUploadFile:!0,pdfPages:ie.pdfPages||0})},children:[ee.jsx(Fu,{src:ie.url||ie.filePath,alt:ie.name,className:"gallery-image",token:e,url:t}),ee.jsx("div",{className:"gallery-overlay",children:ie.name})]},ie.uid||ie.name))]})}),(ve.length>0||je.length>0)&&ee.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"6px",alignItems:f?"flex-end":"flex-start",width:"100%"},children:ee.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:[je.map((ie,we)=>{const M=(ie.name||"").split(".").pop()||"",qe=Ou(M,p,18);return ee.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:[ee.jsx("div",{className:"pt-0.5 flex-shrink-0",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:ee.jsx("div",{style:{transform:"scale(1.2)",transformOrigin:"center"},children:qe})}),ee.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:ee.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[ee.jsx("div",{style:{height:"13px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"140px"}}),ee.jsx("div",{style:{height:"12px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"40px"}})]})})]},`pending-doc-${ie.uid||we}`)}),ve.map(ie=>{var Mt;const we=(ie.name||"").split(".").pop()||"",M=ie.size??((Mt=ie.file)==null?void 0:Mt.size)??ie.fileSize,qe=E(M),J=Ou(we,p,18);return ee.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:ie.name,onClick:()=>{z==null||z("reference_file:click",{...ie,file:ie.name,file_type:ie.file_type||we,url:ie.url||ie.filePath,parse_url:ie.parseUrl||ie.convertedFilePath,retrieve_tags:ie.retrieveTags||[],file_id:ie.uid||ie.file_id,parsed_file_type:ie.parsed_file_type||we,references:ie,type:ie.type||"file",isUploadFile:!0,pdfPages:ie.pdfPages||0})},children:[ee.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:ee.jsx("div",{style:{transform:"scale(1.65)",marginBottom:"4px",transformOrigin:"center"},children:J})}),ee.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[ee.jsx("div",{className:"flex",children:ee.jsx("div",{className:"flex items-center justify-between gap-1.5",children:ee.jsx("span",{className:"text-[13px] font-medium truncate max-w-[140px]",title:ie.name,children:ie.name})})}),ee.jsx("div",{className:" text-[12px] text-gray-400 whitespace-nowrap",children:qe})]})]},ie.uid||ie.name)})]})})]})},k=()=>{var we;if(f)return null;console.log("[ChatMessageAdapter] renderReferences \u5F00\u59CB - referenceMode:",le),console.log("[ChatMessageAdapter] renderReferences - graphReference \u539F\u59CB\u503C:",F),console.log("[ChatMessageAdapter] renderReferences - parseGraphReferenceData:",Xt);const E=Array.isArray(yt)?yt:[],j=Array.isArray(cr)?cr:[],Ue=Array.isArray(Xt)?Xt:[];console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",E.length,"webList:",j.length,"graphList:",Ue.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",Ue);const De=E.length>0&&U!==5,de=j.length>0,Ae=Ue.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",De,"hasWebRefs:",de,"hasGraphRefs:",Ae);const ve=yr.length>0,je=Ze&&Ze.length>0,ie=De||de||Ae||ve||je;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",ie),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",B),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",Ze),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",Ze==null?void 0:Ze.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",je),le==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",ie),!ie)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const M=De&&(E==null?void 0:E.length)||0,qe=de&&(j==null?void 0:j.length)||0,J=Ae&&(Ue==null?void 0:Ue.length)||0,Mt=je&&(Ze==null?void 0:Ze.length)||0;let kt=M+qe+J+Mt;return kt===0&&ve&&(kt=1),ee.jsxs(ee.Fragment,{children:[ve&&ee.jsx(Nu,{$theme:he,children:ee.jsx("div",{className:"gallery-grid",children:yr.map((at,gt)=>ee.jsxs("div",{className:"gallery-item",onClick:()=>{fe(at),z==null||z("reference_file:click",{file:`\u56FE${gt+1}`,file_type:"image",url:at,parse_url:at,retrieve_tags:[],references:{url:at},type:"image",isUploadFile:!1})},children:[ee.jsx(Fu,{src:at,alt:`\u56FE${gt+1}`,className:"gallery-image",token:e,url:t}),ee.jsxs("div",{className:"gallery-overlay",children:["\u56FE",gt+1]})]},at+gt))})}),ee.jsx("div",{style:{padding:"6px 2.9rem"},children:ee.jsxs("button",{style:{cursor:"pointer",color:((we=he.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 at=or();z==null||z("references:click",at)},onMouseEnter:at=>{var gt;at.currentTarget.style.color=((gt=he.colors)==null?void 0:gt.primary)||"#3b82f6"},onMouseLeave:at=>{var gt;at.currentTarget.style.color=((gt=he.colors)==null?void 0:gt.textDisabled)||"#86909C"},children:[ee.jsx(sD,{size:16}),ee.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",kt?` ${kt}`:""]}),ee.jsx(nD,{size:16})]})})]})}return ie?ee.jsxs(ee.Fragment,{children:[ve&&ee.jsx(Nu,{$theme:he,children:ee.jsx("div",{className:"gallery-grid",children:yr.map((M,qe)=>ee.jsxs("div",{className:"gallery-item",onClick:()=>{fe(M),z==null||z("reference_file:click",{file:`\u56FE${qe+1}`,file_type:"image",url:M,parse_url:M,retrieve_tags:[],references:{url:M},type:"image",isUploadFile:!1})},children:[ee.jsx(Fu,{src:M,alt:`\u56FE${qe+1}`,className:"gallery-image",token:e,url:t}),ee.jsxs("div",{className:"gallery-overlay",children:["\u56FE",qe+1]})]},M+qe))})}),De&&ee.jsxs(Vi,{$theme:he,children:[ee.jsx("div",{className:"reference-title justify-between items-center flex",children:ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),ee.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${E.length})`}),E.length>2&&ee.jsx("div",{onClick:()=>ae(!se),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:se?ee.jsx(qi,{size:16,className:"text-[#b4b4b4]"}):ee.jsx(Ki,{size:16,className:"text-[#b4b4b4]"})})]})}),ee.jsx("div",{className:"reference-list",children:(se?E:E.slice(0,2)).map((M,qe)=>M&&ee.jsx("div",{className:"reference-item",children:ee.jsxs("div",{className:"file-info flex items-end gap-2",children:[ee.jsx("div",{className:"flex-shrink-0",children:(()=>{const J=M.file_type||(M.file_name||"").split(".").pop()||"pdf",Mt=(M.file_name||"").split(".").pop()||"file";return J==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(J)?ee.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:ee.jsx(cD,{size:16,className:"text-red-600"})}):ee.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Ou(Mt,p,16)})})()}),ee.jsx("div",{className:"flex-1 min-w-0",children:ee.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:J=>{J.stopPropagation(),z==null||z("knowledge_referenceFile_title:click",{data:{...M,file_type:M.file_type,file_name:M.file_name,metadata:M.metadata,parsedFilePath:M.parsedFilePath}})},children:M.file_name})}),ee.jsx("div",{className:"flex items-center gap-1",children:(()=>{const J=new Set,Mt=(M.tags||[]).filter(at=>J.has(at.id)?!1:(J.add(at.id),!0)).sort((at,gt)=>Number(at.index)-Number(gt.index)),kt=at=>{if(typeof ue!="string")return at;const gt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${at}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(ue);return gt?gt[1]:at};return Mt.slice(0,10).map(at=>ee.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:gt=>{gt.stopPropagation();const it=st(M,at.id),qr=M.file_type==="video"?"3":"0";z==null||z("retrive_tag:click",{tagInfo:it||M,fromtype:qr,leaf:{id:at.id,fromtype:qr},attributes:{}})},children:kt(at.id)},at.id))})()}),typeof M.score=="number"&&ee.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(M.score).toFixed(2)]}),M.file_type!=="video"&&ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(iD,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:r?"pointer":"not-allowed"},onClick:J=>{r&&(J.stopPropagation(),z==null||z("referenceFile_download",{data:{...M,file_type:M.file_type,file_name:M.file_name,metadata:M.metadata,parsedFilePath:M.parsedFilePath}}))}}),ee.jsx("div",{className:"w-px h-4 bg-gray-300"}),ee.jsx(lD,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:J=>{J.stopPropagation(),z==null||z("referenceFile_filechat",{data:{...M,file_type:M.file_type,file_name:M.file_name,metadata:M.metadata,parsedFilePath:M.parsedFilePath}})}})]})]})},M.file_id||qe))})]}),je&&ee.jsxs(Vi,{$theme:he,children:[ee.jsx("div",{className:"reference-title justify-between items-center flex",children:ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),ee.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Ze.length||0})`}),Ze.length>2&&ee.jsx("div",{onClick:()=>ke(!Ce),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ce?ee.jsx(qi,{size:16,className:"text-[#b4b4b4]"}):ee.jsx(Ki,{size:16,className:"text-[#b4b4b4]"})})]})}),ee.jsx("div",{className:"reference-list",children:(Ce?Ze:Ze.slice(0,2)).map((M,qe)=>ee.jsx("div",{className:"reference-item",children:ee.jsxs("div",{className:"file-info flex items-end gap-2",children:[ee.jsx("div",{className:"flex-shrink-0",children:ee.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:ee.jsx(aD,{size:20,className:"text-blue-600"})})}),ee.jsx("div",{className:"flex-1 min-w-0",children:ee.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:J=>{J.stopPropagation(),z==null||z("database_referenceFile_title:click",{data:{...M,file_type:"database",file_name:nr(M),metadata:M,parsedFilePath:M.fetchUrl||(dt==null?void 0:dt.dataFetchUrl)||"",file:M.databaseName||"database",url:M.fetchUrl||(dt==null?void 0:dt.dataFetchUrl)||"",parse_url:M.fetchUrl||(dt==null?void 0:dt.dataFetchUrl)||"",retrieve_tags:M.tags||[],references:M,type:"database",isUploadFile:!1}})},children:nr(M)})}),ee.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(M.tags)&&M.tags.length?M.tags:[{id:M.referenceId||`database-${qe}`,index:M.referenceIndex??qe+1}]).map(J=>ee.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:J.index??qe+1},`${J.id||"database"}-${J.index}`))}),typeof M.score=="number"&&ee.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(M.score).toFixed(2)]})]})},M.tableName||qe))})]}),de&&ee.jsxs(Vi,{$theme:he,children:[ee.jsx("div",{className:"reference-title justify-between items-center flex",children:ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),ee.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${j.length})`}),j.length>2&&ee.jsx("div",{onClick:()=>be(!ge),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:ge?ee.jsx(qi,{size:16,className:"text-[#b4b4b4]"}):ee.jsx(Ki,{size:16,className:"text-[#b4b4b4]"})})]})}),ee.jsx("div",{className:"reference-list",children:(ge?j:j.slice(0,2)).map((M,qe)=>ee.jsx("div",{className:"reference-item",children:ee.jsxs("div",{className:"file-info flex items-end gap-2",children:[ee.jsx("div",{className:"flex-shrink-0",children:ee.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:ee.jsx(ls,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),ee.jsx("div",{className:"flex-1 min-w-0",children:ee.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:J=>{J.stopPropagation(),z==null||z("web_referenceFile_title:click",{data:{...M,file_type:M.file_type,file_name:M.file_name,metadata:M.metadata,parsedFilePath:M.parsedFilePath,file:M.file_name,url:M.link,parse_url:M.link,retrieve_tags:M.tags||[],references:M,type:"file",isUploadFile:!1}})},children:M.file_name})}),ee.jsx("div",{className:"flex items-center gap-1",children:(()=>{const J=new Set,Mt=(M.tags||[]).filter(at=>J.has(at.id)?!1:(J.add(at.id),!0)).sort((at,gt)=>Number(at.index)-Number(gt.index)),kt=at=>{if(typeof ue!="string")return at;const gt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${at}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(ue);return gt?gt[1]:at};return Mt.slice(0,1).map(at=>ee.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:gt=>{gt.stopPropagation();const it=st(M,at.id);z==null||z("retrive_tag:click",{tagInfo:it||M,fromtype:"1",leaf:{id:at.id,fromtype:"1"},attributes:{}})},children:kt(at.id)},at.id))})()}),typeof M.score=="number"&&ee.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(M.score).toFixed(2)]})]})},(M.link||"")+qe))})]}),Ae&&ee.jsxs(Vi,{$theme:he,children:[ee.jsx("div",{className:"reference-title justify-between items-center flex",children:ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),ee.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Ue.length})`}),Ue.length>2&&ee.jsx("div",{onClick:()=>Be(!Ee),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ee?ee.jsx(qi,{size:16,className:"text-[#b4b4b4]"}):ee.jsx(Ki,{size:16,className:"text-[#b4b4b4]"})})]})}),ee.jsx("div",{className:"reference-list",children:(Ee?Ue:Ue.slice(0,2)).map((M,qe)=>ee.jsx("div",{className:"reference-item",children:ee.jsxs("div",{className:"file-info flex items-end gap-2",children:[ee.jsx("div",{className:"flex-shrink-0",children:ee.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:ee.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"})})}),ee.jsx("div",{className:"flex-1 min-w-0",children:ee.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:M.graphName||`\u56FE\u8C31${qe+1}`})}),ee.jsx("div",{className:"flex items-center gap-1",children:(()=>{const J=new Set,Mt=(M.tags||[]).filter(at=>J.has(at.id)?!1:(J.add(at.id),!0)).sort((at,gt)=>Number(at.index)-Number(gt.index)),kt=at=>{if(typeof ue!="string")return null;const gt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${at}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(ue);return gt?gt[1]??null:null};return Mt.map(at=>({tag:at,num:kt(at.id)})).filter(at=>at.num!==null&&at.num!==void 0&&at.num!=="").slice(0,10).map(({tag:at,num:gt})=>ee.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:it=>{it.stopPropagation();const qr=Array.isArray(M.traceNodes)?M.traceNodes.find(fn=>String(fn==null?void 0:fn.id)===String(at.id)):void 0;z==null||z("retrive_tag:click",{tagInfo:{id:at.id,index:at.index,image_urls:at.image_urls||[]},fromtype:"2",graph:{id:M.id,graphName:M.graphName,fetchUrl:M.fetchUrl,cyphers:M.cyphers},traceNode:qr})},children:gt},at.id))})()})]})},M.id||qe))})]})]}):null},Pe=()=>f||!Y||!X||X.length===0?null:ee.jsx(DD,{$theme:he,children:ee.jsx("div",{className:"follow-up-list",children:X.map((E,j)=>ee.jsx("div",{className:"follow-up-item",style:{animationDelay:`${j*260}ms`},onClick:()=>{z==null||z("chatbox:follow_up_question_click",{question:E,queryId:V})},children:E},`${String(E)}-${j}`))})});return ee.jsxs(bD,{$align:a,$isUser:f,children:[ee.jsxs(yD,{$isUser:f,children:[ee.jsx(xD,{$src:Nt,$isUser:f}),ne&&ee.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:ne})]}),x(),ee.jsx(CD,{$isUser:f,$theme:he,children:ee.jsx("div",{className:"message-card",children:ee.jsx("div",{className:"message-text",children:o==="stream"?ee.jsxs(ee.Fragment,{children:[!f&&He(),ee.jsx(Nc,{dataSource:{type:Ps.MARKDOWN,content:ue},styles:{letterSpacing:p==null?void 0:p.letterSpacing,lineHeight:p==null?void 0:p.lineHeight,templateField:p==null?void 0:p.templateField,text:p==null?void 0:p.text},theme:{...p==null?void 0:p.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:rt,eventsEmit:z,extraProps:Ct},`md-${(ue||"").length}-think-${Ne}`)]}):ee.jsx("div",{style:{whiteSpace:"pre-wrap"},children:_t})})})}),k(),!f&&rr(),Pe(),typeof document<"u"&&V4(ee.jsx(ED,{$show:Q!==null,onClick:()=>fe(null),children:Q&&ee.jsxs("div",{className:"modal-content",onClick:E=>E.stopPropagation(),children:[ee.jsx("img",{src:Q,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),ee.jsx("button",{className:"modal-close",onClick:()=>fe(null),children:"\u5173\u95ED"})]})}),document.body)]})},kD=sr.div`
|
|
1212
|
+
position: relative;
|
|
1213
|
+
width: 100%;
|
|
1214
|
+
height: 100%;
|
|
1215
|
+
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
1216
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1217
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
1218
|
+
|
|
1219
|
+
/* 自定义滚动条 */
|
|
1220
|
+
&::-webkit-scrollbar {
|
|
1221
|
+
width: 8px;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
&::-webkit-scrollbar-track {
|
|
1225
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1226
|
+
border-radius: 4px;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
&::-webkit-scrollbar-thumb {
|
|
1230
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1231
|
+
border-radius: 4px;
|
|
1232
|
+
|
|
1233
|
+
&:hover {
|
|
1234
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
`,SD=sr.div`
|
|
1238
|
+
position: relative;
|
|
1239
|
+
width: 100%;
|
|
1240
|
+
height: 100%;
|
|
1241
|
+
overflow: auto;
|
|
1242
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1243
|
+
|
|
1244
|
+
/* 自定义滚动条 */
|
|
1245
|
+
&::-webkit-scrollbar {
|
|
1246
|
+
width: 8px;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
&::-webkit-scrollbar-track {
|
|
1250
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1251
|
+
border-radius: 4px;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
&::-webkit-scrollbar-thumb {
|
|
1255
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1256
|
+
border-radius: 4px;
|
|
1257
|
+
|
|
1258
|
+
&:hover {
|
|
1259
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
`,Yp=sr.div`
|
|
1263
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
1264
|
+
min-height: ${e=>e.height||"auto"};
|
|
1265
|
+
|
|
1266
|
+
/* 富文本内容样式增强 */
|
|
1267
|
+
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
1268
|
+
scroll-margin-top: 2rem;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
& img {
|
|
1272
|
+
max-width: 100%;
|
|
1273
|
+
height: auto;
|
|
1274
|
+
border-radius: 0.5rem;
|
|
1275
|
+
margin: 1rem 0;
|
|
1276
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
1277
|
+
transition: transform 0.2s ease-in-out;
|
|
1278
|
+
|
|
1279
|
+
&:hover {
|
|
1280
|
+
transform: scale(1.02);
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
/* 表格样式 - 主题感知 */
|
|
1285
|
+
& .table-container {
|
|
1286
|
+
overflow: auto;
|
|
1287
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
1288
|
+
border-radius: 6px;
|
|
1289
|
+
margin: 1rem 0;
|
|
1290
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
& .table-container table {
|
|
1294
|
+
width: 100%;
|
|
1295
|
+
border-collapse: collapse;
|
|
1296
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1297
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
& .table-container th,
|
|
1301
|
+
& .table-container td {
|
|
1302
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
1303
|
+
padding: 8px 12px;
|
|
1304
|
+
text-align: left;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
& .table-container th {
|
|
1308
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1309
|
+
font-weight: 600;
|
|
1310
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
& .table-container td {
|
|
1314
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
& .table-container tr:nth-child(even) {
|
|
1318
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
& pre {
|
|
1322
|
+
position: relative;
|
|
1323
|
+
|
|
1324
|
+
&::before {
|
|
1325
|
+
content: '';
|
|
1326
|
+
position: absolute;
|
|
1327
|
+
top: 0;
|
|
1328
|
+
left: 0;
|
|
1329
|
+
right: 0;
|
|
1330
|
+
height: 2px;
|
|
1331
|
+
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
1332
|
+
border-radius: 2px 2px 0 0;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
& blockquote {
|
|
1337
|
+
position: relative;
|
|
1338
|
+
|
|
1339
|
+
&::before {
|
|
1340
|
+
content: '"';
|
|
1341
|
+
position: absolute;
|
|
1342
|
+
top: -0.5rem;
|
|
1343
|
+
left: -1rem;
|
|
1344
|
+
font-size: 3rem;
|
|
1345
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1346
|
+
opacity: 0.3;
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
`,BD=sr.div`
|
|
1352
|
+
display: flex;
|
|
1353
|
+
align-items: center;
|
|
1354
|
+
justify-content: center;
|
|
1355
|
+
padding: 2rem;
|
|
1356
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1357
|
+
font-size: 0.875rem;
|
|
1358
|
+
|
|
1359
|
+
&::before {
|
|
1360
|
+
content: '';
|
|
1361
|
+
width: 20px;
|
|
1362
|
+
height: 20px;
|
|
1363
|
+
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
1364
|
+
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1365
|
+
border-radius: 50%;
|
|
1366
|
+
animation: spin 1s linear infinite;
|
|
1367
|
+
margin-right: 0.5rem;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
@keyframes spin {
|
|
1371
|
+
0% { transform: rotate(0deg); }
|
|
1372
|
+
100% { transform: rotate(360deg); }
|
|
1373
|
+
}
|
|
1374
|
+
`,AD=sr.div`
|
|
1375
|
+
display: flex;
|
|
1376
|
+
flex-direction: column;
|
|
1377
|
+
align-items: center;
|
|
1378
|
+
justify-content: center;
|
|
1379
|
+
padding: 3rem;
|
|
1380
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1381
|
+
text-align: center;
|
|
1382
|
+
|
|
1383
|
+
&::before {
|
|
1384
|
+
content: '📄';
|
|
1385
|
+
font-size: 3rem;
|
|
1386
|
+
margin-bottom: 1rem;
|
|
1387
|
+
}
|
|
1388
|
+
`,FD=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:c=!1,size:l="sm",basePath:f,theme:d={},onChange:m,onScroll:v,onScrollToTop:g,onScrollToBottom:y,onSegmentClick:C,className:D,style:p,height:A="100%"})=>{const O=_s(),B=wt(()=>{var ge,be,Ce,ke,Ee,Be,Ne,Me,He;return{primaryColor:(d==null?void 0:d.primaryColor)||((ge=O==null?void 0:O.colors)==null?void 0:ge.primary)||"#007bff",secondaryColor:(d==null?void 0:d.secondaryColor)||((be=O==null?void 0:O.colors)==null?void 0:be.secondary)||"#6c757d",backgroundColor:(d==null?void 0:d.backgroundColor)||((Ce=O==null?void 0:O.colors)==null?void 0:Ce.background)||"#ffffff",textColor:(d==null?void 0:d.textColor)||((ke=O==null?void 0:O.colors)==null?void 0:ke.text)||"#24292f",borderColor:(d==null?void 0:d.borderColor)||((Ee=O==null?void 0:O.colors)==null?void 0:Ee.border)||"#dee2e6",disabledBackground:(d==null?void 0:d.disabledBackground)||((Be=O==null?void 0:O.colors)==null?void 0:Be.disabledBackground)||"#f8f9fa",hoverBackground:(d==null?void 0:d.hoverBackground)||((Ne=O==null?void 0:O.colors)==null?void 0:Ne.hoverBackground)||"#e9ecef",borderRadius:(d==null?void 0:d.borderRadius)||((Me=O==null?void 0:O.space)==null?void 0:Me.radius)||"8px",padding:(d==null?void 0:d.padding)||((He=O==null?void 0:O.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}},[O,d]),F=$t(0);F.current+=1,console.log("[Markdownit] render count:",F.current);const[N,I]=Bt([]),[P,H]=Bt({start:0,end:10}),[T,V]=Bt(0),[K,G]=Bt(0),[Y,L]=Bt(!1),[W,U]=Bt(!1),[X,te]=Bt(!1),z=$t(null),le=$t(null),ce=$t(null),he=wt(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);Ut(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(he)?he.length:"n/a"),I(he)},[he]);const ne=wt(()=>t?`${N.length*r}px`:"auto",[N.length,r,t]),pe=wt(()=>{if(!t)return N;const ge=Math.max(0,P.start-n),be=Math.min(N.length,P.end+n);return N.slice(ge,be).map((Ce,ke)=>({...Ce,virtualIndex:ge+ke}))},[N,P,t,n]),Oe=xt(ge=>{const{scrollTop:be,scrollHeight:Ce,clientHeight:ke}=ge.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:be,scrollHeight:Ce,clientHeight:ke});const Ee=!t&&!v&&!g&&!y&&!o;if(console.log("[Markdownit] passiveOnly:",Ee),Ee||V(Be=>Be!==be?(console.log("[Markdownit] setScrollTop:",be),be):Be),t&&!Ee){const Be=Math.floor(be/r),Ne=Math.min(N.length,Be+Math.ceil(K/r)+1);H(Me=>Me.start!==Be||Me.end!==Ne?(console.log("[Markdownit] setVisibleRange:",{start:Be,end:Ne}),{start:Be,end:Ne}):Me)}if(!Ee){const Be=be<=10;Be!==W&&(console.log("[Markdownit] isAtTop ->",Be),U(Be),Be&&g&&(console.log("[Markdownit] onScrollToTop callback"),g()))}if(!Ee){const Be=be+ke>=Ce-10;Be!==X&&(console.log("[Markdownit] isAtBottom ->",Be),te(Be),Be&&y&&(console.log("[Markdownit] onScrollToBottom callback"),y()))}v&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:be,scrollHeight:Ce}),v(be,Ce)),o&&a&&!Y&&!c&&Ce-be-K<100&&Q()},[t,r,N.length,K,o,a,Y,c,W,X,g,y,v]),Q=xt(async()=>{if(!(!a||Y||c)){L(!0);try{const ge=N[N.length-1],be=await a(ge.id);I(Ce=>[...Ce,...be])}catch(ge){console.error("Failed to load more segments:",ge)}finally{L(!1)}}},[a,N,Y,c]);Ut(()=>{const ge=()=>{z.current&&G(z.current.clientHeight)};return ge(),window.addEventListener("resize",ge),()=>window.removeEventListener("resize",ge)},[]);const fe=xt((ge,be)=>{const Ce={type:ge.type,content:ge.content},ke=t?{position:"absolute",top:`${(ge.virtualIndex||be)*r}px`,left:0,right:0,height:`${r}px`}:{};return ee.jsx("div",{style:ke,onClick:()=>C==null?void 0:C(ge.id,ge),className:C?"cursor-pointer hover:bg-gray-50":"",children:ee.jsx(Nc,{dataSource:Ce,isEditing:!1,size:l,basePath:f,theme:B,onChange:m,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},ge.id)},[t,r,B,m,C]),se=()=>(console.log("[Markdownit] renderContent segments.len:",N.length,"enableVirtualScroll:",t),N.length===0?ee.jsxs(AD,{theme:B,children:[ee.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),ee.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?ee.jsx("div",{ref:ce,style:{height:ne,position:"relative"},children:pe.map(fe)}):ee.jsx("div",{ref:ce,children:N.map(fe)})),ae=()=>!Y&&!c?null:ee.jsx(BD,{theme:B,children:c?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return ee.jsx(kD,{ref:z,theme:B,$isVirtualized:t,className:D,style:{height:A,...p},children:t?ee.jsx(SD,{ref:le,theme:B,onScroll:Oe,children:ee.jsx(Yp,{theme:B,height:ne,children:se()})}):ee.jsxs(Yp,{theme:B,onScroll:Oe,children:[se(),ae()]})})},jD=e=>{const{onRendered:t}=e;return Ut(()=>{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]),ee.jsx("div",{"data-markdownit-root":"1",children:ee.jsx(FD,{...e})})};sr.div`
|
|
1389
|
+
background: #f6f8fa;
|
|
1390
|
+
border: 1px solid #d0d7de;
|
|
1391
|
+
border-radius: 6px;
|
|
1392
|
+
padding: 16px;
|
|
1393
|
+
margin-bottom: 20px;
|
|
1394
|
+
`;sr.p`
|
|
1395
|
+
margin: 0 0 16px 0;
|
|
1396
|
+
color: #656d76;
|
|
1397
|
+
font-size: 14px;
|
|
1398
|
+
line-height: 1.5;
|
|
1399
|
+
`;const Gp=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 c=o[0],l=o[1]||"",f=(o[2]||"").trim(),d=o.index,m=d+c.length;if(d>n){const A=e.slice(n,d);A.trim()!==""&&(r.push({text:A}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:A}))}const v=A=>{const O=new RegExp(`${A}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
1400
|
+
])*?)\\1`,"i"),B=l.match(O);return B?B[2]:void 0},g=/\S/.test(l),y=v("key"),C=v("placeholder"),D=y||`template-${Date.now()}-${a++}`,p={type:"template",key:D,placeholder:g?C||"\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(p),console.log("\u6DFB\u52A0template\u5143\u7D20:",p),n=m}if(n<e.length){const c=e.slice(n);c.trim()!==""&&(r.push({text:c}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:c}))}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)},$u=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||"",c=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",l=o.value||"",f=` key="${String(a)}" placeholder="${String(c)}"`;r+=`<template${f}>${l}</template>`,n=l||c}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},OD=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},ND=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\`\`\`
|
|
1401
|
+
${n.value||n.placeholder}\`\`\`
|
|
1402
|
+
\`\`\`
|
|
1403
|
+
`)}),r},$D=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",c=n.value||"",l=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${l}>${c}</template>`}}),r},_D=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var y,C,D,p,A,O,B,F,N,I,P,H,T,V,K,G,Y,L,W,U,X,te,z,le,ce,he,ne,pe,Oe,Q,fe,se,ae,ge,be,Ce,ke,Ee,Be,Ne,Me,He,Ze,tt,Te,_e,We,st,rt,Qe,St,mt;const a=_s(),c={theme:{colors:{primary:((y=a==null?void 0:a.colors)==null?void 0:y.primary)||"#055AFF",secondary:((C=a==null?void 0:a.colors)==null?void 0:C.secondary)||"#84ADFF",background:((D=a==null?void 0:a.colors)==null?void 0:D.background)||"#E5EEFF",text:((p=a==null?void 0:a.colors)==null?void 0:p.text)||"#055AFF",border:((A=a==null?void 0:a.colors)==null?void 0:A.border)||"#84ADFF",success:((O=a==null?void 0:a.colors)==null?void 0:O.success)||"#008000",warning:((B=a==null?void 0:a.colors)==null?void 0:B.warning)||"#FFA500",error:((F=a==null?void 0:a.colors)==null?void 0:F.error)||"#FF0000",info:((N=a==null?void 0:a.colors)==null?void 0:N.info)||"#0000FF",disabled:((I=a==null?void 0:a.colors)==null?void 0:I.disabled)||"#808080",disabledBackground:((P=a==null?void 0:a.colors)==null?void 0:P.disabledBackground)||"#F5F5F5",disabledText:((H=a==null?void 0:a.colors)==null?void 0:H.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:((V=a==null?void 0:a.colors)==null?void 0:V.appBackground)||"transparent",listBackground:((K=a==null?void 0:a.colors)==null?void 0:K.listBackground)||"#f9f9f9",dashboardBackground:((G=a==null?void 0:a.colors)==null?void 0:G.dashboardBackground)||"#ffffff",textSecondary:((Y=a==null?void 0:a.colors)==null?void 0:Y.textSecondary)||"#6b7280"},space:{sidebar:((L=a==null?void 0:a.space)==null?void 0:L.sidebar)||"260px",size:((W=a==null?void 0:a.space)==null?void 0:W.size)||"12px",radius:((U=a==null?void 0:a.space)==null?void 0:U.radius)||"6px",padding:((X=a==null?void 0:a.space)==null?void 0:X.padding)||"16px",margin:((te=a==null?void 0:a.space)==null?void 0:te.margin)||"20px",shadow:((z=a==null?void 0:a.space)==null?void 0:z.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((le=a==null?void 0:a.space)==null?void 0:le.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((he=(ce=a==null?void 0:a.fonts)==null?void 0:ce.body)==null?void 0:he.size)||"14px",weight:((pe=(ne=a==null?void 0:a.fonts)==null?void 0:ne.body)==null?void 0:pe.weight)||"normal",family:((Q=(Oe=a==null?void 0:a.fonts)==null?void 0:Oe.body)==null?void 0:Q.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((se=(fe=a==null?void 0:a.fonts)==null?void 0:fe.heading)==null?void 0:se.size)||"16px",weight:((ge=(ae=a==null?void 0:a.fonts)==null?void 0:ae.heading)==null?void 0:ge.weight)||"600",family:((Ce=(be=a==null?void 0:a.fonts)==null?void 0:be.heading)==null?void 0:Ce.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:((Ee=a==null?void 0:a.colors)==null?void 0:Ee.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:((Ze=(He=a==null?void 0:a.fonts)==null?void 0:He.body)==null?void 0:Ze.size)||"14px",fontWeight:((Te=(tt=a==null?void 0:a.fonts)==null?void 0:tt.body)==null?void 0:Te.weight)||"500",minWidth:"30px",textColor:((_e=a==null?void 0:a.colors)==null?void 0:_e.text)||"#84ADFF"},f={...c,...n,theme:{...c.theme,...n==null?void 0:n.theme,colors:{...(We=c.theme)==null?void 0:We.colors,...(st=n==null?void 0:n.theme)==null?void 0:st.colors},space:{...(rt=c.theme)==null?void 0:rt.space,...(Qe=n==null?void 0:n.theme)==null?void 0:Qe.space},fonts:{...(St=c.theme)==null?void 0:St.fonts,...(mt=n==null?void 0:n.theme)==null?void 0:mt.fonts}},templateField:{...l,...n==null?void 0:n.templateField}},[d,m]=Bt(()=>Gp(e));Ut(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const ct=Gp(e);console.log("\u65B0\u7684Slate\u6570\u636E:",ct),m(ct)},[e]),Ut(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",d)},[d]);const v=xt((ct,bt)=>{if(bt===Ps.SLATE&&ct){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",ct),m(ct);const Ie=$u(ct);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Ie),t==null||t(Ie)}},[t]),g=xt(ct=>{if(!d||d.length===0)return"";switch(ct){case"pure_string":return OD(d);case"string":return $u(d);case"markdown":return ND(d);case"html":return $D(d);default:return $u(d)}},[d]);return Ut(()=>{o==null||o(g)},[g,o]),ee.jsx(Nc,{dataSource:{type:Ps.SLATE,content:d},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:v,size:"md",styles:f,enableTemplateInput:!0})};export{W0 as D,oo as F,LD as I,jD as L,rc as T,Ps as X,_D as q};
|